DemiX_GW,
<?php
session_start();
define(\'NTOP\', 1);
$title = \'Главная\';
require_once (\'system/connect.php\');
require_once (\'system/core.php\');
require_once (\'system/function.php\');
require_once (\'m/head.php\');
echo \'<div class=\"title2\">\';
echo \'<a href=\"http://\'.$set[\'home\'].\'/m/category\">Категории</a> | <strong>Топ100</strong> </div>\';
$all = mysql_num_rows(mysql_query(\"SELECT * FROM `\".$prefix.\"sait` WHERE `status` = \'1\' AND `ban` = \'0\' AND `hosts` > \'0\'\"
);
if($all != 0)
{
$total=intval(($all-1)/$page_top)+1;
$page=abs(intval($_GET[\'page\']));
if(empty($page) OR $page < 0)
{
$page = 1;
}
if($page > $total)
{
$page = $total;
}
$past=intval($all/$page_top);
$start=$page*$page_top-$page_top;
$top = mysql_query(\"SELECT * FROM `\".$prefix.\"sait` WHERE `status` = \'1\' AND `ban` = \'0\' AND `hosts` > \'0\' ORDER BY `hosts` DESC LIMIT \".$start.\",\".$page_top.\"\"
;
while($row = mysql_fetch_array($top))
{
$start++;
if($_SESSION[\'id\'] == $row[\'id\']){
$div_1 = \'<div class=\"title\"><u><b><font corol=\"red\">\';}
else {
$div_1 = \'<div class=\"title\">\';}
echo $div_1.$start.\'.<a href=\"http://\'.$set[\'home\'].\'/out/\'.$row[\'id\'].\'\"><b>\'.$row[\'name\'].\'</b></a> (<b>\'.$row[\'hosts\'].\'/\'.$row[\'hits\'].\'</b>
<a href=\"http://\'.$set[\'home\'].\'/stats/\'.$row[\'id\'].\'\"><b>(i)</b></a><br/>\';
if(mb_strlen($row[\'about\']) > 100)
{
$text = substr($row[\'about\'],0,100);
echo \'\'.$text.\'...<br/>\';
}
else
{
echo \'\'.$row[\'about\'].\'<br/></font></b></u>\';
}
echo \'В топ: <b>\'.$row[\'in\'].\'</b> | Из топа: <b>\'.$row[\'out\'].\'</b><br/>\';
echo \'</div>\';
}
navigation($all,$page_top,$page,\'/\',$total);
}
else
{
echo \'<div class=\"main\">\';
echo \'Сайтов учавствующих в Топ-100 не обнаружено!\';
echo \'</div>\';
}
echo \'<div class=\"title2\"></div><div class=\"main\">\';
if(!$user_data)
{
echo \'<a href=\"http://\'.$set[\'home\'].\'/m/authentication\">Вход</a> | <a href=\"http://\'.$set[\'home\'].\'/m/registration\">Регистрация</a> <br/> \';
}
$posl_news = mysql_query(\"SELECT * FROM `\".$prefix.\"news` ORDER BY `time` DESC LIMIT \".$set[\'news_index\'].\"\"
;
if(mysql_num_rows($posl_news) > 0)
{
while($row = mysql_fetch_array($posl_news))
{
$page = ceil(mysql_result(mysql_query(\"SELECT COUNT(*) FROM `\".$prefix.\"news` WHERE `id` = \'\".$row[\'id\'].\"\'\"
, 0) / $page_news);
echo \'<a href=\"http://\'.$set[\'home\'].\'/m/news\"> Новости</a> (\'.data($row[\'time\']).\')<br/>
<a href=\"http://\'.$set[\'home\'].\'/m/allStats\">Cтатистика</a><br/>
<a href=\"http://\'.$set[\'home\'].\'/m/rules\">Правила</a><br/>
<a href=\"http://\'.$set[\'home\'].\'/m/contacts\">Контакты</a><br/>\';
echo \"<a href=\\\"javascript:showhide()\\\">Наши Партнеры</a></div>
<div id=hide class=hide style=\\\"display: none;\\\">\";
echo \'<div class=\"title\"><a href=\"http://ftpnet.ru\"><font color=\"#e00606\"><b>Mobile ftp manager</b></font></a></div>\';
echo \"
<script type=text/javascript language=javascript>
function showhide() {
if (document.getElementById(\'hide\').style.display == \'none\') document.getElementById(\'hide\').style.display = \\\"block\\\";
else document.getElementById(\'hide\').style.display = \\\"none\\\";
}
</script></div>\";
}
}
unset($_SESSION[\'id\']);
require_once (\'m/foot.php\');
echo \'<center><a href=\"http://waplog.net/c.shtml?487735\"><img src=\"http://c.waplog.net/487735.cnt\" alt=\"waplog\" /></a></center>\';
?>