Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use Library\Pages\HTML;
- // Determine which page to load
- $p = isset($_DATA["p"]) && $_DATA["p"] != "" ? $_DATA["p"] : "Main";
- // Strip trailing slashe on p (if it exists)
- $len = strlen($p);
- if ($p{$len - 1} == "/")
- $p = substr($p, 0, $len - 1);
- // Apply page templates to all non-main pages
- if ($p == "Main") {
- $page = new HTML("Pages/$p/$p.php");
- } else {
- $page = new HTML("Pages/$p/$p.php", "Templates/page.php");
- }
- // Process page and output results
- $page->Process();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement