File size: 3.22Kb
<?php
require_once ('_incfiles/config.php');
if (isset($_GET['act']) == 'contact') {
$fun->__header('Контакты');
echo '<div class="menu">
<b>Администрация:</b><br/>
ICQ: '.$set['icq'].'<br/>
E-mail: '.$fun->utf($set['mail']).'<br/>
WMID: '.$fun->utf($set['wmid']).'<br/>
Bussines Level: <img src="http://stats.wmtransfer.com/Levels/pWMIDLevel.aspx?w=35&h=12&wmid='.$fun->utf($set['wmid']).'" alt="BL"/></div>';
$fun->__footer('<a href="'.ROOT.'">Главная</a> › Контакты');
} else {
$fun->__header();
if (isset($active)) {
echo '<div class="menu"><b><a href="'.ROOT.'/cpanel.php">Войти в кабинет</a></b></div>';
} else {
echo '<div class="menu">
<form action="'.ROOT.'/auth.php" method="post">
Логин:<br/><input type="text" name="login" maxlength="12"/><br/>
Пароль:<br/><input type="password" name="pass" maxlength="10"/><br/>
<input type="submit" value="Войти"/>
</form>
<div class="line"></div>
<a href="'.ROOT.'/reg.php"><b>Регистрация</b></a>
</div>';
}
$news = $db->assoc($db->query("select (`date`) from `".prefix."news` order by `id` desc limit 1"));
echo '<div class="title">Ваше меню</div>
<div class="menu">
» <a href="'.ROOT.'/news.php">Новости</a> '.(empty($news['date']) ? '[0]' : '['.date('d.m', $news['date']).']').'<br/>
» <a href="'.ROOT.'/guest.php">Отзывы</a> ['.mysql_result($db->query("select count(`id`) from `".prefix."guest` limit 1"), 0).']<br/>
» <a href="'.ROOT.'?act=contact"><b>Контакты</b></a>
</div>';
$sql = $db->query("select * from `".prefix."category` order by `id`");
if (mysql_num_rows($sql)) {
echo '<div class="title">Категории:</div>
<div class="menu">';
while ($row = $db->assoc($sql)) {
echo '<a href="'.ROOT.'/catalog.php?id='.$row['id'].'">'.$fun->utf($row['name']).'</a> ['.mysql_result($db->query("select count(`id`) from `".prefix."files` where `ref`='".$row['id']."' limit 1"), 0).'] '.(isset($active) && $user['admin'] ? '[<a href="'.ROOT.'/admin.php?act=edit_cat&id='.$row['id'].'">E</a>] [<a href="'.ROOT.'/admin.php?act=del_cat&id='.$row['id'].'">D</a>]' : '').'<br/>';
}
echo '</div>';
}
echo '<div class="title">Статистика сайта</div>
<div class="menu">
- Покупателей: [<b>'.mysql_result($db->query("select count(`id`) from `".prefix."users` limit 1"), 0).' чел.</b>]<br/>
- Денег в системе: [<b>'.mysql_result($db->query("select sum(`money`) from `".prefix."users`"), 0).' руб.</b>]<br/>
- Всего товаров: [<b>'.mysql_result($db->query("select count(`id`) from `".prefix."files` limit 1"), 0).'</b>]<br/>
- Куплено <b>'.mysql_result($db->query("select count(`id`) from `".prefix."buy` limit 1"), 0).'</b> товаров на сумму <b>'.mysql_result($db->query("select sum(`money`) from `".prefix."buy`"), 0).'</b> руб.
</div>';
echo '<div class="block" align="center">OnLine: (<b>'.mysql_result($db->query("select count(`id`) from `".prefix."online` where `time`>'".(time() - 120)."' limit 1"), 0).'</b>)</div>';
$fun->__footer();
}
?>