Updated data access layer

Renamed classes, methods & variables from "User" to "Player"
Fixed dependencies requirements in the research lab queue
Updated overview
Added MVC's controller
Added build files
Updated directory structure

Signed-off-by: Gregory PLANCHAT <g.planchat@gmail.com>
This commit is contained in:
Gregory PLANCHAT 2012-02-28 22:43:37 +01:00
commit 690a7f60f3
1435 changed files with 5772 additions and 5764 deletions

View file

@ -0,0 +1,79 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR, LEVEL_MODERATOR))) {
includeLang('admin');
$QrySelectPlanet = "SELECT `id`, `id_owner`, `b_hangar`, `b_hangar_id` ";
$QrySelectPlanet .= "FROM {{table}} ";
$QrySelectPlanet .= "WHERE ";
$QrySelectPlanet .= "`b_hangar_id` != '0';";
$AffectedPlanets = doquery ($QrySelectPlanet, 'planets');
$DeletedQueues = 0;
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'] );
}
?>

View file

@ -0,0 +1,59 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
if (in_array($user['authlevel'], array(LEVEL_ADMIN))) {
includeLang('admin/Queries');
$parse = $lang;
if ($_POST['really_do_it'] == 'on') {
mysql_query ($_POST['qry_sql']);
AdminMessage ($lang['qry_succesful'], 'Succes', '?');
} else {
}
$PageTpl = gettemplate("admin/exec_query");
$Page = parsetemplate( $PageTpl, $parse);
display( $Page, $lang['qry_title'], false, '', true );
} else {
message( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}
?>

View file

@ -0,0 +1,50 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
include(ROOT_PATH . 'includes/functions/BuildFlyingFleetTable.'.PHPEXT);
if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR, LEVEL_MODERATOR))) {
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);
} else {
AdminMessage ( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}

View file

@ -0,0 +1,138 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
includeLang('admin');
function WootookResetUnivers ( $CurrentUser ) {
global $lang;
if (in_array($CurrentUser['authlevel'], array(LEVEL_ADMIN))) {
// 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');
doquery( "RENAME TABLE {{table}} TO {{table}}_s", 'galaxy');
doquery( "RENAME TABLE {{table}} TO {{table}}_s", 'banned');
// 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');
doquery( "CREATE TABLE IF NOT EXISTS {{table}} ( LIKE {{table}}_s );", 'galaxy');
doquery( "CREATE TABLE IF NOT EXISTS {{table}} ( LIKE {{table}}_s );", 'banned');
// 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 = "INSERT INTO {{table}} SET ";
$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<63><72>
$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 = "UPDATE {{table}} SET ";
$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;
}
$mode = $_POST['mode'];
$PageTpl = gettemplate("admin/reset_body");
$parse = $lang;
if ($mode == 'reset') {
WootookResetUnivers ( $user );
} else {
$Page = parsetemplate($PageTpl, $parse);
display ($Page, $lang['Reset'], false, '', true);
}
?>

View file

@ -0,0 +1,67 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
$user = Wootook_Player_Model_Session::getSingleton()->getPlayer();
if (!in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR))) {
message( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
exit(0);
}
includeLang('admin');
$parse = $lang;
$parse['dpath'] = $dpath;
$parse['mf'] = $mf;
$PageTPL = gettemplate('admin/activeplanet_body');
$AllActivPlanet = doquery("SELECT * FROM {{table}} WHERE `last_update` >= '". (time()-15 * 60) ."' ORDER BY `id` ASC", 'planets');
$Count = 0;
while ($ActivPlanet = $AllActivPlanet->fetch(PDO::FETCH_BOTH)) {
$parse['online_list'] .= "<tr>";
$parse['online_list'] .= "<td class=b><center><b>". $ActivPlanet['name'] ."</b></center></td>";
$parse['online_list'] .= "<td class=b><center><b>[". $ActivPlanet['galaxy'] .":". $ActivPlanet['system'] .":". $ActivPlanet['planet'] ."]</b></center></td>";
$parse['online_list'] .= "<td class=m><center><b>". pretty_number($ActivPlanet['points'] / 1000) ."</b></center></td>";
$parse['online_list'] .= "<td class=b><center><b>". pretty_time(time() - $ActivPlanet['last_update']) . "</b></center></td>";
$parse['online_list'] .= "</tr>";
$Count++;
}
$parse['online_list'] .= "<tr>";
$parse['online_list'] .= "<th class=\"b\" colspan=\"4\">". $lang['adm_pl_they'] ." ". $Count ." ". $lang['adm_pl_apla'] ."</th>";
$parse['online_list'] .= "</tr>";
$page = parsetemplate( $PageTPL , $parse );
display( $page, $lang['adm_pl_title'], false, '', true );

103
src/admin/add_fleet.php Normal file
View file

@ -0,0 +1,103 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
$user = Wootook_Player_Model_Session::getSingleton()->getPlayer();
if (!in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR))) {
message( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
exit(0);
}
includeLang('admin/add_fleet');
$mode = $_GET['mode'];
if($mode != 'add') {
$parse['ID'] = $lang['Id'];
$parse['Cle'] = $lang['cle'];
$parse['Clourd'] = $lang['clourd'];
$parse['Pt'] = $lang['pt'];
$parse['Gt'] = $lang['gt'];
$parse['Cruise'] = $lang['cruise'];
$parse['Vb'] = $lang['vb'];
$parse['Colo'] = $lang['colo'];
$parse['Rc'] = $lang['rc'];
$parse['Spy'] = $lang['spy'];
$parse['Bomb'] = $lang['bomb'];
$parse['Solar'] = $lang['solar'];
$parse['Des'] = $lang['des'];
$parse['Rip'] = $lang['rip'];
$parse['Traq'] = $lang['traq'];
} else if($mode == 'add') {
$id = $_POST['id'];
$cle = $_POST['cle'];
$clourd = $_POST['clourd'];
$pt = $_POST['pt'];
$gt = $_POST['gt'];
$cruise = $_POST['cruise'];
$vb = $_POST['vb'];
$colo = $_POST['colo'];
$rc = $_POST['rc'];
$spy = $_POST['spy'];
$bomb = $_POST['bomb'];
$solar = $_POST['solar'];
$des = $_POST['des'];
$rip = $_POST['rip'];
$traq = $_POST['traq'];
$SqlAdd = "UPDATE {{table}} SET";
$SqlAdd .= "`light_hunter` = '".$cle."+light_hunter', ";
$SqlAdd .= "`heavy_hunter` = '".$clourd."+heavy_hunter', ";
$SqlAdd .= "`small_ship_cargo` = '".$pt."+small_ship_cargo', ";
$SqlAdd .= "`big_ship_cargo` = '".$gt."+big_ship_cargo', ";
$SqlAdd .= "`crusher` = '".$cruise."+crusher', ";
$SqlAdd .= "`battle_ship` = '".$vb."+battle_ship', ";
$SqlAdd .= "`colonizer` = '".$colo."+colonizer', ";
$SqlAdd .= "`recycler` = '".$rc."+recycler', ";
$SqlAdd .= "`spy_sonde`= '".$spy."+spy_sonde', ";
$SqlAdd .= "`bomber_ship` = '".$bomb."+bomber_ship', ";
$SqlAdd .= "`solar_satelit` = '".$solar."+solar_satelit', ";
$SqlAdd .= "`destructor` = '".$des."+destructor', ";
$SqlAdd .= "`dearth_star` = '".$rip."+dearth_star', ";
$SqlAdd .= "`battleship` = '".$traq."+battleship', ";
$SqlAdd .= " WHERE `id` = '".$id."' LIMIT 1";
doquery($SqlAdd, "planets");
message('Ajout OK');
}
$page = parsetemplate(gettemplate('admin/add_fleet'), $parse);
display( $page);

68
src/admin/add_money.php Normal file
View file

@ -0,0 +1,68 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
$user = Wootook_Player_Model_Session::getSingleton()->getPlayer();
if (!in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR))) {
message( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
exit(0);
}
includeLang('admin');
$mode = $_POST['mode'];
$PageTpl = gettemplate("admin/add_money");
$parse = $lang;
if ($mode == 'addit') {
$id = $_POST['id'];
$metal = $_POST['metal'];
$cristal = $_POST['cristal'];
$deut = $_POST['deut'];
$QryUpdatePlanet = "UPDATE {{table}} SET ";
$QryUpdatePlanet .= "`metal` = `metal` + '". $metal ."', ";
$QryUpdatePlanet .= "`crystal` = `crystal` + '". $cristal ."', ";
$QryUpdatePlanet .= "`deuterium` = `deuterium` + '". $deut ."' ";
$QryUpdatePlanet .= "WHERE ";
$QryUpdatePlanet .= "`id` = '". $id ."' ";
doquery( $QryUpdatePlanet, "planets");
AdminMessage ( $lang['adm_am_done'], $lang['adm_am_ttle'] );
}
$Page = parsetemplate($PageTpl, $parse);
display ($Page, $lang['adm_am_ttle'], false, '', true);

69
src/admin/add_moon.php Normal file
View file

@ -0,0 +1,69 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR))) {
includeLang('admin/addmoon');
$mode = $_POST['mode'];
$PageTpl = gettemplate("admin/add_moon");
$parse = $lang;
if ($mode == 'addit') {
$PlanetID = $_POST['user'];
$MoonName = $_POST['name'];
$QrySelectPlanet = "SELECT * FROM {{table}} ";
$QrySelectPlanet .= "WHERE ";
$QrySelectPlanet .= "`id` = '". $PlanetID ."';";
$PlanetSelected = doquery ( $QrySelectPlanet, 'planets', true);
$Galaxy = $PlanetSelected['galaxy'];
$System = $PlanetSelected['system'];
$Planet = $PlanetSelected['planet'];
$Owner = $PlanetSelected['id_owner'];
$MoonID = time();
CreateOneMoonRecord ( $Galaxy, $System, $Planet, $Owner, $MoonID, $MoonName, 20 );
AdminMessage ( $lang['addm_done'], $lang['addm_title'] );
}
$Page = parsetemplate($PageTpl, $parse);
display ($Page, $lang['addm_title'], false, '', true);
} else {
AdminMessage ( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}
?>

47
src/admin/autounban.php Normal file
View file

@ -0,0 +1,47 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
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::getStaticUrl('admin/overview.php'))
->sendHeaders();
exit(0);
} else {
message ( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}

89
src/admin/banned.php Normal file
View file

@ -0,0 +1,89 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR, LEVEL_MODERATOR))) {
includeLang('admin');
$mode = $_POST['mode'];
$PageTpl = gettemplate("admin/banned");
$parse = $lang;
if ($mode == 'banit') {
$name = $_POST['name'];
$reas = $_POST['why'];
$days = $_POST['days'];
$hour = $_POST['hour'];
$mins = $_POST['mins'];
$secs = $_POST['secs'];
$admin = $user['username'];
$mail = $user['email'];
$Now = time();
$BanTime = $days * 86400;
$BanTime += $hour * 3600;
$BanTime += $mins * 60;
$BanTime += $secs;
$BannedUntil = $Now + $BanTime;
$QryInsertBan = "INSERT INTO {{table}} SET ";
$QryInsertBan .= "`who` = \"". $name ."\", ";
$QryInsertBan .= "`theme` = '". $reas ."', ";
$QryInsertBan .= "`who2` = '". $name ."', ";
$QryInsertBan .= "`time` = '". $Now ."', ";
$QryInsertBan .= "`longer` = '". $BannedUntil ."', ";
$QryInsertBan .= "`author` = '". $admin ."', ";
$QryInsertBan .= "`email` = '". $mail ."';";
doquery( $QryInsertBan, 'banned');
$QryUpdateUser = "UPDATE {{table}} SET ";
$QryUpdateUser .= "`bana` = '1', ";
$QryUpdateUser .= "`banaday` = '". $BannedUntil ."' ";
$QryUpdateUser .= "WHERE ";
$QryUpdateUser .= "`username` = \"". $name ."\";";
doquery( $QryUpdateUser, 'users');
$DoneMessage = $lang['adm_bn_thpl'] ." ". $name ." ". $lang['adm_bn_isbn'];
AdminMessage ($DoneMessage, $lang['adm_bn_ttle']);
}
$Page = parsetemplate($PageTpl, $parse);
display( $Page, $lang['adm_bn_ttle'], false, '', true);
} else {
AdminMessage ($lang['sys_noalloaw'], $lang['sys_noaccess']);
}
?>

