Файл: top_reit/rustats.su/system/view/category/sites.tpl
Строк: 18
<?php
$all = Core::count("SELECT COUNT(*) FROM `user_sites` WHERE
`category` = ? && `ban` = '0' && `mod` = '0' &&
`host` > '0'", array($_GET['get']));
if($all > 0){
$Navig = new
Navig($all);
$start = $Navig -> start;
$pages =
10;
if(isset($_GET['p']) && $_GET['p']!=0){
$num =
$_GET['p']*$pages-($pages-1);
}else{
$num = 1 ;
}
$q =
Core::query("SELECT * FROM `user_sites` WHERE `category` = ?
&& `ban` = '0' && `mod` = '0' && `host` > '0'
ORDER BY `host` DESC LIMIT $start, $pages",
array($_GET['get']));
while($post = $q -> fetch()){
echo '<div
class="h5"><b>'.$num.'</b> <img
src="http://www.google.com/s2/favicons?domain='.Protect::title($post['url']).'">
<a target="_blank"
href=http://newstats.ru/out?get='.$post['id'].'>'.Protect::title($post['title']).'</a>
['.$post['host'].' | '.$post['hit'].'] <a
href="/stat/index/'.$post['id'].'"><span
style="float:right;"><img
src=/style/images/s.png></span></a></div>';
$num =
++$num;
}
$Navig -> str('?');
}else{
echo '<div
class="h1">Активных сайтов не
найдено</div>';
}
?>