Просмотр файла ascalon/forum/start.php

Размер файла: 1.66Kb
<?  /*Error_Reporting(E_ALL & ~E_NOTICE);*/ $mt=mt_rand(10000,99999);  
if(isset($_GET['ses'])){ $ses=htmlspecialchars(stripslashes($_GET['ses'])); 
$dbhost='localhost'; 
$dbname='db_l2gracia';
$dbusers='db_l2gracia';
$dbpass='FaGw6cgz'; $link=mysql_connect($dbhost,$dbusers,$dbpass) or die ('error connecting'); mysql_select_db($dbname,$link) or die('error selecting db'); $onli=date("U")-600;  $col=mysql_query("SELECT * FROM users WHERE ses=\"$ses\" && online>\"$onli\"") or die('error'); $har=mysql_fetch_array($col); if(isset($har['nick'])){

$access=(int)$har['access']; $nick=$har['nick'];  $time=(int)$har['time'];  $online=(int)$har['online']; $avatar=$har['avatar']; $nastr=$har['nastr'];} else { header("Location:../log.php?mt=$mt"); exit;}}  else { header("Location:../log.php?mt=$mt"); exit;}
$bac=date("U");
$sq=mysql_query("SELECT * FROM ban WHERE nick=\"$nick\"")or die('error');
$ro=mysql_fetch_array($sq);
if(isset($ro['nick'])){
$p1=(int)$ro['char1'];
$p2=(int)$ro['char2'];
$p3=(int)$ro['char3'];
if($p3>=$bac){ $razn=$p3-$bac; $why=$ro['kom3']; echo"<p align=\"center\"><font color=\"red\">Ваш персораж забанен! Причина: $why! Время до окончания бана: $razn сек!</font></p>"; exit;}
if($p1>=$bac) $sile=1;
if($p2>0){ header("Location:../work.php?ses=$ses&amp;mt=$mt"); exit;}
if($p3<$bac && $p1<$bac && $p2<=0) mysql_query("DELETE FROM ban WHERE nick=\"$nick\"")or die('del error');
}
$zakr=0; if($zakr==1 && $nick!='DemidRoLL'){echo"<p align=\"center\"><font color=\"red\">Форум временно недоступен!</font><br><a href=\"../index.php?ses=$ses&amp;mt=$mt\">назад</a></p>"; exit;}
?>