Файл: index.php
Строк: 83
<?php
define('MTOP', 1);
require_once ('system/connect.php');
require_once ('system/core.php');
require_once ('system/function.php');
require_once ('head.php');
echo '<table class="orange" width="100%" style="padding: 2px;"><tr><td><center><b>Топ-100</b></center></td> <td><a href="/m/category"><font color="white"><center>Категории</center></font></a></td> <td><a href="/gold.php"><font color="white"><center>GOLD сайты</center></font></a></td></tr></table>';
$gold = mysql_query('SELECT * FROM `sait` WHERE `status` = "1" AND `ban` = "0" AND `gold` > "'.time().'" ORDER BY RAND() LIMIT 2');
while($row=mysql_fetch_array($gold)){
echo '<div class="lt"><small><b><font color="#CE0025">G</font><font color="#8A006F">O</font><font color="#4600B9">L</font><font color="#2400DE">D</font></b></small> <a href="/out.php?id='.$row['id'].'" rel="nofollow" target="_blank" title="Посетить wap сайт '.$row['url'].'"><b>'.$row['url'].'</b></a><br/>'.$row['about'].'<br/></div>';
}
$page_top = $set['page_top'];
$all = mysql_num_rows(mysql_query("SELECT * FROM `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 `sait` WHERE `status` = '1' AND `ban` = '0' AND `hosts` > '0' ORDER BY `hosts` DESC LIMIT ".$start.",".$page_top."");
echo '<table style="background: #ECEBE7;" width="100%">';
while($row = mysql_fetch_array($top)){
if($row['category'] != 4 AND $row['category'] != 14) {
$start++;
if($row['id'] == $_GET['id_site']) {
$red = '<font color="red">'.$row['url'].'</font>';
} else {
$red = $row['url'];
}
echo '<tr><td class="lt" width="10px"><div class="number_top"><center>'.$start.'</center></div></td><td class="lt"> <a href="/out.php?id='.$row['id'].'" rel="nofollow" target="_blank" title="Посетить wap сайт '.$row['url'].'"><b>'.$red.'</b></span></a> <font color="green">'.$row['hosts'].'</font> / <font color="red">'.$row['hits'].'</font> <a href="/stats/'.$row['id'].'"><img src="/style/img/ico-stat.png" alt="yamus" title="Статистика сайта"></a><br/>';
if(mb_strlen($row['about']) > 65){
$text = mb_substr($row['about'], 0, 65, 'utf-8');
echo ''.$text.'..';
}
else
{
echo ''.$row['about'].'';
}
}
}
echo '<br/></td></tr>';
echo '</table>';
echo '<div class="lt"><center><a rel="nofollow" href="/randsite.php" target="_blank"> <img src="/style/img/ico-cube.png" alt="yamus"> Случайный сайт </a> — Накликай удачу!</center></div>';
navigation($all,$page_top,$page,'index.php?sort='.$sort.'&',$total);
}
else
{
echo '<div class="main">Сайтов в TOP-100 не обнаружено!</div>';
}
echo '<div class="orange"><a href="/m/global_stat.php"><font color="white"><b>Статистика рейтинга</b></font></a></div>';
echo '<div class="lt">
<div style="float: right;margin-bottom: 5px;"><small><b><font color="#CE0025">G</font><font color="#8A006F">O</font><font color="#4600B9">L</font><font color="#2400DE">D</font></b></small></div>';
$gol = mysql_query('SELECT * FROM `sait` WHERE `status` = "1" AND `ban` = "0" AND `gold` > "'.time().'" ORDER BY "gold" ');
while($row=mysql_fetch_array($gol)){
echo '<img src="http://www.google.com/s2/favicons?domain='.$row['url'].'" width="15" height="15"/> <a href="/out.php?id='.$row['id'].'" rel="nofollow" target="_blank" title="Посетить wap сайт '.$row['url'].'">'.$row['url'].'</a><br />';
}
echo '</div>';
require_once ('foot.php');
?>