示例#1
0
     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>&nbsp;' . $cur_template;
     } else {
         require_once 'templates/' . $cur_template . '/index.php';
         $mambothandler =& mosMambotHandler::getInstance();
         $mambothandler->loadBotGroup('system');
         $mambothandler->trigger('afterTemplate', array($configuration));
         echo "<!-- " . time() . " -->";
     }
示例#2
0
 /**
  * Render Mambo generated meta tags.
  *
  * @param string $keys - a key or array of keys in the meta tag array to render
  * @param string $exclue - a key or array of keys in the meta tag array to exclude
  */
 function showMeta($keys = '', $exclude = '')
 {
     if (!is_array($keys)) {
         if ($keys !== '' && !is_null($keys)) {
             $keys = array($keys);
         } else {
             $keys = array();
         }
     }
     if (!is_array($exclude)) {
         if ($exclude !== '') {
             $exclude = array($exclude);
         } else {
             $exclude = array();
         }
     }
     static $obj;
     if (!is_object($obj)) {
         $obj =& mosHtmlHelper::getInstance();
     }
     if (count($obj->_headTags) == 0) {
         $obj->loadHeadTags();
     }
     if (count($keys) == 0) {
         foreach ($obj->_headTags['meta'] as $key => $value) {
             if (!in_array($key, $exclude)) {
                 if (is_array($value)) {
                     foreach ($value as $key2 => $value2) {
                         if ($value2 !== '') {
                             $obj->render($value2);
                         }
                     }
                 } else {
                     if ($value2 !== '') {
                         $obj->render($value);
                     }
                 }
             }
         }
     } else {
         foreach ($keys as $key) {
             if (isset($obj->_headTags['meta'][$key])) {
                 if (is_array($obj->_headTags['meta'][$key])) {
                     foreach ($obj->_headTags['meta'][$key] as $key2 => $value2) {
                         if ($value2 !== '') {
                             $obj->render($value2);
                         }
                     }
                 } else {
                     if ($obj->_headTags['meta'][$key] !== '') {
                         $obj->render($obj->_headTags['meta'][$key]);
                     }
                 }
             }
         }
     }
 }