<?php
include ('logue.php'); 
include ('entete2.php');
include ('ressource.php');

$sql = "SELECT pts,fer_ressource,fer_lvl,fer_energie,fer_evolution,or_ressource,or_lvl,or_energie,or_evolution,ada_ressource,ada_lvl,ada_energie,ada_evolution,ura_ressource,ura_lvl,ura_energie,ura_evolution,central_energie,central_lvl,central_evolution,labo_lvl,labo_evolution,robo_lvl,robo_evolution,chantier_lvl,chantier_evolution,hangarfer_lvl,hangarfer_evolution,hangaror_lvl,hangaror_evolution,hangarada_lvl,hangarada_evolution,hangaror_lvl,hangarura_lvl,hangarura_evolution,silo_lvl,silo_evolution,exfer_lvl,exfer_energie,exfer_evolution,exor_lvl,exor_energie,exor_evolution,defense_lvl,defense_evolution,fission_lvl,fission_energie,fission_evolution,techenergie_lvl FROM matgraph_users WHERE id='$dataid[id]' ";
$res = db_mysql_Query($sql)or die('erreur sql<br>'.$sql.'<br>'.mysql_error());
$row = mysql_fetch_array($res); 

$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_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_fission_lvl = $row[fission_lvl] + 1;

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

$Total_energie_consom = $row[fer_energie] + $row[or_energie] + $row[exfer_energie] + $row[exor_energie] + $row[ada_energie] + $row[ura_energie] ;
$Total_energie_reste =  round(($New_central_energie + $New_fission_energie + $Total_energie_consom),0);
$Total_energie_prod = round(($New_central_energie + $New_fission_energie),0);

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

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

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

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

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

if ($row[ura_lvl] == "0") {
$besoin_ura_energie2 = "-68" ;
}
else {
$besoin_ura_energie2 = round(((-68 * (bcpow(2.1, ($row[ura_lvl] - 1),3))) - ($row[ura_energie])),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 = "60";
$besoin_fer_or = "15";
}
else {
$besoin_fer_fer = round((60 * ( bcpow( 1.3, ($row[fer_lvl] + 1),3))),0);
$besoin_fer_or = round((15 * ( bcpow( 1.3, ($row[fer_lvl] + 1),3))),0);
}

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

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

if ($row[ada_lvl] =="0") {
$besoin_ada_fer = "250";
$besoin_ada_or = "80";
}
else {
$besoin_ada_fer = round((250 * ( bcpow( 1.45, ($row[ada_lvl] + 1),3))),0);
$besoin_ada_or = round((80 * ( bcpow( 1.45, ($row[ada_lvl] + 1),3))),0);
}

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

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

if ($row[fission_lvl] =="0") {
$besoin_fer_ressource = "5200";
$besoin_or_ressource = "3000";
$besoin_ada_ressource = "750";
}
else {
$besoin_fer_ressource = round((5200 * ( bcpow( 1.6, ($row[fission_lvl] + 1),3))),0);
$besoin_or_ressource = round((3000 * ( bcpow( 1.6, ($row[fission_lvl] + 1),3))),0);
$besoin_ada_ressource = round((750 * ( bcpow( 1.6, ($row[fission_lvl] + 1),3))),0);
}

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

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

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

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

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

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

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

if ($row[silo_lvl] =="0") {
$besoin_silo_fer = "20000";
$besoin_silo_or = "20000";
$besoin_silo_ada = "1000";
}
else {
$besoin_silo_fer = round((20000 * ( bcpow( 1.9, ($row[silo_lvl] + 1),3))),0);
$besoin_silo_or = round((20000 * ( bcpow( 1.9, ($row[silo_lvl] + 1),3))),0);
$besoin_silo_ada = round((1000 * ( bcpow( 1.9, ($row[silo_lvl] + 1),3))),0);
}
if ($row[defense_lvl] =="0") {
$besoin_fer_ressource = "75";
$besoin_or_ressource = "150";
$besoin_ada_ressource = "75";
}
else {
$besoin_fer_ressource = round((75 * ( bcpow( 1.9, ($row[defense_lvl] + 1),3))),0);
$besoin_or_ressource = round((150 * ( bcpow( 1.9, ($row[defense_lvl] + 1),3))),0);
$besoin_ada_ressource = round((75 * ( bcpow( 1.9, ($row[defense_lvl] + 1),3))),0);
}

// 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];
}
// 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];
}

// 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[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[fission_evolution] != "0000-00-00 00:00:00") { $tempsevo = -1*$diftempsfission2 ; $construction = "fission" ; }

$etimeevo = $tempsevo;
$eminevo = $etimeevo / 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 );
    }

  }

$etimeevo ="";

if (!empty($edayevo) )
  $etimeevo.="$edayevo j ";

if (!empty($ehourevo) )
  $etimeevo.="$ehourevo h ";

if ($eminevo != 0)
  $etimeevo.= floor($eminevo)." min. ";

if (!empty($esecevo) ) 
  $etimeevo.="$esecevo sec. ";
  
