Файл: panel/info.php
Строк: 39
<?php
$title = 'Пользователи';
include_once($_SERVER["DOCUMENT_ROOT"]."/inc/head.php");
if (isset($active) && $user['admin'] == 1) {
echo '<div class="title">'.$title.'</div>';
if (isset($_GET['del'])) {
if (mysql_num_rows(mysql_query("select (`id`) from `users` where `id`='".val($_GET['del'], 1)."'"))) {
if (isset($_POST['yes'])) {
mysql_query("delete from `users` where `id`='".val($_GET['del'], 1)."' limit 1");
header('Location: /adm/info');
}
elseif (isset($_POST['no'])) {
header('Location: /adm/info');
}
echo'<div class="menu">
<form action="" method="post"><input type="submit" name="yes" value="Удалить"/>
<input type="submit" name="no" value="Отмена"/></form></div>';
} else {
header('Location: /adm/info');
}
}
$k_post = mysql_result(mysql_query("select count(*) from `users` where `id`"),0);
$k_page = k_page($k_post, 10);
$page = page($k_page);
$start = 10 * $page - 10;
$sql = mysql_query("select * from `users` where `id` order by `id` desc limit ".$start.", 10");
if (mysql_num_rows($sql) == 0) {
echo '<div class="menu"><center>Записей еще нет!</center></div>';
} else {
while ($row = mysql_fetch_assoc($sql)) {
$ud = mysql_num_rows(mysql_query("select * from `u_click` where `idu` = '".$row['id']."'"));
echo'<div class="menu">* Login: '.utf($row['login']).' (<a href="?del='.$row['id'].'">Удалить</a>)<br/>';
if ($row['email']) {
echo '* E-mail: '.$row['email'].'<br>';
}
echo '* Кошелек: '.$row['wmr'].'<br>- Баланс: '.$row['money'].' руб.<br>- Сегодня переходов: '.$ud.'<br>- IP: '.$row['ip'].'<br>- UA: '.$row['ua'].'<br>';
if ($row['ref']) {
echo '- Referer: '.$row['ref'].'';
}
echo '</div>';
}
if ($k_page > 1) navigation('?', $k_page, $page);
}
echo '<div class="menu"><a href="/adm">Админ-панель</a></div>';
} else {
echo '<div class="menu"><center>Доступ запрещен!</center></div>';
}
include_once($_SERVER["DOCUMENT_ROOT"]."/inc/foot.php");
?>