function d3download_selected_order( $mydirname ) { $module_handler =& xoops_gethandler('module'); $config_handler =& xoops_gethandler('config'); $module =& $module_handler->getByDirname( $mydirname ); $mod_config =& $config_handler->getConfigsByCat( 0, $module->getVar( 'mid' ) ); $_GET = d3download_delete_nullbyte( $_GET ); if ( isset( $_GET['orderby'] ) ) $order = d3download_convertorderbyin( trim( $_GET['orderby'] ) ) ; elseif ( isset( $_POST['order_select'] ) ) $order = $_POST['order_select'] ; else $order = $mod_config['order'] ; return $order ; }
$xoops_isuser = true ; $xoops_userid = $xoopsUser->getVar('uid') ; $xoops_uname = $xoopsUser->getVar('uname') ; $module_handler =& xoops_gethandler( 'module' ) ; $module =& $module_handler->getByDirname( $mydirname ) ; $mid = $module->getVar('mid') ; $module_admin = $xoopsUser->isAdmin( $mid ) ; } else { $xoops_isuser = false ; $xoops_userid = 0 ; $xoops_uname = '' ; $module_admin = false ; } // DELETE NULLBYTE $_GET = d3download_delete_nullbyte( $_GET ); $orderby = d3download_selected_order( $mydirname ) ; $xoopsTpl->assign('lang_cursortedby', sprintf( _MD_D3DOWNLOADS_CURSORTBY, d3download_convertorderbytrans( $orderby ) ) ); $mydownload = new MyDownload( $mydirname ); // CID を取得した場合の処理 $cid = ( ! empty( $_GET['cid'] ) ) ? intval( $_GET['cid'] ) : 0 ; $select_intree = d3download_select_intree(); $intree = ( ! empty( $_GET['intree'] ) ) ? 1 : 0 ; $xoopsTpl->assign( 'select_id', $cid ) ; $xoopsTpl->assign( 'category_id', $cid ); $xoopsTpl->assign( 'select_intree' , $select_intree ) ; $xoopsTpl->assign( 'intree', $intree );