56
src/admin/changelog.php Normal file
View file

@ -0,0 +1,56 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
includeLang('changelog');
$template = gettemplate('changelog_table');
$parse = $lang;
foreach($lang['changelog'] as $a => $b)
{
$parse['version_number'] = $a;
$parse['description'] = nl2br($b);
$body .= parsetemplate($template, $parse);
}
$parse['body'] = $body;
$page .= parsetemplate(gettemplate('changelog_body'), $parse);
display( $page, "Changelog", false, '', true);
?>

66
src/admin/chat.php Normal file
View file

@ -0,0 +1,66 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
includeLang('admin');
$parse = $lang;
if (in_array($user['authlevel'], array(LEVEL_ADMIN))) {
// Système de suppression
extract($_GET);
if (isset($delete)) {
doquery("DELETE FROM {{table}} WHERE `messageid`=$delete", 'chat');
} elseif ($deleteall == 'yes') {
doquery("DELETE FROM {{table}}", 'chat');
}
// Affichage des messages
$query = doquery("SELECT * FROM {{table}} ORDER BY messageid DESC LIMIT 25", 'chat');
$i = 0;
while ($e = $query->fetch(PDO::FETCH_BOTH)) {
$i++;
$parse['msg_list'] .= stripslashes("<tr><th class=b>" . date('h:i:s', $e['timestamp']) . "</th>".
"<th class=b>". $e['user'] . "</th>".
"<td class=b>" . nl2br($e['message']) . "</td>".
"<th class=b><a href=?delete=".$e['messageid']."><img src=\"../images/r1.png\" border=\"0\"></a></th></tr>");
}
$parse['msg_list'] .= "<tr><th class=b colspan=4>{$i} ".$lang['adm_ch_nbs']."</th></tr>";
display(parsetemplate(gettemplate('admin/chat_body'), $parse), "Chat", false, '', true);
} else {
message( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}
?>

73
src/admin/credit.php Normal file
View file

@ -0,0 +1,73 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
includeLang('credit');
$parse = $lang;
if (in_array($user['authlevel'], array(LEVEL_ADMIN))) {
if ($_POST['opt_save'] == "1") {
// Extended copyright is activated?
if (isset($_POST['ExtCopyFrame']) && $_POST['ExtCopyFrame'] == 'on') {
$gameConfig['ExtCopyFrame'] = "1";
$gameConfig['ExtCopyOwner'] = $_POST['ExtCopyOwner'];
$gameConfig['ExtCopyFunct'] = $_POST['ExtCopyFunct'];
} else {
$gameConfig['ExtCopyFrame'] = "0";
$gameConfig['ExtCopyOwner'] = "";
$gameConfig['ExtCopyFunct'] = "";
}
// Update values
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['ExtCopyFrame'] ."' WHERE `config_name` = 'ExtCopyFrame';", 'config');
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['ExtCopyOwner'] ."' WHERE `config_name` = 'ExtCopyOwner';", 'config');
doquery("UPDATE {{table}} SET `config_value` = '". $gameConfig['ExtCopyFunct'] ."' WHERE `config_name` = 'ExtCopyFunct';", 'config');
AdminMessage ($lang['cred_done'], $lang['cred_ext']);
} else {
//View values
$parse['ExtCopyFrame'] = ($gameConfig['ExtCopyFrame'] == 1) ? " checked = 'checked' ":"";
$parse['ExtCopyOwnerVal'] = $gameConfig['ExtCopyOwner'];
$parse['ExtCopyFunctVal'] = $gameConfig['ExtCopyFunct'];
$BodyTPL = gettemplate('admin/credit_body');
$page = parsetemplate($BodyTPL, $parse);
display($page, $lang['cred_credit'], false);
}
} else {
message( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}
?>

View file

@ -0,0 +1,83 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR))) {
includeLang('admin');
if ($_GET['cmd'] == 'dele') {
DeleteSelectedUser ( $_GET['user'] );
}
if ($_GET['cmd'] == 'sort') {
$TypeSort = $_GET['type'];
} else {
$TypeSort = "id";
}
$PageTPL = gettemplate('admin/declarelist_body');
$RowsTPL = gettemplate('admin/declarelist_rows');
$query = doquery("SELECT * FROM {{table}} ORDER BY `declarator` DESC", 'declared');
$parse = $lang;
$parse['adm_ul_table'] = "";
$i = 0;
$Color = "lime";
while ($u = $query->fetch(PDO::FETCH_ASSOC) ) {
if ($PrevIP != "") {
if ($PrevIP == $u['declarator']) {
$Color = "red";
} else {
$Color = "lime";
}
}
$Bloc['adm_ul_data_id'] = stripslashes($u['declarator_name']);
$Bloc['adm_ul_data_name'] = stripslashes($u['declarator']);
$Bloc['adm_ul_data_mail'] = stripslashes($u['declared_1']);
$Bloc['adm_ul_data_adip'] = stripslashes($u['declared_2']);
$Bloc['adm_ul_data_detai'] = stripslashes($u['declared_3']);
$Bloc['adm_ul_data_regd'] = stripslashes($u['reason']);
$parse['adm_ul_table'] .= parsetemplate( $RowsTPL, $Bloc );
$i++;
}
$parse['adm_ul_count'] = $i;
$page = parsetemplate( $PageTPL, $parse );
display( $page, "Liste des joueurs ayant declare une IP collective", false, '', true);
} else {
message( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}
?>

50
src/admin/deletuser.php Normal file
View file

@ -0,0 +1,50 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
if (in_array($CurrentUser['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR))) {
$PageTpl = gettemplate( "admin/deletuser" );
if ( $mode != "delet" ) {
$parse['adm_bt_delet'] = $lang['adm_bt_delet'];
}
$Page = parsetemplate( $PageTpl, $parse );
display ( $Page, $lang['adminpanel'], false, '', true );
} else {
message( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}
?>

70
src/admin/errors.php Normal file
View file

@ -0,0 +1,70 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
includeLang('admin');
$parse = $lang;
if (in_array($user['authlevel'], array(LEVEL_ADMIN))) {
// Supprimer les erreurs
extract($_GET);
if (isset($delete)) {
doquery("DELETE FROM {{table}} WHERE `error_id`=$delete", 'errors');
} elseif ($deleteall == 'yes') {
doquery("TRUNCATE TABLE {{table}}", 'errors');
}
// Afficher les erreurs
$query = doquery("SELECT * FROM {{table}}", 'errors');
$i = 0;
while ($u = $query->fetch(PDO::FETCH_BOTH)) {
$i++;
$parse['errors_list'] .= "
<tr><td width=\"25\" class=n>". $u['error_id'] ."</td>
<td width=\"170\" class=n>". $u['error_type'] ."</td>
<td width=\"230\" class=n>". date('d/m/Y h:i:s', $u['error_time']) ."</td>
<td width=\"95\" class=n><a href=\"?delete=". $u['error_id'] ."\"><img src=\"../images/r1.png\"></a></td></tr>
<tr><td colspan=\"4\" class=b>". nl2br($u['error_text'])."</td></tr>";
}
$parse['errors_list'] .= "<tr>
<th class=b colspan=5>". $i ." ". $lang['adm_er_nbs'] ."</th>
</tr>";
display(parsetemplate(gettemplate('admin/errors_body'), $parse), "Bledy", false, '', true);
} else {
message( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}
?>

50
src/admin/leftmenu.php Normal file
View file

@ -0,0 +1,50 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
includeLang('leftmenu');
if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR, LEVEL_MODERATOR))) {
$parse = $lang;
$parse['mf'] = "Hauptframe";
$parse['dpath'] = $dpath;
$parse['WootookRelease'] = VERSION;
$parse['servername'] = 'Wootook';
$Page = parsetemplate(gettemplate('admin/left_menu'), $parse);
display($Page, "", false, '', true);
} else {
message( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}
?>

View file

@ -0,0 +1,60 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR, LEVEL_MODERATOR))) {
includeLang('admin/changepass');
$parse = $lang;
if ($_POST['md5q'] != "") {
doquery ("UPDATE {{table}} SET `password` = '" . md5 ($_POST['md5q']) . "' WHERE `username` = '".$_POST['user']."';", 'users');
//$QueryUpdatePass = "UPDATE {{table}} SET ";
//$QueryUpdatePass .= "`password` = '" . md5 ($_POST['md5q']) . "', ";
//$QueryUpdatePass = "WHERE ";
//$QueryUpdatePass .= "`username`=" . $_POST['user'] . "";
// doquery($QueryUpdatePass, 'users');
} else {
}
$PageTpl = gettemplate("admin/changepass");
$Page = parsetemplate( $PageTpl, $parse);
display( $Page, $lang['md5_title'], false, '', true );
} else {
message( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}
?>

57
src/admin/md5enc.php Normal file
View file

@ -0,0 +1,57 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR, LEVEL_MODERATOR))) {
includeLang('admin/md5enc');
$parse = $lang;
if ($_POST['md5q'] != "") {
$parse['md5_md5'] = $_POST['md5q'];
$parse['md5_enc'] = md5 ($_POST['md5q']);
} else {
$parse['md5_md5'] = "";
$parse['md5_enc'] = md5 ("");
}
$PageTpl = gettemplate("admin/md5enc");
$Page = parsetemplate( $PageTpl, $parse);
display( $Page, $lang['md5_title'], false, '', true );
} else {
message( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}
?>

148
src/admin/messagelist.php Normal file
View file

@ -0,0 +1,148 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR))) {
includeLang('admin/messagelist');
$BodyTpl = gettemplate('admin/messagelist_body');
$RowsTpl = gettemplate('admin/messagelist_table_rows');
$Prev = ( !empty($_POST['prev']) ) ? true : false;
$Next = ( !empty($_POST['next']) ) ? true : false;
$DelSel = ( !empty($_POST['delsel']) ) ? true : false;
$DelDat = ( !empty($_POST['deldat']) ) ? true : false;
$CurrPage = ( !empty($_POST['curr']) ) ? $_POST['curr'] : 1;
$Selected = ( !empty($_POST['sele']) ) ? $_POST['sele'] : 0;
$SelType = $_POST['type'];
$SelPage = $_POST['page'];
$ViewPage = 1;
if ( $Selected != $SelType ) {
$Selected = $SelType;
$ViewPage = 1;
} elseif ( $CurrPage != $SelPage ) {
$ViewPage = ( !empty($SelPage) ) ? $SelPage : 1;
}
if ($Prev == true) {
$CurrPage -= 1;
if ($CurrPage >= 1) {
$ViewPage = $CurrPage;
} else {
$ViewPage = 1;
}
} elseif ($Next == true) {
$Mess = doquery("SELECT COUNT(*) AS `max` FROM {{table}} WHERE `message_type` = '". $Selected ."';", 'messages', true);
$MaxPage = ceil ( ($Mess['max'] / 25) );
$CurrPage += 1;
if ($CurrPage <= $MaxPage) {
$ViewPage = $CurrPage;
} else {
$ViewPage = $MaxPage;
}
} elseif ($DelSel == true) {
foreach($_POST['sele'] as $MessId => $Value) {
if ($Value = "on") {
doquery ( "DELETE FROM {{table}} WHERE `message_id` = '". $MessId ."';", 'messages');
}
}
} elseif ($DelDat == true) {
$SelDay = $_POST['selday'];
$SelMonth = $_POST['selmonth'];
$SelYear = $_POST['selyear'];
$LimitDate = mktime (0,0,0, $SelMonth, $SelDay, $SelYear );
if ($LimitDate != false) {
doquery ( "DELETE FROM {{table}} WHERE `message_time` <= '". $LimitDate ."';", 'messages');
doquery ( "DELETE FROM {{table}} WHERE `time` <= '". $LimitDate ."';", 'rw');
}
}
$Mess = doquery("SELECT COUNT(*) AS `max` FROM {{table}} WHERE `message_type` = '". $Selected ."';", 'messages', true);
$MaxPage = ceil ( ($Mess['max'] / 25) );
$parse = $lang;
$parse['mlst_data_page'] = $ViewPage;
$parse['mlst_data_pagemax'] = $MaxPage;
$parse['mlst_data_sele'] = $Selected;
$parse['mlst_data_types'] = "<option value=\"0\"". (($Selected == "0") ? " SELECTED" : "") .">". $lang['mlst_mess_typ__0'] ."</option>";
$parse['mlst_data_types'] .= "<option value=\"1\"". (($Selected == "1") ? " SELECTED" : "") .">". $lang['mlst_mess_typ__1'] ."</option>";
$parse['mlst_data_types'] .= "<option value=\"2\"". (($Selected == "2") ? " SELECTED" : "") .">". $lang['mlst_mess_typ__2'] ."</option>";
$parse['mlst_data_types'] .= "<option value=\"3\"". (($Selected == "3") ? " SELECTED" : "") .">". $lang['mlst_mess_typ__3'] ."</option>";
$parse['mlst_data_types'] .= "<option value=\"4\"". (($Selected == "4") ? " SELECTED" : "") .">". $lang['mlst_mess_typ__4'] ."</option>";
$parse['mlst_data_types'] .= "<option value=\"5\"". (($Selected == "5") ? " SELECTED" : "") .">". $lang['mlst_mess_typ__5'] ."</option>";
$parse['mlst_data_types'] .= "<option value=\"15\"". (($Selected == "15") ? " SELECTED" : "") .">". $lang['mlst_mess_typ_15'] ."</option>";
$parse['mlst_data_types'] .= "<option value=\"99\"". (($Selected == "99") ? " SELECTED" : "") .">". $lang['mlst_mess_typ_99'] ."</option>";
$parse['mlst_data_pages'] = "";
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 = $Messages->fetch(PDO::FETCH_ASSOC)) {
$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.".PHPEXT, 3);
}
display ($display, $lang['mlst_title'], false, '', true);
} else {
message($lang['sys_noalloaw'], $lang['sys_noaccess']);
}
?>

