if ($category_skin != "") {
$category_skin = trim( totranslit($category_skin, false, false) );
if ($category_skin != '' AND @is_dir ( ROOT_DIR . '/templates/' . $category_skin )) {
$config['skin'] = $category_skin;
}
} elseif (isset ( $_REQUEST['action_skin_change'] )) {
$_REQUEST['skin_name'] = trim( totranslit($_REQUEST['skin_name'], false, false) );
if ($_REQUEST['skin_name'] != '' AND @is_dir ( ROOT_DIR . '/templates/' . $_REQUEST['skin_name'] ) ) {
$config['skin'] = $_REQUEST['skin_name'];
set_cookie ( "dle_skin", $_REQUEST['skin_name'], 365 );
}
} elseif (isset ( $_COOKIE['dle_skin'] ) ) {
$_COOKIE['dle_skin'] = trim( totranslit($_COOKIE['dle_skin'], false, false) );
if ($_COOKIE['dle_skin'] != '' AND @is_dir ( ROOT_DIR . '/templates/' . $_COOKIE['dle_skin'] )) {
$config['skin'] = $_COOKIE['dle_skin'];
}
}