Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Includes
- require_once(dirname(__FILE__)."/template.php"); // Templating System
- require_once(dirname(__FILE__)."/session.php"); // Variable System
- require_once(dirname(__FILE__)."/database.php"); // Database System
- class Site
- {
- private $class_vars;
- public $db;
- public $tpl;
- public $session;
- function __construct()
- {
- $this->db = new Database;
- $this->session = new Session;
- $this->tpl = new Template;
- }
- function directory_array()
- {
- $dir_ra = array();
- foreach(explode("/",$_SERVER["REQUEST_URI"]) as $dir)
- {
- if(trim($dir)) { $dir_ra[] = $dir; }
- }
- return $dir_ra;
- }
- function __set($var,$val) { $this->class_vars[$var] = $val; }
- function &__get($var) { return $this->class_vars[$var]; }
- }
Add Comment
Please, Sign In to add comment