Example #1
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     Functions_Lib::module_message(Functions_Lib::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();
 }
Example #2
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     $this->_lang = parent::$lang;
     $this->_resource = parent::$objects->get_objects();
     $this->_pricelist = parent::$objects->get_price();
     $this->_combat_caps = parent::$objects->get_combat_specs();
 }
Example #3
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     Functions_Lib::module_message(Functions_Lib::is_module_accesible(self::MODULE_ID));
     $this->build_page();
 }
Example #4
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // WE'RE GOING TO HANDLE A DIFFERENT DB OBJECT FOR THE SESSIONS
     $this->_dbc = clone parent::$db;
     session_set_save_handler(array(&$this, 'open'), array(&$this, 'close'), array(&$this, 'read'), array(&$this, 'write'), array(&$this, 'delete'), array(&$this, 'clean'));
     if (session_id() == '') {
         session_start();
     }
 }
Example #5
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // Other stuff
     $this->clean_up();
     $this->create_backup();
     // Updates
     $this->update_fleets();
     $this->update_statistics();
 }
Example #6
0
 /**
  * __construct
  *
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     // Other stuff
     $this->cleanUp();
     $this->createBackup();
     // Updates
     $this->updateFleets();
     $this->updateStatistics();
 }
Example #7
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     $this->_lang = parent::$lang;
     if ($this->server_requirementes()) {
         $this->build_page();
     } else {
         die(Functions_Lib::message($this->_lang['ins_no_server_requirements']));
     }
 }
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     $this->langs = parent::$lang;
     $this->_planet = Functions_Lib::load_library('PlanetLib');
     if ($this->serverRequirementes()) {
         $this->buildPage();
     } else {
         die(Functions_Lib::message($this->langs['ins_no_server_requirements']));
     }
 }
Example #9
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     $this->_lang = parent::$lang;
     if (Functions_Lib::read_config('reg_enable') == 1) {
         $this->_creator = Functions_Lib::load_library('Creator_Lib');
         $this->build_page();
     } else {
         die(Functions_Lib::message($this->_lang['re_disabled'], 'index.php', '5', FALSE, FALSE));
     }
 }
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     Functions_Lib::module_message(Functions_Lib::is_module_accesible(self::MODULE_ID));
     $this->langs = parent::$lang;
     $this->current_user = parent::$users->get_user_data();
     $this->buildPage();
 }
Example #11
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     Functions_Lib::module_message(Functions_Lib::is_module_accesible(self::MODULE_ID));
     $this->_lang = parent::$lang;
     $this->_current_user = parent::$users->get_user_data();
     $this->_have_premium = Officiers_Lib::is_officier_active($this->_current_user['premium_officier_commander']);
     // build the page
     $this->build_page();
 }
Example #12
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->get_objects();
     $this->_pricelist = parent::$objects->get_price();
     $this->_formula = Functions_Lib::load_library('Formula_Lib');
     $this->_noob = Functions_Lib::load_library('NoobsProtection_Lib');
 }
Example #13
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     Functions_Lib::module_message(Functions_Lib::is_module_accesible(self::MODULE_ID));
     $this->_lang = parent::$lang;
     $this->_current_user = parent::$users->get_user_data();
     $this->_current_planet = parent::$users->get_planet_data();
     $this->_formula = Functions_Lib::load_library('Formula_Lib');
     $this->build_page();
 }
Example #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 (!Administration_Lib::have_access($this->_current_user['user_authlevel'])) {
         die(Functions_Lib::message($this->_lang['ge_no_permissions']));
     } else {
         $this->build_page();
     }
 }
Example #15
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     Functions_Lib::module_message(Functions_Lib::is_module_accesible(self::MODULE_ID));
     $this->_lang = parent::$lang;
     $this->_resource = parent::$objects->get_objects();
     $this->_price = parent::$objects->get_price();
     $this->_current_user = parent::$users->get_user_data();
     $this->_current_planet = parent::$users->get_planet_data();
     $this->build_page();
 }
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     Functions_Lib::module_message(Functions_Lib::is_module_accesible(self::MODULE_ID));
     $this->_current_user = parent::$users->get_user_data();
     if (!Officiers_Lib::is_officier_active($this->_current_user['premium_officier_commander'])) {
         Functions_Lib::redirect('game.php?page=officier');
     } else {
         $this->build_page();
     }
 }
Example #17
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 (Administration_Lib::have_access($this->_current_user['user_authlevel']) && Administration_Lib::authorization($this->_current_user['user_authlevel'], 'config_game') == 1) {
         $this->_game_config = Functions_Lib::read_config('', TRUE);
         $this->build_page();
     } else {
         die(Functions_Lib::message($this->_lang['ge_no_permissions']));
     }
 }
Example #18
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     $this->_lang = parent::$lang;
     $this->_creator = Functions_Lib::load_library('Creator_Lib');
     $this->_current_user = parent::$users->get_user_data();
     // Check if the user is allowed to access
     if (Administration_Lib::have_access($this->_current_user['user_authlevel']) && Administration_Lib::authorization($this->_current_user['user_authlevel'], 'edit_users') == 1) {
         $this->build_page();
     } else {
         die(Functions_Lib::message($this->_lang['ge_no_permissions']));
     }
 }
Example #19
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 (Administration_Lib::have_access($this->_current_user['user_authlevel']) && $this->_current_user['user_authlevel'] == 3) {
         include_once XGP_ROOT . 'application/libraries/Creator_Lib.php';
         $this->_creator = new Creator_Lib();
         $this->build_page();
     } else {
         die(Functions_Lib::message($this->_lang['ge_no_permissions']));
     }
 }
 /**
  * __construct()
  */
 public function __construct(&$planet)
 {
     parent::__construct();
     parent::$db->query("LOCK TABLE " . ACS_FLEETS . " WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . ALLIANCE . " AS a WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . REPORTS . " WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . MESSAGES . " WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . FLEETS . " WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . FLEETS . " AS f WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . FLEETS . " AS f1 WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . FLEETS . " AS f2 WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . PLANETS . " WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . PLANETS . " AS pc1 WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . PLANETS . " AS pc2 WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . PLANETS . " AS p WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . PLANETS . " AS m WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . PLANETS . " AS mp WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . PLANETS . " AS pm WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . PLANETS . " AS pm2 WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . PREMIUM . " WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . PREMIUM . " AS pr WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . PREMIUM . " AS pre WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . SETTINGS . " WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . SETTINGS . " AS se WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . SHIPS . " WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . SHIPS . " AS s WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . BUILDINGS . " WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . BUILDINGS . " AS b WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . DEFENSES . " WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . DEFENSES . " AS d WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . RESEARCH . " WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . RESEARCH . " AS r WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . USERS_STATISTICS . " WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . USERS_STATISTICS . " AS us WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . USERS_STATISTICS . " AS usul WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . USERS . " WRITE,\r\n\t\t\t\t\t\t\t\t\t\t\t" . USERS . " AS u WRITE");
     $all_fleets = parent::$db->query("SELECT *\r\n\t\t\t\t\t\t\t\t\t\t\t\tFROM " . FLEETS . "\r\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`fleet_start_galaxy` = " . $planet['planet_galaxy'] . " AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`fleet_start_system` = " . $planet['planet_system'] . " AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`fleet_start_planet` = " . $planet['planet_planet'] . " AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`fleet_start_type` = " . $planet['planet_type'] . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tOR\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`fleet_end_galaxy` = " . $planet['planet_galaxy'] . " AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`fleet_end_system` = " . $planet['planet_system'] . " AND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`fleet_end_planet` = " . $planet['planet_planet'] . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t`fleet_end_type`= " . $planet['planet_type'] . "\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t  )\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t  AND\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t  (\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t  \t`fleet_start_time` < '" . time() . "' OR\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t  \t\t`fleet_end_time` < '" . time() . "' );");
     // 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->fetch_array($all_fleets)) {
         $class_name = $missions[$fleet['fleet_mission']];
         $mission_name = strtolower($class_name) . '_mission';
         $mission = new $class_name();
         $mission->{$mission_name}($fleet);
     }
     parent::$db->query("UNLOCK TABLES");
 }
