Beispiel #1
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     FunctionsLib::module_message(FunctionsLib::is_module_accesible(self::MODULE_ID));
     $this->_current_user = parent::$users->get_user_data();
     $this->_current_planet = parent::$users->get_planet_data();
     $this->_current_page = isset($_GET['page']) ? $_GET['page'] : NULL;
     $this->_lang = parent::$lang;
     $this->_objects = parent::$objects;
     if ($this->_current_page != 'resources' && $this->_current_page != 'station') {
         $this->_current_page = 'resources';
     }
     // check the current page and the allowed elements
     // resources page
     if ($this->_current_page == 'resources') {
         $this->_allowed['1'] = array(1, 2, 3, 4, 12, 22, 23, 24);
         $this->_allowed['3'] = array(12, 22, 23, 24);
     }
     // station page
     if ($this->_current_page == 'station') {
         $this->_allowed['1'] = array(14, 15, 21, 31, 33, 34, 44);
         $this->_allowed['3'] = array(14, 21, 41, 42, 43);
     }
     // build the page
     $this->build_page();
 }
Beispiel #2
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     $this->_lang = parent::$lang;
     $this->_resource = parent::$objects->getObjects();
     $this->_pricelist = parent::$objects->getPrice();
     $this->_combat_caps = parent::$objects->getCombatSpecs();
 }
Beispiel #3
0
 /**
  * __construct
  *
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     FunctionsLib::module_message(FunctionsLib::is_module_accesible(self::MODULE_ID));
     $this->buildPage();
 }
Beispiel #4
0
 /**
  * __construct
  *
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     // Other stuff
     $this->cleanUp();
     $this->createBackup();
     // Updates
     $this->updateFleets();
     $this->updateStatistics();
 }
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     $this->langs = parent::$lang;
     if ($this->serverRequirementes()) {
         $this->buildPage();
     } else {
         die(FunctionsLib::message($this->langs['ins_no_server_requirements']));
     }
 }
Beispiel #6
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     $this->_lang = parent::$lang;
     if (FunctionsLib::read_config('reg_enable') == 1) {
         $this->_creator = FunctionsLib::load_library('CreatorLib');
         $this->build_page();
     } else {
         die(FunctionsLib::message($this->_lang['re_disabled'], 'index.php', '5', FALSE, FALSE));
     }
 }
Beispiel #7
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     FunctionsLib::module_message(FunctionsLib::is_module_accesible(self::MODULE_ID));
     $this->_lang = parent::$lang;
     $this->_current_user = parent::$users->get_user_data();
     $this->build_page();
 }
Beispiel #8
0
 /**
  * __construct()
  */
 public function __construct($user = '', $planet = '', $galaxy = '', $system = '')
 {
     parent::__construct();
     $this->_lang = parent::$lang;
     $this->_current_user = $user;
     $this->_current_planet = $planet;
     $this->_galaxy = $galaxy;
     $this->_system = $system;
     $this->_resource = parent::$objects->getObjects();
     $this->_pricelist = parent::$objects->getPrice();
     $this->_formula = FunctionsLib::load_library('FormulaLib');
     $this->_noob = FunctionsLib::load_library('NoobsProtectionLib');
 }
Beispiel #9
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     FunctionsLib::module_message(FunctionsLib::is_module_accesible(self::MODULE_ID));
     $this->_lang = parent::$lang;
     $this->_current_user = parent::$users->get_user_data();
     $this->_have_premium = OfficiersLib::isOfficierActive($this->_current_user['premium_officier_commander']);
     // build the page
     $this->build_page();
 }
Beispiel #10
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     $this->_lang = parent::$lang;
     $this->_current_user = parent::$users->get_user_data();
     // Check if the user is allowed to access
     if (AdministrationLib::have_access($this->_current_user['user_authlevel']) && AdministrationLib::authorization($this->_current_user['user_authlevel'], 'config_game') == 1) {
         $this->build_page($this->_current_user);
     } else {
         die(FunctionsLib::message($this->_lang['ge_no_permissions']));
     }
 }
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     FunctionsLib::module_message(FunctionsLib::is_module_accesible(self::MODULE_ID));
     $this->_current_user = parent::$users->get_user_data();
     if (!OfficiersLib::isOfficierActive($this->_current_user['premium_officier_commander'])) {
         FunctionsLib::redirect('game.php?page=officier');
     } else {
         $this->build_page();
     }
 }