75
src/admin/messall.php Normal file
View file

@ -0,0 +1,75 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
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);
}
message("<font color=\"lime\">Wys<79>a<EFBFBD>e<EFBFBD> wiadomo<6D><6F> do wszystkich graczy</font>", "Complete", "../overview." . PHPEXT, 3);
}
} else {
$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']);
}

62
src/admin/moonlist.php Normal file
View file

@ -0,0 +1,62 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR))) {
includeLang('overview');
$parse = $lang;
$query = doquery("SELECT * FROM {{table}} WHERE planet_type='3'", "planets");
$i = 0;
while ($u = $query->fetch(PDO::FETCH_BOTH)) {
$parse['moon'] .= "<tr>"
. "<td class=b><center><b>" . $u[0] . "</center></b></td>"
. "<td class=b><center><b>" . $u[1] . "</center></b></td>"
. "<td class=b><center><b>" . $u[2] . "</center></b></td>"
. "<td class=b><center><b>" . $u[4] . "</center></b></td>"
. "<td class=b><center><b>" . $u[5] . "</center></b></td>"
. "<td class=b><center><b>" . $u[6] . "</center></b></td>"
. "</tr>";
$i++;
}
if ($i == "1")
$parse['moon'] .= "<tr><th class=b colspan=6>Il y a qu'une seule lune</th></tr>";
else
$parse['moon'] .= "<tr><th class=b colspan=6>Il y a {$i} lunes</th></tr>";
display(parsetemplate(gettemplate('admin/moonlist_body'), $parse), 'Lunalist' , false, '', true);
} else {
message( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}
?>

65
src/admin/multi.php Normal file
View file

@ -0,0 +1,65 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR, LEVEL_MODERATOR))) {
includeLang('admin/multi');
$query = doquery("SELECT * FROM {{table}}", 'multi');
$parse = $lang;
$parse['adm_mt_table'] = "";
$i = 0;
$RowsTPL = gettemplate('admin/multi_rows');
$PageTPL = gettemplate('admin/multi_body');
while ($infos = $query->fetch(PDO::FETCH_ASSOC)) {
$Bloc['player'] = $infos['player'];
$Bloc['text'] = $infos['text'];
$parse['adm_mt_table'] .= parsetemplate( $RowsTPL, $Bloc );
$i++;
}
$parse['adm_mt_count'] = $i;
$page = parsetemplate( $PageTPL, $parse );
display( $page, $lang['adm_mt_title'], false, '', true);
} else {
message( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}
?>

115
src/admin/overview.php Normal file
View file

@ -0,0 +1,115 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR, LEVEL_MODERATOR))) {
includeLang('admin');
if ($_GET['cmd'] == 'sort') {
$TypeSort = $_GET['type'];
} else {
$TypeSort = "id";
}
$PageTPL = gettemplate('admin/overview_body');
$RowsTPL = gettemplate('admin/overview_rows');
$parse = $lang;
$parse['dpath'] = $dpath;
$parse['mf'] = $mf;
$parse['adm_ov_data_yourv'] = colorRed(VERSION);
$Last15Mins = doquery("SELECT * FROM {{table}} WHERE `onlinetime` >= '". (time() - 15 * 60) ."' ORDER BY `". $TypeSort ."` ASC;", 'users');
$Count = 0;
$Color = "lime";
while ($TheUser = $Last15Mins->fetch(PDO::FETCH_ASSOC) ) {
if ($PrevIP != "") {
if ($PrevIP == $TheUser['user_lastip']) {
$Color = "red";
} else {
$Color = "lime";
}
}
$UserPoints = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '" . $TheUser['id'] . "';", 'statpoints', true);
$Bloc['dpath'] = $dpath;
$Bloc['adm_ov_altpm'] = $lang['adm_ov_altpm'];
$Bloc['adm_ov_wrtpm'] = $lang['adm_ov_wrtpm'];
$Bloc['adm_ov_data_id'] = $TheUser['id'];
$Bloc['adm_ov_data_name'] = $TheUser['username'];
$Bloc['adm_ov_data_agen'] = $TheUser['user_agent'];
$Bloc['current_page'] = $TheUser['current_page'];
$Bloc['usr_s_id'] = $TheUser['id'];
$Bloc['adm_ov_data_clip'] = $Color;
$Bloc['adm_ov_data_adip'] = $TheUser['user_lastip'];
$Bloc['adm_ov_data_ally'] = $TheUser['ally_name'];
$Bloc['adm_ov_data_point'] = pretty_number ( $UserPoints['total_points'] );
$Bloc['adm_ov_data_activ'] = pretty_time ( time() - $TheUser['onlinetime'] );
$Bloc['adm_ov_data_pict'] = "m.gif";
$PrevIP = $TheUser['user_lastip'];
//Tweaks vue g<>n<EFBFBD>rale
$Bloc['usr_email'] = $TheUser['email'];
$Bloc['usr_xp_raid'] = $TheUser['xpraid'];
$Bloc['usr_xp_min'] = $TheUser['xpminier'];
if ($TheUser['urlaubs_modus'] == 1) {
$Bloc['state_vacancy'] = "<img src=\"../images/true.png\" >";
} else {
$Bloc['state_vacancy'] = "<img src=\"../images/false.png\">";
}
if ($TheUser['bana'] == 1) {
$Bloc['is_banned'] = "<img src=\"../images/banned.png\" >";
} else {
$Bloc['is_banned'] = $lang['is_banned_lang'];
}
$Bloc['usr_planet_gal'] = $TheUser['galaxy'];
$Bloc['usr_planet_sys'] = $TheUser['system'];
$Bloc['usr_planet_pos'] = $TheUser['planet'];
$parse['adm_ov_data_table'] .= parsetemplate( $RowsTPL, $Bloc );
$Count++;
}
$parse['adm_ov_data_count'] = $Count;
$Page = parsetemplate($PageTPL, $parse);
display( $Page, $lang['sys_overview'], false, '', true);
} else {
AdminMessage ( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}

236
src/admin/paneladmina.php Normal file
View file

@ -0,0 +1,236 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR, LEVEL_MODERATOR))) {
includeLang('admin/adminpanel');
$PanelMainTPL = gettemplate('admin/admin_panel_main');
$parse = $lang;
$parse['adm_sub_form1'] = "";
$parse['adm_sub_form2'] = "";
$parse['adm_sub_form3'] = "";
// Afficher les templates
if (isset($_GET['result'])) {
switch ($_GET['result']){
case 'usr_search':
$db = Legacies_Database::getSingleton();
$sql =<<<SQL_EOF
SELECT
planet.id AS planet_id,
planet.name AS planet_name,
planet.galaxy AS planet_galaxy,
planet.system AS planet_system,
planet.planet AS planet_position,
user.id AS user_id,
user.username AS username,
user.user_lastip AS user_lastip,
user.email AS email,
user.authlevel AS authlevel,
user.sex AS sex
FROM {{table}}planets AS planet
INNER JOIN {{table}}users AS user ON user.id_planet=planet.id
WHERE user.id = {$db->quote('%' . str_replace('*', '%', str_replace('%', '%%', $_GET['player'])) . '%')}"
SQL_EOF;
$statement = $db->prepare($sql);
$statement->execute();
$data = $statement->fetch(PDO::FETCH_ASSOC);
$bloc = $lang;
$bloc['answer1'] = $data['user_id'];
$bloc['answer2'] = $data['username'];
$bloc['answer3'] = $data['user_lastip'];
$bloc['answer4'] = $data['email'];
$bloc['answer5'] = $lang['adm_usr_level'][$data['authlevel']];
$bloc['answer6'] = $lang['adm_usr_genre'][$data['sex']];
$bloc['answer7'] = "[".$data['planet_id']."] {$data['planet_name']}";
$bloc['answer8'] = "[".$SelUser['planet_galaxy'].":".$SelUser['planet_system'].":".$SelUser['planet_position']."] ";
$SubPanelTPL = gettemplate('admin/admin_panel_asw1');
$parse['adm_sub_form2'] = parsetemplate($SubPanelTPL, $bloc);
break;
case 'usr_data':
$db = Legacies_Database::getSingleton();
$sql =<<<SQL_EOF
SELECT
planet.id AS planet_id,
planet.name AS planet_name,
planet.galaxy AS planet_galaxy,
planet.system AS planet_system,
planet.planet AS planet_position,
user.id AS user_id,
user.username AS username,
user.user_lastip AS user_lastip,
user.email AS email,
user.authlevel AS authlevel,
user.sex AS sex
FROM {{table}}planets AS planet
INNER JOIN {{table}}users AS user ON user.id_planet=planet.id
WHERE user.id = {$db->quote('%' . str_replace('*', '%', str_replace('%', '%%', $_GET['player'])) . '%')}"
SQL_EOF;
$statement = $db->prepare($sql);
$statement->execute();
$data = $statement->fetch(PDO::FETCH_ASSOC);
$pattern = mysql_real_escape_string($_GET['player']);
$SelUser = doquery("SELECT * FROM {{table}} WHERE `username` LIKE '%". $pattern ."%' LIMIT 1;", 'users', true);
$UsrMain = doquery("SELECT `name` FROM {{table}} WHERE `id` = '". $SelUser['id_planet'] ."';", 'planets', true);
$bloc = $lang;
$bloc['answer1'] = $data['user_id'];
$bloc['answer2'] = $data['username'];
$bloc['answer3'] = $data['user_lastip'];
$bloc['answer4'] = $data['email'];
$bloc['answer5'] = $lang['adm_usr_level'][$data['authlevel']];
$bloc['answer6'] = $lang['adm_usr_genre'][$data['sex']];
$bloc['answer7'] = "[".$data['planet_id']."] {$data['planet_name']}";
$bloc['answer8'] = "[".$SelUser['planet_galaxy'].":".$SelUser['planet_system'].":".$SelUser['planet_position']."] ";
$SubPanelTPL = gettemplate('admin/admin_panel_asw1');
$parse['adm_sub_form1'] = parsetemplate( $SubPanelTPL, $bloc );
$parse['adm_sub_form2'] = "<table><tbody>";
$parse['adm_sub_form2'] .= "<tr><td colspan=\"4\" class=\"c\">".$lang['adm_colony']."</td></tr>";
$UsrColo = doquery("SELECT * FROM {{table}} WHERE `id_owner` = '". $SelUser['id'] ." ORDER BY `galaxy` ASC, `planet` ASC, `system` ASC, `planet_type` ASC';", 'planets');
while ( $Colo = mysql_fetch_assoc($UsrColo) ) {
if ($Colo['id'] != $SelUser['id_planet']) {
$parse['adm_sub_form2'] .= "<tr><th>".$Colo['id']."</th>";
$parse['adm_sub_form2'] .= "<th>". (($Colo['planet_type'] == 1) ? $lang['adm_planet'] : $lang['adm_moon'] ) ."</th>";
$parse['adm_sub_form2'] .= "<th>[".$Colo['galaxy'].":".$Colo['system'].":".$Colo['planet']."]</th>";
$parse['adm_sub_form2'] .= "<th>".$Colo['name']."</th></tr>";
}
}
$parse['adm_sub_form2'] .= "</tbody></table>";
$parse['adm_sub_form3'] = "<table><tbody>";
$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':
if (!isset($_GET['s']) || !isset($_SESSION['CSRF']) || $_GET['s'] !== $_SESSION['CSRF']) {
AdminMessage(
'One have tried to overcome administration privilleges.',
'Hacking attempt');
break;
}
$player = isset($_GET['player']) ? mysql_real_escape_string($_GET['player']) : '';
$level = isset($_GET['authlvl']) ? mysql_real_escape_string($_GET['authlvl']) : '';
if ($level >= $user['authlevel'] && $user['authlevel'] != LEVEL_ADMIN) {
AdminMessage('Not enough privilleges to promote user.', $lang['adm_mod_level']);
break;
}
$userData = doquery("SELECT id FROM {{table}} WHERE `username` = '".$player."';", 'users', true);
if (empty($user)) {
AdminMessage('No such user.', $lang['adm_mod_level']);
break;
}
doquery("UPDATE {{table}} SET `authlevel` = '{$level}' WHERE id={$userData['id']}", 'users');
$message = $lang['adm_mess_lvl1']. " ". $player ." ".$lang['adm_mess_lvl2'];
$message .= "<font color=\"red\">".$lang['adm_usr_level'][$level]."</font>!";
AdminMessage($message, $lang['adm_mod_level']);
break;
case 'ip_search':
$pattern = isset($_GET['ip']) ? mysql_real_escape_string($_GET['ip']) : '';
$SelUser = doquery("SELECT * FROM {{table}} WHERE `user_lastip` = '". $pattern ."' 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;
}
}
// Traiter les reponses aux formulaires
if (isset($_GET['action'])) {
$bloc = $lang;
$_SESSION['CSRF'] = sha1(uniqid(null, true));
$bloc['csrf_hack'] = $_SESSION['CSRF'];
switch ($_GET['action']){
case 'usr_search':
$SubPanelTPL = gettemplate('admin/admin_panel_frm1');
break;
case 'usr_data':
$SubPanelTPL = gettemplate('admin/admin_panel_frm4');
break;
case 'usr_level':
for ($Lvl = 0; $Lvl < 4; $Lvl++) {
$bloc['adm_level_lst'] .= "<option value=\"". $Lvl ."\">". $lang['adm_usr_level'][ $Lvl ] ."</option>";
}
$SubPanelTPL = gettemplate('admin/admin_panel_frm3');
break;
case 'ip_search':
$SubPanelTPL = gettemplate('admin/admin_panel_frm2');
break;
default:
break;
}
$parse['adm_sub_form2'] = parsetemplate( $SubPanelTPL, $bloc );
}
$page = parsetemplate( $PanelMainTPL, $parse );
display( $page, $lang['panel_mainttl'], false, '', true );
} else {
message( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}

63
src/admin/planetlist.php Normal file
View file

@ -0,0 +1,63 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR))) {
$parse = $lang;
$query = doquery("SELECT * FROM {{table}} WHERE planet_type='1'", "planets");
$i = 0;
while ($u = $query->fetch(PDO::FETCH_BOTH)) {
$parse['planetes'] .= "<tr>"
. "<td class=b><center><b>" . $u[0] . "</center></b></td>"
. "<td class=b><center><b>" . $u[1] . "</center></b></td>"
. "<td class=b><center><b>" . $u[4] . "</center></b></td>"
. "<td class=b><center><b>" . $u[5] . "</center></b></td>"
. "<td class=b><center><b>" . $u[6] . "</center></b></td>"
. "</tr>";
$i++;
}
if ($i == "1")
$parse['planetes'] .= "<tr><th class=b colspan=5>Il y a qu'une seule plan&egrave;te</th></tr>";
else
$parse['planetes'] .= "<tr><th class=b colspan=5>Il y a {$i} plan&egrave;tes</th></tr>";
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) Wootook Team 2008
?>

