#----請插入在$sql 與 $result 之間 include_once WEB_PATH."/class/PageBar.php"; $pageCount = 10; $pageList = 10; $PageBar = getPageBar($db, $sql, $pageCount, $pageList); $bar = $PageBar['bar']; $sql = $PageBar['sql']; $total = $PageBar['total']; $bar = ($total > $pageCount) ?$bar:""; $smarty->assign("bar", $bar);//送至樣板 #--------------------------------------------------------- ``` 1. 樣板:<{$bar}>