Beispiel #12
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     FunctionsLib::module_message(FunctionsLib::is_module_accesible(self::MODULE_ID));
     $this->_lang = parent::$lang;
     $this->_resource = parent::$objects->getObjects();
     $this->_tr_dark_matter = FunctionsLib::read_config('trader_darkmatter');
     $this->_current_user = parent::$users->get_user_data();
     $this->_current_planet = parent::$users->get_planet_data();
     $this->build_page();
 }
Beispiel #13
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     FunctionsLib::module_message(FunctionsLib::is_module_accesible(self::MODULE_ID));
     $this->_lang = parent::$lang;
     $this->_resource = parent::$objects->getObjects();
     $this->_prod_grid = parent::$objects->getProduction();
     $this->_reslist = parent::$objects->getObjectsList();
     $this->_current_user = parent::$users->get_user_data();
     $this->_current_planet = parent::$users->get_planet_data();
     $this->build_page();
 }
Beispiel #14
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     $this->_lang = parent::$lang;
     $this->_current_user = parent::$users->get_user_data();
     // Check if the user is allowed to access
     if (AdministrationLib::have_access($this->_current_user['user_authlevel']) && $this->_current_user['user_authlevel'] == 3) {
         include_once XGP_ROOT . 'application/libraries/CreatorLib.php';
         $this->_creator = new CreatorLib();
         $this->build_page();
     } else {
         die(FunctionsLib::message($this->_lang['ge_no_permissions']));
     }
 }
Beispiel #15
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     FunctionsLib::module_message(FunctionsLib::is_module_accesible(self::MODULE_ID));
     $this->_lang = parent::$lang;
     $this->_resource = parent::$objects->getObjects();
     $this->_pricelist = parent::$objects->getPrice();
     $this->_combat_caps = parent::$objects->getCombatSpecs();
     $this->_prod_grid = parent::$objects->getProduction();
     $this->_current_user = parent::$users->get_user_data();
     $this->_current_planet = parent::$users->get_planet_data();
     $this->_element_id = isset($_GET['gid']) ? (int) $_GET['gid'] : NULL;
     $this->build_page();
 }
Beispiel #16
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     FunctionsLib::module_message(FunctionsLib::is_module_accesible(self::MODULE_ID));
     $this->_current_user = parent::$users->get_user_data();
     $this->_current_planet = parent::$users->get_planet_data();
     $this->_lang = parent::$lang;
     $this->_resource = parent::$objects->getObjects();
     $this->_pricelist = parent::$objects->getPrice();
     $this->_reslist = parent::$objects->getObjectsList();
     $this->_formula = FunctionsLib::load_library('FormulaLib');
     $this->_noob = FunctionsLib::load_library('NoobsProtectionLib');
     $this->_galaxyLib = FunctionsLib::load_library('GalaxyLib');
     $this->build_page();
 }
