本文整理汇总了PHP中AdminMessage函数的典型用法代码示例。如果您正苦于以下问题:PHP AdminMessage函数的具体用法?PHP AdminMessage怎么用?PHP AdminMessage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AdminMessage函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: DisplayGameSettingsPage
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;
}
示例2: DisplayGameSettingsPage
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;
}
示例3: define
<?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']);
}
示例4: doquery
$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;
示例5: define
<?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);
示例6: define
<?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);
示例7: includeLang
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='{$user['username']}'", "users");
AdminMessage("Danke fuer ihre Multispiel anmedung.", "Hinzufuegen");
}
$Page = parsetemplate($PageTpl, $parse);
display($Page, "Declaration d\\'IP partagee");
示例8: f
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']);
}
示例9: doquery
$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');
}
示例10: define
<?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);
}
示例11: while
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']);
}
示例12: doquery
$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']);
}
示例13: DisplayGameSettingsPage
//.........这里部分代码省略.........
$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;
}
示例14: DisplayGameSettingsPage
//.........这里部分代码省略.........
// 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;
}
示例15: doquery
$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);