'86400', 'heure' => '3600', 'minute' => '60', 'seconde' => '1'); foreach ($tab as $key => $value) { $compteur = 0; while ($time > ($value-1)) { $time = $time - $value; $compteur++; } if ($compteur != 0) { $output .= $compteur.' '.$key; if ($compteur > 1) $output .= 's'; if ($value != 1) $output .= ' '; } } echo $output; } $f = ceil(480/pow(1.25,$chantier_terrestre)); $g = ceil(1560/pow(1.25,$chantier_terrestre)); $h = ceil(1800/pow(1.25,$chantier_terrestre)); $i = ceil(6720/pow(1.25,$chantier_terrestre)); $j = ceil(12960/pow(1.25,$chantier_terrestre)); if ($temps_t > 0) { $unit = $nomterra[--$unit_t]; /*switch ($unit_t) { case 1: $unit= "sparrowhawk"; break; case 2: $unit= "077-TC Pelican"; break; case 3: $unit= "C703 Shortsword Bomber "; break; case 4: $unit= "SHD Albatros"; break; case 5: $unit= "M12 LRV Warthogs"; break; case 6: $unit= "M12G1 LAAV Warthogs"; break; case 7: $unit= "M12A1 LAAV Warthogs"; break; case 8: $unit= "M808B Scorpions MBT"; break; case 9: $unit= "mitrailleuses automatique M247 GP"; break; case 10: $unit= "canons Gauss"; break; case 11: $unit= "DCA légères"; break; case 12: $unit= "DCA lourdes"; break; case 13: $unit= "lanceurs de missiles"; break; }*/ } ?> 0) { if ($temps_t > 0) { echo "
Construction terminé dans : "; $tr=$temps_t-time(); echo ''; echo ''; echo '
Construction de : '.$cons_terrestre.' '.$unit.'

'; } echo ''; if ($chantier_terrestre >= 1) { echo ''; } if ($chantier_terrestre >= 3 && $energie_t >=2) { echo ''; } if ($chantier_terrestre >= 4 && $armement >= 1) { echo ''; } if ($chantier_terrestre >= 6 && $armement >=3 && $enerigie_t >= 4) { echo ''; } if ($chantier_terrestre >= 8 && $armement >=5 && $informatique >= 3) { echo ''; } } else { ?>
lmagesDescriptionNombre
'.$nomterrn[8].''; if ($def_1 > 0) { echo' ('.$def_1.' unitées)'; } echo'
Métal : 500
Cristal : 200
Temps : '; sec($f); echo '
'; if ($bat == 8) echo 'Chantier terrestre en construction'; else { if ($temps_t < time()) echo '
'; else { if ($unit_t<9 && $unit_t>0) echo 'Construction en cours dans le chantier terrestre'; } } echo '
'.$nomterrn[9].''; if ($def_2 > 0) { echo' ('.$def_2.' unitées)'; } echo'
Métal : 4000
Cristal : 2000
Temps : '; sec($g); echo'
'; if ($bat == 8) echo 'Chantier terrestre en construction'; else { if ($temps_t < time()) echo '
'; else { if ($unit_t<9 && $unit_t>0) echo 'Construction en cours dans le chantier terrestre'; } } echo '
'.$nomterrn[10].''; if ($def_3 > 0) { echo' ('.$def_3.' unitées)'; } echo'
Métal : 4500
Cristal : 800
Hydrogène : 600
Temps : '; sec($h); echo '
'; if ($bat == 8) echo 'Chantier terrestre en construction'; else { if ($temps_t < time()) echo '
'; else { if ($unit_t<9 && $unit_t>0) echo 'Construction en cours dans le chantier terrestre'; } } echo '
'.$nomterrn[11].''; if ($def_4 > 0) { echo' ('.$def_4.' unitées)'; } echo'
Métal : 12000
Cristal : 10000
Hydrogène : 1000
Temps : '; sec($i); echo '
'; if ($bat == 8) echo 'Chantier terrestre en construction'; else { if ($temps_t < time()) echo '
'; else { if ($unit_t<9 && $unit_t>0) echo 'Construction en cours dans le chantier terrestre'; } } echo '
'.$nomterrn[12].''; if ($def_5 > 0) { echo' ('.$def_5.' unitées)'; } echo'
Métal : 15000
Cristal : 9500
Hydrogène : 1500
Temps : '; sec($j); echo '
'; if ($bat == 8) echo 'Chantier terrestre en construction'; else { if ($temps_t < time()) echo '
'; else { if ($unit_t<9 && $unit_t>0) echo 'Construction en cours dans le chantier terrestre'; } } echo '
Vous devez d\'abord construire un chantier spatial !
'; } echo ''; ?>