Файл: groups/all_shops.php
Строк: 24
<?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` WHERE `count_shop` > 0 "),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` WHERE `count_shop` > 0 ORDER by `count_shop` DESC LIMIT $start,10");
while ($array = mysql_fetch_array($res)) echo '<div class="block">'.shop_name($array['id']).'</div>';
navi($p,$cp,'/groups/all_shops.php?');
}
require_once '../incfiles/foot.php';
?>