Файл: public_html/modules/panel/log.php
Строк: 104
<?php
include_once ('../../core/base.php');
$header = 'Управление логами';
include_once ('../../core/head.php');
falseauth();
adm();
switch($act){
default:
echo '<a class="link" href="/access/logs/users"> Пользователи </a>';
echo '<a class="link" href="/access/logs/subject"> Предметы </a>';
echo '<a class="link" href="/access/logs/block"> Блокировки </a>';
echo '<a class="link" href="/access/logs/abuse"> Жалобы </a>';
echo '<a class="link" href="/access/logs/other"> Остальное </a>';
echo '<div class="line"></div>';
echo '<a class="link bradius" href="/access/"> Вернуться назад </a>';
break;
case 'users':
$count = $base -> query("SELECT * FROM `admin_log` WHERE `section` = '0'") -> num_rows;
$k_page = k_page($count,10);
$page = page($k_page);
$start = 10*$page-10;
$sql = $base -> query("SELECT * FROM `admin_log` WHERE `section` = '0' ORDER BY `time` DESC LIMIT $start, 10");
while($v = $sql -> fetch_assoc()){
echo '<div class="b txt">';
echo '<div class="title"> '.name($v['id_adm']).' <span class="txt">['.tm($v['time']).']</span> </div>';
echo $v['message'];
echo '</div>';
echo '<div class="line"></div>';
}
if($count == '0') echo '<div class="b center"> Логи не были обнаружены </div>';
if($count > '10') echo str('/access/logs/users?',$k_page,$page);
echo '<a class="link bradius" href="/access/logs/"> Вернуться назад </a>';
break;
case 'subject':
$count = $base -> query("SELECT * FROM `admin_log` WHERE `section` = '1'") -> num_rows;
$k_page = k_page($count,10);
$page = page($k_page);
$start = 10*$page-10;
$sql = $base -> query("SELECT * FROM `admin_log` WHERE `section` = '1' ORDER BY `time` DESC LIMIT $start, 10");
while($v = $sql -> fetch_assoc()){
echo '<div class="b txt">';
echo '<div class="title"> '.name($v['id_adm']).' <span class="txt">['.tm($v['time']).']</span> </div>';
echo $v['message'];
echo '</div>';
echo '<div class="line"></div>';
}
if($count == '0') echo '<div class="b center"> Логи не были обнаружены </div>';
if($count > '10') echo str('/access/logs/subject?',$k_page,$page);
echo '<a class="link bradius" href="/access/logs/"> Вернуться назад </a>';
break;
case 'block':
$count = $base -> query("SELECT * FROM `admin_log` WHERE `section` = '2'") -> num_rows;
$k_page = k_page($count,10);
$page = page($k_page);
$start = 10*$page-10;
$sql = $base -> query("SELECT * FROM `admin_log` WHERE `section` = '2' ORDER BY `time` DESC LIMIT $start, 10");
while($v = $sql -> fetch_assoc()){
echo '<div class="b txt">';
echo '<div class="title"> '.name($v['id_adm']).' <span class="txt">['.tm($v['time']).']</span> </div>';
echo $v['message'];
echo '</div>';
echo '<div class="line"></div>';
}
if($count == '0') echo '<div class="b center"> Логи не были обнаружены </div>';
if($count > '10') echo str('/access/logs/block?',$k_page,$page);
echo '<a class="link bradius" href="/access/logs/"> Вернуться назад </a>';
break;
case 'support':
$count = $base -> query("SELECT * FROM `admin_log` WHERE `section` = '3'") -> num_rows;
$k_page = k_page($count,10);
$page = page($k_page);
$start = 10*$page-10;
$sql = $base -> query("SELECT * FROM `admin_log` WHERE `section` = '3' ORDER BY `time` DESC LIMIT $start, 10");
while($v = $sql -> fetch_assoc()){
echo '<div class="b txt">';
echo '<div class="title"> '.name($v['id_adm']).' <span class="txt">['.tm($v['time']).']</span> </div>';
echo $v['message'];
echo '</div>';
echo '<div class="line"></div>';
}
if($count == '0') echo '<div class="b center"> Логи не были обнаружены </div>';
if($count > '10') echo str('/access/logs/support?',$k_page,$page);
echo '<a class="link bradius" href="/access/logs/"> Вернуться назад </a>';
break;
case 'abuse':
$count = $base -> query("SELECT * FROM `admin_log` WHERE `section` = '4'") -> num_rows;
$k_page = k_page($count,10);
$page = page($k_page);
$start = 10*$page-10;
$sql = $base -> query("SELECT * FROM `admin_log` WHERE `section` = '4' ORDER BY `time` DESC LIMIT $start, 10");
while($v = $sql -> fetch_assoc()){
echo '<div class="b txt">';
echo '<div class="title"> '.name($v['id_adm']).' <span class="txt">['.tm($v['time']).']</span> </div>';
echo $v['message'];
echo '</div>';
echo '<div class="line"></div>';
}
if($count == '0') echo '<div class="b center"> Логи не были обнаружены </div>';
if($count > '10') echo str('/access/logs/abuse?',$k_page,$page);
echo '<a class="link bradius" href="/access/logs/"> Вернуться назад </a>';
break;
case 'other':
$count = $base -> query("SELECT * FROM `admin_log` WHERE `section` = '5'") -> num_rows;
$k_page = k_page($count,10);
$page = page($k_page);
$start = 10*$page-10;
$sql = $base -> query("SELECT * FROM `admin_log` WHERE `section` = '5' ORDER BY `time` DESC LIMIT $start, 10");
while($v = $sql -> fetch_assoc()){
echo '<div class="b txt">';
echo '<div class="title"> '.name($v['id_adm']).' <span class="txt">['.tm($v['time']).']</span> </div>';
echo $v['message'];
echo '</div>';
echo '<div class="line"></div>';
}
if($count == '0') echo '<div class="b center"> Логи не были обнаружены </div>';
if($count > '10') echo str('/access/logs/other?',$k_page,$page);
echo '<a class="link bradius" href="/access/logs/"> Вернуться назад </a>';
break;
}
include_once ('../../core/foot.php');
?>