Файл: profi_wm/adm.php
Строк: 35
<?php
// ЛУЧШИЕ СКРИПТЫ ТОЛЬКО НА 4MAST.RU
// АВТОР Chainsaw
// ТОЛЬКО ЭКСКЛЮЗИВНЫЕ СКРИПТЫ
include 'system/core.php';
include 'system/header.php';
if(!$user['id']){
header('Location: /index.php/?m=guest'); exit;
}
echo '<div class="tegi"><b>Список администрации</b></div></div>';
echo '</div>';
switch($_GET['m']){
default:
//////////////////////////////////////////
$cop = 10;
$ca = mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` != 1 AND `id` != 2 AND `id` != 24"),0);
$cp = ceil($ca/$cop);
if(isset($_GET['p']) && is_numeric($_GET['p'])){
$p = $_GET['p'];
if($_GET['p']>$cp) $p = $cp;
if($_GET['p']<1)$p = 1;
}else{
$p = 1;
}
$start = $p*$cop-$cop;
$sort = trim($_GET['sort']);
if(empty($sort) or !is_numeric($sort) or $sort < 0 or $sort > 2){
$sort2 = 'id';
$sort = 0;
}elseif($sort == 1){
$sort2 = 'registration';
$desc = 'DESC';
}elseif($sort == 2){
$sort2 = 'rating';
$desc = 'DESC';
}
$users = mysql_query("SELECT * FROM `user` WHERE `status`=4 AND `id` != 1 AND `id` != 2 AND `id` != 24 ORDER BY `$sort2` $desc LIMIT $start,$cop");
echo '<div class="list1">';
while($users2 = mysql_fetch_assoc($users)){
echo ''.ustatus($users2['id']).' <a href="/us'.$users2['id'].'">'.uname($users2['id']).'</a> '.uaccess($users2['id']);
if(empty($sort)) echo ' (ID '.$users2['id'].')';
if($sort == 1) echo ' ('.times($users2['registration']).')';
elseif($sort == 2) echo ' ('.$users2['rating'].')';
echo '</div>';
}
////////////////////////////////////
$cop = 10;
$ca = mysql_result(mysql_query("SELECT COUNT(*) FROM `user`"),0);
$cp = ceil($ca/$cop);
if(isset($_GET['p']) && is_numeric($_GET['p'])){
$p = $_GET['p'];
if($_GET['p']>$cp) $p = $cp;
if($_GET['p']<1)$p = 1;
}else{
$p = 1;
}
$start = $p*$cop-$cop;
$sort = trim($_GET['sort']);
if(empty($sort) or !is_numeric($sort) or $sort < 0 or $sort > 2){
$sort2 = 'id';
$sort = 0;
}elseif($sort == 1){
$sort2 = 'registration';
$desc = 'DESC';
}elseif($sort == 2){
$sort2 = 'rating';
$desc = 'DESC';
}
$users = mysql_query("SELECT * FROM `user` WHERE (`status`=3) ORDER BY `$sort2` $desc LIMIT $start,$cop");
echo '<div class="list1">';
while($users2 = mysql_fetch_assoc($users)){
echo ''.ustatus($users2['id']).' <a href="/us'.$users2['id'].'">'.uname($users2['id']).'</a> '.uaccess($users2['id']);
if(empty($sort)) echo ' (ID '.$users2['id'].')';
if($sort == 1) echo ' ('.times($users2['registration']).')';
elseif($sort == 2) echo ' ('.$users2['rating'].')';
echo '</div>';
}
$cop = 10;
$ca = mysql_result(mysql_query("SELECT COUNT(*) FROM `user`"),0);
$cp = ceil($ca/$cop);
if(isset($_GET['p']) && is_numeric($_GET['p'])){
$p = $_GET['p'];
if($_GET['p']>$cp) $p = $cp;
if($_GET['p']<1)$p = 1;
}else{
$p = 1;
}
$start = $p*$cop-$cop;
$sort = trim($_GET['sort']);
if(empty($sort) or !is_numeric($sort) or $sort < 0 or $sort > 2){
$sort2 = 'id';
$sort = 0;
}elseif($sort == 1){
$sort2 = 'registration';
$desc = 'DESC';
}elseif($sort == 2){
$sort2 = 'rating';
$desc = 'DESC';
}
$users = mysql_query("SELECT * FROM `user` WHERE (`status`=2) ORDER BY `$sort2` $desc LIMIT $start,$cop");
echo '<div class="list1">';
while($users2 = mysql_fetch_assoc($users)){
echo ''.ustatus($users2['id']).' <a href="/us'.$users2['id'].'">'.uname($users2['id']).'</a> '.uaccess($users2['id']);
if(empty($sort)) echo ' (ID '.$users2['id'].')';
if($sort == 1) echo ' ('.times($users2['registration']).')';
elseif($sort == 2) echo ' ('.$users2['rating'].')';
echo '</div>';
}
$cop = 10;
$ca = mysql_result(mysql_query("SELECT COUNT(*) FROM `user`"),0);
$cp = ceil($ca/$cop);
if(isset($_GET['p']) && is_numeric($_GET['p'])){
$p = $_GET['p'];
if($_GET['p']>$cp) $p = $cp;
if($_GET['p']<1)$p = 1;
}else{
$p = 1;
}
$start = $p*$cop-$cop;
$sort = trim($_GET['sort']);
if(empty($sort) or !is_numeric($sort) or $sort < 0 or $sort > 2){
$sort2 = 'id';
$sort = 0;
}elseif($sort == 1){
$sort2 = 'registration';
$desc = 'DESC';
}elseif($sort == 2){
$sort2 = 'rating';
$desc = 'DESC';
}
$users = mysql_query("SELECT * FROM `user` WHERE (`status`=1) ORDER BY `$sort2` $desc LIMIT $start,$cop");
echo '<div class="list1">';
while($users2 = mysql_fetch_assoc($users)){
echo ''.ustatus($users2['id']).' <a href="/us'.$users2['id'].'">'.uname($users2['id']).'</a> '.uaccess($users2['id']);
if(empty($sort)) echo ' (ID '.$users2['id'].')';
if($sort == 1) echo ' ('.times($users2['registration']).')';
elseif($sort == 2) echo ' ('.$users2['rating'].')';
echo '</div>';
}
break;
}
echo '</div>';
include 'system/footer.php';
?>