{if $xoops_isadmin}> <{/if}> <{$xoops_sitename}> <{$smarty.const.THEME_MODULE1}> <{php}> global $xoopsDB,$xoopsModule; $now_dir=isset($xoopsModule) && is_object($xoopsModule) ? $xoopsModule->getVar('dirname') : 'system'; $sql="select dirname,name from ".$xoopsDB->prefix("modules")." where isactive='1' and hasmain='1' and weight > 0 order by weight"; $result = $xoopsDB->query($sql) or redirect_header($_SERVER['PHP_SELF'],3, mysql_error()); while(list($dirname,$name)=$xoopsDB->fetchRow($result)){ $selected=($now_dir==$dirname)?"selected":""; echo "{$name}\n"; } <{/php}> <{if $xoops_isadmin}><{/if}>