View file pages/users.php

File size: 1.07Kb
<?php

$title='Пользователи';
require"../system/config.php";
require"../system/func.php";
require"../system/head.php";
require"../system/error.php";

echo'<div class="i">Пользователи<br></div>';
echo'<div class="p"><a href="admins.php">Пользователи</a></div>';


$total=mysql_result(mysql_query("SELECT COUNT(*) FROM `users`"),0);
 
 $page = abs((int)$_GET['page']);
 
 if($page < 0 || $page > $total) $page = 0;
 
 if ($total < $page + 10) $end = $total;
 else $end = $page + 10;
 $snews=mysql_query("SELECT `id_user`,`balls`,`dateregi` FROM `users` ORDER BY `id_user` DESC LIMIT $page,10");

if($total==0){
echo'<div class="p">
Пока нет пользователей...<br>
</div>';
}else{
while($news=mysql_fetch_array($snews)){
echo'<div class="p"> '.nik_one($news['id_user']).'<br>ID: '.$news['id_user'].'<br>Дата регистрации: '.date('d.m.y в H:i',$news['dateregi']).'<br>Баллов: '.$news['balls'].'</div>';
}

 strpage($page, 10, $total, 'users.php');

} require"../system/foot.php";
?>