Fixed login
Started building page cleanup Modified code pools Backported layout/blocks/templates 3-step view system Reforged Overview page Moved graphics, added topnav template, fixed number render bug Added BCMath optionnal usage Updated BC Math comparison for capped resources Fixed planet resource production updates Various additions Signed-off-by: Gregory PLANCHAT <g.planchat@gmail.com>
This commit is contained in:
parent
3fd8832b45
commit
f2d4b0f7e2
384 changed files with 2727 additions and 1364 deletions
|
|
@ -1,123 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* This file is part of XNova:Legacies
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.txt
|
||||
* @see http://www.xnova-ng.org/
|
||||
*
|
||||
* Copyright (c) 2009-Present, XNova 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 XNova.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @deprecated
|
||||
* @param unknown_type $user
|
||||
* @param unknown_type $planetrow
|
||||
*/
|
||||
function AbandonColony($user,$planetrow) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
$destruyed = time() + 3600; //Temps avant la suppression dans la galaxie
|
||||
$DeleteMoon = false;
|
||||
if ($planetrow["planet_type"]==1){
|
||||
//Selectionne si il y a une lune sur la colonie a supprim<69>e
|
||||
$QryWithMoon = "SELECT * FROM {{table}} ";
|
||||
$QryWithMoon .= "WHERE ";
|
||||
$QryWithMoon .= "`destruyed` = '0' AND ";
|
||||
$QryWithMoon .= "`galaxy` = '". $planetrow['galaxy'] ."' AND ";
|
||||
$QryWithMoon .= "`system` = '". $planetrow['system'] ."' AND ";
|
||||
$QryWithMoon .= "`lunapos` = '". $planetrow['planet'] ."' AND ";
|
||||
$QryWithMoon .= "`id_owner` = '". $user['id'] ."' ;";
|
||||
$IsMoon = doquery( $QryWithMoon , 'lunas',true);
|
||||
if($IsMoon){
|
||||
//Envoi la demande de suppression de la lune associ<63> a la colonie
|
||||
$DeleteMoon = true; // borrar luna
|
||||
}
|
||||
|
||||
//Mise en mode destruction d ela colonie
|
||||
$QryUpdatePlanet = "UPDATE {{table}} SET ";
|
||||
$QryUpdatePlanet .= "`destruyed` = '" . $destruyed . "', ";
|
||||
$QryUpdatePlanet .= "`id_owner` = '0' ";
|
||||
$QryUpdatePlanet .= "WHERE ";
|
||||
$QryUpdatePlanet .= "`id` = '" . $user['current_planet'] . "' LIMIT 1;";
|
||||
doquery($QryUpdatePlanet , 'planets');
|
||||
|
||||
//Si on veut supprimer une lune
|
||||
}elseif($planetrow["planet_type"]==3){
|
||||
$DeleteMoon = true; //borrar luna
|
||||
}
|
||||
|
||||
if ($DeleteMoon){
|
||||
$QryDeleteMoon = "DELETE FROM {{table}} ";
|
||||
$QryDeleteMoon .= "WHERE ";
|
||||
$QryDeleteMoon .= "`galaxy` = '". $planetrow['galaxy'] ."' AND ";
|
||||
$QryDeleteMoon .= "`system` = '". $planetrow['system'] ."' AND ";
|
||||
$QryDeleteMoon .= "`planet` = '". $planetrow['planet'] ."' AND ";
|
||||
$QryDeleteMoon .= "`planet_type` = '3' AND ";
|
||||
$QryDeleteMoon .= "`id_owner` = '". $user['id'] ."' ;";
|
||||
doquery($QryDeleteMoon , 'planets');
|
||||
|
||||
$Qrydestructionlune = "DELETE FROM {{table}} ";
|
||||
$Qrydestructionlune .= "WHERE ";
|
||||
$Qrydestructionlune .= "`galaxy` = '". $planetrow['galaxy'] ."' AND ";
|
||||
$Qrydestructionlune .= "`system` = '". $planetrow['system'] ."' AND ";
|
||||
$Qrydestructionlune .= "`lunapos` = '". $planetrow['planet'] ."' AND ";
|
||||
$Qrydestructionlune .= "`id_owner` = '". $user['id'] ."' ;";
|
||||
doquery( $Qrydestructionlune , 'lunas');
|
||||
|
||||
$Qrydestructionlune2 = "UPDATE {{table}} SET ";
|
||||
$Qrydestructionlune2 .= "`id_luna` = '0' ";
|
||||
$Qrydestructionlune2 .= "WHERE ";
|
||||
$Qrydestructionlune2 .= "`galaxy` = '". $planetrow['galaxy'] ."' AND ";
|
||||
$Qrydestructionlune2 .= "`system` = '". $planetrow['system'] ."' AND ";
|
||||
$Qrydestructionlune2 .= "`planet` = '". $planetrow['planet'] ."' ;";
|
||||
doquery( $Qrydestructionlune2 , 'galaxy');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function CheckFleets($planetrow){
|
||||
|
||||
$QryFleet = "SELECT * FROM {{table}} WHERE ";
|
||||
$QryFleet .= "(`fleet_start_galaxy` = '".$planetrow["galaxy"]."' AND ";
|
||||
$QryFleet .= "`fleet_start_system` = '".$planetrow["system"]."' AND ";
|
||||
$QryFleet .= "`fleet_start_planet` = '".$planetrow["planet"]."'";
|
||||
if ($planetrow["planet_type"]==3){
|
||||
$QryFleet .= " AND `fleet_start_type` = '3'";
|
||||
}
|
||||
$QryFleet .= ") OR ";
|
||||
$QryFleet .= "(`fleet_end_galaxy` = '".$planetrow["galaxy"]."' AND ";
|
||||
$QryFleet .= "`fleet_end_system` = '".$planetrow["system"]."' AND ";
|
||||
$QryFleet .= "`fleet_end_planet` = '".$planetrow["planet"]."'";
|
||||
if ($planetrow["planet_type"]==3){
|
||||
$QryFleet .= " AND `fleet_end_type` = '3'";
|
||||
}
|
||||
$QryFleet .= " AND `fleet_mess` <> 1 ); ";
|
||||
$fleets = doquery($QryFleet, 'fleets',true);
|
||||
if($fleets){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -34,7 +34,6 @@
|
|||
* @param unknown_type $string
|
||||
*/
|
||||
function bbcode($string) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
$pattern = array(
|
||||
'/\\n/',
|
||||
'/\\r/',
|
||||
|
|
@ -78,7 +77,6 @@ function bbcode($string) {
|
|||
|
||||
function image($string)
|
||||
{
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
//On va pas se casser le fion a lire les accents quand meme !!!!!!!
|
||||
$string = str_replace("'", "'", $string);
|
||||
|
||||
|
|
@ -101,14 +99,12 @@ function image($string)
|
|||
|
||||
|
||||
function sCode($string){
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
$pattern = '/\<img src=\\\"(.*?)img\/smilies\/(.*?).png\\\" alt=\\\"(.*?)\\\" \/>/s';
|
||||
$string = preg_replace($pattern, '\3', $string);
|
||||
return '<pre>' . trim($string) . '</pre>';
|
||||
}
|
||||
|
||||
function sList($string) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
$tmp = explode('[*]', stripslashes($string));
|
||||
$out = null;
|
||||
foreach($tmp as $list) {
|
||||
|
|
@ -120,7 +116,6 @@ function sList($string) {
|
|||
}
|
||||
|
||||
function imagefix($img) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
if(substr($img, 0, 7) != 'http://') {
|
||||
$img = './images/' . $img;
|
||||
}
|
||||
|
|
@ -128,7 +123,6 @@ function imagefix($img) {
|
|||
}
|
||||
|
||||
function urlfix($url, $title) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
$title = stripslashes($title);
|
||||
return '<a href="' . $url . '" title="' . $title . '">' . $title . '</a>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,11 +34,9 @@
|
|||
* @param unknown_type $CurrentPlanet
|
||||
* @param unknown_type $CurrentUser
|
||||
*/
|
||||
function BatimentBuildingPage (&$CurrentPlanet, $CurrentUser) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
global $lang, $resource, $reslist, $dpath, $gameConfig, $_GET;
|
||||
|
||||
CheckPlanetUsedFields ( $CurrentPlanet );
|
||||
function BatimentBuildingPage($CurrentPlanet, $CurrentUser)
|
||||
{
|
||||
global $lang, $resource, $reslist, $dpath, $gameConfig;
|
||||
|
||||
// Tables des batiments possibles par type de planete
|
||||
$Allowed['1'] = array( 1, 2, 3, 4, 12, 14, 15, 21, 22, 23, 24, 31, 33, 34, 44);
|
||||
|
|
@ -100,15 +98,8 @@ function BatimentBuildingPage (&$CurrentPlanet, $CurrentUser) {
|
|||
}
|
||||
}
|
||||
|
||||
SetNextQueueElementOnTop ( $CurrentPlanet, $CurrentUser );
|
||||
|
||||
$Queue = ShowBuildingQueue ( $CurrentPlanet, $CurrentUser );
|
||||
|
||||
// On enregistre ce que l'on a modifi<66> dans planet !
|
||||
BuildingSavePlanetRecord ( $CurrentPlanet );
|
||||
// On enregistre ce que l'on a eventuellement modifi<66> dans users
|
||||
BuildingSaveUserRecord ( $CurrentUser );
|
||||
|
||||
if ($Queue['lenght'] < MAX_BUILDING_QUEUE_SIZE) {
|
||||
$CanBuildElement = true;
|
||||
} else {
|
||||
|
|
@ -206,4 +197,3 @@ function BatimentBuildingPage (&$CurrentPlanet, $CurrentUser) {
|
|||
|
||||
display($page, $lang['Builds']);
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@
|
|||
* @param unknown_type $Record
|
||||
*/
|
||||
function BuildFleetEventTable ( $FleetRow, $Status, $Owner, $Label, $Record ) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
global $lang;
|
||||
|
||||
$FleetStyle = array (
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@
|
|||
* @deprecated
|
||||
*/
|
||||
function BuildFlyingFleetTable () {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
global $lang;
|
||||
|
||||
$TableTPL = gettemplate('admin/fleet_rows');
|
||||
|
|
|
|||
|
|
@ -1,115 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* This file is part of XNova:Legacies
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.txt
|
||||
* @see http://www.xnova-ng.org/
|
||||
*
|
||||
* Copyright (c) 2009-Present, XNova 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 XNova.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @deprecated
|
||||
* @param unknown_type $CurrentPlanet
|
||||
* @param unknown_type $CurrentUser
|
||||
*/
|
||||
function CancelBuildingFromQueue ( &$CurrentPlanet, &$CurrentUser ) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
$CurrentQueue = $CurrentPlanet['b_building_id'];
|
||||
if ($CurrentQueue != 0) {
|
||||
// Creation du tableau de la liste de construction
|
||||
$QueueArray = explode ( ";", $CurrentQueue );
|
||||
// Comptage du nombre d'elements dans la liste
|
||||
$ActualCount = count ( $QueueArray );
|
||||
|
||||
// Stockage de l'element a 'interrompre'
|
||||
$CanceledIDArray = explode ( ",", $QueueArray[0] );
|
||||
$Element = $CanceledIDArray[0];
|
||||
$BuildMode = $CanceledIDArray[4]; // pour savoir si on construit ou detruit
|
||||
|
||||
$nb_item = $Element;
|
||||
|
||||
if ($ActualCount > 1) {
|
||||
array_shift( $QueueArray );
|
||||
$NewCount = count( $QueueArray );
|
||||
// Mise a jour de l'heure de fin de construction theorique du batiment
|
||||
$BuildEndTime = time();
|
||||
|
||||
for ($ID = 0; $ID < $NewCount ; $ID++ ) {
|
||||
$ListIDArray = explode ( ",", $QueueArray[$ID] );
|
||||
|
||||
// Pour diminuer le niveau et le temps de construction
|
||||
// si le bâtiment qui est annulé se trouve plusieurs fois dans la queue
|
||||
// Exemple de queue de construction :
|
||||
// Mine de métal (Niveau 40) | Silo de missile (Niveau 30) | Silo de missiles (Niveau 31) | Mine de métal (Niveau 41)
|
||||
|
||||
// Si on supprime le premier bâtiment, on aura dans la queue de construction :
|
||||
// Silo de missile (Niveau 30) | Silo de missiles (Niveau 31) | Mine de métal (Niveau 40)
|
||||
if ( $nb_item == $ListIDArray[0])
|
||||
{
|
||||
$ListIDArray[1] -= 1;
|
||||
$ListIDArray[2] = GetBuildingTimeLevel($CurrentUser, $CurrentPlanet, $ListIDArray[0], $ListIDArray[1]);
|
||||
}
|
||||
$BuildEndTime += $ListIDArray[2];
|
||||
$ListIDArray[3] = $BuildEndTime;
|
||||
$QueueArray[$ID] = implode ( ",", $ListIDArray );
|
||||
}
|
||||
$NewQueue = implode(";", $QueueArray );
|
||||
$ReturnValue = true;
|
||||
$BuildEndTime = '0';
|
||||
} else {
|
||||
$NewQueue = '0';
|
||||
$ReturnValue = false;
|
||||
$BuildEndTime = '0';
|
||||
}
|
||||
|
||||
// Ici on va rembourser les ressources engagées ...
|
||||
// Deja le mode (car quand on detruit ca ne coute que la moitié du prix de construction classique
|
||||
if ($BuildMode == 'destroy') {
|
||||
$ForDestroy = true;
|
||||
} else {
|
||||
$ForDestroy = false;
|
||||
}
|
||||
|
||||
if ( $Element != false ) {
|
||||
$Needed = GetBuildingPrice ($CurrentUser, $CurrentPlanet, $Element, true, $ForDestroy);
|
||||
$CurrentPlanet['metal'] += $Needed['metal'];
|
||||
$CurrentPlanet['crystal'] += $Needed['crystal'];
|
||||
$CurrentPlanet['deuterium'] += $Needed['deuterium'];
|
||||
}
|
||||
|
||||
} else {
|
||||
$NewQueue = '0';
|
||||
$BuildEndTime = '0';
|
||||
$ReturnValue = false;
|
||||
}
|
||||
|
||||
$CurrentPlanet['b_building_id'] = $NewQueue;
|
||||
$CurrentPlanet['b_building'] = $BuildEndTime;
|
||||
|
||||
return $ReturnValue;
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -35,7 +35,5 @@
|
|||
*/
|
||||
function CheckInputStrings($string)
|
||||
{
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
return htmlspecialchars($string, ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
|
|
@ -34,7 +34,6 @@
|
|||
* @param unknown_type $CurrentPlanet
|
||||
*/
|
||||
function CheckLabSettingsInQueue ( $CurrentPlanet ) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
global $lang, $gameConfig;
|
||||
|
||||
if ($CurrentPlanet['b_building_id'] != "0") {
|
||||
|
|
|
|||
|
|
@ -1,63 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* This file is part of XNova:Legacies
|
||||
*
|
||||
* @license http://www.gnu.org/licenses/gpl-3.0.txt
|
||||
* @see http://www.xnova-ng.org/
|
||||
*
|
||||
* Copyright (c) 2009-Present, XNova 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 XNova.
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @deprecated
|
||||
* @param unknown_type $IsUserChecked
|
||||
*/
|
||||
function CheckTheUser($IsUserChecked)
|
||||
{
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
global $user;
|
||||
includeLang('admin');
|
||||
$Result = CheckCookies( $IsUserChecked );
|
||||
$IsUserChecked = $Result['state'];
|
||||
|
||||
|
||||
if ($Result['record'] != false) {
|
||||
$user = $Result['record'];
|
||||
if ($user['bana'] == "1") {
|
||||
die (
|
||||
|
||||
$page .= parsetemplate(gettemplate('usr_banned'), $lang)
|
||||
|
||||
);
|
||||
}
|
||||
$RetValue['record'] = $user;
|
||||
$RetValue['state'] = $IsUserChecked;
|
||||
} else {
|
||||
$RetValue['record'] = array();
|
||||
$RetValue['state'] = false;
|
||||
}
|
||||
|
||||
return $RetValue;
|
||||
}
|
||||
|
||||
|
|
@ -41,7 +41,6 @@
|
|||
*/
|
||||
function CreateOneMoonRecord ( $Galaxy, $System, $Planet, $Owner, $MoonID, $MoonName, $Chance ) {
|
||||
global $lang;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
$PlanetName = "";
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
*/
|
||||
function PlanetSizeRandomiser ($Position, $HomeWorld = false) {
|
||||
global $gameConfig;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
if (!$HomeWorld) {
|
||||
$ClassicBase = 163;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
*/
|
||||
function DefensesBuildingPage ( &$currentPlanet, $currentUser ) {
|
||||
global $lang, $resource, $dpath;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
// S'il n'y a pas de Chantier
|
||||
if (!isset($currentPlanet[$resource[Legacies_Empire::ID_BUILDING_SHIPYARD]]) || $currentPlanet[$resource[Legacies_Empire::ID_BUILDING_SHIPYARD]] == 0) {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
*/
|
||||
function FleetBuildingPage(&$currentPlanet, &$currentUser)
|
||||
{
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
global $lang, $resource, $dpath;
|
||||
|
||||
// S'il n'y a pas de Chantier
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
function FlyingFleetHandler($planet) {
|
||||
global $resource;
|
||||
|
||||
//trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
$sql =<<<SQL_EOF
|
||||
LOCK TABLE
|
||||
{{table}}lunas WRITE,
|
||||
|
|
@ -50,9 +49,7 @@ LOCK TABLE
|
|||
SQL_EOF;
|
||||
//doquery($sql, ''); // FIXME: use transactions
|
||||
|
||||
if (!$planet instanceof Legacies_Empire_Model_Planet) {var_dump($planet);}
|
||||
foreach ($planet->getFleetCollection(Legacies::now()) as $CurrentFleet) {
|
||||
var_dump($CurrentFleet);
|
||||
switch ($CurrentFleet["fleet_mission"]) {
|
||||
case Legacies_Empire::ID_MISSION_ATTACK:
|
||||
// Attaquer
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
* @param unknown_type $lunarow
|
||||
*/
|
||||
function CheckAbandonMoonState ($lunarow) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
if (($lunarow['destruyed'] + 172800) <= time() && $lunarow['destruyed'] != 0) {
|
||||
$query = doquery("DELETE FROM {{table}} WHERE id = '" . $lunarow['id'] . "'", "lunas");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,6 @@
|
|||
* @deprecated
|
||||
*/
|
||||
function GalaxyLegendPopup () {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
global $lang;
|
||||
|
||||
$Result = "<a href=# style=\"cursor: pointer;\"";
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
* @param unknown_type $PlanetType
|
||||
*/
|
||||
function GalaxyRowActions ( $GalaxyRow, $GalaxyRowPlanet, $GalaxyRowPlayer, $Galaxy, $System, $Planet, $PlanetType ) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
global $lang, $user, $dpath, $CurrentMIP, $CurrentSystem, $CurrentGalaxy;
|
||||
// Icones action
|
||||
$Result = "<th style=\"white-space: nowrap;\" width=125>";
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
* @param unknown_type $PlanetType
|
||||
*/
|
||||
function GalaxyRowAlly ( $GalaxyRow, $GalaxyRowPlanet, $GalaxyRowUser, $Galaxy, $System, $Planet, $PlanetType ) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
global $lang, $user;
|
||||
|
||||
// Alliances
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
* @param unknown_type $PlanetType
|
||||
*/
|
||||
function GalaxyRowDebris ( $GalaxyRow, $GalaxyRowPlanet, $GalaxyRowUser, $Galaxy, $System, $Planet, $PlanetType ) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
global $lang, $dpath, $CurrentRC, $user, $pricelist;
|
||||
// Cdr
|
||||
$Result = "<th style=\"white-space: nowrap;\" width=30>";
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
* @param unknown_type $PlanetType
|
||||
*/
|
||||
function GalaxyRowMoon ( $GalaxyRow, $GalaxyRowPlanet, $GalaxyRowUser, $Galaxy, $System, $Planet, $PlanetType ) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
global $lang, $user, $dpath, $HavePhalanx, $CurrentSystem, $CurrentGalaxy, $CanDestroy;
|
||||
|
||||
// Lune
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
* @param unknown_type $PlanetType
|
||||
*/
|
||||
function GalaxyRowPlanet ( $GalaxyRow, $GalaxyRowPlanet, $GalaxyRowUser, $Galaxy, $System, $Planet, $PlanetType ) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
global $lang, $dpath, $user, $HavePhalanx, $CurrentSystem, $CurrentGalaxy;
|
||||
|
||||
// Planete (Image)
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
* @param unknown_type $PlanetType
|
||||
*/
|
||||
function GalaxyRowPlanetName ( $GalaxyRow, $GalaxyRowPlanet, $GalaxyRowUser, $Galaxy, $System, $Planet, $PlanetType ) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
global $lang, $user, $HavePhalanx, $CurrentSystem, $CurrentGalaxy;
|
||||
|
||||
// Planete (Nom)
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
* @param unknown_type $GalaxyRow
|
||||
*/
|
||||
function GalaxyRowPos ( $Planet, $GalaxyRow ) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
// Pos
|
||||
$Result = "<th width=30>";
|
||||
$Result .= "<a href=\"#\"";
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
* @param unknown_type $PlanetType
|
||||
*/
|
||||
function GalaxyRowUser ( $GalaxyRow, $GalaxyRowPlanet, $GalaxyRowUser, $Galaxy, $System, $Planet, $PlanetType ) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
global $lang, $user;
|
||||
|
||||
// Joueur
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
*/
|
||||
function GetMaxConstructibleElements ($Element, $Ressources) {
|
||||
global $pricelist;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
// On test les 4 Type de ressource pour voir si au moins on sait en construire 1
|
||||
if ($pricelist[$Element]['metal'] != 0) {
|
||||
$ResType_1_Needed = $pricelist[$Element]['metal'];
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
*/
|
||||
function GetMissileRange () {
|
||||
global $resource, $user;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
if ($user[$resource[117]] > 0) {
|
||||
$MissileRange = ($user[$resource[117]] * 5) - 1;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
* @param unknown_type $PhalanxLevel
|
||||
*/
|
||||
function GetPhalanxRange ( $PhalanxLevel ) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
// Niveau 1 2 3 4 5 6 7 = lvl
|
||||
// Portée ajouté 0 3 5 7 9 11 13 = (lvl * 2) - 1
|
||||
// Phalanx en nbre de systemes 0 3 8 15 24 35 48 =
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
*/
|
||||
function InsertGalaxyScripts ( $CurrentPlanet ) {
|
||||
global $lang;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
$Script = "<div style=\"top: 10px;\" id=\"content\">";
|
||||
$Script .= "<script language=\"JavaScript\">\n";
|
||||
$Script .= "function galaxy_submit(value) {\n";
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@
|
|||
* @param unknown_type $Init
|
||||
*/
|
||||
function InsertJavaScriptChronoApplet ( $Type, $Ref, $Value, $Init ) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
if ($Init == true) {
|
||||
$JavaString = "<script type=\"text/javascript\">\n";
|
||||
$JavaString .= "function t". $Type . $Ref ."() {\n";
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@
|
|||
function IsOfficierAccessible ($CurrentUser, $Officier) {
|
||||
global $requirements, $resource, $pricelist;
|
||||
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
if (isset($requirements[$Officier])) {
|
||||
$enabled = true;
|
||||
foreach($requirements[$Officier] as $ReqOfficier => $OfficierLevel) {
|
||||
|
|
|
|||
|
|
@ -38,7 +38,6 @@
|
|||
* @param unknown_type $TwoLines
|
||||
*/
|
||||
function MessageForm ($Title, $Message, $Goto = '', $Button = ' ok ', $TwoLines = false) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
$Form = "<center>";
|
||||
$Form .= "<form action=\"". $Goto ."\" method=\"post\">";
|
||||
$Form .= "<table width=\"519\">";
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
* @param unknown_type $IDAversaire
|
||||
*/
|
||||
function MipAttack ($NbreMip, $IDAversaire) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
$TechnoArme = doquery("SELECT * FROM {{table}} WHERE `id`='" . $user['id'] . "'", "users");
|
||||
$InfoAdversaire = doquery("SELECT * FROM {{table}} WHERE `id`='" . $IDAversaire . "'", "planets", true);
|
||||
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
*/
|
||||
function MissionCaseAttack($FleetRow)
|
||||
{
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
global $lang;
|
||||
|
||||
$pricelist = Legacies_Empire_Model_Game_Prices::getSingleton();
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
*/
|
||||
function MissionCaseColonisation ( $FleetRow ) {
|
||||
global $lang, $resource;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
$iPlanetCount = mysql_result(doquery ("SELECT count(*) FROM {{table}} WHERE `id_owner` = '". $FleetRow['fleet_owner'] ."' AND `planet_type` = '1'", 'planets'), 0);
|
||||
if ($FleetRow['fleet_mess'] == 0) {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
function MissionCaseDestruction($FleetRow)
|
||||
{
|
||||
global $user, $pricelist, $lang, $resource, $CombatCaps, $gameConfig;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
includeLang('system');
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
*/
|
||||
function MissionCaseExpedition ( $FleetRow ) {
|
||||
global $lang, $resource, $pricelist;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
$FleetOwner = $FleetRow['fleet_owner'];
|
||||
$MessSender = $lang['sys_mess_qg'];
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
*/
|
||||
function MissionCaseRecycling ($FleetRow) {
|
||||
global $pricelist, $lang;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
if ($FleetRow["fleet_mess"] == "0") {
|
||||
if ($FleetRow['fleet_start_time'] <= time()) {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
*/
|
||||
function MissionCaseSpy($FleetRow)
|
||||
{
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
global $lang;
|
||||
|
||||
$resource = Legacies_Empire_Model_Game_FieldsAlias::getSingleton();
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
*/
|
||||
function MissionCaseStay ( $FleetRow ) {
|
||||
global $lang, $resource;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
if ($FleetRow['fleet_mess'] == 0) {
|
||||
if ($FleetRow['fleet_start_time'] <= time()) {
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
*/
|
||||
function MissionCaseStayAlly ( $FleetRow ) {
|
||||
global $lang;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
$QryStartPlanet = "SELECT * FROM {{table}} ";
|
||||
$QryStartPlanet .= "WHERE ";
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
*/
|
||||
function MissionCaseTransport ( $FleetRow ) {
|
||||
global $lang;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
$QryStartPlanet = "SELECT * FROM {{table}} ";
|
||||
$QryStartPlanet .= "WHERE ";
|
||||
|
|
|
|||
|
|
@ -40,8 +40,6 @@ function ResearchBuildingPage (&$CurrentPlanet, $CurrentUser, $InResearch, $TheP
|
|||
{
|
||||
global $lang, $resource, $reslist, $dpath, $gameConfig, $_GET;
|
||||
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
$NoResearchMessage = "";
|
||||
$bContinue = true;
|
||||
// Deja est qu'il y a un laboratoire sur la planete ???
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@
|
|||
* @param unknown_type $seconds
|
||||
*/
|
||||
function RevisionTime ($seconds) {
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
$days = floor($seconds / 86400);
|
||||
$hours = (floor(($seconds % 86400) / 3600));
|
||||
$minutes = floor(($seconds % 3600) / 60);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@
|
|||
*/
|
||||
function SendSimpleMessage ( $Owner, $Sender, $Time, $Type, $From, $Subject, $Message) {
|
||||
global $messfields;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
if ($Time == '') {
|
||||
$Time = time();
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
*/
|
||||
function ShowBuildingQueue ( $CurrentPlanet, $CurrentUser ) {
|
||||
global $lang;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
$CurrentQueue = $CurrentPlanet['b_building_id'];
|
||||
$QueueID = 0;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
*/
|
||||
function ShowGalaxyFooter ( $Galaxy, $System, $CurrentMIP, $CurrentRC, $CurrentSP) {
|
||||
global $lang, $maxfleet_count, $fleetmax, $planetcount;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
$Result = "";
|
||||
if ($planetcount == 1) {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
*/
|
||||
function ShowGalaxyMISelector ( $Galaxy, $System, $Planet, $Current, $MICount ) {
|
||||
global $lang;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
$Result = "<form action=\"raketenangriff.php?c=".$Current."&mode=2&galaxy=".$Galaxy."&system=".$System."&planet=".$Planet."\" method=\"POST\">";
|
||||
$Result .= "<tr>";
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
*/
|
||||
function ShowGalaxyRows ($Galaxy, $System) {
|
||||
global $lang, $planetcount, $CurrentRC, $dpath, $user;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
$Result = "";
|
||||
for ($Planet = 1; $Planet < 16; $Planet++) {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
*/
|
||||
function ShowGalaxySelector ( $Galaxy, $System ) {
|
||||
global $lang;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
if ($Galaxy > MAX_GALAXY_IN_WORLD) {
|
||||
$Galaxy = MAX_GALAXY_IN_WORLD;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
*/
|
||||
function ShowGalaxyTitles ( $Galaxy, $System ) {
|
||||
global $lang;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
$Result = "\n";
|
||||
$Result .= "<tr>";
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
*/
|
||||
function ShowTopNavigationBar ( $CurrentUser, $CurrentPlanet ) {
|
||||
global $lang, $_GET;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
// debug_print_backtrace();
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
function SortUserPlanets ( $CurrentUser ) {
|
||||
$Order = ( $CurrentUser['planet_sort_order'] == 1 ) ? "DESC" : "ASC" ;
|
||||
$Sort = $CurrentUser['planet_sort'];
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
$QryPlanets = "SELECT `id`, `name`, `galaxy`, `system`, `planet`, `planet_type` FROM {{table}} WHERE `id_owner` = '". $CurrentUser['id'] ."' ORDER BY ";
|
||||
if ( $Sort == 0 ) {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,6 @@
|
|||
*/
|
||||
function SpyTarget ( $TargetPlanet, $Mode, $TitleString ) {
|
||||
global $lang, $resource;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
$LookAtLoop = true;
|
||||
if ($Mode == 0) {
|
||||
|
|
|
|||
|
|
@ -36,7 +36,6 @@
|
|||
*/
|
||||
function StoreGoodsToPlanet ( $FleetRow, $Start = false ) {
|
||||
global $resource;
|
||||
trigger_error(sprintf('%s is deprecated', __FUNCTION__), E_USER_DEPRECATED);
|
||||
|
||||
|
||||
$QryUpdatePlanet = "UPDATE {{table}} SET ";
|
||||
|
|
|
|||
Loading…
Reference in a new issue