Guest User

Untitled

a guest
Jun 25th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.94 KB | None | 0 0
  1. <?php
  2. /*--------------------------------------
  3. * leexoCMS - Content Managament System
  4. * Copyright (c) 2012 - Livar Shekhani
  5. *---------------------------------------
  6. * Compatible with PhoenixEmulator by
  7. * Sojobojo from RZ && DB
  8. * --------------------------------------
  9. * leexoCMS is licensed under the DBAD
  10. * license by Phil Sturgeon thus means
  11. * that you may NOT rename or sell it
  12. * for your own benifets, but you may
  13. * learn from it so please enjoy!
  14. *--------------------------------------*/
  15.  
  16. //Security Reasons
  17. if(!DEFINED('SECURITY')) { die ('Loading directly is forbidden!'); }
  18.  
  19. //Class Name
  20. class Application
  21. {
  22.     //Our Configuration Variable
  23.     var $Configuration;
  24.    
  25.     //Our Page Loading Variable
  26.     var $PageTime;
  27.    
  28.     //Class Constructor
  29.     function __Construct()
  30.     {
  31.         //Page Loading Time
  32.         $this->PageTime = microtime(true);
  33.        
  34.         //Getting our Configuration
  35.         $this->getConfig();
  36.     }
  37.    
  38.     //Getting our Configuration
  39.     function getConfig()
  40.     {
  41.         //Check if Our Configuration Exists
  42.         if(!file_exists('./includes/configuration.php'))
  43.         {
  44.             $this->ApplicationError('Configuration File does not exist!');
  45.         }
  46.        
  47.         //Include the Configuration
  48.         include './includes/configuration.php';
  49.        
  50.         //Set our Variables
  51.         $this->Configuration = $Configuration;
  52.     }
  53.    
  54.     //Our Error Function
  55.     function ApplicationError($error)
  56.     {
  57.         echo "<center><h1>leexoCMS - Lock-down!</h1>";
  58.         echo "$error<br>";
  59.         echo "Page took: ", microtime(true) - $this->PageTime, " seconds!";
  60.         echo "<br><br><i>Powered by leexoCMS - Copyright (c) 2012, Livar Shekhani</i>";
  61.         die();
  62.     }
  63.    
  64.     //Password Hasher
  65.     function PasswordHash($input)
  66.     {
  67.         return $this->Configuration['Password']['type']($input.$this->Configuration['Password']['hash']);
  68.     }
  69.    
  70. }
  71.  
  72. ?>
Add Comment
Please, Sign In to add comment