/////////////// TEMPS //////////////
//FER 
$temps1fer = (108 * (bcpow(1.35, $New_fer_lvl,3)));
if ($robo_lvl == "0") {
$stimefer = (round($temps1fer));
}
else {
$stimefer = (round(($temps1fer) - ($temps1fer*0.1*$robo_lvl)));
} 
$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 * (bcpow(1.4, $New_or_lvl,3)));
if ($robo_lvl == "0") {
$stimeor = (round($temps1or));
}
else {
$stimeor = (round(($temps1or) - ($temps1or*0.1*$robo_lvl)));
} 
$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 * (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 * (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 * (bcpow(1.55, $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 = (565 * (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 * (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 = (108 * (bcpow(1.35, $New_fission_lvl,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 * (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. ";
  
//chantier 
$temps1chantier = (864 * (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 * (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 * (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 * (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 * (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 * (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. ";
//defense 
$temps1defense = (864 * (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. ";
   

//

include ('entete.php');
echo"<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 #000000;
}

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

A.menulink2:hover {
border: solid 1px #000000;
background-color:#000000;
}
</STYLE>
<div align=\"center\"><table width=\"550\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td width=\"100\"><div align=\"center\">Fer :</div></td>
     <td width=\"100\"><div align=\"center\">Or : </div></td>
     <td width=\"100\"><div align=\"center\">Adamentium : </div></td>
     <td width=\"100\"><div align=\"center\">Uranium : </div></td>
     <td width=\"150\"><div align=\"center\">Energie : </div></td>
   </tr>
   <tr>";
   if ($newwfer_ressource > (100000 *(bcpow(1.5, $row[hangarfer_lvl],3)))){
     echo"<td><div align=\"center\"><p class=\"Style2\">$newwfer_ressource </p></div></td>"; }
	 else {echo"<td><div align=\"center\">$newwfer_ressource </div></td>"; }
   if ($newwor_ressource > (100000 *(bcpow(1.5, $row[hangaror_lvl],3)))){
     echo"<td><div align=\"center\"><p class=\"Style2\">$newwor_ressource </p></div></td>"; }
	 else {echo"<td><div align=\"center\">$newwor_ressource </div></td>"; }
   if ($newwada_ressource > (100000 *(bcpow(1.5, $row[hangarada_lvl],3)))){
     echo"<td><div align=\"center\"><p class=\"Style2\">$newwada_ressource </p></div></td>"; }
	 else {echo"<td><div align=\"center\">$newwada_ressource </div></td>"; }
   if ($newwura_ressource > (100000 *(bcpow(1.5, $row[hangarura_lvl],3)))){
     echo"<td><div align=\"center\"><p class=\"Style2\">$newwura_ressource </p></div></td>"; }
	 else {echo"<td><div align=\"center\">$newwura_ressource </div></td>"; }
     echo"<td><div align=\"center\">$Total_energie_reste / $Total_energie_prod</div></td>
   </tr>
 </table>
<br>Points : $pts
<p>&nbsp;</p>
</p>";


// fer 
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
if ($construction == "fer"){
	echo"<table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Mine de Fer </b>(Niveau $fer_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.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>
       Comsomation d'energie : <b>$besoin_fer_energie</b>.<br>
       Temps de construction : $etimefer</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $etimeevo<br><a href=\"Arretfer.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_fer_lvl</a></td>
   </tr>
 </table>"; }
 	else { 
	echo"<table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Mine de Fer </b>(Niveau $fer_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.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>
       Comsomation d'energie : <b>$besoin_fer_energie</b>.<br>
       Temps de construction : $etimefer</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>
   </tr>
 </table>";
	}}
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
} else {
if ($newwfer_ressource >= ($besoin_fer_fer) && $newwor_ressource >= ($besoin_fer_or) && ($Total_energie_reste > ($besoin_fer_energie))) {
	echo"<table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Mine de Fer </b>(Niveau $fer_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.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>
       Comsomation d'energie : <b>$besoin_fer_energie</b>.<br>
       Temps de construction : $etimefer</p>
     <p></td>
     </tr>
    <tr>
     <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>
   </tr>
 </table>";
	}
else { 
	echo"<table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Mine de Fer </b>(Niveau $fer_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.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>
       Comsomation d'energie : <b>$besoin_fer_energie</b>.<br>
       Temps de construction : $etimefer</p>
     <p></td>
     </tr>
    <tr>";
if ($Total_energie_reste < ($besoin_fer_energie)) {
if ($newwfer_ressource >= ($besoin_fer_fer) && $newwor_ressource >= ($besoin_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 <= ($besoin_fer_fer) | $newwor_ressource <= ($besoin_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>"; }
   echo"</tr>
 </table>";
	}}
// exfer 
if ( $row[fer_lvl] >= "20" ) {
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
if ($construction == "exfer"){
	echo"<table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centre d'extraction du fer </b>(Niveau $exfer_lvlinf)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Grâce à la recherche, la technologie d'extraction de l'adamentium a pu être élargie aux autres minerais.Par le même procédé on peu maintenant extraire le fer.
	 <br><br>Coût : Fer : <b>$besoin_exfer_fer</b> ; Or : <b>$besoin_exfer_or</b> ; Adamentium : <b>$besoin_exfer_ada</b><br>
       Comsomation d'energie : <b>$besoin_exfer_energie</b>.<br>
       Temps de construction : $etimeexfer</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $etimeevo<br><a href=\"Arretexfer.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_exfer_lvl</a></td>
   </tr>
 </table>"; }
 	else { 
	echo"<table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centre d'extraction du fer </b>(Niveau $exfer_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Grâce à la recherche, la technologie d'extraction de l'adamentium a pu être élargie aux autres minerais.Par le même procédé on peu maintenant extraire le fer.
	 <br><br>Coût : Fer : <b>$besoin_exfer_fer</b> ; Or : <b>$besoin_exfer_or</b> ; Adamentium : <b>$besoin_exfer_ada</b><br>
       Comsomation d'energie : <b>$besoin_exfer_energie</b>.<br>
       Temps de construction : $etimeexfer</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>
   </tr>
 </table>";
	}}
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
} else {
if ($newwfer_ressource >= ($besoin_exfer_fer) && $newwor_ressource >= ($besoin_exfer_or) && ($Total_energie_reste > ($besoin_exfer_energie))) {
	echo"<table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centre d'extraction du fer </b>(Niveau $exfer_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Grâce à la recherche, la technologie d'extraction de l'adamentium a pu être élargie aux autres minerais.Par le même procédé on peu maintenant extraire le fer.
	 <br><br>Coût : Fer : <b>$besoin_exfer_fer</b> ; Or : <b>$besoin_exfer_or</b> ; Adamentium : <b>$besoin_exfer_ada</b><br>
       Comsomation d'energie : <b>$besoin_exfer_energie</b>.<br>
       Temps de construction : $etimeexfer</p>
     <p></td>
     </tr>
    <tr>
     <td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutionfer.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_exfer_lvl</a></td>
   </tr>
 </table>";
	}
else { 
	echo"<table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centre d'extraction du fer </b>(Niveau $exfer_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Grâce à la recherche, la technologie d'extraction de l'adamentium a pu être élargie aux autres minerais.Par le même procédé on peu maintenant extraire le fer.
	 <br><br>Coût : Fer : <b>$besoin_exfer_fer</b> ; Or : <b>$besoin_exfer_or</b> ; Adamentium : <b>$besoin_exfer_ada</b><br>
       Comsomation d'energie : <b>$besoin_exfer_energie</b>.<br>
       Temps de construction : $etimeexfer</p>
     <p></td>
     </tr>
    <tr>";
if ($Total_energie_reste < ($besoin_fer_energie)) {
if ($newwfer_ressource >= ($besoin_exfer_fer) && $newwor_ressource >= ($besoin_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 <= ($besoin_exfer_fer) | $newwor_ressource <= ($besoin_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>"; }
   echo"</tr>
 </table>";
	}}}
// or 
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
if ($construction == "or"){
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Mine de d'or </b>(Niveau $or_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>L'or est la matière principale entrant dans la fabrication de circuit électriques et autres installations électromagnétique.
	 <br><br>Coût : Fer : <b>$besoin_or_fer</b> ; Or : <b>$besoin_or_or</b><br>
       Comsomation d'energie : <b>$besoin_or_energie</b>.<br>
       Temps de construction : $etimeor</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $etimeevo<br><a href=\"Arretor.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_or_lvl</a></p></td>
   </tr>
 </table>"; }
 	else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Mine de d'or </b>(Niveau $or_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>L'or est la matière principale entrant dans la fabrication de circuit électriques et autres installations électromagnétique.
	 <br><br>Coût : Fer : <b>$besoin_or_fer</b> ; Or : <b>$besoin_or_or</b><br>
       Comsomation d'energie : <b>$besoin_or_energie</b>.<br>
       Temps de construction : $etimeor</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>
   </tr>
 </table>";
	}}
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
} else {
if ($newwfer_ressource >= ($besoin_or_fer) && $newwor_ressource >= ($besoin_or_or) && ($Total_energie_reste > $besoin_or_energie)) {
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Mine de d'or </b>(Niveau $or_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>L'or est la matière principale entrant dans la fabrication de circuit électriques et autres installations électromagnétique.
	 <br><br>Coût : Fer : <b>$besoin_or_fer</b> ; Or : <b>$besoin_or_or</b><br>
       Comsomation d'energie : <b>$besoin_or_energie</b>.<br>
       Temps de construction : $etimeor</p>
     <p></td>
     </tr>
    <tr>
     <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>
   </tr>
 </table>";
	}
else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Mine de d'or </b>(Niveau $or_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>L'or est la matière principale entrant dans la fabrication de circuit électriques et autres installations électromagnétique.
	 <br><br>Coût : Fer : <b>$besoin_or_fer</b> ; Or : <b>$besoin_or_or</b><br>
       Comsomation d'energie : <b>$besoin_or_energie</b>.<br>
       Temps de construction : $etimeor</p>
     <p></td>
     </tr>
    <tr>";
if ($Total_energie_reste < ($besoin_or_energie)) {
	if ($newwfer_ressource >= ($besoin_or_fer) && $newwor_ressource >= ($besoin_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 <= ($besoin_or_fer) | $newwor_ressource <= ($besoin_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>"; }
   echo"</tr>
 </table>";
	}}
// exor 
if ( $row[or_lvl] >= "20" ) {
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
if ($construction == "exor"){
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centre d'extraction d'or</b>(Niveau $exor_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Grâce à la recherche, la technologie d'extraction de l'adamentium a pu être élargie aux autres minerais.Par le même procédé on peu maintenant extraire l'or.
	 <br><br>Coût : Fer : <b>$besoin_exor_fer</b> ; Or : <b>$besoin_exor_or</b> ; Adamentium : <b>$besoin_exor_ada</b><br>
       Comsomation d'energie : <b>$besoin_exor_energie</b>.<br>
       Temps de construction : $etimeexor</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $etimeevo<br><a href=\"Arretexor.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_exor_lvl</a></td>
   </tr>
 </table>"; }
 	else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centre d'extraction d'or</b>(Niveau $exor_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Grâce à la recherche, la technologie d'extraction de l'adamentium a pu être élargie aux autres minerais.Par le même procédé on peu maintenant extraire l'or.
	 <br><br>Coût : Fer : <b>$besoin_exor_fer</b> ; Or : <b>$besoin_exor_or</b> ; Adamentium : <b>$besoin_exor_ada</b><br>
       Comsomation d'energie : <b>$besoin_exor_energie</b>.<br>
       Temps de construction : $etimeexor</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>
   </tr>
 </table>";
	}}
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
} else {
if ($newwfer_ressource >= ($besoin_exor_fer) && $newwor_ressource >= ($besoin_exor_or) && ($Total_energie_reste > $besoin_exor_energie)) {
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centre d'extraction d'or</b>(Niveau $or_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Grâce à la recherche, la technologie d'extraction de l'adamentium a pu être élargie aux autres minerais.Par le même procédé on peu maintenant extraire l'or.
	 <br><br>Coût : Fer : <b>$besoin_exor_fer</b> ; Or : <b>$besoin_exor_or</b> ; Adamentium : <b>$besoin_exor_ada</b><br>
       Comsomation d'energie : <b>$besoin_exor_energie</b>.<br>
       Temps de construction : $etimeexor</p>
     <p></td>
     </tr>
    <tr>
     <td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutionor.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_exor_lvl</a></td>
   </tr>
 </table>";
	}
else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centre d'extraction d'or</b>(Niveau $exor_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Grâce à la recherche, la technologie d'extraction de l'adamentium a pu être élargie aux autres minerais.Par le même procédé on peu maintenant extraire l'or.
	 <br><br>Coût : Fer : <b>$besoin_exor_fer</b> ; Or : <b>$besoin_exor_or</b> ; Adamentium : <b>$besoin_exor_ada</b><br>
       Comsomation d'energie : <b>$besoin_exor_energie</b>.<br>
       Temps de construction : $etimeexor</p>
     <p></td>
     </tr>
    <tr>";
if ($Total_energie_reste < ($besoin_or_energie)) {
if ($newwfer_ressource >= ($besoin_exor_fer) && $newwor_ressource >= ($besoin_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 <= ($besoin_exor_fer) | $newwor_ressource <= ($besoin_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>"; }
   echo"</tr>
 </table>";
	}}}
		
// ada
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
if ($construction == "ada"){
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Condensateur d'adamentium </b>(Niveau $ada_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Extrait de l'adamentium en fusion du centre de la planète.
	 <br><br>Coût : Fer : <b>$besoin_ada_fer</b> ; Or : <b>$besoin_ada_or</b><br>
       Comsomation d'energie : <b>$besoin_ada_energie</b>.<br>
       Temps de construction : $etimeada</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $etimeevo<br><a href=\"Arretada.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_ada_lvl</a></td>
   </tr>
 </table>"; }
 	else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Condensateur d'adamentium </b>(Niveau $ada_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Extrait de l'adamentium en fusion du centre de la planète.
	 <br><br>Coût : Fer : <b>$besoin_ada_fer</b> ; Or : <b>$besoin_ada_or</b><br>
       Comsomation d'energie : <b>$besoin_ada_energie</b>.<br>
       Temps de construction : $etimeada</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>
   </tr>
 </table>";
	}}
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
} else {
	if ($newwfer_ressource >= ($besoin_ada_fer) && $newwor_ressource >= ($besoin_ada_or) && ($Total_energie_reste > $besoin_ada_energie)) {
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Condensateur d'adamentium </b>(Niveau $ada_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Extrait de l'adamentium en fusion du centre de la planète.
	 <br><br>Coût : Fer : <b>$besoin_ada_fer</b> ; Or : <b>$besoin_ada_or</b><br>
       Comsomation d'energie : <b>$besoin_ada_energie</b>.<br>
       Temps de construction : $etimeada</p>
     <p></td>
     </tr>
    <tr>
     <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>
   </tr>
 </table>";
	}
else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Condensateur d'adamentium </b>(Niveau $ada_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Extrait de l'adamentium en fusion du centre de la planète.
	 <br><br>Coût : Fer : <b>$besoin_ada_fer</b> ; Or : <b>$besoin_ada_or</b><br>
       Comsomation d'energie : <b>$besoin_ada_energie</b>.<br>
       Temps de construction : $etimeada</p>
     <p></td>
     </tr>
    <tr>";
if ($Total_energie_reste < ($besoin_ada_energie)) {
		if ($newwfer_ressource >= ($besoin_ada_fer) && $newwor_ressource >= ($besoin_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 <= ($besoin_ada_fer) | $newwor_ressource <= ($besoin_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>"; }
   echo"</tr>
 </table>";
 	}}	
	
// ura
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
if ($construction == "ura"){
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Puit d'Uranium </b>(Niveau $ura_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>L'Uranium est depuis peu utilisé comme carburant pour les vaisseaux spatiaux.
	 <br><br>Coût : Fer : <b>$besoin_ura_fer</b> ; Or : <b>$besoin_ura_or</b> ; Adamentium : <b>$besoin_ura_ada</b><br>
       Comsomation d'energie : <b>$besoin_ura_energie</b>.<br>
       Temps de construction : $etimeura</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $etimeevo<br><a href=\"Arretura.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_ura_lvl</a></td>
   </tr>
 </table>"; }
 	else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Puit d'Uranium </b>(Niveau $ura_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>L'Uranium est depuis peu utilisé comme carburant pour les vaisseaux spatiaux.
	 <br><br>Coût : Fer : <b>$besoin_ura_fer</b> ; Or : <b>$besoin_ura_or</b> ; Adamentium : <b>$besoin_ura_ada</b><br>
       Comsomation d'energie : <b>$besoin_ura_energie</b>.<br>
       Temps de construction : $etimeura</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>
   </tr>
 </table>";
	}}
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
} else {
if ($newwfer_ressource >= ($besoin_ura_fer) && $newwor_ressource >= ($besoin_ura_or) && $newwada_ressource >= ($besoin_ura_ada) && ($Total_energie_reste > $besoin_ura_energie)) {
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Puit d'Uranium </b>(Niveau $ura_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>L'Uranium est depuis peu utilisé comme carburant pour les vaisseaux spatiaux.
	 <br><br>Coût : Fer : <b>$besoin_ura_fer</b> ; Or : <b>$besoin_ura_or</b> ; Adamentium : <b>$besoin_ura_ada</b><br>
       Comsomation d'energie : <b>$besoin_ura_energie</b>.<br>
       Temps de construction : $etimeura</p>
     <p></td>
     </tr>
    <tr>
     <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>
   </tr>
 </table>";
	}
else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Puit d'Uranium </b>(Niveau $ura_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>L'Uranium est depuis peu utilisé comme carburant pour les vaisseaux spatiaux.
	 <br><br>Coût : Fer : <b>$besoin_ura_fer</b> ; Or : <b>$besoin_ura_or</b> ; Adamentium : <b>$besoin_ura_ada</b><br>
       Comsomation d'energie : <b>$besoin_ura_energie</b>.<br>
       Temps de construction : $etimeura</p>
     <p></td>
     </tr>
    <tr>";
if ($Total_energie_reste < ($besoin_ura_energie)) {
if ($newwfer_ressource >= ($besoin_ura_fer) && $newwor_ressource >= ($besoin_ura_or) && $newwada_ressource >= ($besoin_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 <= ($besoin_ura_fer) | $newwor_ressource <= ($besoin_ura_or) | $newwada_ressource <= ($besoin_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>"; }
   echo"</tr>
 </table>";
	}}	
		
// central
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
if ($construction == "central"){
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centrale d'énergie thermique </b>(Niveau $central_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.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>
     <td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $etimeevo<br><a href=\"Arretcentral.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_central_lvl</a></td>
   </tr>
 </table>"; }
 	else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centrale d'énergie thermique </b>(Niveau $central_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.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>
     <td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>
   </tr>
 </table>";
	}}
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
} else {
		if ($newwfer_ressource >= ($besoin_central_fer) && $newwor_ressource >= ($besoin_central_or)) {
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centrale d'énergie thermique </b>(Niveau $central_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.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>
     <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>
   </tr>
 </table>";
	}
else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centrale d'énergie thermique </b>(Niveau $central_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.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>
	<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_central_lvl</p></td>
   </tr>
 </table>";
	}}	
		
// fission
if ($row[techenergie_lvl] >= 3 && $row[ada_lvl] >= 5) {
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
if ($construction == "central"){
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centrale d'énergie de fission </b>(Niveau $fission_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>La centrale électrique de fission produit de l'énergie en fusionnant 2 atomes d'hydrogène en un atome d'hélium.
	 <br><br>Coût : Fer : <b>$besoin_fission_fer</b> ; Or : <b>$besoin_fission_or</b> ; Adamentium : <b>$besoin_fission_ada</b><br>
	 Consomation d'adamentium par heure : $coutfission<br>
       Temps de construction : $etimefission</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $etimeevo<br><a href=\"Arretfission.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_fission_lvl</a></td>
   </tr>
 </table>"; }
 	else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centrale d'énergie de fission </b>(Niveau $fission_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>La centrale électrique de fission produit de l'énergie en fusionnant 2 atomes d'hydrogène en un atome d'hélium.
	 <br><br>Coût : Fer : <b>$besoin_fission_fer</b> ; Or : <b>$besoin_fission_or</b> ; Adamentium : <b>$besoin_fission_ada</b><br>
	 Consomation d'adamentium par heure : $coutfission<br>
       Temps de construction : $etimefission</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>
   </tr>
 </table>";
	}}
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
} else {
		if ($newwfer_ressource >= ($besoin_fission_fer) && $newwor_ressource >= ($besoin_fission_or) && $newwada_ressource >= ($besoin_fission_ada)) {
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centrale d'énergie de fission </b>(Niveau $fission_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>La centrale électrique de fission produit de l'énergie en fusionnant 2 atomes d'hydrogène en un atome d'hélium.
	 <br><br>Coût : Fer : <b>$besoin_fission_fer</b> ; Or : <b>$besoin_fission_or</b> ; Adamentium : <b>$besoin_fission_ada</b><br>
	 Consomation d'adamentium par heure : $coutfission<br>
       Temps de construction : $etimefission</p>
     <p></td>
     </tr>
    <tr>
     <td height=\"26\" align=\"center\" colspan=\"2\"><a href=\"Evolutioncentral.php\" target=\"_parent\" class=menulink>Am&eacute;lioration au niveau $New_fission_lvl</a></td>
   </tr>
 </table>";
	}
else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centrale d'énergie de fission </b>(Niveau $fission_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>La centrale électrique de fission produit de l'énergie en fusionnant 2 atomes d'hydrogène en un atome d'hélium.
	 <br><br>Coût : Fer : <b>$besoin_fission_fer</b> ; Or : <b>$besoin_fission_or</b> ; Adamentium : <b>$besoin_fission_ada</b><br>
	 Consomation d'adamentium par heure : $coutfission<br>
       Temps de construction : $etimefission</p>
     <p></td>
     </tr>
    <tr>
	<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_fission_lvl</p></td>
   </tr>
 </table>";
	}}}
		
// robo
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
if ($construction == "robo"){
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Usine Robotique </b>(Niveau $robo_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" 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 servirent à construire plus rapidement les rastructure et les vaisseaux.
	 <br><br>Coût : Fer : <b>$besoin_robo_fer</b> ; Or : <b>$besoin_robo_or</b> ; Adamentium : <b>$besoin_robo_ada</b><br>
       Temps de construction : $etimerobo</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $etimeevo<br><a href=\"Arretrobo.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_robo_lvl</a></td>
   </tr>
 </table>"; }
 	else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Usine Robotique </b>(Niveau $robo_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" 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 servirent à construire plus rapidement les rastructure et les vaisseaux.
	 <br><br>Coût : Fer : <b>$besoin_robo_fer</b> ; Or : <b>$besoin_robo_or</b> ; Adamentium : <b>$besoin_robo_ada</b><br>
       Temps de construction : $etimerobo</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>
   </tr>
 </table>";
	}}
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
} else {
	if ($newwfer_ressource >= ($besoin_robo_fer) && $newwor_ressource >= ($besoin_robo_or) && $newwada_ressource >= ($besoin_robo_ada)) {
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Usine Robotique </b>(Niveau $robo_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" 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 servirent à construire plus rapidement les rastructure et les vaisseaux.
	 <br><br>Coût : Fer : <b>$besoin_robo_fer</b> ; Or : <b>$besoin_robo_or</b> ; Adamentium : <b>$besoin_robo_ada</b><br>
       Temps de construction : $etimerobo</p>
     <p></td>
     </tr>
    <tr>
     <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>
   </tr>
 </table>";
	}
else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Usine Robotique </b>(Niveau $robo_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" 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 servirent à construire plus rapidement les rastructure et les vaisseaux.
	 <br><br>Coût : Fer : <b>$besoin_robo_fer</b> ; Or : <b>$besoin_robo_or</b> ; Adamentium : <b>$besoin_robo_ada</b><br>
       Temps de construction : $etimerobo</p>
     <p></td>
     </tr>
    <tr>
	<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_robo_lvl</p></td>
   </tr>
 </table>";
	}}	
	
// chantier
if ( $row[robo_lvl] >= "2" ) {
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
if ($construction == "chantier"){
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Chantier spacial </b>(Niveau $chantier_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Le chantier spatial permet de construire des vaisseaux et d'installer des défenses sur la planète.
	 <br><br>Coût : Fer : <b>$besoin_chantier_fer</b> ; Or : <b>$besoin_chantier_or</b> ; Adamentium : <b>$besoin_chantier_ada</b><br>
       Temps de construction : $etimechantier</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $etimeevo<br><a href=\"Arretchantier.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_chantier_lvl</a></td>
   </tr>
 </table>"; }
 	else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Chantier spacial </b>(Niveau $chantier_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Le chantier spatial permet de construire des vaisseaux et d'installer des défenses sur la planète.
	 <br><br>Coût : Fer : <b>$besoin_chantier_fer</b> ; Or : <b>$besoin_chantier_or</b> ; Adamentium : <b>$besoin_chantier_ada</b><br>
       Temps de construction : $etimechantier</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>
   </tr>
 </table>";
	}}
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
} else {
	if ($newwfer_ressource >= ($besoin_chantier_fer) && $newwor_ressource >= ($besoin_chantier_or) && $newwada_ressource >= ($besoin_chantier_ada)) {
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Chantier spacial </b>(Niveau $chantier_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Le chantier spatial permet de construire des vaisseaux et d'installer des défenses sur la planète.
	 <br><br>Coût : Fer : <b>$besoin_chantier_fer</b> ; Or : <b>$besoin_chantier_or</b> ; Adamentium : <b>$besoin_chantier_ada</b><br>
       Temps de construction : $etimechantier</p>
     <p></td>
     </tr>
    <tr>
     <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>
   </tr>
 </table>";
	}
else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Chantier spacial </b>(Niveau $chantier_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Le chantier spatial permet de construire des vaisseaux et d'installer des défenses sur la planète.
	 <br><br>Coût : Fer : <b>$besoin_chantier_fer</b> ; Or : <b>$besoin_chantier_or</b> ; Adamentium : <b>$besoin_chantier_ada</b><br>
       Temps de construction : $etimechantier</p>
     <p></td>
     </tr>
    <tr>
	<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_chantier_lvl</p></td>
   </tr>
 </table>";
	}}}
	
	
// defense
if ( $row[robo_lvl] >= "3" ) {
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
if ($construction == "defense"){
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centre Militaire de Defense Interplanétaire </b>(Niveau $defense_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Ce centre permet de developper à partir des technologies d'armement, un systéme de defense contre les ataques interplanétaires.
	 <br><br>Coût : Fer : <b>$besoin_defense_fer</b> ; Or : <b>$besoin_defense_or</b> ; Adamentium : <b>$besoin_defense_ada</b><br>
       Temps de construction : $etimedefense</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $etimeevo<br><a href=\"Arretdefense.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_defense_lvl</a></td>
   </tr>
 </table>"; }
 	else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centre Militaire de Defense Interplanétaire </b>(Niveau $defense_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Ce centre permet de developper à partir des technologies d'armement, un systéme de defense contre les ataques interplanétaires.
	 <br><br>Coût : Fer : <b>$besoin_defense_fer</b> ; Or : <b>$besoin_defense_or</b> ; Adamentium : <b>$besoin_defense_ada</b><br>
       Temps de construction : $etimedefense</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>
   </tr>
 </table>";
	}}
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
} else {
	if ($newwfer_ressource >= ($besoin_chantier_fer) && $newwor_ressource >= ($besoin_chantier_or) && $newwada_ressource >= ($besoin_chantier_ada)) {
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Chantier spacial </b>(Niveau $chantier_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Ce centre permet de developper à partir des technologies d'armement, un systéme de defense contre les ataques interplanétaires.
	 <br><br>Coût : Fer : <b>$besoin_defense_fer</b> ; Or : <b>$besoin_defense_or</b> ; Adamentium : <b>$besoin_defense_ada</b><br>
       Temps de construction : $etimedefense</p>
     <p></td>
     </tr>
    <tr>
     <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>
   </tr>
 </table>";
	}
else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Chantier spacial </b>(Niveau $chantier_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>Ce centre permet de developper à partir des technologies d'armement, un systéme de defense contre les ataques interplanétaires.
	 <br><br>Coût : Fer : <b>$besoin_defense_fer</b> ; Or : <b>$besoin_defense_or</b> ; Adamentium : <b>$besoin_defense_ada</b><br>
       Temps de construction : $etimedefense</p>
     <p></td>
     </tr>
    <tr>
	<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_defense_lvl</p></td>
   </tr>
 </table>";
	}}}
	
	
// hangarfer
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
if ($construction == "hangarfer"){
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Zone de Stockage du fer </b>(Niveau $hangarfer_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>La zone de stockage de fer est une immense plateforme qui permet le stockage du fer.
	 <br><br>Coût : Fer : <b>$besoin_hangarfer_fer</b><br>
       Temps de construction : $etimehangarfer</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $etimeevo<br><a href=\"Arrethangarfer.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_hangarfer_lvl</a></td>
   </tr>
 </table>"; }
 	else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Zone de Stockage du fer </b>(Niveau $hangarfer_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>La zone de stockage de fer est une immense plateforme qui permet le stockage du fer.
	 <br><br>Coût : Fer : <b>$besoin_hangarfer_fer</b><br>
       Temps de construction : $etimehangarfer</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>
   </tr>
 </table>";
	}}
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
} else {
	if ($newwfer_ressource >= ($besoin_hangarfer_fer)) {
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Zone de Stockage du fer </b>(Niveau $hangarfer_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>La zone de stockage de fer est une immense plateforme qui permet le stockage du fer.
	 <br><br>Coût : Fer : <b>$besoin_hangarfer_fer</b><br>
       Temps de construction : $etimehangarfer</p>
     <p></td>
     </tr>
    <tr>
     <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>
   </tr>
 </table>";
	}
else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Zone de Stockage du fer </b>(Niveau $hangarfer_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>La zone de stockage de fer est une immense plateforme qui permet le stockage du fer.
	 <br><br>Coût : Fer : <b>$besoin_hangarfer_fer</b><br>
       Temps de construction : $etimehangarfer</p>
     <p></td>
     </tr>
    <tr>
	<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_hangarfer_lvl</p></td>
   </tr>
 </table>";
	}}		
	
	// hangaror
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
if ($construction == "hangaror"){
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Zone de Stockage de l’or </b>(Niveau $hangaror_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>La zone de stockage de l’or est une immense plateforme qui permet le stockage 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>
     <td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $etimeevo<br><a href=\"Arrethangaror.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_hangaror_lvl</a></td>
   </tr>
 </table>"; }
 	else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Zone de Stockage de l’or </b>(Niveau $hangaror_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>La zone de stockage de l’or est une immense plateforme qui permet le stockage 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>
     <td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>
   </tr>
 </table>";
	}}
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
} else {
	if ($newwfer_ressource >= ($besoin_hangaror_fer) && $newwor_ressource >= ($besoin_hangaror_or)) {
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Zone de Stockage de l’or </b>(Niveau $hangaror_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>La zone de stockage de l’or est une immense plateforme qui permet le stockage 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>
     <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>
   </tr>
 </table>";
	}
else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Zone de Stockage de l’or </b>(Niveau $hangaror_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>La zone de stockage de l’or est une immense plateforme qui permet le stockage 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>
	<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_hangaror_lvl</p></td>
   </tr>
 </table>";
	}}	
	
// hangarada
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
if ($construction == "hangarada"){
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Zone de Stockage de l’adamentium </b>(Niveau $hangarada_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>La zone de stockage de l’adamentium est une immense plateforme qui permet le stockage l’adamentium.
	 <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>
     <td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $etimeevo<br><a href=\"Arrethangarada.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_hangarada_lvl</a></td>
   </tr>
 </table>"; }
 	else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Zone de Stockage de l’adamentium </b>(Niveau $hangarada_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>La zone de stockage de l’adamentium est une immense plateforme qui permet le stockage l’adamentium.
	 <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>
     <td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>
   </tr>
 </table>";
	}}
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
} else {
	if ($newwfer_ressource >= ($besoin_hangarada_fer) && $newwor_ressource >= ($besoin_hangarada_or)) {
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Zone de Stockage de l’adamentium </b>(Niveau $hangarada_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>La zone de stockage de l’adamentium est une immense plateforme qui permet le stockage l’adamentium.
	 <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>
     <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>
   </tr>
 </table>";
	}
else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Zone de Stockage de l’adamentium </b>(Niveau $hangarada_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" height=\"120\"></td>
     <td width=\"498\" valign=\"top\"><p>La zone de stockage de l’adamentium est une immense plateforme qui permet le stockage l’adamentium.
	 <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>
	<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_hangarada_lvl</p></td>
   </tr>
 </table>";
	}}	
	
// hangarura
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
if ($construction == "hangarura"){
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Cuve de Stockage de l’uranium </b>(Niveau $hangarura_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.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 carburant sans danger avant son utilisation..
	 <br><br>Coût : Fer : <b>$besoin_hangarura_fer</b> ; Or : <b>$besoin_hangarura_or</b> ; Adamentium : <b>$besoin_hangarura_ada</b><br>
       Temps de construction : $etimehangarura</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $etimeevo<br><a href=\"Arrethangarura.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_hangarura_lvl</a></td>
   </tr>
 </table>"; }
 	else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Cuve de Stockage de l’uranium </b>(Niveau $hangarura_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.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 carburant sans danger avant son utilisation..
	 <br><br>Coût : Fer : <b>$besoin_hangarura_fer</b> ; Or : <b>$besoin_hangarura_or</b> ; Adamentium : <b>$besoin_hangarura_ada</b><br>
       Temps de construction : $etimehangarura</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>
   </tr>
 </table>";
	}}
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
} else {
	if ($newwfer_ressource >= ($besoin_hangarura_fer) && $newwor_ressource >= ($besoin_hangarura_or) && $newwada_ressource >= ($besoin_hangarura_ada)) {
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Cuve de Stockage de l’uranium </b>(Niveau $hangarura_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.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 carburant sans danger avant son utilisation..
	 <br><br>Coût : Fer : <b>$besoin_hangarura_fer</b> ; Or : <b>$besoin_hangarura_or</b> ; Adamentium : <b>$besoin_hangarura_ada</b><br>
       Temps de construction : $etimehangarura</p>
     <p></td>
     </tr>
    <tr>
     <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>
   </tr>
 </table>";
	}
else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Cuve de Stockage de l’uranium </b>(Niveau $hangarura_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.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 carburant sans danger avant son utilisation..
	 <br><br>Coût : Fer : <b>$besoin_hangarura_fer</b> ; Or : <b>$besoin_hangarura_or</b> ; Adamentium : <b>$besoin_hangarura_ada</b><br>
       Temps de construction : $etimehangarura</p>
     <p></td>
     </tr>
    <tr>
	<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_hangarura_lvl</p></td>
   </tr>
 </table>";
	}}	
	
// labo
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
if ($construction == "labo"){
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centre de recherches scientifiques </b>(Niveau $labo_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" 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> ; Adamentium : <b>$besoin_labo_ada</b><br>
       Temps de construction : $etimelabo</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $etimeevo<br><a href=\"Arretlabo.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_labo_lvl</a></td>
   </tr>
 </table>"; }
 	else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centre de recherches scientifiques </b>(Niveau $labo_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" 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> ; Adamentium : <b>$besoin_labo_ada</b><br>
       Temps de construction : $etimelabo</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>
   </tr>
 </table>";
	}}
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
} else {
if ($newwfer_ressource >= ($besoin_labo_fer) && $newwor_ressource >= ($besoin_labo_or) && $newwada_ressource >= ($besoin_labo_ada)) {
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centre de recherches scientifiques </b>(Niveau $labo_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" 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> ; Adamentium : <b>$besoin_labo_ada</b><br>
       Temps de construction : $etimelabo</p>
     <p></td>
     </tr>
    <tr>
     <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>
   </tr>
 </table>";
	}
else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Centre de recherches scientifiques </b>(Niveau $labo_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"http://80.237.203.201/download/use/epicblue/gebaeude/1.gif\" width=\"120\" 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> ; Adamentium : <b>$besoin_labo_ada</b><br>
       Temps de construction : $etimelabo</p>
     <p></td>
     </tr>
    <tr>
	<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_labo_lvl</p></td>
   </tr>
 </table>";
	}}	
	
// silo
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
if ($construction == "silo"){
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Tour de Babel </b>(Niveau $silo_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"/imgs/babel.gif\" width=\"120\" height=\"125\"></td>
     <td width=\"498\" valign=\"top\"><p>La tour de Babel et l’ultime héritage des Anciens d’Atlantis. Cette tour est capable d’envoyer un rayon surpuissant capable de détruire les défenses adverse voir des Lunes.
	 <br><br>Coût : Fer : <b>$besoin_silo_fer</b> ; Or : <b>$besoin_silo_or</b> ; Adamentium : <b>$besoin_silo_ada</b><br>
       Temps de construction : $etimesilo</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" height=\"40\" colspan=\"2\"><p class=\"Style1\">Batiment en cours de construction : $etimeevo<br><a href=\"Arretsilo.php\" target=\"_parent\" class=menulink2>Arreter le niveau $New_silo_lvl</a></td>
   </tr>
 </table>"; }
 	else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Tour de Babel </b>(Niveau $silo_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"/imgs/babel.gif\" width=\"120\" height=\"125\"></td>
     <td width=\"498\" valign=\"top\"><p>La tour de Babel et l’ultime héritage des Anciens d’Atlantis. Cette tour est capable d’envoyer un rayon surpuissant capable de détruire les défenses adverse voir des Lunes.
	 <br><br>Coût : Fer : <b>$besoin_silo_fer</b> ; Or : <b>$besoin_silo_or</b> ; Adamentium : <b>$besoin_silo_ada</b><br>
       Temps de construction : $etimesilo</p>
     <p></td>
     </tr>
    <tr>
     <td align=\"center\" colspan=\"2\"><p class=\"Style1\">-</p></td>
   </tr>
 </table>";
	}}
if ($row[fer_evolution] != "0000-00-00 00:00:00" | $row[or_evolution] != "0000-00-00 00:00:00" | $row[ada_evolution] != "0000-00-00 00:00:00" | $row[ura_evolution] != "0000-00-00 00:00:00" | $row[central_evolution] != "0000-00-00 00:00:00" | $row[labo_evolution] != "0000-00-00 00:00:00" | $row[robo_evolution] != "0000-00-00 00:00:00" | $row[chantier_evolution] != "0000-00-00 00:00:00" | $row[hangarfer_evolution] != "0000-00-00 00:00:00" | $row[hangaror_evolution] != "0000-00-00 00:00:00" | $row[hangarada_evolution] != "0000-00-00 00:00:00" | $row[hangarura_evolution] != "0000-00-00 00:00:00" | $row[exfer_evolution] != "0000-00-00 00:00:00" | $row[exor_evolution] != "0000-00-00 00:00:00" | $row[silo_evolution] != "0000-00-00 00:00:00" | $row[defense_evolution] != "0000-00-00 00:00:00" | $row[fission_evolution] != "0000-00-00 00:00:00") {
} else {
	if ($newwfer_ressource > ($besoin_silo_fer) && $newwor_ressource > ($besoin_silo_or) && $newwada_ressource > ($besoin_silo_ada)) {
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Tour de Babel </b>(Niveau $silo_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"/imgs/babel.gif\" width=\"120\" height=\"125\"></td>
     <td width=\"498\" valign=\"top\"><p>La tour de Babel et l’ultime héritage des Anciens d’Atlantis. Cette tour est capable d’envoyer un rayon surpuissant capable de détruire les défenses adverse voir des Lunes.
	 <br><br>Coût : Fer : <b>$besoin_silo_fer</b> ; Or : <b>$besoin_silo_or</b> ; Adamentium : <b>$besoin_silo_ada</b><br>
       Temps de construction : $etimesilo</p>
     <p></td>
     </tr>
    <tr>
     <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>
   </tr>
 </table>";
	}
else { 
	echo"<br><table width=\"618\" border=\"1\" cellspacing=\"0\" cellpadding=\"0\">
   <tr>
     <td align=\"center\" colspan=\"2\"><b>Tour de Babel </b>(Niveau $silo_lvl)</td>
   </tr>
   <tr>
     <td width=\"120\" height=\"120\"><img src=\"/imgs/babel.gif\" width=\"120\" height=\"125\"></td>
     <td width=\"498\" valign=\"top\"><p>La tour de Babel et l’ultime héritage des Anciens d’Atlantis. Cette tour est capable d’envoyer un rayon surpuissant capable de détruire les défenses adverse voir des Lunes.
	 <br><br>Coût : Fer : <b>$besoin_silo_fer</b> ; Or : <b>$besoin_silo_or</b> ; Adamentium : <b>$besoin_silo_ada</b><br>
       Temps de construction : $etimesilo</p>
     <p></td>
     </tr>
    <tr>
	<td align=\"center\" colspan=\"2\"><p class=\"Style2\">Pas assez de ressource pour l'am&eacute;lioration au niveau $New_silo_lvl</p></td>
   </tr>
 </table>";
	}}	

?>