File size: 1.37Kb
<?php
include 'inc/db.php';
include 'inc/1.php';
function hc($in){
return htmlspecialchars($in);
}
echo "<div class='t2'>Администрация</div>";
if (!$_GET['p'])$_GET['p']=1;
$p=intval($_GET['p']);
$start=($p*15-15);
$q1=(mysql_num_rows(mysql_query("SELECT `id` FROM `user` WHERE `admin` = '1'"))/15);
$q2=round(mysql_num_rows(mysql_query("SELECT * FROM `user` WHERE `admin` = '1'"))/15);
if ($q1>$q2)$pages=($q2+1);
else
$pages=$q2;
$q=mysql_query("SELECT * FROM `user` WHERE `admin` = '1' LIMIT $start, 15");
$i=1;
while ($f=mysql_fetch_assoc($q)){
echo "<div class='p".($i%2)."'>".im($f['id'])." <a href='ank.php?id=$f[id]'>".hc($f['name'])."</a>".on($f['id'])."</div>";
$i++;
}
pages($pages, $p, "?p");
echo "<div class='t2'>Модерация</div>";
if (!$_GET['p1'])$_GET['p1']=1;
$p=intval($_GET['p1']);
$start=($p*15-15);
$q1=(mysql_num_rows(mysql_query("SELECT `id` FROM `user` WHERE `moder` = '1'"))/15);
$q2=round(mysql_num_rows(mysql_query("SELECT * FROM `user` WHERE `moder` = '1'"))/15);
if ($q1>$q2)$pages=($q2+1);
else
$pages=$q2;
$q=mysql_query("SELECT * FROM `user` WHERE `moder` = '1' LIMIT $start, 15");
$i=1;
while ($f=mysql_fetch_assoc($q)){
echo "<div class='p".($i%2)."'>".im($f['id'])." <a href='ank.php?id=$f[id]'>".hc($f['name'])."</a>".on($f['id'])."</div>";
$i++;
}
pages($pages, $p, "?p1");
include_once 'inc/foot.php';
?>