Файл: adm_panel/index.php
Строк: 92
<?php
require_once '../sys/inc/start.php';
require_once '../sys/inc/compress.php';
require_once '../sys/inc/sess.php';
require_once '../sys/inc/settings.php';
require_once '../sys/inc/db_connect.php';
require_once '../sys/inc/ipua.php';
require_once '../sys/inc/fnc.php';
require_once '../sys/inc/adm_check.php';
require_once '../sys/inc/user.php';
user_access('adm_panel_show', null, '/index.php?' . SID);
if (isset($_SESSION['adm_auth']) && $_SESSION['adm_auth'] > $time || isset($_SESSION['captcha']) && isset($_POST['chislo']) && $_SESSION['captcha'] == $_POST['chislo']) {
$_SESSION['adm_auth'] = $time + 600;
if (isset($_GET['go']) && $_GET['go'] != null) {
header('Location: ' . base64_decode($_GET['go']));
exit;
}
$set['title'] = 'Панель управления';
require_once '../sys/inc/thead.php';
title();
err();
aut();
#Навигация
echo "<div class = 'razd'><a href = '/index.php'>Главная</a> > <a href = '/umenu.php'>Кабинет</a> > <a href = '?'><b>Панель управления</b></a></div>";
echo "<div style = 'font-size: 18px;font-weight: bold;' class = 'razdel'>" . img('other.png') . " Панель управления</div>";
$adm_menu = mysql_query("SELECT * FROM `adm_menu` ORDER BY `pos` ASC");
while ($post_menu = mysql_fetch_assoc($adm_menu)) {
if (!isset($post_menu['icon'])) {
mysql_query('ALTER TABLE `adm_menu` ADD `icon` VARCHAR( 32 ) NULL DEFAULT NULL');
}
if (!isset($post_menu['type'])) {
mysql_query("ALTER TABLE `adm_menu` ADD `type` ENUM('link', 'razd') NOT NULL DEFAULT 'link' AFTER `id`");
}
if ($post_menu['type'] == 'link') {
echo "<a href = '$post_menu[url]'>";
echo "<div class = 'razd'>n";
echo icons($post_menu['icon'], 'code');
} else {
echo "<div class = 'razdel'>";
}
echo $post_menu['name'];
if ($post_menu['counter'] != NULL && is_file(H . $post_menu['counter'])) {
@include H . $post_menu['counter'];
}
if ($post_menu['type'] == 'link') {
echo "</div></a>";
} else {
echo "</div>n";
}
}
} else {
$set['title'] = 'Защита от автоматических изменений';
require_once '../sys/inc/thead.php';
title();
err();
aut();
#Навигация
echo "<div class = 'razd'><a href = '/index.php'>Главная</a> > <a href = '/umenu.php'>Кабинет</a> > <a href = '/adm_panel/'>Панель управления</a> > <a href = '?'><b>Защита</b></a></div>";
echo "<div style = 'font-size: 18px;font-weight: bold;' class = 'razdel'>" . img('other.png') . " Защита от автоматических изменений</div>";
echo "<form method = 'post' class = 'razd' action = '?gen=$passgen&" . (isset($_GET['go']) ? "go=$_GET[go]" : null) . "'>n";
echo "<img src = '/captcha.php?$passgen&SESS=$sess' width = '100' height = '30' alt = 'Проверочное число' /><br />nВведите число с картинки:<br />n<input name = 'chislo' size = '5' maxlength = '5' value = '' type = 'text' /><br />";
echo "<button class = 'action'>";
echo "<span class = 'label'> Войти</span>";
echo "</button></form>";
}
require_once '../sys/inc/tfoot.php';