Файл: groups/all_groups.php
Строк: 22
<?php
require_once '../incfiles/core.php';
require_once '../incfiles/func.php';
require_once '../incfiles/auth.php';
require_once '../incfiles/user.php';
$title = lang('Сообщества','Спільноти');
require_once '../incfiles/head.php';
echo '<div class="title">'.$title.'</div>';
$all = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `groups`"),0);
if ($all > 0)
{
$cp = ceil($all/10);
$p = (isset($_GET['p']) and is_numeric($_GET['p']) and $_GET['p']>1 and $_GET['p']<=$cp) ? $_GET['p'] : 1;
$start = $p*10-10;
$res = mysql_query("SELECT * FROM `groups` ORDER by `count_users` DESC LIMIT $start,10");
while ($array = mysql_fetch_array($res)) echo '<div class="block">'.group_name($array['id']).'</div>';
navi($p,$cp,'/groups/all_groups.php?');
}
require_once '../incfiles/foot.php';
?>