Файл: darkworld/chat.php
Строк: 39
<?
Error_Reporting(E_ALL & ~E_NOTICE);
Error_Reporting (ERROR | WARNING);
include_once("files/zag.php");
if (md5($pas)==$password && $log==$login && $log!=="" && md5($pas)!=="") {
$self = $_SERVER['SCRIPT_NAME'];
$ref=rand(100,100000);
echo"<small><a href="chat.php?log=$log&pas=$pas&ref=$ref">Обновить</a><br/>- - -</small>";
$file = file("data/chat.dat");
$file = array_reverse($file);
$total = count($file);
for ($i = 0; $i < $total; $i++){
$data = explode("#",$file[$i]);
if($data[1]!=="CooL" && $data[1]!=="BaFFer"){
$data_0[]=$data[0];
$data_1[]=$data[1];
}
}
if(empty($data_0)){echo"<small>Сообщений нет.</small>"; include_once"files/down.php"; exit;}
foreach($data_0 as $k=>$v)
{
$dat_screen[]="<br/><small><a href="search.php?log=$log&pas=$pas&go=go&nick=$data_1[$k]">$data_1[$k]</a></small> - <small>$data_0[$k]</small>";
}
$total = count($dat_screen);
if(empty($udata[35])){$udata[35]="5";}
if (empty($_GET['start'])) $start = 0;
else $start = $_GET['start'];
if ($total < $start + $udata[35]){ $end = $total; }
else {$end = $start + $udata[35]; }
for ($i = $start; $i < $end; $i++){
echo"$dat_screen[$i]";
}
echo"<br/><b><small>- - -</small></b>";
echo "<br/><input name="msg" maxlength="100" title="msg"/><br/>";
echo "<small><anchor title="go">Написать<go href="add.php?log=$log&pas=$pas" method="post">";
echo "<postfield name="msg" value="$(msg)"/>";
echo "<postfield name="self" value="$self"/>";
echo "</go></anchor></small><br/>";
if ($start != 0) {echo '<small><a href="chat.php?start='.($start - $udata[35]).'&log='.$log.'&pas='.$pas.'">Назад</a></small> ';}else{echo'<small>- - -</small><br/>';}
if ($total > $start + $udata[35]) {echo ' <small><a href="chat.php?start='.($start + $udata[35]).'&log='.$log.'&pas='.$pas.'">Далее</a></small>';}
echo"<br/><small><a href="chat.php?log=$log&pas=$pas&ref=$ref">Обновить</a></small>";
if(@file("data/tmp/$log.dat")){echo"<small><br/>- - -<br/>» <a href="ataka.php?log=$log&pas=$pas">Вернуться в бой</a></small><br/>";}else{echo"<br/><small>- - -</small><br/>";}
echo"<small>» <a href="inventar.php?log=$log&pas=$pas">Инвентарь</a></small><br/>";
echo"<small>» <a href="gorod.php?log=$log&pas=$pas">В город</a></small>";
if(!empty($udata[23])){echo"<small><br/>» <a href="clanroom.php?log=$log&pas=$pas">Комната клана</a></small>";}
echo"<small><br/>» <a href="main.php?log=$log&pas=$pas">Моё меню</a></small><br/>";
include_once"files/online.php";
include_once("files/regeneration.php");
list($msec,$sec)=explode(chr(32),microtime());
echo "<small>[".round((($sec+$msec)-$gtime),4)." секунд]</small>";
}else{echo"<small>Пароль или логин неверен!</small>";}
echo "</p></card></wml>";
?>