Вход Регистрация
Файл: ban.php
Строк: 136
<?
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']='Вы забанены на '.$_SERVER['HTTP_HOST'];
include_once 
'sys/inc/thead2.php';
title();
err();
aut();


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


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

$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `ban` WHERE `id_user` = '$user[id]'"),1);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];


$q=mysql_query("SELECT * FROM `ban` WHERE `id_user` > '0' ORDER BY `time` DESC LIMIT 1");
while (
$post = mysql_fetch_assoc($q))
{
$ank=get_user($post['id_ban']);
echo 
"<div class='rekl'>n";
echo 
"<center><b>$ank[nick]</b> забанил вас по причине:<br /><font color=#dc9615><b>";

echo 
esc(trim(br(bbcode(smiles(links(stripcslashes(htmlspecialchars($post['prich']))))))))."</b></font></center><br />n";
################################################################################
////////////////////////////////////////////////////////////////////////////////
$test=$post['time']-time();
$timediff=$test;
$oneMinute=60; 
$oneHour=60*60; 
$oneDay=60*60*24; 
$dayfield=floor($timediff/$oneDay); 
$hourfield=floor(($timediff-$dayfield*$oneDay)/$oneHour); 
$minutefield=floor(($timediff-$dayfield*$oneDay-$hourfield*$oneHour)/$oneMinute); 
$secondfield=floor(($timediff-$dayfield*$oneDay-$hourfield*$oneHour-$minutefield*$oneMinute)); 
$sDaysLeft=$dayfield; 
$sDaysText = "дней"; 
$nDaysLeftLength =strlen($sDaysLeft); 
$d_1=substr($sDaysLeft,-1,1); 
if (
substr($sDaysLeft,-2,1) != 1 && $nDaysLeftLength>1) 
{ 
if (
$d_1 == 2 || $d_1== 3 || $d_1== 4) 
{ 
$sDaysText = "дня"; 
} 
elseif (
$d_1== 1) 
{ 
$sDaysText = "день"; 
} 
} 
if (
$nDaysLeftLength==1) 
{ 
if (
$d_1==2 || $d_1== 3 || $d_1== 4) 
{ 
$sDaysText = "дня"; 
} 
elseif (
$d_1== 1) 
{ 
$sDaysText = "день"; 
} 
} 
$sHoursLeft=$hourfield; 
$sHoursText = "часов"; 
$nHoursLeftLength = strlen($sHoursLeft); 
$h_1=substr($sHoursLeft,-1,1); 
if (
substr($sHoursLeft,-2,1) != 1 && $nHoursLeftLength>1) 
{ 
if (
$h_1== 2 || $h_1== 3 || $h_1== 4) 
{ 
$sHoursText = "часа"; 
} 
elseif (
$h_1== 1) 
{ 
$sHoursText = "час"; 
} 
} 
if (
$nHoursLeftLength==1) 
{ 
if (
$h_1== 2 || $h_1== 3 || $h_1== 4) 
{ 
$sHoursText = "часа"; 
} 
    elseif (
$h_1== 1) 
    { 
        
$sHoursText = "час"; 
    } 
} 

$sMinsLeft =$minutefield; 
$sMinsText = "минут"; 
$nMinsLeftLength = strlen($sMinsLeft); 
$m_1=substr($sMinsLeft,-1,1); 

if (
$nMinsLeftLength>1 && substr($sMinsLeft,-2,1) != 1) 
{ 
    if (
$m_1== 2 || $m_1== 3 || $m_1== 4) 
    { 
        
$sMinsText = "минуты"; 
    } 
    else if (
$m_1== 1) 
    { 
        
$sMinsText = "минута"; 
    } 
} 

if (
$nMinsLeftLength==1) 
{ 
    if (
$m_1== 2 || $m_1==3 || $m_1== 4) 
    { 
        
$sMinsText = "минуты"; 
    } 
    elseif (
$m_1== "1") 
    { 
        
$sMinsText = "минута"; 
    } 
} 

$sSecsLeft = $secondfield; 
$sSecsText = "секунд"; 
$s_1=substr($sSecsLeft,-1,1); 
$nSecsLeftLength = strlen($sSecsLeft); 
if (
substr($sSecsLeft,-2,1)!= 1 && $nSecsLeftLength>1) 
{ 
    if (
$s_1== 2 || $s_1== 3 || $s_1== 4) 
    { 
        
$sSecsText = "секунды"; 
    } 
    elseif (
$s_1== 1) 
    { 
        
$sSecsText = "секунда"; 
    } 
} 

if (
$nSecsLeftLength==1) 
{ 
    if (
$s_1== 2 || $s_1== 3 || $s_1== 4) 
    { 
        
$sSecsText = "секунды"; 
    } 
    elseif (
$sSecsLeft== "1") 
    { 
        
$sSecsText = "секунда"; 
    } 
} 
if(
$sDaysLeft==0)$sDaysLeft='';
if(
$sDaysLeft==0)$sDaysText='';
if(
$sHoursLeft==0)$sHoursLeft='';
if(
$sHoursLeft==0)$sHoursText='';
if(
$sMinsLeft==0)$sMinsLeft='';
if(
$sMinsLeft==0)$sMinsText='';
$displaystring="".$sDaysLeft." ".$sDaysText." ".$sHoursLeft." ". 
$sHoursText." ". 
$sMinsLeft." ". 
$sMinsText." ". 
$sSecsLeft." ". 
$sSecsText; 

if (
$timediff<0) $displaystring=''; 
#########
if($timediff>0)$ss='';
if(
$timediff<0)$ss='';
################################################################################
################################################################################
################################################################################
echo "<center>Разбан через:<br /><font color=#dc9615><b>".$ss." ".$displaystring."</b></font></center><br />";
################################################################################
################################################################################
################################################################################
echo "<center>Доступ открыт ток в <a href='/banguest/'>Беспредел</a></center></div>";
}
echo 
"</div>n";

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


include_once 'sys/inc/tfoot.php';
?>
Онлайн: 3
Реклама