Файл: panel/referals.php
Строк: 65
<?php
/* DCMS Special
* Дата последнего редактирования 21.12.2015
* Модифицировал densnet
*/
foreach (array('start', 'compress', 'sess', 'settings', 'db_connect', 'ipua', 'fnc', 'adm_check', 'user') as $inc) {
require_once "../sys/inc/{$inc}.php";
}
access('adm_ref', null, 'index.php?' . SID);
adm_check();
$set['title'] = 'Рефералы';
require_once H . 'sys/inc/thead.php';
aut();
#Навигация
echo "<nav class='navbar navbar-light' style='background-color: #607D8B; color: #fff;'>";
echo "<ul class='nav navbar-nav'>";
echo "<li class='nav-item' style='margin-left: 1px;'><a class='nav-link' href='/'><i class='material-icons'>home</i></a></li>";
echo "<li class='nav-item' style='margin-left: 1px;'><a class='nav-link'><i class='material-icons'>keyboard_arrow_right</i></a></li>";
echo "<li class='nav-item' style='margin-left: 1px;'><a class='nav-link' href='/panel/'>Панель управления</a></li>";
echo "<li class='nav-item' style='margin-left: 1px;'><a class='nav-link'><i class='material-icons'>keyboard_arrow_right</i></a></li>";
echo "<li class='nav-item' style='margin-left: 1px;'><a class='nav-link' href='/panel/referals.php'>Рефералы</a></li>";
echo "</ul>";
echo "</nav>";
$k_post = mysql_result(mysql_query("SELECT COUNT(distinct(`url`)) FROM `user_ref`"), 0);
$k_page = k_page($k_post, $set['p_str']);
$page = page($k_page);
$start = $set['p_str'] * $page - $set['p_str'];
if ($k_post == 0) {
echo "<div class='list-group-item' style='margin-top: 5px;margin-bottom: 5px;'>n";
echo "<i class='material-icons'>feedback</i> Нет результатов";
echo "</div>";
}
$q = mysql_query("SELECT COUNT(`url`) AS `count`, MAX(`time`) AS `time`, `url` FROM `user_ref` GROUP BY `url` ORDER BY `count` DESC LIMIT $start, $set[p_str]");
while ($ref = mysql_fetch_assoc($q)) {
echo "<div class='list-group-item' style='margin-top: 5px;margin-bottom: 5px;'>n";
echo "URL: <a target='_blank' href='/go.php?go=" . base64_encode("http://$ref[url]") . "'>" . htmlentities($ref['url']) . "</a><br />n";
echo "Переходов: $ref[count]<br />";
echo "Последний: " . date::time($ref['time']);
echo "</div>";
}
if ($k_page > 1) {
echo "<div class='list-group-item'>";
str("?", $k_page, $page);
echo "</div>";
}
require_once H . 'sys/inc/tfoot.php';