242
src/admin/settings.php Normal file
View file

@ -0,0 +1,242 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
function DisplayGameSettingsPage($CurrentUser) {
global $lang;
includeLang('admin/settings');
if (in_array((int) $CurrentUser['authlevel'], array(LEVEL_ADMIN))) {
if (isset($_POST['opt_save']) && $_POST['opt_save'] == "1") {
// Jeu Ouvert ou Ferm<72> !
if (isset($_POST['closed']) && $_POST['closed'] == 'on') {
Wootook::setConfig('game/general/active', true, 1, 1);
} else {
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') {
Wootook::setConfig('game/news/active', true, 1, 1);
} else {
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') {
Wootook::setConfig('engine/options/chat', true, 1, 1);
} else {
Wootook::setConfig('engine/options/chat', false, 1, 1);
}
if (isset($_POST['ga']) && $_POST['ga'] == 'on') {
Wootook::setConfig('engine/options/ga', true, 1, 1);
} else {
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') {
Wootook::setConfig('engine/options/banner', true, 1, 1);
} else {
Wootook::setConfig('engine/options/banner', false, 1, 1);
}
// Nom du Jeu
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']) && !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'])) {
Wootook::setConfig('game/speed/general', $_POST['game_speed'], 1, 1);
}
// Vitesse des Flottes
if (isset($_POST['fleet_speed']) && is_numeric($_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'])) {
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'])) {
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'])) {
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'])) {
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'])) {
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'])) {
Wootook::setConfig('resource/initial/energy', $_POST['energy_basic_income'], 1, 1);
}
// Lien supplémentaire dans le menu
if (isset($_POST['url_link_']) && is_numeric($_POST['url_link_'])) {
Wootook::setConfig('game/general/boards-url', $_POST['url_link_'], 1, 1);
}
// Image de la bannière
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'])) {
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_'])) {
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_'])) {
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_'])) {
Wootook::setConfig('engine/options/notes', $_POST['enable_notes_'], 1, 1);
}
// 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- des notes
if (isset($_POST['duration_ban']) && is_numeric($_POST['duration_ban'])) {
Wootook::setConfig('engine/ban/duration', $_POST['duration_ban'], 1, 1);
}
// 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);
}
// 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', '?');
} else {
$parse = $lang;
$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'] = 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['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['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);
display($Page, $lang['adm_opt_title'], false, '', true);
}
} else {
AdminMessage($lang['sys_noalloaw'], $lang['sys_noaccess']);
}
return $Page;
}
$Page = DisplayGameSettingsPage($user);

