4images code on GitHub Click here to visit GitHub.
0 Members and 1 Guest are viewing this topic.
if (isset($HTTP_GET_VARS['l']) || isset($HTTP_POST_VARS['l'])) { $l = (isset($HTTP_GET_VARS['l'])) ? trim($HTTP_GET_VARS['l']) : trim($HTTP_POST_VARS['l']); if (file_exists(ROOT_PATH.'lang/'.$l.'/main.php')) { $config['language_dir'] = $l; }}
$l = null;if (isset($HTTP_GET_VARS['l']) || isset($HTTP_POST_VARS['l'])) { $requested_l = (isset($HTTP_GET_VARS['l'])) ? trim($HTTP_GET_VARS['l']) : trim($HTTP_POST_VARS['l']); if (!preg_match('#\.\.[\\\/]#', $requested_l) && $requested_l != $config['language_dir'] && file_exists(ROOT_PATH.'lang/'.$requested_l.'/main.php')) { $l = $requested_l; $config['language_dir'] = $l; }}
if ($requested_l != $config['language_dir'] && file_exists(ROOT_PATH.'lang/'.$requested_l.'/main.php')) {
if (!preg_match('#\.\.[\\\/]#', $requested_l) && $requested_l != $config['language_dir'] && file_exists(ROOT_PATH.'lang/'.$requested_l.'/main.php')) {
if (isset($HTTP_GET_VARS['l']) || isset($HTTP_POST_VARS['l'])) { $l = (isset($HTTP_GET_VARS['l'])) ? trim($HTTP_GET_VARS['l']) : trim($HTTP_POST_VARS['l']); if (file_exists(ROOT_PATH.'lang/'.$l.'/main.php')) { $config['language_dir'] = $l; setcookie('4images_lang', $l, (time()+ 60 * 60 * 24 * 365), "/", "", 0); }}else{ if (isset($HTTP_COOKIE_VARS['4images_lang']) && file_exists(ROOT_PATH.'lang/'.$HTTP_COOKIE_VARS['4images_lang'].'/main.php')) { $l = $config['language_dir'] = $HTTP_COOKIE_VARS['4images_lang']; }}
if (isset($HTTP_GET_VARS['l']) || isset($HTTP_POST_VARS['l'])) { $requested_l = (isset($HTTP_GET_VARS['l'])) ? trim($HTTP_GET_VARS['l']) : trim($HTTP_POST_VARS['l']); if (!preg_match('#\.\.[\\\/]#', $requested_l) && file_exists(ROOT_PATH.'lang/'.$requested_l.'/main.php')) { $l = $requested_l; $config['language_dir'] = $l; setcookie('4images_lang', $l, (time()+ 60 * 60 * 24 * 365), "/", "", 0); }}else{ if (isset($HTTP_COOKIE_VARS['4images_lang']) && !preg_match('#\.\.[\\\/]#', $HTTP_COOKIE_VARS['4images_lang']) && file_exists(ROOT_PATH.'lang/'.$HTTP_COOKIE_VARS['4images_lang'].'/main.php')) { $l = $config['language_dir'] = $HTTP_COOKIE_VARS['4images_lang']; }}