} if (Filter::input('id', 'get', 'int')) { $mode = 'news_full'; } else { $mode = Filter::input('mode', 'post', 'stringLow', true); if ($mode === false) { $mode = Filter::input('mode', 'get', 'stringLow', true); } if (!$mode) { $mode = $config['s_dpage']; } } switch ($mode) { case 'start': $page = 'Начать игру'; $content_main = View::ShowStaticPage('start_game.html'); break; case 'register': case 'news': include './location/news.php'; break; case 'news_full': include './location/news_full.php'; break; case 'options': include './location/options.php'; break; case 'news_add': include './location/news_add.php'; break; case 'control':
$html .= Message::Comment($file[$i]) . '<br>'; } } $arrGen = new View(); $html .= $arrGen->arrowsGenerator('index.php?mode=control&do=log&', $curlist, $count, $max); break; case 'user': $html .= View::ShowStaticPage('user_find.html', $st_subdir . 'user/'); $controlManager = new ControlManager(false, 'index.php?mode=control&'); $html .= $controlManager->ShowUserListing($curlist, 'none'); $do = false; break; case 'search': $input = Filter::input('input', 'get'); $search_by = Filter::input('sby', 'get'); $html .= View::ShowStaticPage('user_find.html', $st_subdir . 'user/'); if ($search_by and $input and (preg_match("/^[a-zA-Z0-9_-]+\$/", $input) or preg_match("/[0-9.]+\$/", $input) or preg_match("/[0-9]+\$/", $input))) { $controlManager = new ControlManager(false, 'index.php?mode=control&do=search&sby=' . $search_by . '&input=' . $input . '&'); $html .= $controlManager->ShowUserListing($curlist, $search_by, $input); } $do = false; break; case 'ipbans': $timeout = Filter::input('timeout', 'post', 'int'); if ($timeout) { sqlConfigSet('next-reg-time', $timeout); sqlConfigSet('email-verification', (int) Filter::input('emailver', 'post', 'bool')); $info .= lng('OPTIONS_COMPLETE'); } elseif (POSTGood('def_skin_male') or POSTGood('def_skin_female')) { $female = POSTGood('def_skin_female') ? true : false; $tmp_dir = MCRAFT . 'tmp/';
default: $modifed = false; break; } if ($modifed) { $message .= "<br />"; } } aExit(2, $message); } if ($input['method'] == 2) { $tmp_user = new User($input['id']); if ($tmp_user->id() and !strcmp($tmp_user->getVerificationStr(), $input['verificate'])) { $tmp_user->changeGroup(1); } exit(View::ShowStaticPage('mail_verification_ok.html', 'other/')); } RefreshBans(); $female = $input['female'] ? 1 : 0; if (!CanAccess()) { aExit(11, lng('IP_BANNED')); } if (empty($input['login']) || empty($input['pass']) || empty($input['repass'])) { aExit(1, lng('INCOMPLETE_FORM')); } if (!preg_match("/^[a-zA-Z0-9_-]+\$/", $input['login'])) { $rcodes[] = 2; } if (!preg_match("/^[a-zA-Z0-9_-]+\$/", $input['pass'])) { $rcodes[] = 3; }
<?php if (!defined('MCR')) { exit; } $page = 'Как начать играть'; $content_main = View::ShowStaticPage('guide.html'); $menu->SetItemActive('guide');
<?php if (!defined('MCR')) { exit; } $page = 'Правила сервера'; $content_main = View::ShowStaticPage('rules.html'); $menu->SetItemActive('rules');
<?php if (!defined('MCR')) { exit; } $page = 'Карта'; $content_main = View::ShowStaticPage('map.html'); $menu->SetItemActive('map');
<?php if (!defined('MCR')) { exit; } $page = 'Страница не найдена'; $sub_dir = ''; $route = Filter::input('route', 'get', 'string', true); if ($route and strpos($route, $site_ways['mcraft']) !== false) { $sub_dir = 'launcher/'; } $content_main = View::ShowStaticPage('404.html', $sub_dir); if ($sub_dir) { exit($content_main); }