File size: 1.79Kb
<?
Error_Reporting(E_ALL & ~E_NOTICE);
include_once("files/zag.php");
if (md5($pas)==$password && $log==$login && $log!=="" && md5($pas)!=="") {
echo"<small><a href=\"arenazayavka.php?log=$log&pas=$pas\">Подать заявку</a></small>";
echo"<small><br/>- - -</small>";
$dira = opendir ("data/arena");
while ($filea = readdir ($dira))
{if (( $filea != ".") && ($filea != "..") && ($filea != "action") && ($filea != "logs"))
{$aa[]=$filea;}}
closedir ($dira);
$total=count($aa);
for ($i = 0; $i < $total; $i++){
$tex = @file("data/arena/$aa[$i]");
$data = explode("||",$tex[0]);
$aa[$i]=str_replace(".dat","",$aa[$i]);
if(empty($data[0])){
$data_name[]=$aa[$i];
} }
$total2=count($data_name);
if($total2=="0"){echo"<br/><small>Боев нет.</small>";include_once"files/down.php";exit;}
foreach($data_name as $k=>$v)
{
$dat_screen0[]="<br/><small><b><a href=\"search.php?log=$log&pas=$pas&nick=$data_name[$k]&go=go\">$data_name[$k]</a></b> - <a href=\"arenaok.php?log=$log&pas=$pas&name=$data_name[$k]\">начать бой</a></small>";
}
$total = count($dat_screen0);
if (empty($_GET['start'])) $start = 0;
else $start = $_GET['start'];
if ($total < $start + 10){ $end = $total; }
else {$end = $start + 10; }
for ($i = $start; $i < $end; $i++){
echo"$dat_screen0[$i]";
}
if ($start !== 0) {echo '<small><a href="arena.php?start='.($start - 10).'&log='.$log.'&pas='.$pas.'">Назад</a> </small>';}
if ($total > $start + 10) {echo '<small> <a href="arena.php?start='.($start + 10).'&log='.$log.'&pas='.$pas.'">Далее</a></small>';}
}else{echo"<small>Пароль или логин неверен!</small>";}
include_once"files/down.php";
?>