getAll("select id,title,categoryId from albums where categoryId=(select categoryId from albums where id=$id) order by orders desc"); for($i=0;$iassign("ptitle",'各館介紹'); } else{ $smarty->assign("ptitle",'園區實景'); } $smarty->assign("cate",$cate); $intro=$fb_db->getOne("select * from ".$table['album']." where id='".$id."'"); $pagesize=12; $page=($_GET['page']>0) ? $_GET['page']:1; $start=$pagesize*($page-1); $result=$fb_db->getOne("select count(*) as num from products where albumId='".$id."' and enabled='1' "); $resultNum = $result['num']; $pageNum = ceil($resultNum/$pagesize); $ipro=$fb_db->getAll("select * from products where albumId='".$id."' and enabled='1' order by orders desc limit $start,$pagesize"); require("page.php"); $smarty->assign("page",$page); $smarty->assign('page_count',$pageNum); } $smarty->assign("id",$id); $smarty->assign("intro",$intro); $smarty->assign("ipro",$ipro); $smarty->assign("mainfile","intro.html"); $smarty->display("frame.html");