Example #21
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     Functions_Lib::module_message(Functions_Lib::is_module_accesible(self::MODULE_ID));
     $this->_lang = parent::$lang;
     $this->_resource = parent::$objects->get_objects();
     $this->_pricelist = parent::$objects->get_price();
     $this->_combat_caps = parent::$objects->get_combat_specs();
     $this->_prod_grid = parent::$objects->get_production();
     $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();
 }
Example #22
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     Functions_Lib::module_message(Functions_Lib::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->get_objects();
     $this->_pricelist = parent::$objects->get_price();
     $this->_reslist = parent::$objects->get_objects_list();
     $this->_formula = Functions_Lib::load_library('Formula_Lib');
     $this->_noob = Functions_Lib::load_library('NoobsProtection_Lib');
     $this->_galaxyLib = Functions_Lib::load_library('Galaxy_Lib');
     $this->build_page();
 }
Example #23
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     Functions_Lib::module_message(Functions_Lib::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->get_objects();
     $this->_reslist = parent::$objects->get_objects_list();
     if ($this->_current_planet[$this->_resource[31]] == 0) {
         Functions_Lib::message($this->_lang['bd_lab_required'], '', '', TRUE);
     } else {
         $this->handle_technologie_build();
         $this->build_page();
     }
 }
Example #24
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     // check if session is active
     parent::$users->check_session();
     // Check module access
     Functions_Lib::module_message(Functions_Lib::is_module_accesible(self::MODULE_ID));
     // DEFAULT VALUES
     $this->_current_user = parent::$users->get_user_data();
     $this->_lang = parent::$lang;
     $this->_bbcode = Functions_Lib::load_library('BBCode_Lib');
     $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->set_permissions();
     // BUILD THE ALLIANCE PAGE
     $this->build_page();
 }
Example #25
0
 /**
  * method set_template_class
  * param
  * return template instance
  */
 private function set_template_class()
 {
     require_once XGP_ROOT . '/application/libraries/Template_Lib.php';
     self::$page = new Template_Lib(self::$lang, self::$users);
 }
Example #26
0
 /**
  * __construct()
  */
 function __construct()
 {
     parent::__construct();
     $this->_lang = parent::$lang;
     $this->build_page();
 }
Example #27
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
 }
Example #28
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     $this->build_page();
 }
Example #29
0
 /**
  * __construct()
  */
 public function __construct()
 {
     parent::__construct();
     $this->_lang = parent::$lang;
 }