daily pastebin goal
54%
SHARE
TWEET

Untitled

a guest Jun 19th, 2017 44 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3.     use Library\Pages\HTML;
  4.  
  5.     // Determine which page to load
  6.         $p = isset($_DATA["p"]) && $_DATA["p"] != "" ? $_DATA["p"] : "Main";
  7.  
  8.     // Strip trailing slashe on p (if it exists)
  9.         $len = strlen($p);
  10.  
  11.         if ($p{$len - 1} == "/")
  12.             $p = substr($p, 0, $len - 1);
  13.  
  14.     // Apply page templates to all non-main pages
  15.         if ($p == "Main") {
  16.             $page = new HTML("Pages/$p/$p.php");
  17.         } else {
  18.             $page = new HTML("Pages/$p/$p.php", "Templates/page.php");
  19.         }
  20.  
  21.     // Process page and output results
  22.         $page->Process();
  23.  
  24. ?>
RAW Paste Data
Top