Файл: index.php
Строк: 70
<?php
session_start();
define('NTOP', 1);
$title = 'Главная';
require_once ('system/connect.php');
require_once ('system/core.php');
require_once ('system/function.php');
require_once ('system/head.php');
//require_once ('system/news.php');
//<!-- Main Content -->
echo'<div id="container" class="container main-container" data-spy="affix" data-offset-top="160">
<section role="main">
<header class="main-page-header">
<h1>Рейтинг сайтов</h1>
<div class="social-share">
<script type="text/javascript" src="//yastatic.net/es5-shims/0.0.2/es5-shims.min.js" charset="utf-8"></script>
<script type="text/javascript" src="//yastatic.net/share2/share.js" charset="utf-8"></script>
<div class="ya-share2" data-services="vkontakte,facebook,gplus,twitter" data-counter=""></div>
</div>
</header>';
$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++;
echo'
<section class="server-pr-cards">
<div class="row">
<article class="col-xs-12 user-pr-card">
<div class="row">
<div class="col-xs-1">
<div class="user-pr-card__num">'.$start.'</div>
</div>
<div class="col-xs-11">
<div class="user-pr-card__h"><a href="http://'.$set['home'].'/stats/'.$row['id'].'">'.$row['url'].'</a></div>
<div class="row">
<div class="col-md-7 col-sm-6 user-pr-card__banner">
<a href="http://'.$set['home'].'/stats/'.$row['id'].'"><img src="http://mini.s-shot.ru/468x90/468/png/?'.$row['url'].'" alt="" class="img-responsive"></a>
</div>
<div class="col-md-5 col-sm-6 user-pr-card__info">
<div class="user-pr-card__rt"><div class="user-pr-card__rt-inner"><span>СТАТА</span><span class="user-pr-card__rt-qty">'.$row['hosts'].' / '.$row['hits'].'</span></div></div>
<div class="server-rt-card__btn"><a href="http://'.$set['home'].'/stats/'.$row['id'].'" class="btn btn-info btn-vote">ПЕРЕЙТИ</a></div>
</div>
</div>
</div>
</div>
</article>
</div>
</section>';
}
navigation($all,$page_top,$page,'/',$total);
}else{
echo'
<section class="server-pr-cards">
<div class="row">
<article class="col-xs-12 user-pr-card">
<div class="row">
<div class="col-xs-1">
<div class="user-pr-card__num">-</div>
</div>
<div class="col-xs-11">
<div class="user-pr-card__h">Няма :(</div>
<div class="row">
<div class="col-md-5 col-sm-6 user-pr-card__info">
<div class="user-pr-card__rt"><div class="user-pr-card__rt-inner"><span>СТАТА</span><span class="user-pr-card__rt-qty">- / -</span></div></div>
</div>
</div>
</div>
</div>
</article>
</div>
</section>
';
}
echo'</div>';
require_once ('modules/foot.php');
?>