$hash) { if (((string)round($user_id,0)==(string)$user_id) and (32==strlen($hash))) { $hash_s = safe_text($hash); $user_id_s = round($user_id); //FIL: запоминаем какие то дополнительные параметры для пользователя, если небыло смены пользователя в текущей сессии. $FLG_CUR_USER = false; if ($user_id_s == $_SESSION['user_info']['id']) { $FLG_CUR_USER = true; $user_free_show = $_SESSION['user_info']['free_show']; } $selected_val = $_SESSION['user_info']['val']; $user_info = $db->get_row("select * from user where id='".$user_id_s."' and black='0'",ARRAY_A); if ($user_info['id']) { get_or_create_cart_for_user($user_info['id']); load_discount_data($user_info); unset_pass($user_info); unset($_SESSION['user_info']); $_SESSION['user_info'] = $user_info; if ($ue_only) { $_SESSION['user_info']['val'] = 2; } else if ($selected_val > 0) { $_SESSION['user_info']['val'] = $selected_val; } if ($FLG_CUR_USER) { $_SESSION['user_info']['free_show'] = $user_free_show; } } $_SESSION['user_info']['hash_until']=time()+365*24*60*60; } } } if (isset($_SESSION['user_info']) && $_SESSION['user_info']['blocked']){ setcookie($_SESSION['user_info']['id'],'',time()-(365*24*60*60)); session_destroy(); header("location: /?blocked=1"); } autoban(); $do = isset($_REQUEST['do']) ? safe_text($_REQUEST['do']) : null; if ($do == '' || !$do) $do = 'default'; if (!file_exists("./do/$do.php")) header("HTTP/1.0 404 Not Found"); include("./do/$do.php"); ?>