View file klub/zona.php

File size: 1.91Kb
<?
include_once '../sys/inc/start.php';
include_once '../sys/inc/compress.php';
include_once '../sys/inc/sess.php';
include_once '../sys/inc/home.php';
include_once '../sys/inc/settings.php';
include_once '../sys/inc/db_connect.php';
include_once '../sys/inc/ipua.php';
include_once '../sys/inc/fnc.php';
$banpage=true;
include_once '../sys/inc/user.php';
only_reg();
$set['title']='Клуб Бар - Зона';
include_once 'sr/head.php';
err();


if (!isset($user)){header("Location: index.php?".SID);exit;}
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `banbar` WHERE `id_user` = '$user[id]' AND (`time` > '$time' OR `view` = '0')"), 0)==0)
{
header('Location: index.php?'.SID);exit;
}

mysql_query("UPDATE `banbar` SET `view` = '1' WHERE `id_user` = '$user[id]'"); // увидел причину бана

$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `banbar` WHERE `id_user` = '$user[id]'"),0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
echo "<table class='title'>\n";





$q=mysql_query("SELECT * FROM `banbar` WHERE `id_user` = '$user[id]' ORDER BY `time` DESC LIMIT $start, $set[p_str]");
while ($post = mysql_fetch_assoc($q))
{
$ank=get_user($post['id_ban']);
/*-----------зебра-----------*/if ($num==0){echo "  <div class='link'>\n";$num=1;}elseif ($num==1){echo "  <div class='link'>\n";$num=0;}/*---------------------------*/
echo "Бан выдал : Судья <br> ";
		echo " Время откидки " . vremja($post['time']) . "<br />";	

echo '<b>Причина :</b> '.esc(trim(br(bbcode(smiles(links(stripcslashes(htmlspecialchars($post['prich']))))))))."<br />\n";
if ($post['time']>$time)echo "<font color=red><b>Активен</b></font><br />\n";
echo "   </div>\n";
}



echo "</table>\n";
if ($k_page>1)str('?',$k_page,$page); // Вывод страниц





include_once 'sr/foot.php';
?>