Файл: mob-lave.ru/moduls/info/admin.php
Строк: 57
<?php
require_once '../../core/set.php';
if(isset($_GET['id']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `$system[perfix]_user_group` WHERE `id` = '".num($_GET['id'])."'"),0) == 1){
$adm = mysql_fetch_assoc(mysql_query("SELECT * FROM `$system[perfix]_user_group` WHERE `id` = '".num($_GET['id'])."'"));
$set['title'] = htmlspecialchars($adm['name']);
require_once H.'core/head.php';
require_once H.'core/panel.php';
echo '<div class="navig">'.$home. $z.'<a href="admin.php">Администрация</a>'.$z. $set['title'].'</div>';
$id = num($_GET['id']);
$query = mysql_query("SELECT `id`,`login` FROM `$system[perfix]_users` WHERE `us_prava` = '$id'");
while($post = mysql_fetch_assoc($query)) {
echo '<div class="mess"><a href="/?login='.$post['login'].'">';
echo '<table><tr><td>';
echo avatar($post['id'], false, 50);
echo' </td><td>';
echo online($post['id']);
echo $post['login'];
if(isset($user['id']) && $user['id'] != $post['id']) echo '<br/> <a href="/user/mail/mail.php?id='.num($post['id']).'"><div id="dark" class="icon-mail2"></div> Сообщение</a>';
echo' </td></tr></table>';
echo '</a></div>';
}
echo '<div class="navig">'.$home. $z.'<a href="admin.php">Администрация</a>'.$z. $set['title'].'</div>';
require_once H.'core/foot.php';
exit();
}
$set['title'] = 'Администрация';
require_once H.'core/head.php';
require_once H.'core/panel.php';
echo '<div class="navig">'.$home. $z. $set['title'].'</div>';
$q = mysql_query("SELECT * FROM `$system[perfix]_user_group` WHERE `id` != '0' ORDER BY `id` DESC");
while($post = mysql_fetch_assoc($q)) {
$count = mysql_result(mysql_query("SELECT COUNT(*) FROM `$system[perfix]_users` WHERE `us_prava` = '".num($post['id'])."'"),0);
echo '<div class="menu_touch">';
echo '<a href="?id='.num($post['id']).'">'.htmlspecialchars($post['name']).' ('.$count.') </a>';
echo '</div>';
}
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `$system[perfix]_users` WHERE `online` > ".(time()-$system['online'])." && `us_prava` != '0'"),0);
echo '<div class="foot">Администрация онлайн ('.$k_post.') </div>';
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
if ($k_post==0) echo '<div class="menu">На сайте администрации нет</div>';
$q = mysql_query("SELECT * FROM `$system[perfix]_users` WHERE `online` > ".(time()-$system['online'])." && `us_prava` != '0' ORDER BY `id` DESC LIMIT $start, $set[p_str]");
while($ank = mysql_fetch_assoc($q)){
echo '<div class="mess"><table><tr><td>';
echo avatar($ank['id'], false, 50);
echo '</td><td><a href="/?login='.$ank['login'].'">';
echo online($ank['id']);
echo $ank['login'].'</a><br />';
if(isset($user['id']) && $user['id'] != $ank['id']) echo '<a href="/user/mail/mail.php?id='.num($ank['id']).'"><div id="dark" class="icon-mail2"></div> Сообщение</a>';
echo '</td></tr></table>';
echo '</div>';
}
if ($k_page>1)str('?',$k_page,$page);
echo '<div class="navig">'.$home. $z. $set['title'].'</div>';
require_once H.'core/foot.php';
?>