File size: 3.59Kb
<?
Error_Reporting(E_ALL & ~E_NOTICE);
include_once("files/antixak.php");
header("Content-type:text/vnd.wap.wml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.2//EN\" \"http://www.wapforum.org/DTD/wml12.dtd\">";
echo "<wml>\n";
echo "<head><meta http-equiv=\"Cache-Control\" content=\"no-cache\" forua=\"true\"/></head>";
echo "<card id=\"index\" title=\"Список кланов\">";
echo "<p align=\"left\">";
$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)!=="") {include_once"files/up.php";
$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') 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= 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 "<small>$la. $name (лидер $file2) [в клане $total человек]</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=\"clanlist.php?go=$lis1&log=$log&pas=$pas\">Назад</a> | </small>";}
if ($lis == "$i") {} else { print "<small><a href=\"clanlist.php?go=$lis&log=$log&pas=$pas\">Вперед</a></small>";}
echo"<small><br/><br/>Перейти к: </small><input name=\"go\"/> <small>странице.</small><br/>";
echo"<small><anchor>Перейти
<go href=\"clanlist.php?$random&log=$log&pas=$pas\" method=\"get\">
<postfield name=\"go\" value=\"$(go)\"/>
</go>
</anchor></small><br/>";
echo"<small>Кланов всего: $n.</small>";
}else{echo"<small>Пароль или логин неверен!</small>";}
include_once"files/down.php";
?>