Beispiel #17
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     FunctionsLib::module_message(FunctionsLib::is_module_accesible(self::MODULE_ID));
     $this->_current_user = parent::$users->get_user_data();
     $this->_current_planet = parent::$users->get_planet_data();
     $this->_lang = parent::$lang;
     $this->_resource = parent::$objects->getObjects();
     $this->_reslist = parent::$objects->getObjectsList();
     if ($this->_current_planet[$this->_resource[31]] == 0) {
         FunctionsLib::message($this->_lang['bd_lab_required'], '', '', TRUE);
     } else {
         $this->handle_technologie_build();
         $this->build_page();
     }
 }
 /**
  * __construct
  *
  * @return void
  */
 public function __construct(&$planet)
 {
     parent::__construct();
     include_once XGP_ROOT . 'application/libraries/missions/missions.php';
     parent::$db->query("LOCK TABLE " . ACS_FLEETS . " WRITE,\n            " . ALLIANCE . " AS a WRITE,\n            " . REPORTS . " WRITE,\n            " . MESSAGES . " WRITE,\n            " . FLEETS . " WRITE,\n            " . FLEETS . " AS f WRITE,\n            " . FLEETS . " AS f1 WRITE,\n            " . FLEETS . " AS f2 WRITE,\n            " . PLANETS . " WRITE,\n            " . PLANETS . " AS pc1 WRITE,\n            " . PLANETS . " AS pc2 WRITE,\n            " . PLANETS . " AS p WRITE,\n            " . PLANETS . " AS m WRITE,\n            " . PLANETS . " AS mp WRITE,\n            " . PLANETS . " AS pm WRITE,\n            " . PLANETS . " AS pm2 WRITE,\n            " . PREMIUM . " WRITE,\n            " . PREMIUM . " AS pr WRITE,\n            " . PREMIUM . " AS pre WRITE,\n            " . SETTINGS . " WRITE,\n            " . SETTINGS . " AS se WRITE,\n            " . SHIPS . " WRITE,\n            " . SHIPS . " AS s WRITE,\n            " . BUILDINGS . " WRITE,\n            " . BUILDINGS . " AS b WRITE,\n            " . DEFENSES . " WRITE,\n            " . DEFENSES . " AS d WRITE,\n            " . RESEARCH . " WRITE,\n            " . RESEARCH . " AS r WRITE,\n            " . USERS_STATISTICS . " WRITE,\n            " . USERS_STATISTICS . " AS us WRITE,\n            " . USERS_STATISTICS . " AS usul WRITE,\n            " . USERS . " WRITE,\n            " . USERS . " AS u WRITE");
     $all_fleets = parent::$db->query("SELECT *\n            FROM " . FLEETS . "\n            WHERE (\n            (\n                `fleet_start_galaxy` = " . $planet['planet_galaxy'] . " AND\n                `fleet_start_system` = " . $planet['planet_system'] . " AND\n                `fleet_start_planet` = " . $planet['planet_planet'] . " AND\n                `fleet_start_type` = " . $planet['planet_type'] . "\n            )\n            OR\n            (\n                `fleet_end_galaxy` = " . $planet['planet_galaxy'] . " AND\n                `fleet_end_system` = " . $planet['planet_system'] . " AND\n                `fleet_end_planet` = " . $planet['planet_planet'] . "\n            )\n\n            AND\n                `fleet_end_type`= " . $planet['planet_type'] . "\n            )\n\n            AND\n\n            (\n                `fleet_start_time` < '" . time() . "' OR\n                `fleet_end_time` < '" . time() . "'\n            );");
     // missions list
     $missions = array(1 => 'Attack', 2 => 'Acs', 3 => 'Transport', 4 => 'Deploy', 5 => 'Stay', 6 => 'Spy', 7 => 'Colonize', 8 => 'Recycle', 9 => 'Destroy', 10 => 'Missile', 15 => 'Expedition');
     // Process missions
     while ($fleet = parent::$db->fetchArray($all_fleets)) {
         $name = $missions[$fleet['fleet_mission']];
         $file_name = strtolower($name);
         $mission_name = strtolower($name) . 'Mission';
         $class_name = '\\application\\libraries\\missions\\' . $name;
         include_once XGP_ROOT . 'application/libraries/missions/' . $file_name . '.php';
         $mission = new $class_name();
         $mission->{$mission_name}($fleet);
     }
     parent::$db->query("UNLOCK TABLES");
 }
Beispiel #19
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     FunctionsLib::module_message(FunctionsLib::is_module_accesible(self::MODULE_ID));
     // DEFAULT VALUES
     $this->_current_user = parent::$users->get_user_data();
     $this->_lang = parent::$lang;
     $this->bbcode = FunctionsLib::load_library('BBCodeLib');
     $this->_ally = '';
     $this->_permissions = array();
     // SOME REQUIRED PATHS
     $this->_lang['dpath'] = DPATH;
     $this->_lang['img_path'] = XGP_ROOT . IMG_PATH;
     $this->_lang['js_path'] = XGP_ROOT . JS_PATH;
     // SET THE PERMISSIONS
     $this->setPermissions();
     // BUILD THE ALLIANCE PAGE
     $this->buildPage();
 }
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
 }
Beispiel #21
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     $this->_lang = parent::$lang;
 }
Beispiel #22
0
 /**
  * __construct
  *
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->langs = parent::$lang;
     $this->buildPage();
 }
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     $this->build_page();
 }