View file adm_panel/index.php

File size: 4.35Kb
<?
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
include_once '../sys/inc/adm_check.php';
include_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['return']) && $_GET['return']){header('Location: '.urldecode($_GET['return']));exit;}


$set['title']='Админка';
include_once '../sys/inc/thead.php';
title();
err();
aut();
$smarty = new Smarty_conf();
$menu=array();

if (user_access('adm_info'))$menu[]=array('info.php','Общая информация');
if (user_access('lic_info'))$menu[]=array('lic_info.php','Лицензия');
if (user_access('adm_statistic'))$menu[]=array('statistic.php','Статистика');
if (user_access('adm_show_adm'))$menu[]=array('administration.php','Администрация');
if (user_access('adm_log_read'))$menu[]=array('adm_log.php','Действия админов');
if (user_access('adm_menu'))$menu[]=array('menu.php','Главное меню');
if (user_access('adm_rekl'))$menu[]=array('rekl.php','Реклама и баннеры');
if (user_access('adm_news'))$menu[]=array('news.php','Новости сайта');
if (user_access('adm_set_sys'))$menu[]=array('settings_sys.php','Основные параметры');
if (user_access('adm_set_sys'))$menu[]=array('settings_bbcode.php','BBcode');
if (user_access('adm_set_forum'))$menu[]=array('settings_forum.php','Форум');
if (user_access('adm_set_user'))$menu[]=array('settings_user.php','Пользователи');
if (user_access('adm_accesses'))$menu[]=array('accesses.php','Привилегии');
if (user_access('adm_banlist'))$menu[]=array('banlist.php','Банлист');
if (user_access('adm_set_loads'))$menu[]=array('settings_loads.php','Загруз-центр');
if (user_access('adm_set_loads'))$menu[]=array('loads_recount.php','Пересчет загрузок');
if (user_access('adm_set_chat'))$menu[]=array('settings_chat.php','Параметры чата');
if (user_access('adm_set_foto'))$menu[]=array('settings_foto.php','Фотогалерея');


if (user_access('adm_forum_sinc'))$menu[]=array('forum_sinc.php','Синхронизация таблиц форума');
if (user_access('adm_lib_repair'))$menu[]=array('lib_repair.php','Восстановление библиотеки');

if (user_access('adm_ref'))$menu[]=array('referals.php','Рефералы');

if (user_access('adm_ip_edit'))$menu[]=array('opsos.php','Редактирование IP провайдеров');
if (user_access('adm_ban_ip'))$menu[]=array('ban_ip.php','Бан по IP');

if (user_access('adm_mysql'))$menu[]=array('mysql.php','MySQL запросы');
if (user_access('adm_themes'))$menu[]=array('themes.php','Темы оформления');
if (user_access('adm_themes'))$menu[]=array('them_installer.php','Установка тем');

if (user_access('user_mass_delete'))$menu[]=array('delete_users.php','Чистка таблицы пользователей');

if ($license)
{
if (user_access('lic_themes'))$menu[]=array('lic_themes.php','Темы с DCMS.su');
if (user_access('lic_update'))$menu[]=array('lic_update.php','Обновление движка');
if (user_access('adm_license_support'))$menu[]=array('lic_support.php','Связь с создателем');
}


$smarty->assign('menu',$menu);
$smarty->display('body.menu.tpl');
}
else
{
$set['title']='Защита от автоматических изменений';
include_once '../sys/inc/thead.php';
title();
err();
aut();
$smarty = new Smarty_conf();
$smarty->assign('form_title','Антибот');
$smarty->assign('method','POST');
$smarty->assign('action',"?gen=$passgen".(isset($_GET['return'])?'&amp;return='.$_GET['return']:null));
$elements=array();
$elements[]=array('br'=>1, 'type'=>'captcha');
$elements[]=array('type'=>'submit', 'br'=>0, 'info'=>array('name'=>'post', 'value'=>'Далее')); // кнопка
$smarty->assign('el',$elements);
$smarty->display('input.form.tpl');
}

include_once '../sys/inc/tfoot.php';
?>