query($sql); $row = $result->fetch_assoc(); if ($row['ban'] == 1) { $screen = '

Ваш аккаунт заблокирован в связи с нарушениями

'; unset($user_id); unset($_SESSION['us_id']); unset($user_name); unset($_SESSION['us_name']); } else { $user_discount_array = user_discount($user_id); $user_discount = $user_discount_array[0]; } } ######################## #### Разбираем ЧПУ #### ######################## $qstr = explode('/', ltrim($_SERVER['REQUEST_URI'], '/')); $do = mysql_escape_string($qstr[0]); if (preg_match('/index.php/', $do) || isset($_GET['fb_action_ids'])) $do = ''; if ($do == 'olenev') exit; // Разбираем ЧПУ на переменные $keyq = array_search('year', $qstr); if ($keyq) { $year = (int)$qstr[$keyq+1]; } $keyq = array_search('page', $qstr); if ($keyq) { $page = (int)$qstr[$keyq+1]; } $searchword = $_GET['searchword']; if ($searchword == '') $searchword = $_POST['searchword']; if (($do == 'auction' && $_GET['searchword']) || $do == 'searchau') { if ($searchword != '') $do = 'searchau'; } else { if ($searchword != '') $do = 'search'; } //if ($do != 'search' && $do != 'search') $do = strstr($do, '?', true); // принудительная очистка от GET-парамеиров if (strpos($do, '?yclid') !== false) $do = strstr($do, '?', true); //if (file_exists("pages/$do.inc")) { if (in_array($do, $defined_pages)) { include "pages/$do.inc"; } else include 'pages/index.inc'; include 'inc/top.inc'; if ($do == 'item' || ($do == 'auction' && $do2 == 'item')) $bread_slash = true; else $bread_slash = false; if (count($bread_links) > 0) echo breadcrumbs($bread_links, $bread_items, $bread_slash); if ($H1_title != '') echo "$H1_title"; echo $screen; include 'inc/bot.inc'; //echo $_SERVER['HTTP_HOST'];