<?php
$debug = 1;

include ('logue.php');
include ('entete2.php');

echo "Avant : Fer = $row[fer_ressource] Or = $row[or_ressource] Cristal = $row[ada_ressource] Naquadah = $row[ura_ressource]<br>";

$debug_texte = "";

include ('ressource.php');

echo "Apres : Fer = $new2fer_ressource Or = $new2or_ressource Cristal = $newwwada_ressource Naquadah = $newwwura_ressource<br>";

echo "<br>$debug_texte";

include ('siege.php');
include 'destruction3.php';
include ('entete.php');

if ($row2[techenergie_evolution] == "0000-00-00 00:00:00" OR $row2[techlaser_evolution] == "0000-00-00 00:00:00" OR $row2[techions_evolution] == "0000-00-00 00:00:00" OR $row2[techplasma_evolution] == "0000-00-00 00:00:00" OR $row2[techordi_evolution] == "0000-00-00 00:00:00" OR $row2[techcombustion_evolution] == "0000-00-00 00:00:00" OR $row2[techAsgaards_evolution] == "0000-00-00 00:00:00" OR $row2[techhyperespace_evolution] == "0000-00-00 00:00:00" OR $row2[techespio1_evolution] == "0000-00-00 00:00:00" OR $row2[techespio2_evolution] == "0000-00-00 00:00:00" OR $row2[techArmement_evolution] == "0000-00-00 00:00:00" OR $row2[techBouclier_evolution] == "0000-00-00 00:00:00" OR $row2[techcoque_evolution] == "0000-00-00 00:00:00" OR $row2[techinfra_evolution] == "0000-00-00 00:00:00" OR $row2[technaqua_evolution] == "0000-00-00 00:00:00" OR $row2[techanti_evolution] == "0000-00-00 00:00:00" OR $row2[techproAsgaard_evolution] == "0000-00-00 00:00:00" OR $row2[techproAncien_evolution] == "0000-00-00 00:00:00" OR $row2[techinfra_evolution] == "0000-00-00 00:00:00" OR $row2[technaqua_evolution] == "0000-00-00 00:00:00")
{
	$sql2 = "UPDATE matgraph_users SET labo_util = 0 WHERE id=$idlogin ";
	$res2 = db_mysql_Query($sql2)or die('erreur sql<br>'.$sql2.'<br>'.mysql_error());
	$row[labo_util] = "0";
}


$New_fer_lvl = $row[fer_lvl] + 1;
$New_or_lvl = $row[or_lvl] + 1;
$New_exfer_lvl = $row[exfer_lvl] + 1;
$New_exor_lvl = $row[exor_lvl] + 1;
$New_ada_lvl = $row[ada_lvl] + 1;
$New_ura_lvl = $row[ura_lvl] + 1;
$New_central_lvl = $row[central_lvl] + 1;
$New_labo_lvl = $row[labo_lvl] + 1;
$New_robo_lvl = $row[robo_lvl] + 1;
$New_siege_lvl = $row[siege_lvl] + 1;
$New_chantier_lvl = $row[chantier_lvl] + 1;
$New_hangarfer_lvl = $row[hangarfer_lvl] + 1;
$New_hangaror_lvl = $row[hangaror_lvl] + 1;
$New_hangarada_lvl = $row[hangarada_lvl] + 1;
$New_hangarura_lvl = $row[hangarura_lvl] + 1;
$New_silo_lvl = $row[silo_lvl] + 1;
$New_defense_lvl = $row[defense_lvl] + 1;
$New_mili_lvl = $row[mili_lvl] + 1;
$New_fission_lvl = $row[fission_lvl] + 1;
$New_terri_lvl = $row[terri_lvl] + 1;

$pts = floor(($row[pts] / 1000)) ;

// fer
if ($row[fer_lvl] =="0") {
$fer_lvl = "0";
}
else {
$fer_lvl = $row[fer_lvl];
}
// or
if ($row[or_lvl] =="0") {
$or_lvl = "0";
}
else {
$or_lvl = $row[or_lvl];
}
// exfer
if ($row[exfer_lvl] =="0") {
$exfer_lvl = "0";
}
else {
$exfer_lvl = $row[exfer_lvl];
}
// exor
if ($row[exor_lvl] =="0") {
$exor_lvl = "0";
}
else {
$exor_lvl = $row[exor_lvl];
}
// ada
if ($row[ada_lvl] =="0") {
$ada_lvl = "0";
}
else {
$ada_lvl = $row[ada_lvl];
}
// ura
if ($row[ura_lvl] =="0") {
$ura_lvl = "0";
}
else {
$ura_lvl = $row[ura_lvl];
}
// central
if ($row[central_lvl] =="0") {
$central_lvl = "0";
}
else {
$central_lvl = $row[central_lvl];
}
// fission
if ($row[fission_lvl] =="0") {
$fission_lvl = "0";
}
else {
$fission_lvl = $row[fission_lvl];
}
// labo
if ($row[labo_lvl] =="0") {
$labo_lvl = "0";
}
else {
$labo_lvl = $row[labo_lvl];
}
// robo
if ($row[robo_lvl] =="0") {
$robo_lvl = "0";
}
else {
$robo_lvl = $row[robo_lvl];
}
// siege
if ($row[siege_lvl] =="0") {
$siege_lvl = "0";
}
else {
$siege_lvl = $row[siege_lvl];
}
// chantier
if ($row[chantier_lvl] =="0") {
$chantier_lvl = "0";
}
else {
$chantier_lvl = $row[chantier_lvl];
}
// hangarfer
if ($row[hangarfer_lvl] =="0") {
$hangarfer_lvl = "0";
}
else {
$hangarfer_lvl = $row[hangarfer_lvl];
}
// hangaror
if ($row[hangaror_lvl] =="0") {
$hangaror_lvl = "0";
}
else {
$hangaror_lvl = $row[hangaror_lvl];
}
// hangarada
if ($row[hangarada_lvl] =="0") {
$hangarada_lvl = "0";
}
else {
$hangarada_lvl = $row[hangarada_lvl];
}
// hangarura
if ($row[hangarura_lvl] =="0") {
$hangarura_lvl = "0";
}
else {
$hangarura_lvl = $row[hangarura_lvl];
}
// silo
if ($row[silo_lvl] =="0") {
$silo_lvl = "0";
}
else {
$silo_lvl = $row[silo_lvl];
}
// defense
if ($row[defense_lvl] =="0") {
$defense_lvl = "0";
}
else {
$defense_lvl = $row[defense_lvl];
}
// mili
if ($row[mili_lvl] =="0") {
$mili_lvl = "0";
}
else {
$mili_lvl = $row[mili_lvl];
}
// terri
if ($row[terri_lvl] =="0") {
$terri_lvl = "0";
}
else {
$terri_lvl = $row[terri_lvl];
}

if ($row[fer_lvl] == "0") {
$besoin_fer_energie2 = "-30" ; }
else {
$besoin_fer_energie2 = round((-30 * (bcpow(1.18, $row[fer_lvl],3))),0);
}
$besoin_fer_energie = -1 * $besoin_fer_energie2 ;

if ($row[or_lvl] == "0") {
$besoin_or_energie2 = "-26" ;}
else {
$besoin_or_energie2 = round((-26 * (bcpow(1.14, $row[or_lvl],3))),0);
}
$besoin_or_energie = -1 * $besoin_or_energie2 ;
//

if ($row[exfer_lvl] == "0") {
$besoin_exfer_energie2 = "-200" ;}
else {
$besoin_exfer_energie2 = round((-200 * (bcpow(1.2, $row[exfer_lvl],3))),0);
}
$besoin_exfer_energie = -1 * $besoin_exfer_energie2 ;

if ($row[exor_lvl] == "0") {
$besoin_exor_energie2 = "-150" ; }
else {
$besoin_exor_energie2 = round((-150 * (bcpow(1.16, $row[exor_lvl],3))),0);
}
$besoin_exor_energie = -1 * $besoin_exor_energie2 ;
//

if ($row[ada_lvl] == "0") {
$besoin_ada_energie2 = "-40" ; }
else {
$besoin_ada_energie2 = round((-40 * (bcpow(1.12, $row[ada_lvl],3))),0);
}
$besoin_ada_energie = -1 * $besoin_ada_energie2 ;

if ($row[ura_lvl] == "0") {
$besoin_ura_energie2 = "-68" ;}
else {
$besoin_ura_energie2 = round((-68 * (bcpow(1.1, $row[ura_lvl],3))),0);
}
$besoin_ura_energie = -1 * $besoin_ura_energie2 ;

if ($row[fission_lvl] == "0") {
$coutfission = "0" ;
}
else {
$coutfission = (20 * ( bcpow( 1.3, $row[fission_lvl],3))) ;
}

