0?" where ".implode(" and ",$whereAry):""; $perpage=25; $p_no=empty($_GET["p"])?1:(int)$_GET["p"]; if(empty($p_no))$p_no=1; $limit=" limit ".($p_no-1)*$perpage.",".$perpage; $order=" order by pos asc,id desc "; $strSQL="select id,proname,model,mprice,price,wholeprice,isShowPrice,unit from [#TAB]product as a ".$where.$order.$limit; //echo $strSQL; $mysql->do_query($strSQL); $productAry=$imgid=array(); for($i=0;$i<$mysql->rownum;$i++){ $row=$mysql->do_fetch_row(1); $row["cut_name"]=cnSubStr($row["proname"],14,true); $productAry[]=$row; if(!in_array($row["id"],$imgid))$imgid[]=$row["id"]; } $smarty->assign("productAry",toErWeiAry($productAry,5)); include("./getimg.php"); $page=new Page($perpage,false); $page->css="newsPagelink"; $page->pageformat="%s"; $page->currentformat="%s"; $url_formate[] = '%s'; $page->is_rewrite = true; $page->url_formate = implode("-",$url_formate).".html"; $strSQL="select count(a.id) from [#TAB]product as a {$where}"; $page->setPageSQL($strSQL); $smarty->assign("page_html",$page->showPage($p_no,rebuild_query_string("p"),'p',true,true,2)); $smarty->assign("cat_name",$sortname); $smarty->assign("cfg_web_title",implode("_",array_reverse($header_title))); smarty_end($smarty,$tpl,$cacheId); include("./include/footer.php"); ?>