prefix("tad_honor"); //撈取資料表內容的SQL語法 $sql="select * from {$tbl} order by `honor_date` desc"; //getPageBar($原sql語法, 每頁顯示幾筆資料, 最多顯示幾個頁數選項); $PageBar=getPageBar($sql, 10 , 10 ); $bar=$PageBar['bar']; $sql=$PageBar['sql']; $total=$PageBar['total']; //送到資料庫執行 $result = $xoopsDB->query($sql) or die(mysql_error()); //取回一筆資料 $i=1; $all_data=""; while($all=$xoopsDB->fetchArray($result)){ $all['honor_year']=$myts->htmlSpecialChars($all['honor_year']); $all['honor_date']=$myts->htmlSpecialChars($all['honor_date']); $all['honor_students']=$myts->htmlSpecialChars($all['honor_students']); $all['honor_descript']=$myts->htmlSpecialChars($all['honor_descript']); $all['honor_teachers']=$myts->htmlSpecialChars($all['honor_teachers']); $all['honor_note']=$myts->htmlSpecialChars($all['honor_note']); $all_data[$i]=$all; $i++; } //將資料陣列套到樣板檔 $xoopsTpl->assign('all_data' , $all_data); $xoopsTpl->assign('bar' , $bar); $xoopsTpl->assign('temp_title' , '榮譽榜一覽'); } ?> ```
進階搜尋
41人線上 (9人在瀏覽線上書籍)
會員: 0
訪客: 41