Файл: DarkAge/clanlist.php
Строк: 59
<?
Error_Reporting(E_ALL & ~E_NOTICE);
include_once("files/antixak.php");
include_once("files/zag.php");
$log = htmlspecialchars(stripslashes($log));
$pas = htmlspecialchars(stripslashes($pas));
$go = htmlspecialchars(stripslashes($go));
/////////////////////////////////////////////////////
$text = @file("data/reg/$log.dat");
if ($text!=""){
$udata = explode(":||:",$text[0]);
$login=trim($udata[0]);
$password=trim($udata[1]);}
////////////////////////////////////////////////////////
if (md5($pas)==$password && $log==$login && $log!=="" && md5($pas)!=="") {
$col="10";
$mmm=$col;
//////////////////////////////////////////////////////////////////////////////////////
if(empty($go)){$go="1";}
$dir=opendir("data/clan");
$n = "0";
while(($k=readdir($dir))!==false){
if ($k=='.'||$k=='..'||$k=='name'||$k=='tmp'||$k=='sklad'||$k=='zahvat'||$k=='desk'||$k=='chat'||$k=='logs'||$k=='bank'||$k=='clanholl'||$k=='site') 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/clan");
while ($file = readdir ($dir))
{
if (( $file != ".") && ($file != "..") && ($file != "name") && ($file != "tmp") && ($file != "sklad") && ($file != "zahvat") && ($file != "chat") && ($file != "desk") && ($file != "logs") && ($file != "bank") && ($file != "clanholl") && ($file != "site"))
{ $file= str_replace(".dat","",$file);
$file2= "$file";
$text = @file("data/clan/$file2.dat");
$udat = explode(":||:",$text[0]);
$name=trim($udat[1]);
$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;
$file=@file("data/clan/name/$file2.dat");
$total=count($file);
echo "$la. <a href="infoclan.php?log=$log&pas=$pas&$go=$name;">$name</a> (лидер $file2) [в клане $total человек]<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 "<a href="clanlist.php?go=$lis1&log=$log&pas=$pas">Назад</a> | ";}
if ($lis == "$i") {} else { print "<a href="clanlist.php?go=$lis&log=$log&pas=$pas">Вперед</a>";}
echo "<br/><br/>Перейти к:";
echo "<form method="post" action="clanlist.php?$random&log=$log&pas=$pas">";
echo "<input name="go"/>странице.<br/>";
echo "<input class="button" type="submit" value="Перейти
">
<postfield name="go" value="$(go)"/>
</form><br/>";
echo "Кланов всего: $n.";
}else{
echo "Пароль или логин неверен!";
}
include_once"files/down.php";
?>