16-4
上課範例:include/notification.inc.php
02 | if (!defined( 'XOOPS_ROOT_PATH' )) { |
03 | die ( "XOOPS root path not defined" ); |
06 | function get_tad_note( $category , $item_id ) |
08 | if ( $category == 'global' ) { |
15 | if ( $category == 'cate' ) { |
16 | $sql = 'SELECT cate_title FROM ' . $xoopsDB ->prefix( 'tad_note_cate' ) . ' WHERE cate_sn = ' . $item_id ; |
17 | $result = $xoopsDB ->query( $sql ); |
18 | $result_array = $xoopsDB ->fetchArray( $result ); |
19 | $item [ 'name' ] = $result_array [ 'cate_title' ]; |
20 | $item [ 'url' ] = XOOPS_URL . '/modules/tad_note/index.php?cate_sn=' . $item_id ; |