Updated config management
Updated install Signed-off-by: Gregory PLANCHAT <g.planchat@gmail.com>
This commit is contained in:
parent
4bb4693d2e
commit
fcd1f5b740
58 changed files with 1579 additions and 1695 deletions
|
|
@ -33,16 +33,15 @@ define('INSTALL' , false);
|
|||
define('IN_ADMIN', true);
|
||||
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
|
||||
|
||||
if (in_array($user['authlevel'], array(LEVEL_ADMIN))) {
|
||||
$lang['PHP_SELF'] = 'options.'.PHPEXT;
|
||||
doquery("UPDATE {{table}} SET `banaday` =` banaday` - '1' WHERE `banaday` != '0';",'users');
|
||||
doquery("UPDATE {{table}} SET `bana` = '0' WHERE `banaday` < '1';",'users');
|
||||
$parse = $gameConfig;
|
||||
$parse['dpath'] = $dpath;
|
||||
$parse['debug'] = ($gameConfig['debug'] == 1) ? " checked='checked'/":'';
|
||||
} else {
|
||||
message ( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
|
||||
}
|
||||
if (in_array($user['authlevel'], array(LEVEL_ADMIN))) {
|
||||
doquery("UPDATE {{table}} SET `banaday` =` banaday` - '1' WHERE `banaday` != '0';",'users');
|
||||
doquery("UPDATE {{table}} SET `bana` = '0' WHERE `banaday` < '1';",'users');
|
||||
|
||||
?>
|
||||
$response = Wootook::getResponse()
|
||||
->setRedirect(Wootook::getUrl('admin/overview.php'))
|
||||
->sendHeaders();
|
||||
exit(0);
|
||||
} else {
|
||||
message ( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,66 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* This file is part of Wootook
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.txt
|
||||
* @see http://www.wootook.com/
|
||||
*
|
||||
* Copyright (c) 2009-Present, Wootook Support Team <http://www.xnova-ng.org>
|
||||
* All rights reserved.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* --> NOTICE <--
|
||||
* This file is part of the core development branch, changing its contents will
|
||||
* make you unable to use the automatic updates manager. Please refer to the
|
||||
* documentation for further information about customizing Wootook.
|
||||
*
|
||||
*/
|
||||
|
||||
define('INSIDE' , true);
|
||||
define('INSTALL' , false);
|
||||
define('IN_ADMIN', true);
|
||||
|
||||
function mass_message_run($parent){
|
||||
if($_POST["mode"] == "change"){
|
||||
if(isset($_POST["tresc"])&& $_POST["tresc"] != ''){
|
||||
$gameConfig['tresc'] = $parent->safe_get_post_var("tresc");
|
||||
}
|
||||
if(isset($_POST["temat"])&& $_POST["temat"] != ''){
|
||||
$gameConfig['temat'] = $parent->safe_get_post_var("temat");
|
||||
}
|
||||
$kolor = 'red';
|
||||
if($gameConfig['tresc'] !='' and $gameConfig['temat']){
|
||||
$sq = $parent->db->query("SELECT `id` FROM {{table}}","users");
|
||||
while($u = $parent->db->fetch_assoc($sq)){
|
||||
doquery("INSERT INTO {{table}} SET
|
||||
`message_owner`='{$u['id']}',
|
||||
`message_sender`='1' ,
|
||||
`message_time`='".time()."',
|
||||
`message_type`='0',
|
||||
`message_from`='<font color=\"$kolor\">Administracja</font>',
|
||||
`message_subject`='<font color=\"$kolor\">{$gameConfig['temat']}</font>',
|
||||
`message_text`='<font color=\"$kolor\"><b>{$gameConfig['tresc']}</b></font>'
|
||||
","messages");
|
||||
$parent->db->query("UPDATE {{table}} SET new_message=new_message+1 WHERE id='{$u['id']}'",'users');
|
||||
}
|
||||
$parent->smarty->assign("message","<font color=\"lime\">Wys<79>a<EFBFBD>e<EFBFBD> wiadomo<6D><6F> do wszystkich graczy</font>");
|
||||
}
|
||||
}
|
||||
$parent->smarty->display("mass_message.tpl");
|
||||
}
|
||||
|
||||
function mass_message_info(){
|
||||
return array("name" => "Send MassMessages","description"=>"Sends messagess to all players","default_weight"=>"0");
|
||||
}
|
||||
|
|
@ -31,45 +31,45 @@
|
|||
define('INSIDE' , true);
|
||||
define('INSTALL' , false);
|
||||
define('IN_ADMIN', true);
|
||||
|
||||
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
|
||||
|
||||
if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR, LEVEL_MODERATOR))) {
|
||||
if ($_POST && $mode == "change") {
|
||||
if (isset($_POST["tresc"]) && $_POST["tresc"] != '') {
|
||||
$gameConfig['tresc'] = $_POST['tresc'];
|
||||
if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR, LEVEL_MODERATOR))) {
|
||||
if (!empty($_POST)) {
|
||||
if (isset($_POST["tresc"]) && $_POST["tresc"] != '') {
|
||||
$tresc = $_POST['tresc'];
|
||||
}
|
||||
if (isset($_POST["temat"]) && $_POST["temat"] != '') {
|
||||
$temat = $_POST['temat'];
|
||||
}
|
||||
if ($user['authlevel'] == LEVEL_ADMIN) {
|
||||
$kolor = 'red';
|
||||
$ranga = 'Administrator';
|
||||
} elseif ($user['authlevel'] == LEVEL_OPERATOR) {
|
||||
$kolor = 'skyblue';
|
||||
$ranga = 'Operator';
|
||||
} elseif ($user['authlevel'] == LEVEL_MODERATOR) {
|
||||
$kolor = 'yellow';
|
||||
$ranga = 'Moderator';
|
||||
}
|
||||
if (isset($tresc) && isset($temat)) {
|
||||
$sq = doquery("SELECT `id` FROM {{table}}", "users");
|
||||
$Time = time();
|
||||
$From = "<font color=\"". $kolor ."\">". $ranga ." ".$user['username']."</font>";
|
||||
$Subject = "<font color=\"". $kolor ."\">". $temat ."</font>";
|
||||
$Message = "<font color=\"". $kolor ."\"><b>". $tresc ."</b></font>";
|
||||
while ($u = $sq->fetch(PDO::FETCH_BOTH)) {
|
||||
SendSimpleMessage($u['id'], $user['id'], $Time, 97, $From, $Subject, $Message);
|
||||
}
|
||||
if (isset($_POST["temat"]) && $_POST["temat"] != '') {
|
||||
$gameConfig['temat'] = $_POST['temat'];
|
||||
}
|
||||
if ($user['authlevel'] == LEVEL_ADMIN) {
|
||||
$kolor = 'red';
|
||||
$ranga = 'Administrator';
|
||||
} elseif ($user['authlevel'] == LEVEL_OPERATOR) {
|
||||
$kolor = 'skyblue';
|
||||
$ranga = 'Operator';
|
||||
} elseif ($user['authlevel'] == LEVEL_MODERATOR) {
|
||||
$kolor = 'yellow';
|
||||
$ranga = 'Moderator';
|
||||
}
|
||||
if ($gameConfig['tresc'] != '' and $gameConfig['temat']) {
|
||||
$sq = doquery("SELECT `id` FROM {{table}}", "users");
|
||||
$Time = time();
|
||||
$From = "<font color=\"". $kolor ."\">". $ranga ." ".$user['username']."</font>";
|
||||
$Subject = "<font color=\"". $kolor ."\">". $gameConfig['temat'] ."</font>";
|
||||
$Message = "<font color=\"". $kolor ."\"><b>". $gameConfig['tresc'] ."</b></font>";
|
||||
while ($u = $sq->fetch(PDO::FETCH_BOTH)) {
|
||||
SendSimpleMessage ( $u['id'], $user['id'], $Time, 97, $From, $Subject, $Message);
|
||||
}
|
||||
message("<font color=\"lime\">Wys<79>a<EFBFBD>e<EFBFBD> wiadomo<6D><6F> do wszystkich graczy</font>", "Complete", "../overview." . PHPEXT, 3);
|
||||
}
|
||||
} else {
|
||||
$parse = $gameConfig;
|
||||
$parse['dpath'] = $dpath;
|
||||
$parse['debug'] = ($gameConfig['debug'] == 1) ? " checked='checked'/":'';
|
||||
$page .= parsetemplate(gettemplate('admin/messall_body'), $parse);
|
||||
display($page, '', false,'', true);
|
||||
message("<font color=\"lime\">Wys<79>a<EFBFBD>e<EFBFBD> wiadomo<6D><6F> do wszystkich graczy</font>", "Complete", "../overview." . PHPEXT, 3);
|
||||
}
|
||||
} else {
|
||||
message($lang['sys_noalloaw'], $lang['sys_noaccess']);
|
||||
$parse = array();
|
||||
$parse['dpath'] = $dpath;
|
||||
$parse['debug'] = (defined('DEBUG')) ? " checked='checked'/":'';
|
||||
$page .= parsetemplate(gettemplate('admin/messall_body'), $parse);
|
||||
display($page, '', false,'', true);
|
||||
}
|
||||
?>
|
||||
} else {
|
||||
message($lang['sys_noalloaw'], $lang['sys_noaccess']);
|
||||
}
|
||||
|
|
@ -34,8 +34,8 @@ define('IN_ADMIN', true);
|
|||
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
|
||||
|
||||
|
||||
function DisplayGameSettingsPage ( $CurrentUser ) {
|
||||
global $lang, $gameConfig;
|
||||
function DisplayGameSettingsPage($CurrentUser) {
|
||||
global $lang;
|
||||
|
||||
includeLang('admin/settings');
|
||||
|
||||
|
|
@ -43,208 +43,197 @@ function DisplayGameSettingsPage ( $CurrentUser ) {
|
|||
if (isset($_POST['opt_save']) && $_POST['opt_save'] == "1") {
|
||||
// Jeu Ouvert ou Ferm<72> !
|
||||
if (isset($_POST['closed']) && $_POST['closed'] == 'on') {
|
||||
$gameConfig['game_disable'] = "1";
|
||||
$gameConfig['close_reason'] = addslashes( $_POST['close_reason'] );
|
||||
Wootook::setConfig('game/general/active', true, 1, 1);
|
||||
} else {
|
||||
$gameConfig['game_disable'] = "0";
|
||||
$gameConfig['close_reason'] = "";
|
||||
Wootook::setConfig('game/general/active', false, 1, 1);
|
||||
}
|
||||
|
||||
if (isset($_POST['close_reason'])) {
|
||||
Wootook::setConfig('game/general/closing-message', $_POST['close_reason'], 1, 1);
|
||||
}
|
||||
|
||||
// Y a un News Frame ? !
|
||||
if (isset($_POST['newsframe']) && $_POST['newsframe'] == 'on') {
|
||||
$gameConfig['OverviewNewsFrame'] = "1";
|
||||
$gameConfig['OverviewNewsText'] = addslashes( $_POST['NewsText'] );
|
||||
Wootook::setConfig('game/news/active', true, 1, 1);
|
||||
} else {
|
||||
$gameConfig['OverviewNewsFrame'] = "0";
|
||||
$gameConfig['OverviewNewsText'] = "";
|
||||
Wootook::setConfig('game/news/active', false, 1, 1);
|
||||
}
|
||||
|
||||
if (isset($_POST['NewsText'])) {
|
||||
Wootook::setConfig('game/news/content', $_POST['NewsText'], 1, 1);
|
||||
}
|
||||
|
||||
// Y a un TCHAT externe ??
|
||||
if (isset($_POST['chatframe']) && $_POST['chatframe'] == 'on') {
|
||||
$gameConfig['OverviewExternChat'] = "1";
|
||||
$gameConfig['OverviewExternChatCmd'] = addslashes( $_POST['ExternChat'] );
|
||||
Wootook::setConfig('engine/options/chat', true, 1, 1);
|
||||
} else {
|
||||
$gameConfig['OverviewExternChat'] = "0";
|
||||
$gameConfig['OverviewExternChatCmd'] = "";
|
||||
Wootook::setConfig('engine/options/chat', false, 1, 1);
|
||||
}
|
||||
|
||||
if (isset($_POST['googlead']) && $_POST['googlead'] == 'on') {
|
||||
$gameConfig['OverviewBanner'] = "1";
|
||||
$gameConfig['OverviewClickBanner'] = addslashes( $_POST['GoogleAds'] );
|
||||
if (isset($_POST['ga']) && $_POST['ga'] == 'on') {
|
||||
Wootook::setConfig('engine/options/ga', true, 1, 1);
|
||||
} else {
|
||||
$gameConfig['OverviewBanner'] = "0";
|
||||
$gameConfig['OverviewClickBanner'] = "";
|
||||
Wootook::setConfig('engine/options/ga', false, 1, 1);
|
||||
}
|
||||
if (isset($_POST['ga_id']) && !empty($_POST['ga_id'])) {
|
||||
Wootook::setConfig('engine/options/ga-id', $_POST['ga_id'], 1, 1);
|
||||
}
|
||||
|
||||
// Y a un BANNER Frame ?
|
||||
if (isset($_POST['bannerframe']) && $_POST['bannerframe'] == 'on') {
|
||||
$gameConfig['ForumBannerFrame'] = "1";
|
||||
Wootook::setConfig('engine/options/banner', true, 1, 1);
|
||||
} else {
|
||||
$gameConfig['ForumBannerFrame'] = "0";
|
||||
}
|
||||
|
||||
// Mode Debug ou pas !
|
||||
if (isset($_POST['debug']) && $_POST['debug'] == 'on') {
|
||||
$gameConfig['debug'] = "1";
|
||||
} else {
|
||||
$gameConfig['debug'] = "0";
|
||||
Wootook::setConfig('engine/options/banner', false, 1, 1);
|
||||
}
|
||||
|
||||
// Nom du Jeu
|
||||
if (isset($_POST['game_name']) && $_POST['game_name'] != '') {
|
||||
$gameConfig['game_name'] = $_POST['game_name'];
|
||||
if (isset($_POST['game_name']) && !empty($_POST['game_name'])) {
|
||||
Wootook::setConfig('game/general/name', $_POST['game_name'], 1, 1);
|
||||
}
|
||||
|
||||
// Adresse du Forum
|
||||
if (isset($_POST['forum_url']) && $_POST['forum_url'] != '') {
|
||||
$gameConfig['forum_url'] = $_POST['forum_url'];
|
||||
if (isset($_POST['forum_url']) && !empty($_POST['forum_url'])) {
|
||||
Wootook::setConfig('game/general/boards-url', $_POST['forum_url'], 1, 1);
|
||||
}
|
||||
|
||||
// Vitesse du Jeu
|
||||
if (isset($_POST['game_speed']) && is_numeric($_POST['game_speed'])) {
|
||||
$gameConfig['game_speed'] = $_POST['game_speed'];
|
||||
Wootook::setConfig('game/speed/general', $_POST['game_speed'], 1, 1);
|
||||
}
|
||||
|
||||
// Vitesse des Flottes
|
||||
if (isset($_POST['fleet_speed']) && is_numeric($_POST['fleet_speed'])) {
|
||||
$gameConfig['fleet_speed'] = $_POST['fleet_speed'];
|
||||
Wootook::setConfig('game/speed/fleet', $_POST['fleet_speed'], 1, 1);
|
||||
}
|
||||
|
||||
// Multiplicateur de Production
|
||||
if (isset($_POST['resource_multiplier']) && is_numeric($_POST['resource_multiplier'])) {
|
||||
$gameConfig['resource_multiplier'] = $_POST['resource_multiplier'];
|
||||
Wootook::setConfig('game/resource/multiplier', $_POST['resource_multiplier'], 1, 1);
|
||||
}
|
||||
|
||||
// Taille de la planete mère
|
||||
if (isset($_POST['initial_fields']) && is_numeric($_POST['initial_fields'])) {
|
||||
$gameConfig['initial_fields'] = $_POST['initial_fields'];
|
||||
Wootook::setConfig('resource/initial/fields', $_POST['initial_fields'], 1, 1);
|
||||
}
|
||||
|
||||
// Revenu de base Metal
|
||||
if (isset($_POST['metal_basic_income']) && is_numeric($_POST['metal_basic_income'])) {
|
||||
$gameConfig['metal_basic_income'] = $_POST['metal_basic_income'];
|
||||
Wootook::setConfig('resource/initial/metal', $_POST['metal_basic_income'], 1, 1);
|
||||
}
|
||||
|
||||
// Revenu de base Cristal
|
||||
if (isset($_POST['crystal_basic_income']) && is_numeric($_POST['crystal_basic_income'])) {
|
||||
$gameConfig['crystal_basic_income'] = $_POST['crystal_basic_income'];
|
||||
Wootook::setConfig('resource/initial/cristal', $_POST['crystal_basic_income'], 1, 1);
|
||||
}
|
||||
|
||||
// Revenu de base Deuterium
|
||||
if (isset($_POST['deuterium_basic_income']) && is_numeric($_POST['deuterium_basic_income'])) {
|
||||
$gameConfig['deuterium_basic_income'] = $_POST['deuterium_basic_income'];
|
||||
Wootook::setConfig('resource/initial/deuterium', $_POST['deuterium_basic_income'], 1, 1);
|
||||
}
|
||||
|
||||
// Revenu de base Energie
|
||||
if (isset($_POST['energy_basic_income']) && is_numeric($_POST['energy_basic_income'])) {
|
||||
$gameConfig['energy_basic_income'] = $_POST['energy_basic_income'];
|
||||
Wootook::setConfig('resource/initial/energy', $_POST['energy_basic_income'], 1, 1);
|
||||
}
|
||||
|
||||
// Lien supplémentaire dans le menu
|
||||
if (isset($_POST['enable_link_']) && is_numeric($_POST['enable_link_'])) {
|
||||
$gameConfig['link_enable'] = $_POST['enable_link_'];
|
||||
if (isset($_POST['url_link_']) && is_numeric($_POST['url_link_'])) {
|
||||
Wootook::setConfig('game/general/boards-url', $_POST['url_link_'], 1, 1);
|
||||
}
|
||||
// Texte de ce lien...
|
||||
$gameConfig['link_name'] = addslashes( $_POST['name_link_']);
|
||||
|
||||
// URL de ce lien...
|
||||
$gameConfig['link_url'] = $_POST['url_link_'];
|
||||
// Image de la bannière
|
||||
$gameConfig['banner_source_post'] = $_POST['banner_source_post'];
|
||||
if (isset($_POST['banner_source_post'])) {
|
||||
Wootook::setConfig('engine/options/banner', $_POST['banner_source_post'], 1, 1);
|
||||
}
|
||||
// 1 point = ??? Ressources ?
|
||||
if (isset($_POST['stat_settings']) && is_numeric($_POST['stat_settings'])) {
|
||||
$gameConfig['stat_settings'] = $_POST['stat_settings'];
|
||||
if (isset($_POST['stat_settings']) && is_numeric($_POST['stat_settings'])) {
|
||||
Wootook::setConfig('game/resource/multiplier', $_POST['stat_settings'], 1, 1);
|
||||
}
|
||||
// Activation -ou non- des annonces
|
||||
if (isset($_POST['enable_announces_']) && is_numeric($_POST['enable_announces_'])) {
|
||||
$gameConfig['enable_announces'] = $_POST['enable_announces_'];
|
||||
// Activation -ou non- des annonces
|
||||
if (isset($_POST['enable_announces_']) && is_numeric($_POST['enable_announces_'])) {
|
||||
Wootook::setConfig('engine/options/announces', $_POST['enable_announces_'], 1, 1);
|
||||
}
|
||||
// Activation -ou non- du marchand
|
||||
if (isset($_POST['enable_marchand_']) && is_numeric($_POST['enable_marchand_'])) {
|
||||
$gameConfig['enable_marchand'] = $_POST['enable_marchand_'];
|
||||
// Activation -ou non- du marchand
|
||||
if (isset($_POST['enable_marchand_']) && is_numeric($_POST['enable_marchand_'])) {
|
||||
Wootook::setConfig('engine/options/retailer', $_POST['enable_marchand_'], 1, 1);
|
||||
}
|
||||
// Activation -ou non- des notes
|
||||
if (isset($_POST['enable_notes_']) && is_numeric($_POST['enable_notes_'])) {
|
||||
$gameConfig['enable_notes'] = $_POST['enable_notes_'];
|
||||
// Activation -ou non- des notes
|
||||
if (isset($_POST['enable_notes_']) && is_numeric($_POST['enable_notes_'])) {
|
||||
Wootook::setConfig('engine/options/notes', $_POST['enable_notes_'], 1, 1);
|
||||
}
|
||||
// Nom du bot antimulti
|
||||
$gameConfig['bot_name'] = addslashes( $_POST['name_bot']);
|
||||
|
||||
// email du bot antimulti
|
||||
$gameConfig['bot_adress'] = addslashes( $_POST['adress_bot']);
|
||||
|
||||
// Activation -ou non- des notes
|
||||
if (isset($_POST['duration_ban']) && is_numeric($_POST['duration_ban'])) {
|
||||
$gameConfig['ban_duration'] = $_POST['duration_ban'];
|
||||
// Nom du bot antimulti
|
||||
if (isset($_POST['name_bot'])) {
|
||||
Wootook::setConfig('engine/bot/name', $_POST['name_bot'], 1, 1);
|
||||
}
|
||||
// email du bot antimulti
|
||||
if (isset($_POST['adress_bot'])) {
|
||||
Wootook::setConfig('engine/bot/email', $_POST['adress_bot'], 1, 1);
|
||||
}
|
||||
|
||||
// Activation -ou non- du bot
|
||||
if (isset($_POST['bot_enable']) && is_numeric($_POST['bot_enable'])) {
|
||||
$gameConfig['enable_bot'] = $_POST['bot_enable'];
|
||||
// Activation -ou non- des notes
|
||||
if (isset($_POST['duration_ban']) && is_numeric($_POST['duration_ban'])) {
|
||||
Wootook::setConfig('engine/ban/duration', $_POST['duration_ban'], 1, 1);
|
||||
}
|
||||
|
||||
// BBCode ou pas ?
|
||||
|
||||
if (isset($_POST['bbcode_field']) && is_numeric($_POST['bbcode_field'])) {
|
||||
$gameConfig['enable_bbcode'] = $_POST['bbcode_field'];
|
||||
// Activation -ou non- du bot
|
||||
if (isset($_POST['bot_enable']) && is_numeric($_POST['bot_enable'])) {
|
||||
Wootook::setConfig('engine/bot/active', $_POST['bot_enable'], 1, 1);
|
||||
}
|
||||
|
||||
$gameConfig->save();
|
||||
// BBCode ou pas ?
|
||||
if (isset($_POST['bbcode_field']) && is_numeric($_POST['bbcode_field'])) {
|
||||
Wootook::setConfig('engine/options/bbcode', $_POST['bbcode_field'], 1, 1);
|
||||
}
|
||||
|
||||
AdminMessage ('Options changees avec succes !', 'Succes', '?');
|
||||
AdminMessage('Options changees avec succes !', 'Succes', '?');
|
||||
} else {
|
||||
|
||||
$parse = $lang;
|
||||
$parse['game_name'] = $gameConfig['game_name'];
|
||||
$parse['game_speed'] = $gameConfig['game_speed'];
|
||||
$parse['fleet_speed'] = $gameConfig['fleet_speed'];
|
||||
$parse['resource_multiplier'] = $gameConfig['resource_multiplier'];
|
||||
$parse['forum_url'] = $gameConfig['forum_url'];
|
||||
$parse['initial_fields'] = $gameConfig['initial_fields'];
|
||||
$parse['metal_basic_income'] = $gameConfig['metal_basic_income'];
|
||||
$parse['crystal_basic_income'] = $gameConfig['crystal_basic_income'];
|
||||
$parse['deuterium_basic_income'] = $gameConfig['deuterium_basic_income'];
|
||||
$parse['energy_basic_income'] = $gameConfig['energy_basic_income'];
|
||||
$parse['enable_link'] = $gameConfig['link_enable'];
|
||||
$parse['name_link'] = $gameConfig['link_name'];
|
||||
$parse['url_link'] = $gameConfig['link_url'];
|
||||
$parse['enable_announces'] = $gameConfig['enable_announces'];
|
||||
$parse['enable_marchand'] = $gameConfig['enable_marchand'];
|
||||
$parse['enable_notes'] = $gameConfig['enable_notes'];
|
||||
$parse['bot_name'] = stripslashes($gameConfig['bot_name']);
|
||||
$parse['bot_adress'] = stripslashes($gameConfig['bot_adress']);
|
||||
$parse['ban_duration'] = stripslashes($gameConfig['ban_duration']);
|
||||
$parse['enable_bot'] = stripslashes($gameConfig['enable_bot']);
|
||||
$parse['enable_bbcode'] = stripslashes($gameConfig['enable_bbcode']);
|
||||
$parse['game_name'] = Wootook::getGameConfig('game/general/name');
|
||||
$parse['game_speed'] = Wootook::getGameConfig('game/speed/general');
|
||||
$parse['fleet_speed'] = Wootook::getGameConfig('game/speed/fleet');
|
||||
$parse['resource_multiplier'] = Wootook::getGameConfig('game/resource/multiplier');
|
||||
$parse['forum_url'] = Wootook::getGameConfig('game/general/boards-url');
|
||||
$parse['initial_fields'] = Wootook::getGameConfig('resource/initial/fields');
|
||||
$parse['metal_basic_income'] = Wootook::getGameConfig('resource/initial/metal');
|
||||
$parse['crystal_basic_income'] = Wootook::getGameConfig('resource/initial/cristal');
|
||||
$parse['deuterium_basic_income'] = Wootook::getGameConfig('resource/initial/deuterium');
|
||||
$parse['energy_basic_income'] = Wootook::getGameConfig('resource/initial/energy');
|
||||
$parse['enable_link'] = $gameConfig['link_enable'];
|
||||
$parse['name_link'] = Wootook::getGameConfig('game/general/extra-url-title');
|
||||
$parse['url_link'] = Wootook::getGameConfig('game/general/extra-url');
|
||||
$parse['enable_announces'] = Wootook::getGameConfig('engine/options/announces');
|
||||
$parse['enable_marchand'] = Wootook::getGameConfig('engine/options/retailer');
|
||||
$parse['enable_notes'] = Wootook::getGameConfig('engine/options/notes');
|
||||
$parse['bot_name'] = Wootook::getGameConfig('engine/bot/name');
|
||||
$parse['bot_adress'] = Wootook::getGameConfig('engine/bot/email');
|
||||
$parse['ban_duration'] = Wootook::getGameConfig('engine/ban/duration');
|
||||
$parse['enable_bot'] = Wootook::getGameConfig('engine/bot/active');
|
||||
$parse['enable_bbcode'] = Wootook::getGameConfig('engine/options/bbcode');
|
||||
|
||||
$parse['banner_source_post'] = $gameConfig['banner_source_post'];
|
||||
$parse['stat_settings'] = stripslashes($gameConfig['stat_settings']);
|
||||
$parse['banner_source_post'] = Wootook::getGameConfig('engine/options/banner');
|
||||
$parse['stat_settings'] = Wootook::getGameConfig('game/resource/multiplier');
|
||||
|
||||
$parse['closed'] = (!Wootook::getGameConfig('game/general/active')) ? " checked = 'checked' ":"";
|
||||
$parse['close_reason'] = Wootook::getGameConfig('game/general/closing-message');
|
||||
|
||||
|
||||
$parse['closed'] = ($gameConfig['game_disable'] == 1) ? " checked = 'checked' ":"";
|
||||
$parse['close_reason'] = stripslashes( $gameConfig['close_reason'] );
|
||||
|
||||
$parse['newsframe'] = ($gameConfig['OverviewNewsFrame'] == 1) ? " checked = 'checked' ":"";
|
||||
$parse['NewsTextVal'] = stripslashes( $gameConfig['OverviewNewsText'] );
|
||||
$parse['newsframe'] = (Wootook::getGameConfig('game/news/active')) ? " checked = 'checked' ":"";
|
||||
$parse['NewsTextVal'] = Wootook::getGameConfig('game/news/content');
|
||||
|
||||
$parse['chatframe'] = ($gameConfig['OverviewExternChat'] == 1) ? " checked = 'checked' ":"";
|
||||
$parse['ExtTchatVal'] = stripslashes( $gameConfig['OverviewExternChatCmd'] );
|
||||
|
||||
$parse['googlead'] = ($gameConfig['OverviewBanner'] == 1) ? " checked = 'checked' ":"";
|
||||
$parse['GoogleAdVal'] = stripslashes( $gameConfig['OverviewClickBanner'] );
|
||||
|
||||
$parse['debug'] = ($gameConfig['debug'] == 1) ? " checked = 'checked' ":"";
|
||||
$parse['ga'] = (Wootook::getGameConfig('engine/options/ga')) ? " checked = 'checked' ":"";
|
||||
$parse['ga_id'] = Wootook::getGameConfig('engine/options/ga-id');
|
||||
|
||||
$parse['bannerframe'] = ($gameConfig['ForumBannerFrame'] == 1) ? " checked = 'checked' ":"";
|
||||
|
||||
$PageTPL = gettemplate('admin/options_body');
|
||||
$Page = parsetemplate( $PageTPL, $parse );
|
||||
$Page = parsetemplate($PageTPL, $parse);
|
||||
|
||||
display ( $Page, $lang['adm_opt_title'], false, '', true );
|
||||
display($Page, $lang['adm_opt_title'], false, '', true);
|
||||
}
|
||||
} else {
|
||||
AdminMessage ( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
|
||||
AdminMessage($lang['sys_noalloaw'], $lang['sys_noaccess']);
|
||||
}
|
||||
return $Page;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ if (strtolower(substr(PHP_SAPI, 0, 3)) == 'cli' || in_array($user['authlevel'],
|
|||
|
||||
$GameUsers = doquery("SELECT * FROM {{table}} WHERE authlevel<3", 'users');
|
||||
|
||||
$resourceMultiplier = Wootook::getGameConfig('game/resource/multiplier');
|
||||
|
||||
while ($CurUser = $GameUsers->fetch(PDO::FETCH_ASSOC)) {
|
||||
// Recuperation des anciennes statistiques
|
||||
$OldStatRecord = doquery ("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `id_owner` = '".$CurUser['id']."';", 'statpoints', true);
|
||||
|
|
@ -69,7 +71,7 @@ if (strtolower(substr(PHP_SAPI, 0, 3)) == 'cli' || in_array($user['authlevel'],
|
|||
// Total des unitées consommée pour la recherche
|
||||
$Points = GetTechnoPoints ( $CurUser );
|
||||
$TTechCount = $Points['TechCount'];
|
||||
$TTechPoints = ($Points['TechPoint'] / $gameConfig['stat_settings']);
|
||||
$TTechPoints = ($Points['TechPoint'] / $resourceMultiplier);
|
||||
|
||||
// Totalisation des points accumulés par planete
|
||||
$TBuildCount = 0;
|
||||
|
|
@ -85,20 +87,20 @@ if (strtolower(substr(PHP_SAPI, 0, 3)) == 'cli' || in_array($user['authlevel'],
|
|||
$Points = GetBuildPoints ( $CurPlanet );
|
||||
$TBuildCount += $Points['BuildCount'];
|
||||
$GCount += $Points['BuildCount'];
|
||||
$PlanetPoints = ($Points['BuildPoint'] / $gameConfig['stat_settings']);
|
||||
$TBuildPoints += ($Points['BuildPoint'] / $gameConfig['stat_settings']);
|
||||
$PlanetPoints = ($Points['BuildPoint'] / $resourceMultiplier);
|
||||
$TBuildPoints += ($Points['BuildPoint'] / $resourceMultiplier);
|
||||
|
||||
$Points = GetDefensePoints ( $CurPlanet );
|
||||
$TDefsCount += $Points['DefenseCount'];;
|
||||
$GCount += $Points['DefenseCount'];
|
||||
$PlanetPoints += ($Points['DefensePoint'] / $gameConfig['stat_settings']);
|
||||
$TDefsPoints += ($Points['DefensePoint'] / $gameConfig['stat_settings']);
|
||||
$PlanetPoints += ($Points['DefensePoint'] / $resourceMultiplier);
|
||||
$TDefsPoints += ($Points['DefensePoint'] / $resourceMultiplier);
|
||||
|
||||
$Points = GetFleetPoints ( $CurPlanet );
|
||||
$TFleetCount += $Points['FleetCount'];
|
||||
$GCount += $Points['FleetCount'];
|
||||
$PlanetPoints += ($Points['FleetPoint'] / $gameConfig['stat_settings']);
|
||||
$TFleetPoints += ($Points['FleetPoint'] / $gameConfig['stat_settings']);
|
||||
$PlanetPoints += ($Points['FleetPoint'] / $resourceMultiplier);
|
||||
$TFleetPoints += ($Points['FleetPoint'] / $resourceMultiplier);
|
||||
|
||||
$GPoints += $PlanetPoints;
|
||||
$QryUpdatePlanet = "UPDATE {{table}} SET ";
|
||||
|
|
|
|||
Loading…
Reference in a new issue