<?php
define(\'NTOP\', 1);
$title = \'Топ рейтинг сайтов\';
require_once (\'system/connect.php\');
require_once (\'system/core.php\');
require_once (\'system/function.php\');
require_once (\'str/head.php\');
if($_COOKIE[\'version\'] == \'web\'){
echo \'<table class=\"stata\"><tr>
<th class=\"left0 top0\">#</th>
<th class=\"top0\">Сайты из категории Top-100</th>
<th class=\"top0\">Хосты</th>
<th class=\"top0\">Хиты</th>
<th class=\"top0\">В топ</th>
<th class=\"top0\">Из</th>
<th class=\"right0 top0\">?</th></tr>\';
$all = mysql_num_rows(mysql_query(\"SELECT * FROM `\".$prefix.\"sait` WHERE `status` = \'1\' AND `ban` = \'0\' AND `hosts` > \'0\' AND `category` != \'19\'\");
if($all != 0){
$total = intval(($all-1)/20)+1;
$page = abs(intval($_GET[\'page\']));
if($id or $id >= 1){
$result = mysql_query(\"SELECT `hosts` FROM `\".$prefix.\"sait` WHERE `id` = \'\".$id.\"\' AND `status` = \'1\' AND `ban` = \'0\' AND `hosts` > \'0\' AND `category` != \'19\' LIMIT 1;\"
$row = mysql_fetch_array($result);
$host_today = $row[\'hosts\'];
$topt = mysql_num_rows(mysql_query(\"SELECT * FROM `\".$prefix.\"sait` WHERE `status` = \'1\' AND `ban` = \'0\' AND `category` != \'19\' AND `hosts`>= \'\".$host_today.\"\' ORDER BY `hosts` DESC;\");
$page = ceil($topt/20);
}
if(empty($page) OR $page <= 0){
$page = 1;
}
if($page > $total){
$page = $total;
}
$past=intval($all/20);
$start=$page*20-20;
$top = mysql_query(\"SELECT * FROM `\".$prefix.\"sait` WHERE `status` = \'1\' AND `ban` = \'0\' AND `hosts` > \'0\' AND `category` != \'19\' ORDER BY `hosts` DESC LIMIT \".$start.\",20\"
while($row = mysql_fetch_array($top)){
$start++;
echo \'<tr class=\"tr2\"><td class=\"num bold left0\">\'.$start.\'</td>\';
if($row[\'id\'] == $id){
echo\'<td class=\"site\"><a href=\"/out.php?id=\'.$row[\'id\'].\'\"><font color=\"red\">\'.$row[\'url\'].\'</font></a>\';
} else {
echo\'<td class=\"site\"><a href=\"/out.php?id=\'.$row[\'id\'].\'\">\'.$row[\'url\'].\'</a>\';
}
echo\'<br><small>\'.$row[\'about\'].\'</small></td>
<td>\'.stats($row[\'hosts\']).\'</td>
<td>\'.stats($row[\'hits\']).\'</td>
<td>\'.$row[\'in\'].\'</td>
<td>\'.$row[\'out\'].\'</td>\';
if($row[\'mem\'] == 0){echo\'<td class=\"more right0\"><a href=\"/str/infos.php?id=\'.$row[\'id\'].\'\"><img src=\"/images/s.gif\" alt=\"?\" style=\"padding:2px;padding-top:4px;\"></a></td></tr>\';
}else{echo\'<td class=\"more right0\"><img src=\"/images/d.gif\" alt=\"?\" style=\"padding:2px;padding-top:4px;\"></td></tr>\';}}
echo\'</table>\';
navigation($all,20,$page,\'index.php?\',$total);
} else {
echo \'<div class=\"stat\">Сайтов в топе пока нет!</div>\';}
}else{
?>
<?php
$l = mysql_query(\"SELECT * FROM `\".$prefix.\"rek` WHERE `status` = \'1\' ORDER BY `id` DESC\"
echo \'<div class=\"rek\"><img src=\"http://vip-top.tk/style/img/reklama.gif\" alt=\"Реклама\"/></img><br>\';echo\'<a href=\"reklama.php\">Свободное место 50р.</a><br/>\';
while($rek = mysql_fetch_array($l)){
if(empty($rek[\'color\']))echo \'<a href=\"http://\'.$rek[\'url\'].\'\">\'.$rek[\'name\'].\'</a><br>\'; else echo \'<a href=\"http://\'.$rek[\'url\'].\'\"><font color=\"\'.$rek[\'color\'].\'\">\'.$rek[\'name\'].\'</font></a><br>\';}
echo \'</div>\';
echo\'<div class=\"topik\">Top 100 | <b><a href=\"/str/cat.php\">Категории</a></b></div>\';
$all = mysql_num_rows(mysql_query(\"SELECT * FROM `\".$prefix.\"sait` WHERE `status` = \'1\' AND `ban` = \'0\' AND `hosts` > \'0\' AND `category` != \'19\'\");
if($all != 0){
$total = intval(($all-1)/$page_top)+1;
$page = abs(intval($_GET[\'page\']));
if($id or $id >= 1){
$result = mysql_query(\"SELECT `hosts` FROM `\".$prefix.\"sait` WHERE `id` = \'\".$id.\"\' AND `status` = \'1\' AND `ban` = \'0\' AND `hosts` > \'0\' AND `category` != \'19\' LIMIT 1;\"
$row = mysql_fetch_array($result);
$host_today = $row[\'hosts\'];
$topt = mysql_num_rows(mysql_query(\"SELECT * FROM `\".$prefix.\"sait` WHERE `status` = \'1\' AND `ban` = \'0\' AND `category` != \'19\' AND `hosts`>= \'\".$host_today.\"\' ORDER BY `hosts` DESC;\");
$page = ceil($topt/$page_top);
}
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\' AND `category` != \'19\' ORDER BY `hosts` DESC LIMIT \".$start.\",\".$page_top.\"\"
while($row = mysql_fetch_array($top)){
if($row[\'id\'] == $id){
$start++;
echo \'<div class=\"ico\"><b><font color=\"red\"><div class=\"topni\">\'.$start.\'. <a href=\"/out.php?id=\'.$row[\'id\'].\'\"><span class=\"site\"></font><font color=red>\'.$row[\'url\'].\'</b></font></span></a> <small><b>(\'.$row[\'hosts\'].\'/\'.$row[\'hits\'].\'</b>\';
//echo <b>($row[\'hits\'] > 999 ? round($row[\'hits\']/1000).\'К\' : $row[\'hits\'])</b>;
if($row[\'mem\'] == 0){
echo\'<b></b></small> <a href=\"/str/infos.php?id=\'.$row[\'id\'].\'\"><img src=\"/images/s.gif\" alt=\"?\"></a>\';}else{echo\'<b></b></small> <img src=\"/images/d.gif\" alt=\"*\">\';}
} else {
$start++;
echo \'<div class=\"ico\"><div class=\"topni\"><b><font color=\"red\">\'.$start.\'.</font> <a href=\"/out.php?id=\'.$row[\'id\'].\'\"><span class=\"site\">\'.$row[\'url\'].\'</b></span></a> <small><b>(\'.$row[\'hosts\'].\'/\'.$row[\'hits\'].\'</b>\';
//echo <b>($row[\'hits\'] > 999 ? round($row[\'hits\']/1000).\'К\' : $row[\'hits\'])</b>;
if($row[\'mem\'] == 0){
echo\'<b></b></small> <a href=\"/str/infos.php?id=\'.$row[\'id\'].\'\"><img src=\"/images/s.gif\" alt=\"?\"></a>\';}else{echo\'<b></b></small> <img src=\"/images/d.gif\" alt=\"*\">\';}}
echo\'<div class=\"info\">\'.$row[\'about\'].\'</div></div>\';
echo \'<div class=\"str\">Ушло на сайт: <b>\'.$row[\'out\'].\'</b><br/></div></div></div>\';
}
echo\'<div class=\"t\">За сегодня | <a href=\"/index2.php\">За вчера</a></div>\';
navigation($all,$page_top,$page,\'index.php?\',$total);
} else {
echo \'<div class=\"stat\">Сайтов в топе пока нет!</div>\';}
echo\'<div class=\"topik\">\';
if(!$user_data){echo\'<a href=\"/str/enter.php\">Войти</a> | <a href=\"/str/reg.php\">Регистрация</a><br>\';}else{
echo\'<a href=\"/str/office.php\"><b>\'.$user_data[\'login\'].\'</b></a> | <a href=\"/str/enter.php?act=exit\">Выход</a><br>\';}
echo \'<a href=\"/news/index.php\">Новости</a><br><a href=\"/str/statistika.php\">Статистика</a><br><a href=\"/str/ban.php\">Заблокированные</a><br></div>\';
echo \'<div class=\"footer\"><center><a href=\"http://vip-top.tk/go.php?id=1\"><img src=\"http://vip-top.tk/image.php?id=1\" alt=\"vip-top.tk\"/><a href=\"http://o-top.ru/go.php?id=235\"><img src=\"http://o-top.ru/image.php?id=235\" alt=\"O-top.ru Лучший топ\"/></a></center></div>\';
}
?>
А смысл?Я код не видел и видеть не хочу,там как обычно полный беспридел
Кинь в txt расширении индекс..я посмотрю, просто с телефона сейчас
воть, ну там ещё прийдётся go.php редачить, чтобы перекидывало на http://vip-top.tk/index.php?id=$id
но это просто)
while($row = mysql_fetch_array($top)){$start++;echo \'<tr class=\"tr2\"><td class=\"num bold left0\">\'.$start.\'</td>\';if($row[\'id\'] == $id){echo\'<td class=\"site\"><a href=\"/out.php?id=\'.$row[\'id\'].\'\"><font color=\"red\">\'.$row[\'url\'].\'</font></a>\';} else {echo\'<td class=\"site\"><a href=\"/out.php?id=\'.$row[\'id\'].\'\">\'.$row[\'url\'].\'</a>\';}
Вот чему равен $топ:
$top = mysql_query(\"SELECT * FROM `\".$prefix.\"sait` WHERE `status` = \'1\' AND `ban` = \'0\' AND `hosts` > \'0\' AND `category` != \'19\'ORDER BY `hosts` DESC LIMIT\".$start.\",20\"