View file darkworld/arena.php

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&amp;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&amp;pas=$pas&amp;nick=$data_name[$k]&amp;go=go\">$data_name[$k]</a></b> - <a href=\"arenaok.php?log=$log&amp;pas=$pas&amp;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).'&amp;log='.$log.'&amp;pas='.$pas.'">&#x41D;&#x430;&#x437;&#x430;&#x434;</a> </small>';}
if ($total > $start + 10) {echo '<small> <a href="arena.php?start='.($start + 10).'&amp;log='.$log.'&amp;pas='.$pas.'">&#x414;&#x430;&#x43B;&#x435;&#x435;</a></small>';}


}else{echo"<small>Пароль или логин неверен!</small>";}

include_once"files/down.php";
?>