Файл: DarkAge/arena.php
Строк: 36
<?
Error_Reporting(E_ALL & ~E_NOTICE);
include_once("files/zag.php");
if (md5($pas)==$password && $log==$login && $log!=="" && md5($pas)!=="") {
echo"<a href="arenazayavka.php?log=$log&pas=$pas">Подать заявку</a><br/>";
$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/>Боев нет.";include_once"files/down.php";exit;}
foreach($data_name as $k=>$v)
{
$dat_screen0[]="<br/><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>";
}
$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 '<a href="arena.php?start='.($start - 10).'&log='.$log.'&pas='.$pas.'">Назад</a> ';}
if ($total > $start + 10) {echo ' <a href="arena.php?start='.($start + 10).'&log='.$log.'&pas='.$pas.'">Далее</a>';}
}else{echo"Пароль или логин неверен!";}
include_once"files/down.php";
?>