<?php
@session_start();
require_once $_SERVER['DOCUMENT_ROOT']."/includes/start.php";
if(isset($_SESSION['auth']) and $_SESSION['auth']==1){
echo $_up;

echo '<b>Магазин:</b><br><br>';


if(isset($_GET['buy_ok'])){

echo '<center><b>Успешно!</b></center>';

}

$cat_q=mysql_query("SELECT * FROM `shop_cat`");
while($cat=mysql_fetch_array($cat_q)){

$num=mysql_num_rows(mysql_query("SELECT * FROM `shop` WHERE `cat`=$cat[id]"));
echo '<div class="list" style="border-bottom:1px solid white;"><a href="cat.php?id='.$cat['id'].'">'.$cat['name'].'</a> (<b>'.$num.'</b>)</div>';

}


echo '<br><br>';
echo '</div>'; echo $_down;

}else{

header ("Location: /?"); exit;

}
?>