Размер файла: 2.73Kb
<?php
include "../init/config.php";
session_start();
include "../head.php";
$user = mysql_query("SELECT * FROM `cat_users`;");
$user = mysql_num_rows($user);
$catall = mysql_query("SELECT * FROM `cat_category`;");
$catall = mysql_num_rows($catall);
$usermod = mysql_query("SELECT * FROM `cat_users` WHERE `status` = 'mod'");
$usermod = mysql_num_rows($usermod);
$newsall = mysql_query("SELECT * FROM `cat_news`");
$newsall = mysql_num_rows($newsall);
$reall = mysql_query("SELECT * FROM `cat_rekla`");
$reall = mysql_num_rows($reall);
if(!isset($_SESSION['alogin']) AND !isset($_SESSION['apasswrod'])){
echo $error."<br/><div class='box'><form action='/input.php?item=aenter' method='POST'>\n".
"<input type='text' class='input' name='alogin' maxlength='24' value='Логин' onfocus='this.value = \"\";' size='20' maxlength='50' /><br /><br/>\n".
"<input type='text' class='input' name='apasswd' maxlength='12' value='Пароль' onfocus='this.value = \"\";' size='20' maxlength='50' /><br /><br/>\n".
"<inputv type='hidden' name='action' value='DeeP' />".
"<input type='submit' class='go' value=' войти ' /></div><br/><br/>\n";
}else{
echo'<div class="dote">
<div class = "reklama"><img src="/images/site.gif" alt="top"/><a href="/adminpanel/index.php?mod=modera">Модерация сайтов</a>[<font color="red"> '.$usermod.' </font>]<br/>
<img src="/images/site.gif" alt="top"/><a href="/adminpanel/index.php?mod=category">Категории</a>[<font color="red"> '.$catall.' </font>]<br/>
<img src="/images/site.gif" alt="top"/><a href="/adminpanel/index.php?mod=setting">Настройки</a><br/>
<img src="/images/site.gif" alt="top"/><a href="/adminpanel/index.php?mod=sedmail">Рассылка сообщений</a><br/>
<img src="/images/site.gif" alt="top"/><a href="/adminpanel/index.php?mod=users">Пользователи</a>[<font color="red"> '.$user.' </font>]<br/>
<img src="/images/site.gif" alt="top"/><a href="/adminpanel/index.php?mod=news">Новости</a>[<font color="red"> '.$newsall.' </font>]<br/>
<img src="/images/site.gif" alt="top"/><a href="/adminpanel/index.php?mod=rekla">Реклама</a>[<font color="red"> '.$reall.' </font>]<br/>
<img src="/images/site.gif" alt="top"/><a href="/input.php?item=exit">Выход</a></div>
</div>
';
$module = $_GET['mod'];
switch($module)
{
case 'category':
case 'adv':
case 'setting':
case 'sedmail':
case 'transitions':
case 'modera':
case 'rekla':
case 'news':
break;
default:
$module = 'users'; $namemo = 'Пользователи';
}
echo '<div class="title">
Модуль - '.$module.'
</div><div class="cat2">';
if(is_file($module.".php")){
include $module.".php";
}else{
echo "Ошибка подключения модуля ".$module;
}
}
echo "</div>";
include "../foot.php";
?>