Version 2007-11-04

This commit is contained in:
nemunaire 2007-11-04 12:00:00 +01:00
commit ebc73c5744
377 changed files with 5163 additions and 2495 deletions

View file

@ -1,15 +1,24 @@
<?php
session_start();
define('DESIGN', 'descriptions/diz/base.css');
require('../header.php');
$id=$_SESSION['id'];
$galaxy=$_SESSION['galaxy'];
$ss=$_SESSION['ss'];
$pos=$_SESSION['pos'];
require_once('noms.php');
require_once('bdd.php');
require_once('ressource.php');
echo"<html>
<head>
<title>Halo battle</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 >";
require_once 'bdd.php';
require_once 'ressource.php';
require_once 'chantier_terrestre_ajout.php';
require_once 'noms.php';
function sec ($time) {
$output = '';
@ -30,33 +39,18 @@ function sec ($time) {
}
$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));
$f = ceil(480/pow(1.25,($chantier_terrestre-1)));
$g = ceil(1560/pow(1.25,($chantier_terrestre-3)));
$h = ceil(1800/pow(1.25,($chantier_terrestre-4)));
$i = ceil(6720/pow(1.25,($chantier_terrestre-4)));
$j = ceil(12960/pow(1.25,($chantier_terrestre-8)));
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;
}*/
}
if ($temps_t > 0) $unit = $nomterra[--$unit_t];
?>
<script language="javascript" src="time.js"></script>
</head>
<body>
<script language="javascript" src="time.js"></script>
<?php
@ -70,82 +64,110 @@ if ($chantier_terrestre > 0) {
echo '</td></tr><tr><td>Construction de : '.$cons_terrestre.' '.$unit.'</td></tr></table><br>';
}
echo '<table align="center"><tr><td>lmages</td><td width="350">Description</td><td width="120">Nombre</td></tr>';
if ($chantier_terrestre >= 1) {
echo '<form method="post" action="validation_def.php"><tr><td><img src="images/'.$nomterrn[8].'.jpg" alt=""></td>
<td align="left"><a href=\"descriptions/.php\">'.$nomterrn[8].'</a>'; if ($def_1 > 0) { echo' ('.$def_1.' unitées)'; } echo'<br>Métal : 500<br>Cristal : 200<br>Temps : '; sec($f); echo '<br></td>
<td>';
if ($bat == 8) echo 'Chantier terrestre en construction';
else {
if ($temps_t < time()) echo '<input type="text" class="zone_texte" size="4" maxlength="4" name="cons_def_1" /><br><input type="submit" value="Envoyer" class="bouton"">';
else {
if ($unit_t<9 && $unit_t>0) echo '<font color="red">Construction en cours dans le </font><a href="chantier_terrestre.php">chantier terrestre</a>';
}
}
echo '</td></tr></form>';
}
if ($chantier_terrestre >= 3 && $energie_t >=2) {
echo '<form method="post" action="validation_def.php"><tr><td><img src="images/'.$nomterrn[9].'.jpg" alt=""></td>
<td align="left"><a href=\"descriptions/.php\">'.$nomterrn[9].'</a>'; if ($def_2 > 0) { echo' ('.$def_2.' unitées)'; } echo'<br>Métal : 4000<br>Cristal : 2000<br>Temps : '; sec($g); echo'<br></td>
<td>';
if ($bat == 8) echo 'Chantier terrestre en construction';
else {
if ($temps_t < time()) echo '<input type="text" class="zone_texte" size="4" maxlength="4" name="cons_def_2" /><br><input type="submit" value="Envoyer" class="bouton"">';
else {
if ($unit_t<9 && $unit_t>0) echo '<font color="red">Construction en cours dans le </font><a href="chantier_terrestre.php">chantier terrestre</a>';
}
}
echo '</td></tr></form>';
}
if ($chantier_terrestre >= 4 && $armement >= 1) {
echo '<form method="post" action="validation_def.php"><tr><td><img src="images/'.$nomterrn[10].'.jpg" alt=""></td>
<td align=left><a href=\"descriptions/.php\">'.$nomterrn[10].'</a>'; if ($def_3 > 0) { echo' ('.$def_3.' unitées)'; } echo'<br>Métal : 4500<br>Cristal : 800<br>Hydrogène : 600<br>Temps : '; sec($h); echo '<br></td>
<td>';
if ($bat == 8) echo 'Chantier terrestre en construction';
else {
if ($temps_t < time()) echo '<input type="text" class="zone_texte" size="4" maxlength="4" name="cons_def_3" /><br><input type="submit" value="Envoyer" class="bouton"">';
else {
if ($unit_t<9 && $unit_t>0) echo '<font color="red">Construction en cours dans le </font><a href="chantier_terrestre.php">chantier terrestre</a>';
}
}
echo '</td></tr></form>';
}
if ($chantier_terrestre >= 6 && $armement >=3 && $enerigie_t >= 4) {
echo '<form method="post" action="validation_def.php"><tr><td><img src="images/'.$nomterrn[11].'.jpg" alt=""></td>
<td align="left"><a href=\"descriptions/.php\">'.$nomterrn[11].'</a>'; if ($def_4 > 0) { echo' ('.$def_4.' unitées)'; } echo'<br>Métal : 12000<br>Cristal : 10000<br>Hydrogène : 1000<br>Temps : '; sec($i); echo '<br></td>
<td>';
if ($bat == 8) echo 'Chantier terrestre en construction';
else {
if ($temps_t < time()) echo '<input type="text" class="zone_texte" size="4" maxlength="4" name="cons_def_4" /><br><input type="submit" value="Envoyer" class="bouton"">';
else {
if ($unit_t<9 && $unit_t>0) echo '<font color="red">Construction en cours dans le </font><a href="chantier_terrestre.php">chantier terrestre</a>';
}
}
echo '</td></tr></form>';
}
if ($chantier_terrestre >= 8 && $armement >=5 && $informatique >= 3) {
echo '<form method="post" action="validation_def.php"><tr><td><img src="images/'.$nomterrn[11].'.jpg" alt=""></td>
<td align="left"><a href=\"descriptions/.php\">'.$nomterrn[12].'</a>'; if ($def_5 > 0) { echo' ('.$def_5.' unitées)'; } echo'<br>Métal : 15000<br>Cristal : 9500<br>Hydrogène : 1500<br>Temps : '; sec($j); echo '<br></td>
<td>';
if ($bat == 8) echo 'Chantier terrestre en construction';
else {
if ($temps_t < time()) echo '<input type="text" class="zone_texte" size="4" maxlength="4" name="cons_def_5" /><br><input type="submit" value="Envoyer" class="bouton"">';
else {
if ($unit_t<9 && $unit_t>0) echo '<font color="red">Construction en cours dans le </font><a href="chantier_terrestre.php">chantier terrestre</a>';
}
}
echo '</td></tr></form>';
}
if ($chantier_terrestre >= 1) {
echo'<div class=d><a href="arbre_vehicules_'.$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;">
<div class=a>
<img src="images/terrestre/'.$nomterri[8].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomterrn[8].'</a>'; if ($def_1 > 0) echo" (".$def_1." unités)";
echo '<br><span class="description">'.$nomterde[8].'</span><br>Besoin de : '.$ressourc[0].' : <span class=rc>500</span> '.$ressourc[1].' : <span class=rc>200</span><br>
Temps de construction : '; sec($f);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_def.php">';
if ($bat == 8) echo '<br><br><br>Chantier terrestre en construction';
else {
if ($metal >= 500 && $cristal >= 200) { if ($temps_t < time()) { echo '<br><br><br><input type="text" class="zone_texte" size="4" maxlength="4" name="cons_def_1" /><br><input type="submit" value="Envoyer" class="bouton"">'; }}
else {
if ($unit_t<9 && $unit_t>0) echo '<br><br><font color="red">Construction en cours dans le </font><a href="chantier_terrestre.php">chantier terrestre</a>';
}
else { ?><script language="javascript">
parent.frames["changement"].window.location="sans_terrestre.php"
</script> <?php
echo '<center><table><tr><td>Vous devez d\'abord construire un chantier spatial !</td></tr></table></center>'; }
echo '</table>'; ?>
}
echo '</form></div><br class=a>'; }
if ($chantier_terrestre >= 3 && $energie_t >=2) {
echo'<div class=a>
<img src="images/terrestre/'.$nomterri[9].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomterrn[9].'</a>'; if ($def_2 > 0) echo" (".$def_2." unités)";
echo '<br><span class="description">'.$nomterde[9].'</span><br>Besoin de : '.$ressourc[0].' : <span class=rc>4.000</span> '.$ressourc[1].' : <span class=rc>2.000</span><br>
Temps de construction : '; sec($g);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_def.php">';
if ($bat == 8) echo '<br><br><br>Chantier terrestre en construction';
else {
if ($metal >= 4000 && $cristal >= 2000) { if ($temps_t < time()) { echo '<br><br><br><input type="text" class="zone_texte" size="4" maxlength="4" name="cons_def_2" /><br><input type="submit" value="Envoyer" class="bouton"">'; }}
else {
if ($unit_t<9 && $unit_t>0) echo '<br><br><font color="red">Construction en cours dans le </font><a href="chantier_terrestre.php">chantier terrestre</a>';
}
}
echo '</form></div><br class=a>'; }
if ($chantier_terrestre >= 4 && $armement >= 1) {
echo'<div class=a>
<img src="images/terrestre/'.$nomterri[10].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomterrn[10].'</a>'; if ($def_3 > 0) echo" (".$def_3." unités)";
echo '<br><span class="description">'.$nomterde[10].'</span><br>Besoin de : '.$ressourc[0].' : <span class=rc>4.500</span> '.$ressourc[1].' : <span class=rc>800</span> '.$ressourc[2].' : <span class=rc>600</span><br>
Temps de construction : '; sec($h);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_def.php">';
if ($bat == 8) echo '<br><br><br>Chantier terrestre en construction';
else {
if ($metal >= 4500 && $cristal >= 800 && $hydrogene >= 600) { if ($temps_t < time()) { echo '<br><br><br><input type="text" class="zone_texte" size="4" maxlength="4" name="cons_def_3" /><br><input type="submit" value="Envoyer" class="bouton"">'; }}
else {
if ($unit_t<9 && $unit_t>0) echo '<br><br><font color="red">Construction en cours dans le </font><a href="chantier_terrestre.php">chantier terrestre</a>';
}
}
echo '</form></div><br class=a>'; }
if ($chantier_terrestre >= 4 && $armement >= 3 && $energie_t >= 3) {
echo'<div class=a>
<img src="images/terrestre/'.$nomterri[11].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomterrn[11].'</a>'; if ($def_4 > 0) echo" (".$def_4." unités)";
echo '<br><span class="description">'.$nomterde[11].'</span><br>Besoin de : '.$ressourc[0].' : <span class=rc>12.000</span> '.$ressourc[1].' : <span class=rc>10.000</span> '.$ressourc[2].' : <span class=rc>1.000</span><br>
Temps de construction : '; sec($i);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_def.php">';
if ($bat == 8) echo '<br><br><br>Chantier terrestre en construction';
else {
if ($metal >= 12000 && $cristal >= 10000 && $hydrogene >= 1000) { if ($temps_t < time()) { echo '<br><br><br><input type="text" class="zone_texte" size="4" maxlength="4" name="cons_def_4" /><br><input type="submit" value="Envoyer" class="bouton"">'; }}
else {
if ($unit_t<9 && $unit_t>0) echo '<br><br><font color="red">Construction en cours dans le </font><a href="chantier_terrestre.php">chantier terrestre</a>';
}
}
echo '</form></div><br class=a>'; }
if ($chantier_terrestre >= 8 && $armement >= 5 && $informatique >= 4) {
echo'<div class=a>
<img src="images/terrestre/'.$nomterri[12].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomterrn[12].'</a>'; if ($def_5 > 0) echo" (".$def_5." unités)";
echo '<br><span class="description">'.$nomterde[12].'</span><br>Besoin de : '.$ressourc[0].' : <span class=rc>15.000</span> '.$ressourc[1].' : <span class=rc>9.500</span> '.$ressourc[2].' : <span class=rc>1.500</span><br>
Temps de construction : '; sec($j);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_def.php">';
if ($bat == 8) echo '<br><br><br>Chantier terrestre en construction';
else {
if ($metal >= 15000 && $cristal >= 9500 && $hydrogene >= 1500) { if ($temps_t < time()) { echo '<br><br><br><input type="text" class="zone_texte" size="4" maxlength="4" name="cons_def_5" /><br><input type="submit" value="Envoyer" class="bouton"">'; }}
else {
if ($unit_t<9 && $unit_t>0) echo '<br><br><font color="red">Construction en cours dans le </font><a href="chantier_terrestre.php">chantier terrestre</a>';
}
}
echo '</form></div><br class=a>'; }
} else { echo '<table align=center><tr><td>Vous devez d\'abord construire un chantier spatial !</td></tr></table>'; } ?>
</td></tr></table></div>
</body>
</html>