Файл: panel/index.php
Строк: 94
<?php
/* DCMS Special)
* Дата последнего редактирования 21.12.2015
* Модифицировал densnet
*/
foreach (array('start', 'compress', 'sess', 'settings', 'db_connect', 'ipua', 'fnc', 'adm_check', 'user') as $inc) {
require_once "../sys/inc/{$inc}.php";
}
access('adm_panel_show', null, '/index.php?' . SID);
$_SESSION['adm_auth'] = $time + 600;
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 H . 'sys/inc/thead.php';
aut();
err();
#Навигация
echo "<nav class='navbar navbar-light' style='background-color: #607D8B; color: #fff;'>";
echo "<ul class='nav navbar-nav'>";
echo "<li class='nav-item' style='margin-left: 1px;'><a class='nav-link' href='/'><i class='material-icons'>home</i></a></li>";
echo "<li class='nav-item' style='margin-left: 1px;'><a class='nav-link'><i class='material-icons'>keyboard_arrow_right</i></a></li>";
echo "<li class='nav-item' style='margin-left: 1px;'><a class='nav-link' href='/panel/'>Панель управления</a></li>";
echo "</ul>";
echo "</nav>";
$adm_menu = mysql_query("SELECT * FROM `adm_menu` ORDER BY `pos` ASC");
echo "<div class='collection'>";
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');
}
echo "<a class='collection-item' href = '$post_menu[url]'>";
echo icons($post_menu['icon']) . " $post_menu[name]";
if ($post_menu['counter'] != NULL && is_file(H . $post_menu['counter'])) {
echo '<span class="badge">';
@include H . $post_menu['counter'];
echo '</span>';
}
echo "</a>";
}
if (access('adm_menu')) {
echo "<a href='adm_menu.php' class='collection-item'><i class='material-icons left'>add</i> Добавить меню</a>";
}
echo "</div>";
} else {
$set['title'] = 'Защита от автоматических изменений';
require_once H . 'sys/inc/thead.php';
aut();
err();
echo "<div class='list-group-item'><center><b>Защита от автоматических изменений</b></center></div>";
echo "<form method='post' class='list-group-item' 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 />";
echo "Введите число с картинки:<br />";
echo "<input class='form-control' style='width: 30%;' name='chislo' maxlength='5' value='' type='text' />";
echo "<div class='hr'></div>";
echo "<button class='btn btn-success'><span class='fa fa-sign-in fa-fw'></span> Войти</button>";
echo "</form>";
}
require_once H . 'sys/inc/tfoot.php';