<?
include 'mysql.php';
Error_Reporting(E_ALL & ~E_NOTICE);

include_once("inclydings/zag.php");
include_once("inclydings/ini.php");
include_once("inclydings/antixak.php");

$log = htmlspecialchars(stripslashes($log));
$pas = htmlspecialchars(stripslashes($pas));
/////////////////////////////////////////////////////
$text = @file("L2dbnam/esql2db/reg/$log.dat");
if ($text!=""){
$udata = explode(":||:",$text[0]);
$login=trim($udata[0]);
$password=trim($udata[1]);}
////////////////////////////////////////////////////////
include_once("inclydings/sesi.php");
if (isset($user)) {
include("inclydings/who.php");
$dir = opendir ("L2dbnam/esql2db/reg");
echo'<div id="menu6">';
echo "<b>Рейтинг Самых богатих по Coin of Luck</b><br/><br/>";

$dir = opendir ("L2dbnam/esql2db/reg");
while ($file = readdir ($dir))
{if (( $file != ".") && ($file != ".."))
{$a[]=$file;}}
closedir ($dir);
$total = count($a);

for ($i = 0; $i < $total; $i++){
$tex = @file("L2dbnam/esql2db/reg/$a[$i]");
$data = explode(":||:",$tex[0]);


$dat_log3[]=$data[0];
$dat_gold3[]=$data[14];
}


arsort($dat_gold3);



foreach($dat_gold3 as $k2=>$v2)
{


$dat_ball2[]='<a href="search.php?nick='.$dat_log3[$k2].'&'.$sd.'&go=go">'.$dat_log3[$k2].'</a><br/>Coin of Luck: '.$dat_gold3[$k2].'<br />';
}

for ($i = 0; $i < 10; $i++){
$i2=$i+1;
echo "$i2. $dat_ball2[$i]";
}

echo'</div>';

}else{echo"Пароль или ник неверен. Возможно сессия устарела. Попробуйте авторизироваться заново.";}

include_once"inclydings/down.php";
?>

