PageRenderTime 46ms CodeModel.GetById 8ms RepoModel.GetById 0ms app.codeStats 0ms

/src/2.10.0/upload/includes/pages/class.ShowInfosPage.php

https://github.com/SantiHarry/XG-Proyect-v2.10.x
PHP | 525 lines | 447 code | 55 blank | 23 comment | 87 complexity | f7bd6660f4266b138b7071a38952e015 MD5 | raw file
  1. <?php
  2. /**
  3. * @project XG Proyect
  4. * @version 2.10.x build 0000
  5. * @copyright Copyright (C) 2008 - 2012
  6. */
  7. if(!defined('INSIDE')){ die(header("location:../../"));}
  8. class ShowInfosPage
  9. {
  10. private function GetNextJumpWaitTime($CurMoon)
  11. {
  12. global $resource;
  13. $JumpGateLevel = $CurMoon[$resource[43]];
  14. $LastJumpTime = $CurMoon['last_jump_time'];
  15. if ($JumpGateLevel > 0)
  16. {
  17. $WaitBetweenJmp = (60 * 60) * (1 / $JumpGateLevel);
  18. $NextJumpTime = $LastJumpTime + $WaitBetweenJmp;
  19. if ($NextJumpTime >= time())
  20. {
  21. $RestWait = $NextJumpTime - time();
  22. $RestString = " ". pretty_time($RestWait);
  23. }
  24. else
  25. {
  26. $RestWait = 0;
  27. $RestString = "";
  28. }
  29. }
  30. else
  31. {
  32. $RestWait = 0;
  33. $RestString = "";
  34. }
  35. $RetValue['string'] = $RestString;
  36. $RetValue['value'] = $RestWait;
  37. return $RetValue;
  38. }
  39. private function DoFleetJump ($CurrentUser, $CurrentPlanet)
  40. {
  41. global $resource, $lang;
  42. $inp_ok = TRUE;
  43. for ($Ship = 300; $Ship > 200; $Ship-- )
  44. {
  45. if ($resource[$Ship] != "")
  46. {
  47. if ($CurrentPlanet[$resource[$Ship]] > 0)
  48. {
  49. $bla['c' .strval($Ship)]= $CurrentPlanet[$resource[$Ship]];
  50. }
  51. }
  52. }
  53. $keyPOST = array_keys($_POST);
  54. $keyBLA = array_keys($bla);
  55. $pos = 0;
  56. $pos2 = 0;
  57. foreach ($_POST as &$fldp)
  58. {
  59. if (is_numeric($fldp))
  60. {
  61. foreach ($bla as &$fmax)
  62. {
  63. if ($keyPOST[$pos]==$keyBLA[$pos2])
  64. {
  65. if (!($fldp >= 0 && $fldp <= $fmax))
  66. {
  67. $inp_ok=FALSE;
  68. }
  69. }
  70. $pos2++;
  71. }
  72. $pos2=0;
  73. }
  74. else
  75. {
  76. $inp_ok=FALSE;
  77. }
  78. $pos++;
  79. }
  80. //fix redirect by quaua
  81. if ($inp_ok == FALSE)
  82. {
  83. header("location:game.php?page=infos&gid=43");
  84. }
  85. if ($_POST)
  86. {
  87. $RestString = $this->GetNextJumpWaitTime ($CurrentPlanet);
  88. $NextJumpTime = $RestString['value'];
  89. $JumpTime = time();
  90. if ( $NextJumpTime == 0 )
  91. {
  92. $TargetPlanet = $_POST['jmpto'];
  93. $TargetGate = doquery ( "SELECT `id`, `sprungtor`, `last_jump_time` FROM {{table}} WHERE `id` = '". intval($TargetPlanet) ."';", 'planets', TRUE);
  94. if ($TargetGate['sprungtor'] > 0)
  95. {
  96. $RestString = $this->GetNextJumpWaitTime ( $TargetGate );
  97. $NextDestTime = $RestString['value'];
  98. if ( $NextDestTime == 0 )
  99. {
  100. $ShipArray = array();
  101. $SubQueryOri = "";
  102. $SubQueryDes = "";
  103. for ( $Ship = 200; $Ship < 300; $Ship++ )
  104. {
  105. $ShipLabel = "c". $Ship;
  106. $gemi_kontrol = abs(intval($_POST[ $ShipLabel ]));
  107. if ( $gemi_kontrol > $CurrentPlanet[ $resource[ $Ship ] ] && ctype_digit($_POST[ $ShipLabel ]))
  108. {
  109. $ShipArray[ $Ship ] = $CurrentPlanet[ $resource[ $Ship ] ];
  110. }
  111. else
  112. {
  113. $ShipArray[ $Ship ] = $gemi_kontrol;
  114. }
  115. if ($ShipArray[ $Ship ] <> 0)
  116. {
  117. $SubQueryOri .= "`". $resource[ $Ship ] ."` = `". $resource[ $Ship ] ."` - '". $ShipArray[ $Ship ] ."', ";
  118. $SubQueryDes .= "`". $resource[ $Ship ] ."` = `". $resource[ $Ship ] ."` + '". $ShipArray[ $Ship ] ."', ";
  119. }
  120. }
  121. if ($SubQueryOri != "")
  122. {
  123. $QryUpdateOri = "UPDATE {{table}} SET ";
  124. $QryUpdateOri .= $SubQueryOri;
  125. $QryUpdateOri .= "`last_jump_time` = '". $JumpTime ."' ";
  126. $QryUpdateOri .= "WHERE ";
  127. $QryUpdateOri .= "`id` = '". $CurrentPlanet['id'] ."';";
  128. doquery ( $QryUpdateOri, 'planets');
  129. $QryUpdateDes = "UPDATE {{table}} SET ";
  130. $QryUpdateDes .= $SubQueryDes;
  131. $QryUpdateDes .= "`last_jump_time` = '". $JumpTime ."' ";
  132. $QryUpdateDes .= "WHERE ";
  133. $QryUpdateDes .= "`id` = '". $TargetGate['id'] ."';";
  134. doquery ( $QryUpdateDes, 'planets');
  135. $QryUpdateUsr = "UPDATE {{table}} SET ";
  136. $QryUpdateUsr .= "`current_planet` = '". $TargetGate['id'] ."' ";
  137. $QryUpdateUsr .= "WHERE ";
  138. $QryUpdateUsr .= "`id` = '". $CurrentUser['id'] ."';";
  139. doquery ( $QryUpdateUsr, 'users');
  140. $CurrentPlanet['last_jump_time'] = $JumpTime;
  141. $RestString = $this->GetNextJumpWaitTime ( $CurrentPlanet );
  142. $RetMessage = $lang['in_jump_gate_done'] . $RestString['string'];
  143. }
  144. else
  145. {
  146. $RetMessage = $lang['in_jump_gate_error_data'];
  147. }
  148. }
  149. else
  150. {
  151. $RetMessage = $lang['in_jump_gate_not_ready_target'] . $RestString['string'];
  152. }
  153. }
  154. else
  155. {
  156. $RetMessage = $lang['in_jump_gate_doesnt_have_one'];
  157. }
  158. }
  159. else
  160. {
  161. $RetMessage = $lang['in_jump_gate_already_used'] . $RestString['string'];
  162. }
  163. }
  164. else
  165. {
  166. $RetMessage = $lang['in_jump_gate_error_data'];
  167. }
  168. return $RetMessage;
  169. }
  170. private function BuildFleetListRows ($CurrentPlanet)
  171. {
  172. global $resource, $lang;
  173. $RowsTPL = gettemplate('infos/info_gate_rows');
  174. $CurrIdx = 1;
  175. $Result = "";
  176. for ($Ship = 200; $Ship < 250; $Ship++ )
  177. {
  178. if ($resource[$Ship] != "")
  179. {
  180. if ($CurrentPlanet[$resource[$Ship]] > 0)
  181. {
  182. $bloc['idx'] = $CurrIdx;
  183. $bloc['fleet_id'] = $Ship;
  184. $bloc['fleet_name'] = $lang['tech'][$Ship];
  185. $bloc['fleet_max'] = pretty_number ( $CurrentPlanet[$resource[$Ship]] );
  186. $bloc['gate_ship_dispo'] = $lang['in_jump_gate_available'];
  187. $Result .= parsetemplate ( $RowsTPL, $bloc );
  188. $CurrIdx++;
  189. }
  190. }
  191. }
  192. return $Result;
  193. }
  194. private function BuildJumpableMoonCombo ( $CurrentUser, $CurrentPlanet )
  195. {
  196. global $resource;
  197. $QrySelectMoons = "SELECT * FROM {{table}} WHERE `planet_type` = '3' AND `id_owner` = '". intval($CurrentUser['id']) ."';";
  198. $MoonList = doquery ( $QrySelectMoons, 'planets');
  199. $Combo = "";
  200. while ( $CurMoon = mysql_fetch_assoc($MoonList) )
  201. {
  202. if ( $CurMoon['id'] != $CurrentPlanet['id'] )
  203. {
  204. $RestString = $this->GetNextJumpWaitTime ( $CurMoon );
  205. if ($CurMoon[$resource[43]] >= 1)
  206. $Combo .= "<option value=\"". $CurMoon['id'] ."\">[". $CurMoon['galaxy'] .":". $CurMoon['system'] .":". $CurMoon['planet'] ."] ". $CurMoon['name'] . $RestString['string'] ."</option>\n";
  207. }
  208. }
  209. return $Combo;
  210. }
  211. private function ShowProductionTable ($CurrentUser, $CurrentPlanet, $BuildID, $Template)
  212. {
  213. global $ProdGrid, $resource;
  214. $BuildLevelFactor = $CurrentPlanet[ $resource[$BuildID]."_porcent" ];
  215. $BuildTemp = $CurrentPlanet[ 'temp_max' ];
  216. $CurrentBuildtLvl = $CurrentPlanet[ $resource[$BuildID] ];
  217. $BuildLevel = ($CurrentBuildtLvl > 0) ? $CurrentBuildtLvl : 1;
  218. $Prod[1] = (floor(eval($ProdGrid[$BuildID]['formule']['metal']) * read_config ( 'resource_multiplier' ) ) * (1 + ($CurrentUser['rpg_geologue'] * GEOLOGUE)));
  219. $Prod[2] = (floor(eval($ProdGrid[$BuildID]['formule']['crystal']) * read_config ( 'resource_multiplier' ) ) * (1 + ($CurrentUser['rpg_geologue'] * GEOLOGUE)));
  220. $Prod[3] = (floor(eval($ProdGrid[$BuildID]['formule']['deuterium']) * read_config ( 'resource_multiplier' ) ) * (1 + ($CurrentUser['rpg_geologue'] * GEOLOGUE)));
  221. if( $BuildID >= 4 )
  222. {
  223. $Prod[4] = (floor(eval($ProdGrid[$BuildID]['formule']['energy']) * read_config ( 'resource_multiplier' )) * (1 + ($CurrentUser['rpg_ingenieur'] * ENGINEER_ENERGY)));
  224. $ActualProd = floor($Prod[4]);
  225. }
  226. else
  227. {
  228. $Prod[4] = (floor(eval($ProdGrid[$BuildID]['formule']['energy']) * read_config ( 'resource_multiplier' )));
  229. $ActualProd = floor($Prod[$BuildID]);
  230. }
  231. if ($BuildID != 12)
  232. $ActualNeed = floor($Prod[4]);
  233. else
  234. $ActualNeed = floor($Prod[3]);
  235. $BuildStartLvl = $CurrentBuildtLvl - 2;
  236. if ($BuildStartLvl < 1)
  237. $BuildStartLvl = 1;
  238. $Table = "";
  239. $ProdFirst = 0;
  240. for ( $BuildLevel = $BuildStartLvl; $BuildLevel < $BuildStartLvl + 15; $BuildLevel++ )
  241. {
  242. if ($BuildID != 42)
  243. {
  244. $Prod[1] = (floor(eval($ProdGrid[$BuildID]['formule']['metal']) * read_config ( 'resource_multiplier' )) * (1 + ($CurrentUser['rpg_geologue'] * GEOLOGUE)));
  245. $Prod[2] = (floor(eval($ProdGrid[$BuildID]['formule']['crystal']) * read_config ( 'resource_multiplier' )) * (1 + ($CurrentUser['rpg_geologue'] * GEOLOGUE)));
  246. $Prod[3] = (floor(eval($ProdGrid[$BuildID]['formule']['deuterium']) * read_config ( 'resource_multiplier' )) * (1 + ($CurrentUser['rpg_geologue'] * GEOLOGUE)));
  247. if( $BuildID >= 4 )
  248. $Prod[4] = (floor(eval($ProdGrid[$BuildID]['formule']['energy']) * read_config ( 'resource_multiplier' )) * (1 + ($CurrentUser['rpg_ingenieur'] * ENGINEER_ENERGY)));
  249. else
  250. $Prod[4] = (floor(eval($ProdGrid[$BuildID]['formule']['energy']) * read_config ( 'resource_multiplier' )));
  251. $bloc['build_lvl'] = ($CurrentBuildtLvl == $BuildLevel) ? "<font color=\"#ff0000\">".$BuildLevel."</font>" : $BuildLevel;
  252. if ($ProdFirst > 0)
  253. if ($BuildID != 12)
  254. $bloc['build_gain'] = "<font color=\"lime\">(". pretty_number(floor($Prod[$BuildID] - $ProdFirst)) .")</font>";
  255. else
  256. $bloc['build_gain'] = "<font color=\"lime\">(". pretty_number(floor($Prod[4] - $ProdFirst)) .")</font>";
  257. else
  258. $bloc['build_gain'] = "";
  259. if ($BuildID != 12)
  260. {
  261. $bloc['build_prod'] = pretty_number(floor($Prod[$BuildID]));
  262. $bloc['build_prod_diff'] = colorNumber( pretty_number(floor($Prod[$BuildID] - $ActualProd)) );
  263. $bloc['build_need'] = colorNumber( pretty_number(floor($Prod[4])) );
  264. $bloc['build_need_diff'] = colorNumber( pretty_number(floor($Prod[4] - $ActualNeed)) );
  265. }
  266. else
  267. {
  268. $bloc['build_prod'] = pretty_number(floor($Prod[4]));
  269. $bloc['build_prod_diff'] = colorNumber( pretty_number(floor($Prod[4] - $ActualProd)) );
  270. $bloc['build_need'] = colorNumber( pretty_number(floor($Prod[3])) );
  271. $bloc['build_need_diff'] = colorNumber( pretty_number(floor($Prod[3] - $ActualNeed)) );
  272. }
  273. if ($ProdFirst == 0)
  274. {
  275. if ($BuildID != 12)
  276. $ProdFirst = floor($Prod[$BuildID]);
  277. else
  278. $ProdFirst = floor($Prod[4]);
  279. }
  280. }
  281. else
  282. {
  283. $bloc['build_lvl'] = ($CurrentBuildtLvl == $BuildLevel) ? "<font color=\"#ff0000\">".$BuildLevel."</font>" : $BuildLevel;
  284. $bloc['build_range'] = ($BuildLevel * $BuildLevel) - 1;
  285. }
  286. $Table .= parsetemplate($Template, $bloc);
  287. }
  288. return $Table;
  289. }
  290. private function ShowRapidFireTo ($BuildID)
  291. {
  292. global $lang, $CombatCaps;
  293. $ResultString = "";
  294. for ($Type = 200; $Type < 500; $Type++)
  295. {
  296. if ($CombatCaps[$BuildID]['sd'][$Type] > 1)
  297. $ResultString .= $lang['in_rf_again']. " ". $lang['tech'][$Type] ." <font color=\"#00ff00\">".$CombatCaps[$BuildID]['sd'][$Type]."</font><br>";
  298. }
  299. return $ResultString;
  300. }
  301. private function ShowRapidFireFrom ($BuildID)
  302. {
  303. global $lang, $CombatCaps;
  304. $ResultString = "";
  305. for ($Type = 200; $Type < 500; $Type++)
  306. {
  307. if ($CombatCaps[$Type]['sd'][$BuildID] > 1)
  308. $ResultString .= $lang['in_rf_from']. " ". $lang['tech'][$Type] ." <font color=\"#ff0000\">".$CombatCaps[$Type]['sd'][$BuildID]."</font><br>";
  309. }
  310. return $ResultString;
  311. }
  312. public function __construct ($CurrentUser, $CurrentPlanet, $BuildID)
  313. {
  314. global $lang, $resource, $pricelist, $CombatCaps;
  315. $GateTPL = '';
  316. $DestroyTPL = '';
  317. $TableHeadTPL = '';
  318. $parse = $lang;
  319. $parse['dpath'] = DPATH;
  320. $parse['name'] = $lang['info'][$BuildID]['name'];
  321. $parse['image'] = $BuildID;
  322. $parse['description'] = $lang['info'][$BuildID]['description'];
  323. if($BuildID < 13 OR $BuildID == 43)
  324. $PageTPL = gettemplate('infos/info_buildings_table');
  325. elseif($BuildID < 200)
  326. $PageTPL = gettemplate('infos/info_buildings_general');
  327. elseif($BuildID < 400)
  328. $PageTPL = gettemplate('infos/info_buildings_fleet');
  329. elseif($BuildID < 600)
  330. $PageTPL = gettemplate('infos/info_buildings_defense');
  331. else
  332. $PageTPL = gettemplate('infos/info_officiers_general');
  333. //Sólo hay destroy en <200
  334. if($BuildID < 200 AND $BuildID != 33 AND $BuildID != 41)
  335. $DestroyTPL = gettemplate('infos/info_buildings_destroy');
  336. if ($BuildID >= 1 && $BuildID <= 3)
  337. {
  338. $PageTPL = gettemplate('infos/info_buildings_table');
  339. $TableHeadTPL = gettemplate('infos/info_production_header');
  340. $TableTPL = gettemplate('infos/info_production_body');
  341. }
  342. elseif ($BuildID == 4)
  343. {
  344. $PageTPL = gettemplate('infos/info_buildings_table');
  345. $TableHeadTPL = gettemplate('infos/info_production_simple_header');
  346. $TableTPL = gettemplate('infos/info_production_simple_body');
  347. }
  348. elseif ($BuildID == 12)
  349. {
  350. $TableHeadTPL = gettemplate('infos/info_energy_header');
  351. $TableTPL = gettemplate('infos/info_energy_body');
  352. }
  353. /*elseif ($BuildID >= 14 AND $BuildID <= 100 AND $BuildID != 42 AND $BuildID != 41 AND $BuildID != 33 AND $BuildID != 43)
  354. {
  355. No hacemos NADA
  356. }*/
  357. /*elseif ($BuildID == 33)
  358. {
  359. $PageTPL = gettemplate('infos/info_buildings_general');
  360. }
  361. elseif ($BuildID == 41)
  362. {
  363. $PageTPL = gettemplate('infos/info_buildings_general');
  364. }*/
  365. elseif ($BuildID == 42)
  366. {
  367. $TableHeadTPL = gettemplate('infos/info_range_header');
  368. $TableTPL = gettemplate('infos/info_range_body');
  369. }
  370. elseif ($BuildID == 43)
  371. {
  372. $GateTPL = gettemplate('infos/info_gate_table');
  373. if($_POST)
  374. message($this->DoFleetJump($CurrentUser, $CurrentPlanet), "game.php?page=infos&gid=43", 2);
  375. }
  376. /*elseif ($BuildID >= 106 && $BuildID <= 199)
  377. {
  378. NADA! -- $PageTPL = gettemplate('infos/info_buildings_general');
  379. }*/
  380. elseif ($BuildID >= 202 && $BuildID <= 250)
  381. {
  382. $PageTPL = gettemplate('infos/info_buildings_fleet');
  383. $parse['element_typ'] = $lang['tech'][200];
  384. $parse['rf_info_to'] = $this->ShowRapidFireTo($BuildID);
  385. $parse['rf_info_fr'] = $this->ShowRapidFireFrom($BuildID);
  386. $parse['hull_pt'] = pretty_number ($pricelist[$BuildID]['metal'] + $pricelist[$BuildID]['crystal']);
  387. $parse['shield_pt'] = pretty_number ($CombatCaps[$BuildID]['shield']);
  388. $parse['attack_pt'] = pretty_number ($CombatCaps[$BuildID]['attack']);
  389. $parse['capacity_pt'] = pretty_number ($pricelist[$BuildID]['capacity']);
  390. $parse['base_speed'] = pretty_number ($pricelist[$BuildID]['speed']);
  391. $parse['base_conso'] = pretty_number ($pricelist[$BuildID]['consumption']);
  392. if ($BuildID == 202)
  393. {
  394. $parse['upd_speed'] = "<font color=\"yellow\">(". pretty_number ($pricelist[$BuildID]['speed2']) .")</font>";
  395. $parse['upd_conso'] = "<font color=\"yellow\">(". pretty_number ($pricelist[$BuildID]['consumption2']) .")</font>";
  396. }
  397. elseif ($BuildID == 211)
  398. $parse['upd_speed'] = "<font color=\"yellow\">(". pretty_number ($pricelist[$BuildID]['speed2']) .")</font>";
  399. }
  400. elseif ($BuildID >= 401 && $BuildID <= 450)
  401. {
  402. $PageTPL = gettemplate('infos/info_buildings_defense');
  403. $parse['element_typ'] = $lang['tech'][400];
  404. $parse['rf_info_to'] = $this->ShowRapidFireTo ($BuildID);
  405. $parse['rf_info_fr'] = $this->ShowRapidFireFrom ($BuildID);
  406. $parse['hull_pt'] = pretty_number ($pricelist[$BuildID]['metal'] + $pricelist[$BuildID]['crystal']);
  407. $parse['shield_pt'] = pretty_number ($CombatCaps[$BuildID]['shield']);
  408. $parse['attack_pt'] = pretty_number ($CombatCaps[$BuildID]['attack']);
  409. }
  410. elseif ($BuildID == 502 && $BuildID == 503)
  411. {
  412. $PageTPL = gettemplate('infos/info_buildings_defense');
  413. $parse['element_typ'] = $lang['tech'][400];
  414. $parse['hull_pt'] = pretty_number ($pricelist[$BuildID]['metal'] + $pricelist[$BuildID]['crystal']);
  415. $parse['shield_pt'] = pretty_number ($CombatCaps[$BuildID]['shield']);
  416. $parse['attack_pt'] = pretty_number ($CombatCaps[$BuildID]['attack']);
  417. }
  418. elseif ($BuildID >= 601 && $BuildID <= 604)
  419. $PageTPL = gettemplate('infos/info_officiers_general');
  420. if ($TableHeadTPL != '')
  421. {
  422. $parse['table_head'] = parsetemplate ($TableHeadTPL, $lang);
  423. $parse['table_data'] = $this->ShowProductionTable ($CurrentUser, $CurrentPlanet, $BuildID, $TableTPL);
  424. }
  425. $page = parsetemplate($PageTPL, $parse);
  426. if ($GateTPL != '')
  427. {
  428. if ($CurrentPlanet[$resource[$BuildID]] > 0)
  429. {
  430. $RestString = $this->GetNextJumpWaitTime ( $CurrentPlanet );
  431. $parse['gate_start_link'] = BuildPlanetAdressLink ( $CurrentPlanet );
  432. if ($RestString['value'] != 0)
  433. {
  434. include(XGP_ROOT . 'includes/functions/InsertJavaScriptChronoApplet.php');
  435. $parse['gate_time_script'] = InsertJavaScriptChronoApplet ( "Gate", "1", $RestString['value'], TRUE );
  436. $parse['gate_wait_time'] = "<div id=\"bxx". "Gate" . "1" ."\"></div>";
  437. $parse['gate_script_go'] = InsertJavaScriptChronoApplet ( "Gate", "1", $RestString['value'], FALSE );
  438. }
  439. else
  440. {
  441. $parse['gate_time_script'] = "";
  442. $parse['gate_wait_time'] = "";
  443. $parse['gate_script_go'] = "";
  444. }
  445. $parse['gate_dest_moons'] = $this->BuildJumpableMoonCombo ($CurrentUser, $CurrentPlanet);
  446. $parse['gate_fleet_rows'] = $this->BuildFleetListRows ($CurrentPlanet);
  447. $page .= parsetemplate($GateTPL, $parse);
  448. }
  449. }
  450. if ($DestroyTPL != '')
  451. {
  452. if ($CurrentPlanet[$resource[$BuildID]] > 0)
  453. {
  454. $NeededRessources = GetBuildingPrice ($CurrentUser, $CurrentPlanet, $BuildID, TRUE, TRUE);
  455. $DestroyTime = GetBuildingTime ($CurrentUser, $CurrentPlanet, $BuildID) / 2;
  456. $parse['destroyurl'] = "game.php?page=buildings&cmd=destroy&building=".$BuildID;
  457. $parse['levelvalue'] = $CurrentPlanet[$resource[$BuildID]];
  458. $parse['nfo_metal'] = $lang['Metal'];
  459. $parse['nfo_crysta'] = $lang['Crystal'];
  460. $parse['nfo_deuter'] = $lang['Deuterium'];
  461. $parse['metal'] = pretty_number ($NeededRessources['metal']);
  462. $parse['crystal'] = pretty_number ($NeededRessources['crystal']);
  463. $parse['deuterium'] = pretty_number ($NeededRessources['deuterium']);
  464. $parse['destroytime'] = pretty_time ($DestroyTime);
  465. $page .= parsetemplate($DestroyTPL, $parse);
  466. }
  467. }
  468. display($page);
  469. }
  470. }