File size: 4.16Kb
<?
#----------------------------------------------#
# MOTOR 16.1 Site Rating #
# Mod by Voland #
# WAP-Site : http://wapdel.net.ru #
#----------------------------------------------#
require_once "../template/start.php";
require_once "../template/regglobals.php";
require_once "../template/config.php";
require_once "../template/functions.php";
require_once "../template/maincore.php";
require_once "../template/antidos.php";
require_once "../template/cookies.php";
require_once "../template/gzip.php";
require_once "../template/header.php";
require_once "../template/referer.php";
require_once "conf.php";
include_once "../themes/$config_themes/index.php";
$text = @file("../local/profil/$log.prof");
if($text != "")
{
$udata = explode(":||:",$text[0]);
$provlog = trim($udata[0]);
$provpar = trim($udata[1]);
$dostup=trim($udata[7]);
$privat = trim($udata[10]);
}
if(empty($p))
{
$p=1;
}
$dir = opendir ("../local/datatop/data");
while ($file = readdir ($dir))
{
if ($file != "." && $file != "..")
{
$file = str_replace('.dat','',$file);
$array[]=$file;
}
}
$all = count($array);
$view=0;
for($i=0; $i < $all; $i++)
{
$site = file_get_contents("../local/datatop/data/$array[$i].dat");
$data = explode("|",$site);
$rat[] = $data[1].'|'.$array[$i];
if ($data[1]>0) $view++;
}
echo '<div class=a>'.$topname.'</div><hr><div>';
if($udata[10] > 0)
{
echo '<img src="images/img/mail.gif" alt=""> <a href="../pages/privat.php?'.SID.'">Пись-пись-письмо!</a> [<font color="lime">'.$privat.'</font>]</div><hr><div>';
}
echo '<font color="green">Регистраций: <font color="red">'.$all.'</font></font></div><hr><div>';
$all=count($rat);
rsort($rat,SORT_NUMERIC);
$d=$p*5-5;
$k=$p*5;
if($k>$all)
{
$c=$all;
}
else
{
$c=$k;
}
for($i=$d; $i < $c; $i++)
{
$act = explode('|', $rat[$i]);
$k=$act[1];
$fsite = file_get_contents("../local/datatop/site/$k.dat");
$site = explode("|",$fsite);
$fon = file("../local/datatop/online/$k.dat");
$allon=count($fon);
$pos = $i+1;
$sitedata = file_get_contents("../local/datatop/data/$k.dat");
$data = explode("|",$sitedata);
if ($data[1]>0)
{
echo '<div class=b><div class=b><font color="green">['.$pos.']</font> <a href="'.$site[1].'">'.$site[0].'</div></a>';
echo 'Описание: <font color="yellow">'.$site[2].'</font><br>Сегодня хостов: <font color="yellow">'.$data[1].'</font><br>Сегодня хитов: <font color="yellow">'.$data[3].'</font><br>Всего хостов: <font color="yellow">'.$data[2].'</font><br>Всего хитов: <font color="yellow">'.$data[4].'</font></div>';
}
}
if ($view>5)
{
echo '</div><hr><div>';
$back=$p-1;
$next=$p+1;
if($p>1)
{
echo '<a href="index.php?p='.$back.'&'.SID.'"><<<</a> ';
}
if($p<$view/5)
{
echo '<a href="index.php?p='.$next.'&'.SID.'">>>></a>';
}
}
echo '</div><hr><div>';
echo '<img src="../images/img/dir.gif" alt=""> <a href="prof.php?'.SID.'">Профиль</a><br>';
echo '<img src="../images/img/dir.gif" alt=""> <a href="reg.php'.SID.'">Регистрация</a><br>';
if(!$_SESSION['log'] == "" && !md5($_SESSION['par']) == "" && md5($_SESSION['par']) == $provpar && $_SESSION['log'] == $provlog )
{
if($dostup == 101 || $dostup == 102)
{
echo '<img src="../images/img/dir.gif" alt=""> <a href="../'.$config_mpanel.'/top.php?'.SID.'">Админка</a><br>';
}
else
{
header("Location: ../index.php?error&".SID);
}
}
echo '<img src="../images/img/act_home.gif" alt=""> <a href="../index.php?'.SID.'">На главную</a></div>';
include_once "../themes/$config_themes/foot.php";
?>