Advertisement
Guest User

modulo: pages.php

a guest
Aug 6th, 2013
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.76 KB | None | 0 0
  1. <?php
  2. /* * * * * * * * * * * * * * *
  3.  * Author: Carlos Rodrigues  *
  4.  * Version: 1.0              *
  5.  * Release: 7 July 2013      *
  6.  * Description: PAGE module. *
  7.  * * * * * * * * * * * * * * *
  8.  */
  9. class PAGE {
  10.     static public function EXISTS() {
  11.         if(!isset($_GET['p'])) {
  12.             return false;
  13.         }
  14.         if(!file_exists("system/pages/".strtolower($_GET['p']).".php") && !is_readable("system/pages/".strtolower($_GET['p']).".php")) {
  15.             return false;
  16.         }
  17.         return true;
  18.     }
  19.     static public function TOP() {
  20.         include("design/pages/top.php");
  21.         return true;
  22.     }
  23.     static public function FOOTER() {
  24.         include("design/pages/footer.php");
  25.         return true;
  26.     }
  27.     static public function BODY() {
  28.         include("system/pages/".strtolower($_GET['p']).".php");
  29.         return true;
  30.     }
  31. }
  32. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement