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

include_once("include/zag.php");

$log = htmlspecialchars(stripslashes($log));
$pas = htmlspecialchars(stripslashes($pas));
/////////////////////////////////////////////////////
$text = @file("MySql/base123/reg/$log.dat");
if ($text!=""){
$udata = explode(":||:",$text[0]);
$login=trim($udata[0]);
$password=trim($udata[1]);}
////////////////////////////////////////////////////////
include_once("include/sesi.php");
if (isset($user)) {
include("include/who.php");
$dir = opendir ("MySql/base123/reg");
echo'<div id="menu6">';
echo "<b>Рейтинг постеров</b><br/><br/>";

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

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


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


arsort($dat_gold3);



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


$dat_ball2[]='<b><a href="search.php?nick='.$dat_log3[$k2].'&'.$sd.'&go=go">'.$dat_log3[$k2].'</a></b><br/>Постов: <font color="#ff0000">'.$dat_gold3[$k2].'</font><br />';


}



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

echo'</div>';

}else{echo"Пароль или логин неверен!";}

include_once"include/down.php";
?>

