0 ? $_page : 1; $_show = isset($_GET['s']) ? trim($_GET['s']) : null; $_user = isset($_GET['u']) ? trim($_GET['u']) : null; $_notice = isset($_COOKIE['notice']) ? trim($_COOKIE['notice']) : null; if (isset($_COOKIE['notice'])) { kill_cookie('notice'); } if ($_action) { $module_type = 'a'; $module_type_long = 'action'; $module_name = $_action; ignore_user_abort(true); } elseif ($_show) { $module_type = 's'; $module_type_long = 'show'; $module_name = $_show; } elseif ($_ajax) { $module_type = 'j'; $module_type_long = 'ajax'; $module_name = $_ajax; ignore_user_abort(true); } elseif ($_graphic) { $module_type = 'g'; $module_type_long = 'graphic'; $module_name = $_graphic; } else { $module_type = $module_type_long = $module_name = ''; } $GLOBALS['method'] = $module_type_long; $GLOBALS['page'] = $module_name; $modules = mysql_query("SELECT * FROM modules WHERE name = '" . $module_name . "' AND type = '" . $module_type . "'"); if ($module = @mysql_fetch_assoc($modules)) { $GLOBALS['filename'] = ($module['permission'] ? 'admin/' : '') . $module['filename']; if ($module['permission'] && !$GLOBALS['auth'][$module['permission']]) { make_cookie('notice', INDEX_PERMISSION); header('Location: ./?s=home'); die; } if ($module['membership'] == -1 && $GLOBALS['auth']['id']) { make_cookie('notice', INDEX_NOT_LOGED); header('Location: ./?s=home'); die; } elseif ($module['membership'] == 1 && !$GLOBALS['auth']['id']) { make_cookie('notice', INDEX_LOGED); header('Location: ./?s=home'); die; } include('include/' . $module_type_long . '/' . ($module['permission'] ? 'admin/' : '') . $module['filename']); if ($module_type_long == 'show') { include('include/schedule/schedule.php'); } } else { include('include/show/home.php'); } @mysql_close(); die; ?>