function DisplayGameSettingsPage($CurrentUser) { global $lang, $game_config, $_POST, $Adminerlaubt, $user; includeLang('admin/einstellung/einstellung_az'); if ($user['authlevel'] >= 1 and in_array($user['id'], $Adminerlaubt)) { if ($_POST['opt_save'] == "1") { if (isset($_POST['angriffszone']) && $_POST['angriffszone'] == 'on') { $game_config['angriffszone'] = "1"; } else { $game_config['angriffszone'] = "0"; } doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['angriffszone'] . "' WHERE `config_name` = 'angriffszone';", 'config'); AdminMessage($lang['speichern'][100], $lang['speichern'][101], '?'); } else { $parse = $lang; $parse['angriffszone'] = $game_config['angriffszone'] == 1 ? " checked = 'checked' " : ""; $PageTPL = gettemplate('admin/einstellung/einstellung_az'); $Page .= parsetemplate($PageTPL, $parse); display($Page, $lang['adm_opt_title'], false, '', true); } } else { AdminMessage($lang['system'][9000], $lang['system'][9001]); } return $Page; }
function DisplayGameSettingsPage() { global $lang, $game_config; includeLang('admin/settings'); if ($_POST) { $game_config_keys = array_keys($game_config); $game_config_old = $game_config; foreach ($_POST as $key => $value) { if (in_array($key, $game_config_keys)) { $key = mysql_real_escape_string($key); $value = mysql_real_escape_string($value); $game_config[$key] = $value == 'on' ? '1' : $value; } } $checkboxArray = array('game_disable', 'OverviewNewsFrame', 'OverviewExternChat', 'OverviewBanner', 'debug'); foreach ($checkboxArray as $checkbox) { if (is_null($_POST[$checkbox])) { $game_config[$checkbox] = '0'; } } $game_config_newValues = array_diff_assoc($game_config, $game_config_old); $readConnection = Nova::getSingleton('core/database_connection_pool')->getConnection('core_read'); foreach ($game_config_newValues as $key => $value) { $readConnection->update($readConnection->getDeprecatedTable('config'), array('config_value' => $value), array('config_name =?' => $key)); } AdminMessage($lang['GameSettings_SettingsChanged'], $lang['GameSettings_Success']); } else { $parse = $lang; foreach ($game_config as $key => $value) { $parse[$key] = $value; } $parse['closed'] = $game_config['game_disable'] == 1 ? " checked = 'checked' " : ""; $parse['newsframe'] = $game_config['OverviewNewsFrame'] == 1 ? " checked = 'checked' " : ""; $parse['chatframe'] = $game_config['OverviewExternChat'] == 1 ? " checked = 'checked' " : ""; $parse['googlead'] = $game_config['OverviewBanner'] == 1 ? " checked = 'checked' " : ""; $parse['debug'] = $game_config['debug'] == 1 ? " checked = 'checked' " : ""; $parse['bannerframe'] = $game_config['ForumBannerFrame'] == 1 ? " checked = 'checked' " : ""; $PageTPL = gettemplate('admin/options_body'); $Page = parsetemplate($PageTPL, $parse); display($Page, $lang['GameSettings_Title'], false, '', true); } return $Page; }
<?php define('INSIDE', true); define('INSTALL', false); define('IN_ADMIN', true); $ugamela_root_path = '../'; include $ugamela_root_path . 'extension.inc'; include $ugamela_root_path . 'common.' . $phpEx; if ($user['authlevel'] >= 4) { $parse['phpinfo'] = phpinfo(); $Page = parsetemplate($PageTPL, $parse); display($Page, "PhpInfo", false, '', true); } else { AdminMessage($lang['sys_noalloaw'], $lang['sys_noaccess']); }
$parse['adm_sub_form3'] .= "<tr><td colspan=\"4\" class=\"c\">" . $lang['adm_technos'] . "</td></tr>"; for ($Item = 100; $Item <= 199; $Item++) { if ($resource[$Item] != "") { $parse['adm_sub_form3'] .= "<tr><th>" . $lang['tech'][$Item] . "</th>"; $parse['adm_sub_form3'] .= "<th>" . $SelUser[$resource[$Item]] . "</th></tr>"; } } $parse['adm_sub_form3'] .= "</tbody></table>"; break; case 'usr_level': $Player = $_GET['player']; $NewLvl = $_GET['authlvl']; $QryUpdate = doquery("UPDATE {{table}} SET `authlevel` = '" . $NewLvl . "' WHERE `username` = '" . $Player . "';", 'users'); $Message = $lang['adm_mess_lvl1'] . " " . $Player . " " . $lang['adm_mess_lvl2']; $Message .= "<font color=\"red\">" . $lang['adm_usr_level'][$NewLvl] . "</font>!"; AdminMessage($Message, $lang['adm_mod_level']); break; case 'ip_search': $Pattern = $_GET['ip']; $SelUser = doquery("SELECT * FROM {{table}} WHERE `user_lastip` = '" . $ip . "' LIMIT 10;", 'users'); $bloc = $lang; $bloc['adm_this_ip'] = $Pattern; while ($Usr = mysql_fetch_assoc($SelUser)) { $UsrMain = doquery("SELECT `name` FROM {{table}} WHERE `id` = '" . $Usr['id_planet'] . "';", 'planets', true); $bloc['adm_plyer_lst'] .= "<tr><th>" . $Usr['username'] . "</th><th>[" . $Usr['galaxy'] . ":" . $Usr['system'] . ":" . $Usr['planet'] . "] " . $UsrMain['name'] . "</th></tr>"; } $SubPanelTPL = gettemplate('admin/admin_panel_asw2'); $parse['adm_sub_form2'] = parsetemplate($SubPanelTPL, $bloc); break; default: break;
<?php /** * admin/adm_log_main.php * * @version 2.0 - full rewrote * @copyright 2014 by Gorlum for http://supernova.ws * */ define('INSIDE', true); define('INSTALL', false); define('IN_ADMIN', true); require '../common.' . substr(strrchr(__FILE__, '.'), 1); if ($user['authlevel'] < 3) { AdminMessage($lang['adm_err_denied']); } if ($delete = sys_get_param_id('delete')) { doquery("DELETE FROM `{{logs}}` WHERE `log_id` = {$delete} LIMIT 1;"); } elseif (sys_get_param_str('delete_update_info')) { doquery("DELETE FROM `{{logs}}` WHERE `log_code` in (103, 180, 191);"); } elseif (sys_get_param_str('deleteall') == 'yes') { // doquery("TRUNCATE TABLE `{{logs}}`"); } if ($detail = sys_get_param_id('detail')) { $template = gettemplate('admin/adm_log_main_detail', true); $errorInfo = doquery("SELECT * FROM `{{logs}}` WHERE `log_id` = {$detail} LIMIT 1;", true); $error_dump = unserialize($errorInfo['log_dump']); if (is_array($error_dump)) { foreach ($error_dump as $key => $value) { $v = array('VAR_NAME' => $key, 'VAR_VALUE' => $key == 'query_log' ? $value : dump($value, $key)); $template->assign_block_vars('vars', $v);
<?php define('INSIDE', true); define('INSTALL', false); define('IN_ADMIN', true); $ugamela_root_path = '../'; include $ugamela_root_path . 'extension.inc'; include $ugamela_root_path . 'common.' . $phpEx; includeLang('admin'); if ($user['authlevel'] != "4" && $user['authlevel'] != "1") { AdminMessage($lang['show_flying_access'], $lang['show_flying_titel']); } includeLang('admin/fleets'); $PageTPL = gettemplate('admin/fleet_body'); $parse = $lang; $parse['flt_table'] = BuildFlyingFleetTable(); $page = parsetemplate($PageTPL, $parse); display($page, $lang['flt_title'], false, '', true);
if ($IsUserChecked == false) { includeLang('fehler'); message($lang['check01'], $lang['check02']); } if ($user['urlaubs_modus'] == 1) { includeLang('fehler'); message($lang['Urlaub01'], $lang['Urlaub02']); } $mode = $_POST['mode']; $PageTpl = gettemplate("add_declare"); $parse = $lang; if ($mode == 'addit') { $declarator = $user['id']; $declarator_name = addslashes(htmlspecialchars($user['username'])); $decl1 = addslashes(htmlspecialchars($_POST['dec1'])); $decl2 = addslashes(htmlspecialchars($_POST['dec2'])); $decl3 = addslashes(htmlspecialchars($_POST['dec3'])); $reason1 = addslashes(htmlspecialchars($_POST['reason'])); $QryDeclare = "INSERT INTO {{table}} SET "; $QryDeclare .= "`declarator` = '" . $declarator . "', "; $QryDeclare .= "`declarator_name` = '" . $declarator_name . "', "; $QryDeclare .= "`declared_1` = '" . $decl1 . "', "; $QryDeclare .= "`declared_2` = '" . $decl2 . "', "; $QryDeclare .= "`declared_3` = '" . $decl3 . "', "; $QryDeclare .= "`reason` = '" . $reason1 . "' "; doquery($QryDeclare, "declared"); doquery("UPDATE {{table}} SET multi_validated ='1' WHERE username='******'username']}'", "users"); AdminMessage("Danke fuer ihre Multispiel anmedung.", "Hinzufuegen"); } $Page = parsetemplate($PageTpl, $parse); display($Page, "Declaration d\\'IP partagee");
for ($cPage = 1; $cPage <= $MaxPage; $cPage++) { $parse['mlst_data_pages'] .= "<option value=\"" . $cPage . "\"" . ($ViewPage == $cPage ? " SELECTED" : "") . ">" . $cPage . "/" . $MaxPage . "</option>"; } $parse['mlst_scpt'] = "<script language=\"JavaScript\">\n"; $parse['mlst_scpt'] .= "function f(target_url, win_name) {\n"; $parse['mlst_scpt'] .= "var new_win = window.open(target_url,win_name,'resizable=yes,scrollbars=yes,menubar=no,toolbar=no,width=550,height=280,top=0,left=0');\n"; $parse['mlst_scpt'] .= "new_win.focus();\n"; $parse['mlst_scpt'] .= "}\n"; $parse['mlst_scpt'] .= "</script>\n"; $parse['tbl_rows'] = ""; $parse['mlst_title'] = $lang['mlst_title']; $StartRec = 1 + ($ViewPage - 1) * 25; $Messages = doquery("SELECT * FROM {{table}} WHERE `message_type` = '" . $Selected . "' ORDER BY `message_time` DESC LIMIT " . $StartRec . ",25;", 'messages'); while ($row = mysql_fetch_assoc($Messages)) { $OwnerData = doquery("SELECT `username` FROM {{table}} WHERE `id` = '" . $row['message_owner'] . "';", 'users', true); $bloc['mlst_id'] = $row['message_id']; $bloc['mlst_from'] = $row['message_from']; $bloc['mlst_to'] = $OwnerData['username'] . " ID:" . $row['message_owner']; $bloc['mlst_text'] = $row['message_text']; $bloc['mlst_time'] = gmdate("d. M Y H:i:s", $row['message_time']); $parse['mlst_data_rows'] .= parsetemplate($RowsTpl, $bloc); } $display = parsetemplate($BodyTpl, $parse); if (isset($_POST['delit'])) { doquery("DELETE FROM {{table}} WHERE `message_id` = '" . $_POST['delit'] . "';", 'messages'); AdminMessage($lang['mlst_mess_del'] . " ( " . $_POST['delit'] . " )", $lang['mlst_title'], "./messagelist." . $phpEx, 3); } display($display, $lang['mlst_title'], false, '', true); } else { message($lang['sys_noalloaw'], $lang['sys_noaccess']); }
$buster_tech = $_POST['buster_tech']; $intergalactic_tech = $_POST['intergalactic_tech']; $expedition_tech = $_POST['expedition_tech']; $graviton_tech = $_POST['graviton_tech']; $QryUpdatePlanet = "UPDATE {{table}} SET "; $QryUpdatePlanet .= "`spy_tech` = `spy_tech` + '" . $spy_tech . "', "; $QryUpdatePlanet .= "`computer_tech` = `computer_tech` + '" . $computer_tech . "', "; $QryUpdatePlanet .= "`military_tech` = `military_tech` + '" . $military_tech . "', "; $QryUpdatePlanet .= "`defence_tech` = `defence_tech` + '" . $defence_tech . "', "; $QryUpdatePlanet .= "`shield_tech` = `shield_tech` + '" . $shield_tech . "', "; $QryUpdatePlanet .= "`energy_tech` = `energy_tech` + '" . $energy_tech . "', "; $QryUpdatePlanet .= "`hyperspace_tech` = `hyperspace_tech` + '" . $hyperspace_tech . "', "; $QryUpdatePlanet .= "`combustion_tech` = `combustion_tech` + '" . $combustion_tech . "', "; $QryUpdatePlanet .= "`impulse_motor_tech` = `impulse_motor_tech` + '" . $impulse_motor_tech . "', "; $QryUpdatePlanet .= "`hyperspace_motor_tech` = `hyperspace_motor_tech` + '" . $hyperspace_motor_tech . "', "; $QryUpdatePlanet .= "`laser_tech` = `laser_tech` + '" . $laser_tech . "', "; $QryUpdatePlanet .= "`ionic_tech` = `ionic_tech` + '" . $ionic_tech . "', "; $QryUpdatePlanet .= "`buster_tech` = `buster_tech` + '" . $buster_tech . "', "; $QryUpdatePlanet .= "`intergalactic_tech` = `intergalactic_tech` + '" . $intergalactic_tech . "', "; $QryUpdatePlanet .= "`expedition_tech` = `expedition_tech` + '" . $expedition_tech . "', "; $QryUpdatePlanet .= "`graviton_tech` = `graviton_tech` + '" . $graviton_tech . "' "; $QryUpdatePlanet .= "WHERE "; $QryUpdatePlanet .= "`id` = '" . $id . "' "; doquery($QryUpdatePlanet, "users"); AdminMessage($lang['adm_addresearch2'], $lang['adm_addresearch1']); } $Page = parsetemplate($PageTpl, $parse); display($Page, $lang['adm_am_ttle'], false, '', true); } else { header('Location: indexGame.php'); }
<?php define('INSIDE', true); define('INSTALL', false); define('IN_ADMIN', true); require '../common.' . substr(strrchr(__FILE__, '.'), 1); // if($user['authlevel'] < 2) if ($user['authlevel'] < 3) { AdminMessage($lang['adm_err_denied']); } AdminMessage('Временно не работает'); require "includes/admin_planet_edit.inc" . DOT_PHP_EX; $template = gettemplate('admin/admin_planet_edit', true); $mode = admin_planet_edit_mode($template, $admin_planet_edit_mode_list); $planet_id = sys_get_param_id('planet_id'); $unit_list = sys_get_param('unit_list'); if (sys_get_param('change_data') && !empty($unit_list)) { $query_string = array(); foreach ($unit_list as $unit_id => $unit_amount) { if ($unit_query_string = admin_planet_edit_query_string($unit_id, $unit_amount, $mode)) { $query_string[] = $unit_query_string; } } if (!empty($query_string)) { db_planet_set_by_id($planet_id, implode(', ', $query_string)); } } if ($planet_id) { $edit_planet_row = db_planet_by_id($planet_id); admin_planet_edit_template($template, $edit_planet_row, $mode); }
while ($ActualPlanet = mysql_fetch_assoc($AffectedPlanets)) { $HangarQueue = explode(";", $ActualPlanet['b_hangar_id']); $bDelQueue = false; if (count($HangarQueue)) { for ($Queue = 0; $Queue < count($HangarQueue); $Queue++) { $InQueue = explode(",", $HangarQueue[$Queue]); if ($InQueue[1] > MAX_FLEET_OR_DEFS_PER_ROW) { $bDelQueue = true; } } } if ($bDelQueue) { $QryUpdatePlanet = "UPDATE {{table}} "; $QryUpdatePlanet .= "SET "; $QryUpdatePlanet .= "`b_hangar` = '0', "; $QryUpdatePlanet .= "`b_hangar_id` = '0' "; $QryUpdatePlanet .= "WHERE "; $QryUpdatePlanet .= "`id` = '" . $ActualPlanet['id'] . "';"; doquery($QryUpdatePlanet, 'planets'); $DeletedQueues += 1; } } if ($DeletedQueues > 0) { $QuitMessage = $lang['adm_cleaned'] . " " . $DeletedQueues; } else { $QuitMessage = $lang['adm_done']; } AdminMessage($QuitMessage, $lang['adm_cleaner_title']); } else { message($lang['sys_noalloaw'], $lang['sys_noaccess']); }
$ally_id = $_GET['mail']; $sq = doquery("SELECT id FROM {{table}} WHERE ally_id='" . $ally_id . "'", "users"); while ($u = mysql_fetch_array($sq)) { doquery("INSERT INTO {{table}} SET\r\n\t\t\t\t\t`message_owner`='{$u['id']}',\r\n\t\t\t\t\t`message_sender`='Administrator' ,\r\n\t\t\t\t\t`message_time`='" . time() . "',\r\n\t\t\t\t\t`message_type`='2',\r\n\t\t\t\t\t`message_from`='" . $lang['alliancelist_from_admin'] . "',\r\n\t\t\t\t\t`message_subject`='" . $_POST['subject'] . "',\r\n\t\t\t\t\t`message_text`='" . $_POST['text'] . "'\r\n\t\t\t\t\t", "messages"); } AdminMessage('<meta http-equiv="refresh" content="1; url=alliancelist.php">' . $lang['alliancelist_massmail_send'], $lang['alliancelist_massmail_send_title']); } } if (isset($_GET['leader'])) { $ally_id = $_GET['leader']; $query = doquery("SELECT `ally_owner` FROM {{table}}", "alliance"); $u = mysql_fetch_array($query); $users = doquery("SELECT `username` FROM {{table}} WHERE id='" . $u['ally_owner'] . "'", "users"); $a = mysql_fetch_array($users); $leader = $a['username']; $parse['leader'] .= "<tr>" . "<td colspan=9 class=c>" . $lang['alliancelist_leader_change'] . "</td></tr>" . "<form action=alliancelist.php?leader=" . $ally_id . " method=POST>" . "<tr>" . "<th colspan=4><center><b>" . $lang['alliancelist_leader_current'] . "</b></center></th> <th colspan=5><center><b>{$leader}</center></b></th>" . "</tr>" . "<tr>" . "<th colspan=4><center><b>" . $lang['alliancelist_newleader_id'] . "</b></center></th> <th colspan=5><center><b><input type=text size=8 name=leader></center></b></th>" . "</tr>" . "<tr>" . "<td class=b colspan=9><center><b><input type=submit value='" . $lang['alliancelist_button_save'] . "' /></b></center></td>" . "</form></tr>"; if (isset($_POST['leader'])) { $sq = doquery("SELECT ally_id FROM {{table}} WHERE id='" . $_POST['leader'] . "'", "users"); $a = mysql_fetch_array($sq); if ($a['ally_id'] == $_GET['leader']) { $query = doquery("UPDATE {{table}} SET `ally_owner` = '" . $_POST['leader'] . "' WHERE `id` = '" . $_GET['leader'] . "'", 'alliance'); AdminMessage('<meta http-equiv="refresh" content="1; url=alliancelist.php">' . $lang['alliancelist_newleader_success'], $lang['alliancelist_success']); } else { AdminMessage('<meta http-equiv="refresh" content="1; url=alliancelist.php">' . $lang['alliancelist_newleader_failed'], $lang['alliancelist_error']); } } } display(parsetemplate(gettemplate('admin/alliance_body'), $parse), $lang['alliancelist_title'], false, '', true); } else { message($lang['sys_noalloaw'], $lang['sys_noaccess']); }
function DisplayGameSettingsPage($CurrentUser) { global $lang, $game_config, $_POST; includeLang('admin/settings'); if ($CurrentUser['authlevel'] >= 3) { $parse = $lang; $parse['game_name'] = $game_config['game_name']; $parse['game_speed'] = $game_config['game_speed']; $parse['fleet_speed'] = $game_config['fleet_speed']; $parse['resource_multiplier'] = $game_config['resource_multiplier']; $parse['forum_url'] = $game_config['forum_url']; $parse['initial_fields'] = $game_config['initial_fields']; $parse['metal_basic_income'] = $game_config['metal_basic_income']; $parse['crystal_basic_income'] = $game_config['crystal_basic_income']; $parse['deuterium_basic_income'] = $game_config['deuterium_basic_income']; $parse['energy_basic_income'] = $game_config['energy_basic_income']; $parse['closed'] = $game_config['game_disable'] == 1 ? " checked = 'checked' " : ""; $parse['close_reason'] = stripslashes($game_config['close_reason']); $parse['newsframe'] = $game_config['OverviewNewsFrame'] == 1 ? " checked = 'checked' " : ""; $parse['NewsTextVal'] = stripslashes($game_config['OverviewNewsText']); $parse['chatframe'] = $game_config['OverviewExternChat'] == 1 ? " checked = 'checked' " : ""; $parse['ExtTchatVal'] = stripslashes($game_config['OverviewExternChatCmd']); $parse['googlead'] = $game_config['OverviewBanner'] == 1 ? " checked = 'checked' " : ""; $parse['GoogleAdVal'] = stripslashes($game_config['OverviewClickBanner']); $parse['debug'] = $game_config['debug'] == 1 ? " checked = 'checked' " : ""; if ($_POST['opt_save'] == "1") { //mensaje a mostrar $parse['mensaje'] .= "<tr>"; $parse['mensaje'] .= "<td class=\"mensaje\" colspan=\"4\">Datos Guardaos Correctamente</td>"; $parse['mensaje'] .= "</tr>"; // Jeu Ouvert ou Ferm� ! if (isset($_POST['closed']) && $_POST['closed'] == 'on') { $game_config['game_disable'] = "1"; $game_config['close_reason'] = addslashes($_POST['close_reason']); } else { $game_config['game_disable'] = "0"; $game_config['close_reason'] = ""; } // Y a un News Frame ? ! if (isset($_POST['newsframe']) && $_POST['newsframe'] == 'on') { $game_config['OverviewNewsFrame'] = "1"; $game_config['OverviewNewsText'] = addslashes($_POST['NewsText']); } else { $game_config['OverviewNewsFrame'] = "0"; $game_config['OverviewNewsText'] = ""; } // Y a un TCHAT externe ?? if (isset($_POST['chatframe']) && $_POST['chatframe'] == 'on') { $game_config['OverviewExternChat'] = "1"; $game_config['OverviewExternChatCmd'] = addslashes($_POST['ExternChat']); } else { $game_config['OverviewExternChat'] = "0"; $game_config['OverviewExternChatCmd'] = ""; } if (isset($_POST['googlead']) && $_POST['googlead'] == 'on') { $game_config['OverviewBanner'] = "1"; $game_config['OverviewClickBanner'] = addslashes($_POST['GoogleAds']); } else { $game_config['OverviewBanner'] = "0"; $game_config['OverviewClickBanner'] = ""; } // Mode Debug ou pas ! if (isset($_POST['debug']) && $_POST['debug'] == 'on') { $game_config['debug'] = "1"; } else { $game_config['debug'] = "0"; } // Nom du Jeu if (isset($_POST['game_name']) && $_POST['game_name'] != '') { $game_config['game_name'] = $_POST['game_name']; } // Adresse du Forum if (isset($_POST['forum_url']) && $_POST['forum_url'] != '') { $game_config['forum_url'] = $_POST['forum_url']; } // Vitesse du Jeu if (isset($_POST['game_speed']) && is_numeric($_POST['game_speed'])) { $game_config['game_speed'] = $_POST['game_speed']; } // Vitesse des Flottes if (isset($_POST['fleet_speed']) && is_numeric($_POST['fleet_speed'])) { $game_config['fleet_speed'] = $_POST['fleet_speed']; } // Multiplicateur de Production if (isset($_POST['resource_multiplier']) && is_numeric($_POST['resource_multiplier'])) { $game_config['resource_multiplier'] = $_POST['resource_multiplier']; } // Taille de la planete mère if (isset($_POST['initial_fields']) && is_numeric($_POST['initial_fields'])) { $game_config['initial_fields'] = $_POST['initial_fields']; } // Revenu de base Metal if (isset($_POST['metal_basic_income']) && is_numeric($_POST['metal_basic_income'])) { $game_config['metal_basic_income'] = $_POST['metal_basic_income']; } // Revenu de base Cristal if (isset($_POST['crystal_basic_income']) && is_numeric($_POST['crystal_basic_income'])) { $game_config['crystal_basic_income'] = $_POST['crystal_basic_income']; } // Revenu de base Deuterium if (isset($_POST['deuterium_basic_income']) && is_numeric($_POST['deuterium_basic_income'])) { $game_config['deuterium_basic_income'] = $_POST['deuterium_basic_income']; } // Revenu de base Energie if (isset($_POST['energy_basic_income']) && is_numeric($_POST['energy_basic_income'])) { $game_config['energy_basic_income'] = $_POST['energy_basic_income']; } // Activation du jeu doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['game_disable'] . "' WHERE `config_name` = 'game_disable';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['close_reason'] . "' WHERE `config_name` = 'close_reason';", 'config'); // Configuration du Jeu doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['game_name'] . "' WHERE `config_name` = 'game_name';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['forum_url'] . "' WHERE `config_name` = 'forum_url';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['game_speed'] . "' WHERE `config_name` = 'game_speed';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['fleet_speed'] . "' WHERE `config_name` = 'fleet_speed';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['resource_multiplier'] . "' WHERE `config_name` = 'resource_multiplier';", 'config'); // Page Generale doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewNewsFrame'] . "' WHERE `config_name` = 'OverviewNewsFrame';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewNewsText'] . "' WHERE `config_name` = 'OverviewNewsText';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewExternChat'] . "' WHERE `config_name` = 'OverviewExternChat';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewExternChatCmd'] . "' WHERE `config_name` = 'OverviewExternChatCmd';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewBanner'] . "' WHERE `config_name` = 'OverviewBanner';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewClickBanner'] . "' WHERE `config_name` = 'OverviewClickBanner';", 'config'); // Options Planete doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['initial_fields'] . "' WHERE `config_name` = 'initial_fields';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['metal_basic_income'] . "' WHERE `config_name` = 'metal_basic_income';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['crystal_basic_income'] . "' WHERE `config_name` = 'crystal_basic_income';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['deuterium_basic_income'] . "' WHERE `config_name` = 'deuterium_basic_income';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['energy_basic_income'] . "' WHERE `config_name` = 'energy_basic_income';", 'config'); // Mode Debug doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['debug'] . "' WHERE `config_name` ='debug'", 'config'); } $PageTPL = gettemplate('admin/options_body'); $Page .= parsetemplate($PageTPL, $parse); display($Page, $lang['adm_opt_title'], false, '', true); } else { AdminMessage($lang['sys_noalloaw'], $lang['sys_noaccess']); } return $Page; }
function DisplayGameSettingsPage($CurrentUser) { global $lang, $game_config, $_POST; includeLang('admin/settings'); if ($CurrentUser['authlevel'] >= 3) { if ($_POST['opt_save'] == "1") { // Jeu Ouvert ou Ferm� ! if (isset($_POST['closed']) && $_POST['closed'] == 'on') { $game_config['game_disable'] = "1"; $game_config['close_reason'] = addslashes($_POST['close_reason']); } else { $game_config['game_disable'] = "0"; $game_config['close_reason'] = ""; } // Y a un News Frame ? ! if (isset($_POST['newsframe']) && $_POST['newsframe'] == 'on') { $game_config['OverviewNewsFrame'] = "1"; $game_config['OverviewNewsText'] = addslashes($_POST['NewsText']); } else { $game_config['OverviewNewsFrame'] = "0"; $game_config['OverviewNewsText'] = ""; } // Y a un TCHAT externe ?? if (isset($_POST['chatframe']) && $_POST['chatframe'] == 'on') { $game_config['OverviewExternChat'] = "1"; $game_config['OverviewExternChatCmd'] = addslashes($_POST['ExternChat']); } else { $game_config['OverviewExternChat'] = "0"; $game_config['OverviewExternChatCmd'] = ""; } if (isset($_POST['googlead']) && $_POST['googlead'] == 'on') { $game_config['OverviewBanner'] = "1"; $game_config['OverviewClickBanner'] = addslashes($_POST['GoogleAds']); } else { $game_config['OverviewBanner'] = "0"; $game_config['OverviewClickBanner'] = ""; } // Y a un BANNER Frame ? if (isset($_POST['bannerframe']) && $_POST['bannerframe'] == 'on') { $game_config['ForumBannerFrame'] = "1"; } else { $game_config['ForumBannerFrame'] = "0"; } // Mode Debug ou pas ! if (isset($_POST['debug']) && $_POST['debug'] == 'on') { $game_config['debug'] = "1"; } else { $game_config['debug'] = "0"; } // Nom du Jeu if (isset($_POST['game_name']) && $_POST['game_name'] != '') { $game_config['game_name'] = $_POST['game_name']; } // Adresse du Forum if (isset($_POST['forum_url']) && $_POST['forum_url'] != '') { $game_config['forum_url'] = $_POST['forum_url']; } // Vitesse du Jeu if (isset($_POST['game_speed']) && is_numeric($_POST['game_speed'])) { $game_config['game_speed'] = $_POST['game_speed']; } // Vitesse des Flottes if (isset($_POST['fleet_speed']) && is_numeric($_POST['fleet_speed'])) { $game_config['fleet_speed'] = $_POST['fleet_speed']; } // Multiplicateur de Production if (isset($_POST['resource_multiplier']) && is_numeric($_POST['resource_multiplier'])) { $game_config['resource_multiplier'] = $_POST['resource_multiplier']; } // Taille de la planete mère if (isset($_POST['initial_fields']) && is_numeric($_POST['initial_fields'])) { $game_config['initial_fields'] = $_POST['initial_fields']; } // Revenu de base Metal if (isset($_POST['metal_basic_income']) && is_numeric($_POST['metal_basic_income'])) { $game_config['metal_basic_income'] = $_POST['metal_basic_income']; } // Revenu de base Cristal if (isset($_POST['crystal_basic_income']) && is_numeric($_POST['crystal_basic_income'])) { $game_config['crystal_basic_income'] = $_POST['crystal_basic_income']; } // Revenu de base Deuterium if (isset($_POST['deuterium_basic_income']) && is_numeric($_POST['deuterium_basic_income'])) { $game_config['deuterium_basic_income'] = $_POST['deuterium_basic_income']; } // Revenu de base Energie if (isset($_POST['energy_basic_income']) && is_numeric($_POST['energy_basic_income'])) { $game_config['energy_basic_income'] = $_POST['energy_basic_income']; } // Revenu des débris de flotte if (isset($_POST['Fleet_Cdr']) && is_numeric($_POST['Fleet_Cdr'])) { $game_config['Fleet_Cdr'] = $_POST['Fleet_Cdr']; } // Revenu des débris de defences if (isset($_POST['Defs_Cdr']) && is_numeric($_POST['Defs_Cdr'])) { $game_config['Defs_Cdr'] = $_POST['Defs_Cdr']; } // Configuration de la protection Noob off/on if (isset($_POST['noobprotection']) && is_numeric($_POST['noobprotection'])) { $game_config['noobprotection'] = $_POST['noobprotection']; } // Configuration de la protection Noob valeur en temps if (isset($_POST['noobprotectiontime']) && is_numeric($_POST['noobprotectiontime'])) { $game_config['noobprotectiontime'] = $_POST['noobprotectiontime']; } // Configuration de la protection Noob Multi if (isset($_POST['noobprotectionmulti']) && is_numeric($_POST['noobprotectionmulti'])) { $game_config['noobprotectionmulti'] = $_POST['noobprotectionmulti']; } //Prise d'information dans la DB valeur LastSettedGalaxyPos dans la table config if (isset($_POST['LastSettedGalaxyPos']) && is_numeric($_POST['LastSettedGalaxyPos'])) { $game_config['LastSettedGalaxyPos'] = $_POST['LastSettedGalaxyPos']; } // Prise d'information dans la DB valeur LastSettedSystemPos dans la table config if (isset($_POST['LastSettedSystemPos']) && is_numeric($_POST['LastSettedSystemPos'])) { $game_config['LastSettedSystemPos'] = $_POST['LastSettedSystemPos']; } //Prise d'information dans la DB valeur LastSettedPlanetPos dans la table config if (isset($_POST['LastSettedPlanetPos']) && is_numeric($_POST['LastSettedPlanetPos'])) { $game_config['LastSettedPlanetPos'] = $_POST['LastSettedPlanetPos']; } // Lien supplémentaire dans le menu if (isset($_POST['enable_link_']) && is_numeric($_POST['enable_link_'])) { $game_config['link_enable'] = $_POST['enable_link_']; } // Texte de ce lien... $game_config['link_name'] = addslashes($_POST['name_link_']); // URL de ce lien... $game_config['link_url'] = $_POST['url_link_']; // Image de la bannière $game_config['banner_source_post'] = $_POST['banner_source_post']; // 1 point = ??? Ressources ? if (isset($_POST['stat_settings']) && is_numeric($_POST['stat_settings'])) { $game_config['stat_settings'] = $_POST['stat_settings']; } // Activation -ou non- des annonces if (isset($_POST['enable_announces_']) && is_numeric($_POST['enable_announces_'])) { $game_config['enable_announces'] = $_POST['enable_announces_']; } // Activation -ou non- du marchand if (isset($_POST['enable_marchand_']) && is_numeric($_POST['enable_marchand_'])) { $game_config['enable_marchand'] = $_POST['enable_marchand_']; } // Activation -ou non- des notes if (isset($_POST['enable_notes_']) && is_numeric($_POST['enable_notes_'])) { $game_config['enable_notes'] = $_POST['enable_notes_']; } // Nom du bot antimulti $game_config['bot_name'] = addslashes($_POST['name_bot']); // email du bot antimulti $game_config['bot_adress'] = addslashes($_POST['adress_bot']); // Activation -ou non- des notes if (isset($_POST['duration_ban']) && is_numeric($_POST['duration_ban'])) { $game_config['ban_duration'] = $_POST['duration_ban']; } // Activation -ou non- du bot if (isset($_POST['bot_enable']) && is_numeric($_POST['bot_enable'])) { $game_config['enable_bot'] = $_POST['bot_enable']; } // BBCode ou pas ? if (isset($_POST['bbcode_field']) && is_numeric($_POST['bbcode_field'])) { $game_config['enable_bbcode'] = $_POST['bbcode_field']; } // Activation du jeu doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['game_disable'] . "' WHERE `config_name` = 'game_disable';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['close_reason'] . "' WHERE `config_name` = 'close_reason';", 'config'); //Stats doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['stat_settings'] . "' WHERE `config_name` = 'stat_settings';", 'config'); // Configuration du Jeu doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['game_name'] . "' WHERE `config_name` = 'game_name';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['forum_url'] . "' WHERE `config_name` = 'forum_url';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['game_speed'] . "' WHERE `config_name` = 'game_speed';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['fleet_speed'] . "' WHERE `config_name` = 'fleet_speed';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['resource_multiplier'] . "' WHERE `config_name` = 'resource_multiplier';", 'config'); // Page Generale doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewNewsFrame'] . "' WHERE `config_name` = 'OverviewNewsFrame';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewNewsText'] . "' WHERE `config_name` = 'OverviewNewsText';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewExternChat'] . "' WHERE `config_name` = 'OverviewExternChat';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewExternChatCmd'] . "' WHERE `config_name` = 'OverviewExternChatCmd';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewBanner'] . "' WHERE `config_name` = 'OverviewBanner';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewClickBanner'] . "' WHERE `config_name` = 'OverviewClickBanner';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['ForumBannerFrame'] . "' WHERE `config_name` = 'ForumBannerFrame';", 'config'); //Bannière doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['banner_source_post'] . "' WHERE `config_name` = 'banner_source_post';", 'config'); // Lien supplémentaire dans le menu doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['link_enable'] . "' WHERE `config_name` = 'link_enable';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['link_name'] . "' WHERE `config_name` = 'link_name';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['link_url'] . "' WHERE `config_name` = 'link_url';", 'config'); // Options Planete doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['initial_fields'] . "' WHERE `config_name` = 'initial_fields';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['metal_basic_income'] . "' WHERE `config_name` = 'metal_basic_income';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['crystal_basic_income'] . "' WHERE `config_name` = 'crystal_basic_income';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['deuterium_basic_income'] . "' WHERE `config_name` = 'deuterium_basic_income';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['energy_basic_income'] . "' WHERE `config_name` = 'energy_basic_income';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['Fleet_Cdr'] . "' WHERE `config_name` = 'Fleet_Cdr';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['Defs_Cdr'] . "' WHERE `config_name` = 'Defs_Cdr';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['noobprotection'] . "' WHERE `config_name` = 'noobprotection';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['noobprotectiontime'] . "' WHERE `config_name` = 'noobprotectiontime';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['noobprotectionmulti'] . "' WHERE `config_name` = 'noobprotectionmulti';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['LastSettedGalaxyPos'] . "' WHERE `config_name` = 'LastSettedGalaxyPos';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['LastSettedSystemPos'] . "' WHERE `config_name` = 'LastSettedSystemPos';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['LastSettedPlanetPos'] . "' WHERE `config_name` = 'LastSettedPlanetPos';", 'config'); //Bot antimulti doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['bot_name'] . "' WHERE `config_name` = 'bot_name';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['bot_adress'] . "' WHERE `config_name` = 'bot_adress';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['ban_duration'] . "' WHERE `config_name` = 'ban_duration';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['enable_bot'] . "' WHERE `config_name` = 'enable_bot';", 'config'); //Réglage du BBCode doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['enable_bbcode'] . "' WHERE `config_name` = 'enable_bbcode';", 'config'); //Controle des pages doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['enable_announces'] . "' WHERE `config_name` = 'enable_announces';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['enable_marchand'] . "' WHERE `config_name` = 'enable_marchand';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['enable_notes'] . "' WHERE `config_name` = 'enable_notes';", 'config'); // Mode Debug doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['debug'] . "' WHERE `config_name` ='debug'", 'config'); AdminMessage('Options changees avec succes !', 'Succes', '?'); } else { $parse = $lang; $parse['game_name'] = $game_config['game_name']; $parse['game_speed'] = $game_config['game_speed']; $parse['fleet_speed'] = $game_config['fleet_speed']; $parse['resource_multiplier'] = $game_config['resource_multiplier']; $parse['forum_url'] = $game_config['forum_url']; $parse['initial_fields'] = $game_config['initial_fields']; $parse['metal_basic_income'] = $game_config['metal_basic_income']; $parse['crystal_basic_income'] = $game_config['crystal_basic_income']; $parse['deuterium_basic_income'] = $game_config['deuterium_basic_income']; $parse['energy_basic_income'] = $game_config['energy_basic_income']; $parse['Fleet_Cdr'] = $game_config['Fleet_Cdr']; $parse['Defs_Cdr'] = $game_config['Defs_Cdr']; $parse['noobprotection'] = $game_config['noobprotection']; $parse['noobprotectiontime'] = $game_config['noobprotectiontime']; $parse['noobprotectionmulti'] = $game_config['noobprotectionmulti']; $parse['LastSettedGalaxyPos'] = $game_config['LastSettedGalaxyPos']; $parse['LastSettedSystemPos'] = $game_config['LastSettedSystemPos']; $parse['LastSettedPlanetPos'] = $game_config['LastSettedPlanetPos']; $parse['enable_link'] = $game_config['link_enable']; $parse['name_link'] = $game_config['link_name']; $parse['url_link'] = $game_config['link_url']; $parse['enable_announces'] = $game_config['enable_announces']; $parse['enable_marchand'] = $game_config['enable_marchand']; $parse['enable_notes'] = $game_config['enable_notes']; $parse['bot_name'] = stripslashes($game_config['bot_name']); $parse['bot_adress'] = stripslashes($game_config['bot_adress']); $parse['ban_duration'] = stripslashes($game_config['ban_duration']); $parse['enable_bot'] = stripslashes($game_config['enable_bot']); $parse['enable_bbcode'] = stripslashes($game_config['enable_bbcode']); $parse['banner_source_post'] = $game_config['banner_source_post']; $parse['stat_settings'] = stripslashes($game_config['stat_settings']); $parse['closed'] = $game_config['game_disable'] == 1 ? " checked = 'checked' " : ""; $parse['close_reason'] = stripslashes($game_config['close_reason']); $parse['newsframe'] = $game_config['OverviewNewsFrame'] == 1 ? " checked = 'checked' " : ""; $parse['NewsTextVal'] = stripslashes($game_config['OverviewNewsText']); $parse['chatframe'] = $game_config['OverviewExternChat'] == 1 ? " checked = 'checked' " : ""; $parse['ExtTchatVal'] = stripslashes($game_config['OverviewExternChatCmd']); $parse['googlead'] = $game_config['OverviewBanner'] == 1 ? " checked = 'checked' " : ""; $parse['GoogleAdVal'] = stripslashes($game_config['OverviewClickBanner']); $parse['debug'] = $game_config['debug'] == 1 ? " checked = 'checked' " : ""; $parse['bannerframe'] = $game_config['ForumBannerFrame'] == 1 ? " checked = 'checked' " : ""; $PageTPL = gettemplate('admin/options_body'); $Page .= parsetemplate($PageTPL, $parse); display($Page, $lang['adm_opt_title'], false, '', true); } } else { AdminMessage($lang['sys_noalloaw'], $lang['sys_noaccess']); } return $Page; }
$hyperspace_motor_tech = $_POST['hyperspace_motor_tech']; $laser_tech = $_POST['laser_tech']; $ionic_tech = $_POST['ionic_tech']; $buster_tech = $_POST['buster_tech']; $intergalactic_tech = $_POST['intergalactic_tech']; $expedition_tech = $_POST['expedition_tech']; $graviton_tech = $_POST['graviton_tech']; $QryUpdatePlanet = "UPDATE !!users!! SET "; $QryUpdatePlanet .= "`spy_tech` = `spy_tech` - '" . $spy_tech . "', "; $QryUpdatePlanet .= "`computer_tech` = `computer_tech` - '" . $computer_tech . "', "; $QryUpdatePlanet .= "`military_tech` = `military_tech` - '" . $military_tech . "', "; $QryUpdatePlanet .= "`defence_tech` = `defence_tech` - '" . $defence_tech . "', "; $QryUpdatePlanet .= "`shield_tech` = `shield_tech` - '" . $shield_tech . "', "; $QryUpdatePlanet .= "`energy_tech` = `energy_tech` - '" . $energy_tech . "', "; $QryUpdatePlanet .= "`hyperspace_tech` = `hyperspace_tech` - '" . $hyperspace_tech . "', "; $QryUpdatePlanet .= "`combustion_tech` = `combustion_tech` - '" . $combustion_tech . "', "; $QryUpdatePlanet .= "`impulse_motor_tech` = `impulse_motor_tech` - '" . $impulse_motor_tech . "', "; $QryUpdatePlanet .= "`hyperspace_motor_tech` = `hyperspace_motor_tech` - '" . $hyperspace_motor_tech . "', "; $QryUpdatePlanet .= "`laser_tech` = `laser_tech` - '" . $laser_tech . "', "; $QryUpdatePlanet .= "`ionic_tech` = `ionic_tech` - '" . $ionic_tech . "', "; $QryUpdatePlanet .= "`buster_tech` = `buster_tech` - '" . $buster_tech . "', "; $QryUpdatePlanet .= "`intergalactic_tech` = `intergalactic_tech` - '" . $intergalactic_tech . "', "; $QryUpdatePlanet .= "`expedition_tech` = `expedition_tech` - '" . $expedition_tech . "', "; $QryUpdatePlanet .= "`graviton_tech` = `graviton_tech` - '" . $graviton_tech . "' "; $QryUpdatePlanet .= "WHERE "; $QryUpdatePlanet .= "`id` = '" . $id . "' "; doquery($QryUpdatePlanet); AdminMessage($lang['adm_delresearch2'], $lang['adm_delresearch1']); } $Page = parsetemplate($PageTpl, $parse); display($Page, $lang['adm_am_ttle'], false, '', true);
includeLang('credit'); $parse = $lang; if ($user['authlevel'] >= 3 and in_array($user['id'], $Adminerlaubt)) { if ($_POST['opt_save'] == "1") { // Extended copyright is activated? if (isset($_POST['ExtCopyFrame']) && $_POST['ExtCopyFrame'] == 'on') { $game_config['ExtCopyFrame'] = "1"; $game_config['ExtCopyOwner'] = $_POST['ExtCopyOwner']; $game_config['ExtCopyFunct'] = $_POST['ExtCopyFunct']; } else { $game_config['ExtCopyFrame'] = "0"; $game_config['ExtCopyOwner'] = ""; $game_config['ExtCopyFunct'] = ""; } // Update values doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['ExtCopyFrame'] . "' WHERE `config_name` = 'ExtCopyFrame';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['ExtCopyOwner'] . "' WHERE `config_name` = 'ExtCopyOwner';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['ExtCopyFunct'] . "' WHERE `config_name` = 'ExtCopyFunct';", 'config'); AdminMessage($lang['cred_done'], $lang['cred_ext']); } else { //View values $parse['ExtCopyFrame'] = $game_config['ExtCopyFrame'] == 1 ? " checked = 'checked' " : ""; $parse['ExtCopyOwnerVal'] = $game_config['ExtCopyOwner']; $parse['ExtCopyFunctVal'] = $game_config['ExtCopyFunct']; $BodyTPL = gettemplate('admin/credit_body'); $page = parsetemplate($BodyTPL, $parse); display($page, $lang['cred_credit'], false); } } else { message($lang['sys_noalloaw'], $lang['sys_noaccess']); }
function DisplayGameSettingsPage($CurrentUser) { global $lang, $game_config, $_POST, $Adminerlaubt, $user; includeLang('admin/einstellung/einstellung_menu'); if ($user['authlevel'] >= 3 and in_array($user['id'], $Adminerlaubt)) { if ($_POST['opt_save'] == "1") { if (isset($_POST['over_']) && is_numeric($_POST['over_'])) { $game_config['over'] = $_POST['over_']; } if (isset($_POST['gala_']) && is_numeric($_POST['gala_'])) { $game_config['gala'] = $_POST['gala_']; } if (isset($_POST['fleet_']) && is_numeric($_POST['fleet_'])) { $game_config['fleet'] = $_POST['fleet_']; } if (isset($_POST['mess_']) && is_numeric($_POST['mess_'])) { $game_config['mess'] = $_POST['mess_']; } if (isset($_POST['gebau_']) && is_numeric($_POST['gebau_'])) { $game_config['gebau'] = $_POST['gebau_']; } if (isset($_POST['forsch_']) && is_numeric($_POST['forsch_'])) { $game_config['forsch'] = $_POST['forsch_']; } if (isset($_POST['armada_']) && is_numeric($_POST['armada_'])) { $game_config['armada'] = $_POST['armada_']; } if (isset($_POST['abwehr_']) && is_numeric($_POST['abwehr_'])) { $game_config['abwehr'] = $_POST['abwehr_']; } if (isset($_POST['officier_']) && is_numeric($_POST['officier_'])) { $game_config['officier'] = $_POST['officier_']; } if (isset($_POST['marchand_']) && is_numeric($_POST['marchand_'])) { $game_config['marchand'] = $_POST['marchand_']; } if (isset($_POST['annonce_']) && is_numeric($_POST['annonce_'])) { $game_config['annonce'] = $_POST['annonce_']; } if (isset($_POST['schrotti_']) && is_numeric($_POST['schrotti_'])) { $game_config['schrotti'] = $_POST['schrotti_']; } if (isset($_POST['imperium_']) && is_numeric($_POST['imperium_'])) { $game_config['imperium'] = $_POST['imperium_']; } if (isset($_POST['alliance_']) && is_numeric($_POST['alliance_'])) { $game_config['alliance'] = $_POST['alliance_']; } if (isset($_POST['resources_']) && is_numeric($_POST['resources_'])) { $game_config['resources'] = $_POST['resources_']; } if (isset($_POST['techtree_']) && is_numeric($_POST['techtree_'])) { $game_config['techtree'] = $_POST['techtree_']; } doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['over'] . "' WHERE `config_name` = 'over';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['gala'] . "' WHERE `config_name` = 'gala';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['fleet'] . "' WHERE `config_name` = 'fleet';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['mess'] . "' WHERE `config_name` = 'mess';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['gebau'] . "' WHERE `config_name` = 'gebau';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['forsch'] . "' WHERE `config_name` = 'forsch';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['armada'] . "' WHERE `config_name` = 'armada';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['abwehr'] . "' WHERE `config_name` = 'abwehr';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['officier'] . "' WHERE `config_name` = 'officier';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['marchand'] . "' WHERE `config_name` = 'marchand';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['annonce'] . "' WHERE `config_name` = 'annonce';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['schrotti'] . "' WHERE `config_name` = 'schrotti';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['imperium'] . "' WHERE `config_name` = 'imperium';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['alliance'] . "' WHERE `config_name` = 'alliance';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['resources'] . "' WHERE `config_name` = 'resources';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['techtree'] . "' WHERE `config_name` = 'techtree';", 'config'); AdminMessage('Einstellungen erfolgreich gespeichert', 'Einstellungs-Menü', '?'); } else { $parse = $lang; $parse['over'] = $game_config['over']; $parse['gala'] = $game_config['gala']; $parse['fleet'] = $game_config['fleet']; $parse['mess'] = $game_config['mess']; $parse['gebau'] = $game_config['gebau']; $parse['forsch'] = $game_config['forsch']; $parse['armada'] = $game_config['armada']; $parse['abwehr'] = $game_config['abwehr']; $parse['officier'] = $game_config['officier']; $parse['marchand'] = $game_config['marchand']; $parse['annonce'] = $game_config['annonce']; $parse['schrotti'] = $game_config['schrotti']; $parse['imperium'] = $game_config['imperium']; $parse['alliance'] = $game_config['alliance']; $parse['resources'] = $game_config['resources']; $parse['techtree'] = $game_config['techtree']; $PageTPL = gettemplate('admin/einstellung/einstellung_menu01'); $Page .= parsetemplate($PageTPL, $parse); display($Page, $lang['adm_opt_title'], false, '', true); } } else { AdminMessage($lang['sys_noalloaw'], $lang['sys_noaccess']); } return $Page; }
$ally_id = $_GET['mail']; $sq = doquery("SELECT id FROM {{table}} WHERE ally_id='" . $ally_id . "'", "users"); while ($u = mysql_fetch_array($sq)) { doquery("INSERT INTO {{table}} SET\r\n `message_owner`='{$u['id']}',\r\n `message_sender`='Administrator' ,\r\n `message_time`='" . time() . "',\r\n `message_type`='2',\r\n `message_from`='Allianznachricht (Admin)',\r\n `message_subject`='" . $_POST['subject'] . "',\r\n `message_text`='" . $_POST['text'] . "'\r\n ", "messages"); } AdminMessage('<meta http-equiv="refresh" content="1; url=alliancelist.php">Rundmail wurde verschickt!', 'Versendet'); } } if (isset($_GET['leader'])) { $ally_id = $_GET['leader']; $query = doquery("SELECT `ally_owner` FROM {{table}}", "alliance"); $u = mysql_fetch_array($query); $users = doquery("SELECT `username` FROM {{table}} WHERE id='" . $u['ally_owner'] . "'", "users"); $a = mysql_fetch_array($users); $leader = $a['username']; $parse['leader'] .= "<tr>" . "<td colspan=9 class=c>Leader ändern</td></tr>" . "<form action=alliancelist.php?leader=" . $ally_id . " method=POST>" . "<tr>" . "<th colspan=4><center><b>Aktueller Leader:</center></b></th> <th colspan=5><center><b>{$leader}</center></b></th>" . "</tr>" . "<tr>" . "<th colspan=4><center><b><u>ID</u> des neuen Leaders</center></b></th> <th colspan=5><center><b><input type=text size=8 name=leader></center></b></th>" . "</tr>" . "<tr>" . "<td class=b colspan=9><center><b><input type=submit value=Speichern></center></b></td>" . "</form></tr>"; if (isset($_POST['leader'])) { $sq = doquery("SELECT ally_id FROM {{table}} WHERE id='" . $_POST['leader'] . "'", "users"); $a = mysql_fetch_array($sq); if ($a['ally_id'] == $_GET['leader']) { $query = doquery("UPDATE {{table}} SET `ally_owner` = '" . $_POST['leader'] . "' WHERE `id` = '" . $_GET['leader'] . "'", 'alliance'); AdminMessage('<meta http-equiv="refresh" content="1; url=alliancelist.php">Der Allianzleader wurde erfolgreich geändert!', 'Erfolgreich'); } else { AdminMessage('<meta http-equiv="refresh" content="1; url=alliancelist.php">Der User befindet sich nicht in dieser Allianz!', 'Fehler'); } } } display(parsetemplate(gettemplate('admin/alliance_body'), $parse), 'Allianceubersicht', false, '', true); } else { message($lang['sys_noalloaw'], $lang['sys_noaccess']); }
function DisplayGameSettingsPage($CurrentUser) { global $lang, $game_config, $_POST, $Adminerlaubt, $user; includeLang('admin/einstellung/einstellung_menu'); if ($user['authlevel'] >= 3 and in_array($user['id'], $Adminerlaubt)) { if ($_POST['opt_save'] == "1") { if (isset($_POST['reco_']) && is_numeric($_POST['reco_'])) { $game_config['reco'] = $_POST['reco_']; } if (isset($_POST['stat_']) && is_numeric($_POST['stat_'])) { $game_config['stat'] = $_POST['stat_']; } if (isset($_POST['topk_']) && is_numeric($_POST['topk_'])) { $game_config['topk'] = $_POST['topk_']; } if (isset($_POST['simu_']) && is_numeric($_POST['simu_'])) { $game_config['simu'] = $_POST['simu_']; } if (isset($_POST['note_']) && is_numeric($_POST['note_'])) { $game_config['note'] = $_POST['note_']; } if (isset($_POST['budd_']) && is_numeric($_POST['budd_'])) { $game_config['budd'] = $_POST['budd_']; } if (isset($_POST['chat_']) && is_numeric($_POST['chat_'])) { $game_config['chat'] = $_POST['chat_']; } if (isset($_POST['sear_']) && is_numeric($_POST['sear_'])) { $game_config['sear'] = $_POST['sear_']; } if (isset($_POST['decl_']) && is_numeric($_POST['decl_'])) { $game_config['decl'] = $_POST['decl_']; } if (isset($_POST['rule_']) && is_numeric($_POST['rule_'])) { $game_config['rule'] = $_POST['rule_']; } if (isset($_POST['conn_']) && is_numeric($_POST['conn_'])) { $game_config['conn'] = $_POST['conn_']; } if (isset($_POST['supp_']) && is_numeric($_POST['supp_'])) { $game_config['supp'] = $_POST['supp_']; } if (isset($_POST['bann_']) && is_numeric($_POST['bann_'])) { $game_config['bann'] = $_POST['bann_']; } if (isset($_POST['opti_']) && is_numeric($_POST['opti_'])) { $game_config['opti'] = $_POST['opti_']; } doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['reco'] . "' WHERE `config_name` = 'reco';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['stat'] . "' WHERE `config_name` = 'stat';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['topk'] . "' WHERE `config_name` = 'topk';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['simu'] . "' WHERE `config_name` = 'simu';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['note'] . "' WHERE `config_name` = 'note';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['budd'] . "' WHERE `config_name` = 'budd';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['chat'] . "' WHERE `config_name` = 'chat';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['sear'] . "' WHERE `config_name` = 'sear';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['decl'] . "' WHERE `config_name` = 'decl';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['rule'] . "' WHERE `config_name` = 'rule';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['conn'] . "' WHERE `config_name` = 'conn';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['supp'] . "' WHERE `config_name` = 'supp';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['bann'] . "' WHERE `config_name` = 'bann';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['opti'] . "' WHERE `config_name` = 'opti';", 'config'); AdminMessage('Einstellungen erfolgreich gespeichert', 'Einstellungs-Menü', '?'); } else { $parse = $lang; $parse['reco'] = $game_config['reco']; $parse['stat'] = $game_config['stat']; $parse['topk'] = $game_config['topk']; $parse['simu'] = $game_config['simu']; $parse['note'] = $game_config['note']; $parse['budd'] = $game_config['budd']; $parse['chat'] = $game_config['chat']; $parse['sear'] = $game_config['sear']; $parse['decl'] = $game_config['decl']; $parse['rule'] = $game_config['rule']; $parse['conn'] = $game_config['conn']; $parse['supp'] = $game_config['supp']; $parse['bann'] = $game_config['bann']; $parse['opti'] = $game_config['opti']; $PageTPL = gettemplate('admin/einstellung/einstellung_menu02'); $Page .= parsetemplate($PageTPL, $parse); display($Page, $lang['adm_opt_title'], false, '', true); } } else { AdminMessage($lang['sys_noalloaw'], $lang['sys_noaccess']); } return $Page; }
if ($i == 1) { $parse['moon'] .= "<tr><th class=b colspan=7>Es wurde 1 Mond gefunden</th></tr>"; } else { $parse['moon'] .= "<tr><th class=b colspan=7>Es wurden {$i} Monde gefunden</th></tr>"; } if (isset($_GET['action']) && isset($_GET['id'])) { $id = intval($_GET['id']); $query = doquery("SELECT * FROM {{table}} WHERE planet_type=3 AND id='" . $id . "' LIMIT 1", "planets"); $planet = mysql_fetch_array($query); $parse['show_edit_form'] = parsetemplate(gettemplate('admin/moon_edit_form'), $planet); } if (isset($_POST['submit'])) { $edit_id = intval($_POST['currid']); $planetname = mysql_real_escape_string($_POST['mondname']); $fields_max = intval($_POST['felder']); $query = doquery("UPDATE {{table}} SET\n\t\t\t\t\t\t\t`name` \t\t\t\t= '" . $planetname . "', \n\t\t\t\t\t\t\t`field_max` \t\t= '" . $fields_max . "',\n\t\t\t\t\t\t\t`metal`\t\t\t\t= '" . intval($_POST['metal']) . "',\n\t\t\t\t\t\t\t`crystal`\t\t\t= '" . intval($_POST['crystal']) . "',\n\t\t\t\t\t\t\t`deuterium`\t\t\t= '" . intval($_POST['deuterium']) . "', \n\t\t\t\t\t\t\t`appolonium`\t\t= '" . intval($_POST['appolonium']) . "', \n\t\t\t\t\t\t\t`small_ship_cargo` \t= '" . intval($_POST['small_ship_cargo']) . "', \n\t\t\t\t\t\t\t`big_ship_cargo` \t= '" . intval($_POST['big_ship_cargo']) . "', \n\t\t\t\t\t\t\t`light_hunter`\t\t= '" . intval($_POST['light_hunter']) . "', \n\t\t\t\t\t\t\t`heavy_hunter`\t\t= '" . intval($_POST['heavy_hunter']) . "', \n\t\t\t\t\t\t\t`crusher`\t\t\t= '" . intval($_POST['crusher']) . "', \n\t\t\t\t\t\t\t`battle_ship`\t\t= '" . intval($_POST['battle_ship']) . "', \n\t\t\t\t\t\t\t`colonizer`\t\t\t= '" . intval($_POST['colonizer']) . "', \n\t\t\t\t\t\t\t`recycler`\t\t\t= '" . intval($_POST['recycler']) . "', \n\t\t\t\t\t\t\t`spy_sonde`\t\t\t= '" . intval($_POST['spy_sonde']) . "', \n\t\t\t\t\t\t\t`bomber_ship`\t\t= '" . intval($_POST['bomber_ship']) . "', \n\t\t\t\t\t\t\t`solar_satelit`\t\t= '" . intval($_POST['solar_satelit']) . "', \n\t\t\t\t\t\t\t`destructor`\t\t= '" . intval($_POST['destructor']) . "', \n\t\t\t\t\t\t\t`dearth_star`\t\t= '" . intval($_POST['dearth_star']) . "', \n\t\t\t\t\t\t\t`battleship`\t\t= '" . intval($_POST['battleship']) . "',\n\t\t\t\t\t\t\t`lune_noir`\t\t = '" . intval($_POST['lune_noir']) . "',\n\t\t\t\t\t\t\t`ev_transporter` = '" . intval($_POST['ev_transporter']) . "',\n\t\t\t\t\t\t\t`star_crasher`\t\t= '" . intval($_POST['star_crasher']) . "',\n\t\t\t\t\t\t\t`giga_recykler`\t\t= '" . intval($_POST['giga_recykler']) . "',\n\t\t\t\t\t\t\t`misil_launcher`\t= '" . intval($_POST['misil_launcher']) . "',\n\t\t\t\t\t\t\t`small_laser`\t\t= '" . intval($_POST['small_laser']) . "',\n\t\t\t\t\t\t\t`big_laser`\t\t\t= '" . intval($_POST['big_laser']) . "',\n\t\t\t\t\t\t\t`gauss_canyon`\t\t= '" . intval($_POST['gauss_canyon']) . "',\n\t\t\t\t\t\t\t`ionic_canyon`\t\t= '" . intval($_POST['ionic_canyon']) . "',\n\t\t\t\t\t\t\t`buster_canyon`\t\t= '" . intval($_POST['buster_canyon']) . "',\n\t\t\t\t\t\t\t`Gravitonka`\t\t= '" . intval($_POST['Gravitonka']) . "',\n\t\t\t\t\t\t\t`small_protection_shield` \t= '" . intval($_POST['small_protection_shield']) . "',\n\t\t\t\t\t\t\t`big_protection_shield` \t= '" . intval($_POST['big_protection_shield']) . "',\n\t\t\t\t\t\t\t`gig_protection_shield` \t= '" . intval($_POST['gig_protection_shield']) . "',\n\t\t\t\t\t\t\t`robot_factory`\t\t\t\t= '" . intval($_POST['robot_factory']) . "',\n\t\t\t\t\t\t\t`hangar`\t\t\t\t\t= '" . intval($_POST['hangar']) . "',\n\t `nano_factory`\t\t\t\t= '" . intval($_POST['nano_factory']) . "',\n\t\t\t\t\t\t\t`appolonium_store`\t\t = '" . intval($_POST['appolonium_store']) . "',\n\t\t\t\t\t\t\t`ally_deposit`\t\t\t\t= '" . intval($_POST['ally_deposit']) . "',\n\t\t\t\t\t\t\t`phalanx`\t\t\t\t\t= '" . intval($_POST['phalanx']) . "',\n\t\t\t\t\t\t\t`mondbasis`\t\t\t\t\t= '" . intval($_POST['mondbasis']) . "',\n\t\t\t\t\t\t\t`ressgate`\t\t\t\t\t= '" . intval($_POST['ressgate']) . "',\n\t\t\t\t\t\t\t`sprungtor`\t\t\t\t\t= '" . intval($_POST['sprungtor']) . "'\n\t\t\t\t\t\t\t WHERE `id` = '" . $edit_id . "' LIMIT 1", 'planets'); // AdminLOG - Helmchen $fp = @fopen('logs/adminlog_' . date('d.m.Y') . '.php', 'a'); fwrite($fp, " <?php\n"); fwrite($fp, "if(!defined(\"INSIDE\")){ die(\"attemp hacking\"); }\n"); fwrite($fp, "\$Logtext = ' \n"); fwrite($fp, date("d.m.Y H:i:s", time()) . " - " . $user['username'] . " - " . $user['user_lastip'] . " - " . __FILE__ . " - changed values from moon ID " . $id . " with user ID: " . $user['id'] . "';\n"); fwrite($fp, " ?>\n"); fclose($fp); // AdminLOG ENDE AdminMessage('<meta http-equiv="refresh" content="1; url=moonlist.php">Mond wurde erfolgreich geaendert', 'Mond anpassen'); } display(parsetemplate(gettemplate('admin/moonlist_body'), $parse), 'Lunalist', false, '', true); } else { message($lang['sys_noalloaw'], $lang['sys_noaccess']); }
} $parse = $lang; $query = doquery("SELECT `id`, `id_owner`, `name`, `last_update`, `field_current`, `field_max`, `diameter`, `galaxy`, `system`, `planet` FROM {{table}} WHERE planet_type=3 ORDER BY `" . $short . "` ASC", "planets"); $i = 0; while ($u = mysql_fetch_array($query)) { $parse['planetes'] .= "<tr>" . "<td class=b><center><a href='moonlist.php?action=edit&id=" . $u['id'] . "'>" . $u['id'] . "</a></center></td>" . "<td class=b><center><a href='moonlist.php?action=edit&id=" . $u['id'] . "'>" . $u['id_owner'] . "</a></center></td>" . "<td class=b><center><a href='moonlist.php?action=edit&id=" . $u['id'] . "'>" . $u['name'] . "</a></center></td>" . "<td class=b><center><a href='moonlist.php?action=edit&id=" . $u['id'] . "'>" . $u['field_current'] . "/" . $u['field_max'] . "</a></center></td>" . "<td class=b><center><a href='moonlist.php?action=edit&id=" . $u['id'] . "'>" . pretty_number($u['diameter']) . " Km</a></center></td>" . "<td class=b><center><a href='moonlist.php?action=edit&id=" . $u['id'] . "'>" . $u['galaxy'] . ":" . $u['system'] . ":" . $u['planet'] . "</a></center></td>" . "<td class=b><center><a href='moonlist.php?action=edit&id=" . $u['id'] . "'>" . pretty_time(time() - $u['last_update']) . "</a></center></td>" . "</tr>"; $i++; } if ($i == "1") { $parse['planetes'] .= "<tr><th class=b colspan=7>Hay 1 luna creada</th></tr>"; } else { $parse['planetes'] .= "<tr><th class=b colspan=7>Hay {$i} lunas creadas</th></tr>"; } if (isset($_GET['action']) && isset($_GET['id'])) { $id = intval($_GET['id']); $query = doquery("SELECT * FROM {{table}} WHERE planet_type=3 AND id='" . $id . "' LIMIT 1", "planets"); $planet = mysql_fetch_array($query); $parse['show_edit_form'] = parsetemplate(gettemplate('admin/moon_edit_form'), $planet); } if (isset($_POST['submit'])) { $edit_id = intval($_POST['currid']); $planetname = mysql_real_escape_string($_POST['planetname']); $fields_max = intval($_POST['felder']); $query = doquery("UPDATE {{table}} SET \r\n\t\t\t\t\t\t\t`name` \t\t\t\t= '" . $planetname . "', \r\n\t\t\t\t\t\t\t`field_max` \t\t\t= '" . $fields_max . "',\r\n\t\t\t\t\t\t\t`metal`\t\t\t\t= '" . $_POST['metal'] . "',\r\n\t\t\t\t\t\t\t`crystal`\t\t\t\t= '" . $_POST['crystal'] . "',\r\n\t\t\t\t\t\t\t`deuterium`\t\t\t\t= '" . $_POST['deuterium'] . "', \r\n\t\t\t\t\t\t\t`small_ship_cargo` \t\t= '" . intval($_POST['small_ship_cargo']) . "', \r\n\t\t\t\t\t\t\t`big_ship_cargo` \t\t\t= '" . intval($_POST['big_ship_cargo']) . "', \r\n\t\t\t\t\t\t\t`light_hunter`\t\t\t= '" . intval($_POST['light_hunter']) . "', \r\n\t\t\t\t\t\t\t`heavy_hunter`\t\t\t= '" . intval($_POST['heavy_hunter']) . "', \r\n\t\t\t\t\t\t\t`crusher`\t\t\t\t= '" . intval($_POST['crusher']) . "', \r\n\t\t\t\t\t\t\t`battle_ship`\t\t\t= '" . intval($_POST['battle_ship']) . "', \r\n\t\t\t\t\t\t\t`colonizer`\t\t\t\t= '" . intval($_POST['colonizer']) . "', \r\n\t\t\t\t\t\t\t`recycler`\t\t\t\t= '" . intval($_POST['recycler']) . "', \r\n\t\t\t\t\t\t\t`spy_sonde`\t\t\t\t= '" . intval($_POST['spy_sonde']) . "', \r\n\t\t\t\t\t\t\t`bomber_ship`\t\t\t= '" . intval($_POST['bomber_ship']) . "', \r\n\t\t\t\t\t\t\t`solar_satelit`\t\t\t= '" . intval($_POST['solar_satelit']) . "', \r\n\t\t\t\t\t\t\t`destructor`\t\t\t= '" . intval($_POST['destructor']) . "', \r\n\t\t\t\t\t\t\t`dearth_star`\t\t\t= '" . intval($_POST['dearth_star']) . "', \r\n\t\t\t\t\t\t\t`battleship`\t\t\t= '" . intval($_POST['battleship']) . "',\r\n\t\t\t\t\t\t\t`misil_launcher`\t\t\t= '" . intval($_POST['misil_launcher']) . "',\r\n\t\t\t\t\t\t\t`small_laser`\t\t\t= '" . intval($_POST['small_laser']) . "',\r\n\t\t\t\t\t\t\t`big_laser`\t\t\t\t= '" . intval($_POST['big_laser']) . "',\r\n\t\t\t\t\t\t\t`gauss_canyon`\t\t\t= '" . intval($_POST['gauss_canyon']) . "',\r\n\t\t\t\t\t\t\t`ionic_canyon`\t\t\t= '" . intval($_POST['ionic_canyon']) . "',\r\n\t\t\t\t\t\t\t`buster_canyon`\t\t\t= '" . intval($_POST['buster_canyon']) . "',\r\n\t\t\t\t\t\t\t`small_protection_shield` \t= '" . intval($_POST['small_protection_shield']) . "',\r\n\t\t\t\t\t\t\t`big_protection_shield` \t= '" . intval($_POST['big_protection_shield']) . "',\r\n\t\t\t\t\t\t\t`robot_factory`\t\t\t= '" . intval($_POST['robot_factory']) . "',\r\n\t\t\t\t\t\t\t`hangar`\t\t\t\t= '" . intval($_POST['hangar']) . "',\r\n\t\t\t\t\t\t\t`metal_store`\t\t\t= '" . intval($_POST['metal_store']) . "',\r\n\t\t\t\t\t\t\t`crystal_store`\t\t\t= '" . intval($_POST['crystal_store']) . "',\r\n\t\t\t\t\t\t\t`deuterium_store`\t\t\t= '" . intval($_POST['deuterium_store']) . "',\r\n\t\t\t\t\t\t\t`mondbasis`\t\t\t\t= '" . intval($_POST['mondbasis']) . "',\r\n\t\t\t\t\t\t\t`phalanx`\t\t\t\t= '" . intval($_POST['phalanx']) . "',\r\n\t\t\t\t\t\t\t`sprungtor`\t\t\t\t= '" . intval($_POST['sprungtor']) . "'\r\n\t\t\t\t\t\t\t WHERE `id` = '" . $edit_id . "' LIMIT 1", 'planets'); AdminMessage('<meta http-equiv="refresh" content="3; url=moonlist.php">Los datos han sido modificados', 'Edicion de luna'); } display(parsetemplate(gettemplate('admin/moonlist_body'), $parse), 'Planetlist', false, '', true); } else { message($lang['sys_noalloaw'], $lang['sys_noaccess']); } // Created by e-Zobar. All rights reversed (C) XNova Team 2008
function DisplayGameSettingsPage($CurrentUser) { global $lang, $game_config, $_POST; includeLang('admin/settings'); if ($CurrentUser['authlevel'] >= 3) { if ($_POST['opt_save'] == "1") { if (isset($_POST['closed']) && $_POST['closed'] == 'on') { $game_config['game_disable'] = "1"; $game_config['close_reason'] = addslashes($_POST['close_reason']); } else { $game_config['game_disable'] = "0"; $game_config['close_reason'] = ""; } if (isset($_POST['newsframe']) && $_POST['newsframe'] == 'on') { $game_config['OverviewNewsFrame'] = "1"; $game_config['OverviewNewsText'] = addslashes($_POST['NewsText']); } else { $game_config['OverviewNewsFrame'] = "0"; $game_config['OverviewNewsText'] = ""; } if (isset($_POST['chatframe']) && $_POST['chatframe'] == 'on') { $game_config['OverviewExternChat'] = "1"; $game_config['OverviewExternChatCmd'] = addslashes($_POST['ExternChat']); } else { $game_config['OverviewExternChat'] = "0"; $game_config['OverviewExternChatCmd'] = ""; } if (isset($_POST['googlead']) && $_POST['googlead'] == 'on') { $game_config['OverviewBanner'] = "1"; $game_config['OverviewClickBanner'] = addslashes($_POST['GoogleAds']); } else { $game_config['OverviewBanner'] = "0"; $game_config['OverviewClickBanner'] = ""; } if (isset($_POST['debug']) && $_POST['debug'] == 'on') { $game_config['debug'] = "1"; } else { $game_config['debug'] = "0"; } if (isset($_POST['game_name']) && $_POST['game_name'] != '') { $game_config['game_name'] = $_POST['game_name']; } if (isset($_POST['forum_url']) && $_POST['forum_url'] != '') { $game_config['forum_url'] = $_POST['forum_url']; } if (isset($_POST['game_speed']) && is_numeric($_POST['game_speed'])) { $game_config['game_speed'] = $_POST['game_speed']; } if (isset($_POST['fleet_speed']) && is_numeric($_POST['fleet_speed'])) { $game_config['fleet_speed'] = $_POST['fleet_speed']; } if (isset($_POST['resource_multiplier']) && is_numeric($_POST['resource_multiplier'])) { $game_config['resource_multiplier'] = $_POST['resource_multiplier']; } if (isset($_POST['initial_fields']) && is_numeric($_POST['initial_fields'])) { $game_config['initial_fields'] = $_POST['initial_fields']; } if (isset($_POST['metal_basic_income']) && is_numeric($_POST['metal_basic_income'])) { $game_config['metal_basic_income'] = $_POST['metal_basic_income']; } if (isset($_POST['crystal_basic_income']) && is_numeric($_POST['crystal_basic_income'])) { $game_config['crystal_basic_income'] = $_POST['crystal_basic_income']; } if (isset($_POST['deuterium_basic_income']) && is_numeric($_POST['deuterium_basic_income'])) { $game_config['deuterium_basic_income'] = $_POST['deuterium_basic_income']; } if (isset($_POST['energy_basic_income']) && is_numeric($_POST['energy_basic_income'])) { $game_config['energy_basic_income'] = $_POST['energy_basic_income']; } if (isset($_POST['Fleet_Cdr']) && is_numeric($_POST['Fleet_Cdr'])) { $game_config['Fleet_Cdr'] = $_POST['Fleet_Cdr']; } if (isset($_POST['Defs_Cdr']) && is_numeric($_POST['Defs_Cdr'])) { $game_config['Defs_Cdr'] = $_POST['Defs_Cdr']; } if (isset($_POST['noobprotection']) && is_numeric($_POST['noobprotection'])) { $game_config['noobprotection'] = $_POST['noobprotection']; } if (isset($_POST['noobprotectiontime']) && is_numeric($_POST['noobprotectiontime'])) { $game_config['noobprotectiontime'] = $_POST['noobprotectiontime']; } if (isset($_POST['noobprotectionmulti']) && is_numeric($_POST['noobprotectionmulti'])) { $game_config['noobprotectionmulti'] = $_POST['noobprotectionmulti']; } if (isset($_POST['LastSettedGalaxyPos']) && is_numeric($_POST['LastSettedGalaxyPos'])) { $game_config['LastSettedGalaxyPos'] = $_POST['LastSettedGalaxyPos']; } if (isset($_POST['LastSettedSystemPos']) && is_numeric($_POST['LastSettedSystemPos'])) { $game_config['LastSettedSystemPos'] = $_POST['LastSettedSystemPos']; } if (isset($_POST['LastSettedPlanetPos']) && is_numeric($_POST['LastSettedPlanetPos'])) { $game_config['LastSettedPlanetPos'] = $_POST['LastSettedPlanetPos']; } if (isset($_POST["urlaubs_modus_erz"]) && $_POST["urlaubs_modus_erz"] == 'on') { $game_config['urlaubs_modus_erz'] = "1"; } else { $game_config['urlaubs_modus_erz'] = "0"; } doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['game_disable'] . "' WHERE `config_name` = 'game_disable';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['close_reason'] . "' WHERE `config_name` = 'close_reason';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['game_name'] . "' WHERE `config_name` = 'game_name';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['forum_url'] . "' WHERE `config_name` = 'forum_url';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['game_speed'] . "' WHERE `config_name` = 'game_speed';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['fleet_speed'] . "' WHERE `config_name` = 'fleet_speed';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['resource_multiplier'] . "' WHERE `config_name` = 'resource_multiplier';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewNewsFrame'] . "' WHERE `config_name` = 'OverviewNewsFrame';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewNewsText'] . "' WHERE `config_name` = 'OverviewNewsText';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewExternChat'] . "' WHERE `config_name` = 'OverviewExternChat';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewExternChatCmd'] . "' WHERE `config_name` = 'OverviewExternChatCmd';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewBanner'] . "' WHERE `config_name` = 'OverviewBanner';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewClickBanner'] . "' WHERE `config_name` = 'OverviewClickBanner';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['initial_fields'] . "' WHERE `config_name` = 'initial_fields';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['metal_basic_income'] . "' WHERE `config_name` = 'metal_basic_income';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['crystal_basic_income'] . "' WHERE `config_name` = 'crystal_basic_income';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['deuterium_basic_income'] . "' WHERE `config_name` = 'deuterium_basic_income';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['energy_basic_income'] . "' WHERE `config_name` = 'energy_basic_income';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['Fleet_Cdr'] . "' WHERE `config_name` = 'Fleet_Cdr';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['Defs_Cdr'] . "' WHERE `config_name` = 'Defs_Cdr';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['noobprotection'] . "' WHERE `config_name` = 'noobprotection';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['noobprotectiontime'] . "' WHERE `config_name` = 'noobprotectiontime';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['noobprotectionmulti'] . "' WHERE `config_name` = 'noobprotectionmulti';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['LastSettedGalaxyPos'] . "' WHERE `config_name` = 'LastSettedGalaxyPos';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['LastSettedSystemPos'] . "' WHERE `config_name` = 'LastSettedSystemPos';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['LastSettedPlanetPos'] . "' WHERE `config_name` = 'LastSettedPlanetPos';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['debug'] . "' WHERE `config_name` ='debug'", 'config'); doquery("UPDATE {{table}} SET config_value='" . $game_config['urlaubs_modus_erz'] . "' WHERE `config_name` ='urlaubs_modus_erz'", 'config'); AdminMessage('Options changees avec succes !', 'Succes', '?'); } else { $parse = $lang; $parse['game_name'] = $game_config['game_name']; $parse['game_speed'] = $game_config['game_speed']; $parse['fleet_speed'] = $game_config['fleet_speed']; $parse['resource_multiplier'] = $game_config['resource_multiplier']; $parse['forum_url'] = $game_config['forum_url']; $parse['initial_fields'] = $game_config['initial_fields']; $parse['metal_basic_income'] = $game_config['metal_basic_income']; $parse['crystal_basic_income'] = $game_config['crystal_basic_income']; $parse['deuterium_basic_income'] = $game_config['deuterium_basic_income']; $parse['energy_basic_income'] = $game_config['energy_basic_income']; $parse['Fleet_Cdr'] = $game_config['Fleet_Cdr']; $parse['Defs_Cdr'] = $game_config['Defs_Cdr']; $parse['noobprotection'] = $game_config['noobprotection']; $parse['noobprotectiontime'] = $game_config['noobprotectiontime']; $parse['noobprotectionmulti'] = $game_config['noobprotectionmulti']; $parse['LastSettedGalaxyPos'] = $game_config['LastSettedGalaxyPos']; $parse['LastSettedSystemPos'] = $game_config['LastSettedSystemPos']; $parse['LastSettedPlanetPos'] = $game_config['LastSettedPlanetPos']; $parse['closed'] = $game_config['game_disable'] == 1 ? " checked = 'checked' " : ""; $parse['close_reason'] = stripslashes($game_config['close_reason']); $parse['newsframe'] = $game_config['OverviewNewsFrame'] == 1 ? " checked = 'checked' " : ""; $parse['NewsTextVal'] = stripslashes($game_config['OverviewNewsText']); $parse['chatframe'] = $game_config['OverviewExternChat'] == 1 ? " checked = 'checked' " : ""; $parse['ExtTchatVal'] = stripslashes($game_config['OverviewExternChatCmd']); $parse['googlead'] = $game_config['OverviewBanner'] == 1 ? " checked = 'checked' " : ""; $parse['GoogleAdVal'] = stripslashes($game_config['OverviewClickBanner']); $parse['debug'] = $game_config['debug'] == 1 ? " checked = 'checked' " : ""; $PageTPL = gettemplate('admin/options_body'); $Page .= parsetemplate($PageTPL, $parse); display($Page, $lang['adm_opt_title'], false, '', true); } } else { AdminMessage($lang['sys_noalloaw'], $lang['sys_noaccess']); } return $Page; }
if ($mode == 'banit' && $action) { if ($player_banned_row) { $reas = $_POST['why']; $days = $_POST['days']; $hour = $_POST['hour']; $mins = $_POST['mins']; $secs = $_POST['secs']; // $isVacation = $_POST['isVacation']; $BanTime = $days * 86400; $BanTime += $hour * 3600; $BanTime += $mins * 60; $BanTime += $secs; // $BannedUntil = SN_TIME_NOW + $BanTime; sys_admin_player_ban($user, $player_banned_row, $BanTime, $is_vacation = sys_get_param_int('isVacation'), sys_get_param_str('why')); $DoneMessage = "{$lang['adm_bn_thpl']} {$name_output} {$lang['adm_bn_isbn']}"; if ($is_vacation) { $DoneMessage .= $lang['adm_bn_vctn']; } $DoneMessage .= $lang['adm_bn_plnt']; } else { $DoneMessage = sprintf($lang['adm_bn_errr'], $name_output); } AdminMessage($DoneMessage, $lang['adm_ban_title']); } elseif ($mode == 'unbanit' && $action) { sys_admin_player_ban_unset($user, $player_banned_row, ($reason = sys_get_param_str('why')) ? $reason : $lang['sys_unbanned']); $DoneMessage = $lang['adm_unbn_thpl'] . " " . $name_output . " " . $lang['adm_unbn_isbn']; AdminMessage($DoneMessage, $lang['adm_unbn_ttle']); } $parse['name'] = $name_output; $parse['mode'] = $mode; display(parsetemplate(gettemplate("admin/admin_ban", true), $parse), $lang['adm_ban_title'], false, '', true);
while ($u = mysql_fetch_assoc($table)) { $inaktiv = time() - $u['onlinetime']; $time = gmdate("d", $inaktiv); $parse['liste'] .= "<tr>" . "<td class=b>" . $u['id'] . "</td>" . "<td class=b>" . $u['username'] . "</td>" . "<td class=b>vor <b>" . $time . " Tagen</b></td>" . "</tr>"; $i++; } $query = doquery("SELECT `id`, `onlinetime` FROM {{table}}", "users"); $i = 0; while ($a = mysql_fetch_assoc($query)) { $inaktive_zeit = time() - $a['onlinetime']; doquery("UPDATE {{table}} SET `inaktiv` = '" . $inaktive_zeit . "' WHERE `id` = '" . $a['id'] . "'", 'users'); $i++; } $query2 = doquery("SELECT `id`, `inaktiv` FROM {{table}} WHERE `authlevel` = '0'", "users"); $g = 0; while ($del = mysql_fetch_assoc($query2)) { $config = doquery("SELECT `config_name`, `config_value` FROM {{table}}", "config"); if ($del['inaktiv'] < $config['inaktiv_time']) { doquery("DELETE FROM {{table}} WHERE `id` = '" . $del['id'] . "'", "users"); } $g++; } if (isset($_POST['inaktiv_time'])) { $time = $_POST['inaktiv_time'] * 24 * 60 * 60; doquery("UPDATE {{table}} SET `config_value` = '" . $time . "' WHERE `config_name` = 'inaktiv_time'", 'config'); AdminMessage('<meta http-equiv="refresh" content="1; url=inactiv.php">Die Zeit wurde gespeichert!', 'Erfolgreich'); } display(parsetemplate(gettemplate('admin/inaktiv'), $parse), 'Inaktive Spieler', false, '', true); } else { message($lang['sys_noalloaw'], $lang['sys_noaccess']); }
$misil_launcher = $_POST['misil_launcher']; $small_laser = $_POST['small_laser']; $big_laser = $_POST['big_laser']; $gauss_canyon = $_POST['gauss_canyon']; $ionic_canyon = $_POST['ionic_canyon']; $buster_canyon = $_POST['buster_canyon']; $small_protection_shield = $_POST['small_protection_shield']; $big_protection_shield = $_POST['big_protection_shield']; $interceptor_misil = $_POST['interceptor_misil']; $interplanetary_misil = $_POST['interplanetary_misil']; $QryUpdatePlanet = "UPDATE {{table}} SET "; $QryUpdatePlanet .= "`misil_launcher` = `misil_launcher` - '" . $misil_launcher . "', "; $QryUpdatePlanet .= "`small_laser` = `small_laser` - '" . $small_laser . "', "; $QryUpdatePlanet .= "`big_laser` = `big_laser` - '" . $big_laser . "', "; $QryUpdatePlanet .= "`gauss_canyon` = `gauss_canyon` - '" . $gauss_canyon . "', "; $QryUpdatePlanet .= "`ionic_canyon` = `ionic_canyon` - '" . $ionic_canyon . "', "; $QryUpdatePlanet .= "`buster_canyon` = `buster_canyon` - '" . $buster_canyon . "', "; $QryUpdatePlanet .= "`small_protection_shield` = `small_protection_shield` - '" . $small_protection_shield . "', "; $QryUpdatePlanet .= "`big_protection_shield` = `big_protection_shield` - '" . $big_protection_shield . "', "; $QryUpdatePlanet .= "`interceptor_misil` = `interceptor_misil` - '" . $interceptor_misil . "', "; $QryUpdatePlanet .= "`interplanetary_misil` = `interplanetary_misil` - '" . $interplanetary_misil . "' "; $QryUpdatePlanet .= "WHERE "; $QryUpdatePlanet .= "`id` = '" . $id . "' "; doquery($QryUpdatePlanet, "planets"); AdminMessage($lang['del_message'] . '<meta http-equiv="refresh" content="3; url=?action=administrativeMats">', $lang['del_message_title']); } $Page = parsetemplate($PageTpl, $parse); display($Page, $lang['adm_am_ttle'], false, '', true); } else { header('Location: indexGame.php'); }
$i++; } if ($i == "1") { $parse['planetes'] .= "<tr><th class=b colspan=8>" . $lang['planetlist_total1'] . "</th></tr>"; } else { $parse['planetes'] .= "<tr><th class=b colspan=8>" . str_replace('##planets##', $i, $lang['planetlist_total']) . "</th></tr>"; } if (isset($_GET['action']) && isset($_GET['id'])) { $id = intval($_GET['id']); $query = doquery("SELECT * FROM {{table}} WHERE planet_type=1 AND id='" . $id . "' LIMIT 1", "planets"); $planet = mysql_fetch_array($query); $parse['show_edit_form'] = parsetemplate(gettemplate('admin/planet_edit_form'), $planet); } if (isset($_POST['submit'])) { $edit_id = intval($_POST['currid']); $planetname = mysql_real_escape_string($_POST['planetname']); $fields_max = intval($_POST['felder']); $query = doquery("UPDATE {{table}} SET\r\n\t\t\t\t\t\t\t`name` \t\t\t= '" . $planetname . "',\r\n\t\t\t\t\t\t\t`field_max` \t\t= '" . $fields_max . "',\r\n\t\t\t\t\t\t\t`metal`\t\t\t= '" . intval($_POST['metal']) . "',\r\n\t\t\t\t\t\t\t`crystal`\t\t= '" . intval($_POST['crystal']) . "',\r\n\t\t\t\t\t\t\t`deuterium`\t\t= '" . intval($_POST['deuterium']) . "',\r\n\t\t\t\t\t\t\t`small_ship_cargo` \t= '" . intval($_POST['small_ship_cargo']) . "', \r\n\t\t\t\t\t\t\t`big_ship_cargo` \t= '" . intval($_POST['big_ship_cargo']) . "', \r\n\t\t\t\t\t\t\t`light_hunter`\t\t= '" . intval($_POST['light_hunter']) . "', \r\n\t\t\t\t\t\t\t`heavy_hunter`\t\t= '" . intval($_POST['heavy_hunter']) . "', \r\n\t\t\t\t\t\t\t`crusher`\t\t= '" . intval($_POST['crusher']) . "',\r\n\t\t\t\t\t\t\t`battle_ship`\t\t= '" . intval($_POST['battle_ship']) . "', \r\n\t\t\t\t\t\t\t`colonizer`\t\t= '" . intval($_POST['colonizer']) . "',\r\n\t\t\t\t\t\t\t`recycler`\t\t= '" . intval($_POST['recycler']) . "',\r\n\t\t\t\t\t\t\t`spy_sonde`\t\t= '" . intval($_POST['spy_sonde']) . "',\r\n\t\t\t\t\t\t\t`bomber_ship`\t\t= '" . intval($_POST['bomber_ship']) . "', \r\n\t\t\t\t\t\t\t`solar_satelit`\t\t= '" . intval($_POST['solar_satelit']) . "', \r\n\t\t\t\t\t\t\t`destructor`\t\t= '" . intval($_POST['destructor']) . "', \r\n\t\t\t\t\t\t\t`dearth_star`\t\t= '" . intval($_POST['dearth_star']) . "', \r\n\t\t\t\t\t\t\t`battleship`\t\t= '" . intval($_POST['battleship']) . "',\r\n\t\t\t\t\t\t\t`ownshipname`\t\t= '" . intval($_POST['ownshipname']) . "',\r\n\t\t\t\t\t\t\t`ev_transporter`\t= '" . intval($_POST['ev_transporter']) . "',\r\n\t\t\t\t\t\t\t`star_crasher`\t\t= '" . intval($_POST['star_crasher']) . "'\r\n\t\t\t\t\t\t\t`misil_launcher`\t= '" . intval($_POST['misil_launcher']) . "',\r\n\t\t\t\t\t\t\t`small_laser`\t\t= '" . intval($_POST['small_laser']) . "',\r\n\t\t\t\t\t\t\t`big_laser`\t\t= '" . intval($_POST['big_laser']) . "',\r\n\t\t\t\t\t\t\t`gauss_canyon`\t\t= '" . intval($_POST['gauss_canyon']) . "',\r\n\t\t\t\t\t\t\t`ionic_canyon`\t\t= '" . intval($_POST['ionic_canyon']) . "',\r\n\t\t\t\t\t\t\t`buster_canyon`\t\t= '" . intval($_POST['buster_canyon']) . "',\r\n\t\t\t\t\t\t\t`small_protection_shield`= '" . intval($_POST['small_protection_shield']) . "',\r\n\t\t\t\t\t\t\t`big_protection_shield` = '" . intval($_POST['big_protection_shield']) . "',\r\n\t\t\t\t\t\t\t`gig_protection_shield` = '" . intval($_POST['gig_protection_shield']) . "',\r\n\t\t\t\t\t\t\t`Gravitonka` \t\t= '" . intval($_POST['Gravitonka']) . "',\r\n\t\t\t\t\t\t\t`interceptor_misil` \t= '" . intval($_POST['interceptor_misil']) . "',\r\n\t\t\t\t\t\t\t`interplanetary_misil` \t= '" . intval($_POST['interplanetary_misil']) . "',\r\n\t\t\t\t\t\t\t`metal_mine`\t\t= '" . intval($_POST['metal_mine']) . "',\r\n\t\t\t\t\t\t\t`crystal_mine`\t\t= '" . intval($_POST['crystal_mine']) . "',\r\n\t\t\t\t\t\t\t`deuterium_sintetizer`\t= '" . intval($_POST['deuterium_sintetizer']) . "',\r\n\t\t\t\t\t\t\t`solar_plant`\t\t= '" . intval($_POST['solar_plant']) . "',\r\n\t\t\t\t\t\t\t`fusion_plant`\t\t= '" . intval($_POST['fusion_plant']) . "',\r\n\t\t\t\t\t\t\t`robot_factory`\t\t= '" . intval($_POST['robot_factory']) . "',\r\n\t\t\t\t\t\t\t`nano_factory`\t\t= '" . intval($_POST['nano_factory']) . "',\r\n\t\t\t\t\t\t\t`hangar`\t\t= '" . intval($_POST['hangar']) . "',\r\n\t\t\t\t\t\t\t`metal_store`\t\t= '" . intval($_POST['metal_store']) . "',\r\n\t\t\t\t\t\t\t`crystal_store`\t\t= '" . intval($_POST['crystal_store']) . "',\r\n\t\t\t\t\t\t\t`deuterium_store`\t= '" . intval($_POST['deuterium_store']) . "',\r\n\t\t\t\t\t\t\t`laboratory`\t\t= '" . intval($_POST['laboratory']) . "',\r\n\t\t\t\t\t\t\t`terraformer`\t\t= '" . intval($_POST['terraformer']) . "',\r\n\t\t\t\t\t\t\t`ally_deposit`\t\t= '" . intval($_POST['ally_deposit']) . "',\r\n\t\t\t\t\t\t\t`silo`\t\t\t= '" . intval($_POST['silo']) . "'\r\n\t\t\t\t\t\t\tWHERE `id` = '" . $edit_id . "' LIMIT 1", 'planets'); // AdminLOG $fp = @fopen('logs/adminlog_' . date('d.m.Y') . '.txt', 'a'); if ($fp) { fwrite($fp, date("d.m.Y H:i:s", time()) . " - " . $user['username'] . " - " . $user['user_lastip'] . " - " . __FILE__ . " - changed values from planet with ID: " . $edit_id . "\n"); fclose($fp); } // AdminLOG ENDE AdminMessage('<meta http-equiv="refresh" content="1; url=planetlist.php">' . $lang['planetlist_changed'], $lang['planetlist_title']); } display(parsetemplate(gettemplate('admin/planetlist_body'), $parse), $lang['planetlist_title'], false, '', true); } else { message($lang['sys_noalloaw'], $lang['sys_noaccess']); }
function DisplayGameSettingsPage($CurrentUser) { global $lang, $game_config, $_POST; includeLang('admin/settings'); if ($CurrentUser['authlevel'] >= 3) { if ($_POST['opt_save'] == "1") { // Jeu Ouvert ou Ferm� ! if (isset($_POST['closed']) && $_POST['closed'] == 'on') { $game_config['game_disable'] = "1"; $game_config['close_reason'] = addslashes($_POST['close_reason']); } else { $game_config['game_disable'] = "0"; $game_config['close_reason'] = ""; } // Y a un News Frame ? ! if (isset($_POST['newsframe']) && $_POST['newsframe'] == 'on') { $game_config['OverviewNewsFrame'] = "1"; $game_config['OverviewNewsText'] = addslashes($_POST['NewsText']); } else { $game_config['OverviewNewsFrame'] = "0"; $game_config['OverviewNewsText'] = ""; } // Y a un TCHAT externe ?? if (isset($_POST['chatframe']) && $_POST['chatframe'] == 'on') { $game_config['OverviewExternChat'] = "1"; $game_config['OverviewExternChatCmd'] = addslashes($_POST['ExternChat']); } else { $game_config['OverviewExternChat'] = "0"; $game_config['OverviewExternChatCmd'] = ""; } if (isset($_POST['googlead']) && $_POST['googlead'] == 'on') { $game_config['OverviewBanner'] = "1"; $game_config['OverviewClickBanner'] = addslashes($_POST['GoogleAds']); } else { $game_config['OverviewBanner'] = "0"; $game_config['OverviewClickBanner'] = ""; } // Mode Debug ou pas ! if (isset($_POST['debug']) && $_POST['debug'] == 'on') { $game_config['debug'] = "1"; } else { $game_config['debug'] = "0"; } // Nom du Jeu if (isset($_POST['game_name']) && $_POST['game_name'] != '') { $game_config['game_name'] = $_POST['game_name']; } // Game Adresse if (isset($_POST['gameurl']) && $_POST['gameurl'] != '') { $game_config['game_url'] = $_POST['gameurl']; } // Adresse du Forum if (isset($_POST['forum_url']) && $_POST['forum_url'] != '') { $game_config['forum_url'] = $_POST['forum_url']; } // Vitesse du Jeu if (isset($_POST['game_speed']) && is_numeric($_POST['game_speed'])) { $game_config['game_speed'] = $_POST['game_speed']; } // Vitesse des Flottes if (isset($_POST['fleet_speed']) && is_numeric($_POST['fleet_speed'])) { $game_config['fleet_speed'] = $_POST['fleet_speed']; } // Multiplicateur de Production if (isset($_POST['resource_multiplier']) && is_numeric($_POST['resource_multiplier'])) { $game_config['resource_multiplier'] = $_POST['resource_multiplier']; } // Taille de la planete mère if (isset($_POST['initial_fields']) && is_numeric($_POST['initial_fields'])) { $game_config['initial_fields'] = $_POST['initial_fields']; } // Revenu de base Metal if (isset($_POST['metal_basic_income']) && is_numeric($_POST['metal_basic_income'])) { $game_config['metal_basic_income'] = $_POST['metal_basic_income']; } // Revenu de base Cristal if (isset($_POST['crystal_basic_income']) && is_numeric($_POST['crystal_basic_income'])) { $game_config['crystal_basic_income'] = $_POST['crystal_basic_income']; } // Revenu de base Deuterium if (isset($_POST['deuterium_basic_income']) && is_numeric($_POST['deuterium_basic_income'])) { $game_config['deuterium_basic_income'] = $_POST['deuterium_basic_income']; } // Revenu de base Energie if (isset($_POST['energy_basic_income']) && is_numeric($_POST['energy_basic_income'])) { $game_config['energy_basic_income'] = $_POST['energy_basic_income']; } // Revenu de Fleet ins Tr�mmerfeld if (isset($_POST['Fleet_Cdr']) && is_numeric($_POST['Fleet_Cdr'])) { $game_config['Fleet_Cdr'] = $_POST['Fleet_Cdr']; } // Angriffssperre --> Flottensperre if (isset($_POST['attack_disabled']) && $_POST['attack_disabled'] == 'on') { $game_config['attack_disabled'] = "1"; } else { $game_config['attack_disabled'] = "0"; } // Revenu de Def ins Tr�mmerfeld if (isset($_POST['Defs_Cdr']) && is_numeric($_POST['Defs_Cdr'])) { $game_config['Defs_Cdr'] = $_POST['Defs_Cdr']; } // Revenu de Noobprotection Time if (isset($_POST['noobprotectiontime']) && is_numeric($_POST['noobprotectiontime'])) { $game_config['noobprotectiontime'] = $_POST['noobprotectiontime']; } // Revenu de Noobprotection Multi if (isset($_POST['noobprotectionmulti']) && is_numeric($_POST['noobprotectionmulti'])) { $game_config['noobprotectionmulti'] = $_POST['noobprotectionmulti']; } // Revenu de LastSettedGalaxyPos if (isset($_POST['LastSettedGalaxyPos']) && is_numeric($_POST['LastSettedGalaxyPos'])) { $game_config['LastSettedGalaxyPos'] = $_POST['LastSettedGalaxyPos']; } // Revenu de LastSettedSystemPos if (isset($_POST['LastSettedSystemPos']) && is_numeric($_POST['LastSettedSystemPos'])) { $game_config['LastSettedSystemPos'] = $_POST['LastSettedSystemPos']; } // Revenu de LastSettedPlanetPos if (isset($_POST['LastSettedPlanetPos']) && is_numeric($_POST['LastSettedPlanetPos'])) { $game_config['LastSettedPlanetPos'] = $_POST['LastSettedPlanetPos']; } // Activation du jeu doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['game_disable'] . "' WHERE `config_name` = 'game_disable';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['close_reason'] . "' WHERE `config_name` = 'close_reason';", 'config'); // Configuration du Jeu doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['game_name'] . "' WHERE `config_name` = 'game_name';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['forum_url'] . "' WHERE `config_name` = 'forum_url';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['game_speed'] . "' WHERE `config_name` = 'game_speed';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['fleet_speed'] . "' WHERE `config_name` = 'fleet_speed';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['resource_multiplier'] . "' WHERE `config_name` = 'resource_multiplier';", 'config'); // Angrisssperre --> Flottensperre doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['attack_disabled'] . "' WHERE `config_name` = 'attack_disabled';", 'config'); // Page Generale doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewNewsFrame'] . "' WHERE `config_name` = 'OverviewNewsFrame';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewNewsText'] . "' WHERE `config_name` = 'OverviewNewsText';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewExternChat'] . "' WHERE `config_name` = 'OverviewExternChat';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewExternChatCmd'] . "' WHERE `config_name` = 'OverviewExternChatCmd';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewBanner'] . "' WHERE `config_name` = 'OverviewBanner';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['OverviewClickBanner'] . "' WHERE `config_name` = 'OverviewClickBanner';", 'config'); // Options Planete doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['initial_fields'] . "' WHERE `config_name` = 'initial_fields';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['metal_basic_income'] . "' WHERE `config_name` = 'metal_basic_income';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['crystal_basic_income'] . "' WHERE `config_name` = 'crystal_basic_income';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['deuterium_basic_income'] . "' WHERE `config_name` = 'deuterium_basic_income';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['energy_basic_income'] . "' WHERE `config_name` = 'energy_basic_income';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['Fleet_Cdr'] . "' WHERE `config_name` = 'Fleet_Cdr';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['Defs_Cdr'] . "' WHERE `config_name` = 'Defs_Cdr';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['noobprotectiontime'] . "' WHERE `config_name` = 'noobprotectiontime';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['noobprotectionmulti'] . "' WHERE `config_name` = 'noobprotectionmulti';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['LastSettedGalaxyPos'] . "' WHERE `config_name` = 'LastSettedGalaxyPos';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['LastSettedSystemPos'] . "' WHERE `config_name` = 'LastSettedSystemPos';", 'config'); doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['LastSettedPlanetPos'] . "' WHERE `config_name` = 'LastSettedPlanetPos';", 'config'); // Mode Debug doquery("UPDATE {{table}} SET `config_value` = '" . $game_config['debug'] . "' WHERE `config_name` ='debug'", 'config'); AdminMessage($lang['settings_success'], $lang['settings_title'], '?'); } else { $parse = $lang; $parse['game_name'] = $game_config['game_name']; $parse['game_speed'] = $game_config['game_speed']; $parse['fleet_speed'] = $game_config['fleet_speed']; $parse['resource_multiplier'] = $game_config['resource_multiplier']; $parse['forum_url'] = $game_config['forum_url']; $parse['initial_fields'] = $game_config['initial_fields']; $parse['metal_basic_income'] = $game_config['metal_basic_income']; $parse['crystal_basic_income'] = $game_config['crystal_basic_income']; $parse['deuterium_basic_income'] = $game_config['deuterium_basic_income']; $parse['energy_basic_income'] = $game_config['energy_basic_income']; $parse['Fleet_Cdr'] = $game_config['Fleet_Cdr']; $parse['Defs_Cdr'] = $game_config['Defs_Cdr']; $parse['noobprotectiontime'] = $game_config['noobprotectiontime']; $parse['noobprotectionmulti'] = $game_config['noobprotectionmulti']; $parse['attack_disabled'] = $game_config['attack_disabled'] == 1 ? " checked = 'checked' " : ""; $parse['LastSettedGalaxyPos'] = $game_config['LastSettedGalaxyPos']; $parse['LastSettedSystemPos'] = $game_config['LastSettedSystemPos']; $parse['LastSettedPlanetPos'] = $game_config['LastSettedPlanetPos']; $parse['closed'] = $game_config['game_disable'] == 1 ? " checked = 'checked' " : ""; $parse['close_reason'] = stripslashes($game_config['close_reason']); $parse['newsframe'] = $game_config['OverviewNewsFrame'] == 1 ? " checked = 'checked' " : ""; $parse['NewsTextVal'] = stripslashes($game_config['OverviewNewsText']); $parse['chatframe'] = $game_config['OverviewExternChat'] == 1 ? " checked = 'checked' " : ""; $parse['ExtTchatVal'] = stripslashes($game_config['OverviewExternChatCmd']); $parse['googlead'] = $game_config['OverviewBanner'] == 1 ? " checked = 'checked' " : ""; $parse['GoogleAdVal'] = stripslashes($game_config['OverviewClickBanner']); $parse['debug'] = $game_config['debug'] == 1 ? " checked = 'checked' " : ""; $PageTPL = gettemplate('admin/options_body'); $Page .= parsetemplate($PageTPL, $parse); display($Page, $lang['adm_opt_title'], false, '', true); } } else { AdminMessage($lang['sys_noalloaw'], $lang['sys_noaccess']); } return $Page; }
if ($user['authlevel'] >= "2") { $parse = $lang; $query = doquery("SELECT `id`, `id_owner`, `name`, `field_current`, `field_max`, `galaxy`, `system`, `planet` FROM {{table}} WHERE planet_type=1 ORDER BY id ASC", "planets"); $i = 0; while ($u = mysql_fetch_array($query)) { $parse['planetes'] .= "<tr>" . "<td class=b><center><b><a href='planetlist.php?action=edit&id=" . $u['id'] . "'>" . $u['id'] . "</a></center></b></td>" . "<td class=b><center><b><a href='planetlist.php?action=edit&id=" . $u['id'] . "'>" . $u['id_owner'] . "</a></center></b></td>" . "<td class=b><center><b><a href='planetlist.php?action=edit&id=" . $u['id'] . "'>" . $u['name'] . "</a></center></b></td>" . "<td class=b><center><b><a href='planetlist.php?action=edit&id=" . $u['id'] . "'>" . $u['field_max'] . "</a></center></b></td>" . "<td class=b><center><b><a href='planetlist.php?action=edit&id=" . $u['id'] . "'>" . $u['field_current'] . "</a></center></b></td>" . "<td class=b><center><b><a href='planetlist.php?action=edit&id=" . $u['id'] . "'>" . $u['galaxy'] . "</a></center></b></td>" . "<td class=b><center><b><a href='planetlist.php?action=edit&id=" . $u['id'] . "'>" . $u['system'] . "</a></center></b></td>" . "<td class=b><center><b><a href='planetlist.php?action=edit&id=" . $u['id'] . "'>" . $u['planet'] . "</a></center></b></td>" . "</tr>"; $i++; } if ($i == "1") { $parse['planetes'] .= "<tr><th class=b colspan=8>1nsgesamt 1 Planet</th></tr>"; } else { $parse['planetes'] .= "<tr><th class=b colspan=8>Insgesamt {$i} Planeten</th></tr>"; } if (isset($_GET['action']) && isset($_GET['id'])) { $id = intval($_GET['id']); $query = doquery("SELECT * FROM {{table}} WHERE planet_type=1 AND id='" . $id . "' LIMIT 1", "planets"); $planet = mysql_fetch_array($query); $parse['show_edit_form'] = parsetemplate(gettemplate('admin/planet_edit_form'), $planet); } if (isset($_POST['submit'])) { $edit_id = intval($_POST['currid']); $planetname = mysql_real_escape_string($_POST['planetname']); $fields_max = intval($_POST['felder']); $query = doquery("UPDATE {{table}} SET\r\n\t\t\t\t\t\t\t`name` \t\t\t\t= '" . $planetname . "', \r\n\t\t\t\t\t\t\t`field_max` \t\t= '" . $fields_max . "',\r\n\t\t\t\t\t\t\t`metal`\t\t\t\t= '" . intval($_POST['metal']) . "',\r\n\t\t\t\t\t\t\t`crystal`\t\t\t= '" . intval($_POST['crystal']) . "',\r\n\t\t\t\t\t\t\t`deuterium`\t\t\t= '" . intval($_POST['deuterium']) . "', \r\n\t\t\t\t\t\t\t`small_ship_cargo` \t= '" . intval($_POST['small_ship_cargo']) . "', \r\n\t\t\t\t\t\t\t`big_ship_cargo` \t= '" . intval($_POST['big_ship_cargo']) . "', \r\n\t\t\t\t\t\t\t`light_hunter`\t\t= '" . intval($_POST['light_hunter']) . "', \r\n\t\t\t\t\t\t\t`heavy_hunter`\t\t= '" . intval($_POST['heavy_hunter']) . "', \r\n\t\t\t\t\t\t\t`crusher`\t\t\t= '" . intval($_POST['crusher']) . "', \r\n\t\t\t\t\t\t\t`battle_ship`\t\t= '" . intval($_POST['battle_ship']) . "', \r\n\t\t\t\t\t\t\t`colonizer`\t\t\t= '" . intval($_POST['colonizer']) . "', \r\n\t\t\t\t\t\t\t`recycler`\t\t\t= '" . intval($_POST['recycler']) . "', \r\n\t\t\t\t\t\t\t`spy_sonde`\t\t\t= '" . intval($_POST['spy_sonde']) . "', \r\n\t\t\t\t\t\t\t`bomber_ship`\t\t= '" . intval($_POST['bomber_ship']) . "', \r\n\t\t\t\t\t\t\t`solar_satelit`\t\t= '" . intval($_POST['solar_satelit']) . "', \r\n\t\t\t\t\t\t\t`destructor`\t\t= '" . intval($_POST['destructor']) . "', \r\n\t\t\t\t\t\t\t`dearth_star`\t\t= '" . intval($_POST['dearth_star']) . "', \r\n\t\t\t\t\t\t\t`battleship`\t\t= '" . intval($_POST['battleship']) . "',\r\n\t\t\t\t\t\t\t`misil_launcher`\t= '" . intval($_POST['misil_launcher']) . "',\r\n\t\t\t\t\t\t\t`small_laser`\t\t= '" . intval($_POST['small_laser']) . "',\r\n\t\t\t\t\t\t\t`big_laser`\t\t\t= '" . intval($_POST['big_laser']) . "',\r\n\t\t\t\t\t\t\t`gauss_canyon`\t\t= '" . intval($_POST['gauss_canyon']) . "',\r\n\t\t\t\t\t\t\t`ionic_canyon`\t\t= '" . intval($_POST['ionic_canyon']) . "',\r\n\t\t\t\t\t\t\t`buster_canyon`\t\t= '" . intval($_POST['buster_canyon']) . "',\r\n\t\t\t\t\t\t\t`small_protection_shield` \t= '" . intval($_POST['small_protection_shield']) . "',\r\n\t\t\t\t\t\t\t`big_protection_shield` \t= '" . intval($_POST['big_protection_shield']) . "',\r\n\t\t\t\t\t\t\t`interceptor_misil` \t\t= '" . intval($_POST['interceptor_misil']) . "',\r\n\t\t\t\t\t\t\t`interplanetary_misil` \t\t= '" . intval($_POST['interplanetary_misil']) . "',\r\n\t\t\t\t\t\t\t`metal_mine`\t\t\t\t= '" . intval($_POST['metal_mine']) . "',\r\n\t\t\t\t\t\t\t`crystal_mine`\t\t\t\t= '" . intval($_POST['crystal_mine']) . "',\r\n\t\t\t\t\t\t\t`deuterium_sintetizer`\t\t= '" . intval($_POST['deuterium_sintetizer']) . "',\r\n\t\t\t\t\t\t\t`solar_plant`\t\t\t\t= '" . intval($_POST['solar_plant']) . "',\r\n\t\t\t\t\t\t\t`fusion_plant`\t\t\t\t= '" . intval($_POST['fusion_plant']) . "',\r\n\t\t\t\t\t\t\t`robot_factory`\t\t\t\t= '" . intval($_POST['robot_factory']) . "',\r\n\t\t\t\t\t\t\t`nano_factory`\t\t\t\t= '" . intval($_POST['nano_factory']) . "',\r\n\t\t\t\t\t\t\t`hangar`\t\t\t\t\t= '" . intval($_POST['hangar']) . "',\r\n\t\t\t\t\t\t\t`metal_store`\t\t\t\t= '" . intval($_POST['metal_store']) . "',\r\n\t\t\t\t\t\t\t`crystal_store`\t\t\t\t= '" . intval($_POST['crystal_store']) . "',\r\n\t\t\t\t\t\t\t`deuterium_store`\t\t\t= '" . intval($_POST['deuterium_store']) . "',\r\n\t\t\t\t\t\t\t`laboratory`\t\t\t\t= '" . intval($_POST['laboratory']) . "',\r\n\t\t\t\t\t\t\t`terraformer`\t\t\t\t= '" . intval($_POST['terraformer']) . "',\r\n\t\t\t\t\t\t\t`ally_deposit`\t\t\t\t= '" . intval($_POST['ally_deposit']) . "',\r\n\t\t\t\t\t\t\t`silo`\t\t\t\t\t\t= '" . intval($_POST['silo']) . "'\r\n\t\t\t\t\t\t\t WHERE `id` = '" . $edit_id . "' LIMIT 1", 'planets'); AdminMessage('<meta http-equiv="refresh" content="1; url=planetlist.php">Planet wurde erfolgreich geändert', 'Planeten anpassen'); } display(parsetemplate(gettemplate('admin/planetlist_body'), $parse), 'Planetlist', false, '', true); } else { message($lang['sys_noalloaw'], $lang['sys_noaccess']); } // Created by e-Zobar. All rights reversed (C) XNova Team 2008
function XNovaResetUnivers($CurrentUser) { global $lang; if ($CurrentUser['authlevel'] == 4) { // Copier la table users et planets vers des tables de replis ! doquery("RENAME TABLE {{table}} TO {{table}}_s", 'planets'); doquery("RENAME TABLE {{table}} TO {{table}}_s", 'users'); // Recreer la structure des tables renommées doquery("CREATE TABLE IF NOT EXISTS {{table}} ( LIKE {{table}}_s );", 'planets'); doquery("CREATE TABLE IF NOT EXISTS {{table}} ( LIKE {{table}}_s );", 'users'); // Vider toutes les tables ! doquery("TRUNCATE TABLE {{table}}", 'aks'); doquery("TRUNCATE TABLE {{table}}", 'alliance'); doquery("TRUNCATE TABLE {{table}}", 'annonce'); doquery("TRUNCATE TABLE {{table}}", 'banned'); doquery("TRUNCATE TABLE {{table}}", 'buddy'); doquery("TRUNCATE TABLE {{table}}", 'chat'); doquery("TRUNCATE TABLE {{table}}", 'galaxy'); doquery("TRUNCATE TABLE {{table}}", 'errors'); doquery("TRUNCATE TABLE {{table}}", 'fleets'); doquery("TRUNCATE TABLE {{table}}", 'iraks'); doquery("TRUNCATE TABLE {{table}}", 'lunas'); doquery("TRUNCATE TABLE {{table}}", 'messages'); doquery("TRUNCATE TABLE {{table}}", 'notes'); doquery("TRUNCATE TABLE {{table}}", 'rw'); doquery("TRUNCATE TABLE {{table}}", 'statpoints'); $AllUsers = doquery("SELECT `username`,`password`,`email`, `email_2`,`authlevel`,`galaxy`,`system`,`planet`, `sex`, `dpath`, `onlinetime`, `register_time`, `id_planet` FROM {{table}} WHERE 1;", 'users_s'); $LimitTime = time() - 15 * (24 * (60 * 60)); $TransUser = 0; while ($TheUser = mysql_fetch_assoc($AllUsers)) { if ($TheUser['onlinetime'] > $LimitTime) { $UserPlanet = doquery("SELECT `name` FROM {{table}} WHERE `id` = '" . $TheUser['id_planet'] . "';", 'planets_s', true); if ($UserPlanet['name'] != "") { // Creation de l'utilisateur $QryInsertUser = "******"; $QryInsertUser .= "`username` = '" . $TheUser['username'] . "', "; $QryInsertUser .= "`email` = '" . $TheUser['email'] . "', "; $QryInsertUser .= "`email_2` = '" . $TheUser['email_2'] . "', "; $QryInsertUser .= "`sex` = '" . $TheUser['sex'] . "', "; $QryInsertUser .= "`id_planet` = '0', "; $QryInsertUser .= "`authlevel` = '" . $TheUser['authlevel'] . "', "; $QryInsertUser .= "`dpath` = '" . $TheUser['dpath'] . "', "; $QryInsertUser .= "`galaxy` = '" . $TheUser['galaxy'] . "', "; $QryInsertUser .= "`system` = '" . $TheUser['system'] . "', "; $QryInsertUser .= "`planet` = '" . $TheUser['planet'] . "', "; $QryInsertUser .= "`register_time` = '" . $TheUser['register_time'] . "', "; $QryInsertUser .= "`password` = '" . $TheUser['password'] . "';"; doquery($QryInsertUser, 'users'); // On cherche le numero d'enregistrement de l'utilisateur fraichement cr�� $NewUser = doquery("SELECT `id` FROM {{table}} WHERE `username` = '" . $TheUser['username'] . "' LIMIT 1;", 'users', true); CreateOnePlanetRecord($TheUser['galaxy'], $TheUser['system'], $TheUser['planet'], $NewUser['id'], $UserPlanet['name'], true); // Recherche de la reference de la nouvelle planete (qui est unique normalement ! $PlanetID = doquery("SELECT `id` FROM {{table}} WHERE `id_owner` = '" . $NewUser['id'] . "' LIMIT 1;", 'planets', true); // Mise a jour de l'enregistrement utilisateur avec les infos de sa planete mere $QryUpdateUser = "******"; $QryUpdateUser .= "`id_planet` = '" . $PlanetID['id'] . "', "; $QryUpdateUser .= "`current_planet` = '" . $PlanetID['id'] . "' "; $QryUpdateUser .= "WHERE "; $QryUpdateUser .= "`id` = '" . $NewUser['id'] . "';"; doquery($QryUpdateUser, 'users'); $TransUser++; } } } // while // Mise a jour du nombre de joueurs inscripts doquery("UPDATE {{table}} SET `config_value` = '" . $TransUser . "' WHERE `config_name` = 'users_amount' LIMIT 1;", 'config'); // Menage on vire les tables transitoires doquery("DROP TABLE {{table}}", 'planets_s'); doquery("DROP TABLE {{table}}", 'users_s'); AdminMessage($TransUser . $lang['adm_rz_done'], $lang['adm_rz_ttle']); } else { AdminMessage($lang['sys_noalloaw'], $lang['sys_noaccess']); } return $Page; }
$Pattern = $_GET['ip']; $SelUser = doquery("SELECT * FROM {{table}} WHERE `user_lastip` = '" . $ip . "' LIMIT 10;", 'users'); $bloc = $lang; $bloc['adm_this_ip'] = $Pattern; while ($Usr = mysql_fetch_assoc($SelUser)) { $UsrMain = doquery("SELECT `name` FROM {{table}} WHERE `id` = '" . $Usr['id_planet'] . "';", 'planets', true); $bloc['adm_plyer_lst'] .= "<tr><th>" . $Usr['username'] . "</th><th>[" . $Usr['galaxy'] . ":" . $Usr['system'] . ":" . $Usr['planet'] . "] " . $UsrMain['name'] . "</th></tr>"; } $SubPanelTPL = gettemplate('admin/admin_panel_asw2'); $parse['adm_sub_form2'] = parsetemplate($SubPanelTPL, $bloc); break; case 'usr_note': $Player = $_GET['player']; $Newnote = $_GET['NoteOp']; $QryUpdate = doquery("UPDATE {{table}} SET `NoteOp` = '" . $Newnote . "' WHERE `username` = '" . $Player . "';", 'users'); AdminMessage($Message, $lang['adm_mod_note']); break; default: break; } } // Traiter les reponses aux formulaires if (isset($_GET['action'])) { $bloc = $lang; switch ($_GET['action']) { case 'usr_search': $SubPanelTPL = gettemplate('admin/admin_panel_frm1'); break; case 'usr_data': $SubPanelTPL = gettemplate('admin/admin_panel_frm4'); break;