View file sdark.mobi/adm_root/history.php

File size: 1.52Kb
<?php
require_once '../core/system.php';
echo moder();
$header = 'История банов';
require_once '../core/head.php';

$q = mysql_query("SELECT * FROM `ban_history` WHERE `id_us`='".intval($_GET['id'])."'  ORDER BY `id` ");
echo "<div class='foot'><div class='menuList'>";

while($post = mysql_fetch_array($q)) {
$rev = mysql_query("SELECT * FROM `user`  where `id`='$post[kto]'");
$pers = mysql_fetch_array($rev);
if($pers[prava]=="5"){$status="<font color='ffc22b'>[A]</font>";$color="#F7990D";}
if($pers[prava]=="4"){$status="<font color='ffc22b'>[a]</font>";$color="EBC621";}
if($pers[prava]=="3"){$status="<font color='ffc22b'>[M]</font>";}
if($pers[prava]=="2"){$status="<font color='ffc22b'>[m]</font>";}
$vrem=$post['vrem'];
if($vrem>=3600 and $vrem<=86400){
$vrem=round($vrem/3600);
$vrem="$vrem часов";
}else{
$vrem=round($vrem/86400);
$vrem="$vrem дней";
}
if($post['ban']==1)$ban='Молчание';
if($post['ban']==2)$ban='Блок';
if($post['ban']==3)$ban='Изгнание';
echo'<li><span class="float-right"><div class="empty2"></div><div class="empty2"></div>';
echo online($pers[id]) ;
echo "<font color='$pers[font]'>$pers[nick]</font> $status <div class='empty2'></div> Бан: $ban </span><div class='empty'></div> ";
echo'
Причина: '.$post['why'].'<div class="empty2"></div>На сколько: '.$vrem.' <div class="empty2"></div>Когда: ('.vremja($post['time']).') </li>';
}
$avto = mysql_num_rows($q);
if($avto==0){echo"Нет банов";}
echo"</div></div>";

require_once '../core/foot.php';
?>