Файл: 4mast/profmas.ru/modules/adms.php
Строк: 19
<?php
require_once('../includes/Headers.php');
require_once('../includes/PDO_func.php');
if($us['id'] == false){
header('location: /login/auth');
exit;
}
switch ( $_GET[ 'i' ] ) {
default:
H( 'Администрация', 'Администрация' );
$query = DB :: $dbs -> query ("SELECT * FROM `us` WHERE (`level`>'0')");
while ($us = $query -> fetch ()) {
echo '<a href="/us'.$us['id'].'"/><div class="block">'.Nick($us['id']).'</a></div>';
}
break;
case 'strict':
H( '', '' );
$array = DB::$dbs->query( "SELECT DISTINCT `kem`, COUNT(`kem`) AS PostCount FROM `nar` GROUP BY `kem` ORDER BY PostCount DESC LIMIT 10" );
while ( $arr = $array->fetch() ) {
$strict0 = DB::$dbs->querySingle( "SELECT count(*) FROM `nar` WHERE `kem` = '" . $arr[ 'kem' ] . "'");
$strict1 = DB::$dbs->querySingle( "SELECT count(*) FROM `ban` WHERE `kem` = '" . $arr[ 'kem' ] . "'");
$stricts = $strict0 + $strict1;
echo '<div class="block"> ' . Nick( $arr[ 'kem' ] ) . ' (в.н.: ' . $stricts . ')</div>';
}
break;
}
require_once('../includes/Footers.php');
?>