// cout
if ($row[fer_lvl] =="0") {
$besoin_fer_fer = number_format(60, 0, ',', ' ');
$besoin_fer_or = number_format(15, 0, ',', ' ');
$besoin2_fer_fer = 60;
$besoin2_fer_or = 15;
}
else {
$besoin_fer_fer = number_format(round((60 * ( bcpow( 1.45, ($row[fer_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_fer_or = number_format(round((15 * ( bcpow( 1.45, ($row[fer_lvl] + 1),3))),0), 0, ',', ' ');
$besoin2_fer_fer = round((60 * ( bcpow( 1.45, ($row[fer_lvl] + 1),3))),0);
$besoin2_fer_or = round((15 * ( bcpow( 1.45, ($row[fer_lvl] + 1),3))),0);
}

if ($row[or_lvl] =="0") {
$besoin_or_fer = number_format(50, 0, ',', ' ');
$besoin_or_or = number_format(25, 0, ',', ' ');
$besoin2_or_fer = 50;
$besoin2_or_or = 25;
}
else {
$besoin_or_fer = number_format(round((50 * ( bcpow( 1.5, ($row[or_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_or_or = number_format(round((25 * ( bcpow( 1.5, ($row[or_lvl] + 1),3))),0), 0, ',', ' ');
$besoin2_or_fer = round((50 * ( bcpow( 1.5, ($row[or_lvl] + 1),3))),0);
$besoin2_or_or = round((25 * ( bcpow( 1.5, ($row[or_lvl] + 1),3))),0);
}
//
if ($row[exfer_lvl] =="0") {
$besoin_exfer_fer = number_format(35000, 0, ',', ' ');
$besoin_exfer_or = number_format(15000, 0, ',', ' ');
$besoin_exfer_ada = number_format(1000, 0, ',', ' ');
$besoin2_exfer_fer = 35000;
$besoin2_exfer_or = 15000;
$besoin2_exfer_ada = 1000;
}
else {
$besoin_exfer_fer = number_format(round((30000 * ( bcpow( 1.2, ($row[exfer_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_exfer_or = number_format(round((20000 * ( bcpow( 1.2, ($row[exfer_lvl] + 1)))),0), 0, ',', ' ');
$besoin_exfer_ada = number_format(round((1000 * ( bcpow( 1.2, ($row[exfer_lvl] + 1)))),0), 0, ',', ' ');
$besoin2_exfer_fer = round((30000 * ( bcpow( 1.2, ($row[exfer_lvl] + 1),3))),0);
$besoin2_exfer_or = round((20000 * ( bcpow( 1.2, ($row[exfer_lvl] + 1)))),0);
$besoin2_exfer_ada = round((1000 * ( bcpow( 1.2, ($row[exfer_lvl] + 1)))),0);
}

if ($row[exor_lvl] =="0") {
$besoin_exor_fer = number_format(32000, 0, ',', ' ');
$besoin_exor_or = number_format(20000, 0, ',', ' ');
$besoin_exor_ada = number_format(1500, 0, ',', ' ');
$besoin2_exor_fer = 32000;
$besoin2_exor_or = 20000;
$besoin2_exor_ada = 1500;
}
else {
$besoin_exor_fer = number_format(round((32000 * ( bcpow( 1.3, ($row[exor_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_exor_or = number_format(round((20000 * ( bcpow( 1.3, ($row[exor_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_exor_ada = number_format(round((1500 * ( bcpow( 1.3, ($row[exor_lvl] + 1),3))),0), 0, ',', ' ');
$besoin2_exor_fer = round((32000 * ( bcpow( 1.3, ($row[exor_lvl] + 1),3))),0);
$besoin2_exor_or = round((20000 * ( bcpow( 1.3, ($row[exor_lvl] + 1),3))),0);
$besoin2_exor_ada = round((1500 * ( bcpow( 1.3, ($row[exor_lvl] + 1),3))),0);
}
//

if ($row[ada_lvl] =="0") {
$besoin_ada_fer = number_format(500, 0, ',', ' ');
$besoin_ada_or = number_format(160, 0, ',', ' ');
$besoin2_ada_fer = 500;
$besoin2_ada_or = 160;
}
else {
$besoin_ada_fer = number_format(round((500 * ( bcpow( 1.45, ($row[ada_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_ada_or = number_format(round((160 * ( bcpow( 1.45, ($row[ada_lvl] + 1),3))),0), 0, ',', ' ');
$besoin2_ada_fer = round((500 * ( bcpow( 1.45, ($row[ada_lvl] + 1),3))),0);
$besoin2_ada_or = round((160 * ( bcpow( 1.45, ($row[ada_lvl] + 1),3))),0);
}

if ($row[ura_lvl] =="0") {
$besoin_ura_fer = number_format(500, 0, ',', ' ');
$besoin_ura_or = number_format(300, 0, ',', ' ');
$besoin_ura_ada = number_format(100, 0, ',', ' ');
$besoin2_ura_fer = 500;
$besoin2_ura_or = 300;
$besoin2_ura_ada = 100;
}
else {
$besoin_ura_fer = number_format(round((500 * ( bcpow( 1.4, ($row[ura_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_ura_or = number_format(round((300 * ( bcpow( 1.4, ($row[ura_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_ura_ada = number_format(round((100 * ( bcpow( 1.4, ($row[ura_lvl] + 1),3))),0), 0, ',', ' ');
$besoin2_ura_fer = round((500 * ( bcpow( 1.4, ($row[ura_lvl] + 1),3))),0);
$besoin2_ura_or = round((300 * ( bcpow( 1.4, ($row[ura_lvl] + 1),3))),0);
$besoin2_ura_ada = round((100 * ( bcpow( 1.4, ($row[ura_lvl] + 1),3))),0);
}

if ($row[central_lvl] =="0") {
$besoin_central_fer = number_format(52, 0, ',', ' ');
$besoin_central_or = number_format(30, 0, ',', ' ');
$besoin2_central_fer = 52;
$besoin2_central_or = 30;
}
else {
$besoin_central_fer = number_format(round((52 * ( bcpow( 1.6, ($row[central_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_central_or = number_format(round((30 * ( bcpow( 1.6, ($row[central_lvl] + 1),3))),0), 0, ',', ' ');
$besoin2_central_fer = round((52 * ( bcpow( 1.6, ($row[central_lvl] + 1),3))),0);
$besoin2_central_or = round((30 * ( bcpow( 1.6, ($row[central_lvl] + 1),3))),0);
}

if ($row[fission_lvl] =="0") {
$besoin_fission_fer = number_format(5200, 0, ',', ' ');
$besoin_fission_or = number_format(3000, 0, ',', ' ');
$besoin_fission_ada = number_format(750, 0, ',', ' ');
$besoin2_fission_fer = 5200;
$besoin2_fission_or = 3000;
$besoin2_fission_ada = 75;
}
else {
$besoin_fission_fer = number_format(round((5200 * ( bcpow( 1.6, ($row[fission_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_fission_or = number_format(round((3000 * ( bcpow( 1.6, ($row[fission_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_fission_ada = number_format(round((750 * ( bcpow( 1.6, ($row[fission_lvl] + 1),3))),0), 0, ',', ' ');
$besoin2_fission_fer = round((5200 * ( bcpow( 1.6, ($row[fission_lvl] + 1),3))),0);
$besoin2_fission_or = round((3000 * ( bcpow( 1.6, ($row[fission_lvl] + 1),3))),0);
$besoin2_fission_ada =round((750 * ( bcpow( 1.6, ($row[fission_lvl] + 1),3))),0);
}

if ($row[labo_lvl] =="0") {
$besoin_labo_fer = number_format(200, 0, ',', ' ');
$besoin_labo_or = number_format(400, 0, ',', ' ');
$besoin_labo_ada = number_format(200, 0, ',', ' ');
$besoin2_labo_fer = 200;
$besoin2_labo_or = 400;
$besoin2_labo_ada = 200;
}
else {
$besoin_labo_fer = number_format(round((200 * ( bcpow( 1.75, ($row[labo_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_labo_or = number_format(round((400 * ( bcpow( 1.75, ($row[labo_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_labo_ada = number_format(round((200 * ( bcpow( 1.75, ($row[labo_lvl] + 1),3))),0), 0, ',', ' ');
$besoin2_labo_fer = round((200 * ( bcpow( 1.75, ($row[labo_lvl] + 1),3))),0);
$besoin2_labo_or = round((400 * ( bcpow( 1.75, ($row[labo_lvl] + 1),3))),0);
$besoin2_labo_ada = round((200 * ( bcpow( 1.75, ($row[labo_lvl] + 1),3))),0);
}

if ($row[robo_lvl] =="0") {
$besoin_robo_fer = number_format(100, 0, ',', ' ');
$besoin_robo_or = number_format(200, 0, ',', ' ');
$besoin_robo_ada = number_format(100, 0, ',', ' ');
$besoin2_robo_fer = 100;
$besoin2_robo_or = 200;
$besoin2_robo_ada = 100;
}
else {
$besoin_robo_fer = number_format(round((100 * ( bcpow( 1.9, ($row[robo_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_robo_or = number_format(round((200 * ( bcpow( 1.9, ($row[robo_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_robo_ada = number_format(round((100 * ( bcpow( 1.9, ($row[robo_lvl] + 1),3))),0), 0, ',', ' ');
$besoin2_robo_fer = round((100 * ( bcpow( 1.9, ($row[robo_lvl] + 1),3))),0);
$besoin2_robo_or = round((200 * ( bcpow( 1.9, ($row[robo_lvl] + 1),3))),0);
$besoin2_robo_ada = round((100 * ( bcpow( 1.9, ($row[robo_lvl] + 1),3))),0);
}

if ($row[siege_lvl] =="0") {
$besoin_siege_fer = number_format(900000, 0, ',', ' ');
$besoin_siege_or = number_format(900000, 0, ',', ' ');
$besoin_siege_ada = number_format(500000, 0, ',', ' ');
$besoin_siege_ura = number_format(10000, 0, ',', ' ');
$besoin2_siege_fer = 900000;
$besoin2_siege_or = 900000;
$besoin2_siege_ada = 500000;
$besoin2_siege_ura = 10000;
}
else {
$besoin_siege_fer = number_format(round((450000 * ( bcpow( 2, ($row[siege_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_siege_or = number_format(round((450000 * ( bcpow( 2, ($row[siege_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_siege_ada = number_format(round((250000 * ( bcpow( 2, ($row[siege_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_siege_ura = number_format(round((5000 * ( bcpow( 2, ($row[siege_lvl] + 1),3))),0), 0, ',', ' ');
$besoin2_siege_fer = round((450000 * ( bcpow( 2, ($row[siege_lvl] + 1),3))),0);
$besoin2_siege_or = round((450000 * ( bcpow( 2, ($row[siege_lvl] + 1),3))),0);
$besoin2_siege_ada = round((250000 * ( bcpow( 2, ($row[siege_lvl] + 1),3))),0);
$besoin2_siege_ura = round((5000 * ( bcpow( 2, ($row[siege_lvl] + 1),3))),0);
}

if ($row[chantier_lvl] =="0") {
$besoin_chantier_fer = number_format(100, 0, ',', ' ');
$besoin_chantier_or = number_format(200, 0, ',', ' ');
$besoin_chantier_ada = number_format(100, 0, ',', ' ');
$besoin2_chantier_fer = 100;
$besoin2_chantier_or = 200;
$besoin2_chantier_ada = 100;
}
else {
$besoin_chantier_fer = number_format(round((100 * ( bcpow( 1.9, ($row[chantier_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_chantier_or = number_format(round((200 * ( bcpow( 1.9, ($row[chantier_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_chantier_ada = number_format(round((100 * ( bcpow( 1.9, ($row[chantier_lvl] + 1),3))),0), 0, ',', ' ');
$besoin2_chantier_fer = round((100 * ( bcpow( 1.9, ($row[chantier_lvl] + 1),3))),0);
$besoin2_chantier_or = round((200 * ( bcpow( 1.9, ($row[chantier_lvl] + 1),3))),0);
$besoin2_chantier_ada = round((100 * ( bcpow( 1.9, ($row[chantier_lvl] + 1),3))),0);
}

if ($row[hangarfer_lvl] =="0") {
$besoin_hangarfer_fer = number_format(2000, 0, ',', ' ');
$besoin2_hangarfer_fer = 2000;
}
else {
$besoin_hangarfer_fer = number_format(round((1000 * ( bcpow( 2, ($row[hangarfer_lvl] + 1),3))),0), 0, ',', ' ');
$besoin2_hangarfer_fer = round((1000 * ( bcpow( 2, ($row[hangarfer_lvl] + 1),3))),0);
}

if ($row[hangaror_lvl] =="0") {
$besoin_hangaror_fer = number_format(2000, 0, ',', ' ');
$besoin_hangaror_or = number_format(1000, 0, ',', ' ');
$besoin2_hangaror_fer = 2000;
$besoin2_hangaror_or = 1000;
}
else {
$besoin_hangaror_fer = number_format(round((1000 * ( bcpow( 2, ($row[hangaror_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_hangaror_or = number_format(round((500 * ( bcpow( 2, ($row[hangaror_lvl] + 1),3))),0), 0, ',', ' ');
$besoin2_hangaror_fer = round((1000 * ( bcpow( 2, ($row[hangaror_lvl] + 1),3))),0);
$besoin2_hangaror_or = round((500 * ( bcpow( 2, ($row[hangaror_lvl] + 1),3))),0);
}

if ($row[hangarada_lvl] =="0") {
$besoin_hangarada_fer = number_format(2000, 0, ',', ' ');
$besoin_hangarada_or = number_format(2000, 0, ',', ' ');
$besoin2_hangarada_fer = 2000;
$besoin2_hangarada_or = 2000;
}
else {
$besoin_hangarada_fer = number_format(round((1000 * ( bcpow( 2, ($row[hangarada_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_hangarada_or = number_format(round((1000 * ( bcpow( 2, ($row[hangarada_lvl] + 1),3))),0), 0, ',', ' ');
$besoin2_hangarada_fer = round((1000 * ( bcpow( 2, ($row[hangarada_lvl] + 1),3))),0);
$besoin2_hangarada_or = round((1000 * ( bcpow( 2, ($row[hangarada_lvl] + 1),3))),0);
}

if ($row[hangarura_lvl] =="0") {
$besoin_hangarura_fer = number_format(2000, 0, ',', ' ');
$besoin_hangarura_or = number_format(1000, 0, ',', ' ');
$besoin_hangarura_ada = number_format(1000, 0, ',', ' ');
$besoin2_hangarura_fer = 2000;
$besoin2_hangarura_or = 1000;
$besoin2_hangarura_ada = 1000;
}
else {
$besoin_hangarura_fer = number_format(round((1000 * ( bcpow( 2, ($row[hangarura_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_hangarura_or = number_format(round((500 * ( bcpow( 2, ($row[hangarura_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_hangarura_ada = number_format(round((500 * ( bcpow( 2, ($row[hangarura_lvl] + 1),3))),0), 0, ',', ' ');
$besoin2_hangarura_fer = round((1000 * ( bcpow( 2, ($row[hangarura_lvl] + 1),3))),0);
$besoin2_hangarura_or = round((500 * ( bcpow( 2, ($row[hangarura_lvl] + 1),3))),0);
$besoin2_hangarura_ada = round((500 * ( bcpow( 2, ($row[hangarura_lvl] + 1),3))),0);
}

if ($row[silo_lvl] =="0") {
$besoin_silo_fer = number_format(20000, 0, ',', ' ');
$besoin_silo_or = number_format(20000, 0, ',', ' ');
$besoin_silo_ada = number_format(1000, 0, ',', ' ');
$besoin2_silo_fer = 20000;
$besoin2_silo_or = 20000;
$besoin2_silo_ada = 1000;
}
else {
$besoin_silo_fer = number_format(round((20000 * ( bcpow( 1.9, ($row[silo_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_silo_or = number_format(round((20000 * ( bcpow( 1.9, ($row[silo_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_silo_ada = number_format(round((1000 * ( bcpow( 1.9, ($row[silo_lvl] + 1),3))),0), 0, ',', ' ');
$besoin2_silo_fer = round((20000 * ( bcpow( 1.9, ($row[silo_lvl] + 1),3))),0);
$besoin2_silo_or = round((20000 * ( bcpow( 1.9, ($row[silo_lvl] + 1),3))),0);
$besoin2_silo_ada = round((1000 * ( bcpow( 1.9, ($row[silo_lvl] + 1),3))),0);
}
if ($row[defense_lvl] =="0") {
$besoin_defense_fer = number_format(75, 0, ',', ' ');
$besoin_defense_or = number_format(150, 0, ',', ' ');
$besoin_defense_ada = number_format(75, 0, ',', ' ');
$besoin2_defense_fer = 75;
$besoin2_defense_or = 150;
$besoin2_defense_ada = 75;
}
else {
$besoin_defense_fer = number_format(round((75 * ( bcpow( 1.9, ($row[defense_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_defense_or = number_format(round((150 * ( bcpow( 1.9, ($row[defense_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_defense_ada = number_format(round((75 * ( bcpow( 1.9, ($row[defense_lvl] + 1),3))),0), 0, ',', ' ');
$besoin2_defense_fer = round((75 * ( bcpow( 1.9, ($row[defense_lvl] + 1),3))),0);
$besoin2_defense_or = round((150 * ( bcpow( 1.9, ($row[defense_lvl] + 1),3))),0);
$besoin2_defense_ada = round((75 * ( bcpow( 1.9, ($row[defense_lvl] + 1),3))),0);
}
if ($row[mili_lvl] =="0") {
$besoin_mili_fer = number_format(500, 0, ',', ' ');
$besoin_mili_or = number_format(500, 0, ',', ' ');
$besoin2_mili_fer = 500;
$besoin2_mili_or = 500;
}
else {
$besoin_mili_fer = number_format(round((250 * ( bcpow( 2, ($row[mili_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_mili_or = number_format(round((250 * ( bcpow( 2, ($row[mili_lvl] + 1),3))),0), 0, ',', ' ');
$besoin2_mili_fer = round((250 * ( bcpow( 2, ($row[mili_lvl] + 1),3))),0);
$besoin2_mili_or = round((250 * ( bcpow( 2, ($row[mili_lvl] + 1),3))),0);
}
if ($row[terri_lvl] =="0") {
$besoin_terri_fer = number_format(500000, 0, ',', ' ');
$besoin_terri_or = number_format(500000, 0, ',', ' ');
$besoin2_terri_fer = 500000;
$besoin2_terri_or = 500000;
}
else {
$besoin_terri_fer = number_format(round((250000 * ( bcpow( 2, ($row[terri_lvl] + 1),3))),0), 0, ',', ' ');
$besoin_terri_or = number_format(round((250000 * ( bcpow( 2, ($row[terri_lvl] + 1),3))),0), 0, ',', ' ');
$besoin2_terri_fer = round((250000 * ( bcpow( 2, ($row[terri_lvl] + 1),3))),0);
$besoin2_terri_or = round((250000 * ( bcpow( 2, ($row[terri_lvl] + 1),3))),0);
}


// temps evolution
if ($row[fer_evolution] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsfer2 ; $construction = "fer" ; }
if ($row[or_evolution] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsor2 ; $construction = "or" ; }
if ($row[exfer_evolution] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsexfer2 ; $construction = "exfer" ; }
if ($row[exor_evolution] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsexor2 ; $construction = "exor" ; }
if ($row[ada_evolution] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsada2 ; $construction = "ada" ; }
if ($row[ura_evolution] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsura2 ; $construction = "ura" ; }
if ($row[central_evolution] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempscentral2 ; $construction = "central" ; }
if ($row[labo_evolution] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempslabo2 ; $construction = "labo" ; }
if ($row[robo_evolution] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsrobo2 ; $construction = "robo" ;  }
if ($row[siege_evolution] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempssiege2 ; $construction = "siege" ;  }
if ($row[chantier_evolution] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempschantier2 ; $construction = "chantier" ; }
if ($row[hangarfer_evolution] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempshangarfer2 ; $construction = "hangarfer" ; }
if ($row[hangaror_evolution] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempshangaror2 ; $construction = "hangaror" ; }
if ($row[hangarada_evolution] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempshangarada2 ; $construction = "hangarada" ; }
if ($row[hangarura_evolution] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempshangarura2 ; $construction = "hangarura" ; }
if ($row[silo_evolution] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempssilo2 ; $construction = "silo" ; }
if ($row[defense_evolution] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsdefense2 ; $construction = "defense" ; }
if ($row[mili_evolution] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsmili2 ; $construction = "mili" ; }
if ($row[fission_evolution] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsfission2 ; $construction = "fission" ; }
if ($row[terri_evolution] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsterri2 ; $construction = "terri" ; }


if ($row[fer_destruction] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsdestructionfer2 ; $construction = "fer" ; }
if ($row[or_destruction] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsdestructionor2 ; $construction = "or" ; }
if ($row[exfer_destruction] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsdestructionexfer2 ; $construction = "exfer" ; }
if ($row[exor_destruction] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsdestructionexor2 ; $construction = "exor" ; }
if ($row[ada_destruction] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsdestructionada2 ; $construction = "ada" ; }
if ($row[ura_destruction] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsdestructionura2 ; $construction = "ura" ; }
if ($row[labo_destruction] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsdestructionlabo2 ; $construction = "labo" ; }
if ($row[robo_destruction] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsdestructionrobo2 ; $construction = "robo" ;  }
if ($row[siege_destruction] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsdestructionsiege2 ; $construction = "siege" ;  }
if ($row[chantier_destruction] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsdestructionchantier2 ; $construction = "chantier" ; }
if ($row[hangarfer_destruction] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsdestructionhangarfer2 ; $construction = "hangarfer" ; }
if ($row[hangaror_destruction] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsdestructionhangaror2 ; $construction = "hangaror" ; }
if ($row[hangarada_destruction] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsdestructionhangarada2 ; $construction = "hangarada" ; }
if ($row[hangarura_destruction] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsdestructionhangarura2 ; $construction = "hangarura" ; }
if ($row[silo_destruction] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsdestructionsilo2 ; $construction = "silo" ; }
if ($row[defense_destruction] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsdestructiondefense2 ; $construction = "defense" ; }
if ($row[mili_destruction] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsdestructionmili2 ; $construction = "mili" ; }

$tempsevolution = $tempsevo;
$eminevo = $tempsevolution / 60;

if ( floor($eminevo) != $eminevo )
  $esecevo = floor( ($eminevo - floor( $eminevo )) * 60);

  if ( $eminevo > 60 ) {

    $ehourevo = floor( $eminevo / 60 );
    $eminevo = $eminevo - ( 60 * $ehourevo );

    if ( $ehourevo > 24 ) {
      $edayevo = floor( $ehourevo / 24);
      $ehourevo = $ehourevo - ( 24 * $edayevo );
    }

  }

$tempsevolution ="";

if (empty($edayevo) )
  $edayevo = 0;

if (empty($ehourevo) )
  $ehourevo = 0;

if (empty($esecevo) )
  $esecevo = 0;

$emin2evo = floor($eminevo) ;
$nom="evo";
$tempsevolution = "<body onLoad=chrono($edayevo,$ehourevo,$emin2evo,$esecevo,'$nom')>
<span id=\"ligne_$nom\">Temps restant : $edayevo:$ehourevo:$emin2evo:$esecevo</span>";
/////////////// TEMPS //////////////
//FER
$temps1fer = (108 * $siege_temps_evolution * (bcpow(1.5, $New_fer_lvl,3)));
if ($robo_lvl == "0") {
$stimefer = (round($temps1fer));
}
else {
$stimefer = (round($temps1fer*(bcpow(0.9, $robo_lvl,3))));
}
$etimefer = $stimefer;
$eminfer = $etimefer / 60;

if ( floor($eminfer) != $eminfer )
  $esecfer = floor( ($eminfer - floor( $eminfer )) * 60);

  if ( $eminfer > 60 ) {

    $ehourfer = floor( $eminfer / 60 );
    $eminfer = $eminfer - ( 60 * $ehourfer );

    if ( $ehourfer > 24 ) {
      $edayfer = floor( $ehourfer / 24);
      $ehourfer = $ehourfer - ( 24 * $edayfer );
    }

  }

$etimefer ="";

if (!empty($edayfer) )
  $etimefer.="$edayfer j ";

if (!empty($ehourfer) )
  $etimefer.="$ehourfer h ";

if ($eminfer != 0)
  $etimefer.= floor($eminfer)." min. ";

if (!empty($esecfer) )
  $etimefer.="$esecfer sec. ";

//or
$temps1or = (103 * $siege_temps_evolution * (bcpow(1.5, $New_or_lvl,3)));
if ($robo_lvl == "0") {
$stimeor = (round($temps1or));
}
else {
$stimeor = (round($temps1or*(bcpow(0.9, $robo_lvl,3))));
}
$etimeor = $stimeor;
$eminor = $etimeor / 60;

if ( floor($eminor) != $eminor )
  $esecor = floor( ($eminor - floor( $eminor )) * 60);

  if ( $eminor > 60 ) {

    $ehouror = floor( $eminor / 60 );
    $eminor = $eminor - ( 60 * $ehouror );

    if ( $ehouror > 24 ) {
      $edayor = floor( $ehouror / 24);
      $ehouror = $ehouror - ( 24 * $edayor );
    }

  }

$etimeor ="";

if (!empty($edayor) )
  $etimeor.="$edayor j ";

if (!empty($ehouror) )
  $etimeor.="$ehouror h ";

if ($eminor != 0)
  $etimeor.= floor($eminor)." min. ";

if (!empty($esecor) )
  $etimeor.="$esecor sec. ";


//exfer

$temps1exfer = (43200 * $siege_temps_evolution * (bcpow(1.7, $New_exfer_lvl,3)));
if ($robo_lvl == "0") {
$stimeexfer = (round($temps1exfer));
}
else {
$stimeexfer = (round($temps1exfer*(bcpow(0.9, $robo_lvl,3))));
}
$etimeexfer = $stimeexfer;
$eminexfer = $etimeexfer / 60;

if ( floor($eminexfer) != $eminexfer )
  $esecexfer = floor( ($eminexfer - floor( $eminexfer )) * 60);

  if ( $eminexfer > 60 ) {

    $ehourexfer = floor( $eminexfer / 60 );
    $eminexfer = $eminexfer - ( 60 * $ehourexfer );

    if ( $ehourexfer > 24 ) {
      $edayexfer = floor( $ehourexfer / 24);
      $ehourexfer = $ehourexfer - ( 24 * $edayexfer );
    }

  }

$etimeexfer ="";

if (!empty($edayexfer) )
  $etimeexfer.="$edayexfer j ";

if (!empty($ehourexfer) )
  $etimeexfer.="$ehourexfer h ";

if ($eminexfer != 0)
  $etimeexfer.= floor($eminexfer)." min. ";

if (!empty($esecexfer) )
  $etimeexfer.="$esecexfer sec. ";


//exor
$temps1exor = (43200 * $siege_temps_evolution * (bcpow(1.35, $New_exor_lvl,3)));
if ($robo_lvl == "0") {
$stimeexor = (round($temps1exor));
}
else {
$stimeexor = (round($temps1exor*(bcpow(0.9, $robo_lvl,3))));
}
$etimeexor = $stimeexor;
$eminexor = $etimeexor / 60;

if ( floor($eminexor) != $eminexor )
  $esecexor = floor( ($eminexor - floor( $eminexor )) * 60);

  if ( $eminexor > 60 ) {

    $ehourexor = floor( $eminexor / 60 );
    $eminexor = $eminexor - ( 60 * $ehourexor );

    if ( $ehourexor > 24 ) {
      $edayexor = floor( $ehourexor / 24);
      $ehourexor = $ehourexor - ( 24 * $edayexor );
    }

  }

$etimeexor ="";

if (!empty($edayexor) )
  $etimeexor.="$edayexor j ";

if (!empty($ehourexor) )
  $etimeexor.="$ehourexor h ";

if ($eminexor != 0)
  $etimeexor.= floor($eminexor)." min. ";

if (!empty($esecexor) )
  $etimeexor.="$esecexor sec. ";

//ada
$temps1ada = (432 * $siege_temps_evolution * (bcpow(1.4, $New_ada_lvl,3)));
if ($robo_lvl == "0") {
$stimeada = (round($temps1ada));
}
else {
$stimeada = (round($temps1ada*(bcpow(0.9, $robo_lvl,3))));
}
$etimeada = $stimeada;
$eminada = $etimeada / 60;

if ( floor($eminada) != $eminada )
  $esecada = floor( ($eminada - floor( $eminada )) * 60);

  if ( $eminada > 60 ) {

    $ehourada = floor( $eminada / 60 );
    $eminada = $eminada - ( 60 * $ehourada );

    if ( $ehourada > 24 ) {
      $edayada = floor( $ehourada / 24);
      $ehourada = $ehourada - ( 24 * $edayada );
    }

  }

$etimeada ="";

if (!empty($edayada) )
  $etimeada.="$edayada j ";

if (!empty($ehourada) )
  $etimeada.="$ehourada h ";

if ($eminada != 0)
  $etimeada.= floor($eminada)." min. ";

if (!empty($esecada) )
  $etimeada.="$esecada sec. ";

//ura

$temps1ura = (600 * $siege_temps_evolution * (bcpow(1.4, $New_ura_lvl,3)));
if ($robo_lvl == "0") {
$stimeura = (round($temps1ura));
}
else {
$stimeura = (round($temps1ura*(bcpow(0.9, $robo_lvl,3))));
}
$etimeura = $stimeura;
$eminura = $etimeura / 60;

if ( floor($eminura) != $eminura )
  $esecura = floor( ($eminura - floor( $eminura )) * 60);

  if ( $eminura > 60 ) {

    $ehourura = floor( $eminura / 60 );
    $eminura = $eminura - ( 60 * $ehourura );

    if ( $ehourura > 24 ) {
      $edayura = floor( $ehourura / 24);
      $ehourura = $ehourura - ( 24 * $edayura );
    }

  }

$etimeura ="";

if (!empty($edayura) )
  $etimeura.="$edayura j ";

if (!empty($ehourura) )
  $etimeura.="$ehourura h ";

if ($eminura != 0)
  $etimeura.= floor($eminura)." min. ";

if (!empty($esecura) )
  $etimeura.="$esecura sec. ";

//central
$temps1central = (108 * $siege_temps_evolution * (bcpow(1.35, $New_central_lvl,3)));
if ($robo_lvl == "0") {
$stimecentral = (round($temps1central));
}
else {
$stimecentral = (round($temps1central*(bcpow(0.9, $robo_lvl,3))));
}
$etimecentral = $stimecentral;
$emincentral = $etimecentral / 60;

if ( floor($emincentral) != $emincentral )
  $eseccentral = floor( ($emincentral - floor( $emincentral )) * 60);

  if ( $emincentral > 60 ) {

    $ehourcentral = floor( $emincentral / 60 );
    $emincentral = $emincentral - ( 60 * $ehourcentral );

    if ( $ehourcentral > 24 ) {
      $edaycentral = floor( $ehourcentral / 24);
      $ehourcentral = $ehourcentral - ( 24 * $edaycentral );
    }

  }

$etimecentral ="";

if (!empty($edaycentral) )
  $etimecentral.="$edaycentral j ";

if (!empty($ehourcentral) )
  $etimecentral.="$ehourcentral h ";

if ($emincentral != 0)
  $etimecentral.= floor($emincentral)." min. ";

if (!empty($eseccentral) )
  $etimecentral.="$eseccentral sec. ";

//fission
$temps1fission = (650 * $siege_temps_evolution * (bcpow(1.35, ($row[fission_lvl] + 1),3)));
if ($robo_lvl == "0") {
$stimefission = (round($temps1fission));
}
else {
$stimefission = (round($temps1fission*(bcpow(0.9, $robo_lvl,3))));
}
$etimefission = $stimefission;
$eminfission = $etimefission / 60;

if ( floor($eminfission) != $eminfission )
  $esecfission = floor( ($eminfission - floor( $eminfission )) * 60);

  if ( $eminfission > 60 ) {

    $ehourfission = floor( $eminfission / 60 );
    $eminfission = $eminfission - ( 60 * $ehourfission );

    if ( $ehourfission > 24 ) {
      $edayfission = floor( $ehourfission / 24);
      $ehourfission = $ehourfission - ( 24 * $edayfission );
    }

  }

$etimefission ="";

if (!empty($edayfission) )
  $etimefission.="$edayfission j ";

if (!empty($ehourfission) )
  $etimefission.="$ehourfission h ";

if ($eminfission != 0)
  $etimefission.= floor($eminfission)." min. ";

if (!empty($esecfission) )
  $etimefission.="$esecfission sec. ";


//labo
$temps1labo = (369 * $siege_temps_evolution * (bcpow(1.95, $New_labo_lvl,3)));
if ($robo_lvl == "0") {
$stimelabo = (round($temps1labo));
}
else {
$stimelabo = (round($temps1labo*(bcpow(0.9, $robo_lvl,3))));
}
$etimelabo = $stimelabo;
$eminlabo = $etimelabo / 60;

if ( floor($eminlabo) != $eminlabo )
  $eseclabo = floor( ($eminlabo - floor( $eminlabo )) * 60);

  if ( $eminlabo > 60 ) {

    $ehourlabo = floor( $eminlabo / 60 );
    $eminlabo = $eminlabo - ( 60 * $ehourlabo );

    if ( $ehourlabo > 24 ) {
      $edaylabo = floor( $ehourlabo / 24);
      $ehourlabo = $ehourlabo - ( 24 * $edaylabo );
    }

  }

$etimelabo ="";

if (!empty($edaylabo) )
  $etimelabo.="$edaylabo j ";

if (!empty($ehourlabo) )
  $etimelabo.="$ehourlabo h ";

if ($eminlabo != 0)
  $etimelabo.= floor($eminlabo)." min. ";

if (!empty($eseclabo) )
  $etimelabo.="$eseclabo sec. ";

//robo
if ($row[robo_lvl] == "0") {
$stimerobo = (600);
}
else {
$stimerobo = (round(600 * (bcpow(1.8, ($row[robo_lvl]),3))));
}
$etimerobo = $stimerobo;
$eminrobo = $etimerobo / 60;

if ( floor($eminrobo) != $eminrobo )
  $esecrobo = floor( ($eminrobo - floor( $eminrobo )) * 60);

  if ( $eminrobo > 60 ) {

    $ehourrobo = floor( $eminrobo / 60 );
    $eminrobo = $eminrobo - ( 60 * $ehourrobo );

    if ( $ehourrobo > 24 ) {
      $edayrobo = floor( $ehourrobo / 24);
      $ehourrobo = $ehourrobo - ( 24 * $edayrobo );
    }

  }

$etimerobo ="";

if (!empty($edayrobo) )
  $etimerobo.="$edayrobo j ";

if (!empty($ehourrobo) )
  $etimerobo.="$ehourrobo h ";

if ($eminrobo != 0)
  $etimerobo.= floor($eminrobo)." min. ";

if (!empty($esecrobo) )
  $etimerobo.="$esecrobo sec. ";

//siege
if ($row[siege_lvl] == "0") {
$stimesiege = (129600);
}
else {
$stimesiege = (round(129600 * (bcpow(2, ($row[siege_lvl]),3))));
}
$etimesiege = $stimesiege;
$eminsiege = $etimesiege / 60;

if ( floor($eminsiege) != $eminsiege )
  $esecsiege = floor( ($eminsiege - floor( $eminsiege )) * 60);

  if ( $eminsiege > 60 ) {

    $ehoursiege = floor( $eminsiege / 60 );
    $eminsiege = $eminsiege - ( 60 * $ehoursiege );

    if ( $ehoursiege > 24 ) {
      $edaysiege = floor( $ehoursiege / 24);
      $ehoursiege = $ehoursiege - ( 24 * $edaysiege );
    }

  }

$etimesiege ="";

if (!empty($edaysiege) )
  $etimesiege.="$edaysiege j ";

if (!empty($ehoursiege) )
  $etimesiege.="$ehoursiege h ";

if ($eminsiege != 0)
  $etimesiege.= floor($eminsiege)." min. ";

if (!empty($esecsiege) )
  $etimesiege.="$esecsiege sec. ";


//chantier
$temps1chantier = (864 * $siege_temps_evolution * (bcpow(1.35, $New_chantier_lvl,3)));
if ($robo_lvl == "0") {
$stimechantier = (round($temps1chantier));
}
else {
$stimechantier = (round($temps1chantier*(bcpow(0.9, $robo_lvl,3))));
}
$etimechantier = $stimechantier;
$eminchantier = $etimechantier / 60;

if ( floor($eminchantier) != $eminchantier )
  $esecchantier = floor( ($eminchantier - floor( $eminchantier )) * 60);

  if ( $eminchantier > 60 ) {

    $ehourchantier = floor( $eminchantier / 60 );
    $eminchantier = $eminchantier - ( 60 * $ehourchantier );

    if ( $ehourchantier > 24 ) {
      $edaychantier = floor( $ehourchantier / 24);
      $ehourchantier = $ehourchantier - ( 24 * $edaychantier );
    }

  }

$etimechantier ="";

if (!empty($edaychantier) )
  $etimechantier.="$edaychantier j ";

if (!empty($ehourchantier) )
  $etimechantier.="$ehourchantier h ";

if ($eminchantier != 0)
  $etimechantier.= floor($eminchantier)." min. ";

if (!empty($esecchantier) )
  $etimechantier.="$esecchantier sec. ";

//hangarfer
$temps1hangarfer = (1440 * $siege_temps_evolution * (bcpow(1.35, $New_hangarfer_lvl,3)));
if ($robo_lvl == "0") {
$stimehangarfer = (round($temps1hangarfer));
}
else {
$stimehangarfer = (round($temps1hangarfer*(bcpow(0.9, $robo_lvl,3))));
}
$etimehangarfer = $stimehangarfer;
$eminhangarfer = $etimehangarfer / 60;

if ( floor($eminhangarfer) != $eminhangarfer )
  $esechangarfer = floor( ($eminhangarfer - floor( $eminhangarfer )) * 60);

  if ( $eminhangarfer > 60 ) {

    $ehourhangarfer = floor( $eminhangarfer / 60 );
    $eminhangarfer = $eminhangarfer - ( 60 * $ehourhangarfer );

    if ( $ehourhangarfer > 24 ) {
      $edayhangarfer = floor( $ehourhangarfer / 24);
      $ehourhangarfer = $ehourhangarfer - ( 24 * $edayhangarfer );
    }

  }

$etimehangarfer ="";

if (!empty($edayhangarfer) )
  $etimehangarfer.="$edayhangarfer j ";

if (!empty($ehourhangarfer) )
  $etimehangarfer.="$ehourhangarfer h ";

if ($eminhangarfer != 0)
  $etimehangarfer.= floor($eminhangarfer)." min. ";

if (!empty($esechangarfer) )
  $etimehangarfer.="$esechangarfer sec. ";

//hangaror
$temps1hangaror = (1440 * $siege_temps_evolution * (bcpow(1.35, $New_hangaror_lvl,3)));
if ($robo_lvl == "0") {
$stimehangaror = (round($temps1hangaror));
}
else {
$stimehangaror = (round($temps1hangaror*(bcpow(0.9, $robo_lvl,3))));
}
$etimehangaror = $stimehangaror;
$eminhangaror = $etimehangaror / 60;

if ( floor($eminhangaror) != $eminhangaror )
  $esechangaror = floor( ($eminhangaror - floor( $eminhangaror )) * 60);

  if ( $eminhangaror > 60 ) {

    $ehourhangaror = floor( $eminhangaror / 60 );
    $eminhangaror = $eminhangaror - ( 60 * $ehourhangaror );

    if ( $ehourhangaror > 24 ) {
      $edayhangaror = floor( $ehourhangaror / 24);
      $ehourhangaror = $ehourhangaror - ( 24 * $edayhangaror );
    }

  }

$etimehangaror ="";

if (!empty($edayhangaror) )
  $etimehangaror.="$edayhangaror j ";

if (!empty($ehourhangaror) )
  $etimehangaror.="$ehourhangaror h ";

if ($eminhangaror != 0)
  $etimehangaror.= floor($eminhangaror)." min. ";

if (!empty($esechangaror) )
  $etimehangaror.="$esechangaror sec. ";

//hangarada
$temps1hangarada = (1440 * $siege_temps_evolution * (bcpow(1.35, $New_hangarada_lvl,3)));
if ($robo_lvl == "0") {
$stimehangarada = (round($temps1hangarada));
}
else {
$stimehangarada = (round($temps1hangarada*(bcpow(0.9, $robo_lvl,3))));
}
$etimehangarada = $stimehangarada;
$eminhangarada = $etimehangarada / 60;

if ( floor($eminhangarada) != $eminhangarada )
  $esechangarada = floor( ($eminhangarada - floor( $eminhangarada )) * 60);

  if ( $eminhangarada > 60 ) {

    $ehourhangarada = floor( $eminhangarada / 60 );
    $eminhangarada = $eminhangarada - ( 60 * $ehourhangarada );

    if ( $ehourhangarada > 24 ) {
      $edayhangarada = floor( $ehourhangarada / 24);
      $ehourhangarada = $ehourhangarada - ( 24 * $edayhangarada );
    }

  }

$etimehangarada ="";

if (!empty($edayhangarada) )
  $etimehangarada.="$edayhangarada j ";

if (!empty($ehourhangarada) )
  $etimehangarada.="$ehourhangarada h ";

if ($eminhangarada != 0)
  $etimehangarada.= floor($eminhangarada)." min. ";

if (!empty($esechangarada) )
  $etimehangarada.="$esechangarada sec. ";

//hangarura
$temps1hangarura = (1440 * $siege_temps_evolution * (bcpow(1.35, $New_hangarura_lvl,3)));
if ($robo_lvl == "0") {
$stimehangarura = (round($temps1hangarura));
}
else {
$stimehangarura = (round($temps1hangarura*(bcpow(0.9, $robo_lvl,3))));
}
$etimehangarura = $stimehangarura;
$eminhangarura = $etimehangarura / 60;

if ( floor($eminhangarura) != $eminhangarura )
  $esechangarura = floor( ($eminhangarura - floor( $eminhangarura )) * 60);

  if ( $eminhangarura > 60 ) {

    $ehourhangarura = floor( $eminhangarura / 60 );
    $eminhangarura = $eminhangarura - ( 60 * $ehourhangarura );

    if ( $ehourhangarura > 24 ) {
      $edayhangarura = floor( $ehourhangarura / 24);
      $ehourhangarura = $ehourhangarura - ( 24 * $edayhangarura );
    }

  }

$etimehangarura ="";

if (!empty($edayhangarura) )
  $etimehangarura.="$edayhangarura j ";

if (!empty($ehourhangarura) )
  $etimehangarura.="$ehourhangarura h ";

if ($eminhangarura != 0)
  $etimehangarura.= floor($eminhangarura)." min. ";

if (!empty($esechangarura) )
  $etimehangarura.="$esechangarura sec. ";

//silo
$temps1silo = (43200 * $siege_temps_evolution * (bcpow(1.9, $New_silo_lvl,3)));
if ($robo_lvl == "0") {
$stimesilo = (round($temps1silo));
}
else {
$stimesilo = (round($temps1silo*(bcpow(0.9, $robo_lvl,3))));
}
$etimesilo = $stimesilo;
$eminsilo = $etimesilo / 60;

if ( floor($eminsilo) != $eminsilo )
  $esecsilo = floor( ($eminsilo - floor( $eminsilo )) * 60);

  if ( $eminsilo > 60 ) {

    $ehoursilo = floor( $eminsilo / 60 );
    $eminsilo = $eminsilo - ( 60 * $ehoursilo );

    if ( $ehoursilo > 24 ) {
      $edaysilo = floor( $ehoursilo / 24);
      $ehoursilo = $ehoursilo - ( 24 * $edaysilo );
    }

  }

$etimesilo ="";

if (!empty($edaysilo) )
  $etimesilo.="$edaysilo j ";

if (!empty($ehoursilo) )
  $etimesilo.="$ehoursilo h ";

if ($eminsilo != 0)
  $etimesilo.= floor($eminsilo)." min. ";

if (!empty($esecsilo) )
  $etimesilo.="$esecsilo sec. ";

//mili
$temps1mili = (600 * $siege_temps_evolution * (bcpow(2, $New_mili_lvl,3)));
if ($robo_lvl == "0") {
$stimemili = (round($temps1mili));
}
else {
$stimemili = (round($temps1mili*(bcpow(0.9, $robo_lvl,3))));
}
$etimemili = $stimemili;
$eminmili = $etimemili / 60;

if ( floor($eminmili) != $eminmili )
  $esecmili = floor( ($eminmili - floor( $eminmili )) * 60);

  if ( $eminmili > 60 ) {

    $ehourmili = floor( $eminmili / 60 );
    $eminmili = $eminmili - ( 60 * $ehourmili );

    if ( $ehourmili > 24 ) {
      $edaymili = floor( $ehourmili / 24);
      $ehourmili = $ehourmili - ( 24 * $edaymili );
    }

  }

$etimemili ="";

if (!empty($edaymili) )
  $etimemili.="$edaymili j ";

if (!empty($ehourmili) )
  $etimemili.="$ehourmili h ";

if ($eminmili != 0)
  $etimemili.= floor($eminmili)." min. ";

if (!empty($esecmili) )
  $etimemili.="$esecmili sec. ";

//defense
$temps1defense = (650 * $siege_temps_evolution * (bcpow(1.35, $New_defense_lvl,3)));
if ($robo_lvl == "0") {
$stimedefense = (round($temps1defense));
}
else {
$stimedefense = (round($temps1defense*(bcpow(0.9, $robo_lvl,3))));
}
$etimedefense = $stimedefense;
$emindefense = $etimedefense / 60;

if ( floor($emindefense) != $emindefense )
  $esecdefense = floor( ($emindefense - floor( $emindefense )) * 60);

  if ( $emindefense > 60 ) {

    $ehourdefense = floor( $emindefense / 60 );
    $emindefense = $emindefense - ( 60 * $ehourdefense );

    if ( $ehourdefense > 24 ) {
      $edaydefense = floor( $ehourdefense / 24);
      $ehourdefense = $ehourdefense - ( 24 * $edaydefense );
    }

  }

$etimedefense ="";

if (!empty($edaydefense) )
  $etimedefense.="$edaydefense j ";

if (!empty($ehourdefense) )
  $etimedefense.="$ehourdefense h ";

if ($emindefense != 0)
  $etimedefense.= floor($emindefense)." min. ";

if (!empty($esecdefense) )
  $etimedefense.="$esecdefense sec. ";

//terri
$temps1terri = (33200 * $siege_temps_evolution * (bcpow(2, $New_terri_lvl,3)));
if ($robo_lvl == "0") {
$stimeterri = (round($temps1terri));
}
else {
$stimeterri = (round($temps1terri*(bcpow(0.9, $robo_lvl,3))));
}
$etimeterri = $stimeterri;
$eminterri = $etimeterri / 60;

if ( floor($eminterri) != $eminterri )
  $esecterri = floor( ($eminterri - floor( $eminterri )) * 60);

  if ( $eminterri > 60 ) {

    $ehourterri = floor( $eminterri / 60 );
    $eminterri = $eminterri - ( 60 * $ehourterri );

    if ( $ehourterri > 24 ) {
      $edayterri = floor( $ehourterri / 24);
      $ehourterri = $ehourterri - ( 24 * $edayterri );
    }

  }

$etimeterri ="";

if (!empty($edayterri) )
  $etimeterri.="$edayterri j ";

if (!empty($ehourterri) )
  $etimeterri.="$ehourterri h ";

if ($eminterri != 0)
  $etimeterri.= floor($eminterri)." min. ";

if (!empty($esecterri) )
  $etimeterri.="$esecterri sec. ";
//

echo"
<script language=\"javascript\">

function chrono(jours,heures,minutes,secondes,champs) {

  if (secondes > 0) {
    secondes--;
  }
  else {
    secondes = 59;

    if (minutes > 0) {
      minutes--;
    }
    else {
      minutes = 59;

      if (heures > 0) {
        heures--;
        jours--;
      }
      else {
        heures = 23;
      }
    }
  }

    seconde = secondes;
    minute = minutes;
    text = '';
    if (jours > 0) {
      text +=jours + 'j ';
    }
    if (heures > 0) {
      text +=heures + 'h ';
    }
    if (minutes < 10) {
      minute = '0' + minutes;
    }
    if (seconde < 10) {
      seconde = '0' + secondes;
    }
      text +=minute + 'm ' + seconde + 's';

  document.getElementById('ligne_' + champs).innerHTML = 'Temps restant : <font color=#800000>'+ text +'</font>';
  setTimeout(\"chrono(\" + jours + \",\" + heures + \",\" + minutes + \",\" + secondes + \",'\" + champs + \"')\", 1000);

    }
</script>
<STYLE TYPE=text/css>
.Style1 {color: #0000FF}
.Style2 {color: #FF0000}
.Style3 {color: #00CC00}
.Style4 {color: #999999}
.Style5 {color: #3399FF}
.Style6 {color: #FFFF00}
A.menulink {
width: 150px;
text-decoration: none;
font-family:Verdana;
font-size:11px;
color: #00CC00;
BORDER: none;
border: solid 1px #111111;
}

A.menulink:hover {
color: #00CC00;
border: solid 1px #111111;
background-color:#111111;
}
A.menulink2 {
width: 150px;
text-decoration: none;
font-family:Verdana;
font-size:11px;
color: #FF3300;
BORDER: none;
border: solid 1px #111111;
}

A.menulink2:hover {
border: solid 1px #111111;
background-color:#111111;
}
input {
border:1px solid #7E7E7E;
background-color:#222222;
font-family:'trebuchet ms',sans-serif;
color:white;
}
textarea {
border:1px solid #7E7E7E;
background-color:#000000;
font-family:'trebuchet ms',sans-serif;
color:white;
}
select, option {
background-color:#000000;
color:white;
}
</STYLE>";
echo"<div align=\"center\"><form name=\"colo\" method=\"post\" action=\"colonie.php\" target=\"_parent\">
<table align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td width=\"100\" rowspan=\"2\" valign=\"middle\">
       <div align=\"center\">
         <input name=\"page\" value=\"" . $PHP_SELF . "\" type=\"hidden\" id=\"page\">
         <select name=\"idcolo\" onchange=submit()>";
include ('colo2.php');

include ('evolutionbats.php');



// central
	echo"<br><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\">
   <tr>
     <td align=\"center\" colspan=\"2\" style =\"background-color:#222222;\"><b><a href=\"descentral.php\" target=\"_parent\">Centrale d'énergie thermique </a></b>(Niveau $central_lvl)</td>
   </tr>
   <tr style =\"background-color:#000000;\">
     <td width=\"120\" height=\"120\"><img src=\"imgs/central.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Les centrales d'énergie thermique transforment les rayons de soleil en énergie. Presque tous les bâtiments ont besoin d'énergie et plus précisément  d'électricité pour être en service.
	 <br><br>Coût : Fer : <b>$besoin_central_fer</b> ; Or : <b>$besoin_central_or</b><br>
       Temps de construction : $etimecentral</p>
     <p></td>
     </tr>
    <tr style =\"background-color:#111111;\">";
if ($place > 0 ) {
if ($evolution > 0) {
if ($construction == "central"){
     echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $tempsevolution<br><a href=\"Arretcentral.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_central_lvl</a></td>"; }
 	else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>";
	}}
 else {
		if ($newwfer_ressource >= ($besoin2_central_fer) && $newwor_ressource >= ($besoin2_central_or)) {
	echo"<td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutioncentral.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_central_lvl</a></td>";
	}
else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_central_lvl</p></td>";
	}}}else {echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Votre planète n'a plus de place disponible</p></td>"; }
echo"</tr>
 </table>";

// fission
if ($row2[techenergie_lvl] >= 4 && $row[ura_lvl] >= 5) {
	echo"<br><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\">
   <tr>
     <td align=\"center\" colspan=\"2\" style =\"background-color:#222222;\"><b><a href=\"desfission.php\" target=\"_parent\">Centrale énergétique au Naquadah </a></b>(Niveau $fission_lvl)</td>
   </tr>
   <tr style =\"background-color:#000000;\">
     <td width=\"120\" height=\"120\"><img src=\"imgs/fission.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Le Naquadah pouvant stocker et restituer par la suite de l'energie, on peut s'en servir pour alimenter en électricité une ville.
	 <br><br>Coût : Fer : <b>$besoin_fission_fer</b> ; Or : <b>$besoin_fission_or</b> ; Cristal : <b>$besoin_fission_ada</b><br>
	 Consomation de Naquadah par heure : $coutfission<br>
       Temps de construction : $etimefission</p>
     <p></td>
     </tr>
    <tr style =\"background-color:#111111;\">";
if ($place > 0 ) {
if ($evolution > 0) {
if ($construction == "fission"){
     echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $tempsevolution<br><a href=\"Arretfission.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_fission_lvl</a></td>"; }
 	else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>";
	}}
 else {
		if ($newwfer_ressource >= ($besoin2_fission_fer) && $newwor_ressource >= ($besoin2_fission_or) && $newwada_ressource >= ($besoin2_fission_ada)) {
	echo"<td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutionfission.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_fission_lvl</a></td>";
	}
else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_fission_lvl</p></td>";
	}}}else {echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Votre planète n'a plus de place disponible</p></td>"; }
echo"</tr>
 </table>";
}

// fer
echo"<br><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\">
   <tr>
     <td align=\"center\" colspan=\"2\" style =\"background-color:#222222;\"><b><a href=\"desfer.php\" target=\"_parent\">Mine de Fer </a></b>(Niveau $fer_lvl)</td>
   </tr>
   <tr style =\"background-color:#000000;\">
     <td width=\"120\" height=\"120\"><img src=\"imgs/fer.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Le fer est la matière première la plus utilisée : elle sert comme principale composant des infrastructures et dans la construction des coques des vaisseaux.
	 <br><br>Coût : Fer : <b>$besoin_fer_fer</b> ; Or : <b>$besoin_fer_or</b><br>
       Consommation d'energie : <b>$besoin_fer_energie</b>.<br>
       Temps de construction : $etimefer</p>
     <p></td>
     </tr>
    <tr style =\"background-color:#111111;\">";
if ($place > 0 ) {
if ($evolution > 0) {
	if ($construction == "fer"){
	if($row[fer_destruction] != "0000-00-00 00:00:00") {
	echo"<td align=\"center\" height=\"40\" colspan=\"2\"<p class=\"Style1\">Batiment en cours de destruction : $tempsevolution<br><a href=\"ArretDestructionfer.php\" target=\"_parent\" class=menulink2>Arreter la destruction du niveau $fer_lvl</a></td>";
	} else {
	echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $tempsevolution<br><a href=\"Arretfer.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_fer_lvl</a></td>";
 	}} else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>";
	}
}
 else {
	if ($newwfer_ressource >= ($besoin2_fer_fer) && $newwor_ressource >= ($besoin2_fer_or) && ($Total_energie_reste >= ($besoin_fer_energie))) {
	echo"<td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutionfer.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_fer_lvl</a></td>";
	} else {
		if ($Total_energie_reste < ($besoin_fer_energie)) {
			if ($newwfer_ressource >= ($besoin2_fer_fer) && $newwor_ressource >= ($besoin2_fer_or)) {
			echo"<td align=\"center\" colspan=\"2\"><p class=\"Style6\">Pas assez d'energie pour l'am&eacute;lioration au niveau $New_fer_lvl</p></td>"; }
			if ($newwfer_ressource <= ($besoin2_fer_fer) | $newwor_ressource <= ($besoin2_fer_or)) {
			echo"<td align=\"center\" colspan=\"2\"><p class=\"Style5\">Pas assez de ressource et d'energie pour l'am&eacute;lioration au niveau $New_fer_lvl</p></td>"; }}
		else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_fer_lvl</p></td>"; }
	}}}else {echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Votre planète n'a plus de place disponible</p></td>"; }
echo"</tr>
 </table>";

// exfer
if ($row[fer_lvl] >= "20" ) {
	echo"<br><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\">
   <tr>
     <td align=\"center\" colspan=\"2\" style =\"background-color:#222222;\"><b><a href=\"desexfer.php\" target=\"_parent\">Centre d'extraction du fer </a></b>(Niveau $exfer_lvl)</td>
   </tr>
   <tr style =\"background-color:#000000;\">
     <td width=\"120\" height=\"120\"><img src=\"imgs/vide.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Grâce à la recherche, les chercheurs on trouvé un moyens de récupérer le fer plus profond. Par le même procédé que les \"piles rechargeable\" on peu maintenant récupérer du fer en fusion.

	 <br><br>Coût : Fer : <b>$besoin_exfer_fer</b> ; Or : <b>$besoin_exfer_or</b> ; Cristal : <b>$besoin_exfer_ada</b><br>
       Consommation d'energie : <b>$besoin_exfer_energie</b>.<br>
       Temps de construction : $etimeexfer</p>
     <p></td>
     </tr>
    <tr style =\"background-color:#111111;\">";
if ($place > 0 ) {
if ($evolution > 0) {
	if ($construction == "exfer"){
	if($row[exfer_destruction] != "0000-00-00 00:00:00") {
	echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de destruction : $tempsevolution<br><a href=\"ArretDestructionexfer.php\" target=\"_parent\" class=menulink2>Arreter la destruction du niveau $exfer_lvl</a></td>";
	} else {
    echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $tempsevolution<br><a href=\"Arretexfer.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_exfer_lvl</a></td>"; }
 	} else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>";
	}}
 else {
if ($newwfer_ressource >= ($besoin2_exfer_fer) && $newwor_ressource >= ($besoin2_exfer_or) && ($Total_energie_reste >= ($besoin_exfer_energie))) {
	echo"<td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutionexfer.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_exfer_lvl</a></td>";
	}
else {
if ($Total_energie_reste < ($besoin_exfer_energie)) {
if ($newwfer_ressource >= ($besoin2_exfer_fer) && $newwor_ressource >= ($besoin2_exfer_or)) {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style6\">Pas assez d'energie pour l'am&eacute;lioration au niveau $New_exfer_lvl</p></td>"; }
if ($newwfer_ressource <= ($besoin2_exfer_fer) | $newwor_ressource <= ($besoin2_exfer_or)) {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style5\">Pas assez de ressource et d'energie pour l'am&eacute;lioration au niveau $New_exfer_lvl</p></td>"; }}
else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_exfer_lvl</p></td>"; }
	}}} else {echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Votre planète n'a plus de place disponible</p></td>"; }
   echo"</tr>
 </table>";
	}

// or
	echo"<br><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\">
   <tr>
     <td align=\"center\" colspan=\"2\" style =\"background-color:#222222;\"><b><a href=\"desor.php\" target=\"_parent\">Mine d'or </a></b>(Niveau $or_lvl)</td>
   </tr>
   <tr style =\"background-color:#000000;\">
     <td width=\"120\" height=\"120\"><img src=\"imgs/or.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>L'or est la matière principale entrant dans la fabrication de circuits électriques et autres installations électromagnétiques.
	 <br><br>Coût : Fer : <b>$besoin_or_fer</b> ; Or : <b>$besoin_or_or</b><br>
       Consommation d'energie : <b>$besoin_or_energie</b>.<br>
       Temps de construction : $etimeor</p>
     <p></td>
     </tr>
    <tr style =\"background-color:#111111;\">";
if ($place > 0 ) {
if ($evolution > 0) {
	if ($construction == "or"){
	if($row[or_destruction] != "0000-00-00 00:00:00") {
	echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de destruction : $tempsevolution<br><a href=\"ArretDestructionor.php\" target=\"_parent\" class=menulink2>Arreter la destruction du niveau $or_lvl</a></td>";
	} else {
     echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $tempsevolution<br><a href=\"Arretor.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_or_lvl</a></p></td>"; }
 	} else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>";
	}}
 else {
if ($newwfer_ressource >= ($besoin2_or_fer) && $newwor_ressource >= ($besoin2_or_or) && ($Total_energie_reste >= $besoin_or_energie)) {
	echo"<td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutionor.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_or_lvl</a></td>";
	}
else {
if ($Total_energie_reste < ($besoin_or_energie)) {
	if ($newwfer_ressource >= ($besoin2_or_fer) && $newwor_ressource >= ($besoin2_or_or)) {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style6\">Pas assez d'energie pour l'am&eacute;lioration au niveau $New_or_lvl</p></td>"; }
	if ($newwfer_ressource <= ($besoin2_or_fer) | $newwor_ressource <= ($besoin2_or_or)) {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style5\">Pas assez de ressource et d'energie pour l'am&eacute;lioration au niveau $New_or_lvl</p></td>"; }}
else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_or_lvl</p></td>"; }
	}}} else {echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Votre planète n'a plus de place disponible</p></td>"; }
echo"</tr>
 </table>";

// exor
if ( $row[or_lvl] >= "20" ) {
	echo"<br><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\">
   <tr>
     <td align=\"center\" colspan=\"2\" style =\"background-color:#222222;\"><b><a href=\"desexor.php\" target=\"_parent\">Centre d'extraction d'or </a></b>(Niveau $exor_lvl)</td>
   </tr>
   <tr style =\"background-color:#000000;\">
     <td width=\"120\" height=\"120\"><img src=\"imgs/vide.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Grâce à la recherche, les chercheurs on trouvé un moyens de récupérer l'or plus profond. Par le même procédé que les \"piles rechargeable\" on peu maintenant récupérer de l'or en fusion.

	 <br><br>Coût : Fer : <b>$besoin_exor_fer</b> ; Or : <b>$besoin_exor_or</b> ; Cristal : <b>$besoin_exor_ada</b><br>
       Consommation d'energie : <b>$besoin_exor_energie</b>.<br>
       Temps de construction : $etimeexor</p>
     <p></td>
     </tr>
    <tr style =\"background-color:#111111;\">";
if ($place > 0 ) {
if ($evolution > 0) {
	if ($construction == "exor"){
	if($row[exor_destruction] != "0000-00-00 00:00:00") {
	echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de destruction : $tempsevolution<br><a href=\"ArretDestructionexor.php\" target=\"_parent\" class=menulink2>Arreter la destruction du niveau $exor_lvl</a></td>";
	} else {
     echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $tempsevolution<br><a href=\"Arretexor.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_exor_lvl</a></td>"; }
 	} else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>";
	}}
 else {
if ($newwfer_ressource >= ($besoin2_exor_fer) && $newwor_ressource >= ($besoin2_exor_or) && ($Total_energie_reste >= $besoin_exor_energie)) {
	echo"<td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutionexor.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_exor_lvl</a></td>";
	}
else {
if ($Total_energie_reste < ($besoin_exor_energie)) {
if ($newwfer_ressource >= ($besoin2_exor_fer) && $newwor_ressource >= ($besoin2_exor_or)) {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style6\">Pas assez d'energie pour l'am&eacute;lioration au niveau $New_exor_lvl</p></td>"; }
if ($newwfer_ressource <= ($besoin2_exor_fer) | $newwor_ressource <= ($besoin2_exor_or)) {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style5\">Pas assez de ressource et d'energie pour l'am&eacute;lioration au niveau $New_exor_lvl</p></td>"; }}
else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_exor_lvl</p></td>"; }
	}}}else {echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Votre planète n'a plus de place disponible</p></td>"; }
echo"</tr>
 </table>";
 }


// ada
	echo"<br><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\">
   <tr>
     <td align=\"center\" colspan=\"2\" style =\"background-color:#222222;\"><b><a href=\"desada.php\" target=\"_parent\">Mine de Cristal </a></b>(Niveau $ada_lvl)</td>
   </tr>
   <tr style =\"background-color:#000000;\">
     <td width=\"120\" height=\"120\"><img src=\"imgs/cristal.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Extrait du cristal des mines de la planète.
	 <br><br>Coût : Fer : <b>$besoin_ada_fer</b> ; Or : <b>$besoin_ada_or</b><br>
       Consommation d'energie : <b>$besoin_ada_energie</b>.<br>
       Temps de construction : $etimeada</p>
     <p></td>
     </tr>
    <tr style =\"background-color:#111111;\">";
if ($place > 0 ) {
if ($evolution > 0) {
	if ($construction == "ada"){
	if($row[ada_destruction] != "0000-00-00 00:00:00") {
	echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de destruction : $tempsevolution<br><a href=\"ArretDestructionada.php\" target=\"_parent\" class=menulink2>Arreter la destruction du niveau $ada_lvl</a></td>";
	} else {
     echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $tempsevolution<br><a href=\"Arretada.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_ada_lvl</a></td>"; }
 	} else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>";
	}}
 else {
	if ($newwfer_ressource >= ($besoin2_ada_fer) && $newwor_ressource >= ($besoin2_ada_or) && ($Total_energie_reste >= $besoin_ada_energie)) {
	echo"<td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutionada.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_ada_lvl</a></td>";
	}
else {
	if ($Total_energie_reste < ($besoin_ada_energie)) {
		if ($newwfer_ressource >= ($besoin2_ada_fer) && $newwor_ressource >= ($besoin2_ada_or)) {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style6\">Pas assez d'energie pour l'am&eacute;lioration au niveau $New_ada_lvl</p></td>"; }
		if ($newwfer_ressource <= ($besoin2_ada_fer) | $newwor_ressource <= ($besoin2_ada_or)) {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style5\">Pas assez de ressource et d'energie pour l'am&eacute;lioration au niveau $New_ada_lvl</p></td>"; }}
else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_ada_lvl</p></td>"; }
	}}}else {echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Votre planète n'a plus de place disponible</p></td>"; }
echo"</tr>
 </table>";

// ura
	echo"<br><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\">
   <tr>
     <td align=\"center\" colspan=\"2\" style =\"background-color:#222222;\"><b><a href=\"desura.php\" target=\"_parent\">Mine de Naquadah </a></b>(Niveau $ura_lvl)</td>
   </tr>
   <tr style =\"background-color:#000000;\">
     <td width=\"120\" height=\"120\"><img src=\"imgs/naqua.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Extrait du Naquadah des rares mines de la planéte.
	 <br><br>Coût : Fer : <b>$besoin_ura_fer</b> ; Or : <b>$besoin_ura_or</b> ; Cristal : <b>$besoin_ura_ada</b><br>
       Consommation d'energie : <b>$besoin_ura_energie</b>.<br>
       Temps de construction : $etimeura</p>
     <p></td>
     </tr>
    <tr style =\"background-color:#111111;\">";
if ($place > 0 ) {
if ($evolution > 0) {
	if ($construction == "ura"){
	if($row[ura_destruction] != "0000-00-00 00:00:00") {
	echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de destruction : $tempsevolution<br><a href=\"ArretDestructionura.php\" target=\"_parent\" class=menulink2>Arreter la destruction du niveau $ura_lvl</a></td>";
	} else {
     echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $tempsevolution<br><a href=\"Arretura.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_ura_lvl</a></td>"; }
 	} else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>";
	}}
 else {
if ($newwfer_ressource >= ($besoin2_ura_fer) && $newwor_ressource >= ($besoin2_ura_or) && $newwada_ressource >= ($besoin2_ura_ada) && ($Total_energie_reste >= $besoin_ura_energie)) {
	echo"<td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutionura.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_ura_lvl</a></td>";
	}
else {
if ($Total_energie_reste < ($besoin_ura_energie)) {
if ($newwfer_ressource >= ($besoin2_ura_fer) && $newwor_ressource >= ($besoin2_ura_or) && $newwada_ressource >= ($besoin2_ura_ada)) {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style6\">Pas assez d'energie pour l'am&eacute;lioration au niveau $New_ura_lvl</p></td>"; }
if ($newwfer_ressource <= ($besoin2_ura_fer) | $newwor_ressource <= ($besoin2_ura_or) | $newwada_ressource <= ($besoin2_ura_ada)) {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style5\">Pas assez de ressource et d'energie pour l'am&eacute;lioration au niveau $New_ura_lvl</p></td>"; }}
else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_ura_lvl</p></td>"; }
	}}}else {echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Votre planète n'a plus de place disponible</p></td>"; }
echo"</tr>
 </table>";

// robo
	echo"<br><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\">
   <tr>
     <td align=\"center\" colspan=\"2\" style =\"background-color:#222222;\"><b><a href=\"desrobo.php\" target=\"_parent\">Usine Robotique </a></b>(Niveau $robo_lvl)</td>
   </tr>
   <tr style =\"background-color:#000000;\">
     <td width=\"120\" height=\"120\"><img src=\"imgs/robo.gif\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>L'usine Robotique crée des robots qualifiés pour la main d'oeuvre. Les robots vont donc servir à construire plus rapidement les infrastructures et les vaisseaux.
	 <br><br>Coût : Fer : <b>$besoin_robo_fer</b> ; Or : <b>$besoin_robo_or</b> ; Cristal : <b>$besoin_robo_ada</b><br>
       Temps de construction : $etimerobo</p>
     <p></td>
     </tr>
    <tr style =\"background-color:#111111;\">";
if ($place > 0 ) {
if ($evolution > 0) {
	if ($construction == "robo"){
	if($row[robo_destruction] != "0000-00-00 00:00:00") {
	echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de destruction : $tempsevolution<br><a href=\"ArretDestructionrobo.php\" target=\"_parent\" class=menulink2>Arreter la destruction du niveau $robo_lvl</a></td>";
	} else {
     echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $tempsevolution<br><a href=\"Arretrobo.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_robo_lvl</a></td>"; }
 	} else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>";
	}}
 else {
	if ($newwfer_ressource >= ($besoin2_robo_fer) && $newwor_ressource >= ($besoin2_robo_or) && $newwada_ressource >= ($besoin2_robo_ada)) {
	echo"<td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutionrobo.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_robo_lvl</a></td>";
	}
else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_robo_lvl</p></td>";
	}}}else {echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Votre planète n'a plus de place disponible</p></td>"; }
echo"</tr>
 </table>";

// siege
if ($row2[techordi_lvl] >= 10 && $row2[techproAncien_lvl] >= 5 && $labo_lvl >= 8) {
	echo"<br><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\">
   <tr>
     <td align=\"center\" colspan=\"2\" style =\"background-color:#222222;\"><b><a href=\"dessiege.php\" target=\"_parent\">Siége des Anciens </a></b>(Niveau $siege_lvl)</td>
   </tr>
   <tr style =\"background-color:#000000;\">
     <td width=\"120\" height=\"120\"><img src=\"imgs/siege.gif\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Le siége des Anciens est un système de contrôle très puissant. Il permet de gérer énormément de chose rien que par la pensée. C'est une évolution sans précèdent de l'informatique de base.
	 <br><br>Coût : Fer : <b>$besoin_siege_fer</b> ; Or : <b>$besoin_siege_or</b> ; Cristal : <b>$besoin_siege_ada</b> ; Naquadah : <b>$besoin_siege_ura</b><br>
       Temps de construction : $etimesiege</p>
     <p></td>
     </tr>
    <tr style =\"background-color:#111111;\">";
if ($place > 0 ) {
if ($evolution > 0) {
	if ($construction == "siege"){
	if($row[siege_destruction] != "0000-00-00 00:00:00") {
	echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de destruction : $tempsevolution<br><a href=\"ArretDestructionsiege.php\" target=\"_parent\" class=menulink2>Arreter la destruction du niveau $siege_lvl</a></td>";
	} else {
     echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $tempsevolution<br><a href=\"Arretsiege.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_siege_lvl</a></td>"; }
 	} else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>";
	}}
 else {
	if ($newwfer_ressource >= ($besoin2_siege_fer) && $newwor_ressource >= ($besoin2_siege_or) && $newwada_ressource >= ($besoin2_siege_ada) && $newwura_ressource >= ($besoin2_siege_ura)) {
	echo"<td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutionsiege.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_siege_lvl</a></td>";
	}
else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_siege_lvl</p></td>";
	}}}else {echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Votre planète n'a plus de place disponible</p></td>"; }
echo"</tr>
 </table>";
}

// mili
if ( $row[robo_lvl] >= "1" ) {
	echo"<br><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\">
   <tr>
     <td align=\"center\" colspan=\"2\" style =\"background-color:#222222;\"><b><a href=\"desmili.php\" target=\"_parent\">Caserne Militaire</a></b>(Niveau $mili_lvl)</td>
   </tr>
   <tr style =\"background-color:#000000;\">
     <td width=\"120\" height=\"120\"><img src=\"imgs/mili.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>La caserne militaire permet de former des hommes aux combats. Ils sont en première ligne lors de combats, mais servent aussi pour explorer de nouvelles planètes et biensur à piloter les vaisseaux.
	 <br><br>Coût : Fer : <b>$besoin_mili_fer</b> ; Or : <b>$besoin_mili_or</b><br>
       Temps de construction : $etimemili</p>
     <p></td>
     </tr>
    <tr style =\"background-color:#111111;\">";
if ($place > 0 ) {
if ($evolution > 0) {
	if ($construction == "mili"){
	if($row[mili_destruction] != "0000-00-00 00:00:00") {
	echo"$row[mili_destruction]";
	echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de destruction : $tempsevolution<br><a href=\"ArretDestructionmili.php\" target=\"_parent\" class=menulink2>Arreter la destruction du niveau $mili_lvl</a></td>";
	} else {
     echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $tempsevolution<br><a href=\"Arretmili.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_mili_lvl</a></td>"; }
 	} else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>";
	}}
 else {
	if ($newwfer_ressource >= ($besoin2_mili_fer) && $newwor_ressource >= ($besoin2_mili_or)) {
	echo"<td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutionmili.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_mili_lvl</a></td>";
	}
else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_mili_lvl</p></td>";
	}}}else {echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Votre planète n'a plus de place disponible</p></td>"; }
echo"</tr>
 </table>";
}

// chantier
if ( $row[robo_lvl] >= "2" ) {
	echo"<br><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\">
   <tr>
     <td align=\"center\" colspan=\"2\" style =\"background-color:#222222;\"><b><a href=\"deschantier.php\" target=\"_parent\">Chantier spatial </a></b>(Niveau $chantier_lvl)</td>
   </tr>
   <tr style =\"background-color:#000000;\">
     <td width=\"120\" height=\"120\"><img src=\"imgs/chantier.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Le chantier spatial permet de construire des vaisseaux de commerce ou militaire sur la planète.
Le chantier spatial est limité en place, il ne peut donc pas garder en stationnement un grand nombre de vaisseaux.
Ce nombre augmente quand le chantier spatial est agrandi.Si le nombre de place est inférieur au nombre de vaisseaux, la surface exploitable de la planète diminuera de 1 par vaisseau à quai.
	 <br><br>Coût : Fer : <b>$besoin_chantier_fer</b> ; Or : <b>$besoin_chantier_or</b> ; Cristal : <b>$besoin_chantier_ada</b><br>
       Temps de construction : $etimechantier</p>
     <p></td>
     </tr>
    <tr style =\"background-color:#111111;\">";
if ($place > 0 ) {
$req8 = "SELECT * FROM matgraph_constructionvaisseaux WHERE findeconstruction > ".time()." AND proprietaire='$planete' ";
$res8 = db_mysql_Query($req8);
$num8 = mysql_num_rows($res8);
if ($num8 >0) {
echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Construction en cours</td>"; }
else {
if ($evolution > 0) {
	if ($construction == "chantier"){
	if($row[chantier_destruction] != "0000-00-00 00:00:00") {
	echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de destruction : $tempsevolution<br><a href=\"ArretDestructionchantier.php\" target=\"_parent\" class=menulink2>Arreter la destruction du niveau $chantier_lvl</a></td>";
	} else {
    echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $tempsevolution<br><a href=\"Arretchantier.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_chantier_lvl</a></td>"; }
 	} else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>";
	}}
 else {
	if ($newwfer_ressource >= ($besoin2_chantier_fer) && $newwor_ressource >= ($besoin2_chantier_or) && $newwada_ressource >= ($besoin2_chantier_ada)) {
	echo"<td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutionchantier.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_chantier_lvl</a></td>";
	}
else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_chantier_lvl</p></td>";
	}}}}else {echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Votre planète n'a plus de place disponible</p></td>"; }
echo"</tr>
 </table>";
 }


// defense
if ( $row[robo_lvl] >= "3" ) {
	echo"<br><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\">
   <tr>
     <td align=\"center\" colspan=\"2\" style =\"background-color:#222222;\"><b><a href=\"desdefense.php\" target=\"_parent\">Centre Militaire de Defense Interplanétaire </a></b>(Niveau $defense_lvl)</td>
   </tr>
   <tr style =\"background-color:#000000;\">
     <td width=\"120\" height=\"120\"><img src=\"imgs/centredef.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Ce centre permet de développer à partir des technologies d'armement, un systéme de défense contre ce type d'arme.
	 <br><br>Coût : Fer : <b>$besoin_defense_fer</b> ; Or : <b>$besoin_defense_or</b> ; Cristal : <b>$besoin_defense_ada</b><br>
       Temps de construction : $etimedefense</p>
     <p></td>
     </tr>
    <tr style =\"background-color:#111111;\">";
if ($place > 0 ) {
$req7 = "SELECT * FROM matgraph_constructiondef WHERE findeconstruction > ".time()." AND proprietaire='$planete' ";
$res7 = db_mysql_Query($req7);
$num7 = mysql_num_rows($res7);
if ($num7 >0) {
echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Construction en cours</td>"; }
else {
if ($evolution > 0) {
	if ($construction == "defense"){
	if($row[defense_destruction] != "0000-00-00 00:00:00") {
	echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de destruction : $tempsevolution<br><a href=\"ArretDestructiondefense.php\" target=\"_parent\" class=menulink2>Arreter la destruction du niveau $defense_lvl</a></td>";
	} else {
     echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $tempsevolution<br><a href=\"Arretdefense.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_defense_lvl</a></td>"; }
 	} else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>";
	}}
 else {
	if ($newwfer_ressource >= ($besoin2_defense_fer) && $newwor_ressource >= ($besoin2_defense_or) && $newwada_ressource >= ($besoin2_defense_ada)) {
	echo"<td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutiondefense.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_defense_lvl</a></td>";
	}
else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_defense_lvl</p></td>";
	}}}}else {echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Votre planète n'a plus de place disponible</p></td>"; }
echo"</tr>
 </table>";
}


// hangarfer
	echo"<br><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\">
   <tr>
     <td align=\"center\" colspan=\"2\" style =\"background-color:#222222;\"><b><a href=\"deshangarfer.php\" target=\"_parent\">Zone de Stockage du fer </a></b>(Niveau $hangarfer_lvl)</td>
   </tr>
   <tr style =\"background-color:#000000;\">
     <td width=\"120\" height=\"120\"><img src=\"imgs/hangarfer.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>La zone de stockage de fer est une immense plateforme qui permete le stockage du fer.
	 <br><br>Coût : Fer : <b>$besoin_hangarfer_fer</b><br>
       Temps de construction : $etimehangarfer</p>
     <p></td>
     </tr>
    <tr style =\"background-color:#111111;\">";
if ($place > 0 ) {
if ($evolution > 0) {
	if ($construction == "hangarfer"){
	if($row[hangarfer_destruction] != "0000-00-00 00:00:00") {
	echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de destruction : $tempsevolution<br><a href=\"ArretDestructionhangarfer.php\" target=\"_parent\" class=menulink2>Arreter la destruction du niveau $hangarfer_lvl</a></td>";
	} else {
     echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $tempsevolution<br><a href=\"Arrethangarfer.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_hangarfer_lvl</a></td>"; }
 	} else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>";
	}}
 else {
	if ($newwfer_ressource >= ($besoin2_hangarfer_fer)) {
	echo"<td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutionhangarfer.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_hangarfer_lvl</a></td>";
	}
else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_hangarfer_lvl</p></td>";
	}}}else {echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Votre planète n'a plus de place disponible</p></td>"; }
echo"</tr>
 </table>";

// hangaror
	echo"<br><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\">
   <tr>
     <td align=\"center\" colspan=\"2\" style =\"background-color:#222222;\"><b><a href=\"deshangaror.php\" target=\"_parent\">Zone de Stockage de l’or </a></b>(Niveau $hangaror_lvl)</td>
   </tr>
   <tr style =\"background-color:#000000;\">
     <td width=\"120\" height=\"120\"><img src=\"imgs/hangaror.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>La zone de stockage de l’or est une immense plateforme qui permete le stockage de l’or.
	 <br><br>Coût : Fer : <b>$besoin_hangaror_fer</b> ; Or : <b>$besoin_hangaror_or</b><br>
       Temps de construction : $etimehangaror</p>
     <p></td>
     </tr>
    <tr style =\"background-color:#111111;\">";
if ($place > 0 ) {
	if ($evolution > 0) {
		if ($construction == "hangaror"){
			if($row[hangaror_destruction] != "0000-00-00 00:00:00") {
				echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de destruction : $tempsevolution<br><a href=\"ArretDestructionhangaror.php\" target=\"_parent\" class=menulink2>Arreter la destruction du niveau $hangaror_lvl</a></td>";
			} else {
    			echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $tempsevolution<br><a href=\"Arrethangaror.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_hangaror_lvl</a></td>"; }
 		} else {
			echo"<td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>";
		}
	}
	 else {
		if ($newwfer_ressource >= ($besoin2_hangaror_fer) && $newwor_ressource >= ($besoin2_hangaror_or)) {
			echo"<td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutionhangaror.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_hangaror_lvl</a></td>";
		}
		else {
			echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_hangaror_lvl</p></td>";
		}
	}
}
else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Votre planète n'a plus de place disponible</p></td>";
}
echo"</tr>
 </table>";

// hangarada
	echo"<br><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\">
   <tr>
     <td align=\"center\" colspan=\"2\" style =\"background-color:#222222;\"><b><a href=\"deshangarada.php\" target=\"_parent\">Zone de Stockage du Cristal </a></b>(Niveau $hangarada_lvl)</td>
   </tr>
   <tr style =\"background-color:#000000;\">
     <td width=\"120\" height=\"120\"><img src=\"imgs/hangarada.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>La zone de stockage du cristal est une immense plateforme qui permete le stockage du cristal.
	 <br><br>Coût : Fer : <b>$besoin_hangarada_fer</b> ; Or : <b>$besoin_hangarada_or</b><br>
       Temps de construction : $etimehangarada</p>
     <p></td>
     </tr>
    <tr style =\"background-color:#111111;\">";
if ($place > 0 ) {
if ($evolution > 0) {
	if ($construction == "hangarada"){
	if($row[hangarada_destruction] != "0000-00-00 00:00:00") {
	echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de destruction : $tempsevolution<br><a href=\"ArretDestructionhangarada.php\" target=\"_parent\" class=menulink2>Arreter la destruction du niveau $hangarada_lvl</a></td>";
	} else {
     echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $tempsevolution<br><a href=\"Arrethangarada.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_hangarada_lvl</a></td>"; }
 	} else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>";
	}}
 else {
	if ($newwfer_ressource >= ($besoin2_hangarada_fer) && $newwor_ressource >= ($besoin2_hangarada_or)) {
	echo"<td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutionhangarada.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_hangarada_lvl</a></td>";
	}
else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_hangarada_lvl</p></td>";
	}}}else {echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Votre planète n'a plus de place disponible</p></td>"; }
echo"</tr>
 </table>";

// hangarura
	echo"<br><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\">
   <tr>
     <td align=\"center\" colspan=\"2\" style =\"background-color:#222222;\"><b><a href=\"deshangarura.php\" target=\"_parent\">Cuve de Stockage du Naquadah </a></b>(Niveau $hangarura_lvl)</td>
   </tr>
   <tr style =\"background-color:#000000;\">
     <td width=\"120\" height=\"120\"><img src=\"imgs/hangaruragif.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>La cuve de stockage de l’uranium est un immense silo capable de conserver le Naquadah sans danger avant son utilisation.
	 <br><br>Coût : Fer : <b>$besoin_hangarura_fer</b> ; Or : <b>$besoin_hangarura_or</b> ; Cristal : <b>$besoin_hangarura_ada</b><br>
       Temps de construction : $etimehangarura</p>
     <p></td>
     </tr>
    <tr style =\"background-color:#111111;\">";
if ($place > 0 ) {
if ($evolution > 0) {
	if ($construction == "hangarura"){
	if($row[hangarura_destruction] != "0000-00-00 00:00:00") {
	echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de destruction : $tempsevolution<br><a href=\"ArretDestructionhangarura.php\" target=\"_parent\" class=menulink2>Arreter la destruction du niveau $hangarura_lvl</a></td>";
	} else {
     echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $tempsevolution<br><a href=\"Arrethangarura.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_hangarura_lvl</a></td>"; }
 	} else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>";
	}}
 else {
	if ($newwfer_ressource >= ($besoin2_hangarura_fer) && $newwor_ressource >= ($besoin2_hangarura_or) && $newwada_ressource >= ($besoin2_hangarura_ada)) {
	echo"<td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutionhangarura.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_hangarura_lvl</a></td>";
	}
else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_hangarura_lvl</p></td>";
	}}}else {echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Votre planète n'a plus de place disponible</p></td>"; }
echo"</tr>
 </table>";

// labo
	echo"<br><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\">
   <tr>
     <td align=\"center\" colspan=\"2\" style =\"background-color:#222222;\"><b><a href=\"deslabo.php\" target=\"_parent\">Centre de recherches scientifiques </a></b>(Niveau $labo_lvl)</td>
   </tr>
   <tr style =\"background-color:#000000;\">
     <td width=\"120\" height=\"120\"><img src=\"imgs/labo.gif\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Le centre de recherches scientifiques permet de développer des technologies de type militaire ou économique.
	 <br><br>Coût : Fer : <b>$besoin_labo_fer</b> ; Or : <b>$besoin_labo_or</b> ; Cristal : <b>$besoin_labo_ada</b><br>
       Temps de construction : $etimelabo</p>
     <p></td>
     </tr>
    <tr style =\"background-color:#111111;\">";
if ($place > 0 ) {
if ($row[labo_util] == "1") {
echo"<td align=\"center\" colspan=\"2\"><p class=\"Style1\">Recherche en cours</td>"; }else {
if ($evolution > 0) {
	if ($construction == "labo"){
	if($row[labo_destruction] != "0000-00-00 00:00:00") {
	echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de destruction : $tempsevolution<br><a href=\"ArretDestructionlabo.php\" target=\"_parent\" class=menulink2>Arreter la destruction du niveau $labo_lvl</a></td>";
	} else {
     echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $tempsevolution<br><a href=\"Arretlabo.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_labo_lvl</a></td>"; }
 	} else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>";
	}}
 else {
if ($newwfer_ressource >= ($besoin2_labo_fer) && $newwor_ressource >= ($besoin2_labo_or) && $newwada_ressource >= ($besoin2_labo_ada)) {
	echo"<td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutionlabo.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_labo_lvl</a></td>";
	}
else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_labo_lvl</p></td>";
	}}}}else {echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Votre planète n'a plus de place disponible</p></td>"; }
echo"</tr>
 </table>";
// terri
echo"<br><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\">
   <tr>
     <td align=\"center\" colspan=\"2\" style =\"background-color:#222222;\"><b><a href=\"desterri.php\" target=\"_parent\">Vaisseau Terraformeur </a></b>(Niveau $terri_lvl)</td>
   </tr>
   <tr style =\"background-color:#000000;\">
     <td width=\"120\" height=\"120\"><img src=\"imgs/terraformeur.gif\" width=\"120\" height=\"125\"></td>
     <td width=\"498\" valign=\"top\"><p>Le vaisseau Terraformeur permet de modifier l'aspect d'une planète et de la remodeler.
Il est donc possible de l'utiliser afin d'agrandir la place des planètes.
	 <br><br>Coût : Fer : <b>$besoin_terri_fer</b> ; Or : <b>$besoin_terri_or</b><br>
       Temps de construction : $etimeterri</p>
     <p></td>
     </tr>
    <tr style =\"background-color:#111111;\">";
if ($evolution > 0) {
if ($construction == "terri"){
     echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $tempsevolution<br><a href=\"Arretterri.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_terri_lvl</a></td>"; }
 	else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>";
	}}
 else {
	if ($newwfer_ressource > ($besoin2_terri_fer) && $newwor_ressource > ($besoin2_terri_or)) {
	echo"<td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutionterri.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_terri_lvl</a></td>";
	}
else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_terri_lvl</p></td>";
	}}
echo"</tr>
 </table>";
// silo
echo"<br><table width=\"618\" border=\"0\" cellspacing=\"0\" cellpadding=\"2\" bordercolor=\"#000000\" style=\"font-family:trebuchet ms,sans-serif; font-size: 9pt ;\">
   <tr>
     <td align=\"center\" colspan=\"2\" style =\"background-color:#222222;\"><b><a href=\"desbabel.php\" target=\"_parent\">Temple de Dakara </a></b>(Niveau $silo_lvl)</td>
   </tr>
   <tr style =\"background-color:#000000;\">
     <td width=\"120\" height=\"120\"><img src=\"imgs/dakara.jpg\" width=\"120\" height=\"125\"></td>
     <td width=\"498\" valign=\"top\"><p>Le Temple de Dakara est l’ultime héritage des Anciens d’Atlantis. Ce temple est capable d’envoyer un rayon surpuissant capable de détruire les défenses adverse.
	 <br><br>Coût : Fer : <b>$besoin_silo_fer</b> ; Or : <b>$besoin_silo_or</b> ; Cristal : <b>$besoin_silo_ada</b><br>
       Temps de construction : $etimesilo</p>
     <p></td>
     </tr>
    <tr style =\"background-color:#111111;\">";
if ($place > 0 ) {
if ($evolution > 0) {
	if ($construction == "silo"){
	if($row[silo_destruction] != "0000-00-00 00:00:00") {
	echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de destruction : $tempsevolution<br><a href=\"ArretDestructionsilo.php\" target=\"_parent\" class=menulink2>Arreter la destruction du niveau $silo_lvl</a></td>";
	} else {
     echo"<td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $tempsevolution<br><a href=\"Arretsilo.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_silo_lvl</a></td>"; }
 	} else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>";
	}}
 else {
	if ($newwfer_ressource > ($besoin2_silo_fer) && $newwor_ressource > ($besoin2_silo_or) && $newwada_ressource > ($besoin2_silo_ada)) {
	echo"<td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutionsilo.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_silo_lvl</a></td>";
	}
else {
	echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_silo_lvl</p></td>";
	}}}else {echo"<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Votre planète n'a plus de place disponible</p></td>"; }
echo"</tr>
 </table>";

echo'<br><br><div align="center"><a href="http://www.xpldr.com" target="_blank"><img src="http://www.xpldr.com/Ban.gif" width="460" height="68" border="0" lowsrc="Xpldr"></a><br><br>';

mysql_close($connect);
?>