Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 17th, 2012  |  syntax: PHP  |  size: 2.69 KB  |  hits: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.  
  3. /*
  4.  
  5. ___.                                        
  6. \_ |__   _____ _____    ____   _____   ______
  7.  | __ \ /     \\__  \ _/ ___\ /     \ /  ___/
  8.  | \_\ \  Y Y  \/ __ \\  \___|  Y Y  \\___ \
  9.  |___  /__|_|  (____  /\___  >__|_|  /____  >
  10.      \/      \/     \/     \/      \/     \/
  11.      
  12. Free and lightweight Habbo CMS
  13. Developed by Nathan, Connor and Harrison
  14.  
  15. */
  16.  
  17. /**
  18.  *
  19.  * This is where everything is initiated. You shouldn't need to touch anything here.
  20.  *
  21.  */
  22.  
  23.     /**
  24.      *
  25.      * This part is for development purposes.
  26.      *
  27.      */
  28.      
  29.     if($_SERVER['REMOTE_ADDR'] != "86.11.40.76" && $_SERVER['REMOTE_ADDR'] != "77.96.62.154" && $_SERVER['REMOTE_ADDR'] != "2.25.120.223" && $_SERVER['REMOTE_ADDR'] != "81.174.150.65")
  30.     {
  31.         header('Location: http://fustigate.info/403.shtml');
  32.     }
  33.  
  34.     /**
  35.      *
  36.      * Error reporting..
  37.      *
  38.      */
  39.      
  40.     //error_reporting(E_ALL);
  41.    
  42.     /**
  43.      *
  44.      * Lets throw in a few variables here..
  45.      *
  46.      */
  47.      
  48.     define("SEP", DIRECTORY_SEPARATOR);
  49.     define("INCLUDES", "includes/");
  50.     define("THEMES", "themes/");
  51.     define("CONFIGURATION", "configuration/");
  52.     define("SMARTY", "smarty/");
  53.  
  54.     /**
  55.      *
  56.      * Require the classes..
  57.      *
  58.      */
  59.      
  60.     require_once INCLUDES . "Functions.class.php";
  61.     require_once INCLUDES . "Users.class.php";
  62.     require_once INCLUDES . "Database.class.php";
  63.     require_once INCLUDES . "Permissions.class.php";
  64.     require_once INCLUDES . "Template.class.php";
  65.    
  66.     /**
  67.      *
  68.      * Require the configuration
  69.      *
  70.      */
  71.      
  72.     require_once INCLUDES . CONFIGURATION . "template_config.php";
  73.     require_once INCLUDES . CONFIGURATION . "system_config.php";
  74.  
  75.     /**
  76.      *
  77.      * The OOP
  78.      *
  79.      */
  80.      
  81.     $functions = new Functions();
  82.     $users = new Users();
  83.     $database = new Database();
  84.     $permissions = new Permissions();
  85.     $register = new Register();
  86.     $template = new Template();
  87.  
  88.     /**
  89.      *
  90.      * Connect to the database
  91.      *
  92.      */
  93.      
  94.     $database->connect($config['MySQL']['host'], $config['MySQL']['user'], $config['MySQL']['password'], $config['MySQL']['database']);
  95.  
  96.     /**
  97.      *
  98.      * Initiate the session
  99.      *
  100.      */
  101.      
  102.     session_start();
  103.    
  104.     /**
  105.      *
  106.      * Smarty!!111
  107.      *
  108.      */
  109.      
  110.     require_once INCLUDES . SMARTY . "Smarty.class.php";
  111.      
  112.     $smarty = new Smarty();
  113.  
  114.     $smarty->setTemplateDir(THEMES . $config['Template']['theme']);
  115.     $smarty->setCompileDir(INCLUDES . SMARTY . "templates_c");
  116.     $smarty->setCacheDir(INCLUDES . SMARTY . "cache");
  117.     $smarty->setConfigDir(INCLUDES . SMARTY . "configs");
  118.  
  119. ?>