diff --git a/admin/declare_list.php b/admin/declare_list.php
index 0927ccd..973f7df 100644
--- a/admin/declare_list.php
+++ b/admin/declare_list.php
@@ -80,5 +80,4 @@ require_once dirname(dirname(__FILE__)) .'/common.php';
message( $lang['sys_noalloaw'], $lang['sys_noaccess'] );
}
-// Created by e-Zobar. All rights reversed (C) XNova Team 2008
?>
\ No newline at end of file
diff --git a/ainfo.php b/ainfo.php
index 3c70731..a1ae4f2 100644
--- a/ainfo.php
+++ b/ainfo.php
@@ -67,5 +67,4 @@ $page .="
Informations sur l'alliance<
display($page,"Information sur l'alliance [".$allyrow["ally_name"]."]",false);
-// Created by Perberos. All rights reversed (C) 2006
?>
\ No newline at end of file
diff --git a/alliance.php b/alliance.php
index 688b354..1301154 100644
--- a/alliance.php
+++ b/alliance.php
@@ -774,8 +774,8 @@ elseif ($user['ally_id'] != 0 && $user['ally_request'] == 0) { // Con alianza
if ($t == 2) {
$lang['text'] = $ally['ally_text'];
- $lang['Texts'] = "Interner Text";
- $lang['Show_of_request_text'] = "Internet Allianz Text";
+ $lang['Texts'] = "Texte Interne";
+ $lang['Show_of_request_text'] = "Texte Interne d'ALliance";
} else {
$lang['text'] = $ally['ally_description'];
}
diff --git a/annonce.php b/annonce.php
index 3587f3f..bfa6b9f 100644
--- a/annonce.php
+++ b/annonce.php
@@ -119,6 +119,4 @@ if ($action != 5) {
display($page2);
}
-// Créer par Tom1991 Copyright 2008
-// Merci au site Spacon pour m'avoir donner l'inspiration
?>
\ No newline at end of file
diff --git a/banned.php b/banned.php
index 7e2a414..147493b 100644
--- a/banned.php
+++ b/banned.php
@@ -59,6 +59,4 @@ else
display(parsetemplate(gettemplate('banned_body'), $parse),'Banned',true);
-
-// Created by e-Zobar (XNova Team). All rights reversed (C) 2008
?>
\ No newline at end of file
diff --git a/buddy.php b/buddy.php
index 1a98371..bdadc98 100644
--- a/buddy.php
+++ b/buddy.php
@@ -169,8 +169,10 @@ while ( $b = mysql_fetch_array( $buddyrow ) ) {
if ( $u["ally_id"] != 0 ) { // Alianza
// $allyrow = doquery("SELECT id,ally_tag FROM {{table}} WHERE id=".$u["ally_id"],"alliance",true);
// if($allyrow){
- $UserAlly .= "" . $u["ally_name"] . "";
+ $UserAlly = "" . $u["ally_name"] . "";
// }
+ } else {
+ $UserAlly ="";
}
if ( isset( $a ) ) {
@@ -226,5 +228,4 @@ $page .= "
";
display ( $page, $lang['Buddy_list'], false );
-// Created by Perberos. All rights reversed (C) 2006
?>
diff --git a/buildings.php b/buildings.php
index b352d06..6d08a70 100644
--- a/buildings.php
+++ b/buildings.php
@@ -36,32 +36,143 @@ includeLang('buildings');
$user = Legacies_Empire_Model_User::getSingleton();
$planet = $user->getCurrentPlanet();
+$mode = isset($_GET['mode']) ? $_GET['mode'] : null;
-switch ($_GET['mode']) {
- case 'fleet':
- // --------------------------------------------------------------------------------------------------
- FleetBuildingPage($planet, $user);
- break;
+switch ($mode) {
+case 'fleet':
+ if ($planet->getElement(Legacies_Empire::ID_BUILDING_SHIPYARD) === null) {
+ $layout = new Legacies_Core_Layout();
+ $layout->load('message');
- case 'research':
- // --------------------------------------------------------------------------------------------------
- ResearchBuildingPage($planet, $user, $IsWorking['OnWork'], $IsWorking['WorkOn'] );
- break;
+ $block = $layout->getBlock('message');
+ $block['title'] = Legacies::__('Shipyard is required');
+ $block['message'] = Legacies::__('In order to build ships you will need to build a shipyard building.');
- case 'defense':
- // --------------------------------------------------------------------------------------------------
- DefensesBuildingPage($planet, $user);
- break;
+ $layout->render();
+ break;
+ }
- default:
- // --------------------------------------------------------------------------------------------------
- BatimentBuildingPage($planet, $user);
- break;
+ /** @var Legacies_Empire_Model_Planet_Building_Shipyard $shipyard */
+ $shipyard = $planet->getShipyard();
+ if (isset($_POST['ship']) && is_array($_POST['ship'])) {
+ foreach ($_POST['ship'] as $shipId => $count) {
+ $shipId = intval($shipId);
+ $count = intval($count);
+
+ $shipyard->appendQueue($shipId, $count);
+ }
+ $planet->save();
+ }
+
+ $types = Legacies_Empire_Model_Game_Types::getSingleton();
+ $layout = new Legacies_Core_Layout();
+ $layout->load('planet.shipyard');
+
+ /** @var Legacies_Core_Block_Concat $parentBlock */
+ $parentBlock = $layout->getBlock('item-list.items');
+ foreach ($types->getData(Legacies_Empire::TYPE_SHIP) as $shipId) {
+ if (!$shipyard->checkAvailability($shipId)) {
+ continue;
+ }
+
+ $blockName = "ship({$shipId})";
+ $block = $layout->createBlock('empire/planet.shipyard.item', $blockName);
+ $block->setTemplate('empire/planet/shipyard/item.phtml');
+ $block->setPlanet($planet);
+ $block->setItemId($shipId);
+
+ $parentBlock->setPartial($blockName, $block);
+ }
+
+ echo $layout->render();
+ break;
+
+case 'research':
+ // --------------------------------------------------------------------------------------------------
+ ResearchBuildingPage($planet, $user, $IsWorking['OnWork'], $IsWorking['WorkOn'] );
+ break;
+
+case 'defense':
+ if ($planet->getElement(Legacies_Empire::ID_BUILDING_SHIPYARD) === null) {
+ $layout = new Legacies_Core_Layout();
+ $layout->load('message');
+
+ $block = $layout->getBlock('message');
+ $block['title'] = Legacies::__('Shipyard is required');
+ $block['title'] = Legacies::__('In order to build ships you will need to build a shipyard building.');
+
+ $layout->render();
+ break;
+ }
+
+ /** @var Legacies_Empire_Model_Planet_Building_Shipyard $shipyard */
+ $shipyard = $planet->getShipyard();
+ if (isset($_POST['defense']) && is_array($_POST['defense'])) {
+ foreach ($_POST['defense'] as $defenseId => $count) {
+ $defenseId = intval($defenseId);
+ $count = intval($count);
+
+ $shipyard->appendQueue($defenseId, $count);
+ }
+ $planet->save();
+ }
+
+ $types = Legacies_Empire_Model_Game_Types::getSingleton();
+ $layout = new Legacies_Core_Layout();
+ $layout->load('planet.shipyard');
+
+ /** @var Legacies_Core_Block_Concat $parentBlock */
+ $parentBlock = $layout->getBlock('item-list.items');
+ foreach ($types->getData(Legacies_Empire::TYPE_DEFENSE) as $defenseId) {
+ if (!$shipyard->checkAvailability($defenseId)) {
+ continue;
+ }
+
+ $blockName = "defense({$defenseId})";
+ $block = $layout->createBlock('empire/planet.shipyard.item', $blockName);
+ $block->setTemplate('empire/planet/shipyard/item.phtml');
+ $block->setPlanet($planet);
+ $block->setItemId($defenseId);
+
+ $parentBlock->setPartial($blockName, $block);
+ }
+
+ echo $layout->render();
+ break;
+
+default:
+ if (isset($_GET['building']) && !empty($_GET['building'])) {
+ $buildingId = intval($_GET['building']);
+
+ $planet->appendBuildingQueue($shipId, isset($_GET['destroy']));
+ $planet->save();
+ }
+
+ $types = Legacies_Empire_Model_Game_Types::getSingleton();
+ $layout = new Legacies_Core_Layout();
+ $layout->load('planet.buildings');
+
+ /** @var Legacies_Core_Block_Concat $parentBlock */
+ $parentBlock = $layout->getBlock('item-list.items');
+ $type = Legacies_Empire::TYPE_BUILDING_PLANET;
+ if ($planet->isMoon()) {
+ $type = Legacies_Empire::TYPE_BUILDING_MOON;
+ }
+ foreach ($types->getData($type) as $buildingId) {
+ if (!$planet->checkAvailability($buildingId)) {
+ continue;
+ }
+
+ $blockName = "building({$buildingId})";
+ $block = $layout->createBlock('empire/planet.buildings.item', $blockName);
+ $block->setTemplate('empire/planet/buildings/item.phtml');
+ $block->setPlanet($planet);
+ $block->setItemId($buildingId);
+
+ $parentBlock->setPartial($blockName, $block);
+ }
+
+ echo $layout->render();
+ break;
}
-// -----------------------------------------------------------------------------------------------------------
-// History version
-// 1.0 - Nettoyage modularisation
-// 1.1 - Mise au point, mise en fonction pour lin�arisation du fonctionnement
-// 1.2 - Liste de construction batiments
-?>
diff --git a/changelog.php b/changelog.php
index 221d91e..fb99527 100644
--- a/changelog.php
+++ b/changelog.php
@@ -53,5 +53,4 @@ $page .= parsetemplate(gettemplate('changelog_body'), $parse);
display($page,"Change Log");
-// Created by Perberos. All rights reversed (C) 2006
?>
\ No newline at end of file
diff --git a/contact.php b/contact.php
index 07a44ce..3f0ed16 100644
--- a/contact.php
+++ b/contact.php
@@ -55,7 +55,5 @@ require_once dirname(__FILE__) .'/common.php';
display($page, $lang['ctc_title'], false);
// -----------------------------------------------------------------------------------------------------------
-// History version
-// 1.0 - Mise au propre (Virer tout ce qui ne sert pas a une prise de contact en fait)
?>
diff --git a/fleet.php b/fleet.php
index 8708da2..795f54d 100644
--- a/fleet.php
+++ b/fleet.php
@@ -282,6 +282,4 @@ require_once dirname(__FILE__) .'/common.php';
display($page, $lang['fl_title']);
-// Updated by Chlorel. 16 Jan 2008 (String extraction, bug corrections, code uniformisation
-// Created by Perberos. All rights reversed (C) 2006
?>
diff --git a/fleetback.php b/fleetback.php
index 89c7cf2..d8cc82e 100644
--- a/fleetback.php
+++ b/fleetback.php
@@ -1,32 +1,15 @@
- * 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 .
- *
- * --> 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.
- *
- */
+/*
+
+Galacticnova : An open-source web-based game !
+~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
+
+License: AGPL
+Author: Vincent Debarre
+Website: http://project.galacticnova.vinilox.eu/
+Last revision: 13/07/11
+
+*/
define('INSIDE' , true);
define('INSTALL' , false);
@@ -43,10 +26,10 @@ require_once dirname(__FILE__) .'/common.php';
$i = 0;
if ($FleetRow['fleet_owner'] == $user['id']) {
- if ($FleetRow['fleet_mess'] == 0) {
+ if ($FleetRow['fleet_mess'] == 0 || $FleetRow['fleet_mess'] == 2) {
if ($FleetRow['fleet_end_stay'] != 0) {
// Faut calculer le temps reel de retour
- if ($FleetRow['fleet_start_time'] < time()) {
+ if ($FleetRow['fleet_start_time'] > time()) {
// On a pas encore entamé le stationnement
// Il faut calculer la parcelle de temps ecoulée depuis le lancement de la flotte
$CurrentFlyingTime = time() - $FleetRow['start_time'];
@@ -87,11 +70,4 @@ require_once dirname(__FILE__) .'/common.php';
message ("". $BoxMessage ."", $BoxTitle, "fleet.". PHPEXT, 2);
// -----------------------------------------------------------------------------------------------------------
-// History version
-// Updated by Chlorel. 22 Jan 2008 (String extraction, bug corrections, code uniformisation
-// Created by DxPpLmOs. All rights reversed (C) 2007
-// Updated by -= MoF =- for Deutsches Ugamela Forum
-// 06.12.2007 - 08:41
-// Open Source
-// (c) by MoF
?>
diff --git a/floten2.php b/floten2.php
index e3461e6..a56178b 100644
--- a/floten2.php
+++ b/floten2.php
@@ -278,6 +278,4 @@ require_once dirname(__FILE__) .'/common.php';
display($page, $lang['fl_title']);
-// Updated by Chlorel. 16 Jan 2008 (String extraction, bug corrections, code uniformisation)
-// Created by Perberos. All rights reversed (C) 2006
?>
\ No newline at end of file
diff --git a/imperium.php b/imperium.php
index 0853672..d881e13 100644
--- a/imperium.php
+++ b/imperium.php
@@ -113,5 +113,5 @@ foreach ($reslist['defense'] as $a => $i) {
$page .= parsetemplate(gettemplate('imperium_table'), $parse);
display($page, $lang['Imperium'], false);
-// Created by Perberos. All rights reserved (C) 2006
+
?>
diff --git a/includes/application/code/core/Legacies/Empire/Block/Planet/Buildings/Item.php b/includes/application/code/core/Legacies/Empire/Block/Planet/Buildings/Item.php
new file mode 100644
index 0000000..6f11595
--- /dev/null
+++ b/includes/application/code/core/Legacies/Empire/Block/Planet/Buildings/Item.php
@@ -0,0 +1,102 @@
+_planet = $planet;
+
+ return $this;
+ }
+
+ public function getPlanet()
+ {
+ return $this->_planet;
+ }
+
+ public function setItemId($itemId)
+ {
+ $this->_itemId = $itemId;
+
+ return $this;
+ }
+
+ public function getItemId()
+ {
+ return $this->_itemId;
+ }
+
+ public function getItemInfoUrl()
+ {
+ return $this->getUrl('infos.php', array('gid' => $this->getItemId()));
+ }
+
+ public function getItemImageUrl()
+ {
+ return $this->getSkinUrl('graphics/gebaeude/' . $this->getItemId() . '.gif');
+ }
+
+ public function getName()
+ {
+ static $lang = null;
+ if ($lang === null) {
+ // FIXME: implement a cleaner way to get names
+ $lang = includeLang('tech');
+ }
+
+ if (isset($lang['tech']) && isset($lang['tech'][$this->getItemId()])) {
+ return $this->__($lang['tech'][$this->getItemId()]);
+ }
+ return '';
+ }
+
+ public function getDescription()
+ {
+ static $lang = null;
+ if ($lang === null) {
+ // FIXME: implement a cleaner way to get names
+ $lang = includeLang('tech');
+ }
+
+ if (isset($lang['res']) && isset($lang['res']['descriptions']) && isset($lang['res']['descriptions'][$this->getItemId()])) {
+ return $this->__($lang['res']['descriptions'][$this->getItemId()]);
+ }
+ return '';
+ }
+
+ public function getResourceName($resourceId)
+ {
+ static $lang = null;
+ if ($lang === null) {
+ // FIXME: implement a cleaner way to get names
+ $lang = includeLang('imperium');
+ }
+ if ($resourceId == 'cristal') {
+ $resourceId = 'crystal';
+ }
+
+ if (isset($lang[$resourceId])) {
+ return $this->__($lang[$resourceId]);
+ }
+ return '';
+ }
+
+ public function getLevel()
+ {
+ return $this->_planet->getElement($this->getItemId());
+ }
+
+ public function getResourcesNeeded()
+ {
+ return $this->_planet->getResourcesNeeded($this->getItemId(), 1);
+ }
+
+ public function getItemTime()
+ {
+ return $this->_planet->getBuildingTime($this->getItemId(), 1);
+ }
+}
\ No newline at end of file
diff --git a/includes/application/code/core/Legacies/Empire/Block/Planet/Shipyard/Item.php b/includes/application/code/core/Legacies/Empire/Block/Planet/Shipyard/Item.php
new file mode 100644
index 0000000..7197525
--- /dev/null
+++ b/includes/application/code/core/Legacies/Empire/Block/Planet/Shipyard/Item.php
@@ -0,0 +1,109 @@
+_planet = $planet;
+ $this->_shipyard = $this->_planet->getShipyard();
+
+ return $this;
+ }
+
+ public function getPlanet()
+ {
+ return $this->_planet;
+ }
+
+ public function setItemId($shipId)
+ {
+ $this->_itemId = $shipId;
+
+ return $this;
+ }
+
+ public function getItemId()
+ {
+ return $this->_itemId;
+ }
+
+ public function getItemInfoUrl()
+ {
+ return $this->getUrl('infos.php', array('gid' => $this->getItemId()));
+ }
+
+ public function getItemImageUrl()
+ {
+ return $this->getSkinUrl('graphics/gebaeude/' . $this->getItemId() . '.gif');
+ }
+
+ public function getName()
+ {
+ static $lang = null;
+ if ($lang === null) {
+ // FIXME: implement a cleaner way to get names
+ $lang = includeLang('tech');
+ }
+
+ if (isset($lang['tech']) && isset($lang['tech'][$this->getItemId()])) {
+ return $this->__($lang['tech'][$this->getItemId()]);
+ }
+ return '';
+ }
+
+ public function getDescription()
+ {
+ static $lang = null;
+ if ($lang === null) {
+ // FIXME: implement a cleaner way to get names
+ $lang = includeLang('tech');
+ }
+
+ if (isset($lang['res']) && isset($lang['res']['descriptions']) && isset($lang['res']['descriptions'][$this->getItemId()])) {
+ return $this->__($lang['res']['descriptions'][$this->getItemId()]);
+ }
+ return '';
+ }
+
+ public function getResourceName($resourceId)
+ {
+ static $lang = null;
+ if ($lang === null) {
+ // FIXME: implement a cleaner way to get names
+ $lang = includeLang('imperium');
+ }
+ if ($resourceId == 'cristal') {
+ $resourceId = 'crystal';
+ }
+
+ if (isset($lang[$resourceId])) {
+ return $this->__($lang[$resourceId]);
+ }
+ return '';
+ }
+
+ public function getQty()
+ {
+ return $this->_planet->getElement($this->getItemId());
+ }
+
+ public function getResourcesNeeded()
+ {
+ return $this->_shipyard->getResourcesNeeded($this->getItemId(), 1);
+ }
+
+ public function getBuildingTime()
+ {
+ return $this->_shipyard->getBuildingTime($this->getItemId(), 1);
+ }
+
+ public function getMaximumBuildableElementsCount()
+ {
+ return $this->_shipyard->getMaximumBuildableElementsCount($this->getItemId());
+ }
+}
\ No newline at end of file
diff --git a/includes/application/code/core/Legacies/Empire/Model/BuilderAbstract.php b/includes/application/code/core/Legacies/Empire/Model/BuilderAbstract.php
index ba7ab79..c94b79c 100644
--- a/includes/application/code/core/Legacies/Empire/Model/BuilderAbstract.php
+++ b/includes/application/code/core/Legacies/Empire/Model/BuilderAbstract.php
@@ -218,4 +218,16 @@ abstract class Legacies_Empire_Model_BuilderAbstract
return $this;
}
+
+ protected function _calculateResourceRemainingAmounts($resourceNeeded)
+ {
+ $resourceAmounts = array();
+ foreach ($resourcesNeeded as $resourceId => $resourceAmount) {
+ $resourceAmounts[$resourceId] = Math::sub($this->_currentPlanet[$resourceId], $resourceAmount);
+ if (Math::isNegative($resourceAmounts[$resourceId])) {
+ return false;
+ }
+ }
+ return $resourceAmounts;
+ }
}
\ No newline at end of file
diff --git a/includes/application/code/core/Legacies/Empire/Model/Planet.php b/includes/application/code/core/Legacies/Empire/Model/Planet.php
index 0f6c766..b479114 100644
--- a/includes/application/code/core/Legacies/Empire/Model/Planet.php
+++ b/includes/application/code/core/Legacies/Empire/Model/Planet.php
@@ -37,7 +37,7 @@ class Legacies_Empire_Model_Planet
protected $_shipyard = null;
/**
- * @var Legacies_Empire_Model_Planet_Building_Laboratory
+ * @var Legacies_Empire_Model_Planet_Building_ResearchLab
*/
protected $_laboratory = null;
@@ -393,15 +393,15 @@ class Legacies_Empire_Model_Planet
return $this;
}
- public function getLaboratory()
+ public function getResearchLab()
{
if ($this->_laboratory === null) {
- $this->_laboratory = new Legacies_Empire_Model_Planet_Building_Laboratory($this, $this->getUser());
+ $this->_laboratory = new Legacies_Empire_Model_Planet_Building_ResearchLab($this, $this->getUser());
}
return $this->_laboratory;
}
- public function setLaboratory(Legacies_Empire_Model_Planet_Building_Laboratory $laboratory)
+ public function setResearchLab(Legacies_Empire_Model_Planet_Building_ResearchLab $laboratory)
{
$this->_laboratory = $laboratory;
diff --git a/includes/application/code/core/Legacies/Empire/Model/Planet/Builder.php b/includes/application/code/core/Legacies/Empire/Model/Planet/Builder.php
index 8b24112..a870b27 100644
--- a/includes/application/code/core/Legacies/Empire/Model/Planet/Builder.php
+++ b/includes/application/code/core/Legacies/Empire/Model/Planet/Builder.php
@@ -45,6 +45,11 @@ class Legacies_Empire_Model_Planet_Builder
return $this->checkAvailability($buildingId);
}
+ public function getBuildingTime($buildingId, $level)
+ {
+ return 0;
+ }
+
public function getResourcesNeeded($buildingId, $level)
{
$prices = Legacies_Empire_Model_Game_Prices::getSingleton();
@@ -68,11 +73,6 @@ class Legacies_Empire_Model_Planet_Builder
return $resourcesNeeded;
}
- public function getBuildingTime($buildingId, $level)
- {
- return 0;
- }
-
/**
* Update the contruction queue.
*
@@ -143,27 +143,18 @@ class Legacies_Empire_Model_Planet_Builder
}
$resourcesNeeded = $this->getResourcesNeeded($buildingId, $level);
-
- $amounts = array();
- foreach ($resourcesNeeded as $resourceId => $resourceCost) {
- $amount[$resourceId] = Math::sub($this->_currentPlanet[$resourceId], $resourceCost);
-
- if (Math::isNegative($amount[$resourceId])) {
- return $this;
- }
+ $remainingAmounts = $this->_calculateResourceRemainingAmounts($resourcesNeeded);
+ if ($remainingAmounts === false) {
+ return $this;
}
$this->enqueue($buildingId, $level, $time);
-
- foreach ($resourcesNeeded as $resourceId => $resourceCost) {
- if (!isset($resources[$resourceId]) || !Math::isPositive($resourceCost)) {
- continue;
- }
- $this->_currentPlanet->setData($resourceId, $resourceId[$resourceId]);
- }
-
$this->_currentPlanet->setData('b_building_id', $this->serialize());
+ foreach ($remainingAmounts as $resourceId => $resourceAmount) {
+ $this->_currentPlanet[$resourceId] = $resourceAmount;
+ }
+
return $this;
}
diff --git a/includes/application/code/core/Legacies/Empire/Model/Planet/Building/ResearchLab.php b/includes/application/code/core/Legacies/Empire/Model/Planet/Building/ResearchLab.php
new file mode 100644
index 0000000..0ea824d
--- /dev/null
+++ b/includes/application/code/core/Legacies/Empire/Model/Planet/Building/ResearchLab.php
@@ -0,0 +1,256 @@
+
+ * 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 .
+ *
+ * --> 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.
+ *
+ */
+
+/**
+ * Research lab building, manages researches queue on each planet
+ *
+ * @access public
+ * @category Empire
+ * @category Planet
+ * @package Legacies
+ * @subpackage Legacies_Empire
+ */
+class Legacies_Empire_Model_Planet_Building_ResearchLab
+ implements Legacies_Empire_Model_Planet_BuildingInterface
+{
+ private $_eventPrefix = 'planet.laboratory.';
+
+ /**
+ * Planet instance
+ * @var Legacies_Empire_Model_Planet
+ */
+ protected $_currentPlanet = null;
+
+ /**
+ * User instance
+ * @var Legacies_Empire_Model_User
+ */
+ protected $_currentUser = null;
+
+ /**
+ * construction queue
+ * @var array
+ */
+ protected $_builder = null;
+
+ /**
+ * Multiton instances
+ * @var array
+ */
+ protected static $_instances = array();
+
+ /**
+ * Multiton factory. Retruns the planet's research lab instance or created it if
+ * it doesn't yet exist.
+ *
+ * @param Legacies_Empire_Model_Planet $currentPlanet
+ * @param Legacies_Empire_Model_User $currentUser
+ * @return Legacies_Empire_Model_Planet_Building_ResearchLab
+ */
+ public static function factory($currentPlanet, $currentUser)
+ {
+ if ($currentPlanet->getId()) {
+ return null;
+ }
+
+ if (!isset(self::$_instances[$currentPlanet->getId()])) {
+ self::$_instances[$currentPlanet->getId()] = new self($currentPlanet, $currentUser);
+ }
+ return self::$_instances[$currentPlanet->getId()];
+ }
+
+ /**
+ * Constructor. Used for specific usage, use the factory for standard usage.
+ *
+ * @see Legacies_Empire_Model_Planet_Building_ResearchLab::factory()
+ *
+ * @param Legacies_Empire_Model_Planet $currentPlanet
+ * @param Legacies_Empire_Model_User $currentUser
+ */
+ public function __construct($currentPlanet, $currentUser)
+ {
+ $this->_currentPlanet = $currentPlanet;
+ $this->_currentUser = $currentUser;
+
+ $this->_builder = new Legacies_Empire_Model_Planet_Building_ResearchLab_Builder($currentPlanet, $currentUser);
+ }
+
+ /**
+ * @deprecated
+ * @return Legacies_Empire_Model_Planet_Building_ResearchLab
+ */
+ public function save()
+ {
+ $this->_currentPlanet->save();
+ return $this;
+ }
+
+ /**
+ * Append items to build to the construction list
+ *
+ * @param int $researchId
+ * @param int|string $level
+ * @return Legacies_Empire_Model_Planet_Building_ResearchLab
+ */
+ public function appendQueue($researchId, $destroy = false, $time = null)
+ {
+ if ($time === null) {
+ $time = Legacies::now();
+ }
+
+ if ($destroy === false) {
+ $level = $this->_currentUser->getElement($researchId) + 1;
+ } else {
+ $level = max($this->_currentUser->getElement($researchId) - 1, 0);
+ }
+
+ // Dispatch event
+ Legacies::dispatchEvent($this->_eventPrefix . 'append-queue.before', array(
+ 'research_id' => $researchId,
+ 'level' => &$level,
+ 'time' => &$time,
+ 'laboratory' => $this,
+ 'planet' => $this->_currentPlanet,
+ 'user' => $this->_currentUser
+ ));
+
+ $this->_builder->appendQueue($researchId, $level, $time);
+
+ // Dispatch event
+ Legacies::dispatchEvent($this->_eventPrefix . 'append-queue.after', array(
+ 'research_id' => $researchId,
+ 'level' => $level,
+ 'time' => $time,
+ 'laboratory' => $this,
+ 'planet' => $this->_currentPlanet,
+ 'user' => $this->_currentUser
+ ));
+
+ return $this;
+ }
+
+ /**
+ * Update the contruction queue.
+ *
+ * @return Legacies_Empire_Model_Planet_Building_ResearchLab
+ */
+ public function updateQueue($time = null)
+ {
+ if ($time === null) {
+ $time = Legacies::now();
+ }
+
+ // Dispatch event
+ Legacies::dispatchEvent($this->_eventPrefix . 'update-queue.before', array(
+ 'time' => &$time,
+ 'laboratory' => $this,
+ 'planet' => $this->_currentPlanet,
+ 'user' => $this->_currentUser
+ ));
+
+ $this->_builder->updateQueue($time);
+
+ // Dispatch event
+ Legacies::dispatchEvent($this->_eventPrefix . 'update-queue.after', array(
+ 'time' => $time,
+ 'laboratory' => $this,
+ 'planet' => $this->_currentPlanet,
+ 'user' => $this->_currentUser
+ ));
+
+ return $this;
+ }
+
+ /**
+ * Return the construction queue
+ * @see Legacies_Empire_Model_Planet_Building_ResearchLab_Builder
+ *
+ * @return array
+ */
+ public function getBuilder()
+ {
+ return $this->_builder;
+ }
+
+ /**
+ * Check if a ship or defense type is actually buildable on the current
+ * planet, depending on the technology and buildings requirements.
+ *
+ * @param int $resourceId
+ * @return bool
+ */
+ public function checkAvailability($resourceId)
+ {
+ try {
+ // Dispatch event
+ Legacies::dispatchEvent($this->_eventPrefix . 'check-availability', array(
+ 'research_id' => $resourceId,
+ 'laboratory' => $this,
+ 'planet' => $this->_currentPlanet,
+ 'user' => $this->_currentUser
+ ));
+ } catch (Legacies_Core_Event_Break $e) {
+ return false;
+ }
+
+ return $this->_builder->checkAvailability($resourceId);
+ }
+
+ public function getResourcesNeeded($resourceId, $level)
+ {
+ return $this->_builder->getResourcesNeeded($resourceId, $level);
+ }
+
+ public function getBuildingTime($resourceId, $level)
+ {
+ $this->_builder->getBuildingTime($resourceId, $level);
+ }
+
+ public static function planetUpdateListener($eventData)
+ {
+ if (isset($eventData['planet'])) {
+ $planet = $eventData['planet'];
+
+ if ($planet === null || !$planet instanceof Legacies_Empire_Model_Planet || !$planet->getId()) {
+ return;
+ }
+
+ $time = null;
+ if (isset($eventData['time'])) {
+ $time = $eventData['time'];
+ }
+
+ $shipyard = $planet->getResearchLab();
+ if ($shipyard !== null) {
+ $shipyard->updateQueue();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/includes/application/code/core/Legacies/Empire/Model/Planet/Building/ResearchLab/Builder.php b/includes/application/code/core/Legacies/Empire/Model/Planet/Building/ResearchLab/Builder.php
new file mode 100644
index 0000000..eff9d4a
--- /dev/null
+++ b/includes/application/code/core/Legacies/Empire/Model/Planet/Building/ResearchLab/Builder.php
@@ -0,0 +1,206 @@
+_unserializeQueue($this->_currentUser->getData('b_laboratory_id'));
+ }
+
+ /**
+ * @param int $buildingId
+ * @param int $level
+ * @param int $time
+ */
+ public function _initItem()
+ {
+ $technologyId = func_get_arg(0);
+ $level = func_get_arg(1);
+ $time = func_get_arg(2);
+
+ return new Legacies_Empire_Model_Planet_Building_ResearchLab_Item(array(
+ 'technology_id' => $technologyId,
+ 'level' => $level,
+ 'created_at' => $time,
+ 'updated_at' => $time
+ ));
+ }
+
+ /**
+ * Check if a technology type is actually buildable on the current
+ * planet, depending on the technology and buildings requirements.
+ *
+ * @param int $technologyId
+ * @return bool
+ */
+ public function checkAvailability($technologyId)
+ {
+ $types = Legacies_Empire_Model_Game_Types::getSingleton();
+
+ if (!$types->is($technologyId, Legacies_Empire::TYPE_RESEARCH)) {
+ return false;
+ }
+
+ parent::checkAvailability($technologyId);
+
+ return true;
+ }
+
+ /**
+ * Returns the time needed to build $level of $technologyId
+ *
+ * @param int $technologyId
+ * @param int $level
+ */
+ public function getBuildingTime($technologyId, $level)
+ {
+ $prices = Legacies_Empire_Model_Game_Prices::getSingleton();
+ $types = Legacies_Empire_Model_Game_Types::getSingleton();
+ $gameConfig = Legacies_Core_Model_Config::getSingleton();
+
+ Math::setPrecision(50);
+
+ // FIXME: Resource dependency
+ $totalCost = Math::mul(Math::add($prices[$technologyId][Legacies_Empire::RESOURCE_METAL], $prices[$technologyId][Legacies_Empire::RESOURCE_CRISTAL]), $level);
+ $speedFactor = $gameConfig->getData('game_speed');
+
+ // FIXME: Building & Technology dependency
+ $extraLaboratoriesLevels = 0;
+ $researchNetworkLevel = $this->_currentUser->getElement(Legacies_Empire::ID_RESEARCH_INTERGALACTIC_RESEARCH_NETWORK);
+ if ($researchNetworkLevel > 0) {
+ $laboratoriesLevels = array();
+ foreach ($this->_currentUser->getPlanetCollection() as $planet) {
+ if ($this->_currentPlanet->getId() == $planet->getId()) {
+ continue;
+ }
+ $level = $planet->getElement(Legacies_Empire::ID_BUILDING_RESEARCH_LAB);
+ if ($level > 0) {
+ $laboratoriesLevels[] = (int) $level;
+ }
+ }
+ sort($laboratoriesLevels, SORT_NUMERIC);
+ $extraLaboratoriesLevels = array_sum(array_slice(array_reverse($laboratoriesLevels), 0, $researchNetworkLevel));
+ }
+
+ $laboratorySpeedup = Math::div($totalCost, ($this->_currentPlanet->getElement(Legacies_Empire::ID_BUILDING_RESEARCH_LAB) + 1 + $extraLaboratoriesLevels));
+
+ Math::setPrecision();
+
+ $baseTime = ($totalCost / $speedFactor) * $laboratorySpeedup;
+
+ return (int) Math::floor($baseTime * 3600);
+ }
+
+ /**
+ * (non-PHPdoc)
+ * @see Legacies_Empire_Model_BuilderAbstract::getResourcesNeeded()
+ */
+ public function getResourcesNeeded($technologyId, $level)
+ {
+ $prices = Legacies_Empire_Model_Game_Prices::getSingleton();
+ $resources = Legacies_Empire_Model_Game_Resources::getSingleton();
+
+ if (!isset($prices[$technologyId])) {
+ return array();
+ }
+ $resourcesNeeded = array();
+ foreach ($resources as $resourceId => $resourceConfig) {
+ if (!isset($prices[$technologyId][$resourceId])) {
+ continue;
+ }
+ if (Math::isPositive($prices[$technologyId][$resourceId])) {
+ $firstLevelCost = $prices[$technologyId][$resourceId];
+ $partialLevelCost = Math::mul($firstLevelCost, Math::pow($prices[$technologyId][Legacies_Empire::RESOURCE_MULTIPLIER], $level));
+ $resourcesNeeded[$resourceId] = Math::sub($partialLevelCost, $firstLevelCost);
+ }
+ }
+
+ return $resourcesNeeded;
+ }
+
+ /**
+ * Update the contruction queue.
+ *
+ * @return Legacies_Empire_Model_Planet_Building_ResearchLab
+ */
+ public function updateQueue($time)
+ {
+ $fields = Legacies_Empire_Model_Game_FieldsAlias::getSingleton();
+
+ $elapsedTime = $time - $this->_currentUser->getData('b_laboratory');
+
+ foreach ($this->getQueue() as $element) {
+ $technologyId = $element->getData('research_id');
+ $level = $element->getData('level');
+ $buildTime = $this->getBuildingTime($technologyId, $level);
+
+ if ($elapsedTime >= $buildTime) {
+ $this->_currentUser[$fields[$technologyId]] = Math::add($this->_currentUser[$fields[$technologyId]], $level);
+ $elapsedTime -= $buildTime;
+ $this->dequeue($element);
+ continue;
+ }
+
+ $timeRatio = $elapsedTime / $buildTime;
+ $itemsBuilt = Math::mul($timeRatio, $level);
+
+ $element->setData('updated_at', $time);
+ $element->setData('level', Math::sub($level, $itemsBuilt));
+ $this->_currentUser->setData($fields[$technologyId], Math::add($this->_currentUser->getData($fields[$technologyId]), $itemsBuilt));
+ break;
+ }
+
+ $this->_currentUser->setData('b_laboratory_id', $this->serialize());
+ $this->_currentUser->setData('b_laboratory', $time);
+
+ return $this;
+ }
+
+ /**
+ * Append items to build to the construction list
+ *
+ * @param int $technologyId
+ * @param int|string $level
+ * @return Legacies_Empire_Model_Planet_Building_ResearchLab
+ */
+ public function appendQueue($technologyId, $level, $time)
+ {
+ if ($this->_maxLength > 0 && $this->count() >= $this->_maxLength) {
+ return $this;
+ }
+
+ if (!Math::isPositive($level)) {
+ return $this;
+ }
+
+ $types = Legacies_Empire_Model_Game_Types::getSingleton();
+ if (!$types->is($technologyId, Legacies_Empire::TYPE_RESEARCH)) {
+ return $this;
+ }
+
+ if (!$this->checkAvailability($technologyId)) {
+ return $this;
+ }
+
+ $resourcesNeeded = $this->getResourcesNeeded($technologyId, $level);
+ $remainingAmounts = $this->_calculateResourceRemainingAmounts($resourcesNeeded);
+ if ($remainingAmounts === false) {
+ return $this;
+ }
+
+ $this->enqueue($technologyId, $level, $time);
+ $this->_currentUser->setData('b_laboratory_id', $this->serialize());
+
+ foreach ($remainingAmounts as $resourceId => $resourceAmount) {
+ $this->_currentPlanet[$resourceId] = $resourceAmount;
+ }
+
+ return $this;
+ }
+};
\ No newline at end of file
diff --git a/includes/application/code/core/Legacies/Empire/Model/Planet/Building/ResearchLab/Item.php b/includes/application/code/core/Legacies/Empire/Model/Planet/Building/ResearchLab/Item.php
new file mode 100644
index 0000000..eafe814
--- /dev/null
+++ b/includes/application/code/core/Legacies/Empire/Model/Planet/Building/ResearchLab/Item.php
@@ -0,0 +1,6 @@
+_unserializeQueue($this->_currentPlanet->getData('b_hangar_id'));
@@ -250,13 +255,15 @@ class Legacies_Empire_Model_Planet_Building_Shipyard_Builder
*/
public function appendQueue($shipId, $qty, $time)
{
- $types = Legacies_Empire_Model_Game_Types::getSingleton();
- $resources = Legacies_Empire_Model_Game_Resources::getSingleton();
+ if ($this->_maxLength > 0 && $this->count() >= $this->_maxLength) {
+ return $this;
+ }
if (!Math::isPositive($qty)) {
return $this;
}
+ $types = Legacies_Empire_Model_Game_Types::getSingleton();
if (!$types->is($shipId, Legacies_Empire::TYPE_SHIP) && !$types->is($shipId, Legacies_Empire::TYPE_DEFENSE)) {
return $this;
}
@@ -276,19 +283,18 @@ class Legacies_Empire_Model_Planet_Building_Shipyard_Builder
}
$resourcesNeeded = $this->getResourcesNeeded($shipId, $qty);
- $buildTime = $this->getBuildingTime($shipId, $qty);
-
- $this->enqueue($shipId, $qty, $time);
-
- foreach ($resources as $resourceId => $resourceConfig) {
- if (!isset($resourcesNeeded[$resourceId])) {
- continue;
- }
- $this->_currentPlanet[$resourceId] = Math::sub($this->_currentPlanet[$resourceId], $resourcesNeeded[$resourceId]);
+ $remainingAmounts = $this->_calculateResourceRemainingAmounts($resourcesNeeded);
+ if ($remainingAmounts === false) {
+ return $this;
}
+ $this->enqueue($shipId, $qty, $time);
$this->_currentPlanet->setData('b_hangar_id', $this->serialize());
+ foreach ($remainingAmounts as $resourceId => $resourceAmount) {
+ $this->_currentPlanet[$resourceId] = $resourceAmount;
+ }
+
return $this;
}
-};
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/includes/application/design/layouts/empire.php b/includes/application/design/layouts/empire.php
index e7f8f71..5a99e97 100644
--- a/includes/application/design/layouts/empire.php
+++ b/includes/application/design/layouts/empire.php
@@ -42,5 +42,59 @@
)
)
)
+ ),
+
+ 'planet.buildings' => array(
+ 'update' => '1column',
+ 'reference' => array(
+ 'content' => array(
+ 'children' => array(
+ 'topnav' => array(
+ 'type' => 'empire/topnav',
+ 'template' => 'empire/topnav.phtml',
+ ),
+ 'queue' => array(
+ 'type' => 'core/template',
+ 'template' => 'empire/planet/buildings/queue.phtml'
+ ),
+ 'item-list' => array(
+ 'type' => 'core/template',
+ 'template' => 'empire/planet/buildings.phtml',
+ 'children' => array(
+ 'item-list.items' => array(
+ 'type' => 'core/concat'
+ ),
+ )
+ ),
+ )
+ )
+ )
+ ),
+
+ 'planet.shipyard' => array(
+ 'update' => '1column',
+ 'reference' => array(
+ 'content' => array(
+ 'children' => array(
+ 'topnav' => array(
+ 'type' => 'empire/topnav',
+ 'template' => 'empire/topnav.phtml',
+ ),
+ 'item-list' => array(
+ 'type' => 'core/template',
+ 'template' => 'empire/planet/shipyard.phtml',
+ 'children' => array(
+ 'item-list.items' => array(
+ 'type' => 'core/concat'
+ ),
+ )
+ ),
+ 'queue' => array(
+ 'type' => 'core/template',
+ 'template' => 'empire/planet/shipyard/queue.phtml'
+ ),
+ )
+ )
+ )
)
);
diff --git a/includes/application/design/layouts/page.php b/includes/application/design/layouts/page.php
index 40349cc..0b42b02 100644
--- a/includes/application/design/layouts/page.php
+++ b/includes/application/design/layouts/page.php
@@ -117,4 +117,18 @@
)
)
),
+
+ 'message' => array(
+ 'update' => 'default',
+ 'reference' => array(
+ 'content' => array(
+ 'children' => array(
+ 'message' => array(
+ 'type' => 'core/template',
+ 'template' => 'page/html/message.phtml'
+ ),
+ )
+ )
+ )
+ )
);
diff --git a/templates/OpenGame/add_declare.tpl b/includes/application/design/scripts/deprecated/add_declare.tpl
similarity index 87%
rename from templates/OpenGame/add_declare.tpl
rename to includes/application/design/scripts/deprecated/add_declare.tpl
index d69479e..cc69eb6 100644
--- a/templates/OpenGame/add_declare.tpl
+++ b/includes/application/design/scripts/deprecated/add_declare.tpl
@@ -20,7 +20,7 @@
Raison du multicompte
-
+
diff --git a/includes/application/design/scripts/deprecated/admin/activeplanet_body.tpl b/includes/application/design/scripts/deprecated/admin/activeplanet_body.tpl
new file mode 100644
index 0000000..3611777
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/activeplanet_body.tpl
@@ -0,0 +1,12 @@
+
+
getData('adm_pl_title')?>
+
+
getData('adm_pl_activ')?>
+
+
getData('adm_pl_name')?>
+
getData('adm_pl_posit')?>
+
getData('adm_pl_point')?>
+
getData('adm_pl_since')?>
+
+ getData('online_list')?>
+
\ No newline at end of file
diff --git a/templates/OpenGame/admin/add_money.tpl b/includes/application/design/scripts/deprecated/admin/add_money.tpl
similarity index 51%
rename from templates/OpenGame/admin/add_money.tpl
rename to includes/application/design/scripts/deprecated/admin/add_money.tpl
index 68a2fd8..b4a5b20 100644
--- a/templates/OpenGame/admin/add_money.tpl
+++ b/includes/application/design/scripts/deprecated/admin/add_money.tpl
@@ -1,25 +1,25 @@
-
{adm_am_ttle}
+
getData('adm_am_ttle')?>
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/admin/admin_panel_asw1.tpl b/includes/application/design/scripts/deprecated/admin/admin_panel_asw1.tpl
new file mode 100644
index 0000000..4ee9497
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/admin_panel_asw1.tpl
@@ -0,0 +1,32 @@
+
+
+
+
+
getData('adm_panel_mnu')?>
+
+
getData('adm_frm1_id')?>
+
getData('answer1')?>
+
+
getData('adm_frm1_name')?>
+
getData('answer2')?>
+
+
getData('adm_frm1_ip')?>
+
getData('answer3')?>
+
+
getData('adm_frm1_mail')?>
+
getData('answer4')?>
+
+
getData('adm_frm1_acc')?>
+
getData('answer5')?>
+
+
getData('adm_frm1_gen')?>
+
getData('answer6')?>
+
+
getData('adm_frm1_main')?>
+
getData('answer7')?>
+
+
getData('adm_frm1_gpos')?>
+
getData('answer8')?>
+
+
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/admin/admin_panel_asw2.tpl b/includes/application/design/scripts/deprecated/admin/admin_panel_asw2.tpl
new file mode 100644
index 0000000..19c4d09
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/admin_panel_asw2.tpl
@@ -0,0 +1,9 @@
+
+
\ No newline at end of file
diff --git a/templates/OpenGame/admin/admin_panel_frm1.tpl b/includes/application/design/scripts/deprecated/admin/admin_panel_frm1.tpl
similarity index 51%
rename from templates/OpenGame/admin/admin_panel_frm1.tpl
rename to includes/application/design/scripts/deprecated/admin/admin_panel_frm1.tpl
index f7ea491..1df3696 100644
--- a/templates/OpenGame/admin/admin_panel_frm1.tpl
+++ b/includes/application/design/scripts/deprecated/admin/admin_panel_frm1.tpl
@@ -3,14 +3,14 @@
diff --git a/templates/OpenGame/admin/admin_panel_frm2.tpl b/includes/application/design/scripts/deprecated/admin/admin_panel_frm2.tpl
similarity index 51%
rename from templates/OpenGame/admin/admin_panel_frm2.tpl
rename to includes/application/design/scripts/deprecated/admin/admin_panel_frm2.tpl
index faa83a1..9b469a3 100644
--- a/templates/OpenGame/admin/admin_panel_frm2.tpl
+++ b/includes/application/design/scripts/deprecated/admin/admin_panel_frm2.tpl
@@ -3,14 +3,14 @@
diff --git a/includes/application/design/scripts/deprecated/admin/admin_panel_frm3.tpl b/includes/application/design/scripts/deprecated/admin/admin_panel_frm3.tpl
new file mode 100644
index 0000000..4a8b32d
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/admin_panel_frm3.tpl
@@ -0,0 +1,22 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/templates/OpenGame/admin/admin_panel_frm4.tpl b/includes/application/design/scripts/deprecated/admin/admin_panel_frm4.tpl
similarity index 51%
rename from templates/OpenGame/admin/admin_panel_frm4.tpl
rename to includes/application/design/scripts/deprecated/admin/admin_panel_frm4.tpl
index 74854d1..6c95e4f 100644
--- a/templates/OpenGame/admin/admin_panel_frm4.tpl
+++ b/includes/application/design/scripts/deprecated/admin/admin_panel_frm4.tpl
@@ -3,14 +3,14 @@
diff --git a/includes/application/design/scripts/deprecated/admin/admin_panel_main.tpl b/includes/application/design/scripts/deprecated/admin/admin_panel_main.tpl
new file mode 100644
index 0000000..d3dee49
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/admin_panel_main.tpl
@@ -0,0 +1,16 @@
+
+getData('adm_sub_form1')?>
+getData('adm_sub_form2')?>
+getData('adm_sub_form3')?>
diff --git a/templates/OpenGame/admin/banadni.tpl b/includes/application/design/scripts/deprecated/admin/banadni.tpl
similarity index 100%
rename from templates/OpenGame/admin/banadni.tpl
rename to includes/application/design/scripts/deprecated/admin/banadni.tpl
diff --git a/includes/application/design/scripts/deprecated/admin/banned.tpl b/includes/application/design/scripts/deprecated/admin/banned.tpl
new file mode 100644
index 0000000..750e6e5
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/banned.tpl
@@ -0,0 +1,32 @@
+
+
getData('adm_bn_ttle')?>
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/admin/changepass.tpl b/includes/application/design/scripts/deprecated/admin/changepass.tpl
new file mode 100644
index 0000000..5b94f8c
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/changepass.tpl
@@ -0,0 +1,16 @@
+
+
getData('md5_title')?>
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/admin/chat_body.tpl b/includes/application/design/scripts/deprecated/admin/chat_body.tpl
new file mode 100644
index 0000000..bc85811
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/chat_body.tpl
@@ -0,0 +1,14 @@
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/admin/credit_body.tpl b/includes/application/design/scripts/deprecated/admin/credit_body.tpl
new file mode 100644
index 0000000..2aaded4
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/credit_body.tpl
@@ -0,0 +1,29 @@
+
+
getData('cred_ext')?>
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/admin/declarelist_rows.tpl b/includes/application/design/scripts/deprecated/admin/declarelist_rows.tpl
new file mode 100644
index 0000000..7ec5c08
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/declarelist_rows.tpl
@@ -0,0 +1,9 @@
+
+
getData('adm_ul_data_id')?>
+
getData('adm_ul_data_name')?>
+
getData('adm_ul_data_mail')?>
+
getData('adm_ul_data_adip')?>
+
getData('adm_ul_data_detai')?>
+
getData('adm_ul_data_regd')?>
+
+
\ No newline at end of file
diff --git a/templates/OpenGame/admin/deletuser.tpl b/includes/application/design/scripts/deprecated/admin/deletuser.tpl
similarity index 59%
rename from templates/OpenGame/admin/deletuser.tpl
rename to includes/application/design/scripts/deprecated/admin/deletuser.tpl
index e4f3c4a..e954617 100644
--- a/templates/OpenGame/admin/deletuser.tpl
+++ b/includes/application/design/scripts/deprecated/admin/deletuser.tpl
@@ -1,6 +1,6 @@
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/admin/errors_body.tpl b/includes/application/design/scripts/deprecated/admin/errors_body.tpl
new file mode 100644
index 0000000..b2a1830
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/errors_body.tpl
@@ -0,0 +1,14 @@
+
\ No newline at end of file
diff --git a/templates/OpenGame/admin/exec_query.tpl b/includes/application/design/scripts/deprecated/admin/exec_query.tpl
similarity index 50%
rename from templates/OpenGame/admin/exec_query.tpl
rename to includes/application/design/scripts/deprecated/admin/exec_query.tpl
index 496b625..eb767d4 100644
--- a/templates/OpenGame/admin/exec_query.tpl
+++ b/includes/application/design/scripts/deprecated/admin/exec_query.tpl
@@ -1,13 +1,13 @@
-
{Qry_title}
+
getData('Qry_title')?>
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/admin/message_body.tpl b/includes/application/design/scripts/deprecated/admin/message_body.tpl
new file mode 100644
index 0000000..027d4e2
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/message_body.tpl
@@ -0,0 +1,8 @@
+
+
+
+
getData('title')?>
+
+
getData('mes')?>
+
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/admin/messagelist_body.tpl b/includes/application/design/scripts/deprecated/admin/messagelist_body.tpl
new file mode 100644
index 0000000..ab64802
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/messagelist_body.tpl
@@ -0,0 +1,48 @@
+getData('mlst_scpt')?>
+
+
getData('mlst_title')?>
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/admin/messagelist_table_rows.tpl b/includes/application/design/scripts/deprecated/admin/messagelist_table_rows.tpl
new file mode 100644
index 0000000..464d7a0
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/messagelist_table_rows.tpl
@@ -0,0 +1,8 @@
+
+
+
getData('mlst_id')?>
+
getData('mlst_time')?>
+
getData('mlst_from')?>
+
getData('mlst_to')?>
+
getData('mlst_text')?>
+
\ No newline at end of file
diff --git a/templates/OpenGame/admin/messall_body.tpl b/includes/application/design/scripts/deprecated/admin/messall_body.tpl
similarity index 100%
rename from templates/OpenGame/admin/messall_body.tpl
rename to includes/application/design/scripts/deprecated/admin/messall_body.tpl
diff --git a/templates/OpenGame/admin/moonlist_body.tpl b/includes/application/design/scripts/deprecated/admin/moonlist_body.tpl
similarity index 89%
rename from templates/OpenGame/admin/moonlist_body.tpl
rename to includes/application/design/scripts/deprecated/admin/moonlist_body.tpl
index 9c13d69..fa60c9b 100644
--- a/templates/OpenGame/admin/moonlist_body.tpl
+++ b/includes/application/design/scripts/deprecated/admin/moonlist_body.tpl
@@ -12,5 +12,5 @@
Système
Planète
-{moon}
+getData('moon')?>
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/admin/multi_body.tpl b/includes/application/design/scripts/deprecated/admin/multi_body.tpl
new file mode 100644
index 0000000..090ca75
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/multi_body.tpl
@@ -0,0 +1,15 @@
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/admin/multi_rows.tpl b/includes/application/design/scripts/deprecated/admin/multi_rows.tpl
new file mode 100644
index 0000000..d2a434c
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/multi_rows.tpl
@@ -0,0 +1,4 @@
+
+
getData('player')?>
+
getData('text')?>
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/admin/options_body.tpl b/includes/application/design/scripts/deprecated/admin/options_body.tpl
new file mode 100644
index 0000000..fb92f13
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/options_body.tpl
@@ -0,0 +1,135 @@
+
+
getData('adm_opt_title')?>
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/admin/overview_body.tpl b/includes/application/design/scripts/deprecated/admin/overview_body.tpl
new file mode 100644
index 0000000..bcc3642
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/overview_body.tpl
@@ -0,0 +1,35 @@
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/admin/overview_rows.tpl b/includes/application/design/scripts/deprecated/admin/overview_rows.tpl
new file mode 100644
index 0000000..9fe70e9
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/overview_rows.tpl
@@ -0,0 +1,15 @@
+
\ No newline at end of file
diff --git a/templates/OpenGame/admin/planetlist_body.tpl b/includes/application/design/scripts/deprecated/admin/planetlist_body.tpl
similarity index 87%
rename from templates/OpenGame/admin/planetlist_body.tpl
rename to includes/application/design/scripts/deprecated/admin/planetlist_body.tpl
index 0153391..1418ff0 100644
--- a/templates/OpenGame/admin/planetlist_body.tpl
+++ b/includes/application/design/scripts/deprecated/admin/planetlist_body.tpl
@@ -11,5 +11,5 @@
Système
Planète
-{planetes}
+getData('planetes')?>
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/admin/reset_body.tpl b/includes/application/design/scripts/deprecated/admin/reset_body.tpl
new file mode 100644
index 0000000..25e154f
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/reset_body.tpl
@@ -0,0 +1,16 @@
+
+
getData('adm_rz_ttle')?>
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/admin/simple_header.tpl b/includes/application/design/scripts/deprecated/admin/simple_header.tpl
new file mode 100644
index 0000000..5bd4ade
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/simple_header.tpl
@@ -0,0 +1,10 @@
+
+
+getData('title')?>
+
+
+
+getData('META_TAG')?>
+
+
+
diff --git a/templates/OpenGame/admin/unbanned.tpl b/includes/application/design/scripts/deprecated/admin/unbanned.tpl
similarity index 88%
rename from templates/OpenGame/admin/unbanned.tpl
rename to includes/application/design/scripts/deprecated/admin/unbanned.tpl
index 01d257f..22a4f43 100644
--- a/templates/OpenGame/admin/unbanned.tpl
+++ b/includes/application/design/scripts/deprecated/admin/unbanned.tpl
@@ -7,7 +7,7 @@
Joueur à débannir
-
{Name}
+
getData('Name')?>
diff --git a/includes/application/design/scripts/deprecated/admin/userlist_body.tpl b/includes/application/design/scripts/deprecated/admin/userlist_body.tpl
new file mode 100644
index 0000000..7261903
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/userlist_body.tpl
@@ -0,0 +1,24 @@
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/admin/userlist_rows.tpl b/includes/application/design/scripts/deprecated/admin/userlist_rows.tpl
new file mode 100644
index 0000000..5615768
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/userlist_rows.tpl
@@ -0,0 +1,13 @@
+
+
getData('adm_ul_data_id')?>
+
getData('adm_ul_data_name')?>
+
getData('adm_ul_data_mail')?>
+
getData('ip_adress_at_register')?>
+
getData('adm_ul_data_adip')?>
+
getData('adm_ul_data_regd')?>
+
getData('adm_ul_data_lconn')?>
+
getData('adm_ul_data_banna')?>
+
getData('adm_ul_data_detai')?>
+
getData('adm_ul_data_actio')?>
+
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/admin/variables_body.tpl b/includes/application/design/scripts/deprecated/admin/variables_body.tpl
new file mode 100644
index 0000000..cb4cf50
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/variables_body.tpl
@@ -0,0 +1,2 @@
+
+
getData('phpinfo')?>
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/admin/variables_rows.tpl b/includes/application/design/scripts/deprecated/admin/variables_rows.tpl
new file mode 100644
index 0000000..4b09679
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/admin/variables_rows.tpl
@@ -0,0 +1,6 @@
+
+
+
getData('prot_serv')?>
+
getData('serv_protocol')?>
+
+
\ No newline at end of file
diff --git a/templates/OpenGame/agreement.tpl b/includes/application/design/scripts/deprecated/agreement.tpl
similarity index 100%
rename from templates/OpenGame/agreement.tpl
rename to includes/application/design/scripts/deprecated/agreement.tpl
diff --git a/includes/application/design/scripts/deprecated/alliance_admin.tpl b/includes/application/design/scripts/deprecated/alliance_admin.tpl
new file mode 100644
index 0000000..f0bb5d4
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/alliance_admin.tpl
@@ -0,0 +1,85 @@
+
+
+
+
diff --git a/includes/application/design/scripts/deprecated/alliance_admin_rename.tpl b/includes/application/design/scripts/deprecated/alliance_admin_rename.tpl
new file mode 100644
index 0000000..b54edf3
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/alliance_admin_rename.tpl
@@ -0,0 +1,15 @@
+
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/alliance_admin_rename1.tpl b/includes/application/design/scripts/deprecated/alliance_admin_rename1.tpl
new file mode 100644
index 0000000..ac41ab2
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/alliance_admin_rename1.tpl
@@ -0,0 +1,15 @@
+
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/alliance_admin_rename2.tpl b/includes/application/design/scripts/deprecated/alliance_admin_rename2.tpl
new file mode 100644
index 0000000..dbf9e6a
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/alliance_admin_rename2.tpl
@@ -0,0 +1,15 @@
+
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/alliance_admin_request_form.tpl b/includes/application/design/scripts/deprecated/alliance_admin_request_form.tpl
new file mode 100644
index 0000000..f774472
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/alliance_admin_request_form.tpl
@@ -0,0 +1,27 @@
+
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/alliance_admin_request_row.tpl b/includes/application/design/scripts/deprecated/alliance_admin_request_row.tpl
new file mode 100644
index 0000000..017a54e
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/alliance_admin_request_row.tpl
@@ -0,0 +1,5 @@
+
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/alliance_admin_request_table.tpl b/includes/application/design/scripts/deprecated/alliance_admin_request_table.tpl
new file mode 100644
index 0000000..42d559d
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/alliance_admin_request_table.tpl
@@ -0,0 +1,18 @@
+
+
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/alliance_apply_waitform.tpl b/includes/application/design/scripts/deprecated/alliance_apply_waitform.tpl
new file mode 100644
index 0000000..be6abb8
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/alliance_apply_waitform.tpl
@@ -0,0 +1,15 @@
+
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/alliance_applyform.tpl b/includes/application/design/scripts/deprecated/alliance_applyform.tpl
new file mode 100644
index 0000000..93df14c
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/alliance_applyform.tpl
@@ -0,0 +1,25 @@
+
+
getData('Send_Apply')?>
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/alliance_circular.tpl b/includes/application/design/scripts/deprecated/alliance_circular.tpl
new file mode 100644
index 0000000..bbb6e1c
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/alliance_circular.tpl
@@ -0,0 +1,30 @@
+
+
diff --git a/includes/application/design/scripts/deprecated/alliance_circular_form.tpl b/includes/application/design/scripts/deprecated/alliance_circular_form.tpl
new file mode 100644
index 0000000..3b4e233
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/alliance_circular_form.tpl
@@ -0,0 +1,30 @@
+
+
diff --git a/includes/application/design/scripts/deprecated/alliance_defaultmenu.tpl b/includes/application/design/scripts/deprecated/alliance_defaultmenu.tpl
new file mode 100644
index 0000000..27cae6a
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/alliance_defaultmenu.tpl
@@ -0,0 +1,11 @@
+
+
diff --git a/includes/application/design/scripts/deprecated/alliance_searchform.tpl b/includes/application/design/scripts/deprecated/alliance_searchform.tpl
new file mode 100644
index 0000000..34a41b3
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/alliance_searchform.tpl
@@ -0,0 +1,10 @@
+
+
+
+
getData('search_alliance')?>
+
+
+
getData('Search')?>
+
+
+
diff --git a/includes/application/design/scripts/deprecated/alliance_searchresult_row.tpl b/includes/application/design/scripts/deprecated/alliance_searchresult_row.tpl
new file mode 100644
index 0000000..b6746fd
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/alliance_searchresult_row.tpl
@@ -0,0 +1,6 @@
+
+
+
getData('ally_tag')?>
+
getData('ally_name')?>
+
getData('ally_members')?>
+
diff --git a/includes/application/design/scripts/deprecated/alliance_searchresult_table.tpl b/includes/application/design/scripts/deprecated/alliance_searchresult_table.tpl
new file mode 100644
index 0000000..af2fa98
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/alliance_searchresult_table.tpl
@@ -0,0 +1,10 @@
+
+
+
+
getData('searched_alliance_availables')?>
+
+
+getData('result')?>
+
+
+
diff --git a/includes/application/design/scripts/deprecated/banned_body.tpl b/includes/application/design/scripts/deprecated/banned_body.tpl
new file mode 100644
index 0000000..5a0e9bd
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/banned_body.tpl
@@ -0,0 +1,13 @@
+
+
+
+
getData('ban_title')?>
+
+
getData('ban_name')?>
+
getData('ban_reason')?>
+
getData('ban_from')?>
+
getData('ban_to')?>
+
getData('ban_by')?>
+
+getData('banned')?>
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/buildings_builds.tpl b/includes/application/design/scripts/deprecated/buildings_builds.tpl
new file mode 100644
index 0000000..d6085b8
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/buildings_builds.tpl
@@ -0,0 +1,15 @@
+
\ No newline at end of file
diff --git a/templates/OpenGame/buildings_builds_queue_script.tpl b/includes/application/design/scripts/deprecated/buildings_builds_queue_script.tpl
similarity index 73%
rename from templates/OpenGame/buildings_builds_queue_script.tpl
rename to includes/application/design/scripts/deprecated/buildings_builds_queue_script.tpl
index 0994db3..7d042ac 100644
--- a/templates/OpenGame/buildings_builds_queue_script.tpl
+++ b/includes/application/design/scripts/deprecated/buildings_builds_queue_script.tpl
@@ -1,22 +1,22 @@
\ No newline at end of file
diff --git a/templates/OpenGame/buildings_defense.tpl b/includes/application/design/scripts/deprecated/buildings_defense.tpl
similarity index 66%
rename from templates/OpenGame/buildings_defense.tpl
rename to includes/application/design/scripts/deprecated/buildings_defense.tpl
index 26a875c..ee402c5 100644
--- a/templates/OpenGame/buildings_defense.tpl
+++ b/includes/application/design/scripts/deprecated/buildings_defense.tpl
@@ -5,9 +5,9 @@
@@ -15,5 +15,5 @@
-{buildinglist}
+getData('buildinglist')?>
\ No newline at end of file
diff --git a/templates/OpenGame/buildings_fleet.tpl b/includes/application/design/scripts/deprecated/buildings_fleet.tpl
similarity index 66%
rename from templates/OpenGame/buildings_fleet.tpl
rename to includes/application/design/scripts/deprecated/buildings_fleet.tpl
index 73b2098..0ab1b2f 100644
--- a/templates/OpenGame/buildings_fleet.tpl
+++ b/includes/application/design/scripts/deprecated/buildings_fleet.tpl
@@ -5,9 +5,9 @@
@@ -15,5 +15,5 @@
-{buildinglist}
+getData('buildinglist')?>
\ No newline at end of file
diff --git a/templates/OpenGame/buildings_research.tpl b/includes/application/design/scripts/deprecated/buildings_research.tpl
similarity index 50%
rename from templates/OpenGame/buildings_research.tpl
rename to includes/application/design/scripts/deprecated/buildings_research.tpl
index bdfe6e0..080cc49 100644
--- a/templates/OpenGame/buildings_research.tpl
+++ b/includes/application/design/scripts/deprecated/buildings_research.tpl
@@ -1,12 +1,12 @@
-{noresearch}
+getData('noresearch')?>
- {technolist}
+ getData('technolist')?>
diff --git a/includes/application/design/scripts/deprecated/buildings_research_row.tpl b/includes/application/design/scripts/deprecated/buildings_research_row.tpl
new file mode 100644
index 0000000..a7247a3
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/buildings_research_row.tpl
@@ -0,0 +1,15 @@
+
\ No newline at end of file
diff --git a/templates/OpenGame/buildings_research_script.tpl b/includes/application/design/scripts/deprecated/buildings_research_script.tpl
similarity index 59%
rename from templates/OpenGame/buildings_research_script.tpl
rename to includes/application/design/scripts/deprecated/buildings_research_script.tpl
index 4ca6f64..af1cb87 100644
--- a/templates/OpenGame/buildings_research_script.tpl
+++ b/includes/application/design/scripts/deprecated/buildings_research_script.tpl
@@ -4,18 +4,18 @@ v = new Date();
var brp = document.getElementById('brp');
function t(){
n = new Date();
- ss = {tech_time};
+ ss = getData('tech_time')?>;
s = ss - Math.round( (n.getTime() - v.getTime()) / 1000.);
m = 0;
h = 0;
if ( s < 0 ) {
- brp.innerHTML = '{ready} {continue}';
+ brp.innerHTML = 'getData('ready')?> getData('tech_home')?>>getData('continue')?>';
} else {
if ( s > 59 ) { m = Math.floor( s / 60 ); s = s - m * 60; }
if ( m > 59 ) { h = Math.floor( m / 60 ); m = m - h * 60; }
if ( s < 10 ) { s = "0" + s }
if ( m < 10 ) { m = "0" + m }
- brp.innerHTML = h + ':' + m + ':' + s + ' {cancel} {tech_name}';
+ brp.innerHTML = h + ':' + m + ':' + s + ' getData('tech_id')?>>getData('cancel')?> getData('tech_name')?>';
}
window.setTimeout("t();",999);
}
diff --git a/templates/OpenGame/buildings_script.tpl b/includes/application/design/scripts/deprecated/buildings_script.tpl
similarity index 95%
rename from templates/OpenGame/buildings_script.tpl
rename to includes/application/design/scripts/deprecated/buildings_script.tpl
index 4ec624e..9e251a6 100644
--- a/templates/OpenGame/buildings_script.tpl
+++ b/includes/application/design/scripts/deprecated/buildings_script.tpl
@@ -4,7 +4,7 @@
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/info_buildings_defense.tpl b/includes/application/design/scripts/deprecated/info_buildings_defense.tpl
new file mode 100644
index 0000000..3c279ea
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/info_buildings_defense.tpl
@@ -0,0 +1,30 @@
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/info_buildings_destroy.tpl b/includes/application/design/scripts/deprecated/info_buildings_destroy.tpl
new file mode 100644
index 0000000..2dd53dd
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/info_buildings_destroy.tpl
@@ -0,0 +1,14 @@
+
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/info_buildings_fleet.tpl b/includes/application/design/scripts/deprecated/info_buildings_fleet.tpl
new file mode 100644
index 0000000..3e87a40
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/info_buildings_fleet.tpl
@@ -0,0 +1,39 @@
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/info_buildings_general.tpl b/includes/application/design/scripts/deprecated/info_buildings_general.tpl
new file mode 100644
index 0000000..f796559
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/info_buildings_general.tpl
@@ -0,0 +1,18 @@
+
+
+
+
getData('name')?>
+
+
+
+
+
+
+
getData('description')?>
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/info_buildings_table.tpl b/includes/application/design/scripts/deprecated/info_buildings_table.tpl
new file mode 100644
index 0000000..0b399c2
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/info_buildings_table.tpl
@@ -0,0 +1,29 @@
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/info_officiers_general.tpl b/includes/application/design/scripts/deprecated/info_officiers_general.tpl
new file mode 100644
index 0000000..a64a839
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/info_officiers_general.tpl
@@ -0,0 +1,18 @@
+
+
+
+
getData('name')?>
+
+
+
+
+
+
+
getData('description')?>
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/templates/OpenGame/install/ins_acc.tpl b/includes/application/design/scripts/deprecated/install/ins_acc.tpl
similarity index 64%
rename from templates/OpenGame/install/ins_acc.tpl
rename to includes/application/design/scripts/deprecated/install/ins_acc.tpl
index 2f76380..990f8db 100644
--- a/templates/OpenGame/install/ins_acc.tpl
+++ b/includes/application/design/scripts/deprecated/install/ins_acc.tpl
@@ -1,38 +1,38 @@
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/install/ins_acc_done.tpl b/includes/application/design/scripts/deprecated/install/ins_acc_done.tpl
new file mode 100644
index 0000000..2e14361
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/install/ins_acc_done.tpl
@@ -0,0 +1,9 @@
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/install/ins_body.tpl b/includes/application/design/scripts/deprecated/install/ins_body.tpl
new file mode 100644
index 0000000..295e294
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/install/ins_body.tpl
@@ -0,0 +1,28 @@
+
\ No newline at end of file
diff --git a/templates/OpenGame/install/ins_form.tpl b/includes/application/design/scripts/deprecated/install/ins_form.tpl
similarity index 54%
rename from templates/OpenGame/install/ins_form.tpl
rename to includes/application/design/scripts/deprecated/install/ins_form.tpl
index a361ecc..9b3b364 100644
--- a/templates/OpenGame/install/ins_form.tpl
+++ b/includes/application/design/scripts/deprecated/install/ins_form.tpl
@@ -1,27 +1,27 @@
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/install/ins_form_done.tpl b/includes/application/design/scripts/deprecated/install/ins_form_done.tpl
new file mode 100644
index 0000000..3d9426d
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/install/ins_form_done.tpl
@@ -0,0 +1,8 @@
+
+
+
getData('ins_tx_done1')?>
+
+
+
+
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/install/ins_goto_done.tpl b/includes/application/design/scripts/deprecated/install/ins_goto_done.tpl
new file mode 100644
index 0000000..55d1b13
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/install/ins_goto_done.tpl
@@ -0,0 +1,9 @@
+
\ No newline at end of file
diff --git a/templates/OpenGame/install/ins_goto_form.tpl b/includes/application/design/scripts/deprecated/install/ins_goto_form.tpl
similarity index 54%
rename from templates/OpenGame/install/ins_goto_form.tpl
rename to includes/application/design/scripts/deprecated/install/ins_goto_form.tpl
index 1300ad2..0539d11 100644
--- a/templates/OpenGame/install/ins_goto_form.tpl
+++ b/includes/application/design/scripts/deprecated/install/ins_goto_form.tpl
@@ -1,27 +1,27 @@
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/install/ins_goto_intro.tpl b/includes/application/design/scripts/deprecated/install/ins_goto_intro.tpl
new file mode 100644
index 0000000..16c01e9
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/install/ins_goto_intro.tpl
@@ -0,0 +1,10 @@
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/install/ins_intro.tpl b/includes/application/design/scripts/deprecated/install/ins_intro.tpl
new file mode 100644
index 0000000..fe25771
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/install/ins_intro.tpl
@@ -0,0 +1,11 @@
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/left_menu.tpl b/includes/application/design/scripts/deprecated/left_menu.tpl
new file mode 100644
index 0000000..1a5a0be
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/left_menu.tpl
@@ -0,0 +1,97 @@
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/login_body.tpl b/includes/application/design/scripts/deprecated/login_body.tpl
new file mode 100644
index 0000000..9ecb0ea
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/login_body.tpl
@@ -0,0 +1,68 @@
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/lostpassword.tpl b/includes/application/design/scripts/deprecated/lostpassword.tpl
new file mode 100644
index 0000000..4795998
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/lostpassword.tpl
@@ -0,0 +1,29 @@
+
+
\ No newline at end of file
diff --git a/templates/OpenGame/marchand_deuterium.tpl b/includes/application/design/scripts/deprecated/marchand_deuterium.tpl
similarity index 50%
rename from templates/OpenGame/marchand_deuterium.tpl
rename to includes/application/design/scripts/deprecated/marchand_deuterium.tpl
index ca94f7c..5ae3c6c 100644
--- a/templates/OpenGame/marchand_deuterium.tpl
+++ b/includes/application/design/scripts/deprecated/marchand_deuterium.tpl
@@ -3,17 +3,17 @@ function calcul() {
var Metal = document.forms['marchand'].elements['metal'].value;
var Cristal = document.forms['marchand'].elements['cristal'].value;
- Metal = Metal * {mod_ma_res_a};
- Cristal = Cristal * {mod_ma_res_b};
+ Metal = Metal * getData('mod_ma_res_a')?>;
+ Cristal = Cristal * getData('mod_ma_res_b')?>;
var Deuterium = Metal + Cristal;
document.getElementById("deut").innerHTML=Deuterium;
if (isNaN(document.forms['marchand'].elements['metal'].value)) {
- document.getElementById("deut").innerHTML="{mod_ma_nbre}";
+ document.getElementById("deut").innerHTML="getData('mod_ma_nbre')?>";
}
if (isNaN(document.forms['marchand'].elements['cristal'].value)) {
- document.getElementById("deut").innerHTML="{mod_ma_nbre}";
+ document.getElementById("deut").innerHTML="getData('mod_ma_nbre')?>";
}
}
@@ -23,25 +23,25 @@ function calcul() {
-
{mod_ma_buton}
+
getData('mod_ma_buton')?>
-
{mod_ma_cours}
+
getData('mod_ma_cours')?>
-
{Deuterium}
+
getData('Deuterium')?>
-
{mod_ma_res}
+
getData('mod_ma_res')?>
-
{Metal}
+
getData('Metal')?>
-
{mod_ma_res_a}
+
getData('mod_ma_res_a')?>
-
{Crystal}
+
getData('Crystal')?>
-
{mod_ma_res_b}
+
getData('mod_ma_res_b')?>
-
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/marchand_main.tpl b/includes/application/design/scripts/deprecated/marchand_main.tpl
new file mode 100644
index 0000000..b33b657
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/marchand_main.tpl
@@ -0,0 +1,18 @@
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/marchand_metal.tpl b/includes/application/design/scripts/deprecated/marchand_metal.tpl
new file mode 100644
index 0000000..817b148
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/marchand_metal.tpl
@@ -0,0 +1,48 @@
+
+
+
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/message_body.tpl b/includes/application/design/scripts/deprecated/message_body.tpl
new file mode 100644
index 0000000..71c23f5
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/message_body.tpl
@@ -0,0 +1,8 @@
+
+
+
+
getData('title')?>
+
+
getData('mes')?>
+
+
\ No newline at end of file
diff --git a/includes/application/design/scripts/deprecated/messages_pm_form.tpl b/includes/application/design/scripts/deprecated/messages_pm_form.tpl
new file mode 100644
index 0000000..056dd29
--- /dev/null
+++ b/includes/application/design/scripts/deprecated/messages_pm_form.tpl
@@ -0,0 +1,22 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/templates/OpenGame/messages_pm_form_bb.tpl b/includes/application/design/scripts/deprecated/messages_pm_form_bb.tpl
similarity index 70%
rename from templates/OpenGame/messages_pm_form_bb.tpl
rename to includes/application/design/scripts/deprecated/messages_pm_form_bb.tpl
index 01fa31b..cc77064 100644
--- a/templates/OpenGame/messages_pm_form_bb.tpl
+++ b/includes/application/design/scripts/deprecated/messages_pm_form_bb.tpl
@@ -2,19 +2,19 @@