Advertisement
Guest User

Untitled

a guest
May 28th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.52 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4.  *    Base 11 Studios Site
  5.  *
  6.  *  File: site.php
  7.  *  Contains startPage() and endPage()
  8.  *
  9.  */
  10.  
  11. class body
  12. {
  13.  
  14. function __construct($title="bong")
  15. {
  16.  
  17. $this->template = "../template/";
  18. if (!file_exists($this->template))
  19.     $this->template = "template/";
  20.  
  21. if ($title != "bong")
  22.     $this->display("header",$title);
  23. }
  24.  
  25.  
  26. function display($page, $title="No title specified")
  27. {
  28.     $header = file_get_contents($this->template.$page.".html");
  29.     echo preg_replace('/{PAGE_TITLE}/', $title, $header);
  30. }
  31.  
  32. }
  33. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement