Second revision by Master Leon
This commit is contained in:
parent
4230eb6922
commit
b8e951f59d
382 changed files with 3112 additions and 14815 deletions
|
|
@ -1,57 +1,24 @@
|
|||
<? session_start(); ?>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<link rel="stylesheet" media="screen" name="design" href="design/design.css">
|
||||
<?
|
||||
<?
|
||||
session_start();
|
||||
|
||||
$id=$_SESSION['id'];
|
||||
$galaxy=$_SESSION['galaxy'];
|
||||
$ss=$_SESSION['ss'];
|
||||
$pos=$_SESSION['pos'];
|
||||
include 'ressource.php';
|
||||
|
||||
echo"<html>
|
||||
<head>
|
||||
<title>Space battleship</title>
|
||||
|
||||
<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 >
|
||||
<link rel=shortcut icon type=image/x-icon href=favicon.ico >";
|
||||
|
||||
include 'bdd.php';
|
||||
include 'ajout_niveau.php';
|
||||
include 'batiment_ajout.php';
|
||||
|
||||
$case = $cases - ($mine_m +$mine_c +$mine_h +$centrale_s +$centrale_f +$radar+$labo+$chantier_terrestre +$chantier_spatial+$caserne +$silo );
|
||||
|
||||
function verification_des_ress($numbat,
|
||||
$metal, $cristal, $hydrogene,
|
||||
$ress_ness_metal, $ress_ness_cristal, $ress_ness_hydrogene)
|
||||
{
|
||||
if ($metal >= $ress_ness_metal && $cristal >= $ress_ness_cristal && $hydrogene >= $ress_ness_hydrogene)
|
||||
{
|
||||
echo "<font color=teal><a href=\"constructiion.php?bat=".$numbat."\">Construire</a></font>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<font color=red>Construire</font>";
|
||||
}
|
||||
}
|
||||
|
||||
function ressources($metal, $cristal, $hydrogene,
|
||||
$ress_ness_metal, $ress_ness_cristal, $ress_ness_hydrogene)
|
||||
{
|
||||
if ($metal <= $ress_ness_metal)
|
||||
{
|
||||
$z=floor($metal)-$ress_ness_metal;
|
||||
echo "<font color=red >Métal : <ACRONYM title=".$z.">".$ress_ness_metal."</ACRONYM></font>";
|
||||
}
|
||||
else {echo "<font color=teal >Métal : ".$ress_ness_metal." </font>";}
|
||||
if ($cristal <= $ress_ness_cristal)
|
||||
{
|
||||
$z=floor($cristal)-$ress_ness_cristal;
|
||||
echo "<font color=red >cristal : <ACRONYM title=".$z.">".$ress_ness_cristal."</ACRONYM></font>";
|
||||
}
|
||||
else {echo "<font color=teal >cristal : ".$ress_ness_cristal." </font>";}
|
||||
if ($hydrogene <= $ress_ness_hydrogene)
|
||||
{
|
||||
$z=floor($hydrogene)-$ress_ness_hydrogene;
|
||||
echo "<font color=red >hydrogene : <ACRONYM title=".$z.">".$ress_ness_hydrogene."</ACRONYM></font>";
|
||||
}
|
||||
else {echo "<font color=teal >hydrogene : ".$ress_ness_hydrogene." </font>";}
|
||||
}
|
||||
|
||||
function sec ($time) {
|
||||
function sec($time) {
|
||||
$output = '';
|
||||
$tab = array ('jour' => '86400', 'heure' => '3600', 'minute' => '60', 'seconde' => '1');
|
||||
foreach ($tab as $key => $value) {
|
||||
|
|
@ -68,286 +35,423 @@ if ($value != 1) $output .= ' ';
|
|||
}
|
||||
echo $output;
|
||||
}
|
||||
?>
|
||||
<script language="javascript" src="time.js"></script>
|
||||
|
||||
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) {
|
||||
if ($need_fer > 0) {
|
||||
if ($fer <= $need_fer)
|
||||
{
|
||||
$z=floor($fer)-$need_fer;
|
||||
echo '<font color=red >Fer : <ACRONYM title="'.$z.'">'.$need_fer.'</ACRONYM></font> ';
|
||||
}
|
||||
else {echo "Fer : <span class=rc>".$need_fer." </span>";}}
|
||||
if ($need_cristal > 0) {
|
||||
if ($cristal <= $need_cristal)
|
||||
{
|
||||
$z=floor($cristal)-$need_cristal;
|
||||
echo '<font color=red >Cristal : <ACRONYM title="'.$z.'">'.$need_cristal.'</ACRONYM></font> ';
|
||||
}
|
||||
else {echo "Cristal : <span class=rc>".$need_cristal." </span>";}}
|
||||
if ($need_ro > 0) {
|
||||
if ($ro <= $need_ro)
|
||||
{
|
||||
$z=floor($ro)-$need_ro;
|
||||
echo '<font color=red >Hydrogène : <ACRONYM title="'.$z.'">'.$need_ro.'</ACRONYM></font>';
|
||||
}
|
||||
else {echo "Hydrogène : <span class=rc>".$need_ro."</span>";}}
|
||||
}
|
||||
|
||||
$case = $cases - ($mine_m+$mine_c+$mine_h+$centrale_s+$centrale_f+$radar+$labo+$chantier_terrestre+$chantier_spatial+$caserne+$silo );
|
||||
|
||||
echo "<script language=javascript src=time.js></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<table>
|
||||
<tr>
|
||||
<?
|
||||
|
||||
echo "<tr><td><img src=images/mine_m.png height=120 width=120></td>
|
||||
<td width=600><a href=mine_m.php>Purificateur de métal</a> niveau ".$mine_m."<br>
|
||||
<br>
|
||||
Coût: ";
|
||||
$a=ceil(exp(($mine_m*0.400))*200);
|
||||
|
||||
<body>
|
||||
|
||||
<div class=d><a href=arbre_bat.php>Arbre des technologies</a></div>
|
||||
|
||||
<br class=a>
|
||||
|
||||
<div class=a>
|
||||
<img src=descriptions/diz/batiment>
|
||||
</div>
|
||||
|
||||
<div class=b>
|
||||
<a href=descriptions/.php>Purificateur de métal</a> "; if ($mine_m > 0) { echo "( Niveau ".$mine_m." )"; } echo "<br>
|
||||
Toute construction demande des quantités énormes de fer, pour cela des centaines de milliers d'ouvriers
|
||||
travaillent dans ces mines afin d'assurer le bon fonctionnement de votre empire.<br>
|
||||
Besoin de : ";
|
||||
$a=ceil(exp(($mine_m*0.400))*200);
|
||||
$b=ceil(exp(($mine_m*0.400))*100);
|
||||
ressources($metal, $cristal, $hydrogene, $a, $b, 0);
|
||||
echo"<br>
|
||||
Temps : ";
|
||||
sec((ceil(pow(1.7,$mine_m)*120) - (0.005*$ingenieur*ceil(pow(1.7,($mine_m-1))*120))));
|
||||
echo"<td width=200>";
|
||||
if ($temps > 0) {
|
||||
ressources($metal, $cristal, $hydrogene, $a, $b, 0, $mine_m, $mine_c, $mine_h); echo"<br>
|
||||
Temps de construction : "; sec(ceil(pow(1.7,$mine_m)*120));
|
||||
echo "</div>
|
||||
|
||||
<div class=c>";
|
||||
if ($temps_b > 0) {
|
||||
if ($bat==1) {
|
||||
$tr=$temps-time();
|
||||
$tr=$temps_b-time();
|
||||
echo '<div id="axion"></div>';
|
||||
echo '<script language="JavaScript">reste('.$tr.');</script>';
|
||||
echo "<a href=\"anul_bat.php?bat=1\">Annuler</a>";
|
||||
echo "<a href=\"batiment_anul.php?bat=1\">Annuler</a>";
|
||||
}
|
||||
else {}
|
||||
}
|
||||
else { if ($case <= 0) { echo "Planète pleine"; } else { verification_des_ress(1, $metal, $cristal, $hydrogene, $a, $b, 0); } }
|
||||
echo"</td></tr>";
|
||||
else {
|
||||
if ($case <= 0) { echo "<font color=red>Planète pleine</font>"; }
|
||||
else { verification_des_ress(1, $metal, $cristal, $hydrogene, $a, $b, 0); } }
|
||||
echo "</div>
|
||||
|
||||
|
||||
echo "<tr><td><img src=images/mine_c.png height=120 width=120></td>
|
||||
<td width=600><a href=mine_c.php>Purificateur de cristal</a> niveau ".$mine_c."<br>
|
||||
<br>
|
||||
Coût: ";
|
||||
<br class=a>
|
||||
|
||||
|
||||
<div class=a>
|
||||
<img src=descriptions/diz/batiment>
|
||||
</div>
|
||||
|
||||
<div class=b>
|
||||
<a href=descriptions/.php>Purificateur de cristal</a> "; if ($mine_c > 0) { echo "( Niveau ".$mine_c." )"; } echo "<br>
|
||||
Description.<br>
|
||||
Besoin de : ";
|
||||
$a=ceil(exp(($mine_c*0.430))*210);
|
||||
$b=ceil(exp(($mine_c*0.430))*120);
|
||||
ressources($metal, $cristal, $hydrogene, $a, $b, 0);
|
||||
echo"<br>
|
||||
Temps : ";
|
||||
sec((ceil(pow(1.72,$mine_c)*160)) - (0.005*$ingenieur*ceil(pow(1.72,($mine_c-1))*160)));
|
||||
echo"<td width=200>";
|
||||
if ($temps > 0) {
|
||||
ressources($metal, $cristal, $hydrogene, $a, $b, 0, $mine_m, $mine_c, $mine_h); echo"<br>
|
||||
Temps de construction : "; sec(ceil(pow(1.72,$mine_c)*160));
|
||||
echo "</div>
|
||||
|
||||
<div class=c>";
|
||||
if ($temps_b > 0) {
|
||||
if ($bat==2) {
|
||||
$tr=$temps-time();
|
||||
$tr=$temps_b-time();
|
||||
echo '<div id="axion"></div>';
|
||||
echo '<script language="JavaScript">reste('.$tr.');</script>';
|
||||
echo "<a href=\"anul_bat.php?bat=2\">Annuler</a>";
|
||||
echo "<a href=\"batiment_anul.php?bat=1\">Annuler</a>";
|
||||
}
|
||||
else {}
|
||||
}
|
||||
else { if ($case <= 0) { echo "Planète pleine"; } else {verification_des_ress(2, $metal, $cristal, $hydrogene, $a, $b, 0); } }
|
||||
echo"</td></tr>";
|
||||
else {
|
||||
if ($case <= 0) { echo "<font color=red>Planète pleine</font>"; }
|
||||
else { verification_des_ress(2, $metal, $cristal, $hydrogene, $a, $b, 0); } }
|
||||
echo "</div>
|
||||
|
||||
|
||||
echo "<tr><td><img src=images/mine_h.png height=120 width=120></td>
|
||||
<td width=600><a href=mine_h.php>Ionisateur</a> niveau ".$mine_h."<br>
|
||||
<br>
|
||||
Coût: ";
|
||||
<br class=a>
|
||||
|
||||
|
||||
<div class=a>
|
||||
<img src=descriptions/diz/batiment>
|
||||
</div>
|
||||
|
||||
<div class=b>
|
||||
<a href=descriptions/.php>Ionisateur</a> "; if ($mine_h > 0) { echo "( Niveau ".$mine_h." )"; } echo "<br>
|
||||
Description.<br>
|
||||
Besoin de : ";
|
||||
$a=ceil(exp(($mine_h*0.445))*250);
|
||||
$b=ceil(exp(($mine_h*0.445))*170);
|
||||
ressources($metal, $cristal, $hydrogene, $a, $b, 0);
|
||||
echo"<br>
|
||||
Temps : ";
|
||||
sec((ceil(pow(1.75,$mine_h)*180)) - (0.005*$ingenieur*ceil(pow(1.75,($mine_h-1))*180)));
|
||||
echo"<td width=200>";
|
||||
if ($temps > 0) {
|
||||
ressources($metal, $cristal, $hydrogene, $a, $b, 0, $mine_m, $mine_c, $mine_h); echo"<br>
|
||||
Temps de construction : "; sec(ceil(pow(1.75,$mine_h)*180));
|
||||
echo "</div>
|
||||
|
||||
<div class=c>";
|
||||
if ($temps_b > 0) {
|
||||
if ($bat==3) {
|
||||
$tr=$temps-time();
|
||||
$tr=$temps_b-time();
|
||||
echo '<div id="axion"></div>';
|
||||
echo '<script language="JavaScript">reste('.$tr.');</script>';
|
||||
echo "<a href=\"anul_bat.php?bat=3\">Annuler</a>";
|
||||
echo "<a href=\"batiment_anul.php?bat=1\">Annuler</a>";
|
||||
}
|
||||
else {}
|
||||
}
|
||||
else { if ($case <= 0) { echo "Planète pleine"; } else {verification_des_ress(3, $metal, $cristal, $hydrogene, $a, $b, 0); } }
|
||||
echo"</td></tr>";
|
||||
else {
|
||||
if ($case <= 0) { echo "<font color=red>Planète pleine</font>"; }
|
||||
else { verification_des_ress(3, $metal, $cristal, $hydrogene, $a, $b, 0); } }
|
||||
echo "</div>
|
||||
|
||||
echo "<tr><td><img src=images/centrale.JPG height=120 width=120></td>
|
||||
<td width=600><a href=central_s.php>Centrale solaire</a> niveau ".$centrale_s."<br>
|
||||
<br>
|
||||
Coût: "; $n=($centrale_s-1);
|
||||
$a=ceil(pow(2,$n)*300);
|
||||
$b=ceil(pow(2,$n)*230);
|
||||
ressources($metal, $cristal, $hydrogene, $a, $b, 0);
|
||||
echo"<br>
|
||||
Temps : ";
|
||||
sec((ceil(pow(1.68,$centrale_s)*190)) - (0.005*$ingenieur*ceil(pow(1.68,($centrale_s-1))*190)));
|
||||
echo"<td width=200>";
|
||||
if ($temps > 0) {
|
||||
|
||||
<br class=a>
|
||||
|
||||
|
||||
<div class=a>
|
||||
<img src=descriptions/diz/batiment>
|
||||
</div>
|
||||
|
||||
<div class=b>
|
||||
<a href=descriptions/.php>Centrale solaire</a> "; if ($centrale_s > 0) { echo "( Niveau ".$centrale_s." )"; } echo "<br>
|
||||
Description.<br>
|
||||
Besoin de : ";
|
||||
$a=ceil(pow(2,$centrale_s)*300);
|
||||
$b=ceil(pow(2,$centrale_s)*230);
|
||||
ressources($metal, $cristal, $hydrogene, $a, $b, 0, $mine_m, $mine_c, $mine_h); echo"<br>
|
||||
Temps de construction : "; sec(pow(1.68,$centrale_s)*190);
|
||||
echo "</div>
|
||||
|
||||
<div class=c>";
|
||||
if ($temps_b > 0) {
|
||||
if ($bat==4) {
|
||||
$tr=$temps-time();
|
||||
$tr=$temps_b-time();
|
||||
echo '<div id="axion"></div>';
|
||||
echo '<script language="JavaScript">reste('.$tr.');</script>';
|
||||
echo "<a href=\"anul_bat.php?bat=4\">Annuler</a>";
|
||||
echo "<a href=\"batiment_anul.php?bat=1\">Annuler</a>";
|
||||
}
|
||||
else {}
|
||||
}
|
||||
else { if ($case <= 0) { echo "Planète pleine"; } else {verification_des_ress(4, $metal, $cristal, $hydrogene, $a, $b, 0); } }
|
||||
echo"</td></tr>";
|
||||
else {
|
||||
if ($case <= 0) { echo "<font color=red>Planète pleine</font>"; }
|
||||
else { verification_des_ress(4, $metal, $cristal, $hydrogene, $a, $b, 0); } }
|
||||
echo "</div>
|
||||
|
||||
|
||||
if ($centrale_s >= 12 && $energie_t >=5) {
|
||||
echo "<tr><td><img src=images/centrale_f.png height=120 width=120></td>
|
||||
<td width=600><a href=central_f.php>Centrale de fusion</a> niveau ".$centrale_f."<br>
|
||||
<br>
|
||||
Coût: ";
|
||||
$n=($centrale_f-1);
|
||||
$a=ceil(pow(2,$n)*165);
|
||||
$b=ceil(pow(2,$n)*99);
|
||||
ressources($metal, $cristal, $hydrogene, $a, $b, 0);
|
||||
echo"<br>
|
||||
Temps : ";
|
||||
sec((ceil(pow(1.8,$centrale_f)*300)) - (0.005*$ingenieur*ceil(pow(1.8,($centrale_f-1))*300)));
|
||||
echo"<td width=200>";
|
||||
if ($temps > 0) {
|
||||
<br class=a>
|
||||
|
||||
|
||||
<div class=a>
|
||||
<img src=descriptions/diz/batiment>
|
||||
</div>
|
||||
|
||||
<div class=b>
|
||||
<a href=descriptions/.php>Centrale de fusion</a> "; if ($centrale_f > 0) { echo "( Niveau ".$centrale_f." )"; } echo "<br>
|
||||
Description.<br>
|
||||
Besoin de : ";
|
||||
$a=ceil(pow(2,$centrale_f)*165);
|
||||
$b=ceil(pow(2,$centrale_f)*99);
|
||||
ressources($metal, $cristal, $hydrogene, $a, $b, 0, $mine_m, $mine_c, $mine_h); echo"<br>
|
||||
Temps de construction : "; sec(pow(1.8,$centrale_f)*300);
|
||||
echo "</div>
|
||||
|
||||
<div class=c>";
|
||||
if ($temps_b > 0) {
|
||||
if ($bat==5) {
|
||||
$tr=$temps-time();
|
||||
$tr=$temps_b-time();
|
||||
echo '<div id="axion"></div>';
|
||||
echo '<script language="JavaScript">reste('.$tr.');</script>';
|
||||
echo "<a href=\"anul_bat.php?bat=5\">Annuler</a>";
|
||||
echo "<a href=\"batiment_anul.php?bat=1\">Annuler</a>";
|
||||
}
|
||||
else {}
|
||||
}
|
||||
else { if ($case <= 0) { echo "Planète pleine"; } else {verification_des_ress(5, $metal, $cristal, $hydrogene, $a, $b, 0); } }
|
||||
echo"</td></tr>"; } else {}
|
||||
else {
|
||||
if ($case <= 0) { echo "<font color=red>Planète pleine</font>"; }
|
||||
else { verification_des_ress(5, $metal, $cristal, $hydrogene, $a, $b, 0); } }
|
||||
echo "</div>
|
||||
|
||||
|
||||
<br class=a>";
|
||||
|
||||
if ($detection >= 1) {
|
||||
echo "<tr><td><img src=images/radar.png height=120 width=120></td>
|
||||
<td width=600>Oeil des prophètes niveau ".$radar."<br>
|
||||
<br>
|
||||
Coût: ";
|
||||
$n=($radar-1);
|
||||
$a=ceil(pow(2,$n)*750);
|
||||
$b=ceil(pow(2,$n)*500);
|
||||
$c=ceil(pow(2,$n)*50);
|
||||
ressources($metal, $cristal, $hydrogene, $a, $b, $c);
|
||||
echo"<br>
|
||||
Temps : ";
|
||||
sec((ceil(pow(2,$radar)*720) - (0.005*$ingenieur*ceil(pow(2,($radar-1))*720))));
|
||||
echo"<td width=200>";
|
||||
if ($temps > 0) {
|
||||
echo "<div class=a>
|
||||
<img src=descriptions/diz/batiment>
|
||||
</div>
|
||||
|
||||
<div class=b>
|
||||
<a href=descriptions/.php>Oeil des prophètes</a> "; if ($radar > 0) { echo "( Niveau ".$radar." )"; } echo "<br>
|
||||
Description.<br>
|
||||
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>
|
||||
Temps de construction : "; sec(ceil(pow(2,$radar)*720));
|
||||
echo "</div>
|
||||
|
||||
<div class=c>";
|
||||
if ($temps_b > 0) {
|
||||
if ($bat==6) {
|
||||
$tr=$temps-time();
|
||||
$tr=$temps_b-time();
|
||||
echo '<div id="axion"></div>';
|
||||
echo '<script language="JavaScript">reste('.$tr.');</script>';
|
||||
echo "<a href=\"anul_bat.php?bat=6\">Annuler</a>";
|
||||
echo "<a href=\"batiment_anul.php?bat=1\">Annuler</a>";
|
||||
}
|
||||
else {}
|
||||
}
|
||||
else { if ($case <= 0) { echo "Planète pleine"; } else {verification_des_ress(6, $metal, $cristal, $hydrogene, $a, $b, $c); } }
|
||||
echo"</td></tr>"; } else {}
|
||||
else {
|
||||
if ($case <= 0) { echo "<font color=red>Planète pleine</font>"; }
|
||||
else { verification_des_ress(6, $metal, $cristal, $hydrogene, $a, $b, $c); } }
|
||||
echo "</div><br class=a>"; }
|
||||
|
||||
|
||||
echo "<tr><td><img src=images/labo.jpg height=120 width=120></td>
|
||||
<td width=600>Centre de recherches niveau ".$labo."<br>
|
||||
<br>
|
||||
Coût: ";
|
||||
$n=($labo-1);
|
||||
$a=ceil(pow(2,$n)*200);
|
||||
$b=ceil(pow(2,$n)*150);
|
||||
ressources($metal, $cristal, $hydrogene, $a, $b, 0);
|
||||
echo"<br>
|
||||
Temps : ";
|
||||
sec((ceil(pow(2,$labo)*720)) - (0.005*$ingenieur*ceil(pow(2,($labo-1))*720)));
|
||||
echo"<td width=200>";
|
||||
if ($temps > 0) {
|
||||
echo "<div class=a>
|
||||
<img src=descriptions/diz/batiment>
|
||||
</div>
|
||||
|
||||
<div class=b>
|
||||
<a href=descriptions/.php>Centre de recherches</a> "; if ($labo > 0) { echo "( Niveau ".$labo." )"; } echo "<br>
|
||||
Description.<br>
|
||||
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>
|
||||
Temps de construction : "; sec(ceil(pow(2,$labo)*720));
|
||||
echo "</div>
|
||||
|
||||
<div class=c>";
|
||||
if ($temps_b > 0) {
|
||||
if ($bat==7) {
|
||||
$tr=$temps-time();
|
||||
$tr=$temps_b-time();
|
||||
echo '<div id="axion"></div>';
|
||||
echo '<script language="JavaScript">reste('.$tr.');</script>';
|
||||
echo "<a href=\"anul_bat.php?bat=7\">Annuler</a>";
|
||||
echo "<a href=\"batiment_anul.php?bat=1\">Annuler</a>";
|
||||
}
|
||||
else {}
|
||||
}
|
||||
else { if ($case <= 0) { echo "Planète pleine"; } else {if($tec > 0) {echo "<font color=red>Recherche en cours dans le </font><a href=labo.php>laboratoire</a>"; } else {verification_des_ress(7, $metal, $cristal, $hydrogene, $a, $b, 0);} } }
|
||||
echo"</td></tr>";
|
||||
else {
|
||||
if ($case <= 0) { echo "<font color=red>Planète pleine</font>"; }
|
||||
else { if($temps_t > 0) {
|
||||
echo "<font color=red><br><br>Recherche en cours dans le </font><a href=labo.php>laboratoire</a>"; } else {
|
||||
verification_des_ress(7, $metal, $cristal, $hydrogene, $a, $b, 0); } } }
|
||||
echo "</div>
|
||||
|
||||
|
||||
echo "<tr><td><img src=images/chantier_terrestre.png height=120 width=120></td>
|
||||
<td width=600>Chantier terrestre niveau ".$chantier_terrestre."<br>
|
||||
<br>
|
||||
Coût: ";
|
||||
$n=($chantier_terrestre-1);
|
||||
$a=ceil(pow(2,$n)*520);
|
||||
$b=ceil(pow(2,$n)*380);
|
||||
ressources($metal, $cristal, $hydrogene, $a, $b, 0);
|
||||
echo"<br>
|
||||
Temps : ";
|
||||
sec((ceil(pow(2,$chantier_terrestre)*420)) - (0.005*$ingenieur*ceil(pow(2,($chantier_terrestre-1))*420)));
|
||||
echo"<td width=200>";
|
||||
if ($temps > 0) {
|
||||
<br class=a>
|
||||
|
||||
|
||||
<div class=a>
|
||||
<img src=descriptions/diz/batiment>
|
||||
</div>
|
||||
|
||||
<div class=b>
|
||||
<a href=descriptions/.php>Chantier terrestre</a> "; if ($chantier_terrestre > 0) { echo "( Niveau ".$chantier_terrestre." )"; } echo "<br>
|
||||
Description.<br>
|
||||
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>
|
||||
Temps de construction : "; sec(ceil(pow(2,$chantier_terrestre)*420));
|
||||
echo "</div>
|
||||
|
||||
<div class=c>";
|
||||
if ($temps_b > 0) {
|
||||
if ($bat==8) {
|
||||
$tr=$temps-time();
|
||||
$tr=$temps_b-time();
|
||||
echo '<div id="axion"></div>';
|
||||
echo '<script language="JavaScript">reste('.$tr.');</script>';
|
||||
echo "<a href=\"anul_bat.php?bat=8\">Annuler</a>";
|
||||
echo "<a href=\"batiment_anul.php?bat=1\">Annuler</a>";
|
||||
}
|
||||
else {}
|
||||
}
|
||||
else { if ($case <= 0) { echo "Planète pleine"; } else {if($unit_t > 0) {echo "<font color=red>Construction en cours dans le </font>"; if ($unit_t<9 && $unit_s >0) {echo "<a href=chantier_terrestre.php>chantier terrestre</a>";} else if ( $unit_t>=9) {echo "<a href=defense.php>centre de défenses</a>";} }
|
||||
else {verification_des_ress(8, $metal, $cristal, $hydrogene, $a, $b, 0); } } }
|
||||
echo"</td></tr>";
|
||||
else {
|
||||
if ($case <= 0) { echo "<font color=red>Planète pleine</font>"; }
|
||||
else {if($unit_s > 0) {
|
||||
echo "<font color=red><br><br>Construction en cours dans le </font><a href=chantier_spatial.php>chantier spatial</a>"; }
|
||||
else { verification_des_ress(8, $metal, $cristal, $hydrogene, $a, $b, 0); }}}
|
||||
echo "</div>
|
||||
|
||||
|
||||
<br class=a>";
|
||||
|
||||
if ($chantier_terrestre >= 2) {
|
||||
echo "<tr><td><img src= height=120 width=120></td>
|
||||
<td width=600>Chantier spatial niveau ".$chantier_spatial."<br>
|
||||
<br>
|
||||
Coût: ";
|
||||
$n=($chantier_spatial-1);
|
||||
$a=ceil(pow(2,$n)*600);
|
||||
$b=ceil(pow(2,$n)*450);
|
||||
ressources($metal, $cristal, $hydrogene, $a, $b, 0);
|
||||
echo"<br>
|
||||
Temps : ";
|
||||
sec((ceil(pow(2,$chantier_spatial)*600)) - (0.005*$ingenieur*ceil(pow(2,($chantier_spatial-1))*600)));
|
||||
echo"<td width=200>";
|
||||
if ($temps > 0) {
|
||||
echo "<div class=a>
|
||||
<img src=descriptions/diz/batiment>
|
||||
</div>
|
||||
|
||||
<div class=b>
|
||||
<a href=descriptions/.php>Chantier spatial</a> "; if ($chantier_spatial > 0) { echo "( Niveau ".$chantier_spatial." )"; } echo "<br>
|
||||
Description.<br>
|
||||
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>
|
||||
Temps de construction : "; sec(ceil(pow(2,$chantier_spatial)*600));
|
||||
echo "</div>
|
||||
|
||||
<div class=c>";
|
||||
if ($temps_b > 0) {
|
||||
if ($bat==9) {
|
||||
$tr=$temps-time();
|
||||
$tr=$temps_b-time();
|
||||
echo '<div id="axion"></div>';
|
||||
echo '<script language="JavaScript">reste('.$tr.');</script>';
|
||||
echo "<a href=\"anul_bat.php?bat=9\">Annuler</a>";
|
||||
echo "<a href=\"batiment_anul.php?bat=1\">Annuler</a>";
|
||||
}
|
||||
else {}
|
||||
}
|
||||
else { if ($case <= 0) { echo "Planète pleine"; } else {if($unit_s > 0) {echo "<font color=red>Construction en cours dans le </font><a href=chantier_spatial.php>chantier spatial</a>"; } else {verification_des_ress(9, $metal, $cristal, $hydrogene, $a, $b, 0); } } }
|
||||
echo"</td></tr>"; } else {}
|
||||
else {
|
||||
if ($case <= 0) { echo "<font color=red>Planète pleine</font>"; }
|
||||
else {if($unit_s > 0) {
|
||||
echo "<font color=red><br><br>Construction en cours dans le </font><a href=chantier_spatial.php>chantier spatial</a>"; }
|
||||
else {verification_des_ress(9, $metal, $cristal, $hydrogene, $a, $b, 0); } } }
|
||||
echo "</div><br class=a>"; }
|
||||
|
||||
echo "<tr><td><img src=images/caserne.jpg height=120 width=120></td>
|
||||
<td width=600>Caserne niveau ".$caserne."<br>
|
||||
<br>
|
||||
Coût: ";
|
||||
$n=($caserne-1);
|
||||
$a=ceil(pow(2,$n)*200);
|
||||
$b=ceil(pow(2,$n)*100);
|
||||
ressources($metal, $cristal, $hydrogene, $a, $b, 0);
|
||||
echo"<br>
|
||||
Temps : ";
|
||||
sec((ceil(pow(2,$caserne)*300)) - (0.005*$ingenieur*ceil(pow(2,($caserne-1))*300)));
|
||||
echo"<td width=200>";
|
||||
if ($temps > 0) {
|
||||
|
||||
echo "<br class=a>
|
||||
|
||||
|
||||
<div class=a>
|
||||
<img src=descriptions/diz/batiment>
|
||||
</div>
|
||||
|
||||
<div class=b>
|
||||
<a href=descriptions/.php>Caserne</a> "; if ($caserne > 0) { echo "( Niveau ".$caserne." )"; } echo "<br>
|
||||
Description.<br>
|
||||
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>
|
||||
Temps de construction : "; sec(ceil(pow(2,$caserne)*300));
|
||||
echo "</div>
|
||||
|
||||
<div class=c>";
|
||||
if ($temps_b > 0) {
|
||||
if ($bat==10) {
|
||||
$tr=$temps-time();
|
||||
$tr=$temps_b-time();
|
||||
echo '<div id="axion"></div>';
|
||||
echo '<script language="JavaScript">reste('.$tr.');</script>';
|
||||
echo "<a href=\"anul_bat.php?bat=10\">Annuler</a>";
|
||||
echo "<a href=\"batiment_anul.php?bat=1\">Annuler</a>";
|
||||
}
|
||||
else {}
|
||||
}
|
||||
else { if ($case <= 0) { echo "Planète pleine"; } else {if($unit > 0) {echo "<font color=red>Entrainement en cours dans la </font><a href=troupes.php>caserne</a>"; } else {verification_des_ress(10, $metal, $cristal, $hydrogene, $a, $b, 0); }} }
|
||||
echo"</td></tr>";
|
||||
else {
|
||||
if ($case <= 0) { echo "<font color=red>Planè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); }}}
|
||||
echo "</div>
|
||||
|
||||
echo "<tr><td><img src=images/silo.jpg height=120 width=120></td>
|
||||
<td width=600>Entrepôt niveau ".$silo."<br>
|
||||
<br>
|
||||
Coût: ";
|
||||
$n=($silo-1);
|
||||
$a=ceil(pow(2,$n)*400);
|
||||
$b=ceil(pow(2,$n)*260);
|
||||
ressources($metal, $cristal, $hydrogene, $a, $b, 0);
|
||||
echo"<br>
|
||||
Temps : ";
|
||||
sec((ceil(pow(2,$silo)*1200)) - (0.005*$ingenieur*ceil(pow(2,($silo-1))*1200)));
|
||||
echo"<td width=200>";
|
||||
if ($temps > 0) {
|
||||
|
||||
<br class=a>
|
||||
|
||||
|
||||
<div class=a>
|
||||
<img src=descriptions/diz/batiment>
|
||||
</div>
|
||||
|
||||
<div class=b>
|
||||
<a href=descriptions/.php>Entrepôt</a> "; if ($caserne > 0) { echo "( Niveau ".$caserne." )"; } echo "<br>
|
||||
Description.<br>
|
||||
Besoin de : ";
|
||||
$a=ceil(pow(2,$silo)*400);
|
||||
$b=ceil(pow(2,$silo)*260);
|
||||
ressources($metal, $cristal, $hydrogene, $a, $b, 0, $mine_m, $mine_c, $mine_h); echo"<br>
|
||||
Temps de construction : "; sec(ceil(pow(2,$silo)*1200));
|
||||
echo "</div>
|
||||
|
||||
<div class=c>";
|
||||
if ($temps_b > 0) {
|
||||
if ($bat==11) {
|
||||
$tr=$temps-time();
|
||||
$tr=$temps_b-time();
|
||||
echo '<div id="axion"></div>';
|
||||
echo '<script language="JavaScript">reste('.$tr.');</script>';
|
||||
echo "<a href=\"anul_bat.php?bat=11\">Annuler</a>";
|
||||
echo "<a href=\"batiment_anul.php?bat=1\">Annuler</a>";
|
||||
}
|
||||
else {}
|
||||
}
|
||||
else { if ($case <= 0) { echo "Planète pleine"; } else {verification_des_ress(11, $metal, $cristal, $hydrogene, $a, $b, 0); } }
|
||||
echo"</td></tr>";
|
||||
?>
|
||||
else {
|
||||
if ($case <= 0) { echo "<font color=red>Planète pleine</font>"; }
|
||||
else { verification_des_ress(11, $metal, $cristal, $hydrogene, $a, $b, 0); } }
|
||||
echo "</div>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</html>"; ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue