Guest User

Untitled

a guest
Jun 23rd, 2018
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.21 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4.     Ralfs Sterns [WT] 2012
  5.     SEPARATED PHP DATA
  6.     index.php
  7. */
  8.  
  9.  
  10. class install {
  11.    
  12.     # Define Main Settings
  13.    
  14.     var $html_root   = 'html'; # Direcotry of the HTML files
  15.     var $html_header = '/includes/header.html'; # Name of the Header file
  16.     var $html_footer = '/includes/footer.html'; # Name of the Footer file
  17.    
  18.     var $cfg_website = '/config/website.cfg';
  19.    
  20.     # Define Incldues
  21.    
  22.     var $inc_main_core = '/includes/main_core.inc.php'; # Main Functions
  23.  
  24.  
  25.     # Prepate pre-defined variables
  26.    
  27.     function vars($vars) {
  28.    
  29.         if($vars) {
  30.        
  31.             foreach ($vars as $key => $new_var) {
  32.            
  33.                 define($key, $new_var);
  34.             }
  35.         }
  36.     }  
  37.    
  38.    
  39.     # Install the Page
  40.    
  41.     function install_page($title, $page) {
  42.  
  43.         global $cfg_website;
  44.        
  45.  
  46.        
  47.         install::install_header();
  48.  
  49.         require($this -> html_root . "/" . $page);
  50.         install::install_footer();
  51.  
  52.     }
  53.    
  54.    
  55.     # Page Header with Includes
  56.    
  57.     function install_header() {
  58.  
  59.         # Main Includes
  60.        
  61.         require($this -> cfg_website);
  62.         require($this -> inc_main_core);
  63.        
  64.         require($this -> html_root . "/" . $this -> html_header);
  65.     }
  66.  
  67.    
  68.     # Page Footer
  69.    
  70.     function install_footer() {
  71.    
  72.         require($this -> html_root . "/" . $this -> html_footer);
  73.     }
  74.  
  75. }
  76.  
  77. ?>
Add Comment
Please, Sign In to add comment