/** _ \_/ |\ | /¯¯\ \ / /\ |¯¯) |_¯ \ / /¯¯\ | | |´¯|¯` | /¯¯\ |\ |5 ¯ /¯\ | \| \__/ \/ /--\ |¯¯\ |__ \/ \__/ |__ \_/ | | \__/ | \|Core. * @author: Copyright (C) 2011 by Brayan Narvaez (Prinick) developer of xNova Revolution * @link: http://www.xnovarevolution.con.ar * @package 2Moons * @author Slaver <*****@*****.**> * @copyright 2009 Lucky <*****@*****.**> (XGProyecto) * @copyright 2011 Slaver <*****@*****.**> (Fork/2Moons) * @license http://www.gnu.org/licenses/gpl.html GNU GPLv3 License * @version 1.3 (2011-01-21) * @link http://code.google.com/p/2moons/ * Please do not remove the credits */ function ShowFleetTraderPage() { global $USER, $PLANET, $LNG, $CONF, $pricelist, $resource; $PlanetRess = new ResourceUpdate(); $PlanetRess->CalcResource(); $CONF['trade_allowed_ships'] = explode(',', $CONF['trade_allowed_ships']); $ID = request_var('id', 0); if (!empty($ID) && in_array($ID, $CONF['trade_allowed_ships'])) { $Count = max(min(request_var('count', '0'), $PLANET[$resource[$ID]]), 0); $PLANET['metal'] = bcadd($PLANET['metal'], bcmul($Count, bcmul($pricelist[$ID]['metal'], (double) (1 - $CONF['trade_charge'])))); $PLANET['crystal'] = bcadd($PLANET['crystal'], bcmul($Count, bcmul($pricelist[$ID]['crystal'], (double) (1 - $CONF['trade_charge'])))); $PLANET['deuterium'] = bcadd($PLANET['deuterium'], bcmul($Count, bcmul($pricelist[$ID]['deuterium'], (double) (1 - $CONF['trade_charge'])))); $PLANET['norio'] = bcadd($PLANET['norio'], bcmul($Count, bcmul($pricelist[$ID]['norio'], (double) (1 - $CONF['trade_charge'])))); $USER['darkmatter'] = bcadd($USER['darkmatter'], bcmul($Count, bcmul($pricelist[$ID]['darkmatter'], (double) (1 - $CONF['trade_charge'])))); $PlanetRess->Builded[$ID] = bcadd(bcmul('-1', $Count), $PlanetRess->Builded[$ID]); } $PlanetRess->SavePlanetToDB(); $template = new template(); $template->loadscript('fleettrader.js'); $template->execscript('updateVars();'); $Cost = array(); foreach ($CONF['trade_allowed_ships'] as $ID) { $Cost[$ID] = array($PLANET[$resource[$ID]], $pricelist[$ID]['metal'], $pricelist[$ID]['crystal'], $pricelist[$ID]['deuterium'], $pricelist[$ID]['darkmatter'], $pricelist[$ID]['norio']); } $template->assign_vars(array('tech' => $LNG['tech'], 'ft_head' => $LNG['ft_head'], 'ft_count' => $LNG['ft_count'], 'ft_max' => $LNG['ft_max'], 'ft_total' => $LNG['ft_total'], 'ft_charge' => $LNG['ft_charge'], 'ft_absenden' => $LNG['ft_absenden'], 'trade_allowed_ships' => $CONF['trade_allowed_ships'], 'CostInfos' => json_encode($Cost), 'Charge' => $CONF['trade_charge'])); $template->show("fleettrader_overview.tpl"); }
function ShowDisclamerPage() { global $LNG; $config = Config::get(Universe::getEmulated()); if (!empty($_POST)) { $config_before = array('disclamerAddress' => $config->disclamerAddress, 'disclamerPhone' => $config->disclamerPhone, 'disclamerMail' => $config->disclamerMail, 'disclamerNotice' => $config->disclamerNotice); $disclaimerAddress = HTTP::_GP('disclaimerAddress', '', true); $disclaimerPhone = HTTP::_GP('disclaimerPhone', '', true); $disclaimerMail = HTTP::_GP('disclaimerMail', '', true); $disclaimerNotice = HTTP::_GP('disclaimerNotice', '', true); $config_after = array('disclamerAddress' => $disclaimerAddress, 'disclamerPhone' => $disclaimerPhone, 'disclamerMail' => $disclaimerMail, 'disclamerNotice' => $disclaimerNotice); foreach ($config_after as $key => $value) { $config->{$key} = $value; } $config->save(); $LOG = new Log(3); $LOG->target = 5; $LOG->old = $config_before; $LOG->new = $config_after; $LOG->save(); } $template = new template(); $template->loadscript('../base/jquery.autosize-min.js'); $template->execscript('$(\'textarea\').autosize();'); $template->assign_vars(array('disclaimerAddress' => $config->disclamerAddress, 'disclaimerPhone' => $config->disclamerPhone, 'disclaimerMail' => $config->disclamerMail, 'disclaimerNotice' => $config->disclamerNotice, 'se_server_parameters' => $LNG['mu_disclaimer'], 'se_save_parameters' => $LNG['se_save_parameters'], 'se_disclaimerAddress' => $LNG['se_disclaimerAddress'], 'se_disclaimerPhone' => $LNG['se_disclaimerPhone'], 'se_disclaimerMail' => $LNG['se_disclaimerMail'], 'se_disclaimerNotice' => $LNG['se_disclaimerNotice'])); $template->show('DisclamerConfigBody.tpl'); }
public function __construct() { global $CONF, $dpath, $LNG, $db, $USER, $PLANET; $mode = request_var('mode', ''); $msg = request_var('msg', '', true); $ctype = request_var('chat_type', ''); $MessageID = request_var('id', 0); switch ($mode) { case "delete": $this->DelMeassageFromChat($MessageID); break; case "send": $this->SetMeassageInChat($ctype, $msg); break; case "call": $this->GetMessages($ctype); break; default: $template = new template(); $template->execscript("showMessage();setInterval(showMessage, 10000);"); $template->loadscript("chat.js"); if (empty($ctype)) { $PlanetRess = new ResourceUpdate(); $PlanetRess->CalcResource(); $PlanetRess->SavePlanetToDB(); } else { $template->isPopup(true); } $template->assign_vars(array('ctype' => $ctype, 'chat_send' => $LNG['chat_send'], 'chat_disc' => $LNG['chat_disc'], 'chat_message' => $LNG['chat_message'], 'chat_bbcode' => $LNG['chat_bbcode'], 'chat_fontcolor' => $LNG['chat_fontcolor'], 'chat_color_white' => $LNG['chat_color_white'], 'chat_color_blue' => $LNG['chat_color_blue'], 'chat_color_yellow' => $LNG['chat_color_yellow'], 'chat_color_green' => $LNG['chat_color_green'], 'chat_color_pink' => $LNG['chat_color_pink'], 'chat_color_red' => $LNG['chat_color_red'], 'chat_color_orange' => $LNG['chat_color_orange'], 'chat_notext' => $LNG['chat_notext'], 'chat_request_url' => $LNG['chat_request_url'], 'chat_request_url_desc' => $LNG['chat_request_url_desc'])); $template->show("chat_overview.tpl"); break; } }
function ShowDisclamerPage() { global $LNG, $USER; $CONF = Config::getAll(NULL, $_SESSION['adminuni']); if (!empty($_POST)) { $config_before = array('disclamerAddress' => $CONF['disclamerAddress'], 'disclamerPhone' => $CONF['disclamerPhone'], 'disclamerMail' => $CONF['disclamerMail'], 'disclamerNotice' => $CONF['disclamerNotice']); $disclamerAddress = HTTP::_GP('disclamerAddress', '', true); $disclamerPhone = HTTP::_GP('disclamerPhone', '', true); $disclamerMail = HTTP::_GP('disclamerMail', '', true); $disclamerNotice = HTTP::_GP('disclamerNotice', '', true); $config_after = array('disclamerAddress' => $disclamerAddress, 'disclamerPhone' => $disclamerPhone, 'disclamerMail' => $disclamerMail, 'disclamerNotice' => $disclamerNotice); Config::update($config_after); $CONF = Config::getAll(NULL, $_SESSION['adminuni']); $LOG = new Log(3); $LOG->target = 5; $LOG->old = $config_before; $LOG->new = $config_after; $LOG->save(); } $template = new template(); $template->loadscript('../base/jquery.autosize-min.js'); $template->execscript('$(\'textarea\').autosize();'); $template->assign_vars(array('disclamerAddress' => $CONF['disclamerAddress'], 'disclamerPhone' => $CONF['disclamerPhone'], 'disclamerMail' => $CONF['disclamerMail'], 'disclamerNotice' => $CONF['disclamerNotice'], 'se_server_parameters' => $LNG['mu_disclamer'], 'se_save_parameters' => $LNG['se_save_parameters'], 'se_disclamerAddress' => $LNG['se_disclamerAddress'], 'se_disclamerPhone' => $LNG['se_disclamerPhone'], 'se_disclamerMail' => $LNG['se_disclamerMail'], 'se_disclamerNotice' => $LNG['se_disclamerNotice'])); $template->show('DisclamerConfigBody.tpl'); }
function ShowOverviewPage() { global $CONF, $LNG, $PLANET, $USER, $db, $resource, $UNI; $PlanetRess = new ResourceUpdate(); $PlanetRess->CalcResource(); $PlanetRess->SavePlanetToDB(); $template = new template(); $template->getplanets(); $AdminsOnline = $AllPlanets = $Moon = array(); foreach ($template->UserPlanets as $ID => $CPLANET) { if ($ID == $_SESSION['planet'] || $CPLANET['planet_type'] == 3) { continue; } if (!empty($CPLANET['b_building']) && $CPLANET['b_building'] > TIMESTAMP) { $Queue = explode(';', $CPLANET['b_building_id']); $CurrBuild = explode(',', $Queue[0]); $BuildPlanet = $LNG['tech'][$CurrBuild[0]] . " (" . $CurrBuild[1] . ")<br><span style=\"color:#7F7F7F;\">(" . pretty_time($CurrBuild[3] - TIMESTAMP) . ")</span>"; } else { $BuildPlanet = $LNG['ov_free']; } $AllPlanets[] = array('id' => $CPLANET['id'], 'name' => $CPLANET['name'], 'image' => $CPLANET['image'], 'build' => $BuildPlanet); } if ($PLANET['id_luna'] != 0) { $Moon = $db->uniquequery("SELECT `id`, `name` FROM " . PLANETS . " WHERE `id` = '" . $PLANET['id_luna'] . "';"); } if (!empty($PLANET['b_building'])) { $Queue = explode(';', $PLANET['b_building_id']); $CurrBuild = explode(',', $Queue[0]); $Build = $LNG['tech'][$CurrBuild[0]] . ' (' . $CurrBuild[1] . ')<br><div id="blc">"' . pretty_time($PLANET['b_building'] - TIMESTAMP) . '</div>'; $template->execscript('BuildTime();'); } else { $Build = $LNG['ov_free']; } $OnlineAdmins = $db->query("SELECT `id`,`username` FROM " . USERS . " WHERE `universe` = '" . $UNI . "' AND `onlinetime` >= '" . (TIMESTAMP - 10 * 60) . "' AND `authlevel` > '0';"); while ($AdminRow = $db->fetch_array($OnlineAdmins)) { $AdminsOnline[$AdminRow['id']] = $AdminRow['username']; } $db->free_result($OnlineAdmins); $template->loadscript('mbContainer.js'); $template->loadscript('overview.js'); $template->execscript('GetFleets(true);'); $template->assign_vars(array('user_rank' => sprintf($LNG['ov_userrank_info'], pretty_number($USER['total_points']), $LNG['ov_place'], $USER['total_rank'], $USER['total_rank'], $LNG['ov_of'], $CONF['users_amount']), 'is_news' => $CONF['OverviewNewsFrame'], 'news' => makebr($CONF['OverviewNewsText']), 'planetname' => $PLANET['name'], 'planetimage' => $PLANET['image'], 'galaxy' => $PLANET['galaxy'], 'system' => $PLANET['system'], 'planet' => $PLANET['planet'], 'buildtime' => $PLANET['b_building'], 'userid' => $USER['id'], 'username' => $USER['username'], 'build' => $Build, 'Moon' => $Moon, 'AllPlanets' => $AllPlanets, 'AdminsOnline' => $AdminsOnline, 'Teamspeak' => GetTeamspeakData(), 'messages' => $USER['new_message'] > 0 ? $USER['new_message'] == 1 ? $LNG['ov_have_new_message'] : sprintf($LNG['ov_have_new_messages'], pretty_number($USER['new_message'])) : false, 'planet_diameter' => pretty_number($PLANET['diameter']), 'planet_field_current' => $PLANET['field_current'], 'planet_field_max' => CalculateMaxPlanetFields($PLANET), 'planet_temp_min' => $PLANET['temp_min'], 'planet_temp_max' => $PLANET['temp_max'], 'ov_news' => $LNG['ov_news'], 'fcm_moon' => $LNG['fcm_moon'], 'ov_server_time' => $LNG['ov_server_time'], 'ov_planet' => $LNG['ov_planet'], 'ov_planetmenu' => $LNG['ov_planetmenu'], 'ov_diameter' => $LNG['ov_diameter'], 'ov_distance_unit' => $LNG['ov_distance_unit'], 'ov_developed_fields' => $LNG['ov_developed_fields'], 'ov_max_developed_fields' => $LNG['ov_max_developed_fields'], 'ov_fields' => $LNG['ov_fields'], 'ov_temperature' => $LNG['ov_temperature'], 'ov_aprox' => $LNG['ov_aprox'], 'ov_temp_unit' => $LNG['ov_temp_unit'], 'ov_to' => $LNG['ov_to'], 'ov_position' => $LNG['ov_position'], 'ov_points' => $LNG['ov_points'], 'ov_events' => $LNG['ov_events'], 'ov_admins_online' => $LNG['ov_admins_online'], 'ov_no_admins_online' => $LNG['ov_no_admins_online'], 'ov_userbanner' => $LNG['ov_userbanner'], 'ov_teamspeak' => $LNG['ov_teamspeak'], 'ov_your_planet' => $LNG['ov_your_planet'], 'ov_coords' => $LNG['ov_coords'], 'ov_planet_name' => $LNG['ov_planet_name'], 'ov_actions' => $LNG['ov_actions'], 'ov_abandon_planet' => $LNG['ov_abandon_planet'], 'ov_planet_rename' => $LNG['ov_planet_rename'], 'ov_planet_rename_action' => $LNG['ov_planet_rename_action'], 'ov_password' => $LNG['ov_password'], 'ov_with_pass' => $LNG['ov_with_pass'], 'ov_security_confirm' => $LNG['ov_security_confirm'], 'ov_security_request' => $LNG['ov_security_request'], 'ov_delete_planet' => $LNG['ov_delete_planet'], 'ov_planet_abandoned' => $LNG['ov_planet_abandoned'], 'path' => PROTOCOL . $_SERVER['HTTP_HOST'] . HTTP_ROOT)); $template->show("overview_body.tpl"); }
private function ShowNotes() { global $LNG, $db, $USER; $NotesID = request_var('id', 0); $Note = $db->uniquequery("SELECT * FROM " . NOTES . " WHERE id = '" . $NotesID . "' AND owner = '" . $USER['id'] . "';"); if (!$Note) { redirectTo("game.php?page=notes"); } $template = new template(); $template->isPopup(true); $template->execscript("\$('#cntChars').text(\$('#text').val().length);"); $template->assign_vars(array('nt_edit_note' => $LNG['nt_edit_note'], 'nt_priority' => $LNG['nt_priority'], 'nt_important' => $LNG['nt_important'], 'nt_normal' => $LNG['nt_normal'], 'nt_unimportant' => $LNG['nt_unimportant'], 'nt_subject_note' => $LNG['nt_subject_note'], 'nt_reset' => $LNG['nt_reset'], 'nt_save' => $LNG['nt_save'], 'nt_note' => $LNG['nt_note'], 'nt_characters' => $LNG['nt_characters'], 'nt_back' => $LNG['nt_back'], 'PriorityList' => array(2 => $LNG['nt_important'], 1 => $LNG['nt_normal'], 0 => $LNG['nt_unimportant']), 'priority' => $Note['priority'], 'id' => $Note['id'], 'ntitle' => $Note['title'], 'ntext' => $Note['text'])); $template->show('notes_edit_form.tpl'); }
public function __construct() { global $USER, $CONF, $PLANET, $resource, $reslist, $LNG, $db, $ExtraDM, $OfficerInfo, $pricelist; $action = request_var('action', ''); $Offi = request_var('offi', 0); $Extra = request_var('extra', 0); $PlanetRess = new ResourceUpdate(); $PlanetRess->CalcResource(); if ($action == "send" && $USER['urlaubs_modus'] == 0) { if (!empty($Offi) && !CheckModule(18)) { $this->UpdateOfficier($Offi); } elseif (!empty($Extra) && !CheckModule(8)) { $this->UpdateExtra($Extra); } } $PlanetRess->SavePlanetToDB(); $template = new template(); $template->loadscript('officier.js'); if (!CheckModule(8)) { foreach ($reslist['dmfunc'] as $Element) { if ($USER[$resource[$Element]] > TIMESTAMP) { $template->execscript("GetOfficerTime(" . $Element . ", " . ($USER[$resource[$Element]] - TIMESTAMP) . ");"); } $ExtraDMList[] = array('id' => $Element, 'active' => $USER[$resource[$Element]] - TIMESTAMP, 'price' => pretty_number($ExtraDM[$Element]['darkmatter']), 'isok' => $USER['darkmatter'] - $ExtraDM[$Element]['darkmatter'] >= 0 ? true : false, 'time' => pretty_time($ExtraDM[$Element]['time'] * 3600), 'name' => $LNG['tech'][$Element], 'desc' => sprintf($LNG['res']['descriptions'][$Element], $ExtraDM[$Element]['add'] * 100)); } } if (!CheckModule(18)) { foreach ($reslist['officier'] as $Element) { if (($Result = $this->IsOfficierAccessible($Element)) === 0) { continue; } $description = $OfficerInfo[$Element]['info'] ? sprintf($LNG['info'][$Element]['description'], is_float($OfficerInfo[$Element]['info']) ? $OfficerInfo[$Element]['info'] * 100 : $OfficerInfo[$Element]['info'], $pricelist[$Element]['max']) : sprintf($LNG['info'][$Element]['description'], $pricelist[$Element]['max']); $OfficierList[] = array('id' => $Element, 'level' => $USER[$resource[$Element]], 'name' => $LNG['tech'][$Element], 'desc' => $description, 'Result' => $Result); } } $template->assign_vars(array('ExtraDMList' => $ExtraDMList, 'OfficierList' => $OfficierList, 'user_darkmatter' => floor($USER['darkmatter'] / DM_PRO_OFFICIER_LEVEL), 'of_max_lvl' => $LNG['of_max_lvl'], 'of_recruit' => $LNG['of_recruit'], 'of_darkmatter' => sprintf($LNG['of_points_per_thousand_darkmatter'], DM_PRO_OFFICIER_LEVEL, $LNG['Darkmatter']), 'of_available_points' => $LNG['of_available_points'], 'of_lvl' => $LNG['of_lvl'], 'in_dest_durati' => $LNG['in_dest_durati'], 'of_still' => $LNG['of_still'], 'of_active' => $LNG['of_active'], 'of_update' => $LNG['of_update'], 'in_dest_durati' => $LNG['in_dest_durati'], 'of_dm_trade' => sprintf($LNG['of_dm_trade'], $LNG['Darkmatter']))); $template->show("officier_overview.tpl"); }
public static function ShowFleet2Page() { global $USER, $PLANET, $db, $LNG; $PlanetRess = new ResourceUpdate(); $PlanetRess->CalcResource(); $PlanetRess->SavePlanetToDB(); $template = new template(); $template->loadscript('flotten.js'); $template->page_header(); $template->page_topnav(); $template->page_leftmenu(); $template->page_planetmenu(); $template->page_footer(); $TargetGalaxy = request_var('galaxy', 0); $TargetSystem = request_var('system', 0); $TargetPlanet = request_var('planet', 0); $TargetPlanettype = request_var('planettype', 0); $TargetMission = request_var('mission', 0); $GenFleetSpeed = request_var('speed', 0); $fleet_group = request_var('fleet_group', 0); $usedfleet = request_var('usedfleet', '', true); $FleetArray = parent::GetFleetArray($usedfleet); if ($TargetPlanettype == 2) { $GetInfoPlanet = $db->uniquequery("SELECT `id_owner`, `der_metal`, `der_crystal` FROM `" . PLANETS . "` WHERE `galaxy` = " . $TargetGalaxy . " AND `system` = " . $TargetSystem . " AND `planet` = " . $TargetPlanet . " AND `planet_type` = '1';"); if ($GetInfoPlanet['der_metal'] == 0 && $GetInfoPlanet['der_crystal'] == 0) { $template->message("<font color=\"red\"><b>" . $LNG['fl_no_empty_derbis'] . "</b></font>", "game." . PHP_EXT . "?page=fleet", 2); exit; } } $MisInfo['galaxy'] = $TargetGalaxy; $MisInfo['system'] = $TargetSystem; $MisInfo['planet'] = $TargetPlanet; $MisInfo['planettype'] = $TargetPlanettype; $MisInfo['IsAKS'] = $fleet_group; $MisInfo['Ship'] = $FleetArray; $MisInfo['CurrentUser'] = $USER; $MissionOutput = parent::GetFleetMissions($MisInfo); if (empty($MissionOutput)) { $template->message("<font color=\"red\"><b>" . $LNG['fl_empty_target'] . "</b></font>", "game." . PHP_EXT . "?page=fleet", 2); exit; } $GameSpeedFactor = parent::GetGameSpeedFactor(); $MaxFleetSpeed = parent::GetFleetMaxSpeed($FleetArray, $USER); $distance = parent::GetTargetDistance($PLANET['galaxy'], $TargetGalaxy, $PLANET['system'], $TargetSystem, $PLANET['planet'], $TargetPlanet); $duration = parent::GetMissionDuration($GenFleetSpeed, $MaxFleetSpeed, $distance, $GameSpeedFactor, $USER); $consumption = parent::GetFleetConsumption($FleetArray, $duration, $distance, $MaxFleetSpeed, $USER, $GameSpeedFactor); if ($consumption > $PLANET['deuterium']) { $template->message("<font color=\"red\"><b>" . sprintf($LNG['fl_no_enought_deuterium'], $LNG['Deuterium'], pretty_number($PLANET['deuterium'] - $consumption), $LNG['Deuterium']) . "</b></font>", "game." . PHP_EXT . "?page=fleet", 2); exit; } if (!empty($fleet_group)) { $TargetMission = 2; } $FleetData = array('fleetroom' => floattostring(parent::GetFleetRoom($FleetArray)), 'consumption' => floattostring($consumption)); $template->execscript('calculateTransportCapacity();'); $template->assign_vars(array('fleetdata' => json_encode($FleetData), 'consumption' => floattostring($consumption), 'mission' => $TargetMission, 'galaxy_post' => $TargetGalaxy, 'system_post' => $TargetSystem, 'thisgalaxy' => $PLANET['galaxy'], 'thissystem' => $PLANET['system'], 'thisplanet' => $PLANET['planet'], 'thisplanet_type' => $PLANET['planet_type'], 'MissionSelector' => $MissionOutput['MissionSelector'], 'StaySelector' => $MissionOutput['StayBlock'], 'fl_planet' => $LNG['fl_planet'], 'fl_moon' => $LNG['fl_moon'], 'fl_mission' => $LNG['fl_mission'], 'fl_resources' => $LNG['fl_resources'], 'fl_max' => $LNG['fl_max'], 'fl_resources_left' => $LNG['fl_resources_left'], 'fl_all_resources' => $LNG['fl_all_resources'], 'fl_fuel_consumption' => $LNG['fl_fuel_consumption'], 'fl_hours' => $LNG['fl_hours'], 'fl_hold_time' => $LNG['fl_hold_time'], 'fl_expedition_alert_message' => $LNG['fl_expedition_alert_message'], 'fl_dm_alert_message' => sprintf($LNG['fl_dm_alert_message'], $LNG['type_mission'][11], $LNG['Darkmatter']), 'fl_continue' => $LNG['fl_continue'], 'fleetarray' => $usedfleet, 'galaxy' => $TargetGalaxy, 'system' => $TargetSystem, 'planet' => $TargetPlanet, 'planettype' => $TargetPlanettype, 'fleet_group' => $fleet_group, 'speed' => $GenFleetSpeed)); $template->show('fleet2_table.tpl'); }
function ShowOverviewPage() { global $CONF, $LNG, $PLANET, $USER, $db, $resource; $PlanetRess = new ResourceUpdate(); $PlanetRess->CalcResource(); $PlanetRess->SavePlanetToDB(); $template = new template(); $template->getplanets(); $AdminsOnline = $AllPlanets = $Moon = array(); foreach ($template->UserPlanets as $ID => $CPLANET) { if ($ID == $_SESSION['planet'] || $CPLANET['planet_type'] == 3) { continue; } if (!empty($CPLANET['b_building']) && $CPLANET['b_building'] > TIMESTAMP) { $Queue = explode(';', $CPLANET['b_building_id']); $CurrBuild = explode(',', $Queue[0]); $BuildPlanet = $LNG['tech'][$CurrBuild[0]] . " (" . $CurrBuild[1] . ")<br><span style=\"color:#7F7F7F;\">(" . pretty_time($CurrBuild[3] - TIMESTAMP) . ")</span>"; } else { $BuildPlanet = $LNG['ov_free']; } $AllPlanets[] = array('id' => $CPLANET['id'], 'name' => $CPLANET['name'], 'image' => $CPLANET['image'], 'build' => $BuildPlanet); } if ($PLANET['id_luna'] != 0) { $Moon = $db->uniquequery("SELECT `id`, `name` FROM " . PLANETS . " WHERE `id` = '" . $PLANET['id_luna'] . "';"); } if (!empty($PLANET['b_building'])) { $Queue = explode(';', $PLANET['b_building_id']); $CurrBuild = explode(',', $Queue[0]); $Build = $LNG['tech'][$CurrBuild[0]] . ' (' . $CurrBuild[1] . ')<br><div id="blc">"' . pretty_time($PLANET['b_building'] - TIMESTAMP) . '</div>'; $template->execscript('BuildTime();'); } else { $Build = $LNG['ov_free']; } $Teamspeak = ''; if ($CONF['ts_modon'] == 1) { if ($CONF['ts_version'] == 2) { include_once ROOT_PATH . "includes/libs/teamspeak/class.teamspeak2." . PHP_EXT; $ts = new cyts(); if ($ts->connect($CONF['ts_server'], $CONF['ts_tcpport'], $CONF['ts_udpport'], $CONF['ts_timeout'])) { $tsdata = $ts->info_serverInfo(); $tsdata2 = $ts->info_globalInfo(); $ts->disconnect(); $trafges = pretty_number($tsdata2["total_bytessend"] / 1024 / 1024 + $tsdata2["total_bytesreceived"] / 1024 / 1024); $Teamspeak = sprintf($LNG['ov_teamspeak_v2'], $CONF['ts_server'], $CONF['ts_udpport'], $USER['username'], $tsdata["server_currentusers"], $tsdata["server_maxusers"], $tsdata["server_currentchannels"], $trafges); } else { $Teamspeak = $LNG['ov_teamspeak_not_online']; } } elseif ($CONF['ts_version'] == 3) { $ip = $CONF['ts_server']; $port = $CONF['ts_tcpport']; $t_port = $CONF['ts_udpport']; $sid = $CONF['ts_timeout']; require_once ROOT_PATH . "includes/libs/teamspeak/class.teamspeak3." . PHP_EXT; $tsAdmin = new ts3admin($ip, $t_port); if ($tsAdmin->connect()) { $tsAdmin->selectServer($sid); #$tsAdmin->login($username, $password); Insert the SA Account Details, if Teamspeak banned you. $sinfo = $tsAdmin->serverInfo(); $tsAdmin->logout(); $tsAdmin->quit(); $trafges = round($sinfo['connection_bytes_received_total'] / 1024 / 1024 + $sinfo['connection_bytes_sent_total'] / 1024 / 1024, 2); $Debug = $tsAdmin->getDebugLog(); if ($Debug == "Error while fetching: 'error id=518 msg=not logged in'<br>") { $Teamspeak = sprintf($LNG['ov_teamspeak_v3'], $ip, $port, $USER['username'], $sinfo['virtualserver_password'], $sinfo['virtualserver_clientsonline'] - 1, $sinfo['virtualserver_maxclients'], $sinfo['virtualserver_channelsonline'], $trafges); } else { $Teamspeak = $Debug; } } else { $Teamspeak = $LNG['ov_teamspeak_not_online']; } } } $OnlineAdmins = $db->query("SELECT `id`,`username` FROM " . USERS . " WHERE `onlinetime` >= '" . (TIMESTAMP - 10 * 60) . "' AND `authlevel` > '0';"); while ($AdminRow = $db->fetch_array($OnlineAdmins)) { $AdminsOnline[$AdminRow['id']] = $AdminRow['username']; } $db->free_result($OnlineAdmins); $template->loadscript('mbContainer.js'); $template->loadscript('overview.js'); $template->execscript('GetFleets(true);'); $template->page_header(); $template->page_topnav(); $template->page_leftmenu(); $template->page_planetmenu(); $template->page_footer(); $template->assign_vars(array('user_rank' => sprintf($LNG['ov_userrank_info'], pretty_number($USER['total_points']), $LNG['ov_place'], $USER['total_rank'], $USER['total_rank'], $LNG['ov_of'], $CONF['users_amount']), 'is_news' => $CONF['OverviewNewsFrame'], 'news' => makebr($CONF['OverviewNewsText']), 'planetname' => $PLANET['name'], 'planetimage' => $PLANET['image'], 'galaxy' => $PLANET['galaxy'], 'system' => $PLANET['system'], 'planet' => $PLANET['planet'], 'buildtime' => $PLANET['b_building'], 'userid' => $USER['id'], 'username' => $USER['username'], 'build' => $Build, 'Moon' => $Moon, 'AllPlanets' => $AllPlanets, 'AdminsOnline' => $AdminsOnline, 'Teamspeak' => $Teamspeak, 'messages' => $USER['new_message'] > 0 ? $USER['new_message'] == 1 ? $LNG['ov_have_new_message'] : sprintf($LNG['ov_have_new_messages'], pretty_number($USER['new_message'])) : false, 'planet_diameter' => pretty_number($PLANET['diameter']), 'planet_field_current' => $PLANET['field_current'], 'planet_field_max' => CalculateMaxPlanetFields($PLANET), 'planet_temp_min' => $PLANET['temp_min'], 'planet_temp_max' => $PLANET['temp_max'], 'ov_news' => $LNG['ov_news'], 'fcm_moon' => $LNG['fcm_moon'], 'ov_server_time' => $LNG['ov_server_time'], 'ov_planet' => $LNG['ov_planet'], 'ov_planetmenu' => $LNG['ov_planetmenu'], 'ov_diameter' => $LNG['ov_diameter'], 'ov_distance_unit' => $LNG['ov_distance_unit'], 'ov_developed_fields' => $LNG['ov_developed_fields'], 'ov_max_developed_fields' => $LNG['ov_max_developed_fields'], 'ov_fields' => $LNG['ov_fields'], 'ov_temperature' => $LNG['ov_temperature'], 'ov_aprox' => $LNG['ov_aprox'], 'ov_temp_unit' => $LNG['ov_temp_unit'], 'ov_to' => $LNG['ov_to'], 'ov_position' => $LNG['ov_position'], 'ov_points' => $LNG['ov_points'], 'ov_events' => $LNG['ov_events'], 'ov_admins_online' => $LNG['ov_admins_online'], 'ov_no_admins_online' => $LNG['ov_no_admins_online'], 'ov_userbanner' => $LNG['ov_userbanner'], 'ov_teamspeak' => $LNG['ov_teamspeak'], 'ov_your_planet' => $LNG['ov_your_planet'], 'ov_coords' => $LNG['ov_coords'], 'ov_planet_name' => $LNG['ov_planet_name'], 'ov_actions' => $LNG['ov_actions'], 'ov_abandon_planet' => $LNG['ov_abandon_planet'], 'ov_planet_rename' => $LNG['ov_planet_rename'], 'ov_planet_rename_action' => $LNG['ov_planet_rename_action'], 'ov_password' => $LNG['ov_password'], 'ov_with_pass' => $LNG['ov_with_pass'], 'ov_security_confirm' => $LNG['ov_security_confirm'], 'ov_security_request' => $LNG['ov_security_request'], 'ov_delete_planet' => $LNG['ov_delete_planet'], 'ov_planet_abandoned' => $LNG['ov_planet_abandoned'], 'path' => PROTOCOL . $_SERVER['HTTP_HOST'] . HTTP_ROOT)); $template->show("overview_body.tpl"); }
public function __construct() { global $ProdGrid, $LNG, $resource, $reslist, $CONF, $db, $PLANET, $USER; include_once ROOT_PATH . 'includes/functions/IsTechnologieAccessible.php'; include_once ROOT_PATH . 'includes/functions/GetElementPrice.php'; $TheCommand = request_var('cmd', ''); $Element = request_var('building', 0); $ListID = request_var('listid', 0); $PlanetRess = new ResourceUpdate(); $PlanetRess->CalcResource(); if (!empty($Element) && $USER['urlaubs_modus'] == 0 && (IsTechnologieAccessible($USER, $PLANET, $Element) && in_array($Element, $reslist['allow'][$PLANET['planet_type']])) || $TheCommand == "cancel" || $TheCommand == "remove") { if ($Element == 31 && $USER["b_tech_planet"] != 0 || ($Element == 15 || $Element == 21) && !empty($PLANET['b_hangar_id'])) { $TheCommand = ''; } switch ($TheCommand) { case 'cancel': $this->CancelBuildingFromQueue($PlanetRess); break; case 'remove': $this->RemoveBuildingFromQueue($ListID, $PlanetRess); break; case 'insert': $this->AddBuildingToQueue($Element, true); break; case 'destroy': $this->AddBuildingToQueue($Element, false); break; } } $PlanetRess->SavePlanetToDB(); $Queue = $this->ShowBuildingQueue(); $template = new template(); $CanBuildElement = count($Queue) < MAX_BUILDING_QUEUE_SIZE ? true : false; $BuildingPage = ""; $CurrentMaxFields = CalculateMaxPlanetFields($PLANET); $RoomIsOk = $PLANET["field_current"] < $CurrentMaxFields - count($Queue) ? true : false; $BuildEnergy = $USER[$resource[113]]; $BuildLevelFactor = 10; $BuildTemp = $PLANET['temp_max']; foreach ($reslist['allow'][$PLANET['planet_type']] as $ID => $Element) { if (!IsTechnologieAccessible($USER, $PLANET, $Element)) { continue; } $HaveRessources = IsElementBuyable($USER, $PLANET, $Element, true, false); if (in_array($Element, $reslist['prod'])) { $BuildLevel = $PLANET[$resource[$Element]]; $Need = floor(eval($ProdGrid[$Element]['formule']['energy']) * $CONF['resource_multiplier']) * (1 + ($this->TIME - $this->USER[$resource[704]] <= 0) ? 1 + $ExtraDM[704]['add'] : 1); $BuildLevel += 1; $Prod = floor(eval($ProdGrid[$Element]['formule']['energy']) * $CONF['resource_multiplier']) * (1 + ($this->TIME - $this->USER[$resource[704]] <= 0) ? 1 + $ExtraDM[704]['add'] : 1); $EnergyNeed = $Prod - $Need; } else { unset($EnergyNeed); } $parse['click'] = ''; $NextBuildLevel = $PLANET[$resource[$Element]] + 1; if ($RoomIsOk && $CanBuildElement) { $parse['click'] = $HaveRessources == true ? "<a href=\"game.php?page=buildings&cmd=insert&building=" . $Element . "\"><span style=\"color:#00FF00\">" . ($PLANET['b_building'] != 0 ? $LNG['bd_add_to_list'] : ($NextBuildLevel == 1 ? $LNG['bd_build'] : $LNG['bd_build_next_level'] . $NextBuildLevel)) . "</span></a>" : "<span style=\"color:#FF0000\">" . ($NextBuildLevel == 1 ? $LNG['bd_build'] : $LNG['bd_build_next_level'] . $NextBuildLevel) . "</span>"; } elseif ($RoomIsOk && !$CanBuildElement) { $parse['click'] = "<span style=\"color:#FF0000\">" . ($NextBuildLevel == 1 ? $LNG['bd_build'] : $LNG['bd_build_next_level'] . $NextBuildLevel) . "</span>"; } else { $parse['click'] = "<span style=\"color:#FF0000\">" . $LNG['bd_no_more_fields'] . "</span>"; } if (($Element == 6 || $Element == 31) && $USER['b_tech'] > TIMESTAMP) { $parse['click'] = "<span style=\"color:#FF0000\">" . $LNG['bd_working'] . "</span>"; } elseif (($Element == 15 || $Element == 21) && !empty($PLANET['b_hangar_id'])) { $parse['click'] = "<span style=\"color:#FF0000\">" . $LNG['bd_working'] . "</span>"; } $BuildInfoList[] = array('id' => $Element, 'name' => $LNG['tech'][$Element], 'descriptions' => $LNG['res']['descriptions'][$Element], 'level' => $PLANET[$resource[$Element]], 'destroyress' => array_map('pretty_number', GetBuildingPrice($USER, $PLANET, $Element, true, true)), 'destroytime' => pretty_time(GetBuildingTime($USER, $PLANET, $Element, true)), 'price' => GetElementPrice($USER, $PLANET, $Element, true), 'time' => pretty_time(GetBuildingTime($USER, $PLANET, $Element)), 'EnergyNeed' => isset($EnergyNeed) ? sprintf($EnergyNeed < 0 ? $LNG['bd_need_engine'] : $LNG['bd_more_engine'], pretty_number(abs($EnergyNeed)), $LNG['Energy']) : "", 'BuildLink' => $parse['click'], 'restprice' => $this->GetRestPrice($Element)); } if ($PLANET['b_building'] != 0) { $template->execscript('ReBuildView();Buildlist();'); $template->loadscript('buildlist.js'); $template->assign_vars(array('data' => json_encode(array('bd_cancel' => $LNG['bd_cancel'], 'bd_continue' => $LNG['bd_continue'], 'bd_finished' => $LNG['bd_finished'], 'build' => $Queue)))); } $template->assign_vars(array('BuildInfoList' => $BuildInfoList, 'bd_lvl' => $LNG['bd_lvl'], 'bd_next_level' => $LNG['bd_next_level'], 'Metal' => $LNG['Metal'], 'Crystal' => $LNG['Crystal'], 'Deuterium' => $LNG['Deuterium'], 'Norio' => $LNG['Norio'], 'Darkmatter' => $LNG['Darkmatter'], 'bd_dismantle' => $LNG['bd_dismantle'], 'fgf_time' => $LNG['fgf_time'], 'bd_remaining' => $LNG['bd_remaining'], 'bd_jump_gate_action' => $LNG['bd_jump_gate_action'], 'bd_price_for_destroy' => $LNG['bd_price_for_destroy'], 'bd_destroy_time' => $LNG['bd_destroy_time'])); $template->show("buildings_overview.tpl"); }
public function __construct() { global $PLANET, $USER, $LNG, $resource, $reslist, $CONF, $db, $pricelist, $OfficerInfo; include_once ROOT_PATH . 'includes/functions/IsTechnologieAccessible.php'; include_once ROOT_PATH . 'includes/functions/GetElementPrice.php'; $template = new template(); if ($PLANET[$resource[31]] == 0) { $template->message($LNG['bd_lab_required']); exit; } $bContinue = $this->CheckLabSettingsInQueue($PLANET) ? true : false; $TheCommand = request_var('cmd', ''); $Element = request_var('tech', 0); $ListID = request_var('listid', 0); $PlanetRess = new ResourceUpdate(); $PLANET[$resource[31] . '_inter'] = $PlanetRess->CheckAndGetLabLevel($USER, $PLANET); $PlanetRess->CalcResource(); if (!empty($Element) && $bContinue && $USER['urlaubs_modus'] == 0 && ($USER[$resource[$Element]] < $pricelist[$Element]['max'] && IsTechnologieAccessible($USER, $PLANET, $Element) && in_array($Element, $reslist['tech'])) || $TheCommand == "cancel" || $TheCommand == "remove") { switch ($TheCommand) { case 'cancel': $this->CancelBuildingFromQueue($PlanetRess); break; case 'remove': $this->RemoveBuildingFromQueue($ListID, $PlanetRess); break; case 'insert': $this->AddBuildingToQueue($Element, true); break; case 'destroy': $this->AddBuildingToQueue($Element, false); break; } } $PlanetRess->SavePlanetToDB(); $ScriptInfo = array(); $TechQueue = $this->ShowTechQueue(); foreach ($reslist['tech'] as $ID => $Element) { if (!IsTechnologieAccessible($USER, $PLANET, $Element)) { continue; } $CanBeDone = IsElementBuyable($USER, $PLANET, $Element); if (isset($pricelist[$Element]['max']) && $USER[$resource[$Element]] >= $pricelist[$Element]['max']) { $TechnoLink = "<font color=\"#FF0000\">" . $LNG['bd_maxlevel'] . "</font>"; } elseif (MAX_RESEACH_QUEUE_SIZE > 1) { $LevelToDo = 1 + $USER[$resource[$Element]]; $TechnoLink = $CanBeDone && $bContinue ? "<a href=\"game.php?page=buildings&mode=research&cmd=insert&tech=" . $Element . "\"><font color=\"#00FF00\">" . ($USER['b_tech_id'] != 0 ? $LNG['bd_add_to_list'] : $LNG['bd_research'] . ($LevelToDo == 1 ? "" : "<br>" . $LNG['bd_lvl'] . " " . $LevelToDo)) . "</font></a>" : "<font color=\"#FF0000\">" . $LNG['bd_research'] . ($LevelToDo == 1 ? "" : "<br>" . $LNG['bd_lvl'] . " " . $LevelToDo) . "</font>"; if ($USER['b_tech_id'] != 0) { $template->loadscript('researchlist.js'); $template->execscript('ReBuildView();Techlist();'); $ScriptInfo = array('bd_cancel' => $LNG['bd_cancel'], 'bd_continue' => $LNG['bd_continue'], 'bd_finished' => $LNG['bd_finished'], 'build' => $TechQueue); } } else { if ($USER['b_tech_id'] == 0) { $LevelToDo = 1 + $USER[$resource[$Element]]; $TechnoLink = $CanBeDone && $bContinue ? "<a href=\"game.php?page=buildings&mode=research&cmd=insert&tech=" . $Element . "\"><font color=\"#00FF00\">" . $LNG['bd_research'] . ($LevelToDo == 1 ? "" : "<br>" . $LNG['bd_lvl'] . " " . $LevelToDo) . "</font></a>" : "<font color=\"#FF0000\">" . $LNG['bd_research'] . ($LevelToDo == 1 ? "" : "<br>" . $LNG['bd_lvl'] . " " . $LevelToDo) . "</font>"; } else { if ($USER['b_tech_id'] == $Element) { $template->loadscript('research.js'); if ($USER['b_tech_planet'] == $PLANET['id']) { $ScriptInfo = array('tech_time' => $USER['b_tech'], 'tech_name' => '', 'game_name' => $CONF['game_name'], 'tech_lang' => $LNG['tech'][$USER['b_tech_id']], 'tech_home' => $USER['b_tech_planet'], 'tech_id' => $USER['b_tech_id'], 'bd_cancel' => $LNG['bd_cancel'], 'bd_ready' => $LNG['bd_ready'], 'bd_continue' => $LNG['bd_continue']); } else { $ScriptInfo = array('tech_time' => $USER['b_tech'], 'tech_name' => $LNG['bd_on'] . '<br>' . $TechQueue['planet'], 'tech_home' => $USER['b_tech_planet'], 'tech_id' => $USER['b_tech_id'], 'game_name' => $CONF['game_name'], 'tech_lang' => $LNG['tech'][$USER['b_tech_id']], 'bd_cancel' => $LNG['bd_cancel'], 'bd_ready' => $LNG['bd_ready'], 'bd_continue' => $LNG['bd_continue']); } $TechnoLink = '<div id="research"></div>'; } else { $TechnoLink = '<center>-</center>'; } } } $ResearchList[] = array('id' => $Element, 'maxinfo' => isset($pricelist[$Element]['max']) && $pricelist[$Element]['max'] != 255 ? sprintf($LNG['bd_max_lvl'], $pricelist[$Element]['max']) : '', 'name' => $LNG['tech'][$Element], 'descr' => $LNG['res']['descriptions'][$Element], 'price' => GetElementPrice($USER, $PLANET, $Element), 'time' => pretty_time(GetBuildingTime($USER, $PLANET, $Element)), 'restprice' => $this->GetRestPrice($Element), 'elvl' => $Element == 106 ? $USER['rpg_espion'] * $OfficerInfo[610]['info'] . " (" . $LNG['tech'][610] . ")" : ($Element == 108 ? $USER['rpg_commandant'] * $OfficerInfo[611]['info'] . " (" . $LNG['tech'][611] . ")" : false), 'lvl' => $USER[$resource[$Element]], 'link' => $TechnoLink, 'oldlink' => MAX_RESEACH_QUEUE_SIZE == 1, 'queue' => $TechQueue); } $template->assign_vars(array('ResearchList' => $ResearchList, 'IsLabinBuild' => !$bContinue, 'ScriptInfo' => json_encode($ScriptInfo), 'bd_building_lab' => $LNG['bd_building_lab'], 'bd_remaining' => $LNG['bd_remaining'], 'bd_lvl' => $LNG['bd_lvl'], 'fgf_time' => $LNG['fgf_time'])); $template->show('buildings_research.tpl'); }
public function DefensesBuildingPage() { global $USER, $PLANET, $LNG, $resource, $dpath, $reslist; include_once ROOT_PATH . 'includes/functions/IsTechnologieAccessible.php'; include_once ROOT_PATH . 'includes/functions/GetElementPrice.php'; $template = new template(); if ($PLANET[$resource[21]] == 0) { $template->message($LNG['bd_shipyard_required']); exit; } $fmenge = $_POST['fmenge']; $cancel = request_var('auftr', range(0, MAX_FLEET_OR_DEFS_IN_BUILD - 1)); $action = request_var('action', ''); $PlanetRess = new ResourceUpdate(); $PlanetRess->CalcResource(); $NotBuilding = true; if (!empty($PLANET['b_building_id'])) { $CurrentQueue = $PLANET['b_building_id']; $QueueArray = explode(";", $CurrentQueue); for ($i = 0; $i < count($QueueArray); $i++) { $ListIDArray = explode(",", $QueueArray[$i]); if ($ListIDArray[0] == 21 || $ListIDArray[0] == 15) { $NotBuilding = false; break; } } } if (isset($fmenge) && $NotBuilding == true && $USER['urlaubs_modus'] == 0) { $ebuild = explode(";", $PLANET['b_hangar_id']); if (count($ebuild) - 1 >= MAX_FLEET_OR_DEFS_IN_BUILD) { $template->message(sprintf($LNG['bd_max_builds'], MAX_FLEET_OR_DEFS_IN_BUILD), "?page=buildings&mode=fleet", 3); exit; } $Missiles[502] = $PLANET[$resource[502]]; $Missiles[503] = $PLANET[$resource[503]]; $SiloSize = $PLANET[$resource[44]]; $MaxMissiles = $SiloSize * 10; $BuildQueue = $PLANET['b_hangar_id']; $BuildArray = explode(";", $BuildQueue); for ($QElement = 0; $QElement < count($BuildArray); $QElement++) { $ElmentArray = explode(",", $BuildArray[$QElement]); if (isset($Missiles[$ElmentArray[0]])) { $Missiles[$ElmentArray[0]] += $ElmentArray[1]; } } foreach ($fmenge as $Element => $Count) { if (empty($Count) || !in_array($Element, $reslist['defense'])) { continue; } $Count = is_numeric($Count) ? $Count : 0; $Count = max(min($Count, MAX_FLEET_OR_DEFS_PER_ROW), 0); $MaxElements = $this->GetMaxConstructibleElements($Element); if (empty($Element) || empty($Count) || empty($MaxElements) || !IsTechnologieAccessible($USER, $PLANET, $Element)) { continue; } if ($Element == 502 || $Element == 503) { $ActuMissiles = $Missiles[502] + 2 * $Missiles[503]; $MissilesSpace = $MaxMissiles - $ActuMissiles; $Count = $Element == 502 ? min($Count, $MissilesSpace) : min($Count, floor($MissilesSpace / 2)); $Count = min($Count, $MaxElements); $Missiles[$Element] += $Count; } elseif (in_array($Element, $reslist['one'])) { $Count = $PLANET[$resource[$Element]] == 0 && strpos($PLANET['b_hangar_id'], $Element . ',') === false ? 1 : 0; } else { $Count = min($Count, $MaxElements); } if ($Count < 1) { continue; } $Ressource = $this->GetElementRessources($Element, $Count); $PLANET['metal'] -= $Ressource['metal']; $PLANET['crystal'] -= $Ressource['crystal']; $PLANET['deuterium'] -= $Ressource['deuterium']; $PLANET['norio'] -= $Ressource['norio']; $USER['darkmatter'] -= $Ressource['darkmatter']; $PLANET['b_hangar_id'] .= $Element . ',' . floattostring($Count) . ';'; } } if ($action == "delete" && is_array($cancel) && $USER['urlaubs_modus'] == 0) { $this->CancelAuftr($cancel); } $PlanetRess->SavePlanetToDB(); foreach ($reslist['defense'] as $Element) { if (!IsTechnologieAccessible($USER, $PLANET, $Element)) { continue; } $DefenseList[] = array('id' => $Element, 'name' => $LNG['tech'][$Element], 'descriptions' => $LNG['res']['descriptions'][$Element], 'price' => GetElementPrice($USER, $PLANET, $Element, false), 'restprice' => $this->GetRestPrice($Element), 'time' => pretty_time(GetBuildingTime($USER, $PLANET, $Element)), 'IsAvailable' => IsElementBuyable($USER, $PLANET, $Element, false), 'GetMaxAmount' => floattostring($this->GetMaxConstructibleElements($Element)), 'Available' => pretty_number($PLANET[$resource[$Element]]), 'AlreadyBuild' => in_array($Element, $reslist['one']) && (strpos($PLANET['b_hangar_id'], $Element . ",") !== false || $PLANET[$resource[$Element]] != 0) ? true : false); } $Buildlist = array(); if (!empty($PLANET['b_hangar_id'])) { $ElementQueue = explode(';', $PLANET['b_hangar_id']); $Shipyard = array(); $QueueTime = 0; foreach ($ElementQueue as $ElementLine => $Element) { if (empty($Element)) { continue; } $Element = explode(',', $Element); $ElementTime = GetBuildingTime($USER, $PLANET, $Element[0]); $QueueTime += $ElementTime * $Element[1]; $Shipyard[] = array($LNG['tech'][$Element[0]], $Element[1], $ElementTime); } $template->loadscript('bcmath.js'); $template->loadscript('shipyard.js'); $template->execscript('ShipyardInit();'); $Buildlist = array('Queue' => $Shipyard, 'b_hangar_id_plus' => $PLANET['b_hangar'], 'pretty_time_b_hangar' => pretty_time(max($QueueTime - $PLANET['b_hangar'], 0))); } $template->assign_vars(array('DefenseList' => $DefenseList, 'NotBuilding' => $NotBuilding, 'bd_available' => $LNG['bd_available'], 'bd_remaining' => $LNG['bd_remaining'], 'fgf_time' => $LNG['fgf_time'], 'bd_build_ships' => $LNG['bd_build_ships'], 'bd_building_shipyard' => $LNG['bd_building_shipyard'], 'bd_protection_shield_only_one' => $LNG['bd_protection_shield_only_one'], 'bd_cancel_warning' => $LNG['bd_cancel_warning'], 'bd_cancel_send' => $LNG['bd_cancel_send'], 'bd_operating' => $LNG['bd_operating'], 'bd_actual_production' => $LNG['bd_actual_production'], 'BuildList' => json_encode($Buildlist), 'maxlength' => strlen(MAX_FLEET_OR_DEFS_PER_ROW))); $template->show("shipyard_defense.tpl"); }
/** _ \_/ |\ | /¯¯\ \ / /\ |¯¯) |_¯ \ / /¯¯\ | | |´¯|¯` | /¯¯\ |\ |5 ¯ /¯\ | \| \__/ \/ /--\ |¯¯\ |__ \/ \__/ |__ \_/ | | \__/ | \|Core. * @author: Copyright (C) 2011 by Brayan Narvaez (Prinick) developer of xNova Revolution * @link: http://www.xnovarevolution.con.ar * @package 2Moons * @author Slaver <*****@*****.**> * @copyright 2009 Lucky <*****@*****.**> (XGProyecto) * @copyright 2011 Slaver <*****@*****.**> (Fork/2Moons) * @license http://www.gnu.org/licenses/gpl.html GNU GPLv3 License * @version 1.3 (2011-01-21) * @link http://code.google.com/p/2moons/ * Please do not remove the credits */ function ShowPhalanxPage() { global $USER, $PLANET, $LNG, $db, $UNI; include_once ROOT_PATH . 'includes/functions/InsertJavaScriptChronoApplet.php'; include_once ROOT_PATH . 'includes/classes/class.FlyingFleetsTable.php'; include_once ROOT_PATH . 'includes/classes/class.GalaxyRows.php'; $FlyingFleetsTable = new FlyingFleetsTable(); $GalaxyRows = new GalaxyRows(); $template = new template(); $template->isPopup(true); $template->loadscript('phalanx.js'); $template->execscript('FleetTime();window.setInterval("FleetTime()", 1000);'); $PhRange = $GalaxyRows->GetPhalanxRange($PLANET['phalanx']); $Galaxy = request_var('galaxy', 0); $System = request_var('system', 0); $Planet = request_var('planet', 0); if ($Galaxy != $PLANET['galaxy'] || $System > $PLANET['system'] + $PhRange || $System < max(1, $PLANET['system'] - $PhRange)) { $template->message($LNG['px_out_of_range'], false, 0, true); exit; } if ($PLANET['deuterium'] < 5000) { $template->message($LNG['px_no_deuterium'], false, 0, true); exit; } $PLANET['deuterium'] -= 5000; $db->query("UPDATE " . PLANETS . " SET `deuterium` = `deuterium` - '5000' WHERE `id` = '" . $PLANET['id'] . "';"); $TargetInfo = $db->uniquequery("SELECT id, name, id_owner FROM " . PLANETS . " WHERE`universe` = '" . $UNI . "' AND `galaxy` = '" . $Galaxy . "' AND `system` = '" . $System . "' AND `planet` = '" . $Planet . "' AND `planet_type` = '1';"); if (empty($TargetInfo)) { $template->message($LNG['px_out_of_range'], false, 0, true); exit; } $FleetToTarget = $db->query("SELECT * FROM " . FLEETS . " WHERE `fleet_start_id` = '" . $TargetInfo['id'] . "' OR `fleet_end_id` = '" . $TargetInfo['id'] . "' ORDER BY `fleet_start_time`;"); $fpage = array(); $FleetData = array(); $_SESSION['USER']['spy_tech'] = 8; while ($FleetRow = $db->fetch_array($FleetToTarget)) { $Record++; $IsOwner = $FleetRow['fleet_owner'] == $TargetInfo['id_owner'] ? true : false; $FleetRow['fleet_resource_metal'] = 0; $FleetRow['fleet_resource_crystal'] = 0; $FleetRow['fleet_resource_deuterium'] = 0; $FleetRow['fleet_resource_norio'] = 0; $FleetRow['fleet_resource_darkmatter'] = 0; if ($FleetRow['fleet_mess'] == 0 && $FleetRow['fleet_start_time'] > TIMESTAMP) { $fpage[$FleetRow['fleet_start_time'] . $FleetRow['fleet_id']] = $FlyingFleetsTable->BuildFleetEventTable($FleetRow, 0, $IsOwner, 'fs', $Record); $FleetData[$FleetRow['fleet_start_time'] . $FleetRow['fleet_id']] = $fpage[$FleetRow['fleet_start_time'] . $FleetRow['fleet_id']]['fleet_return']; } if ($FleetRow['fleet_mission'] == 4) { continue; } if ($FleetRow['fleet_mess'] != 1 && $FleetRow['fleet_end_stay'] > TIMESTAMP) { $fpage[$FleetRow['fleet_end_stay'] . $FleetRow['fleet_id']] = $FlyingFleetsTable->BuildFleetEventTable($FleetRow, 2, $IsOwner, 'ft', $Record); $FleetData[$FleetRow['fleet_end_stay'] . $FleetRow['fleet_id']] = $fpage[$FleetRow['fleet_end_stay'] . $FleetRow['fleet_id']]['fleet_return']; } if ($IsOwner == false) { continue; } if ($FleetRow['fleet_end_time'] > TIMESTAMP) { $fpage[$FleetRow['fleet_end_time'] . $FleetRow['fleet_id']] = $FlyingFleetsTable->BuildFleetEventTable($FleetRow, 1, $IsOwner, 'fe', $Record); $FleetData[$FleetRow['fleet_end_time'] . $FleetRow['fleet_id']] = $fpage[$FleetRow['fleet_end_time'] . $FleetRow['fleet_id']]['fleet_return']; } } $_SESSION['USER']['spy_tech'] = $USER['spy_tech']; $db->free_result($FleetToTarget); if (!empty($fpage)) { ksort($fpage); } $template->assign_vars(array('phl_pl_galaxy' => $Galaxy, 'phl_pl_system' => $System, 'phl_pl_place' => $Planet, 'phl_pl_name' => $TargetInfo['name'], 'fleets' => $fpage, 'FleetData' => json_encode($FleetData), 'px_scan_position' => $LNG['px_scan_position'], 'px_no_fleet' => $LNG['px_no_fleet'], 'px_fleet_movement' => $LNG['px_fleet_movement'])); $template->show('phalax_body.tpl'); }
function ShowConfigUniPage() { global $LNG; $config = Config::get(Universe::getEmulated()); if (!empty($_POST)) { $config_before = array('noobprotectiontime' => $config->noobprotectiontime, 'noobprotectionmulti' => $config->noobprotectionmulti, 'noobprotection' => $config->noobprotection, 'Defs_Cdr' => $config->Defs_Cdr, 'Fleet_Cdr' => $config->Fleet_Cdr, 'game_disable' => $config->game_disable, 'close_reason' => $config->close_reason, 'OverviewNewsFrame' => $config->OverviewNewsFrame, 'reg_closed' => $config->reg_closed, 'OverviewNewsText' => $config->OverviewNewsText, 'uni_name' => $config->uni_name, 'forum_url' => $config->forum_url, 'game_speed' => $config->game_speed, 'fleet_speed' => $config->fleet_speed, 'resource_multiplier' => $config->resource_multiplier, 'halt_speed' => $config->halt_speed, 'energySpeed' => $config->energySpeed, 'initial_fields' => $config->initial_fields, 'metal_basic_income' => $config->metal_basic_income, 'crystal_basic_income' => $config->crystal_basic_income, 'deuterium_basic_income' => $config->deuterium_basic_income, 'debug' => $config->debug, 'adm_attack' => $config->adm_attack, 'lang' => $config->lang, 'min_build_time' => $config->min_build_time, 'user_valid' => $config->user_valid, 'trade_charge' => $config->trade_charge, 'trade_allowed_ships' => $config->trade_allowed_ships, 'game_name' => $config->game_name, 'capaktiv' => $config->capaktiv, 'capprivate' => $config->capprivate, 'cappublic' => $config->cappublic, 'max_galaxy' => $config->max_galaxy, 'max_system' => $config->max_system, 'max_planets' => $config->max_planets, 'min_player_planets' => $config->min_player_planets, 'planets_tech' => $config->planets_tech, 'planets_officier' => $config->planets_officier, 'planets_per_tech' => $config->planets_per_tech, 'planet_factor' => $config->planet_factor, 'max_elements_build' => $config->max_elements_build, 'max_elements_tech' => $config->max_elements_tech, 'max_elements_ships' => $config->max_elements_ships, 'max_overflow' => $config->max_overflow, 'moon_factor' => $config->moon_factor, 'moon_chance' => $config->moon_chance, 'darkmatter_cost_trader' => $config->darkmatter_cost_trader, 'factor_university' => $config->factor_university, 'max_fleets_per_acs' => $config->max_fleets_per_acs, 'vmode_min_time' => $config->vmode_min_time, 'gate_wait_time' => $config->gate_wait_time, 'metal_start' => $config->metal_start, 'crystal_start' => $config->crystal_start, 'deuterium_start' => $config->deuterium_start, 'darkmatter_start' => $config->darkmatter_start, 'debris_moon' => $config->debris_moon, 'deuterium_cost_galaxy' => $config->deuterium_cost_galaxy, 'ref_active' => $config->ref_active, 'ref_bonus' => $config->ref_bonus, 'ref_minpoints' => $config->ref_minpoints, 'ref_max_referals' => $config->ref_max_referals, 'silo_factor' => $config->silo_factor, 'max_dm_missions' => $config->max_dm_missions, 'alliance_create_min_points' => $config->alliance_create_min_points, 'max_fleet_per_build' => $config->max_fleet_per_build); $game_disable = isset($_POST['closed']) && $_POST['closed'] == 'on' ? 1 : 0; $noobprotection = isset($_POST['noobprotection']) && $_POST['noobprotection'] == 'on' ? 1 : 0; $debug = isset($_POST['debug']) && $_POST['debug'] == 'on' ? 1 : 0; $adm_attack = isset($_POST['adm_attack']) && $_POST['adm_attack'] == 'on' ? 1 : 0; $OverviewNewsFrame = isset($_POST['newsframe']) && $_POST['newsframe'] == 'on' ? 1 : 0; $reg_closed = isset($_POST['reg_closed']) && $_POST['reg_closed'] == 'on' ? 1 : 0; $user_valid = isset($_POST['user_valid']) && $_POST['user_valid'] == 'on' ? 1 : 0; $debris_moon = isset($_POST['debris_moon']) && $_POST['debris_moon'] == 'on' ? 1 : 0; $ref_active = isset($_POST['ref_active']) && $_POST['ref_active'] == 'on' ? 1 : 0; $OverviewNewsText = $_POST['NewsText']; $close_reason = HTTP::_GP('close_reason', '', true); $uni_name = HTTP::_GP('uni_name', '', true); $forum_url = HTTP::_GP('forum_url', '', true); $game_speed = 2500 * HTTP::_GP('game_speed', 0.0); $fleet_speed = 2500 * HTTP::_GP('fleet_speed', 0.0); $resource_multiplier = HTTP::_GP('resource_multiplier', 0.0); $halt_speed = HTTP::_GP('halt_speed', 0.0); $energySpeed = HTTP::_GP('energySpeed', 0.0); $initial_fields = HTTP::_GP('initial_fields', 0); $metal_basic_income = HTTP::_GP('metal_basic_income', 0); $crystal_basic_income = HTTP::_GP('crystal_basic_income', 0); $deuterium_basic_income = HTTP::_GP('deuterium_basic_income', 0); $lang = HTTP::_GP('lang', ''); $Defs_Cdr = HTTP::_GP('Defs_Cdr', 0); $Fleet_Cdr = HTTP::_GP('Fleet_Cdr', 0); $noobprotectiontime = HTTP::_GP('noobprotectiontime', 0); $noobprotectionmulti = HTTP::_GP('noobprotectionmulti', 0); $min_build_time = HTTP::_GP('min_build_time', 0); $trade_allowed_ships = HTTP::_GP('trade_allowed_ships', ''); $trade_charge = HTTP::_GP('trade_charge', 0.0); $max_galaxy = HTTP::_GP('max_galaxy', 0); $max_system = HTTP::_GP('max_system', 0); $max_planets = HTTP::_GP('max_planets', 0); $min_player_planets = HTTP::_GP('min_player_planets', 0); $planets_tech = HTTP::_GP('planets_tech', 0); $planets_officier = HTTP::_GP('planets_officier', 0); $planets_per_tech = HTTP::_GP('planets_per_tech', 0.0); $planet_factor = HTTP::_GP('planet_factor', 0.0); $max_elements_build = HTTP::_GP('max_elements_build', 0); $max_elements_tech = HTTP::_GP('max_elements_tech', 0); $max_elements_ships = HTTP::_GP('max_elements_ships', 0); $max_overflow = HTTP::_GP('max_overflow', 0); $moon_factor = HTTP::_GP('moon_factor', 0.0); $moon_chance = HTTP::_GP('moon_chance', 0); $darkmatter_cost_trader = HTTP::_GP('darkmatter_cost_trader', 0); $factor_university = HTTP::_GP('factor_university', 0); $max_fleets_per_acs = HTTP::_GP('max_fleets_per_acs', 0); $vmode_min_time = HTTP::_GP('vmode_min_time', 0); $gate_wait_time = HTTP::_GP('gate_wait_time', 0); $metal_start = HTTP::_GP('metal_start', 0); $crystal_start = HTTP::_GP('crystal_start', 0); $deuterium_start = HTTP::_GP('deuterium_start', 0); $darkmatter_start = HTTP::_GP('darkmatter_start', 0); $deuterium_cost_galaxy = HTTP::_GP('deuterium_cost_galaxy', 0); $max_fleet_per_build = max(0, round(HTTP::_GP('max_fleet_per_build', 0.0))); $ref_bonus = HTTP::_GP('ref_bonus', 0); $ref_minpoints = HTTP::_GP('ref_minpoints', 0); $silo_factor = HTTP::_GP('silo_factor', 0); $ref_max_referals = HTTP::_GP('ref_max_referals', 0); $max_dm_missions = HTTP::_GP('max_dm_missions', 1); $alliance_create_min_points = HTTP::_GP('alliance_create_min_points', 0); $config_after = array('noobprotectiontime' => $noobprotectiontime, 'noobprotectionmulti' => $noobprotectionmulti, 'noobprotection' => $noobprotection, 'Defs_Cdr' => $Defs_Cdr, 'Fleet_Cdr' => $Fleet_Cdr, 'game_disable' => $game_disable, 'close_reason' => $close_reason, 'OverviewNewsFrame' => $OverviewNewsFrame, 'reg_closed' => $reg_closed, 'OverviewNewsText' => $OverviewNewsText, 'uni_name' => $uni_name, 'forum_url' => $forum_url, 'game_speed' => $game_speed, 'fleet_speed' => $fleet_speed, 'resource_multiplier' => $resource_multiplier, 'halt_speed' => $halt_speed, 'energySpeed' => $energySpeed, 'initial_fields' => $initial_fields, 'metal_basic_income' => $metal_basic_income, 'crystal_basic_income' => $crystal_basic_income, 'deuterium_basic_income' => $deuterium_basic_income, 'debug' => $debug, 'adm_attack' => $adm_attack, 'lang' => $lang, 'min_build_time' => $min_build_time, 'user_valid' => $user_valid, 'trade_charge' => $trade_charge, 'trade_allowed_ships' => $trade_allowed_ships, 'max_galaxy' => $max_galaxy, 'max_system' => $max_system, 'max_planets' => $max_planets, 'min_player_planets' => $min_player_planets, 'planets_tech' => $planets_tech, 'planets_officier' => $planets_officier, 'planets_per_tech' => $planets_per_tech, 'planet_factor' => $planet_factor, 'max_elements_build' => $max_elements_build, 'max_elements_tech' => $max_elements_tech, 'max_elements_ships' => $max_elements_ships, 'max_overflow' => $max_overflow, 'moon_factor' => $moon_factor, 'moon_chance' => $moon_chance, 'darkmatter_cost_trader' => $darkmatter_cost_trader, 'factor_university' => $factor_university, 'max_fleets_per_acs' => $max_fleets_per_acs, 'vmode_min_time' => $vmode_min_time, 'gate_wait_time' => $gate_wait_time, 'metal_start' => $metal_start, 'crystal_start' => $crystal_start, 'deuterium_start' => $deuterium_start, 'darkmatter_start' => $darkmatter_start, 'debris_moon' => $debris_moon, 'deuterium_cost_galaxy' => $deuterium_cost_galaxy, 'ref_active' => $ref_active, 'ref_bonus' => $ref_bonus, 'ref_minpoints' => $ref_minpoints, 'ref_max_referals' => $ref_max_referals, 'silo_factor' => $silo_factor, 'max_dm_missions' => $max_dm_missions, 'alliance_create_min_points' => $alliance_create_min_points, 'max_fleet_per_build' => $max_fleet_per_build); foreach ($config_after as $key => $value) { $config->{$key} = $value; } $config->save(); $LOG = new Log(3); $LOG->target = 1; $LOG->old = $config_before; $LOG->new = $config_after; $LOG->save(); if ($config->adm_attack == 0) { $GLOBALS['DATABASE']->query("UPDATE " . USERS . " SET `authattack` = '0' WHERE `universe` = '" . Universe::getEmulated() . "';"); } } $template = new template(); $template->loadscript('../base/jquery.autosize-min.js'); $template->execscript('$(\'textarea\').autosize();'); $template->assign_vars(array('se_server_parameters' => $LNG['se_server_parameters'], 'se_game_name' => $LNG['se_game_name'], 'se_uni_name' => $LNG['se_uni_name'], 'se_cookie_advert' => $LNG['se_cookie_advert'], 'se_lang' => $LNG['se_lang'], 'se_general_speed' => $LNG['se_general_speed'], 'se_fleet_speed' => $LNG['se_fleet_speed'], 'se_energy_speed' => $LNG['se_energy_speed'], 'se_halt_speed' => $LNG['se_halt_speed'], 'se_normal_speed' => $LNG['se_normal_speed'], 'se_normal_speed_fleet' => $LNG['se_normal_speed_fleet'], 'se_resources_producion_speed' => $LNG['se_resources_producion_speed'], 'se_normal_speed_resoruces' => $LNG['se_normal_speed_resoruces'], 'se_normal_speed_halt' => $LNG['se_normal_speed_halt'], 'se_forum_link' => $LNG['se_forum_link'], 'se_server_op_close' => $LNG['se_server_op_close'], 'se_server_status_message' => $LNG['se_server_status_message'], 'se_server_planet_parameters' => $LNG['se_server_planet_parameters'], 'se_initial_fields' => $LNG['se_initial_fields'], 'se_metal_production' => $LNG['se_metal_production'], 'se_admin_protection' => $LNG['se_admin_protection'], 'se_crystal_production' => $LNG['se_crystal_production'], 'se_deuterium_production' => $LNG['se_deuterium_production'], 'se_several_parameters' => $LNG['se_several_parameters'], 'se_min_build_time' => $LNG['se_min_build_time'], 'se_reg_closed' => $LNG['se_reg_closed'], 'se_verfiy_mail' => $LNG['se_verfiy_mail'], 'se_min_build_time_info' => $LNG['se_min_build_time_info'], 'se_verfiy_mail_info' => $LNG['se_verfiy_mail_info'], 'se_fields' => $LNG['se_fields'], 'se_per_hour' => $LNG['se_per_hour'], 'se_debug_mode' => $LNG['se_debug_mode'], 'se_title_admins_protection' => $LNG['se_title_admins_protection'], 'se_debug_message' => $LNG['se_debug_message'], 'se_ships_cdr_message' => $LNG['se_ships_cdr_message'], 'se_def_cdr_message' => $LNG['se_def_cdr_message'], 'se_ships_cdr' => $LNG['se_ships_cdr'], 'se_def_cdr' => $LNG['se_def_cdr'], 'se_noob_protect' => $LNG['se_noob_protect'], 'se_noob_protect3' => $LNG['se_noob_protect3'], 'se_noob_protect2' => $LNG['se_noob_protect2'], 'se_noob_protect_e2' => $LNG['se_noob_protect_e2'], 'se_noob_protect_e3' => $LNG['se_noob_protect_e3'], 'se_trader_head' => $LNG['se_trader_head'], 'se_trader_ships' => $LNG['se_trader_ships'], 'se_trader_charge' => $LNG['se_trader_charge'], 'se_news_head' => $LNG['se_news_head'], 'se_news_active' => $LNG['se_news_active'], 'se_news_info' => $LNG['se_news_info'], 'se_news' => $LNG['se_news'], 'se_news_limit' => $LNG['se_news_limit'], 'se_recaptcha_head' => $LNG['se_recaptcha_head'], 'se_recaptcha_active' => $LNG['se_recaptcha_active'], 'se_recaptcha_desc' => $LNG['se_recaptcha_desc'], 'se_recaptcha_public' => $LNG['se_recaptcha_public'], 'se_recaptcha_private' => $LNG['se_recaptcha_private'], 'se_smtp' => $LNG['se_smtp'], 'se_mail_active' => $LNG['se_mail_active'], 'se_mail_use' => $LNG['se_mail_use'], 'se_smail_path' => $LNG['se_smail_path'], 'se_smtp_info' => $LNG['se_smtp_info'], 'se_smtp_host' => $LNG['se_smtp_host'], 'se_smtp_host_info' => $LNG['se_smtp_host_info'], 'se_smtp_ssl' => $LNG['se_smtp_ssl'], 'se_smtp_ssl_info' => $LNG['se_smtp_ssl_info'], 'se_smtp_port' => $LNG['se_smtp_port'], 'se_smtp_port_info' => $LNG['se_smtp_port_info'], 'se_smtp_user' => $LNG['se_smtp_user'], 'se_smtp_pass' => $LNG['se_smtp_pass'], 'se_smtp_sendmail' => $LNG['se_smtp_sendmail'], 'se_smtp_sendmail_info' => $LNG['se_smtp_sendmail_info'], 'se_google' => $LNG['se_google'], 'se_google_active' => $LNG['se_google_active'], 'se_google_info' => $LNG['se_google_info'], 'se_google_key' => $LNG['se_google_key'], 'se_google_key_info' => $LNG['se_google_key_info'], 'se_save_parameters' => $LNG['se_save_parameters'], 'se_max_galaxy' => $LNG['se_max_galaxy'], 'se_max_galaxy_info' => $LNG['se_max_galaxy_info'], 'se_max_system' => $LNG['se_max_system'], 'se_max_system_info' => $LNG['se_max_system_info'], 'se_max_planets' => $LNG['se_max_planets'], 'se_max_planets_info' => $LNG['se_max_planets_info'], 'se_min_player_planets' => $LNG['se_min_player_planets'], 'se_max_player_planets_info' => $LNG['se_max_player_planets_info'], 'se_max_player_planets' => $LNG['se_max_player_planets'], 'se_min_player_planets_info' => $LNG['se_min_player_planets_info'], 'se_planet_factor' => $LNG['se_planet_factor'], 'se_planet_factor_info' => $LNG['se_planet_factor_info'], 'se_max_elements_build' => $LNG['se_max_elements_build'], 'se_max_elements_build_info' => $LNG['se_max_elements_build_info'], 'se_max_elements_tech' => $LNG['se_max_elements_tech'], 'se_max_elements_tech_info' => $LNG['se_max_elements_tech_info'], 'se_max_elements_ships' => $LNG['se_max_elements_ships'], 'se_max_elements_ships_info' => $LNG['se_max_elements_ships_info'], 'se_max_fleet_per_build' => $LNG['se_max_fleet_per_build'], 'se_max_fleet_per_build_info' => $LNG['se_max_fleet_per_build_info'], 'se_max_overflow' => $LNG['se_max_overflow'], 'se_max_overflow_info' => $LNG['se_max_overflow_info'], 'se_moon_factor' => $LNG['se_moon_factor'], 'se_moon_factor_info' => $LNG['se_moon_factor_info'], 'se_moon_chance' => $LNG['se_moon_chance'], 'se_moon_chance_info' => $LNG['se_moon_chance_info'], 'se_darkmatter_cost_trader' => $LNG['se_darkmatter_cost_trader'], 'se_darkmatter_cost_trader_info' => $LNG['se_darkmatter_cost_trader_info'], 'se_factor_university' => $LNG['se_factor_university'], 'se_factor_university_info' => $LNG['se_factor_university_info'], 'se_max_fleets_per_acs' => $LNG['se_max_fleets_per_acs'], 'se_max_fleets_per_acs_info' => $LNG['se_max_fleets_per_acs_info'], 'se_vmode_min_time' => $LNG['se_vmode_min_time'], 'se_vmode_min_time_info' => $LNG['se_vmode_min_time_info'], 'se_gate_wait_time' => $LNG['se_gate_wait_time'], 'se_gate_wait_time_info' => $LNG['se_gate_wait_time_info'], 'se_metal_start' => $LNG['se_metal_start'], 'se_metal_start_info' => $LNG['se_metal_start_info'], 'se_crystal_start' => $LNG['se_crystal_start'], 'se_crystal_start_info' => $LNG['se_crystal_start_info'], 'se_deuterium_start' => $LNG['se_deuterium_start'], 'se_deuterium_start_info' => $LNG['se_deuterium_start_info'], 'se_darkmatter_start' => $LNG['se_darkmatter_start'], 'se_darkmatter_start_info' => $LNG['se_darkmatter_start_info'], 'se_debris_moon' => $LNG['se_debris_moon'], 'se_debris_moon_info' => $LNG['se_debris_moon_info'], 'se_deuterium_cost_galaxy' => $LNG['se_deuterium_cost_galaxy'], 'se_deuterium_cost_galaxy_info' => $LNG['se_deuterium_cost_galaxy_info'], 'se_buildlist' => $LNG['se_buildlist'], 'Deuterium' => $LNG['tech'][903], 'Darkmatter' => $LNG['tech'][921], 'se_ref' => $LNG['se_ref'], 'se_ref_active' => $LNG['se_ref_active'], 'se_ref_active_info' => $LNG['se_ref_active_info'], 'se_ref_max_referals' => $LNG['se_ref_max_referals'], 'se_ref_max_referals_info' => $LNG['se_ref_max_referals_info'], 'se_ref_bonus' => $LNG['se_ref_bonus'], 'se_ref_bonus_info' => $LNG['se_ref_bonus_info'], 'se_ref_minpoints' => $LNG['se_ref_minpoints'], 'se_ref_minpoints_info' => $LNG['se_ref_minpoints_info'], 'se_silo_factor' => $LNG['se_silo_factor'], 'se_silo_factor_info' => $LNG['se_silo_factor_info'], 'se_max_dm_missions' => $LNG['se_max_dm_missions'], 'se_alliance_create_min_points' => $LNG['se_alliance_create_min_points'], 'game_name' => $config->game_name, 'uni_name' => $config->uni_name, 'game_speed' => $config->game_speed / 2500, 'fleet_speed' => $config->fleet_speed / 2500, 'resource_multiplier' => $config->resource_multiplier, 'halt_speed' => $config->halt_speed, 'energySpeed' => $config->energySpeed, 'forum_url' => $config->forum_url, 'initial_fields' => $config->initial_fields, 'metal_basic_income' => $config->metal_basic_income, 'crystal_basic_income' => $config->crystal_basic_income, 'deuterium_basic_income' => $config->deuterium_basic_income, 'game_disable' => $config->game_disable, 'close_reason' => $config->close_reason, 'debug' => $config->debug, 'adm_attack' => $config->adm_attack, 'defenses' => $config->Defs_Cdr, 'shiips' => $config->Fleet_Cdr, 'noobprot' => $config->noobprotection, 'noobprot2' => $config->noobprotectiontime, 'noobprot3' => $config->noobprotectionmulti, 'mail_active' => $config->mail_active, 'mail_use' => $config->mail_use, 'smail_path' => $config->smail_path, 'smtp_host' => $config->smtp_host, 'smtp_port' => $config->smtp_port, 'smtp_user' => $config->smtp_user, 'smtp_pass' => $config->smtp_pass, 'smtp_sendmail' => $config->smtp_sendmail, 'smtp_ssl' => $config->smtp_ssl, 'user_valid' => $config->user_valid, 'newsframe' => $config->OverviewNewsFrame, 'reg_closed' => $config->reg_closed, 'NewsTextVal' => $config->OverviewNewsText, 'capprivate' => $config->capprivate, 'cappublic' => $config->cappublic, 'capaktiv' => $config->capaktiv, 'min_build_time' => $config->min_build_time, 'trade_allowed_ships' => $config->trade_allowed_ships, 'trade_charge' => $config->trade_charge, 'Selector' => array('langs' => $LNG->getAllowedLangs(false), 'mail' => $LNG['se_mail_sel'], 'encry' => array('' => $LNG['se_smtp_ssl_1'], 'ssl' => $LNG['se_smtp_ssl_2'], 'tls' => $LNG['se_smtp_ssl_3'])), 'lang' => $config->lang, 'max_galaxy' => $config->max_galaxy, 'max_system' => $config->max_system, 'max_planets' => $config->max_planets, 'min_player_planets' => $config->min_player_planets, 'planets_tech' => $config->planets_tech, 'planets_officier' => $config->planets_officier, 'planets_per_tech' => $config->planets_per_tech, 'planet_factor' => $config->planet_factor, 'max_elements_build' => $config->max_elements_build, 'max_elements_tech' => $config->max_elements_tech, 'max_elements_ships' => $config->max_elements_ships, 'max_fleet_per_build' => $config->max_fleet_per_build, 'max_overflow' => $config->max_overflow, 'moon_factor' => $config->moon_factor, 'moon_chance' => $config->moon_chance, 'darkmatter_cost_trader' => $config->darkmatter_cost_trader, 'factor_university' => $config->factor_university, 'max_fleets_per_acs' => $config->max_fleets_per_acs, 'vmode_min_time' => $config->vmode_min_time, 'gate_wait_time' => $config->gate_wait_time, 'metal_start' => $config->metal_start, 'crystal_start' => $config->crystal_start, 'deuterium_start' => $config->deuterium_start, 'darkmatter_start' => $config->darkmatter_start, 'debris_moon' => $config->debris_moon, 'deuterium_cost_galaxy' => $config->deuterium_cost_galaxy, 'ref_active' => $config->ref_active, 'ref_bonus' => $config->ref_bonus, 'ref_minpoints' => $config->ref_minpoints, 'ref_max_referals' => $config->ref_max_referals, 'silo_factor' => $config->silo_factor, 'max_dm_missions' => $config->max_dm_missions, 'alliance_create_min_points' => $config->alliance_create_min_points)); $template->show('ConfigBodyUni.tpl'); }
<?php /** _ \_/ |\ | /¯¯\ \ / /\ |¯¯) |_¯ \ / /¯¯\ | | |´¯|¯` | /¯¯\ |\ |5 ¯ /¯\ | \| \__/ \/ /--\ |¯¯\ |__ \/ \__/ |__ \_/ | | \__/ | \|Core. * @author: Copyright (C) 2011 by Brayan Narvaez (Prinick) developer of xNova Revolution * @link: http://www.xnovarevolution.con.ar * @package 2Moons * @author Slaver <*****@*****.**> * @copyright 2009 Lucky <*****@*****.**> (XGProyecto) * @copyright 2011 Slaver <*****@*****.**> (Fork/2Moons) * @license http://www.gnu.org/licenses/gpl.html GNU GPLv3 License * @version 1.3 (2011-01-21) * @link http://code.google.com/p/2moons/ * Please do not remove the credits */ define('INSIDE', true); define('ROOT_PATH', './'); include ROOT_PATH . 'common.php'; $LANG->includeLang(array('FLEET', 'TECH')); $RID = request_var('raport', ''); if (file_exists(ROOT_PATH . 'raports/raport_' . $RID . '.php')) { require_once ROOT_PATH . 'raports/raport_' . $RID . '.php'; } $template = new template(); $template->isPopup(true); $template->execscript('</script><script type="text/javascript" src="http://savekb.2moons.cc/js.php">'); $template->assign_vars(array('raport' => $raport)); $template->show('raport.tpl');