File size: 2.44Kb
<?php
require_once '../core/system.php';
$header = 'Журнал клана';
require_once '../core/head.php';
$k_post = mysql_result(mysql_query("SELECT COUNT(id) FROM `zur` WHERE `clan`=".intval($_GET['id']).""),0);
$k_page = k_page($k_post,10);
$page = page($k_page);
$start = 10*$page-10;
$rexo = $tm - 2592000;
mysql_query("DELETE FROM `zur` WHERE `time` < ".$rexo."");
$q = mysql_query("SELECT * FROM `zur` WHERE `clan`='".intval($_GET['id'])."' ORDER BY `id` DESC LIMIT ".$start.", 10");
$clan = mysql_fetch_array(mysql_query("SELECT id FROM `clan` WHERE `id` = ".intval($_GET['id']).""));
if($clan['id']!=$user['clan'] && $user['prava'] < 4){
$_SESSION['err'] = 'Ошибка';
header('Location: /');
}
while($post = mysql_fetch_array($q)) {
$ank = mysql_fetch_array(mysql_query("SELECT id,nick,prava,font FROM `user` WHERE `id` = ".$post['kto'].""));
$kogo = mysql_fetch_array(mysql_query("SELECT id,nick,prava,font FROM `user` WHERE `id` = ".$post['kogo'].""));
echo' <div class="foot">';
if($ank['prava']==5){
$status="<font color='ffc22b'>[A]</font>"; $color="#F7990D";}
if($ank['prava']==4){
$status="<font color='ffc22b'>[a]</font>"; $color="EBC621";}
if($ank['prava']==3){
$status="<font color='ffc22b'>[M]</font>";
}
if($ank['prava']==2){
$status="<font color='ffc22b'>[m]</font>";
}
if($kogo['prava']==5){
$statusr="<font color='ffc22b'>[A]</font>"; $color="#F7990D";}
if($kogo['prava']==4){
$statusr="<font color='ffc22b'>[a]</font>"; $color="EBC621";}
if($kogo['prava']==3){
$statusr="<font color='ffc22b'>[M]</font>";
}
if($kogo['prava']==2){
$statusr="<font color='ffc22b'>[m]</font>";
}
echo online($ank['id']);
echo'<a href="/user/?id='.$ank['id'].'"><font color='.$ank['font'].'>'.$ank['nick'].'</font></a> ';
if($ank['prava'] > 1){
echo $status ;
}
echo' <font color="grey">'.$post['name'].'</font>';
if(!empty($post['kogo'])){
echo online($kogo['id']);
echo'<a href="/user/?id='.$kogo['id'].'"><font color='.$kogo['font'].'>'.$kogo['nick'].'</font></a> ';
if($kogo['prava'] > 1){
echo $statusr;
}
}
echo'<font color="grey">, '.vremja($post['time']).'</font>
</br>
</div>
<hr> ';
}
$avto = mysql_num_rows($q);
if($avto==0){
echo'<div class="foot">
Нет логов
</div>
<hr>';
}
if ($k_page > 1){
str('?id='.intval($_GET['id']).'&',$k_page,$page);
echo '<hr>';
}
echo"<div class='head center'>Здесь отображаются последние действия, связанные с кланом.</div>";
require_once '../core/foot.php';
?>