{php}> global $xoopsDB,$xoopsModule; $modhandler = &xoops_gethandler('module'); $xoopsModule = &$modhandler->getByDirname("tad_themes"); $config_handler = & xoops_gethandler('config'); $xoopsModuleConfig = & $config_handler->getConfigsByCat(0, $xoopsModule->getVar('mid')); if($xoopsModuleConfig['auto_mainmenu']=="1"){ //匯入主選單 $sql = "select name,dirname from ".$xoopsDB->prefix("modules")." where isactive='1' and hasmain='1' and weight!=0 order by weight"; $result = $xoopsDB->query($sql); $option=""; while(list($name,$dirname)=$xoopsDB->fetchRow($result)){ $option.= "\t\t\t