Размер файла: 5.09Kb
<? $numb=6; require"start.php";
echo'<html><head><title>apeнa</title>'; require"css.php"; echo'</head><body>';
if(isset($spec)){ $nicks=htmlspecialchars(stripslashes($nicks)); $o=$nicks; $f=@fopen("arena.dat","w"); fputs($f,$o); fclose($f); if($nicks!=''){ $b=@file("arena_log.dat"); $sb=sizeof($b); $ni=@explode("|",$nicks); $echo="<div class=bat><font color=\"#ffff00\">На арену вызываются <font color=\"red\">$ni[0]</font> и <font color=\"red\">$ni[1]</font>!!</font></div>"; $b[$sb]="0:||:$echo\r\n"; $o=@implode("",$b); $f=@fopen("arena_log.dat","w"); fputs($f,$o); fclose($f);}}
if($nick=='Cheh' || $nick=='DemidRoLL') echo"<form action=\"arena.php?ses=$ses&spec=spec&mt=$mt\" method=\"post\"><input type=\"text\" name=\"nicks\"><br><input type=\"submit\" value=\"вызвать\"></form>";
echo'<div class=kto>Зpитeли:<div class=on>';
$onl=date("U")-600; $col2=mysql_query("SELECT * FROM users WHERE online>\"$onl\" && lok=\"$lok\" && thp>0 ORDER BY online DESC") or die('error'); $ss=@file("arena.dat"); if(isset($ss[0]) && $ss[0]!='') $opr=1; else $opr=0; if($opr==1) {$s=$ss[0]; $sss=@explode("|",$s); $vsehh=count($sss);} while($row=mysql_fetch_array($col2)){ $v=0;
$nickk=$row['nick']; $i=0; $ok=0; if($opr==1){ while($i<$vsehh){ if($sss[$i]==$nickk) {$ok=1; $i=$vsehh; } $i++;}} $thpp=$row['thp']; if($ok==0){ if($row['rep']>5){ echo"<a href=\"infa.php?ses=$ses&nick2=$nickk&mt=$mt\">$nickk</a>[$thpp]"; $v=1;}
if($row['rep']<-5){ echo"<a href=\"infa.php?ses=$ses&nick2=$nickk&mt=$mt\">$nickk</a><font color=\"black\">[$thpp]</font>"; $v=1;}
if($v==0){ echo"<a href=\"infa.php?ses=$ses&nick2=$nickk&mt=$mt\">$nickk</a><font color=\"green\">[$thpp]</font>"; $v=1;}
if((int)$row['clan']>0){ $xx=$row['clan']; $col3=mysql_query("SELECT * FROM clans WHERE id=\"$xx\"") or die('error'); $row1=mysql_fetch_array($col3); $abbr=$row1['abr']; echo"<font color=\"#af2f8f\">($abbr)</font>";} if($row['class']==6){ $b=@file("monster.dat"); $sb=sizeof($b); $n=0; $p=0; if($sb>0){ while($n<$sb){ $bb=$b[$n]; $mh=@explode(".",$bb); if($mh[0]==$nickk && $mh[1]!='0'){ $mnaz=$mh[1]; $mthp=$mh[3]; echo", <a href=\"monster.php?ses=$ses&nick2=$nickk&mt=$mt\"><font color=\"green\">$mnaz</font></a> [$mthp]"; $n=$sb;} $n++;}}} echo',';
}} echo'</div></div><div class=d2>нa apeнe:<br>';
$onl=date("U")-600; $col2=mysql_query("SELECT * FROM users WHERE online>\"$onl\" && lok=\"$lok\" && thp>0 ORDER BY online DESC") or die('error');
while($row=mysql_fetch_array($col2)){ $v=0;
$nickk=$row['nick']; $qp=0; if($row['class']==3){ $sq=mysql_query("SELECT * FROM skills WHERE nick=\"$nickk\"") or die('error'); $ron=mysql_fetch_array($sq); if($ron['time3']>=$online) $qp=1;} if($qp!=1){ $i=0; $ok=0; if($opr==1){ while($i<$vsehh){ if($sss[$i]==$nickk) {$ok=1; $i=$vsehh;} $i++;}} $thpp=$row['thp']; if($ok==1){ echo"<a href=\"infa.php?ses=$ses&nick2=$nickk&mt=$mt\"><font color=\"red\">$nickk</font></a><font color=\"red\"> [$thpp]</font>";
if((int)$row['clan']>0){ $xx=$row['clan']; $col3=mysql_query("SELECT * FROM clans WHERE id=\"$xx\"") or die('error'); $row1=mysql_fetch_array($col3); $abbr=$row1['abr']; echo"<font color=\"#af2f8f\">($abbr)</font>";} if($row['class']==6){ $b=@file("monster.dat"); $sb=sizeof($b); $n=0; $p=0; if($sb>0){ while($n<$sb){ $bb=$b[$n]; $mh=@explode(".",$bb); if($mh[0]==$nickk && $mh[1]!='0'){ $mnaz=$mh[1]; $mthp=$mh[3]; echo", <a href=\"monster.php?ses=$ses&nick2=$nickk&mt=$mt\"><font color=\"black\">$mnaz</font></a> <font color=\"black\">[$mthp]</font>"; $n=$sb;} $n++;}}} echo',';
}}}
$ran=mt_rand(10000,99999);
echo"</div><div class=time>($ttime)$chas</div><div class=spec>"; $ghi=@file("arena_log.dat"); $sig=sizeof($ghi); $sig=$sig-1; if($sig>0){
if($sig<10) $gop=$sig; else $gop=9;
while($sig>=0){
$gh=$ghi[$sig]; $cheh[$gop]=$ghi[$sig]; if($gop==0) $sig=0; $jef=@explode(":||:",$gh); echo"$jef[1]"; $gop=$gop-1; $sig=$sig-1;
}
ksort($cheh); $skif=@implode("",$cheh); $zu=@fopen("arena_log.dat","w"); fputs($zu,$skif); fclose($zu);
} echo'</div><div class=d2>- - - - -</div>';
if($newl==1) echo"<a href=\"letters.php?ses=$ses&mt=$mt\"><font color=\"red\">[нoвoe cooбщeниe!]</font></a><br>";
echo"<br>* * * * *<br><a href=\"say.php?ses=$ses&mt=$mt\">cкaзaть</a>|<a href=\"arena.php?ses=$ses&ran=$ran\">oбнoвить</a><br>* * * * *<br><div class=text>";
$ghi=@file("room$lok.dat"); $sig=sizeof($ghi); $sig=$sig-1; if($sig>0){
if($sig<20) $gop=$sig; else $gop=19;
while($sig>=0){
$gh=$ghi[$sig]; $cheh[$gop]=$ghi[$sig]; if($gop==0) $sig=0; $jef=@explode(":||:",$gh); if($jef[0]!="0"){ if($nastrs==0){ if(isset($jef[2])) require"smile.php";} echo'<div class=font>'; if($nastr==0) echo"<img src=\"avatars/$jef[1].png\" alt=\"pic\">"; echo"<a href=\"infa.php?ses=$ses&nick2=$jef[0]&mt=$mt\">$jef[0]:</a>$jef[2]</div>";} else echo"$jef[1]"; $gop=$gop-1; $sig=$sig-1;
}
ksort($cheh); $skif=@implode("",$cheh); $zu=@fopen("room$lok.dat","w"); fputs($zu,$skif); fclose($zu);
}
echo"</div><br>* * * * *<br><div class=kto><a href=\"index.php?ses=$ses&mt=$mt\">нa yлицy</a></div></body></html>"; require"end.php";
?>