Exemplo n.º 1
0
 /**
  * method run
  * param
  * return
  */
 public static function run()
 {
     if (self::$instance == null) {
         $c = __CLASS__;
         self::$instance = new $c();
     }
 }
Exemplo n.º 2
0
// define game version
if ($installed != 0) {
    define('VERSION', $game_version == '' ? '' : 'v' . $game_version);
}
// define game language
define('DEFAULT_LANG', $game_lang == '' ? 'spanish' : $game_lang);
if (!defined('IN_INSTALL')) {
    require_once XGP_ROOT . 'application/core/Sessions.php';
    require_once XGP_ROOT . 'application/core/Hooks.php';
    require_once XGP_ROOT . 'application/libraries/Statistics_Lib.php';
    require_once XGP_ROOT . 'application/libraries/UpdateResources_Lib.php';
    require_once XGP_ROOT . 'application/libraries/Update_Lib.php';
    // Sessions
    $session = new Sessions();
    // Hooks
    $hooks = new Hooks();
    // Before load stuff
    $hooks->call_hook('before_loads');
    if (!isset($InLogin) or $InLogin != TRUE) {
        require_once XGP_ROOT . 'application/libraries/SecurePage_Lib.php';
        $exclude = array('editor');
        if (!in_array($current_page, $exclude)) {
            SecurePage_Lib::run();
        }
    }
    if (!defined('IN_ADMIN')) {
        // SEVERAL UPDATES
        new Update_Lib();
    }
}
/* end of common.php */