Файл: adm_panel/administration.php
Строк: 77
<?php
require_once '../sys/inc/start.php';
require_once '../sys/inc/compress.php';
require_once '../sys/inc/sess.php';
require_once '../sys/inc/settings.php';
require_once '../sys/inc/db_connect.php';
require_once '../sys/inc/ipua.php';
require_once '../sys/inc/fnc.php';
require_once '../sys/inc/adm_check.php';
require_once '../sys/inc/user.php';
user_access('adm_show_adm', null, 'index.php?' . SID);
adm_check();
$set['title'] = 'Администрация';
require_once '../sys/inc/thead.php';
aut();
$k_post = mysql_result(mysql_query("SELECT COUNT(`user`.`id`) FROM `user` LEFT JOIN `user_group` ON `user`.`group_access` = `user_group`.`id` WHERE `user_group`.`level` != 0 AND `user_group`.`level` IS NOT NULL"), 0);
$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 "<table class = 'foot'><tr><td class = 'null'>";
echo "<img src = '/style/icons/bullet_error.png' /> Нет результатов";
echo "</td></tr></table>";
}
$q = mysql_query("SELECT `user`.`id` FROM `user` LEFT JOIN `user_group` ON `user`.`group_access` = `user_group`.`id` WHERE `user_group`.`level` != 0 AND `user_group`.`level` IS NOT NULL ORDER BY `user_group`.`level` DESC LIMIT $start, $set[p_str]");
while ($ank = mysql_fetch_assoc($q)) {
$ank = get_user($ank['id']);
echo "<table class = 'foot'><tr><td class = 'icon48'>";
avatar($ank['id'], '48');
echo "</td><td class='null'>n";
if (user_access('adm_log_read') && $ank['level'] != 0 && ($ank['id'] == $user['id'] || $ank['level'] < $user['level'])) {
echo "<a href='adm_log.php?id=$ank[id]'>$ank[nick]</a> ($ank[group_name])n";
} else {
echo "<a href='/info.php?id=$ank[id]'>$ank[nick]</a> ($ank[group_name])n";
}
echo "<br />Пол: " . (($ank['sex'] == 1) ? 'Мужской' : 'Женский') . "<br />n";
$adm_log_c_all = mysql_result(mysql_query("SELECT COUNT(*) FROM `admin_log` WHERE `id_user` = '$ank[id]'"), 0);
$mes = mktime(0, 0, 0, date('m') - 1); // время месяц назад
$adm_log_c_mes = mysql_result(mysql_query("SELECT COUNT(*) FROM `admin_log` WHERE `id_user` = '$ank[id]' AND `time` > '$mes'"), 0);
echo "Вся активность: $adm_log_c_all<br />n";
echo "Активность за месяц: $adm_log_c_mes<br />n";
echo "Посл. посещение: " . vremja($ank['date_last']) . "<br />n";
if (isset($user) && ($user['level'] > $ank['level'] || $user['level'] == 4)) {
echo "<a href='/adm_panel/user.php?id=$ank[id]'>Редактировать профиль</a><br />n";
}
echo "</td></tr></table>n";
}
if ($k_page > 1) {
str("?", $k_page, $page);
}
if (user_access('adm_panel_show')) {
echo "<div class='foot'>n";
echo "<img src = '/style/icons/left.png' /> <a href='/adm_panel/'>Панель управления</a><br />n";
echo "</div>n";
}
require_once '../sys/inc/tfoot.php';