<?
$dir = opendir ("users");
while ($file = readdir ($dir)) 
{if (($file !="index.php") &&($file !="zip.php"))
{$a[]=$file;}}
closedir ($dir);      
sort($a);
$total = count($a);
if (empty($_GET['start'])) $start = 0;
else $start = $_GET['start'];
if ($total < $start + 25){ $end = $total; }
else {$end = $start + 25; }
if ($player['style']!=='0') $stmp.='<div action="ramka">';
$stmp.="<br/>Всего игроков:".$total."<br/>";

for ($i = 0; $i < $end; $i++){ //пускаем цикл

$d=opendir("users"); $n = "0"; while(($k=readdir($d))!==false){ if ($k=='.'||$k=='..'||$k != "in.php") continue; $n++;} closedir($d);
$spuss=explode(".",$a[$i]);
$spu=$spuss[1];
$stmp.="$spu<br/>";
}
if ($start != 0) {$stmp.="<a href=\"$PHP_SELF?sid=$sid&all=1&start=".($start - 25)."\">[назад]</a>";}
if ($total > $start + 25) {$stmp.=" <a href=\"$PHP_SELF?sid=$sid&all=1&start=".($start + 25)."\">[далее]</a>";}
msg($stmp,"Список героев");

?>