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,17 +1,24 @@
<?php
session_start();
define('DESIGN', 'descriptions/diz/base.css');
define('HEAD', '<script language="javascript" src="time.js"></script>');
require('../header.php');
$id=$_SESSION['id'];
$galaxy=$_SESSION['galaxy'];
$ss=$_SESSION['ss'];
$pos=$_SESSION['pos'];
require_once('bdd.php');
require_once('ressource.php');
require('noms.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 = '';
@ -28,42 +35,31 @@ function sec ($time) {
if ($value != 1) $output .= ' ';
}
}
return $output;
echo $output;
}
$f = ceil(720/pow(1.25,$chantier_terrestre));
$g = ceil(2040/pow(1.25,$chantier_terrestre));
$h = ceil(7200/pow(1.25,$chantier_terrestre));
$i = ceil(3960/pow(1.25,$chantier_terrestre));
$j = ceil(600/pow(1.25,$chantier_terrestre));
$k = ceil(1080/pow(1.25,$chantier_terrestre));
$l = ceil(2160/pow(1.25,$chantier_terrestre));
$m = ceil(4680/pow(1.25,$chantier_terrestre));
$f = ceil(720/pow(1.25,($chantier_terrestre-1)));
$g = ceil(2040/pow(1.25,($chantier_terrestre-3)));
$h = ceil(7200/pow(1.25,($chantier_terrestre-4)));
$i = ceil(3960/pow(1.25,($chantier_terrestre-6)));
$j = ceil(600/pow(1.25,($chantier_terrestre-1)));
$k = ceil(1080/pow(1.25,($chantier_terrestre-2)));
$l = ceil(2160/pow(1.25,($chantier_terrestre-3)));
$m = ceil(4680/pow(1.25,($chantier_terrestre-5)));
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>
<?php
print '<div class="centre"><table style="margin-left: auto; margin-right: auto; width: 275px; height: 50px"><tr><td><b>Prochainement dans Halo-Battle</b></td></tr></table></div></body></html>';
exit;
if ($chantier_terrestre > 0) {
if ($temps_t > 0) {
echo '<table align="center"><tr><td>Construction terminé dans : ';
@ -73,123 +69,172 @@ if ($chantier_terrestre > 0) {
echo '</td></tr><tr><td>Entrainement de : '.$cons_terrestre.' '.$unit.'</td></tr></table><br>';
}
echo '<table align="center"><tr><td>Images</td><td width="350">Description</td><td width="120">Nombre</td></tr>';
if ($chantier_terrestre >= 1) {
echo '<form method="post" action="validation_terrestre.php">
<tr><td><img src="images/'.$nomterrn[0].'.jpg" alt=""></td>
<td align="left"><a href=\"descriptions/.php\">'.$nomterrn[0].'</a>'; if ($vais_0 > 0) { echo' ('.$vais_0.' vaisseaux)'; } echo'<br>Métal : 500<br>Cristal : 300<br>Temps : '.sec($f).'<br></td>
<td>';
if ($bat == 8) echo 'Chantier terrestre en construction';
else {
if ($temps_terrestre < time()) echo '<input type="text" class="zone_texte" size="4" maxlength="4" name="cons_vaisseau_att"/><br><input type="submit" value="Envoyer" class="bouton">';
else {
if ($unit_t >= 9) echo '<font color="red">Construction en cours dans le </font><a href="defense.php">centre de défenses</a>';
}
}
echo '</td></tr></form>';
}
if ($chantier_terrestre >= 3 && $armement >= 1) {
echo '<form method="post" action="validation_terrestre.php">
<tr><td><img src="images/'.$nomterrn[1].'.jpg" alt=""></td>
<td align="left"><a href=\"descriptions/.php\">'.$nomterrn[1].'</a>'; if ($vais_1 > 0) { echo' ('.$vais_1.' vaisseaux)'; } echo'<br>Métal : 680<br>Cristal : 420<br>Temps : '.sec($g).'<br></td>
<td>';
if ($bat == 8) echo 'Chantier terrestre en construction';
else {
if ($temps_terrestre < time()) echo '<input type="text" class="zone_texte" size="4" maxlength="4" name="cons_vaisseau_1" /><br><input type="submit" value="Envoyer" class="bouton">';
else {
if ($unit_t>=9) echo '<font color="red">Construction en cours dans le </font><a href="defense.php">centre de défenses</a>';
}
}
echo '</td></tr></form>';
}
if ($chantier_terrestre >= 4 && $reacteur >= 1) {
echo '<form method="post" action="validation_terrestre.php">
<tr><td><img src="images/'.$nomterrn[2].'.jpg" alt=""></td>
<td align="left"><a href=\"descriptions/.php\">'.$nomterrn[2].'</a>'; if ($vais_2 > 0) { echo' ('.$vais_2.' vaisseaux)'; } echo'<br>Métal : 1000<br>Cristal : 600<br>Temps : '.sec($h).'<br></td>
<td>';
if ($bat == 8) echo 'Chantier terrestre en construction';
else {
if ($temps_terrestre < time()) echo '<input type="text" class="zone_texte" size="4" maxlength="4" name="cons_vaisseau_2" /><br><input type="submit" value="Envoyer" class="bouton">';
else {
if ($unit_t>=9) echo '<font color="red">Construction en cours dans le </font><a href="defense.php">centre de défenses</a>';
}
}
echo '</td></tr></form>';
}
if ($chantier_terrestre >= 6 && $reacteur >= 3) {
echo '<form method="post" action="validation_terrestre.php">
<tr><td><img src="images/'.$nomterrn[3].'.jpg" alt=""></td>
<td align=left><a href=\"descriptions/.php\">'.$nomterrn[3].'</a>'; if ($vais_3 > 0) { echo' ('.$vais_3.' vaisseaux)'; } echo'<br>Métal : 1400<br>Cristal : 950<br>Temps : '.sec($i).'<br></td>
<td>';
if ($bat == 8) echo 'Chantier terrestre en construction';
else {
if ($temps_terrestre < time()) echo '<input type="text" class="zone_texte" size="4" maxlength="4" name="cons_vaisseau_3" /><br><input type="submit" value="Envoyer" class="bouton">';
else {
if ($unit_t>=9) echo '<font color="red">Construction en cours dans le </font><a href="defense.php">centre de défenses</a>';
}
}
echo '</td></tr></form>';
}
if ($chantier_terrestre >= 1) {
echo '<form method="post" action="validation_terrestre.php">
<tr><td><img src="images/'.$nomterrn[4].'.jpg" alt=""></td>
<td align="left"><a href=\"descriptions/.php\">'.$nomterrn[4].'</a>'; if ($vcl_1 > 0) { echo' ('.$vcl_1.' véhicules)'; } echo'<br>Métal : 400<br>Cristal : 240<br>Temps : '.sec($j).'<br></td>
<td>';
if ($bat == 8) echo 'Chantier terrestre en construction';
else {
if ($temps_terrestre < time()) echo '<input type="text" class="zone_texte" size="4" maxlength="4" name="cons_vcl_1" /><br><input type="submit" value="Envoyer" class="bouton">';
else {
if ($unit_t>=9) echo '<font color="red">Construction en cours dans le </font><a href="defense.php">centre de défenses</a>';
}
}
echo '</td></tr></form>';
}
if ($chantier_terrestre >= 2) {
echo '<form method="post" action="validation_terrestre.php">
<tr><td><img src="images/'.$nomterrn[5].'.jpg" alt=""></td>
<td align=left><a href=\"descriptions/.php\">'.$nomterrn[5].'</a>'; if ($vcl_2 > 0) { echo' ('.$vcl_2.' véhicules)'; } echo'<br>Métal : 480<br>Cristal : 260<br>Temps : '.sec($k).'<br></td>
<td>';
if ($bat == 8) echo 'Chantier terrestre en construction';
else {
if ($temps_terrestre < time() ) echo '<input type="text" class="zone_texte" size="4" maxlength="4" name="cons_vcl_2" /><br><input type="submit" value="Envoyer" class="bouton">';
else {
if ($unit_t>=9) echo '<font color="red">Construction en cours dans le </font><a href="defense.php">centre de défenses</a>';
}
}
echo '</td></tr></form>';
}
if ($chantier_terrestre >= 3 && $armement >= 1) {
echo '<form method="post" action="validation_terrestre.php">
<tr><td><img src="images/'.$nomterrn[6].'.jpg" alt=""></td>
<td align=left><a href=\"descriptions/.php\">'.$nomterrn[6].'</a>'; if ($vcl_3 > 0) { echo' ('.$vcl_3.' véhicules)'; } echo'<br>Métal : 600<br>Cristal : 420<br>Temps : '.sec($l).'<br></td>
<td>';
if ($bat == 8) echo 'Chantier terrestre en construction';
else {
if ($temps_terrestre < time()) echo '<input type="text" class="zone_texte" size="4" maxlength="4" name="cons_vcl_3" /><br><input type="submit" value="Envoyer" class="bouton">';
else {
if ($unit_t>=9) echo '<font color="red">Construction en cours dans le </font><a href="defense.php">centre de défenses</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="center"><table style="margin-left: auto; margin-right: auto;"><tr><td style="border:none; background: transparent;">
<div class=a>
<img src="images/terrestre/'.$nomterri[0].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomterrn[0].'</a>'; if ($vais_0 > 0) { echo" (".$vais_0." vaisseaux)"; }
echo '<br>'.$nomterde[0].'<br>Besoin de : '.$ressourc[0].' : <span class=rc>500</span> '.$ressourc[1].' : <span class=rc>300</span><br>
Temps de construction : '; sec($f);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_terrestre.php">';
if ($bat == 8) echo '<br><br><br>Chantier terrestre en construction';
else {
if ($metal >= 500 && $cristal >= 300) { if ($temps_t < time()) { echo '<br><br><br><input type="text" class="zone_texte" size="4" maxlength="4" name="cons_vaisseau_att" /><br><input type="submit" value="Envoyer" class="bouton"">'; }}
else {
if ($unit_t > 9) echo '<br><font color="red">Construction en cours dans le </font><a href="defense.php">centre de défenses</a>';
}
}
echo '</form></div><br class=a>'; }
if ($chantier_terrestre >= 3 && $armement >= 1) {
echo'<div class=a>
<img src="images/terrestre/'.$nomterri[1].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomterrn[1].'</a>'; if ($vais_1 > 0) { echo" (".$vais_1." vaisseaux)"; }
echo '<br>'.$nomterde[1].'<br>Besoin de : '.$ressourc[0].' : <span class=rc>680</span> '.$ressourc[1].' : <span class=rc>420</span><br>
Temps de construction : '; sec($g);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_terrestre.php">';
if ($bat == 8) echo '<br><br><br>Chantier terrestre en construction';
else {
if ($metal >= 680 && $cristal >= 420) { if ($temps_t < time()) { echo '<br><br><br><input type="text" class="zone_texte" size="4" maxlength="4" name="cons_vaisseau_1" /><br><input type="submit" value="Envoyer" class="bouton"">'; }}
else {
if ($unit_t > 9) echo '<br><font color="red">Construction en cours dans le </font><a href="defense.php">centre de défenses</a>';
}
}
echo '</form></div><br class=a>'; }
if ($chantier_terrestre >= 4 && $reacteur >= 1) {
echo'<div class=a>
<img src="images/terrestre/'.$nomterri[2].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomterrn[2].'</a>'; if ($vais_2 > 0) { echo" (".$vais_2." vaisseaux)"; }
echo '<br>'.$nomterde[2].'<br>Besoin de : '.$ressourc[0].' : <span class=rc>1.000</span> '.$ressourc[1].' : <span class=rc>600</span><br>
Temps de construction : '; sec($h);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_terrestre.php">';
if ($bat == 8) echo '<br><br><br>Chantier terrestre en construction';
else {
if ($metal >= 1000 && $cristal >= 600) { if ($temps_t < time()) { echo '<br><br><br><input type="text" class="zone_texte" size="4" maxlength="4" name="cons_vaisseau_2" /><br><input type="submit" value="Envoyer" class="bouton"">'; }}
else {
if ($unit_t > 9) echo '<br><font color="red">Construction en cours dans le </font><a href="defense.php">centre de défenses</a>';
}
}
echo '</form></div><br class=a>'; }
if ($chantier_terrestre >= 6 && $reacteur >= 3) {
echo'<div class=a>
<img src="images/terrestre/'.$nomterri[3].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomterrn[3].'</a>'; if ($vais_3 > 0) { echo" (".$vais_3." vaisseaux)"; }
echo '<br>'.$nomterde[3].'<br>Besoin de : '.$ressourc[0].' : <span class=rc>1.400</span> '.$ressourc[1].' : <span class=rc>950</span><br>
Temps de construction : '; sec($i);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_terrestre.php">';
if ($bat == 8) echo '<br><br><br>Chantier terrestre en construction';
else {
if ($metal >= 1400 && $cristal >= 950) { if ($temps_t < time()) { echo '<br><br><br><input type="text" class="zone_texte" size="4" maxlength="4" name="cons_vaisseau_3" /><br><input type="submit" value="Envoyer" class="bouton"">'; }}
else {
if ($unit_t > 9) echo '<br><font color="red">Construction en cours dans le </font><a href="defense.php">centre de défenses</a>';
}
}
echo '</form></div><br class=a>'; }
if ($chantier_terrestre >= 1) {
echo'<div class=a>
<img src="images/terrestre/'.$nomterri[4].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomterrn[4].'</a>'; if ($vcl_1 > 0) { echo" (".$vcl_1." véhicules)"; }
echo '<br>'.$nomterde[4].'<br>Besoin de : '.$ressourc[0].' : <span class=rc>400</span> '.$ressourc[1].' : <span class=rc>240</span><br>
Temps de construction : '; sec($j);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_terrestre.php">';
if ($bat == 8) echo '<br><br><br>Chantier terrestre en construction';
else {
if ($metal >= 400 && $cristal >= 240) { if ($temps_t < time()) { echo '<br><br><br><input type="text" class="zone_texte" size="4" maxlength="4" name="cons_vcl_1" /><br><input type="submit" value="Envoyer" class="bouton"">'; }}
else {
if ($unit_t > 9) echo '<br><font color="red">Construction en cours dans le </font><a href="defense.php">centre de défenses</a>';
}
}
echo '</form></div><br class=a>'; }
if ($chantier_terrestre >= 2) {
echo'<div class=a>
<img src="images/terrestre/'.$nomterri[5].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomterrn[5].'</a>'; if ($vcl_2 > 0) { echo" (".$vcl_2." véhicules)"; }
echo '<br>'.$nomterde[5].'<br>Besoin de : '.$ressourc[0].' : <span class=rc>480</span> '.$ressourc[1].' : <span class=rc>260</span><br>
Temps de construction : '; sec($k);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_terrestre.php">';
if ($bat == 8) echo '<br><br><br>Chantier terrestre en construction';
else {
if ($metal >= 480 && $cristal >= 260) { if ($temps_t < time()) { echo '<br><br><br><input type="text" class="zone_texte" size="4" maxlength="4" name="cons_vcl_2" /><br><input type="submit" value="Envoyer" class="bouton"">'; }}
else {
if ($unit_t > 9) echo '<br><font color="red">Construction en cours dans le </font><a href="defense.php">centre de défenses</a>';
}
}
echo '</form></div><br class=a>'; }
if ($chantier_terrestre >= 3 && $armement >= 1) {
echo'<div class=a>
<img src="images/terrestre/'.$nomterri[6].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomterrn[6].'</a>'; if ($vcl_3 > 0) { echo" (".$vcl_3." véhicules)"; }
echo '<br>'.$nomterde[6].'<br>Besoin de : '.$ressourc[0].' : <span class=rc>600</span> '.$ressourc[1].' : <span class=rc>420</span><br>
Temps de construction : '; sec($l);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_terrestre.php">';
if ($bat == 8) echo '<br><br><br>Chantier terrestre en construction';
else {
if ($metal >= 600 && $cristal >= 420) { if ($temps_t < time()) { echo '<br><br><br><input type="text" class="zone_texte" size="4" maxlength="4" name="cons_vcl_3" /><br><input type="submit" value="Envoyer" class="bouton"">'; }}
else {
if ($unit_t > 9) echo '<br><font color="red">Construction en cours dans le </font><a href="defense.php">centre de défenses</a>';
}
}
echo '</form></div><br class=a>'; }
if ($chantier_terrestre >= 5 && $blindage >=2 && $armement >=2) {
echo'<div class=a>
<img src="images/terrestre/'.$nomterri[7].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomterrn[7].'</a>'; if ($vcl_4 > 0) { echo" (".$vcl_4." véhicules)"; }
echo '<br>'.$nomterde[7].'<br>Besoin de : '.$ressourc[0].' : <span class=rc>1.000</span> '.$ressourc[1].' : <span class=rc>500</span><br>
Temps de construction : '; sec($m);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_terrestre.php">';
if ($bat == 8) echo '<br><br><br>Chantier terrestre en construction';
else {
if ($metal >= 1000 && $cristal >= 500) { if ($temps_t < time()) { echo '<br><br><br><input type="text" class="zone_texte" size="4" maxlength="4" name="cons_vcl_4" /><br><input type="submit" value="Envoyer" class="bouton"">'; }}
else {
if ($unit_t > 9) echo '<br><font color="red">Construction en cours dans le </font><a href="defense.php">centre de défenses</a>';
}
}
echo '</form></div><br class=a>'; }
if ($chantier_terrestre >= 5 && $blindage >=2 && $armement >=2) {
echo '<form method="post" action="validation_terrestre.php">
<tr><td><img src="images/'.$nomterrn[7].'.jpg" alt=""></td>
<td align=left><a href=\"descriptions/.php\">'.$nomterrn[7].'</a>'; if ($vcl_4 > 0) { echo' ('.$vcl_4.' véhicules)'; } echo'<br>Métal : 1000<br>Cristal : 500<br>Temps : '.sec($m).'<br></td>
<td>';
if ($bat == 8) echo 'Chantier terrestre en construction';
else {
if ($temps_terrestre < time()) echo '<input type="text" class="zone_texte" size="4" maxlength="4" name="cons_vcl_4" /><br><input type="submit" value="Envoyer" class="bouton">';
else {
if ($unit_t>=9) echo '<font color="red">Construction en cours dans le </font><a href="defense.php">centre de défenses</a>';
}
}
echo '</td></tr></form>';
}
}
else echo '<center><table><tr><td>Vous devez d\'abord construire un chantier terrestre !</td></tr></table></center>';
echo '</table>'; ?>
else { echo '<table align=center><tr><td>Vous devez d\'abord construire un chantier terrestre !</td></tr></table>'; } ?>
</td></tr></table></div>
</body>
</html>