Файл: panel.php
Строк: 143
<? //by rine(Andrey Arapov) & BEPDuKT(Aleksey Ivanov) site: dizkod.ru
$patch=0;
include_once('config/config.php');
Base::$site = $url;
$user=new Users();
$user->sess();
$access=$user->access();
$name=$_SESSION[login];
$kol=mysql_result(mysql_query("SELECT COUNT(*) from `order` "),0);
$kol_user=mysql_result(mysql_query("SELECT COUNT(*) from `user` "),0);
$kol_order=mysql_result(mysql_query("SELECT COUNT(*) from `order` WHERE `user_name`='$_SESSION[login]' "),0);
$tm=time();
$new_kol=mysql_result(mysql_query("SELECT COUNT(*) from `order` WHERE `tm`>'$tm' "),0);
$ord_date=mysql_fetch_assoc(mysql_query("SELECT * FROM `order` ORDER BY `id` DESC LIMIT 1"));
$new_orders=mysql_result(mysql_query("SELECT COUNT(*) from `order_mess` WHERE `n_us`='".$name."' AND `read`='0' "),0);
$kol_rev=mysql_result(mysql_query("SELECT COUNT(*) from `reviews` "),0);
Base::head();
if($access == "1"){$new = mysql_num_rows(mysql_query("SELECT * FROM `support` WHERE `type` = 't' "));
$read = mysql_num_rows(mysql_query("SELECT * FROM `supportred` WHERE `login` = '".$_SESSION['login']."' "));
if($new > $read){
$n = $new - $read;
echo'<div class="msg"><a href="support.php">Поддержка (+'.$n.')</a></div>';}}
if($access==0){
echo '<div class="title">Меню</div>';
echo "<div class='raine'>";
echo "<img src='style/images/icon.png' alt='logotip' /> <a href='portfolio/index.php'>Портфолио</a><br /></div>";
echo "<div class='raine'>";
echo "<img src='style/images/icon.png' alt='logotip' /> <a href='order/index.php'>Заказы</a> (".$kol_order.")";
if($new_orders!=0)
{
echo "<span style='color:red'>+".$new_orders." сооб.</span>";}
echo "<br /></div>";
echo "<div class='raine'>";
echo "<img src='style/images/icon.png' alt='logotip' /> <a href='/news/'>Новости</a><br/></div>";
echo "<div class='title'>Информация</div>";
echo "<div class='raine'>";
echo "<img src='style/images/icon.png' alt='logotip' /> <a href='/reviews/'>Отзывы</a> (".$kol_rev.")<br/></div>";
echo "<div class='raine'>";
echo "<img src='style/images/icon.png' alt='logotip' /> <a href='/facilities.php'>Наши услуги</a><br/></div>";
echo "<div class='raine'>";
echo "<img src='style/images/icon.png' alt='logotip' /> <a href='/agreement.php'>Соглашение</a><br/></div>";
echo "<div class='raine'>";
echo"<img src='style/images/icon.png' alt='logotip' /> <a href='/aboutproject.php'>О проекте</a><br /></div>";
echo "<div class='raine'>";
echo "<img src='style/images/icon.png' alt='logotip' /> <a href='/exit.php'>Выход</a><br/>";
echo "</div>";
}else{
$user->dostup();
echo "<div class='title'>Админка</div>";
echo "<div class='raine'>";
echo "<img src='style/images/icon.png' alt='logotip' /> <a href='adminpanel/users.php'>Пользователи</a> (".$kol_user.")<br/></div>";
echo "<div class='raine'>";
echo "<img src='style/images/icon.png' alt='logotip' /></a> <a href='portfolio/edit_portfolio.php'>Добавить в Портфолио</a><br /></div>";
echo "<div class='raine'>";
echo "<img src='style/images/icon.png' alt='logotip' /> <a href='order/process_order.php'>Заказы</a> (".$kol.")";
if($new_kol!=0)
{
echo "<span style='color:red'>+".$new_kol."(".$ord_date[data].")</span>";}
echo "<br/></div>";
echo "<div class='raine'>";
echo "<img src='style/images/icon.png' alt='logotip' /> <a href='/news/edit_news.php'>Новости</a><br/></div>";
echo "<div class='raine'>";
echo "<img src='style/images/icon.png' alt='logotip' /> <a href='adminpanel/rekl.php'>Добавить рекламу</a><br/></div>";
$mod = mysql_num_rows(mysql_query("SELECT * from `cat_site` WHERE `lock` = '0' "));
$black =mysql_num_rows(mysql_query("SELECT * from `cat_site` WHERE `lock` = '2' "));
$all = mysql_num_rows(mysql_query("SELECT * from `cat_site` WHERE `lock` = '1' "));
echo "<div class='raine'>";
echo "<img src='style/images/icon.png' alt='logotip' /> <a href='adminpanel/settings.php'>Настройки системы</a><br/></div>";
echo "<div class='raine'>";
echo "<img src='style/images/icon.png' alt='logotip' /> <a href='adminpanel/catigory.php'>Категории заказов</a><br/></div>";
echo "<div class='raine'>";
echo "<img src='style/images/icon.png' alt='logotip' /> <a href='adminpanel/status.php'>Статусы пользователей</a><br/></div>";
echo "<div class='raine'>";
echo "<img src='style/images/icon.png' alt='logotip' /> <a href='/reviews/'>Отзывы</a> (".$kol_rev.")<br/></div>";
echo "<div class='raine'>";
echo "<img src='style/images/icon.png' alt='logotip' /> <a href='/adminpanel/capcha.php'>Редактировать капчу</a><br/></div>";
echo "<div class='title'>Редактировать разделы</div>";
echo "<div class='raine'>";
echo "<img src='style/images/icon.png' alt='logotip' /> <a href='adminpanel/edit_facilities.php'>Наши услуги</a><br/></div>";
echo "<div class='raine'>";
echo "<img src='style/images/icon.png' alt='logotip' /> <a href='adminpanel/edit_agreement.php'>Соглашение</a><br/></div>";
echo "<div class='raine'>";
echo "<img src='style/images/icon.png' alt='logotip' /> <a href='adminpanel/edit_aboutproject.php'>О проекте</a><br /></div>";
echo "<div class='raine'>";
echo "<img src='".$url."/style/images/icon.png' alt='logotip'/> <a href='/support.php'>Поддержка</a><br/></div>";
echo "<div class='raine'>";
echo "<img src='style/images/icon.png' alt='logotip' /> <a href='/exit.php'>Выход</a><br/></div>";
}
echo '<div class="title">Автологин</div>';
echo "<div class='raine'>";
echo '<input name="aut" type="text" value="'.$url.'/aut.php?aut=vhod&login='.$_SESSION[login].'&pass='.$_SESSION[password].'">';
echo "</div>";
Base::foot();
?>