<?
require_once("admin/config.php");
require_once("inc/meta.inc.php");

require_once ("inc/head.inc.php");
require_once ("inc/head_menu.inc.php");
echo "<br />
<table width=950 cellpadding=0 cellspacing=0 border=0 align=center>
<tr valign=top>
<td width=326>";

require_once ("inc/category.inc.php");
require_once ("inc/cart.inc.php");
require_once ("inc/razdely.inc.php");
require_once ("inc/new_items.inc.php");

echo "</td>
<td width=624>";

echo "<center><span class=\"bgray\">Карта сайта</center><br />";
echo "<a href=\"".$h."/\" title=\"На главную страницу сайта\"><span class=\"borange decor\">На главную страницу сайта</span></a><br />";
echo "<a href=\"".$h."/cart/\" title=\"Корзина покупателя\"><span class=\"borange decor\">Корзина покупателя</span></a><br />";

echo "<a href=\"".$h."/page/3/\" title=\"О компании\"><span class=\"borange decor\">О компании</span></a><br />";
echo "<a href=\"".$h."/page/4/\" title=\"Сервис\"><span class=\"borange decor\">Сервис</span></a><br />";
echo "<a href=\"".$h."/page/5/\" title=\"Контакты\"><span class=\"borange decor\">Контакты</span></a><br />";

echo "<br /><br /><span class=\"bgreen\">Информация</span><br />";
echo "<ul>";
$query = mysql_query ("SELECT id, title FROM jshop_page WHERE publick = 1 ORDER by title");
if (mysql_num_rows($query))
{
	while($list = mysql_fetch_assoc ($query)) echo "<li type=square><a href=\"".$h."/page/".$list['id']."/\" title=\"".$list['title']."\"><span class=\"borange decor\">".$list['title']."</span></a><br />";
}
echo "</ul>";

echo "<br /><span class=\"bgreen\">Каталог товаров</span><br />";
echo "<ul>";

	$categories = mysql_query("SELECT * FROM jshop_categories WHERE root_category = 0 ORDER by category_name");
	while($category = mysql_fetch_array($categories)) 
	{
		$sub = 1;
		$query = mysql_query("SELECT * FROM jshop_categories WHERE root_category = ". $category['id']);
		if(@mysql_num_rows($query) > 0) $root = 1;
		echo "<li type=square><a href=\"".$h."/cat/".$category['id']."/\" title=\"".$category['category_name']."\"><span class=\"borange decor\">".$category['category_name']."</span></a><br />";
		listsubcategory($category['id'], $sub);
	}
echo "</ul>";
	echo "</td>
  </tr>
</table>";

require_once ("inc/foot.inc.php");
echo "</body></html>";
?>
