Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Ralfs Sterns [WT] 2012
- SEPARATED PHP DATA
- index.php
- */
- class install {
- # Define Main Settings
- var $html_root = 'html'; # Direcotry of the HTML files
- var $html_header = '/includes/header.html'; # Name of the Header file
- var $html_footer = '/includes/footer.html'; # Name of the Footer file
- var $cfg_website = '/config/website.cfg';
- # Define Incldues
- var $inc_main_core = '/includes/main_core.inc.php'; # Main Functions
- # Prepate pre-defined variables
- function vars($vars) {
- if($vars) {
- foreach ($vars as $key => $new_var) {
- define($key, $new_var);
- }
- }
- }
- # Install the Page
- function install_page($title, $page) {
- global $cfg_website;
- install::install_header();
- require($this -> html_root . "/" . $page);
- install::install_footer();
- }
- # Page Header with Includes
- function install_header() {
- # Main Includes
- require($this -> cfg_website);
- require($this -> inc_main_core);
- require($this -> html_root . "/" . $this -> html_header);
- }
- # Page Footer
- function install_footer() {
- require($this -> html_root . "/" . $this -> html_footer);
- }
- }
- ?>
Add Comment
Please, Sign In to add comment