View file forum/users.php

File size: 1.66Kb
<?php
##################################
#           users.php            #
##################################
#   Форум на MySQL               #
#Афтар : Morgan                  #
#ICQ : 530-648                   #
#Email : [email protected]           #
##################################
 require_once 'includes/start.php';
 require_once 'includes/functions.php';
 require_once 'includes/db.php';
 require_once 'includes/avt.php';
 require_once 'includes/other.php';
 require_once 'includes/head.php';

if(isset($_GET['page']))
{$page = $_GET['page'];}
else{$page=1;}
$p_str = $page*$on_page-$on_page;

echo '</div><div class="main">
Юзеры
</div><div class="fon">
Сортировать по: <a href="users.php?sort=nick">нику</a>,<a href="users.php?sort=post">постам</a>,<a href="users.php?sort=was">дате авторизации</a><br />
<br />
';
if($_GET['sort']=='nick' or $_GET['sort']=='post' or $_GET['sort']=='was')
{
switch($_GET['sort']) {
case 'nick': $sort = 'login'; break;
case  'post': $sort = 'posts'; break;
case 'was': $sort = 'was'; break;
}
$userof = mysql_num_rows(mysql_query('SELECT login,posts FROM `users`'));
$user = mysql_query('SELECT login,posts,id,was FROM `users` ORDER BY '.$sort.' DESC LIMIT '.$p_str.','.$on_page.'');
while($f= mysql_fetch_array($user))
{



echo '&raquo;<a href="user.php?id='.$f['id'].'"><b>'.illuminate($f['id']).'</b></a>['.$f['posts'].']'.online($f['id']).'<br />
';

}
}



echo '</div><br />
';


 require_once 'includes/foot.php';
##################################
#      © Все права защищены      #
##################################
?>