Файл: wapxl.ru/top/site.php
Строк: 53
<?php
require '../shaxty.php';
$url = isset ($_REQUEST['url']) ? func::checkin($_REQUEST['url']) : false;
$site = core:: $db -> queryFetch("SELECT * FROM `sites` WHERE `url`=? LIMIT 1;", array($url));
if(!isset($site['id']))header('Location: /404.php');
$align = 'left';
$title = $site['name'];
$description = $site['abaut'];
$keywords = $site['key'];
include_once ('../shaxty/head.php');
$order = isset ($_REQUEST['order']) ? func::checkin($_REQUEST['order']) : '24';
$stat = isset ($_REQUEST['stat']) ? func::checkin($_REQUEST['stat']) : 'day';
// Определяем дату начала учета статистики
$datestart = core:: $db -> queryFetch("SELECT `date` FROM `top_count` WHERE `url`=? ORDER BY date asc LIMIT 1;", array($url));
$datestart = $datestart['date'];
echo '<div class="col-md-8 col-sm-12 col-xs-12"><div class="panel panel-default">';
echo '<div class="panel-heading"> <b>Статистика посещаемости сайта <a href="/cat/'.$site['url'].'">'.$site['url'].'</a></b>';
echo ' <div class="btn-group" style="float:right;"> ';
echo ' <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown"> ';
echo '
Выберите статистику <span class="caret"></span></button>
<ul class="dropdown-menu" role="menu">
<a href="?stat=day#stat"><div class="xl">посещаемость</div></a>
<a href="?stat=online#stat"><div class="xl">online </div></a>
<a href="?stat=returns#stat"><div class="xl">возвраты</div></a>
<a href="?stat=hits_pv#stat"><div class="xl">просм. на посетителя</div></a>
<br />
<a href="?stat=pages#stat"><div class="xl">страницы</div></a>
<a href="?stat=titles#stat"><div class="xl">заголовки страниц</div></a>
<a href="?stat=first_pages#stat"><div class="xl">точки входа</div></a>
<a href="?stat=last_pages#stat"><div class="xl">точки выхода</div></a>
<a href="?stat=ref_servers#stat"><div class="xl">переходы с сайтов</div></a>
<a href="?stat=referrers#stat"><div class="xl">переходы со страниц</div> </a>
<br />
<a href="?stat=countries#stat"><div class="xl">страны</div></a>
<a href="?stat=operator#stat"><div class="xl">операторы</div> </a>
<a href="?stat=browsers#stat"><div class="xl">браузеры</div></a>
<a href="?stat=oses#stat"><div class="xl">ОС</div> </a>
<a href="?stat=resolutions#stat"><div class="xl">разрешение экрана</div></a>
<a href="?stat=robots#stat"><div class="xl">поисковые боты</div></a>
</ul>
</div>
';
echo '</div><div class="panel-heading">';
if(!isset($datestart)){
echo '<br /><b>Статистика посещаемости данного сайта не учитывается.</b><br />
Если вы владелец данного сайта, разместите на нем <b><a href="code.php?url='.$url.'">код счетчика</a></b>.';
}else{
$arr = array('24-24 часа','7-7 дней','31-Месяц','all-Весь период');
foreach($arr as $v){
list ($o,$n) = explode('-',$v);
if($order!=$o)echo '<a href="?stat='.$stat.'&order='.$o.'">'.$n.'</a> | ';
else echo '<b>'.$n.'</b> | ';
}
echo '</div>';
echo '<a name="stat"></a>';
include_once (''.$stat.'/'.$order.'.php');
}
echo '<div class="panel-heading"> <b>Для владельца сайта:</b> <i style = "padding:10px;"> <a href="/cat/'.$url.'?edit">изменить описание сайта</a> </i> <i style = "padding:10px;"> <a href="/top/code.php?url='.$url.'">html-код счетчика</a> </i></div>';
echo '</div></div></div>';
include_once ('../shaxty/foot.php');
?>