File size: 1.28Kb
<?php
include "init/config.php";
include "init/system.php";
include "init/navigator.php";
include "head.php";
$id = abs((int)$_SERVER['QUERY_STRING']);
if(!empty($id)){
$act = true;
}else{
$act = false;
}
echo "<div class='title'>ТОП 10</div>";
$sql = mysql_query("SELECT * FROM `cat_users` WHERE `in` > 0 ORDER BY `in` DESC LIMIT 0,11");
if(mysql_num_rows($sql) > 0){
$i = 1;
while($row = mysql_fetch_assoc($sql)){
$int = $i/ 2;
if(is_integer($int)){
$div = '<div class="cat">';
}else{
$div = '<div class="cat2">';
}
echo $div;
echo $i.".<a href='out.php?".$row['id']."'>".$row['name']."</a> <a href='stat.php?".$row['id']."'>[?]</a><br/>";
echo "<div class='dote'>На сайт:".$row['out']."<br/>";
echo "В каталог:".$row['in']."</div>";
echo "»<span class='site'>".$row['about']."</span><br/>";
if($sys_komsites != 1){
$komsites = mysql_query("SELECT * FROM `cat_komsites` WHERE `id_site` = '".$row['id']."'");
$komsites = mysql_num_rows($komsites);
echo "»<a href = 'kom_sites.php?".$row['id']."'>Комментарии</a>[".$komsites."]<br/>";
}
echo "</div>";
$i++;
}
}else{
echo "Популярных сайтов за сегодня не обнаружено!<br/>";
}
include "foot.php";
?>