272
src/admin/statbuilder.php Normal file
View file

@ -0,0 +1,272 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
include(ROOT_PATH . 'admin/statfunctions.' . PHPEXT);
if (strtolower(substr(PHP_SAPI, 0, 3)) == 'cli' || in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR, LEVEL_MODERATOR))) {
includeLang('admin');
$StatDate = time();
// Rotation des statistiques
doquery ( "DELETE FROM {{table}} WHERE `stat_code` >= '10';" , 'statpoints');
doquery ( "UPDATE {{table}} SET `stat_code` = `stat_code` + '1';" , 'statpoints');
$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);
if ($OldStatRecord) {
$OldTotalRank = $OldStatRecord['total_rank'];
$OldTechRank = $OldStatRecord['tech_rank'];
$OldBuildRank = $OldStatRecord['build_rank'];
$OldDefsRank = $OldStatRecord['defs_rank'];
$OldFleetRank = $OldStatRecord['fleet_rank'];
// Suppression de l'ancien enregistrement
doquery ("DELETE FROM {{table}} WHERE `stat_type` = '1' AND `id_owner` = '".$CurUser['id']."';",'statpoints');
} else {
$OldTotalRank = 0;
$OldTechRank = 0;
$OldBuildRank = 0;
$OldDefsRank = 0;
$OldFleetRank = 0;
}
// Total des unitées consommée pour la recherche
$Points = GetTechnoPoints ( $CurUser );
$TTechCount = $Points['TechCount'];
$TTechPoints = ($Points['TechPoint'] / $resourceMultiplier);
// Totalisation des points accumulés par planete
$TBuildCount = 0;
$TBuildPoints = 0;
$TDefsCount = 0;
$TDefsPoints = 0;
$TFleetCount = 0;
$TFleetPoints = 0;
$GCount = $TTechCount;
$GPoints = $TTechPoints;
$UsrPlanets = doquery("SELECT * FROM {{table}} WHERE `id_owner` = '". $CurUser['id'] ."';", 'planets');
while ($CurPlanet = $UsrPlanets->fetch(PDO::FETCH_ASSOC)) {
$Points = GetBuildPoints ( $CurPlanet );
$TBuildCount += $Points['BuildCount'];
$GCount += $Points['BuildCount'];
$PlanetPoints = ($Points['BuildPoint'] / $resourceMultiplier);
$TBuildPoints += ($Points['BuildPoint'] / $resourceMultiplier);
$Points = GetDefensePoints ( $CurPlanet );
$TDefsCount += $Points['DefenseCount'];;
$GCount += $Points['DefenseCount'];
$PlanetPoints += ($Points['DefensePoint'] / $resourceMultiplier);
$TDefsPoints += ($Points['DefensePoint'] / $resourceMultiplier);
$Points = GetFleetPoints ( $CurPlanet );
$TFleetCount += $Points['FleetCount'];
$GCount += $Points['FleetCount'];
$PlanetPoints += ($Points['FleetPoint'] / $resourceMultiplier);
$TFleetPoints += ($Points['FleetPoint'] / $resourceMultiplier);
$GPoints += $PlanetPoints;
$QryUpdatePlanet = "UPDATE {{table}} SET ";
$QryUpdatePlanet .= "`points` = '". $PlanetPoints ."' ";
$QryUpdatePlanet .= "WHERE ";
$QryUpdatePlanet .= "`id` = '". $CurPlanet['id'] ."';";
doquery ( $QryUpdatePlanet , 'planets');
}
$QryInsertStats = "INSERT INTO {{table}} SET ";
$QryInsertStats .= "`id_owner` = '". $CurUser['id'] ."', ";
$QryInsertStats .= "`id_ally` = '". $CurUser['ally_id'] ."', ";
$QryInsertStats .= "`stat_type` = '1', "; // 1 pour joueur , 2 pour alliance
$QryInsertStats .= "`stat_code` = '1', "; // de 1 a 2 mis a jour de maniere automatique
$QryInsertStats .= "`tech_points` = '". $TTechPoints ."', ";
$QryInsertStats .= "`tech_count` = '". $TTechCount ."', ";
$QryInsertStats .= "`tech_old_rank` = '". $OldTechRank ."', ";
$QryInsertStats .= "`build_points` = '". $TBuildPoints ."', ";
$QryInsertStats .= "`build_count` = '". $TBuildCount ."', ";
$QryInsertStats .= "`build_old_rank` = '". $OldBuildRank ."', ";
$QryInsertStats .= "`defs_points` = '". $TDefsPoints ."', ";
$QryInsertStats .= "`defs_count` = '". $TDefsCount ."', ";
$QryInsertStats .= "`defs_old_rank` = '". $OldDefsRank ."', ";
$QryInsertStats .= "`fleet_points` = '". $TFleetPoints ."', ";
$QryInsertStats .= "`fleet_count` = '". $TFleetCount ."', ";
$QryInsertStats .= "`fleet_old_rank` = '". $OldFleetRank ."', ";
$QryInsertStats .= "`total_points` = '". $GPoints ."', ";
$QryInsertStats .= "`total_count` = '". $GCount ."', ";
$QryInsertStats .= "`total_old_rank` = '". $OldTotalRank ."', ";
$QryInsertStats .= "`stat_date` = '". $StatDate ."';";
doquery ( $QryInsertStats , 'statpoints');
}
$Rank = 1;
$RankQry = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' ORDER BY `tech_points` DESC;", 'statpoints');
while ($TheRank = $RankQry->fetch(PDO::FETCH_ASSOC)) {
$QryUpdateStats = "UPDATE {{table}} SET ";
$QryUpdateStats .= "`tech_rank` = '". $Rank ."' ";
$QryUpdateStats .= "WHERE ";
$QryUpdateStats .= " `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '". $TheRank['id_owner'] ."';";
doquery ( $QryUpdateStats , 'statpoints');
$Rank++;
}
$Rank = 1;
$RankQry = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' ORDER BY `build_points` DESC;", 'statpoints');
while ($TheRank = $RankQry->fetch(PDO::FETCH_ASSOC) ) {
$QryUpdateStats = "UPDATE {{table}} SET ";
$QryUpdateStats .= "`build_rank` = '". $Rank ."' ";
$QryUpdateStats .= "WHERE ";
$QryUpdateStats .= " `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '". $TheRank['id_owner'] ."';";
doquery ( $QryUpdateStats , 'statpoints');
$Rank++;
}
$Rank = 1;
$RankQry = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' ORDER BY `defs_points` DESC;", 'statpoints');
while ($TheRank = $RankQry->fetch(PDO::FETCH_ASSOC)) {
$QryUpdateStats = "UPDATE {{table}} SET ";
$QryUpdateStats .= "`defs_rank` = '". $Rank ."' ";
$QryUpdateStats .= "WHERE ";
$QryUpdateStats .= " `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '". $TheRank['id_owner'] ."';";
doquery ( $QryUpdateStats , 'statpoints');
$Rank++;
}
$Rank = 1;
$RankQry = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' ORDER BY `fleet_points` DESC;", 'statpoints');
while ($TheRank = $RankQry->fetch(PDO::FETCH_ASSOC)) {
$QryUpdateStats = "UPDATE {{table}} SET ";
$QryUpdateStats .= "`fleet_rank` = '". $Rank ."' ";
$QryUpdateStats .= "WHERE ";
$QryUpdateStats .= " `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '". $TheRank['id_owner'] ."';";
doquery ( $QryUpdateStats , 'statpoints');
$Rank++;
}
$Rank = 1;
$RankQry = doquery("SELECT * FROM {{table}} WHERE `stat_type` = '1' AND `stat_code` = '1' ORDER BY `total_points` DESC;", 'statpoints');
while ($TheRank = $RankQry->fetch(PDO::FETCH_ASSOC)) {
$QryUpdateStats = "UPDATE {{table}} SET ";
$QryUpdateStats .= "`total_rank` = '". $Rank ."' ";
$QryUpdateStats .= "WHERE ";
$QryUpdateStats .= " `stat_type` = '1' AND `stat_code` = '1' AND `id_owner` = '". $TheRank['id_owner'] ."';";
doquery ( $QryUpdateStats , 'statpoints');
$Rank++;
}
// Statistiques des alliances ...
$GameAllys = doquery("SELECT * FROM {{table}}", 'alliance');
while ($CurAlly = $GameAllys->fetch(PDO::FETCH_ASSOC)) {
// Recuperation des anciennes statistiques
$OldStatRecord = doquery ("SELECT * FROM {{table}} WHERE `stat_type` = '2' AND `id_owner` = '".$CurAlly['id']."';",'statpoints', true);
if ($OldStatRecord) {
$OldTotalRank = $OldStatRecord['total_rank'];
$OldTechRank = $OldStatRecord['tech_rank'];
$OldBuildRank = $OldStatRecord['build_rank'];
$OldDefsRank = $OldStatRecord['defs_rank'];
$OldFleetRank = $OldStatRecord['fleet_rank'];
// Suppression de l'ancien enregistrement
doquery ("DELETE FROM {{table}} WHERE `stat_type` = '2' AND `id_owner` = '".$CurAlly['id']."';",'statpoints');
} else {
$OldTotalRank = 0;
$OldTechRank = 0;
$OldBuildRank = 0;
$OldDefsRank = 0;
$OldFleetRank = 0;
}
// Total des unitées consommée pour la recherche
$QrySumSelect = "SELECT ";
$QrySumSelect .= "SUM(`tech_points`) as `TechPoint`, ";
$QrySumSelect .= "SUM(`tech_count`) as `TechCount`, ";
$QrySumSelect .= "SUM(`build_points`) as `BuildPoint`, ";
$QrySumSelect .= "SUM(`build_count`) as `BuildCount`, ";
$QrySumSelect .= "SUM(`defs_points`) as `DefsPoint`, ";
$QrySumSelect .= "SUM(`defs_count`) as `DefsCount`, ";
$QrySumSelect .= "SUM(`fleet_points`) as `FleetPoint`, ";
$QrySumSelect .= "SUM(`fleet_count`) as `FleetCount`, ";
$QrySumSelect .= "SUM(`total_points`) as `TotalPoint`, ";
$QrySumSelect .= "SUM(`total_count`) as `TotalCount` ";
$QrySumSelect .= "FROM {{table}} ";
$QrySumSelect .= "WHERE ";
$QrySumSelect .= "`stat_type` = '1' AND ";
$QrySumSelect .= "`id_ally` = '". $CurAlly['id'] ."';";
$Points = doquery( $QrySumSelect, 'statpoints', true);
$TTechCount = $Points['TechCount'];
$TTechPoints = $Points['TechPoint'];
$TBuildCount = $Points['BuildCount'];
$TBuildPoints = $Points['BuildPoint'];
$TDefsCount = $Points['DefsCount'];
$TDefsPoints = $Points['DefsPoint'];
$TFleetCount = $Points['FleetCount'];
$TFleetPoints = $Points['FleetPoint'];
$GCount = $Points['TotalCount'];
$GPoints = $Points['TotalPoint'];
$QryInsertStats = "INSERT INTO {{table}} SET ";
$QryInsertStats .= "`id_owner` = '". $CurAlly['id'] ."', ";
$QryInsertStats .= "`id_ally` = '0', ";
$QryInsertStats .= "`stat_type` = '2', "; // 1 pour joueur , 2 pour alliance
$QryInsertStats .= "`stat_code` = '1', "; // de 1 a 5 mis a jour de maniere automatique
$QryInsertStats .= "`tech_points` = '". $TTechPoints ."', ";
$QryInsertStats .= "`tech_count` = '". $TTechCount ."', ";
$QryInsertStats .= "`tech_old_rank` = '". $OldTechRank ."', ";
$QryInsertStats .= "`build_points` = '". $TBuildPoints ."', ";
$QryInsertStats .= "`build_count` = '". $TBuildCount ."', ";
$QryInsertStats .= "`build_old_rank` = '". $OldBuildRank ."', ";
$QryInsertStats .= "`defs_points` = '". $TDefsPoints ."', ";
$QryInsertStats .= "`defs_count` = '". $TDefsCount ."', ";
$QryInsertStats .= "`defs_old_rank` = '". $OldDefsRank ."', ";
$QryInsertStats .= "`fleet_points` = '". $TFleetPoints ."', ";
$QryInsertStats .= "`fleet_count` = '". $TFleetCount ."', ";
$QryInsertStats .= "`fleet_old_rank` = '". $OldFleetRank ."', ";
$QryInsertStats .= "`total_points` = '". $GPoints ."', ";
$QryInsertStats .= "`total_count` = '". $GCount ."', ";
$QryInsertStats .= "`total_old_rank` = '". $OldTotalRank ."', ";
$QryInsertStats .= "`stat_date` = '". $StatDate ."';";
doquery ( $QryInsertStats , 'statpoints');
}
AdminMessage ( $lang['adm_done'], $lang['adm_stat_title'] );
} else {
AdminMessage ( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}

107
src/admin/statfunctions.php Normal file
View file

@ -0,0 +1,107 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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.
*
*/
function GetTechnoPoints ( $CurrentUser ) {
global $resource, $pricelist, $reslist;
$TechCounts = 0;
$TechPoints = 0;
foreach ( $reslist['tech'] as $n => $Techno ) {
if ( $CurrentUser[ $resource[ $Techno ] ] > 0 ) {
for ( $Level = 1; $Level < $CurrentUser[ $resource[ $Techno ] ]; $Level++ ) {
$Units = $pricelist[ $Techno ]['metal'] + $pricelist[ $Techno ]['cristal'] + $pricelist[ $Techno ]['deuterium'];
$LevelMul = pow( $pricelist[ $Techno ]['factor'], $Level );
$TechPoints += ($Units * $LevelMul);
$TechCounts += 1;
}
}
}
$RetValue['TechCount'] = $TechCounts;
$RetValue['TechPoint'] = $TechPoints;
return $RetValue;
}
function GetBuildPoints ( $CurrentPlanet ) {
global $resource, $pricelist, $reslist;
$BuildCounts = 0;
$BuildPoints = 0;
foreach($reslist['build'] as $n => $Building) {
if ( $CurrentPlanet[ $resource[ $Building ] ] > 0 ) {
for ( $Level = 1; $Level < $CurrentPlanet[ $resource[ $Building ] ]; $Level++ ) {
$Units = $pricelist[ $Building ]['metal'] + $pricelist[ $Building ]['cristal'] + $pricelist[ $Building ]['deuterium'];
$LevelMul = pow( $pricelist[ $Building ]['factor'], $Level );
$BuildPoints += ($Units * $LevelMul);
$BuildCounts += 1;
}
}
}
$RetValue['BuildCount'] = $BuildCounts;
$RetValue['BuildPoint'] = $BuildPoints;
return $RetValue;
}
function GetDefensePoints ( $CurrentPlanet ) {
global $resource, $pricelist, $reslist;
$DefenseCounts = 0;
$DefensePoints = 0;
foreach($reslist['defense'] as $n => $Defense) {
if ($CurrentPlanet[ $resource[ $Defense ] ] > 0) {
$Units = $pricelist[ $Defense ]['metal'] + $pricelist[ $Defense ]['cristal'] + $pricelist[ $Defense ]['deuterium'];
$DefensePoints += ($Units * $CurrentPlanet[ $resource[ $Defense ] ]);
$DefenseCounts += $CurrentPlanet[ $resource[ $Defense ] ];
}
}
$RetValue['DefenseCount'] = $DefenseCounts;
$RetValue['DefensePoint'] = $DefensePoints;
return $RetValue;
}
function GetFleetPoints ( $CurrentPlanet ) {
global $resource, $pricelist, $reslist;
$FleetCounts = 0;
$FleetPoints = 0;
foreach($reslist['fleet'] as $n => $Fleet) {
if ($CurrentPlanet[ $resource[ $Fleet ] ] > 0) {
$Units = $pricelist[ $Fleet ]['metal'] + $pricelist[ $Fleet ]['cristal'] + $pricelist[ $Fleet ]['deuterium'];
$FleetPoints += ($Units * $CurrentPlanet[ $resource[ $Fleet ] ]);
$FleetCounts += $CurrentPlanet[ $resource[ $Fleet ] ];
}
}
$RetValue['FleetCount'] = $FleetCounts;
$RetValue['FleetPoint'] = $FleetPoints;
return $RetValue;
}

57
src/admin/unbanned.php Normal file
View file

@ -0,0 +1,57 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR))) {
$parse['dpath'] = $dpath;
$parse = $lang;
$mode = $_GET['mode'];
if ($mode != 'change') {
$parse['Name'] = "Nom du joueur";
} elseif ($mode == 'change') {
$nam = $_POST['nam'];
doquery("DELETE FROM {{table}} WHERE who2='{$nam}'", 'banned');
doquery("UPDATE {{table}} SET bana=0, banaday=0 WHERE username='{$nam}'", "users");
message("Le joueur {$nam} a bien &eacute;t&eacute; d&eacute;banni!", 'Information');
}
display(parsetemplate(gettemplate('admin/unbanned'), $parse), "Overview", false, '', true);
} else {
message( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}
?>

89
src/admin/userlist.php Normal file
View file

@ -0,0 +1,89 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR))) {
includeLang('admin');
if ($_GET['cmd'] == 'dele') {
DeleteSelectedUser ( $_GET['user'] );
}
if ($_GET['cmd'] == 'sort') {
$TypeSort = $_GET['type'];
} else {
$TypeSort = "id";
}
$PageTPL = gettemplate('admin/userlist_body');
$RowsTPL = gettemplate('admin/userlist_rows');
$query = doquery("SELECT * FROM {{table}} ORDER BY `". $TypeSort ."` ASC", 'users');
$parse = $lang;
$parse['adm_ul_table'] = "";
$i = 0;
$Color = "lime";
while ($u = mysql_fetch_assoc ($query) ) {
if ($PrevIP != "") {
if ($PrevIP == $u['user_lastip']) {
$Color = "red";
} else {
$Color = "lime";
}
}
$Bloc['adm_ul_data_id'] = $u['id'];
$Bloc['adm_ul_data_name'] = $u['username'];
$Bloc['adm_ul_data_mail'] = $u['email'];
$Bloc['ip_adress_at_register'] = $u['ip_at_reg'];
$Bloc['adm_ul_data_adip'] = "<font color=\"".$Color."\">". $u['user_lastip'] ."</font>";
$Bloc['adm_ul_data_regd'] = gmdate ( "d/m/Y G:i:s", $u['register_time'] );
$Bloc['adm_ul_data_lconn'] = gmdate ( "d/m/Y G:i:s", $u['onlinetime'] );
$Bloc['adm_ul_data_banna'] = ( $u['bana'] == 1 ) ? "<a href # title=\"". gmdate ( "d/m/Y G:i:s", $u['banaday']) ."\">". $lang['adm_ul_yes'] ."</a>" : $lang['adm_ul_no'];
$Bloc['adm_ul_data_detai'] = ""; // Lien vers une page de details genre Empire
$Bloc['adm_ul_data_actio'] = "<a href=\"userlist.php?cmd=dele&user=".$u['id']."\"><img src=\"../images/r1.png\"></a>"; // Lien vers actions 'effacer'
$PrevIP = $u['user_lastip'];
$parse['adm_ul_table'] .= parsetemplate( $RowsTPL, $Bloc );
$i++;
}
$parse['adm_ul_count'] = $i;
$page = parsetemplate( $PageTPL, $parse );
display( $page, $lang['adm_ul_title'], false, '', true);
} else {
message( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}
?>

47
src/admin/variables.php Normal file
View file

@ -0,0 +1,47 @@
<?php
/**
* This file is part of Wootook
*
* @license http://www.gnu.org/licenses/gpl-3.0.txt
* @see http://wootook.org/
*
* 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);
require_once dirname(dirname(__FILE__)) .'/application/bootstrap.php';
if (in_array($user['authlevel'], array(LEVEL_ADMIN, LEVEL_OPERATOR, LEVEL_MODERATOR))) {
$parse['phpinfo'] = phpinfo();
$Page = parsetemplate($PageTPL, $parse);
display ( $Page, "PhpInfo", false, '', true);
} else {
AdminMessage ( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}
?>