Файл: DarkAge/files/chat.php
Строк: 36
<?
$fal = @file("data/reg/$log.dat");
$udata = explode(":||:",$fal[0]);
if($udata[21]=="1"){
echo'<hr/><p align="center">- = Чат = -</p><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]!=="ZenS.GM" && $data[1]!=="ZomBiE.GM"){
$data_11[]=$data[1];
$data_00[]=$data[0];
$data_22[]=$data[2];
}else{
$data_00[]="<b>$data[0]</b>";
$data_11[]="$data[1]";
$data_22[]=$data[2];
}
}
if(empty($data_00)){echo"<small>Сообщений нет.</small>"; include_once"files/downmenu.php"; exit;}
$time=date("H:i:s", time());
foreach($data_00 as $k=>$v)
{
if($data_11[$k]!=="ZenS.GM" && $data_11[$k]!=="ZomBiE.GM"){
$dat_screen0[]="<br/><a href="search.php?log=$log&pas=$pas&go=go&nick=$data_11[$k]">$data_11[$k]</a> [<a href="say.php?log=$log&pas=$pas&go=go&nick=$data_11[$k]">Ответ</a>] ($data_22[$k]) - $data_00[$k]";}
else{
if($data_11[$k]!=="Vamp.MD" && $data_11[$k]!=="WARIOR-NIGHT" && $data_11[$k]!=="CasPro"){
$dat_screen0[]="<br/><a href="search.php?log=$log&pas=$pas&go=go&nick=$data_11[$k]"><font color=#00ff00>$data_11[$k]</font></a> [<a href="say.php?log=$log&pas=$pas&go=go&nick=$data_11[$k]">Ответ</a>] ($data_22[$k]) - $data_00[$k]";}
else{
$dat_screen0[]="<br/><a href="search.php?log=$log&pas=$pas&go=go&nick=$data_11[$k]"><font color=#00ff00>$data_11[$k]</font></a> [<a href="say.php?log=$log&pas=$pas&go=go&nick=$data_11[$k]">Ответ</a>] ($data_22[$k]) - $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"";
echo "<form action="add.php?log=$log&pas=$pas" method="post">";
echo "<br/><input name="msg" maxlength="100" title="msg"/><br/><input type="hidden" name="self" value="$self" />";
echo "<input type="submit" value="Написать"/></form>";
echo'<hr/>';
echo "<br/>";}
?>