/** * @param string The position * @param int The style. 0=normal, 1=horiz, -1=no wrapper */ function mosLoadModules($position = 'left', $style = 0) { $handler =& mosModuleHandler::getInstance(); return $handler->mosLoadModules($position, $style); }
/** * @param object * @param object * @param int The menu item ID * @param int -1=show without wrapper and title, -2=x-mambo style */ function module2(&$module, &$params, $Itemid, $style = 0, $count = 0, $isBuffered = false) { global $mosConfig_live_site, $mosConfig_sitename, $mosConfig_lang; global $mainframe, $database, $my; $mosConfig_absolute_path = mamboCore::get('mosConfig_absolute_path'); $m_handler =& mosModuleHandler::getInstance(); $isBuffered = $m_handler->get('_isBuffered'); $moduleclass_sfx = $params->get('moduleclass_sfx'); $number = ''; if ($count > 0) { $number = '<span>' . $count . '</span> '; } if ($style == -3) { // allows for rounded corners echo "\n<div class=\"module{$moduleclass_sfx}\"><div><div><div>"; if ($module->showtitle != 0) { echo "<h3>{$module->title}</h3>\n"; } if ($isBuffered) { echo $module->buffer; } else { include $mosConfig_absolute_path . '/modules/' . $module->module . '.php'; } if (isset($content)) { echo $content; } echo "\n\n</div></div></div></div>\n"; } else { if ($style == -2) { // headder and content encapsulated with div tag ?> <div class="moduletable<?php echo $moduleclass_sfx; ?> "> <?php if ($module->showtitle != 0) { ?> <h1><?php echo $module->title; ?> </h1> <?php } if ($isBuffered) { echo $module->buffer; } else { include $mosConfig_absolute_path . '/modules/' . $module->module . '.php'; } if (isset($content)) { echo $content; } ?> </div> <?php } else { if ($style == -1) { // show a naked module - no wrapper and no title if ($isBuffered) { if (isset($module->buffer)) { echo $module->buffer; } else { include $mosConfig_absolute_path . '/modules/' . $module->module . '.php'; } } else { include $mosConfig_absolute_path . '/modules/' . $module->module . '.php'; } if (isset($content)) { echo $content; } } else { ?> <table cellpadding="0" cellspacing="0" class="moduletable<?php echo $moduleclass_sfx; ?> "> <?php if ($module->showtitle != 0) { ?> <tr> <th valign="top"> <?php echo $module->title; ?> </th> </tr> <?php } ?> <tr> <td> <?php if ($isBuffered) { echo $module->buffer; } else { include $mosConfig_absolute_path . '/modules/' . $module->module . '.php'; } if (isset($content)) { echo $content; } ?> </td> </tr> </table> <?php } } } }
$menuhandler =& mosMenuHandler::getInstance(); $ret = $menuhandler->menuCheck($Itemid, $option, $task, $my->getAccessGid()); $menuhandler->setPathway($Itemid); if ($ret) { require $path; } else { mosNotAuth(); } } else { header('HTTP/1.1 404 Not Found'); $mainframe->setPageTitle(T_('404 Error - page not found')); include $configuration->rootPath() . '/page404.php'; } $c_handler->endBuffer(); /** cache modules output**/ $m_handler =& mosModuleHandler::getInstance(); $m_handler->initBuffers(); /** load html helpers **/ $html =& mosHtmlHelper::getInstance(); $configuration->initGzip(); $configuration->standardHeaders(); if (mosGetParam($_GET, 'syndstyle', '') == 'yes') { mosMainBody(); } elseif ($indextype == 1) { // loads template file if (!file_exists('templates/' . $cur_template . '/index.php')) { echo '<span style="color:red; font-weight:bold;">' . T_('Template File Not Found! Looking for template') . '</span> ' . $cur_template; } else { require_once 'templates/' . $cur_template . '/index.php'; $mambothandler =& mosMambotHandler::getInstance(); $mambothandler->loadBotGroup('system');
function menutypes() { $modulehandler =& mosModuleHandler::getInstance(); $modMenus =& $modulehandler->getByName('mod_mainmenu', false, true); $menuhandler =& mosMenuHandler::getInstance(); $mtypes =& $menuhandler->getMenuTypes(); $menuTypes = array(); foreach ($mtypes as $type => $count) { $menuTypes[] = $type; } foreach ($modMenus as $modMenu) { mosMakeHtmlSafe($modMenu); $modParams = mosParseParams($modMenu->params); $menuType = @$modParams->menutype ? $modParams->menutype : 'mainmenu'; if (!in_array($menuType, $menuTypes)) { $menuTypes[] = $menuType; } } // sorts menutypes asort($menuTypes); return $menuTypes; }