18-8
function.php
09 | if (! file_exists (XOOPS_ROOT_PATH. "/modules/tadtools/tad_function.php" )){ |
14 | include_once XOOPS_ROOT_PATH. "/modules/tadtools/tad_function.php" ; |
20 | global $xoopsTpl , $xoopsDB ; |
22 | $myts =& MyTextSanitizer::getInstance(); |
25 | $tbl = $xoopsDB ->prefix( "tad_honor" ); |
27 | $sql = "select * from {$tbl} order by `honor_date` desc" ; |
30 | $PageBar =getPageBar( $sql , 10 , 10 ); |
33 | $total = $PageBar [ 'total' ]; |
36 | $result = $xoopsDB ->query( $sql ) or die (mysql_error()); |
40 | while ( $all = $xoopsDB ->fetchArray( $result )){ |
42 | $all [ 'honor_year' ]= $myts ->htmlSpecialChars( $all [ 'honor_year' ]); |
43 | $all [ 'honor_date' ]= $myts ->htmlSpecialChars( $all [ 'honor_date' ]); |
44 | $all [ 'honor_students' ]= $myts ->htmlSpecialChars( $all [ 'honor_students' ]); |
45 | $all [ 'honor_descript' ]= $myts ->htmlSpecialChars( $all [ 'honor_descript' ]); |
46 | $all [ 'honor_teachers' ]= $myts ->htmlSpecialChars( $all [ 'honor_teachers' ]); |
47 | $all [ 'honor_note' ]= $myts ->htmlSpecialChars( $all [ 'honor_note' ]); |
54 | $xoopsTpl ->assign( 'all_data' , $all_data ); |
55 | $xoopsTpl ->assign( 'bar' , $bar ); |
56 | $xoopsTpl ->assign( 'temp_title' , '榮譽榜一覽' ); |