View file public_html/module/cpanel/index.php

File size: 3.04Kb
<?php define('WEARNINGS', 1); 
define('H', $_SERVER['DOCUMENT_ROOT'] . '/');
foreach (array('starting', 'compress', 'worldcms', 'function', 'adm_check','account') as $kernel){
	require_once H.'kernel/' . $kernel . '.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 H.'kernel/switch/header.php';
    title();
    err();
    aut();
    
 if (user_access('adm_info')) { ?>
      <div class="admin_menu">
      	<img src="/kernel/icons/help.png" /> <a href='http://worldcms.ru/'>Офф сайт WORLDCMS</a>
      </div>
    <?php } ?>
    
    <?php if (user_access('adm_show_adm')) { ?>
      <div class="admin_menu">
        <img src="/kernel/icons/user_gray.png" /> <a href='administration.php'>Администрация</a><br />
      </div>
    <?php } ?>
    
    <?php if (user_access('adm_log_read')) { ?>
      <div class="admin_menu">
        <img src="/kernel/icons/table_multiple.png" /> <a href='adm_log.php'>Действия администрации</a><br />
      </div>
    <?php } ?>
    
    <?php if (user_access('adm_menu')) { ?>
      <div class="admin_menu">
        <img src="/kernel/icons/plugin_edit.png" /> <a href='menu.php'>Главное меню</a><br />
      </div>
    <?php } ?>
    
    <?php if (user_access('adm_accesses')) { ?>
      <div class="admin_menu">
        <img src="/kernel/icons/group_key.png" /> <a href='accesses.php'>Привилегии групп пользователей</a><br />
      </div>
    <?php } ?>
    
    <?php if (user_access('adm_banlist')) { ?>
      <div class="admin_menu">
        <img src="/kernel/icons/group_delete.png" /> <a href='banlist.php'>Список забаненых</a><br />
      </div>
    <?php } ?>
    
    
    
    <?php if (user_access('adm_ref')) { ?>
      <div class="admin_menu">
        <img src="/kernel/icons/chart_bar.png" /> <a href='referals.php'>Рефералы</a><br />
      </div>
    <?php } ?>
    
    <?php
}
else
{
    $set['title'] = 'Защита от автоматических изменений';
    require_once H.'kernel/switch/header.php';
    title();
    err();
    aut();
    echo "<form method='post' action='?gen=$passgen&amp;".(isset($_GET['go'])?"go=$_GET[go]":null)."'>\n";
    echo "<img src='/kernel/switch/captcha.php?$passgen&amp;SESS=$sess' width='100' height='30' alt='Проверочное число' /><br />\nВведите число с картинки:<br //>\n<input name='chislo' size='5' maxlength='5' value='' type='text' /><br/>\n";
    echo "<input type='submit' value='Далее' />\n";
    echo "</form>\n";
}
require_once H.'kernel/switch/footer.php';
?>