2007-10-27 10:00:00 +00:00
< ? php
2007-11-03 11:00:00 +00:00
session_start ();
2007-03-31 10:00:00 +00:00
$id = $_SESSION [ 'id' ];
$galaxy = $_SESSION [ 'galaxy' ];
$ss = $_SESSION [ 'ss' ];
$pos = $_SESSION [ 'pos' ];
2007-11-03 11:00:00 +00:00
echo " <html>
< head >
2007-10-27 10:00:00 +00:00
< title > Halo battle </ title >
2007-03-31 10:00:00 +00:00
2007-11-03 11:00:00 +00:00
< link rel = stylesheet media = screen type = text / css title = design href = descriptions / diz / base . css >
< meta http - equiv = pragma content = no - cache >
< meta http - equiv = content - type content = text / html ; charset = iso - 8869 - 1 >
2007-10-27 10:00:00 +00:00
< link rel = shortcut icon type = image / x - icon href = favicon . ico >
2007-03-31 10:00:00 +00:00
2007-10-27 10:00:00 +00:00
< style TYPE = text / css >
TD {
border : 0 px ;
background - color : transparent ;
}
</ style > " ;
require_once 'bdd.php' ;
require_once 'ressource.php' ;
require_once 'batiment_ajout.php' ;
require_once 'noms.php' ;
2007-03-31 10:00:00 +00:00
2007-10-27 10:00:00 +00:00
function sec ( $time ) {
2007-03-31 10:00:00 +00:00
$output = '' ;
$tab = array ( 'jour' => '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 ;
}
2007-11-03 11:00:00 +00:00
function verification_des_ress ( $num , $fer , $cristal , $ro , $need_fer , $need_cristal , $need_ro )
{
if ( $fer >= $need_fer && $cristal >= $need_cristal && $ro >= $need_ro )
{
echo " <br><br><br><font color=#0080c0><a href= \" batiment_validation.php?bat= " . $num . " \" >Construire</a></font> " ;
}
else
{
echo " <br><br><br><font color=red>Construire</font> " ;
}
}
function ressources ( $fer , $cristal , $ro , $need_fer , $need_cristal , $need_ro , $mine_m , $mine_c , $mine_h ) {
2007-11-04 11:00:00 +00:00
require 'noms.php' ;
2007-10-27 10:00:00 +00:00
if ( $need_fer > 0 ) {
if ( $fer <= $need_fer ) {
$z = floor ( $fer ) - $need_fer ;
2007-11-04 11:00:00 +00:00
echo '<font color=red >' . $ressourc [ 0 ] . ' : <ACRONYM title="' . $z . '">' . $need_fer . '</ACRONYM></font> ' ;
2007-11-03 11:00:00 +00:00
}
2007-11-04 11:00:00 +00:00
else echo $ressourc [ 0 ] . ' : <span class=rc>' . $need_fer . ' </span>' ;
2007-10-27 10:00:00 +00:00
}
if ( $need_cristal > 0 ) {
if ( $cristal <= $need_cristal ) {
$z = floor ( $cristal ) - $need_cristal ;
2007-11-04 11:00:00 +00:00
echo '<font color=red >' . $ressourc [ 1 ] . ' : <ACRONYM title="' . $z . '">' . $need_cristal . '</ACRONYM></font> ' ;
2007-11-03 11:00:00 +00:00
}
2007-11-04 11:00:00 +00:00
else echo $ressourc [ 1 ] . ' : <span class=rc>' . $need_cristal . ' </span>' ;
2007-10-27 10:00:00 +00:00
}
if ( $need_ro > 0 ) {
if ( $ro <= $need_ro ) {
$z = floor ( $ro ) - $need_ro ;
2007-11-04 11:00:00 +00:00
echo '<font color=red >' . $ressourc [ 2 ] . ' : <ACRONYM title="' . $z . '">' . $need_ro . '</ACRONYM></font>' ;
2007-11-03 11:00:00 +00:00
}
2007-11-04 11:00:00 +00:00
else echo $ressourc [ 2 ] . ' : <span class=rc>' . $need_ro . '</span>' ;
2007-10-27 10:00:00 +00:00
}
2007-11-03 11:00:00 +00:00
}
2007-11-04 11:00:00 +00:00
function ress_tem ( $fer , $cristal , $ro , $need_fer , $need_cristal , $need_ro , $mine_m , $mine_c , $mine_h ) {
if ( $mine_m < 0 ) $prod_met = 40 ;
else $prod_metal = ceil ((( $mine_m * 32 ) + ( pow ( 1.41 , $mine_m ) * exp ( 0.066 * $mine_m )) * $coeff ) * 3.7 ) + 40 ;
if ( $mine_c < 0 ) $prod_cri = 20 ;
else $prod_cristal = ( floor (( $mine_c * 13 ) + ( pow ( 1.36 , $mine_c ) * exp ( 0.0675 * $mine_c )) * $coeff ) * 7 ) + 20 ;
if ( $centrale_f > 0 ) { $conso_hy = ceil (( $centrale_f * 5 + ( exp ( $mine_m * 0.3 ) * 10 )) * $coeff ); }
else { $conso_hy = 0 ;}
if ( $mine_h < 0 ) $prod_hydrogene = 0.0000000001 ;
else $prod_hydrogene = ( ceil ((( $mine_h * 12 ) + ( pow ( 1.394 , $mine_h ) * exp ( 0.072 * $mine_h )) * $coeff ) * 5 ));
$w = $prod_hydrogene - $conso_hy ;
if ( $mine_h == 0 ) $w = 1 ; $ro = 0 ; $need_ro = 0 ;
if (( $prod_hydrogene - $conso_hy ) < 0 ) $w = 1 ; $ro = 0 ; $need_ro = 0 ;
$tem1 = abs ( floor ( $fer ) - $need_fer ) / $prod_metal ;
$tem2 = abs ( floor ( $cristal ) - $need_cristal ) / $prod_cristal ;
$tem3 = abs ( floor ( $ro ) - $need_ro ) / $w ;
$tem = max ( $tem1 , $tem2 , $tem3 );
echo ceil ( $tem );
}
2007-10-27 10:00:00 +00:00
$case = $cases - ( $mine_m + $mine_c + $mine_h + $centrale_s + $centrale_f + $radar + $labo + $chantier_terrestre + $chantier_spatial + $caserne + $silo );
2007-11-03 11:00:00 +00:00
2007-10-27 10:00:00 +00:00
echo ' < script language = " javascript " src = " time.js " ></ script >
2007-03-31 10:00:00 +00:00
</ head >
< body >
2007-11-04 11:00:00 +00:00
< div class = d >< a href = " arbre_bat_'. $race .'.php " > Arbre des technologies </ a ></ div >< br class = " a " >
< div class = " centre " >< table style = " margin-left: auto; margin-right: auto; " >< tr >< td style = " border:none; background: transparent; float: left; " >
2007-10-27 10:00:00 +00:00
< br class = " a " >
< div class = " a " >
< img src = " images/batiments/'. $batimeni[0] .' " alt = " " />
2007-11-03 11:00:00 +00:00
</ div >
2007-10-27 10:00:00 +00:00
< div class = " b " >
2007-11-04 11:00:00 +00:00
< a href = " descriptions.php?bat=0 " > '.$batiment[0].' </ a > '; if ($mine_m > 0) echo ' ( Niveau '.$mine_m.' ) ' ;
echo '<br><span class="description">' . $batimede [ 0 ] . ' </ span >< br >
2007-10-27 10:00:00 +00:00
Besoin de : ' ;
2007-11-04 11:00:00 +00:00
$a = ceil ( exp ( 0.4 * $mine_m ) * 190 );
$b = ceil ( exp ( 0.4 * $mine_m ) * 90 );
2007-10-27 10:00:00 +00:00
ressources ( $metal , $cristal , $hydrogene , $a , $b , 0 , $mine_m , $mine_c , $mine_h ); echo ' < br >
2007-11-04 11:00:00 +00:00
Temps de construction : ' ; sec ( ceil (( pow ( 1.7 , $mine_m ) * 120 ) / ( pow ( 1.23 , $centre_info ) + 0.0025 * $ingeneieur )));
//if (sec(ress_tem($fer, $cristal, $ro, $a, $nb,0, $mine_m, $mine_c, $mine_h)) <= 0) { echo '<br>Temps avant construction : maintenant'; } else { echo'<br>Temps avant construction : ';sec($tem); }
2007-10-27 10:00:00 +00:00
echo ' </ div >
< div class = " c " > ' ;
2007-11-03 11:00:00 +00:00
if ( $temps_b > 0 ) {
2007-03-31 10:00:00 +00:00
if ( $bat == 1 ) {
2007-10-27 10:00:00 +00:00
$tr = $temps_b - time ();
echo '<table align="center"><tr><td><div id="axion"></div></td></tr>' ;
echo '<script language="JavaScript">reste(' . $tr . ');</script>' ;
echo " <tr><td><a href= \" batiment_anul.php?bat=1 \" >Annuler</a></td></tr></table> " ;
2007-03-31 10:00:00 +00:00
}
}
2007-10-27 10:00:00 +00:00
else {
if ( $case <= 0 ) echo '<font color="red">Plan<61> te pleine</font>' ;
else verification_des_ress ( 1 , $metal , $cristal , $hydrogene , $a , $b , 0 );
}
echo ' </ div >
< br class = " a " >
< div class = " a " >
< img src = " images/batiments/'. $batimeni[1] .' " alt = " " >
2007-11-03 11:00:00 +00:00
</ div >
2007-10-27 10:00:00 +00:00
< div class = " b " >
2007-11-04 11:00:00 +00:00
< a href = " descriptions.php?bat=1 " > '.$batiment[1].' </ a > '; if ($mine_c > 0) echo ' ( Niveau '.$mine_c.' ) ' ;
echo '<br><span class="description">' . $batimede [ 1 ] . ' </ span >< br >
2007-10-27 10:00:00 +00:00
Besoin de : ' ;
2007-11-04 11:00:00 +00:00
$a = ceil ( exp ( 0.43 * $mine_c ) * 205 );
$b = ceil ( exp ( 0.43 * $mine_c ) * 110 );
2007-10-27 10:00:00 +00:00
ressources ( $metal , $cristal , $hydrogene , $a , $b , 0 , $mine_m , $mine_c , $mine_h ); echo ' < br >
2007-11-04 11:00:00 +00:00
Temps de construction : ' ; sec ( ceil (( pow ( 1.72 , $mine_c ) * 160 ) / ( pow ( 1.23 , $centre_info ) + 0.0025 * $ingeneieur )));
//if (sec(ress_tem($fer, $cristal, $ro, $a, $nb,0, $mine_m, $mine_c, $mine_h)) <= 0) { echo '<br>Temps avant construction : maintenant'; } else { echo'<br>Temps avant construction : ';sec($tem); }
2007-10-27 10:00:00 +00:00
echo ' </ div >
< div class = " c " > ' ;
2007-11-03 11:00:00 +00:00
if ( $temps_b > 0 ) {
2007-03-31 10:00:00 +00:00
if ( $bat == 2 ) {
2007-10-27 10:00:00 +00:00
$tr = $temps_b - time ();
echo '<table align=center><tr><td><div id="axion"></div></td></tr>' ;
echo '<script language="JavaScript">reste(' . $tr . ');</script>' ;
echo " <tr><td><a href= \" batiment_anul.php?bat=2 \" >Annuler</a></td></tr></table> " ;
2007-03-31 10:00:00 +00:00
}
}
2007-10-27 10:00:00 +00:00
else {
if ( $case <= 0 ) echo '<font color=red>Plan<61> te pleine</font>' ;
else verification_des_ress ( 2 , $metal , $cristal , $hydrogene , $a , $b , 0 );
}
echo ' </ div >
< br class = " a " >
< div class = " a " >
< img src = " images/batiments/'. $batimeni[2] .' " alt = " " >
2007-11-03 11:00:00 +00:00
</ div >
2007-10-27 10:00:00 +00:00
< div class = " b " >
2007-11-04 11:00:00 +00:00
< a href = " descriptions.php?bat=2 " > '.$batiment[2].' </ a > '; if ($mine_h > 0) echo ' ( Niveau '.$mine_h.' ) ' ;
echo '<br><span class="description">' . $batimede [ 2 ] . ' </ span >< br >
2007-10-27 10:00:00 +00:00
Besoin de : ' ;
2007-11-04 11:00:00 +00:00
$a = ceil ( exp ( 0.445 * $mine_h ) * 235 );
$b = ceil ( exp ( 0.445 * $mine_h ) * 150 );
2007-10-27 10:00:00 +00:00
ressources ( $metal , $cristal , $hydrogene , $a , $b , 0 , $mine_m , $mine_c , $mine_h ); echo ' < br >
2007-11-04 11:00:00 +00:00
Temps de construction : ' ; sec ( ceil (( pow ( 1.75 , $mine_h ) * 180 ) / ( pow ( 1.23 , $centre_info ) + 0.0025 * $ingeneieur )));
//if (sec(ress_tem($fer, $cristal, $ro, $a, $nb,0, $mine_m, $mine_c, $mine_h)) <= 0) { echo '<br>Temps avant construction : maintenant'; } else { echo'<br>Temps avant construction : ';sec($tem); }
2007-10-27 10:00:00 +00:00
echo ' </ div >
< div class = " c " > ' ;
2007-11-03 11:00:00 +00:00
if ( $temps_b > 0 ) {
2007-03-31 10:00:00 +00:00
if ( $bat == 3 ) {
2007-10-27 10:00:00 +00:00
$tr = $temps_b - time ();
echo '<table align=center><tr><td><div id="axion"></div></td></tr>' ;
echo '<script language="JavaScript">reste(' . $tr . ');</script>' ;
echo " <tr><td><a href= \" batiment_anul.php?bat=3 \" >Annuler</a></td></tr></table> " ;
2007-03-31 10:00:00 +00:00
}
}
2007-10-27 10:00:00 +00:00
else {
if ( $case <= 0 ) echo '<font color=red>Plan<61> te pleine</font>' ;
else verification_des_ress ( 3 , $metal , $cristal , $hydrogene , $a , $b , 0 );
}
echo ' </ div >
< br class = " a " >
< div class = " a " >
< img src = " images/batiments/'. $batimeni[3] .' " alt = " " >
2007-11-03 11:00:00 +00:00
</ div >
2007-10-27 10:00:00 +00:00
< div class = " b " >
2007-11-04 11:00:00 +00:00
< a href = " descriptions.php?bat=3 " > '.$batiment[3].' </ a > '; if ($centrale_s > 0) echo ' ( Niveau '.$centrale_s.' ) ' ;
echo '<br><span class="description">' . $batimede [ 3 ] . ' </ span >< br >
2007-10-27 10:00:00 +00:00
Besoin de : ' ;
2007-11-04 11:00:00 +00:00
$a = ceil ( exp ( 0.442 * $centrale_s ) * 165 );
$b = ceil ( exp ( 0.442 * $centrale_s ) * 99 );
2007-10-27 10:00:00 +00:00
ressources ( $metal , $cristal , $hydrogene , $a , $b , 0 , $mine_m , $mine_c , $mine_h ); echo ' < br >
2007-11-04 11:00:00 +00:00
Temps de construction : ' ; sec ( ceil (( pow ( 1.68 , $centrale_s ) * 190 ) / ( pow ( 1.23 , $centre_info ) + 0.0025 * $ingeneieur )));
//if (sec(ress_tem($fer, $cristal, $ro, $a, $nb,0, $mine_m, $mine_c, $mine_h)) <= 0) { echo '<br>Temps avant construction : maintenant'; } else { echo'<br>Temps avant construction : ';sec($tem); }
2007-10-27 10:00:00 +00:00
echo ' </ div >
< div class = " c " > ' ;
2007-11-03 11:00:00 +00:00
if ( $temps_b > 0 ) {
2007-03-31 10:00:00 +00:00
if ( $bat == 4 ) {
2007-10-27 10:00:00 +00:00
$tr = $temps_b - time ();
echo '<table align=center><tr><td><div id="axion"></div></td></tr>' ;
echo '<script language="JavaScript">reste(' . $tr . ');</script>' ;
echo " <tr><td><a href= \" batiment_anul.php?bat=4 \" >Annuler</a></td></tr></table> " ;
2007-03-31 10:00:00 +00:00
}
}
2007-10-27 10:00:00 +00:00
else {
if ( $case <= 0 ) echo '<font color=red>Plan<61> te pleine</font>' ;
else verification_des_ress ( 4 , $metal , $cristal , $hydrogene , $a , $b , 0 );
}
echo '</div><br class="a">' ;
if ( $centrale_s >= 12 && $energie_t >= 5 ) {
echo ' < div class = " a " >
< img src = " images/batiments/'. $batimeni[4] .' " alt = " " >
</ div >
< div class = " b " >
2007-11-04 11:00:00 +00:00
< a href = " descriptions.php?bat=4 " > '.$batiment[4].' </ a > '; if ($centrale_f > 0) echo ' ( Niveau '.$centrale_f.' ) ' ;
echo '<br><span class="description">' . $batimede [ 4 ] . ' </ span >< br >
2007-10-27 10:00:00 +00:00
Besoin de : ' ;
2007-11-04 11:00:00 +00:00
$a = ceil ( pow ( 1.8 , $centrale_f ) * 300 );
$b = ceil ( pow ( 1.82 , $centrale_f ) * 230 );
2007-10-27 10:00:00 +00:00
ressources ( $metal , $cristal , $hydrogene , $a , $b , 0 , $mine_m , $mine_c , $mine_h ); echo ' < br >
2007-11-04 11:00:00 +00:00
Temps de construction : ' ; sec ( ceil (( pow ( 1.8 , $centrale_f ) * 300 ) / ( pow ( 1.23 , $centre_info ) + 0.0025 * $ingeneieur )));
//if (sec(ress_tem($fer, $cristal, $ro, $a, $nb,0, $mine_m, $mine_c, $mine_h)) <= 0) { echo '<br>Temps avant construction : maintenant'; } else { echo'<br>Temps avant construction : ';sec($tem); }
2007-10-27 10:00:00 +00:00
echo ' </ div >
< div class = " c " > ' ;
if ( $temps_b > 0 ) {
if ( $bat == 5 ) {
$tr = $temps_b - time ();
echo '<table align=center><tr><td><div id="axion"></div></td></tr>' ;
echo '<script language="JavaScript">reste(' . $tr . ');</script>' ;
echo " <tr><td><a href= \" batiment_anul.php?bat=5 \" >Annuler</a></td></tr></table> " ;
}
2007-03-31 10:00:00 +00:00
}
2007-10-27 10:00:00 +00:00
else {
if ( $case <= 0 ) echo '<font color=red>Plan<61> te pleine</font>' ;
else verification_des_ress ( 5 , $metal , $cristal , $hydrogene , $a , $b , 0 );
}
echo '</div><br class="a">' ;
2007-03-31 10:00:00 +00:00
}
if ( $detection >= 1 ) {
2007-10-27 10:00:00 +00:00
echo ' < div class = a >
< img src = " images/batiments/'. $batimeni[5] .' " alt = " " >
</ div >
< div class = " b " >
2007-11-04 11:00:00 +00:00
< a href = " descriptions.php?bat=5 " > '.$batiment[5].' </ a > '; if ($radar > 0) echo ' ( Niveau '.$radar.' ) ' ;
echo '<br><span class="description">' . $batimede [ 5 ] . ' </ span >< br >
2007-10-27 10:00:00 +00:00
Besoin de : ' ;
$a = ceil ( pow ( 2 , $radar ) * 750 );
$b = ceil ( pow ( 2 , $radar ) * 500 );
$c = ceil ( pow ( 2 , $radar ) * 50 );
ressources ( $metal , $cristal , $hydrogene , $a , $b , $c , $mine_m , $mine_c , $mine_h ); echo ' < br >
2007-11-04 11:00:00 +00:00
Temps de construction : ' ; sec ( ceil (( pow ( 2 , $radar ) * 720 ) / ( pow ( 1.23 , $centre_info ) + 0.0025 * $ingeneieur )));
//if (sec(ress_tem($fer, $cristal, $ro, $a, $nb,$c, $mine_m, $mine_c, $mine_h)) <= 0) { echo '<br>Temps avant construction : maintenant'; } else { echo'<br>Temps avant construction : ';sec($tem); }
2007-10-27 10:00:00 +00:00
echo ' </ div >
< div class = " c " > ' ;
if ( $temps_b > 0 ) {
if ( $bat == 6 ) {
$tr = $temps_b - time ();
echo '<table align="center"><tr><td><div id="axion"></div></td></tr>' ;
echo '<script language="JavaScript">reste(' . $tr . ');</script>' ;
echo " <tr><td><a href= \" batiment_anul.php?bat=6 \" >Annuler</a></td></tr></table> " ;
}
}
else {
if ( $case <= 0 ) echo '<font color="red">Plan<61> te pleine</font>' ;
else verification_des_ress ( 6 , $metal , $cristal , $hydrogene , $a , $b , $c );
2007-03-31 10:00:00 +00:00
}
2007-10-27 10:00:00 +00:00
echo '</div><br class="a">' ;
2007-03-31 10:00:00 +00:00
}
2007-11-03 11:00:00 +00:00
2007-10-27 10:00:00 +00:00
echo ' < div class = " a " >
< img src = " images/batiments/'. $batimeni[6] .' " alt = " " >
2007-11-03 11:00:00 +00:00
</ div >
2007-10-27 10:00:00 +00:00
< div class = " b " >
2007-11-04 11:00:00 +00:00
< a href = " descriptions.php?bat=6 " > '.$batiment[6].' </ a > '; if ($labo > 0) echo ' ( Niveau '.$labo.' ) ' ;
echo '<br><span class="description">' . $batimede [ 6 ] . ' </ span >< br >
2007-10-27 10:00:00 +00:00
Besoin de : ' ;
$a = ceil ( pow ( 2 , $labo ) * 200 );
$b = ceil ( pow ( 2 , $labo ) * 150 );
ressources ( $metal , $cristal , $hydrogene , $a , $b , 0 , $mine_m , $mine_c , $mine_h ); echo ' < br >
2007-11-04 11:00:00 +00:00
Temps de construction : ' ; sec ( ceil (( pow ( 2 , $labo ) * 720 ) / ( pow ( 1.23 , $centre_info ) + 0.0025 * $ingeneieur )));
//if (sec(ress_tem($fer, $cristal, $ro, $a, $nb,0, $mine_m, $mine_c, $mine_h)) <= 0) { echo '<br>Temps avant construction : maintenant'; } else { echo'<br>Temps avant construction : ';sec($tem); }
2007-10-27 10:00:00 +00:00
echo ' </ div >
< div class = " c " > ' ;
2007-11-03 11:00:00 +00:00
if ( $temps_b > 0 ) {
2007-03-31 10:00:00 +00:00
if ( $bat == 7 ) {
2007-10-27 10:00:00 +00:00
$tr = $temps_b - time ();
echo '<table align="center"><tr><td><div id="axion"></div></td></tr>' ;
echo '<script language="JavaScript">reste(' . $tr . ');</script>' ;
echo " <tr><td><a href= \" batiment_anul.php?bat=7 \" >Annuler</a></td></tr></table> " ;
2007-03-31 10:00:00 +00:00
}
}
2007-10-27 10:00:00 +00:00
else {
if ( $case <= 0 ) echo " <font color=red>Plan<61> te pleine</font> " ;
else {
2007-11-04 11:00:00 +00:00
if ( $tec > 0 ) echo '<font color="red"><br><br>Recherche en cours dans le </font><a href="laboratoire.php">laboratoire</a>' ;
2007-10-27 10:00:00 +00:00
else verification_des_ress ( 7 , $metal , $cristal , $hydrogene , $a , $b , 0 );
}
}
echo ' </ div >
< br class = " a " >
< div class = " a " >
< img src = " images/batiments/'. $batimeni[7] .' " alt = " " >
2007-11-03 11:00:00 +00:00
</ div >
2007-10-27 10:00:00 +00:00
< div class = " b " >
2007-11-04 11:00:00 +00:00
< a href = " descriptions.php?bat='. $batimend[7] .' " > '.$batiment[7].' </ a > '; if ($chantier_terrestre > 0) echo ' ( Niveau '.$chantier_terrestre.' ) ' ;
echo '<br><span class="description">' . $batimede [ 7 ] . ' </ span >< br >
2007-10-27 10:00:00 +00:00
Besoin de : ' ;
$a = ceil ( pow ( 2 , $chantier_terrestre ) * 520 );
$b = ceil ( pow ( 2 , $chantier_terrestre ) * 380 );
ressources ( $metal , $cristal , $hydrogene , $a , $b , 0 , $mine_m , $mine_c , $mine_h ); echo ' < br >
2007-11-04 11:00:00 +00:00
Temps de construction : ' ; sec ( ceil (( pow ( 2 , $chantier_terrestre ) * 420 ) / ( pow ( 1.23 , $centre_info ) + 0.0025 * $ingeneieur )));
//if (sec(ress_tem($fer, $cristal, $ro, $a, $nb,0, $mine_m, $mine_c, $mine_h)) <= 0) { echo '<br>Temps avant construction : maintenant'; } else { echo'<br>Temps avant construction : ';sec($tem); }
2007-10-27 10:00:00 +00:00
echo ' </ div >
< div class = " c " > ' ;
2007-11-03 11:00:00 +00:00
if ( $temps_b > 0 ) {
2007-03-31 10:00:00 +00:00
if ( $bat == 8 ) {
2007-10-27 10:00:00 +00:00
$tr = $temps_b - time ();
echo '<table align=center><tr><td><div id="axion"></div></td></tr>' ;
echo '<script language="JavaScript">reste(' . $tr . ');</script>' ;
echo " <tr><td><a href= \" batiment_anul.php?bat=8 \" >Annuler</a></td></tr></table> " ;
2007-03-31 10:00:00 +00:00
}
}
2007-11-03 11:00:00 +00:00
else {
2007-10-27 10:00:00 +00:00
if ( $case <= 0 ) echo '<font color="red">Plan<61> te pleine</font>' ;
else {
2007-11-04 11:00:00 +00:00
if ( $unit_t > 0 && unit_t <= 8 ) { echo '<font color="red"><br><br>Construction en cours dans le </font><a href="chantier_terrestre.php">chantier terrestre</a>' ; }
elseif ( $unit_t > 8 ) { echo '<font color="red"><br><br>Construction en cours dans le </font><a href="defenses.php">centre de d<> fenses</a>' ; }
2007-10-27 10:00:00 +00:00
else verification_des_ress ( 8 , $metal , $cristal , $hydrogene , $a , $b , 0 );
}
}
echo ' </ div >
< br class = " a " > ' ;
2007-03-31 10:00:00 +00:00
if ( $chantier_terrestre >= 2 ) {
2007-10-27 10:00:00 +00:00
echo ' < div class = " a " >
< img src = " images/batiments/'. $batimeni[8] .' " >
</ div >
< div class = " b " >
2007-11-04 11:00:00 +00:00
< a href = " descriptions.php?bat='. $batimend[8] .' " > '.$batiment[8].' </ a > '; if ($chantier_spatial > 0) echo ' ( Niveau '.$chantier_spatial.' ) ' ;
echo '<br><span class="description">' . $batimede [ 8 ] . ' </ span >< br >
2007-10-27 10:00:00 +00:00
Besoin de : ' ;
$a = ceil ( pow ( 2 , $chantier_spatial ) * 600 );
$b = ceil ( pow ( 2 , $chantier_spatial ) * 450 );
ressources ( $metal , $cristal , $hydrogene , $a , $b , 0 , $mine_m , $mine_c , $mine_h ); echo ' < br >
2007-11-04 11:00:00 +00:00
Temps de construction : ' ; sec ( ceil (( pow ( 2 , $chantier_spatial ) * 600 ) / ( pow ( 1.23 , $centre_info ) + 0.0025 * $ingeneieur )));
//if (sec(ress_tem($fer, $cristal, $ro, $a, $nb,0, $mine_m, $mine_c, $mine_h)) <= 0) { echo '<br>Temps avant construction : maintenant'; } else { echo'<br>Temps avant construction : ';sec($tem); }
2007-10-27 10:00:00 +00:00
echo ' </ div >
< div class = " c " > ' ;
if ( $temps_b > 0 ) {
if ( $bat == 9 ) {
$tr = $temps_b - time ();
echo '<table align=center><tr><td><div id="axion"></div></td></tr>' ;
echo '<script language="JavaScript">reste(' . $tr . ');</script>' ;
echo " <tr><td><a href= \" batiment_anul.php?bat=9 \" >Annuler</a></td></tr></table> " ;
}
}
else {
if ( $case <= 0 ) echo " <font color=red>Plan<61> te pleine</font> " ;
else {
2007-11-04 11:00:00 +00:00
if ( $unit_s > 0 ) echo " <font color=red><br><br>Construction en cours dans le </font><a href=chantier_terrestre.php>chantier terrestre</a> " ;
2007-10-27 10:00:00 +00:00
else verification_des_ress ( 9 , $metal , $cristal , $hydrogene , $a , $b , 0 );
}
2007-03-31 10:00:00 +00:00
}
2007-10-27 10:00:00 +00:00
echo '</div><br class="a">' ;
2007-03-31 10:00:00 +00:00
}
2007-11-03 11:00:00 +00:00
2007-10-27 10:00:00 +00:00
echo ' < div class = " a " >
< img src = " images/batiments/'. $batimeni[9] .' " alt = " " >
2007-11-03 11:00:00 +00:00
</ div >
2007-10-27 10:00:00 +00:00
< div class = " b " >
2007-11-04 11:00:00 +00:00
< a href = " descriptions.php?bat='. $batimend[9] .' " > '.$batiment[9].' </ a > '; if ($caserne > 0) echo ' ( Niveau '.$caserne.' ) ' ;
echo '<br><span class="description">' . $batimede [ 9 ] . ' </ span >< br >
2007-10-27 10:00:00 +00:00
Besoin de : ' ;
$a = ceil ( pow ( 2 , $caserne ) * 200 );
$b = ceil ( pow ( 2 , $caserne ) * 100 );
ressources ( $metal , $cristal , $hydrogene , $a , $b , 0 , $mine_m , $mine_c , $mine_h ); echo ' < br >
2007-11-04 11:00:00 +00:00
Temps de construction : ' ; sec ( ceil (( pow ( 2 , $caserne ) * 300 ) / ( pow ( 1.23 , $centre_info ) + 0.0025 * $ingeneieur )));
//if (sec(ress_tem($fer, $cristal, $ro, $a, $nb,0, $mine_m, $mine_c, $mine_h)) <= 0) { echo '<br>Temps avant construction : maintenant'; } else { echo'<br>Temps avant construction : ';sec($tem); }
2007-10-27 10:00:00 +00:00
echo ' </ div >
< div class = " c " > ' ;
2007-11-03 11:00:00 +00:00
if ( $temps_b > 0 ) {
2007-03-31 10:00:00 +00:00
if ( $bat == 10 ) {
2007-10-27 10:00:00 +00:00
$tr = $temps_b - time ();
echo '<table align=center><tr><td><div id="axion"></div></td></tr>' ;
echo '<script language="JavaScript">reste(' . $tr . ');</script>' ;
echo " <tr><td><a href= \" batiment_anul.php?bat=10 \" >Annuler</a></td></tr></table> " ;
2007-03-31 10:00:00 +00:00
}
}
2007-11-03 11:00:00 +00:00
else {
2007-10-27 10:00:00 +00:00
if ( $case <= 0 ) echo '<font color="red">Plan<61> te pleine</font>' ;
else {
if ( $unit > 0 ) echo '<font color="red"><br><br>Entrainement en cours dans la </font><a href="caserne.php">caserne</a>' ;
else verification_des_ress ( 10 , $metal , $cristal , $hydrogene , $a , $b , 0 );
}
}
2007-11-03 11:00:00 +00:00
2007-10-27 10:00:00 +00:00
echo ' </ div >
< br class = " a " >
< div class = " a " >
< img src = " images/batiments/'. $batimeni[10] .' " alt = " " >
2007-11-03 11:00:00 +00:00
</ div >
2007-10-27 10:00:00 +00:00
< div class = " b " >
2007-11-04 11:00:00 +00:00
< a href = " descriptions.php?bat='. $batimend[10] .' " > '.$batiment[10].' </ a > '; if ($silo > 0) echo ' ( Niveau '.$silo.' ) ' ;
echo '<br><span class="description">' . $batimede [ 10 ] . ' </ span >< br >
2007-10-27 10:00:00 +00:00
Besoin de : ' ;
$a = ceil ( pow ( 2 , $silo ) * 400 );
2007-11-03 11:00:00 +00:00
$b = ceil ( pow ( 2 , $silo ) * 260 );
2007-10-27 10:00:00 +00:00
ressources ( $metal , $cristal , $hydrogene , $a , $b , 0 , $mine_m , $mine_c , $mine_h ); echo ' < br >
2007-11-04 11:00:00 +00:00
Temps de construction : ' ; sec ( ceil (( pow ( 2 , $silo ) * 1200 ) / ( pow ( 1.23 , $centre_info ) + 0.0025 * $ingeneieur )));
//if (sec(ress_tem($fer, $cristal, $ro, $a, $nb,0, $mine_m, $mine_c, $mine_h)) <= 0) { echo '<br>Temps avant construction : maintenant'; } else { echo'<br>Temps avant construction : ';sec($tem); }
2007-10-27 10:00:00 +00:00
echo ' </ div >
< div class = " c " > ' ;
2007-11-03 11:00:00 +00:00
if ( $temps_b > 0 ) {
2007-03-31 10:00:00 +00:00
if ( $bat == 11 ) {
2007-10-27 10:00:00 +00:00
$tr = $temps_b - time ();
echo '<table align=center><tr><td><div id="axion"></div></td></tr>' ;
echo '<script language="JavaScript">reste(' . $tr . ');</script>' ;
echo " <tr><td><a href= \" batiment_anul.php?bat=11 \" >Annuler</a></td></tr></table> " ;
2007-03-31 10:00:00 +00:00
}
}
2007-11-03 11:00:00 +00:00
else {
2007-10-27 10:00:00 +00:00
if ( $case <= 0 ) echo '<font color="red">Plan<61> te pleine</font>' ;
else verification_des_ress ( 11 , $metal , $cristal , $hydrogene , $a , $b , 0 );
}
2007-11-04 11:00:00 +00:00
echo '</div>' ;
if ( $informatique >= 2 ) {
echo ' < br class = " a " >
< div class = " a " >
< img src = " images/batiments/'. $batimeni[11] .' " alt = " " >
</ div >
< div class = " b " >
< a href = " descriptions.php?bat='. $batimend[11] .' " > '.$batiment[11].' </ a > '; if ($centre_info > 0) echo ' ( Niveau '.$centre_info.' ) ' ;
echo '<br><div class="description">' . $batimede [ 11 ] . ' </ div >< br >
Besoin de : ' ;
$a = ceil ( pow ( 1.7 , $centre_info ) * 600 );
$b = ceil ( pow ( 1.7 , $centre_info ) * 420 );
$c = ceil ( pow ( 1.7 , $centre_info ) * 100 );
ressources ( $metal , $cristal , $hydrogene , $a , $b , $c , $mine_m , $mine_c , $mine_h ); echo ' < br >
Temps de construction : ' ; sec ( ceil (( pow ( 1.9 , $centre_info ) * 800 ) / (( 0.0025 * $ingeneieur ) + 1 )));
//if (sec(ress_tem($fer, $cristal, $ro, $a, $nb,$c, $mine_m, $mine_c, $mine_h)) <= 0) { echo '<br>Temps avant construction : maintenant'; } else { echo'<br>Temps avant construction : ';sec($tem); }
2007-10-27 10:00:00 +00:00
echo ' </ div >
2007-11-04 11:00:00 +00:00
< div class = " c " > ' ;
if ( $temps_b > 0 ) {
if ( $bat == 12 ) {
$tr = $temps_b - time ();
echo '<table align=center><tr><td><div id="axion"></div></td></tr>' ;
echo '<script language="JavaScript">reste(' . $tr . ');</script>' ;
echo " <tr><td><a href= \" batiment_anul.php?bat=12 \" >Annuler</a></td></tr></table> " ;
}
}
else {
if ( $case <= 0 ) echo '<font color="red">Plan<61> te pleine</font>' ;
else verification_des_ress ( 12 , $metal , $cristal , $hydrogene , $a , $b , $c );
}
echo '</div>' ; }
echo ' </ td ></ tr ></ table ></ div ></ body >
2007-10-27 10:00:00 +00:00
</ html > ' ;
?>