Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once './system/init.php';
- require_once './system/customfunctions.php';
- $settings = parse_ini_file('./system/settings.ini', true);
- $ini = arrayToObject($settings);
- /**
- * Retrieve page content file based on GET request.
- *
- * This relies on the .htaccess file for the URL rewrite to properly rewrite
- * the URL. The rewrite rules look like this:
- * RewriteRule ^about/?$ index.php?page=about
- * RewriteRule ^([a-zA-Z_]+)/?$ /$1.php
- * # If this rule is used in htaccess, leave the "/" off of ^/(..
- * RewriteRule ^/([a-zA-Z_]+)/([\-a-zA-Z0-9_]+)/?$ /$1.php?page=$2
- *
- * The page files in the "include" directory that are called on are responsible for
- * serving the page's content, whether it is formed from database queries or written
- * as static text on a page as in the about page.
- *
- * HEREDOC syntax is used in the static pages to prevent pages from being directly
- * accessed since no content is displayed when called directly except for the 403
- * error.
- *
- * Meta tag "description" can also be defined in the page files, which will be used
- * to override the default page value defined in the settings.ini file.
- */
- if(isset($_GET['page']) && !empty($_GET['page']))
- {
- require_once './include/' . $_GET['page'] . '.php';
- }
- else
- {
- require_once './include/index.php';
- }
- ?>
- <?php require_once './include/header.php'; ?>
- <body>
- <div id="wrapper">
- <div id="title">
- <?php echo(isset($titlebar) ? $titlebar:''); // Defined in header.php file. ?>
- </div>
- <div id="menu">
- <?php
- require_once './include/menu.php';
- echo $menu;
- ?>
- </div>
- <div id="main">
- <?php
- if(isset($content)) { echo $content; }
- //if(isset($final)) { echo '<pre>' . $sqlb . '</pre>'; }
- ?>
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement