<?php
include "../CheckUser.php";
include_once("../comm/db_sql.php");
include_once("../comm/config.php");
include_once("../comm/connect.php");
include_once("../comm/Function.php");
include_once("Function.php");
include_once("../../Smarty/Smarty.class.php");

$page_show = new Smarty(); 
$page_show->template_dir = "./template";
$page_show->compile_dir = "./templates_c"; 
$page_show->left_delimiter = "<{";      
$page_show->right_delimiter = "}>";

$page=intval($_GET['page']);
if (!empty($page)){
	$page=$page;
}else
{	
	$page="1";
}
//查询
//小类产品查询
$channel=trim(intval($_GET['channel']));
$sub_category=trim(intval($_GET['sub_category']));
$category=trim(intval($_GET['category']));
$page_show->assign("channel", $channel);
if (!empty($sub_category))
	{
		//调用子类查询
		$info_record_page=info_query_page_sub_category($db,$page,$channel,$sub_category);
		$page_show->assign("sub_category", $sub_category);
		
	}else
if (!empty($category))
	{
		$info_record_page=info_query_page_big_category($db,$page,$channel,$category);
		//调用大类查询
		$page_show->assign("category", $category);
	}else
	{
		//默认查询
		$info_record_page=info_query_page($db,$page);
	}
$page_show->assign("page", $page);
$page_show->assign("prepage", $prepage);
$page_show->assign("nextpage", $nextpage);
$page_show->assign("pages", $pages);
$page_show->assign("rows_count", $rows_count);

$page_show->assign("info_record_array", $info_record_page);

//数组:子类
$category_record=sub_category_query_all($db);
$page_show->assign("category_record_array", $category_record);

//专题:
$category_record_zt=channel_query_category_zt($db);
$page_show->assign("category_record_zt_array", $category_record_zt);

//大类,独立大类
$category_record_all_no=category_query_all_no($db);
$page_show->assign("category_record_all_no_array", $category_record_all_no);

$page_show->display("manager_info.html"); 
?>