home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2007 April / PCpro_2007_04.ISO / files / dsl / NVinst.exe / Scripts / HTTP / 127.0.0.3 / ReloadCMS / index.php < prev    next >
Encoding:
PHP Script  |  2007-02-10  |  2.9 KB  |  59 lines

  1. <?php
  2. ////////////////////////////////////////////////////////////////////////////////
  3. //   Copyright (C) ReloadCMS Development Team                                 //
  4. //   http://reloadcms.sf.net                                                  //
  5. //                                                                            //
  6. //   This program is distributed in the hope that it will be useful,          //
  7. //   but WITHOUT ANY WARRANTY, without even the implied warranty of           //
  8. //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                     //
  9. //                                                                            //
  10. //   This product released under GNU General Public License v2                //
  11. ////////////////////////////////////////////////////////////////////////////////
  12.  
  13. ////////////////////////////////////////////////////////////////////////////////
  14. // Initializations                                                            //
  15. ////////////////////////////////////////////////////////////////////////////////
  16. define('RCMS_ROOT_PATH', './');
  17. require_once(RCMS_ROOT_PATH . 'common.php');
  18. $menu_points = parse_ini_file(CONFIG_PATH . 'menus.ini', true);
  19.  
  20. // Send main headers
  21. header('Last-Modified: ' . gmdate('r')); 
  22. header('Content-Type: text/html; charset=' . $system->config['encoding']);
  23. header("Cache-Control: no-store, no-cache, must-revalidate"); // HTTP/1.1 
  24. header("Pragma: no-cache");
  25.  
  26. // Loading main module
  27. $system->setCurrentPoint('__MAIN__');
  28. if(!empty($_GET['module'])) $module = basename($_GET['module']); else $module = 'index';
  29. if(!empty($system->modules['main'][$module])) include_once(MODULES_PATH . $module . '/index.php');
  30.  
  31. // Load menu modules
  32. include_once(CUR_SKIN_PATH . 'skin.php');
  33. if(!empty($menu_points)){
  34.        foreach($menu_points as $point => $menus){
  35.            $system->setCurrentPoint($point);
  36.            if(!empty($menus) && isset($skin['menu_point'][$point])){
  37.                foreach ($menus as $menu){
  38.                    if(substr($menu, 0, 4) == 'ucm:' && is_readable(DF_PATH . substr($menu, 4) . '.ucm')) {
  39.                        $file = file(DF_PATH . substr($menu, 4) . '.ucm');
  40.                        $title = preg_replace("/[\n\r]+/", '', $file[0]);
  41.                        $align = preg_replace("/[\n\r]+/", '', $file[1]);
  42.                        unset($file[0]);
  43.                        unset($file[1]);
  44.                        show_window($title, implode('', $file), $align);
  45.                    } elseif (!empty($system->modules['menu'][$menu])){
  46.                        $module = $menu;
  47.                        $module_dir = MODULES_PATH . $menu;
  48.                        require(MODULES_PATH . $menu . '/index.php');
  49.                    } else {
  50.                        show_window('', __('Module not found'), 'center');
  51.                    }
  52.                }
  53.            }
  54.        }
  55. }
  56.  
  57. // Start output
  58. require_once(CUR_SKIN_PATH . 'skin.general.php');
  59. ?>