0){ $pid=$pid; }else{ //default pid $m=get_db_msg("select * from ".$table_pre."path where module='products' and cate='path' and deep=1 order by ord limit 0,1"); $pid=$m[id]; } //category $content_cate=""; $q="select * from ".$table_pre."path where module='products' and cate='path' and deep=1 order by ord"; $r=$db->query($q); $i=0; while($m=$db->fetch_array($r)){ if($pid==$m[id]){ $content_cate.=" ".$m[title].""; }else{ $content_cate.=" ".$m[title].""; } $i++; } //---------------------------products // $content=""; $page_size=$page_size?$page_size:"10"; $offset=$offset?$offset:"0"; $order=$order?$order:"add_date!"; $sql_con=" top<>'z' and "; if($pid){ $tmp=get_db_msg("select * from ".$table_pre."path where id='".$pid."'"); $path=$tmp[path]."-".$pid; $sql_con.=" (path='".$path."' or path like '".$path."-%') and "; } if($keyword){ $sql_con.=" (title like '%".$keyword."%') and "; } if($sql_con) $sql_con="where ".substr($sql_con,0,-4); $sql_order=str_replace("!"," desc",$order); $query="select count(*) 'total' from ".$table_pre."products ".$sql_con; $res=$db->query($query); $msg=$db->fetch_array($res); $total=$msg[total]; //page class $p=new page; $p->offset=$offset; $p->total=$total; $p->page_size=$page_size; $p->show_page_num=11; $p->path=$_SERVER[PHP_SELF]; $p->arr_var=array("keyword"=>$keyword,"pid"=>$pid); $p->style=""; $page_state=$p->show(); $content.=""; $count_first=$offset; $query="select * from ".$table_pre."products ".$sql_con."order by top,add_date desc limit ".$count_first.",".$page_size; //echo $query."
"; $res=$db->query($query); $count=0; while($msg=$db->fetch_array($res)){ $list=$count+$pagesize+1; if($msg[picture]) $img="".out_good_pic("./attachments/products/mini/".$msg[picture],160,120).""; else $img=""; $content.=""; $count++; } if($count==0) $content.=""; $content.="
 
".$img."
".$msg[title]."
".$msg[overview]."
 
 
No records!
"; ?> Products - <? echo translate("index_title"); ?>
 
²»Ö§³Öflash
 
   
 
 Home - Products
Products
 
 
Contact us