Файл: admin/logs.php
Строк: 44
<?
require'../shaxty.php'; // waphp.ru - закрытый клуб вап мастеров!
check_login();
$title='Просмотр логов';
$align = 'left';
$head = 'Просмотр логов';
include_once (H.'shaxty/head.php');
echo '<br />';
levels(9);
if (empty($mod)){
if (isset($_GET['del_all'])){
@mysql_query("delete from logs;");
$messs = '[b]'.user($user['id'], 1).'[/b] очистил все логи';
@mysql_query ("INSERT INTO logs (log,msg,time) VALUES ('banoff','$messs','$time')");
}
echo '» <a href="logs.php?mod=shell">Логи запрещенных файлов</a> ('.mysql_result(mysql_query("select count(*) as num from logs where log = 'shell'"),0).')<br />';
echo '» <a href="logs.php?mod=edit">Логи Апдейта</a> ('.mysql_result(mysql_query("select count(*) as num from logs where log = 'edit'"),0).')<br />';
echo '» <a href="logs.php?mod=del">Логи удалений</a> ('.mysql_result(mysql_query("select count(*) as num from logs where log = 'del'"),0).')<br />';
echo '<br />» <a href="logs.php?mod=accessno">Логи отклонений реги</a> ('.mysql_result(mysql_query("select count(*) as num from logs where log = 'accessno'"),0).')<br />';
echo '» <a href="logs.php?mod=accessyes">Логи одобрений реги</a> ('.mysql_result(mysql_query("select count(*) as num from logs where log = 'accessyes'"),0).')<br />';
echo '<br />» <a href="logs.php?mod=kik">Логи пинков</a> ('.mysql_result(mysql_query("select count(*) as num from logs where log = 'kik'"),0).')<br />';
echo '» <a href="logs.php?mod=ban_ip">Логи банов IP</a> ('.mysql_result(mysql_query("select count(*) as num from logs where log = 'ban_ip'"),0).')<br />';
echo '» <a href="logs.php?mod=ban_soft">Логи банов Софт</a> ('.mysql_result(mysql_query("select count(*) as num from logs where log = 'ban_soft'"),0).')<br />';
echo '» <a href="logs.php?mod=ban">Логи баннов ников</a> ('.mysql_result(mysql_query("select count(*) as num from logs where log = 'ban'"),0).')<br />';
echo '» <a href="?mod=banoff">Логи разбанов и очисток</a> ('.mysql_result(mysql_query("select count(*) as num from logs where log = 'banoff'"),0).')<br/>';
echo '» <a href="?mod=dell_repa">Логи удалений репутации и рейтинга</a> ('.mysql_result(mysql_query("select count(*) as num from logs where log = 'dell_repa'"),0).')<br/>';
echo '<br /><a href="logs.php?del_all">Очистить логи</a><br />';
} elseif (!empty($mod)) {
if (isset($_GET['del_all'])){
@mysql_query("delete from logs where log = '".$mod."';");
$messs = '[b]'.user($user['id'], 1).'[/b] очистил логи '.$mod.'';
@mysql_query ("INSERT INTO logs (log,msg,time) VALUES ('banoff','$messs','$time')");
}
if (empty($user['max'])) $user['max']=10;
$max = $user['max'];
$k_post=mysql_result(mysql_query("select count(*) as num from logs where log = '".$mod."'"),0);
$k_page=k_page($k_post,$max);
$page=page($k_page);
$start=$max*$page-$max;
$r = mysql_query ("Select * from logs where log = '".$mod."' order by time desc LIMIT $start, $max");
if ($k_post == 0)echo 'Нет логов!<br />';
else{
if (($max*$page)<$k_post) $maxi = $max*$page; else $maxi = $k_post;
echo 'показаны записи '.($start+1).'-'.$maxi.' из '.$k_post.'<br /><br />';
}
$post_k=$start+1;
while($a = @mysql_fetch_array($r)){
echo '<b>'.times($a['time']).'</b> - '.text($a['msg']).'<br />- - -<br />';
}
if ($k_page>1){
echo "<dl><dt></dt></dl>";
str('logs.php?mod='.$mod.'&',$k_page,$page); // Вывод страниц
echo "<br /><dl><dt></dt></dl><br />";
}
if ($k_post != 0)echo '<a href="logs.php?mod='.$mod.'&del_all">Очистить логи</a><br />';
}
echo '<br />';
if ($mod)echo $div1.'<a href="logs">Просмотр логов</a>'.$div9;
echo $div1.'<a href="index">В админку</a><br />'.$div9;
include_once (H.'shaxty/foot.php');
/* by -=ШАХТЕР=- (waphp.ru - качай только тут) */ ?>