Файл: DarkAge/files/chat2.php
Строк: 25
<?
$fal = @file("data/reg/$log.dat");
$udata = explode(":||:",$fal[0]);
if($udata[21]=="1"){
echo'<div id="menu3"><div id="line"><b>- Chat -</b></div><div id="menu2"><hr />';
$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_00[]=$data[0];
$data_11[]=$data[1];
}
}
if(empty($data_00)){echo"Сообщений нет."; include_once"files/down.php"; exit;}
foreach($data_00 as $k=>$v)
{
$dat_screen0[]="<br/><a href="search.php?log=$log&pas=$pas&go=go&nick=$data_11[$k]">$data_11[$k]</a> - $data_00[$k]";
}
$total = count($dat_screen0);
if(empty($udata[35])){$udata[35]="5";}
if (empty($_GET['chat'])) $chat = 0;
else $chat = $_GET['chat'];
if ($total < $chat + $udata[35]){ $end = $total; }
else {$end = $chat + $udata[35]; }
for ($i = 0; $i < $udata[35]; $i++){
echo"$dat_screen0[$i]";
}echo"<hr />";
echo "<center><form method="post" action="add.php?log=$log&pas=$pas">
<input name="msg" maxlength="150" title="msg"/>
<br/>";
echo "<input class="button" type="submit" value="ok"/>";
echo "<postfield name="msg" value="$(msg)"/>";
echo "<postfield name="self" value="$self"/>";
echo "</form></center>";}
echo'</div></div>';
?>