Файл: users.php
Строк: 32
<?
include ("files/zag.php");
if(isset($_COOKIE['aut']) and $_COOKIE['aut']
== 1){
$dir = opendir ("data/reg");
echo "<b><small>Список пользователей</small></b><br/><br/>";
////////////////////////////////////////////////////////
$col="10";
$mmm=$col;
//////////////////////////////////////////////////////////////////////////////////////
if(empty($go)){$go="1";}
$dir=opendir("data/reg");
$n = "0";
while(($k=readdir($dir))!==false){
if ($k=='.'||$k=='..') continue;
$n++;
}
closedir($dir);
////////////////////
$num=($n/$col);
if ($num!==(int)$num){$foo = (int) $num;
$fo = ($foo + 1);} else {$fo=$num;}
for ($i="1"; $i<=$fo; $i++)
if ($go == "") {$c="0";} else {$c=($col*($go-1));}
///////////////////////
$dir = opendir ("data/reg");
while ($file = readdir ($dir))
{
if (( $file != ".") && ($file != ".."))
{ $file= str_replace(".dat","",$file);
$file2= "$file";
$text = @file("data/reg/$file2.dat");
$udat = explode(":||:",$text[0]);
$hp=trim($udat[9]);
$la = $la + 1;
if($go=="1"){$col=round($mmm+1);}
if($la>$c-1 and $la<$c+$col){
if ($mode == "1"){$ee = strtr($e1,$tran);}else{$ee = $e1;}
$laa = $la + 1;
echo "<small>$file [Уровень - $hp]</small><br/>";
}}
}
closedir ($dir);
if ($go == "") {$c="0";} else{$c=($col*($go-1));}
$lis = $go + 1;
$lis1 = $go - 1;
echo"<br/>";
if ($lis1 < "1") {} else{print "<small><a href="users.php?go=$lis1">Назад</a> | </small>";}
if ($lis == "$i") {} else { print "<small><a href="users.php?go=$lis">Вперед</a></small>";}
echo"<small><br/><br/>Перейти к: </small><input name="go"/> <small>странице.</small><br/>";
echo"<small><anchor>Перейти
<go href="users.php?$random" method="get">
<postfield name="go" value="$(go)"/>
</go>
</anchor></small><br/>";
echo"<small>Всего игроков: $n.</small>";
}
include('files/down.php');
?>