Размер файла: 817B
<?php
include '../inc/db.php';
include '../inc/1.php';
if (($user['moder']==0) && ($user['admin']==0)){header("Location: /index.php");
exit;}
echo "<div class='t2'>Лог</div>";
if (!$_GET['p'])$_GET['p']=1;
$page=intval($_GET['p']);
$start=($page*15-15);
$q=mysql_query("SELECT * FROM `log` ORDER BY `id` DESC LIMIT $start, 15");
$b=1;
while ($f=mysql_fetch_assoc($q)){
$p=($b%2);
$ank=gus($f['user']);
echo "<div class='p$p'>".im($f['user'])." <a href='/ank.php?id=$f[user]'>$ank[name]</a>: $f[text]<br>*Событие: ".vremja($f['time'])."</div>";
$b++;
}
$q1=(mysql_num_rows(mysql_query("SELECT * FROM `log`"))/15);
$q2=round(mysql_num_rows(mysql_query("SELECT * FROM `log`"))/15);
if ($q1>$q2)$pages=($q2+1);
else
$pages=$q2;
pages($pages, $page, "?p");
include '../inc/foot.php';
?>