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

@ -0,0 +1,94 @@
<?php
session_start();
$id=$_SESSION['id'];
$galaxy=$_SESSION['galaxy'];
$ss=$_SESSION['ss'];
$pos=$_SESSION['pos'];
require_once('bdd.php');
require_once('noms.php');
require('../connectBDD.php');
$req = mysql_query("SELECT * FROM flottes WHERE `id_user` = '$id'");
while ($resultat = mysql_fetch_array($req)) {
if (time() >= $resultat['start_time'] + $resultat['end_time'] && !empty($resultat['end_time'])) {
$mission = $resultat['mission'];
$end_galaxie = $resultat['end_galaxie'];
$end_ss = $resultat['end_ss'];
$end_position = $resultat['end_position'];
if ($mission == 1) {
$reqd = mysql_query("SELECT * FROM planete WHERE `galaxie` = '$end_galaxie' AND `ss` = '$end_ss' AND `position` = '$end_position'") or die ("erreur sql ".mysql_error());
$resultatd = mysql_fetch_array($reqd);
$ATvaisseau_1 = $resultat['vaisseau_1']; $ATvaisseau_2 = $resultat['vaisseau_2']; $ATvaisseau_3 = $resultat['vaisseau_3']; $ATvaisseau_4 = $resultat['vaisseau_4']; $ATvaisseau_5 = $resultat['vaisseau_5']; $ATvaisseau_6 = $resultat['vaisseau_6']; $ATvaisseau_7 = $resultat['vaisseau_7']; $ATvaisseau_8 = $resultat['vaisseau_8']; $ATvaisseau_9 = $resultat['vaisseau_9']; $ATvaisseau_10 = $resultat['vaisseau_10']; $ATvaisseau_11 = $resultat['vaisseau_11']; $ATvaisseau_12 = $resultat['vaisseau_12'];
$ATnbvais = $ATvaisseau_1 + $ATvaisseau_2 + $ATvaisseau_3 + $ATvaisseau_4 + $ATvaisseau_5 + $ATvaisseau_6 + $ATvaisseau_7 + $ATvaisseau_8 + $ATvaisseau_9 + $ATvaisseau_10 + $ATvaisseau_11 + $ATvaisseau_12;
$ENvaisseau_1 = $resultatd['vaisseau_1']; $ENvaisseau_2 = $resultatd['vaisseau_2']; $ENvaisseau_3 = $resultatd['vaisseau_3']; $ENvaisseau_4 = $resultatd['vaisseau_4']; $ENvaisseau_5 = $resultatd['vaisseau_5']; $ENvaisseau_6 = $resultatd['vaisseau_6']; $ENvaisseau_7 = $resultatd['vaisseau_7']; $ENvaisseau_8 = $resultatd['vaisseau_8']; $ENvaisseau_9 = $resultatd['vaisseau_9']; $ENvaisseau_10 = $resultatd['vaisseau_10']; $ENvaisseau_11 = $resultatd['vaisseau_11']; $ENvaisseau_12 = $resultatd['vaisseau_12'];
$ENnbvais = $ENvaisseau_1 + $ENvaisseau_2 + $ENvaisseau_3 + $ENvaisseau_4 + $ENvaisseau_5 + $ENvaisseau_6 + $ENvaisseau_7 + $ENvaisseau_8 + $ENvaisseau_9 + $ENvaisseau_10 + $ENvaisseau_11 + $ENvaisseau_12;
$ATvais = ''; $ENvais = ''; $ATvais_pv = ''; $ENvais_pv = '';
for ($i = 1; $i <= 12; $i++) {
for ($j = 1; $j <= $resultat['vaisseau_'.$i]; $j++) { $ATvais .= $i.' '; $ATvais_pv .= $nomvais_pv[$i].' '; }
for ($j = 1; $j <= $resultatd['vaisseau_'.$i]; $j++) { $ENvais .= $i.' '; $ENvais_pv .= $nomvais_pv[$i].' '; }
}
//Calcul de la puissance d'attaque
$ATpuissance = 0; $ENpuissance = 0;
for ($i = 1; $i <= 12; $i++) {
$ATpuissance += $resultat['vaisseau_'.$i] * $nomvais_at[$i-1];
$ENpuissance += $resultatd['vaisseau_'.$i] * $nomvais_at[$i-1];
}
//Calcul de la puissance de défense
$ATdefense = 0; $ENdefense = 0;
for ($i = 1; $i <= 12; $i++) {
$ATdefense += $resultat['vaisseau_'.$i] * $nomvais_bc[$i-1];
$ENdefense += $resultatd['vaisseau_'.$i] * $nomvais_bc[$i-1];
}
//Calcul des pv
$ATresistance = 0; $ENresistance = 0;
for ($i = 1; $i <= 12; $i++) {
$ATresistance += $resultat['vaisseau_'.$i] * $nomvais_pv[$i-1];
$ENresistance += $resultatd['vaisseau_'.$i] * $nomvais_pv[$i-1];
}
print '<br>puissance d\'attaque attaquant : '.$ATpuissance;
print '<br>puissance d\'attaque défenseur : '.$ENpuissance;
print '<br>puissance de défense attaquant : '.$ATdefense;
print '<br>puissance de défense défenseur : '.$ENdefense;
print '<br>PV de l\'attaquant : '.$ATresistance;
print '<br>PV du défenseur : '.$ENresistance;
$gagne = false;
while($gagne == false) {
if ($ATpuissance >= $ENdefense + $ENresistance) {
$gagne = true;
}
else {
while($ATpuissance > 0){
$vaisAT_type = rand(1,12);
$vaisAT_bc = $nomvais_bc[$vaisAT_type];
$vaisAT_pv = $nomvais_pv[$vaisAT_type];
}
}
}
}
elseif ($mission == 2) {
$Cmetal = $resultat['contenu_metal'];
$Ccristal = $resultat['contenu_cristal'];
$Chydrogene = $resultat['contenu_hydrogene'];
mysql_query("UPDATE `planete` SET `metal` = '$Cmetal', `cristal` = '$Ccristal', `hydrogene` = '$Chydrogene', WHERE `galaxie` = '$start_galaxie' AND `ss` = '$start_ss' AND `position` = '$start_position'");
}
}
if (time() >= $resultat['start_time'] + $resultat['end_time'] * 2 && !empty($resultat['end_time']) && $mission != 0) {
$start_galaxie = $resultat['start_galaxie'];
$start_ss = $resultat['start_ss'];
$start_position = $resultat['start_position'];
$id_flotte = $resultat['id'];
$reqP = mysql_query("SELECT * FROM planete WHERE `id_user` = '$id' AND `galaxie` = '$start_galaxie' AND `ss` = '$start_ss' AND `position` = '$start_position'");
$resultatP = mysql_fetch_array($reqP);
for($i = 1; $i <= 11; $i++) {
${'Pvaisseaux_'.$i} = $resultatP['vaisseau_'.$i] + $resultat['vaisseau_'.$i];
mysql_query("UPDATE `planete` SET `vaisseau_$i` = '${'Pvaisseaux_'.$i}' WHERE `id_user` = '$id' AND `galaxie` = '$start_galaxie' AND `ss` = '$start_ss' AND `position` = '$start_position'");
}
mysql_query("DELETE FROM `flottes` WHERE `id_user` = '$id' AND `id` = '$id_flotte'");
}
}
?>

View file

@ -12,11 +12,11 @@ require('../connectBDD.php');
if ($_GET['tec'] == 1) {
$n=($informatique-1);
$metal += ceil(pow(2,$n)*500);
$cristal += ceil(pow(2,$n)*150);
$cristal += ceil(pow(2,$n)*500);
$hydrogene += ceil(pow(2,$n)*150);
$temps_t = 0;
$tec = 0;
mysql_query("UPDATE planete SET metal ='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id='$planete_source'");
mysql_query("UPDATE planete SET cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 2) {
@ -26,7 +26,7 @@ else if ($_GET['tec'] == 2) {
$hydrogene += ceil(pow(2,$n)*100);
$temps_t = 0;
$tec = 0;
mysql_query("UPDATE planete SET metal ='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id='$planete_source'");
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 3) {
@ -35,7 +35,16 @@ else if ($_GET['tec'] == 3) {
$cristal += ceil(pow(2,$n)*500);
$temps_t = 0;
$tec = 0;
mysql_query("UPDATE planete SET metal ='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id='$planete_source'");
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 4) {
$n=($blindage-1);
$metal += ceil(pow(2,$n)*4000);
$cristal += ceil(pow(2,$n)*1500);
$temps_t = 0;
$tec = 0;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 5) {
@ -45,7 +54,7 @@ else if ($_GET['tec'] == 5) {
$hydrogene += ceil(pow(2,$n)*300);
$temps_t = 0;
$tec = 0;
mysql_query("UPDATE planete SET metal ='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id='$planete_source'");
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 6) {
@ -54,7 +63,7 @@ else if ($_GET['tec'] == 6) {
$cristal += ceil(pow(2,$n)*400);
$temps_t = 0;
$tec = 0;
mysql_query("UPDATE planete SET metal ='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id='$planete_source'");
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 7) {
@ -64,7 +73,7 @@ else if ($_GET['tec'] == 7) {
$hydrogene += ceil(pow(2,$n)*750);
$temps_t = 0;
$tec = 0;
mysql_query("UPDATE planete SET metal ='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id='$planete_source'");
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 8) {
@ -74,7 +83,7 @@ else if ($_GET['tec'] == 8) {
$hydrogene += ceil(pow(2,$n)*1500);
$temps_t = 0;
$tec = 0;
mysql_query("UPDATE planete SET metal ='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id='$planete_source'");
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 9) {
@ -83,7 +92,7 @@ else if ($_GET['tec'] == 9) {
$cristal += ceil(pow(2,$n)*1000);
$temps_t = 0;
$tec = 0;
mysql_query("UPDATE planete SET metal ='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id='$planete_source'");
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 10) {
@ -92,7 +101,7 @@ else if ($_GET['tec'] == 10) {
$cristal += ceil(pow(2,$n)*2600);
$temps_t = 0;
$tec = 0;
mysql_query("UPDATE planete SET metal ='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id='$planete_source'");
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 11) {
@ -102,25 +111,17 @@ else if ($_GET['tec'] == 11) {
$hydrogene += ceil(pow(2,$n)*5000);
$temps_t = 0;
$tec = 0;
mysql_query("UPDATE planete SET metal ='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id='$planete_source'");
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 12) {
$n=($blindage-1);
$metal += ceil(pow(2,$n)*3700);
$temps_t = 0;
$tec = 0;
mysql_query("UPDATE planete SET metal ='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id='$planete_source'");
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 13) {
$n=($spartan-1);
$metal += ceil(pow(3,$n)*5200);
$cristal += ceil(pow(3,$n)*4250);
$hydrogene += ceil(pow(3,$n)*850);
$temps_t = 0;
$tec = 0;
mysql_query("UPDATE planete SET metal ='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id='$planete_source'");
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
mysql_query("UPDATE user SET temps_t='$temps_t', tec='$tec' WHERE id='$id'");
}

View file

@ -152,6 +152,11 @@ echo'</head>
<td class=e><font color=#00CC99 >Débloqué</font></td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Centrale informatque</a></td>
<td class=d>'.$centre_info.'</td>
<td class=e>'; @techno('Informatique',$informatique, 2); echo'</td>
</tr>
</table>

View file

@ -152,6 +152,12 @@ echo'</head>
<td class=e><font color=#00CC99 >Débloqué</font></td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Centrale informatque</a></td>
<td class=d>'.$centre_info.'</td>
<td class=e>'; @techno('IA',$informatique, 2); echo'</td>
</tr>
</table>

View file

@ -1,157 +0,0 @@
<?
session_start();
$id=$_SESSION['id'];
$galaxy=$_SESSION['galaxy'];
$ss=$_SESSION['ss'];
$pos=$_SESSION['pos'];
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 >
<style TYPE=text/css>
.g {
width: 200;
margin-left: 115;
}
.h {
text-align: center;
width: 30;
}
.j {
text-align: left;
width: 200;
}
#tablo {
margin-bottom: 20px;
}
TD.c {
background-color: #00024A;
border: 1px solid #02058A;
}
TD.d {
background-color: #000151;
border: 1px solid #00007D;
color: #ff8040;
}
TD.e {
background-color: #000151;
border: 1px solid #00007D;
}
</style>';
function techno($nom, $niveau, $niveau_ress)
{
if ($niveau < $niveau_ress)
{
echo "<font color=red >".$nom." ".$niveau_ress." (".$niveau.")</font>";
}
else
{
echo "<font color=#00CC99 >".$nom." ".$niveau_ress." (".$niveau.")</font>";
}
}
include 'bdd.php';
echo'</head>
<body>
<table align=center id=tablo>
<tr><td><a href=arbre_bat_covenant.php>Batiments</a> |
<a href=arbre_techno_covenant.php>Technologies</a> |
<a href=arbre_unitees_covenant.php>Caserne</a> |
<a href=arbre_vehicules_covenant.php>Chantier terrestre</a> |
<a href=arbre_vaisseaux_covenant.php>Chantier spatial</a></td></tr></table>
<table align=center>
<tr>
<td class=c>Technologie</td>
<td class=c>Niveau</td>
<td class=e>Technologies nécessaires (niveau actuel)</td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Informatique</a></td>
<td class=d>'.$informatique.'</td>
<td class=e>'; @techno('Centre de recherches',$labo, 1); echo'</td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Détection</a></td>
<td class=d>'.$detection.'</td>
<td class=e>'; @techno('Centre de recherches',$labo, 2); echo'<br>'; @techno(Informatique ,$informatique, 2); echo'</td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Armement</a></td>
<td class=d>'.$armement.'</td>
<td class=e>'; @techno('Centre de recherches',$labo, 5); echo'</td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Bouclier</a></td>
<td class=d>'.$blindage.'</td>
<td class=e>'; @techno('Centre de recherches',$labo, 4); echo'</td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Maitrise de l\'énergie</a></td>
<td class=d>'.$energie_techno.'</td>
<td class=e>'; @techno('Centre de recherches',$labo, 2); echo'</td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Réacteur à antigravité</a></td>
<td class=d>'.$reacteur.'</td>
<td class=e>'; @techno('Centre de recherches',$labo, 2); echo'</td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Réacteur à fusion</a></td>
<td class=d>'.$reacteur_f.'</td>
<td class=e>'; @techno('Centre de recherches',$labo, 4); echo'<br>';
@techno("Maitrise de l'énergie",$energie_t, 2); echo'<br>';
@techno("Réacteur à antigravité",$reacteur, 4); echo'</td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Réacteur à fusion Forruneur</a></td>
<td class=d>'.$reacteur_ff.'</td>
<td class=e>'; @techno('Centre de recherches',$labo, 6); echo'<br>';
@techno("Maitrise de l'énergie",$energie_t, 5); echo'<br>';
@techno("Réacteur à fusion",$reacteur_f, 4); echo'</td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Médecine</a></td>
<td class=d>'.$medecine.'</td>
<td class=e>'; @techno('Centre de recherches',$labo, 1); echo'</td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Commandemant militaire</a></td>
<td class=d>'.$tactique.'</td>
<td class=e>'; @techno('Centre de recherches',$labo, 3); echo'</td>
</tr>
</table>
</body>
</html>'; ?>

View file

@ -1,157 +0,0 @@
<?
session_start();
$id=$_SESSION['id'];
$galaxy=$_SESSION['galaxy'];
$ss=$_SESSION['ss'];
$pos=$_SESSION['pos'];
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 >
<style TYPE=text/css>
.g {
width: 200;
margin-left: 115;
}
.h {
text-align: center;
width: 30;
}
.j {
text-align: left;
width: 200;
}
#tablo {
margin-bottom: 20px;
}
TD.c {
background-color: #00024A;
border: 1px solid #02058A;
}
TD.d {
background-color: #000151;
border: 1px solid #00007D;
color: #ff8040;
}
TD.e {
background-color: #000151;
border: 1px solid #00007D;
}
</style>';
function techno($nom, $niveau, $niveau_ress)
{
if ($niveau < $niveau_ress)
{
echo "<font color=red >".$nom." ".$niveau_ress." (".$niveau.")</font>";
}
else
{
echo "<font color=#00CC99 >".$nom." ".$niveau_ress." (".$niveau.")</font>";
}
}
include 'bdd.php';
echo'</head>
<body>
<table align=center id=tablo>
<tr><td><a href=arbre_bat_humain.php>Batiments</a> |
<a href=arbre_techno_humain.php>Technologies</a> |
<a href=arbre_unitees_humain.php>Ecole militaire</a> |
<a href=arbre_vehicules_humain.php>Chantier terrestre</a> |
<a href=arbre_vaisseaux_humain.php>Chantier spatial</a></td></tr></table>
<table align=center>
<tr>
<td class=c>Technologie</td>
<td class=c>Niveau</td>
<td class=e>Technologies nécessaires (niveau actuel)</td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>IA</a></td>
<td class=d>'.$informatique.'</td>
<td class=e>'; @techno('Laboratoire',$labo, 1); echo'</td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Détection</a></td>
<td class=d>'.$detection.'</td>
<td class=e>'; @techno('Laboratoire',$labo, 2); echo'<br>'; @techno(IA ,$informatique, 2); echo'</td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Armement</a></td>
<td class=d>'.$armement.'</td>
<td class=e>'; @techno('Laboratoire',$labo, 5); echo'</td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Blindage</a></td>
<td class=d>'.$blindage.'</td>
<td class=e>'; @techno('Laboratoire',$labo, 4); echo'</td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Maitrise de l\'énergie</a></td>
<td class=d>'.$energie_techno.'</td>
<td class=e>'; @techno('Laboratoire',$labo, 2); echo'</td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Réacteur à combustion</a></td>
<td class=d>'.$reacteur.'</td>
<td class=e>'; @techno('Laboratoire',$labo, 2); echo'</td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Réacteur à fusion</a></td>
<td class=d>'.$reacteur_f.'</td>
<td class=e>'; @techno('Laboratoire',$labo, 4); echo'<br>';
@techno("Maitrise de l'énergie",$energie_t, 2); echo'<br>';
@techno("Réacteur à combustion",$reacteur, 4); echo'</td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Réacteur à fusion de type II</a></td>
<td class=d>'.$reacteur_ff.'</td>
<td class=e>'; @techno('Laboratoire',$labo, 6); echo'<br>';
@techno("Maitrise de l'énergie",$energie_t, 5); echo'<br>';
@techno("Réacteur à fusion",$reacteur_f, 4); echo'</td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Médecine</a></td>
<td class=d>'.$medecine.'</td>
<td class=e>'; @techno('Laboratoire',$labo, 1); echo'</td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Commandemant militaire</a></td>
<td class=d>'.$tactique.'</td>
<td class=e>'; @techno('Laboratoire',$labo, 3); echo'</td>
</tr>
</table>
</body>
</html>'; ?>

View file

@ -1,4 +1,4 @@
<?
<?
session_start();
$id=$_SESSION['id'];
@ -72,10 +72,10 @@ echo'</head>
<body>
<table align=center id=tablo>
<tr><td><a href=arbre_bat_covenant.php>Batiments</a> |
<a href=arbre_techno_covenant.php>Technologies</a> |
<a href=arbre_unitees_covenant.php>Ecole militaire</a> |
<a href=arbre_vehicules_covenant.php>Chantier terrestre</a> |
<tr><td><a href=arbre_bat_covenant.php>Batiments</a> |
<a href=arbre_techno_covenant.php>Technologies</a> |
<a href=arbre_unitees_covenant.php>Caserne</a> |
<a href=arbre_vehicules_covenant.php>Chantier terrestre</a> |
<a href=arbre_vaisseaux_covenant.php>Chantier spatial</a></td></tr></table>
<table align=center>
@ -122,7 +122,7 @@ echo'</head>
<tr>
<td class=c><a href=descriptions/.php>Appariton</a></td>
<td class=e>'; @techno("Chantier terrestre",$chantier_terrestre, 5); echo'<br>'; @techno(Armement,$armement, 2);
<td class=e>'; @techno("Chantier terrestre",$chantier_terrestre, 5); echo'<br>'; @techno(Armement,$armement, 2);
echo'<br>'; @techno(Bouclier,$blindage, 2); echo'</td>
</tr>
@ -143,13 +143,13 @@ echo'<br>'; @techno(Bouclier,$blindage, 2); echo'</td>
<tr>
<td class=c><a href=descriptions/.php>Tourelle à plasma</a></td>
<td class=e>'; @techno("Chantier terrestre",$chantier_terrestre, 4); echo'<br>'; @techno(Armement,$armement, 3);
<td class=e>'; @techno("Chantier terrestre",$chantier_terrestre, 4); echo'<br>'; @techno(Armement,$armement, 3);
echo'<br>'; @techno("Maitrise de l'énergie",$energie_t, 3); echo'</td>
</tr>
<tr>
<td class=c><a href=descriptions/.php>Lanceur de torpilles plasma</a></td>
<td class=e>'; @techno("Chantier terrestre",$chantier_terrestre, 8); echo'<br>'; @techno(Armement,$armement, 5);
<td class=e>'; @techno("Chantier terrestre",$chantier_terrestre, 8); echo'<br>'; @techno(Armement,$armement, 5);
echo'<br>'; @techno(Informatique,$informatique, 4); echo'</td>
</tr>

View file

@ -58,48 +58,72 @@ else
}
function ressources($fer, $cristal, $ro, $need_fer, $need_cristal, $need_ro, $mine_m, $mine_c, $mine_h) {
require 'noms.php';
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> ';
echo '<font color=red >'.$ressourc[0].' : <ACRONYM title="'.$z.'">'.$need_fer.'</ACRONYM></font> ';
}
else echo "Fer : <span class=rc>".$need_fer." </span>";
else echo $ressourc[0].' : <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> ';
echo '<font color=red >'.$ressourc[1].' : <ACRONYM title="'.$z.'">'.$need_cristal.'</ACRONYM></font> ';
}
else echo "Cristal : <span class=rc>".$need_cristal." </span>";
else echo $ressourc[1].' : <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>';
echo '<font color=red >'.$ressourc[2].' : <ACRONYM title="'.$z.'">'.$need_ro.'</ACRONYM></font>';
}
else echo "Hydrogène : <span class=rc>".$need_ro."</span>";
else echo $ressourc[2].' : <span class=rc>'.$need_ro.'</span>';
}
}
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);
}
$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>
<div class=d><a href="arbre_bat_'.$race.'.php">Arbre des technologies</a></div>
<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;">
<br class="a">
<div class="a">
<img src="images/batiments/'.$batimeni[0].'" alt="" />
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[0].'">'.$batiment[0].'</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>
<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>
Besoin de : ';
$a=ceil(pow(1.5,$mine_m)*70);
$b=ceil(pow(1.55,$mine_m)*35);
$a=ceil(exp(0.4*$mine_m)*190);
$b=ceil(exp(0.4*$mine_m)*90);
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));
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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
@ -120,13 +144,14 @@ echo '</div>
<img src="images/batiments/'.$batimeni[1].'" alt="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[1].'">'.$batiment[1].'</a> '; if ($mine_c > 0) echo '(Niveau '.$mine_c.')'; echo '<br>
Description.<br>
<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>
Besoin de : ';
$a=ceil(pow(1.55,$mine_c)*105);
$b=ceil(pow(1.55,$mine_c)*60);
$a=ceil(exp(0.43*$mine_c)*205);
$b=ceil(exp(0.43*$mine_c)*110);
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));
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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
@ -147,13 +172,14 @@ echo '</div>
<img src="images/batiments/'.$batimeni[2].'" alt="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[2].'">'.$batiment[2].'</a> '; if ($mine_h > 0) echo '(Niveau '.$mine_h.')'; echo '<br>
Description.<br>
<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>
Besoin de : ';
$a=floor(pow(1.53,$mine_h)*82);
$b=floor(pow(1.5,$mine_h)*80);
$a=ceil(exp(0.445*$mine_h)*235);
$b=ceil(exp(0.445*$mine_h)*150);
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));
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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
@ -174,13 +200,14 @@ echo '</div>
<img src="images/batiments/'.$batimeni[3].'" alt="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[3].'">'.$batiment[3].'</a> '; if ($centrale_s > 0) echo '(Niveau '.$centrale_s.')'; echo '<br>
Description.<br>
<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>
Besoin de : ';
$a=ceil(pow(2,$centrale_s)*300);
$b=ceil(pow(2,$centrale_s)*230);
$a=ceil(exp(0.442*$centrale_s)*165);
$b=ceil(exp(0.442*$centrale_s)*99);
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);
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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
@ -202,13 +229,14 @@ if ($centrale_s >= 12 && $energie_t >= 5) {
<img src="images/batiments/'.$batimeni[4].'" alt="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[4].'">'.$batiment[4].'</a> '; if ($centrale_f > 0) echo '(Niveau '.$centrale_f.')'; echo '<br>
Description.<br>
<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>
Besoin de : ';
$a=ceil(pow(2,$centrale_f)*165);
$b=ceil(pow(2,$centrale_f)*99);
$a=ceil(pow(1.8,$centrale_f)*300);
$b=ceil(pow(1.82,$centrale_f)*230);
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);
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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
@ -231,14 +259,15 @@ if ($detection >= 1) {
<img src="images/batiments/'.$batimeni[5].'" alt="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[5].'">'.$batiment[5].'</a> '; if ($radar > 0) echo '(Niveau '.$radar.')'; echo '<br>
Description.<br>
<a href="descriptions.php?bat=5">'.$batiment[5].'</a> '; if ($radar > 0) echo '(Niveau '.$radar.')';
echo '<br><span class="description">'.$batimede[5].'</span><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));
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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
@ -260,13 +289,14 @@ echo '<div class="a">
<img src="images/batiments/'.$batimeni[6].'" alt="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[6].'">'.$batiment[6].'</a> '; if ($labo > 0) echo '(Niveau '.$labo.')'; echo '<br>
Description.<br>
<a href="descriptions.php?bat=6">'.$batiment[6].'</a> '; if ($labo > 0) echo '(Niveau '.$labo.')';
echo '<br><span class="description">'.$batimede[6].'</span><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));
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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
@ -280,7 +310,7 @@ if ($temps_b > 0) {
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="laboratoire.php">laboratoire</a>';
if($tec > 0) echo '<font color="red"><br><br>Recherche en cours dans le </font><a href="laboratoire.php">laboratoire</a>';
else verification_des_ress(7, $metal, $cristal, $hydrogene, $a, $b, 0);
}
}
@ -290,13 +320,14 @@ echo '</div>
<img src="images/batiments/'.$batimeni[7].'" alt="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[7].'">'.$batiment[7].'</a> '; if ($chantier_terrestre > 0) echo '(Niveau '.$chantier_terrestre.')'; echo '<br>
Description.<br>
<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>
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));
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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
@ -310,7 +341,8 @@ if ($temps_b > 0) {
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>';
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>'; }
else verification_des_ress(8, $metal, $cristal, $hydrogene, $a, $b, 0);
}
}
@ -322,13 +354,14 @@ if ($chantier_terrestre >= 2) {
<img src="images/batiments/'.$batimeni[8].'">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[8].'">'.$batiment[8].'</a> '; if ($chantier_spatial > 0) echo '(Niveau '.$chantier_spatial.')'; echo '<br>
Description.<br>
<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>
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));
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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
@ -342,7 +375,7 @@ if ($chantier_terrestre >= 2) {
else {
if ($case <= 0) echo "<font color=red>Planète pleine</font>";
else {
if($unit_t > 0) echo "<font color=red><br><br>Construction en cours dans le </font><a href=chantier_terrestre.php>chantier terrestre</a>";
if($unit_s > 0) echo "<font color=red><br><br>Construction en cours dans le </font><a href=chantier_terrestre.php>chantier terrestre</a>";
else verification_des_ress(9, $metal, $cristal, $hydrogene, $a, $b, 0);
}
}
@ -354,13 +387,14 @@ echo '<div class="a">
<img src="images/batiments/'.$batimeni[9].'" alt="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[9].'">'.$batiment[9].'</a> '; if ($caserne > 0) echo '(Niveau '.$caserne.')'; echo '<br>
Description.<br>
<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>
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));
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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
@ -385,13 +419,14 @@ echo '</div>
<img src="images/batiments/'.$batimeni[10].'" alt="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[10].'">'.$batiment[10].'</a> '; if ($silo > 0) echo '(Niveau '.$silo.')'; echo '<br>
Description.<br>
<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>
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));
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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
@ -406,7 +441,39 @@ 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>';
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); }
echo '</div>
</body>
<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ète pleine</font>';
else verification_des_ress(12, $metal, $cristal, $hydrogene, $a, $b, $c);
}
echo '</div>'; }
echo'</td></tr></table></div></body>
</html>';
?>

480
pages/batiment.php.vr Normal file
View file

@ -0,0 +1,480 @@
<?php
session_start();
$id=$_SESSION['id'];
$galaxy=$_SESSION['galaxy'];
$ss=$_SESSION['ss'];
$pos=$_SESSION['pos'];
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 >
<style TYPE=text/css>
TD {
border: 0px;
background-color: transparent;
}
</style>";
require_once 'bdd.php';
require_once 'ressource.php';
require_once 'batiment_ajout.php';
require_once 'noms.php';
function sec($time) {
$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;
}
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) {
require 'noms.php';
if ($need_fer > 0) {
if ($fer <= $need_fer) {
$z=floor($fer)-$need_fer;
echo '<font color=red >'.$ressourc[0].' : <ACRONYM title="'.$z.'">'.$need_fer.'</ACRONYM></font> ';
}
else echo $ressourc[0].' : <span class=rc>'.$need_fer.' </span>';
}
if ($need_cristal > 0) {
if ($cristal <= $need_cristal) {
$z=floor($cristal)-$need_cristal;
echo '<font color=red >'.$ressourc[1].' : <ACRONYM title="'.$z.'">'.$need_cristal.'</ACRONYM></font> ';
}
else echo $ressourc[1].' : <span class=rc>'.$need_cristal.' </span>';
}
if ($need_ro > 0) {
if ($ro <= $need_ro) {
$z=floor($ro)-$need_ro;
echo '<font color=red >'.$ressourc[2].' : <ACRONYM title="'.$z.'">'.$need_ro.'</ACRONYM></font>';
}
else echo $ressourc[2].' : <span class=rc>'.$need_ro.'</span>';
}
}
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);
}
$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>
<div class=d><a href="arbre_bat_'.$race.'.php">Arbre des technologies</a></div>
<div style="text-align: center; border: none;"><table style="margin-left: auto; margin-right: auto;"><tr><td style="border:none; background: transparent;">
<br class="a">
<div class="a">
<img src="images/batiments/'.$batimeni[0].'" alt="" />
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[0].'">'.$batiment[0].'</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(0.4*$mine_m)*190);
$b=ceil(exp(0.4*$mine_m)*90);
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)/(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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
if ($bat==1) {
$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>";
}
}
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>
<br class="a">
<div class="a">
<img src="images/batiments/'.$batimeni[1].'" alt="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[1].'">'.$batiment[1].'</a> '; if ($mine_c > 0) echo '(Niveau '.$mine_c.')'; echo '<br>
Description.<br>
Besoin de : ';
$a=ceil(exp(0.43*$mine_c)*205);
$b=ceil(exp(0.43*$mine_c)*110);
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)/(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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
if ($bat==2) {
$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>";
}
}
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>
<br class="a">
<div class="a">
<img src="images/batiments/'.$batimeni[2].'" alt="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[2].'">'.$batiment[2].'</a> '; if ($mine_h > 0) echo '(Niveau '.$mine_h.')'; echo '<br>
Description.<br>
Besoin de : ';
$a=ceil(exp(0.445*$mine_h)*235);
$b=ceil(exp(0.445*$mine_h)*150);
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)/(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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
if ($bat==3) {
$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>";
}
}
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>
<br class="a">
<div class="a">
<img src="images/batiments/'.$batimeni[3].'" alt="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[3].'">'.$batiment[3].'</a> '; if ($centrale_s > 0) echo '(Niveau '.$centrale_s.')'; echo '<br>
Description.<br>
Besoin de : ';
$a=ceil(exp(0.442*$centrale_s)*165);
$b=ceil(exp(0.442*$centrale_s)*99);
ressources($metal, $cristal, $hydrogene, $a, $b, 0, $mine_m, $mine_c, $mine_h); echo '<br>
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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
if ($bat==4) {
$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>";
}
}
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><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">
<a href="descriptions.php?bat='.$batimend[4].'">'.$batiment[4].'</a> '; if ($centrale_f > 0) echo '(Niveau '.$centrale_f.')'; echo '<br>
Description.<br>
Besoin de : ';
$a=ceil(pow(1.8,$centrale_s)*300);
$b=ceil(pow(1.82,$centrale_s)*230);
ressources($metal, $cristal, $hydrogene, $a, $b, 0, $mine_m, $mine_c, $mine_h); echo '<br>
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); }
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>";
}
}
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 '<div class=a>
<img src="images/batiments/'.$batimeni[5].'" alt="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[5].'">'.$batiment[5].'</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)/(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); }
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ète pleine</font>';
else verification_des_ress(6, $metal, $cristal, $hydrogene, $a, $b, $c);
}
echo '</div><br class="a">';
}
echo '<div class="a">
<img src="images/batiments/'.$batimeni[6].'" alt="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[6].'">'.$batiment[6].'</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)/(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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
if ($bat==7) {
$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>";
}
}
else {
if ($case <= 0) echo "<font color=red>Planète pleine</font>";
else {
if($tec > 0) echo '<font color="red"><br><br>Recherche en cours dans le </font><a href="laboratoire.php">laboratoire</a>';
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="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[7].'">'.$batiment[7].'</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)/(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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
if ($bat==8) {
$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>";
}
}
else {
if ($case <= 0) echo '<font color="red">Planète pleine</font>';
else {
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>'; }
else verification_des_ress(8, $metal, $cristal, $hydrogene, $a, $b, 0);
}
}
echo '</div>
<br class="a">';
if ($chantier_terrestre >= 2) {
echo '<div class="a">
<img src="images/batiments/'.$batimeni[8].'">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[8].'">'.$batiment[8].'</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)/(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); }
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ète pleine</font>";
else {
if($unit_s > 0) echo "<font color=red><br><br>Construction en cours dans le </font><a href=chantier_terrestre.php>chantier terrestre</a>";
else verification_des_ress(9, $metal, $cristal, $hydrogene, $a, $b, 0);
}
}
echo '</div><br class="a">';
}
echo '<div class="a">
<img src="images/batiments/'.$batimeni[9].'" alt="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[9].'">'.$batiment[9].'</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)/(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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
if ($bat==10) {
$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>";
}
}
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>
<br class="a">
<div class="a">
<img src="images/batiments/'.$batimeni[10].'" alt="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[10].'">'.$batiment[10].'</a> '; if ($silo > 0) echo '(Niveau '.$silo.')'; 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)/(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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
if ($bat==11) {
$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>";
}
}
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>';
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>
Description.<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)/(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); }
echo '</div>
<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ète pleine</font>';
else verification_des_ress(12, $metal, $cristal, $hydrogene, $a, $b, $c);
}
echo '</div>'; }
echo'</td></tr></table></div></body>
</html>';
?>

View file

@ -22,20 +22,22 @@ $chantier_terrestre = $donnees['chantier_terrestre'];
$chantier_spatial = $donnees['chantier_spatial'];
$caserne = $donnees['caserne'];
$silo = $donnees['silo'];
$centre_info = $donnees['centre_info'];
if ((time())>=$temps_b) {
switch ($bat) {
case 1: $mine_m++; mysql_query("UPDATE planete SET mine_m='".$mine_m."' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 2: $mine_c++; mysql_query("UPDATE planete SET mine_c='".$mine_c."' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 3: $mine_h++; mysql_query("UPDATE planete SET mine_h='".$mine_h."' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 4: $centrale_s++; mysql_query("UPDATE planete SET centrale_s='".$centrale_s."' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 5: $centrale_f++; mysql_query("UPDATE planete SET centrale_f='".$centrale_f."' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 6: $radar++; mysql_query("UPDATE planete SET radar='".$radar."' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 7: $labo++; mysql_query("UPDATE planete SET labo='".$labo."' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 8: $chantier_terrestre++; mysql_query("UPDATE planete SET chantier_terrestre='".$chantier_terrestre."' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 9: $chantier_spatial++; mysql_query("UPDATE planete SET chantier_spatial='".$chantier_spatial."' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 10: $caserne++; mysql_query("UPDATE planete SET caserne='".$caserne."' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 11: $silo++; mysql_query("UPDATE planete SET silo='".$silo."' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 1: $mine_m++; mysql_query("UPDATE planete SET mine_m='$mine_m' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 2: $mine_c++; mysql_query("UPDATE planete SET mine_c='$mine_c' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 3: $mine_h++; mysql_query("UPDATE planete SET mine_h='$mine_h' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 4: $centrale_s++; mysql_query("UPDATE planete SET centrale_s='$centrale_s' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 5: $centrale_f++; mysql_query("UPDATE planete SET centrale_f='$centrale_f' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 6: $radar++; mysql_query("UPDATE planete SET radar='$radar' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 7: $labo++; mysql_query("UPDATE planete SET labo='$labo' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 8: $chantier_terrestre++; mysql_query("UPDATE planete SET chantier_terrestre='$chantier_terrestre' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 9: $chantier_spatial++; mysql_query("UPDATE planete SET chantier_spatial='$chantier_spatial' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 10: $caserne++; mysql_query("UPDATE planete SET caserne='$caserne' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 11: $silo++; mysql_query("UPDATE planete SET silo='$silo' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
case 12: $centre_info++; mysql_query("UPDATE planete SET centre_info='$centre_info' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'"); break;
}
if ($centrale_f > 0 ) {$energie_f = ceil((($centrale_f*80+(exp($centrale_f*0.38)*11))*$coeff)); } else { $energie_f =0;}
@ -45,8 +47,6 @@ if ((time())>=$temps_b) {
$energie = $energie_s + $energie_f;
mysql_query("UPDATE planete SET temps_b='0', bat='0', energie='".$energie."' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
@header("Location: batiment_".$race.".php");
}
mysql_close();
?>

View file

@ -1,101 +0,0 @@
<?php
session_start();
$id=$_SESSION['id'];
$galaxy=$_SESSION['galaxy'];
$ss=$_SESSION['ss'];
$pos=$_SESSION['pos'];
$race=$_SESSION['race'];
require('../connectBDD.php');
$x = mysql_query("SELECT * FROM planete WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
$donnees = mysql_fetch_array($x);
$metal = $donnees['metal'];
$cristal = $donnees['cristal'];
$hydrogene = $donnees['hydrogene'];
require ('bdd.php');
if ($_GET['bat'] == 1) {
$metal += ceil(pow(1.5,$mine_m)*70);
$cristal += ceil(pow(1.55,$mine_m)*35);
$temps = 0;
$bat = 0;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
elseif ($_GET['bat'] == 2) {
$metal += ceil(pow(1.55,$mine_c)*105);
$cristal += ceil(pow(1.55,$mine_c)*60);
$temps = 0;
$bat = 0;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
elseif ($_GET['bat'] == 3) {
$metal += floor(pow(1.53,$mine_h)*82);
$cristal += floor(pow(1.5,$mine_h)*80);
$temps = 0;
$bat = 0;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
elseif ($_GET['bat'] == 4) {
$metal += ceil(pow(2,$centrale_s)*300);
$cristal += ceil(pow(2,$centrale_s)*230);
$temps = 0;
$bat = 0;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
elseif ($_GET['bat'] == 5) {
$metal += ceil(pow(2,$centrale_f)*165);
$cristal += ceil(pow(2,$centrale_f)*99);
$temps = 0;
$bat = 0;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
elseif ($_GET['bat'] == 6) {
$metal += ceil(pow(2,$radar)*750);
$cristal += ceil(pow(2,$radar)*500);
$hydrogene += ceil(pow(2,$radar)*50);
$temps = 0;
$bat = 0;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
elseif ($_GET['bat'] == 7) {
$metal += ceil(pow(2,$labo)*200);
$cristal += ceil(pow(2,$labo)*150);
$temps = 0;
$bat = 0;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
elseif ($_GET['bat'] == 8 ) {
$metal += ceil(pow(2,$chantier_terrestre)*520);
$cristal += ceil(pow(2,$chantier_terrestre)*380);
$temps = 0;
$bat = 0;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
elseif ($_GET['bat'] == 9) {
$metal += ceil(pow(2,$chantier_spatial)*600);
$cristal += ceil(pow(2,$chantier_spatial)*450);
$temps = 0;
$bat = 0;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
elseif ($_GET['bat'] == 10) {
$metal += ceil(pow(2,$caserne)*200);
$cristal += ceil(pow(2,$caserne)*100);
$temps = 0;
$bat = 0;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
elseif ($_GET['bat'] == 11) {
$metal += ceil(pow(2,$silo)*400);
$cristal += ceil(pow(2,$silo)*260);
$temps = 0;
$bat = 0;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
mysql_close();
@header("Location: batiment.php");
?>

View file

@ -28,39 +28,42 @@ $chantier_terrestre = $donnees['chantier_terrestre'];
$chantier_spatial = $donnees['chantier_spatial'];
$caserne = $donnees['caserne'];
$silo = $donnees['silo'];
$centre_info = $donnees['centre_info'];
$ingenieur = $donnees['ingenieur'];
if ($_GET['bat'] == 1) {
$metal -= ceil(pow(1.5,$mine_m)*70);
$cristal -= ceil(pow(1.55,$mine_m)*35);
$temps = time() + ceil(pow(1.7,$mine_m)*120);
$metal -= ceil(exp(0.4*$mine_m)*190);
$cristal -= ceil(exp(0.4*$mine_m)*90);
$temps = time() + ceil((pow(1.7,$mine_m)*120)/(pow(1.23,$centre_info)+0.0025*$ingeneieur));
$bat = 1;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
elseif ($_GET['bat'] == 2) {
$metal -= ceil(pow(1.55,$mine_c)*105);
$cristal -= ceil(pow(1.55,$mine_c)*60);
$temps = time() + (ceil(pow(1.72,$mine_c)*160));
$metal -= ceil(exp(0.43*$mine_c)*205);
$cristal -= ceil(exp(0.43*$mine_c)*110);
$temps = time() + ceil((pow(1.72,$mine_c)*160)/(pow(1.23,$centre_info)+0.0025*$ingeneieur));
$bat = 2;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
elseif ($_GET['bat'] == 3) {
$metal -= floor(pow(1.53,$mine_h)*82);
$cristal -= floor(pow(1.5,$mine_h)*80);
$temps = time() + (ceil(pow(1.75,$mine_h)*180));
$metal -= ceil(exp(0.445*$mine_h)*235);
$cristal -= ceil(exp(0.445*$mine_h)*150);
$temps = time() + ceil((pow(1.75,$mine_h)*180)/(pow(1.23,$centre_info)+0.0025*$ingeneieur));
$bat = 3;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
elseif ($_GET['bat'] == 4) {
$metal -= ceil(pow(2,$centrale_s)*300);
$cristal -= ceil(pow(2,$centrale_s)*230);
$temps = time() + (ceil(pow(1.68,$centrale_s)*190));
$metal -= ceil(exp(0.442*$centrale_s)*165);
$cristal -= ceil(exp(0.442*$centrale_s)*99);
$temps = time() + ceil((pow(1.68,$centrale_s)*190)/(pow(1.23,$centre_info)+0.0025*$ingeneieur));
$bat = 4;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
elseif ($_GET['bat'] == 5) {
$metal -= ceil(pow(2,$centrale_f)*165);
$cristal -= ceil(pow(2,$centrale_f)*99);
$temps = time() + (ceil(pow(1.8,$centrale_f)*300));
$metal -= ceil(pow(1.8,$centrale_f)*300);
$cristal -= ceil(pow(1.82,$centrale_f)*230);
$temps = time() + ceil((pow(1.8,$centrale_f)*300)/(pow(1.23,$centre_info)+0.0025*$ingeneieur));
$bat = 5;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
@ -68,14 +71,14 @@ elseif ($_GET['bat'] == 6) {
$metal -= ceil(pow(2,$radar)*750);
$cristal -= ceil(pow(2,$radar)*500);
$hydrogene -= ceil(pow(2,$radar)*50);
$temps = time() + ceil(pow(2,$radar)*720);
$temps = time() + ceil((pow(2,$radar)*720)/(pow(1.23,$centre_info)+0.0025*$ingeneieur));
$bat = 6;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
elseif ($_GET['bat'] == 7) {
$metal -= ceil(pow(2,$labo)*200);
$cristal -= ceil(pow(2,$labo)*150);
$temps = time() + (ceil(pow(2,$labo)*720));
$temps = time() + ceil((pow(2,$labo)*720)/(pow(1.23,$centre_info)+0.0025*$ingeneieur));
$bat = 7;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
@ -83,31 +86,39 @@ elseif ($_GET['bat'] == 7) {
elseif ($_GET['bat'] == 8 ) {
$metal -= ceil(pow(2,$chantier_terrestre)*520);
$cristal -= ceil(pow(2,$chantier_terrestre)*380);
$temps = time() + (ceil(pow(2,$chantier_terrestre)*420));
$temps = time() + ceil((pow(2,$chantier_terrestre)*420)/(pow(1.23,$centre_info)+0.0025*$ingeneieur));
$bat = 8;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
elseif ($_GET['bat'] == 9) {
$metal -= ceil(pow(2,$chantier_spatial)*600);
$cristal -= ceil(pow(2,$chantier_spatial)*450);
$temps = time() + (ceil(pow(2,$chantier_spatial)*600));
$temps = time() + ceil((pow(2,$chantier_spatial)*600)/(pow(1.23,$centre_info)+0.0025*$ingeneieur));
$bat = 9;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
elseif ($_GET['bat'] == 10) {
$metal -= ceil(pow(2,$caserne)*200);
$cristal -= ceil(pow(2,$caserne)*100);
$temps = time() + (ceil(pow(2,$caserne)*300));
$temps = time() + ceil((pow(2,$caserne)*300)/(pow(1.23,$centre_info)+0.0025*$ingeneieur));
$bat = 10;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
elseif ($_GET['bat'] == 11) {
$metal -= ceil(pow(2,$silo)*400);
$cristal -= ceil(pow(2,$silo)*260);
$temps = time() + (ceil(pow(2,$silo)*1200));
$temps = time() + ceil((pow(2,$silo)*1200)/(pow(1.23,$centre_info)+0.0025*$ingeneieur));
$bat = 11;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
elseif ($_GET['bat'] == 12) {
$metal -= ceil(pow(1.7,$centre_info)*600);
$cristal -=ceil(pow(1.7,$centre_info)*420);
$hydrogene -=ceil(pow(1.7,$centre_info)*100);
$temps = time() + ceil((pow(1.9,$centre_info)*800)/((0.0025*$ingeneieur)+1));
$bat = 12;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene', temps_b='$temps', bat='$bat' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
}
mysql_close();

447
pages/batimenta.php Normal file
View file

@ -0,0 +1,447 @@
<?php
session_start();
include('../template.php');
$template = new Template('./');
$template->set_filenames(array('bati' => '../templates/bati.tpl'));
$id=$_SESSION['id'];
$galaxy=$_SESSION['galaxy'];
$ss=$_SESSION['ss'];
$pos=$_SESSION['pos'];
require_once 'bdd.php';
require_once 'ressource.php';
require_once 'batiment_ajout.php';
require_once 'noms.php';
function sec($time) {
$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 .= ' ';
}
}
return $output;
}
function verification_des_ress($num, $fer, $cristal, $ro, $need_fer, $need_cristal, $need_ro) {
if ($fer >= $need_fer && $cristal >= $need_cristal && $ro >= $need_ro) return "<br><br><br><font color=#0080c0><a href=\"batiment_validation.php?bat=".$num."\">Construire</a></font>";
else return "<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) {
require 'noms.php';
if ($need_fer > 0) {
if ($fer <= $need_fer) {
$z=floor($fer)-$need_fer;
return '<font color=red >'.$ressourc[0].' : <acronym title="'.$z.'">'.$need_fer.'</acronym></font> ';
}
else return $ressourc[0].' : <span class=rc>'.$need_fer.' </span>';
}
if ($need_cristal > 0) {
if ($cristal <= $need_cristal) {
$z=floor($cristal)-$need_cristal;
return '<font color=red >'.$ressourc[1].' : <acronym title="'.$z.'">'.$need_cristal.'</acronym></font> ';
}
else return $ressourc[1].' : <span class=rc>'.$need_cristal.' </span>';
}
if ($need_ro > 0) {
if ($ro <= $need_ro) {
$z=floor($ro)-$need_ro;
return '<font color=red >'.$ressourc[2].' : <acronym title="'.$z.'">'.$need_ro.'</acronym></font>';
}
else return $ressourc[2].' : <span class=rc>'.$need_ro.'</span>';
}
}
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);
return ceil($tem);
}
$case = $cases - ($mine_m + $mine_c + $mine_h + $centrale_s + $centrale_f + $radar + $labo + $chantier_terrestre + $chantier_spatial + $caserne + $silo);
// Usine de métallurgie
if ($mine_m > 0) $niveau = '(Niveau '.$mine_m.')'; else $niveau = '';
$description = '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.';
$a=ceil(exp(0.4*$mine_m)*190); $b=ceil(exp(0.4*$mine_m)*90);
$ressources = ressources($metal, $cristal, $hydrogene, $a, $b, 0, $mine_m, $mine_c, $mine_h);
$temps = sec(ceil((pow(1.7,$mine_m)*120)/(pow(1.23,$centre_info)+0.0025*$ingeneieur)));
if ($temps_b > 0) {
if ($bat==1) {
$tr=$temps_b-time();
$blockC = '<table align="center"><tr><td><div id="axion"></div></td></tr><script language="JavaScript">reste('.$tr.');</script><tr><td><a href="batiment_anul.php?bat=1">Annuler</a></td></tr></table>';
}
}
else {
if ($case <= 0) $blockC = '<font color="red">Planète pleine</font>';
else $blockC = verification_des_ress(1, $metal, $cristal, $hydrogene, $a, $b, 0);
}
$template->assign_block_vars('batiment',array('IMAGE' => $batimeni[0], 'NOMR' => $batimend[0], 'NOM' => $batiment[0], 'NIVEAU' => $niveau, 'DESCRIPTION' => $description, 'RESSOURCES' => $ressources, 'TEMPS' => $temps, 'BLOCKC' => $blockC));
// Usine de cristal
if ($mine_c > 0) $niveau = '(Niveau '.$mine_c.')'; else $niveau = '';
$description = 'DESCRIPTION';
$a=ceil(exp(0.43*$mine_c)*205); $b=ceil(exp(0.43*$mine_c)*110);
$ressources = ressources($metal, $cristal, $hydrogene, $a, $b, 0, $mine_m, $mine_c, $mine_h);
$temps = sec(ceil((pow(1.72,$mine_c)*160)/(pow(1.23,$centre_info)+0.0025*$ingeneieur)));
if ($temps_b > 0) {
if ($bat==2) {
$tr=$temps_b-time();
$blockC = '<table align=center><tr><td><div id="axion"></div></td></tr><script language="JavaScript">reste('.$tr.');</script><tr><td><a href="batiment_anul.php?bat=2">Annuler</a></td></tr></table>';
}
}
else {
if ($case <= 0) $blockC = '<font color="red">Planète pleine</font>';
else $blockC = verification_des_ress(2, $metal, $cristal, $hydrogene, $a, $b, 0);
}
$template->assign_block_vars('batiment',array('IMAGE' => $batimeni[1], 'NOMR' => $batimend[1], 'NOM' => $batiment[1], 'NIVEAU' => $niveau, 'DESCRIPTION' => $description, 'RESSOURCES' => $ressources, 'TEMPS' => $temps, 'BLOCKC' => $blockC));
// Synchronisateur d'hydrogène
if ($mine_h > 0) $niveau = '(Niveau '.$mine_h.')'; else $niveau = '';
$description = 'DESCRIPTION';
$a=ceil(exp(0.445*$mine_h)*235); $b=ceil(exp(0.445*$mine_h)*150);
$ressources = ressources($metal, $cristal, $hydrogene, $a, $b, 0, $mine_m, $mine_c, $mine_h);
$temps = sec(ceil((pow(1.75,$mine_h)*180)/(pow(1.23,$centre_info)+0.0025*$ingeneieur)));
if ($temps_b > 0) {
if ($bat == 3) {
$tr=$temps_b-time();
$blockC = '<table align=center><tr><td><div id="axion"></div></td></tr><script language="JavaScript">reste('.$tr.');</script><tr><td><a href="batiment_anul.php?bat=3">Annuler</a></td></tr></table>';
}
}
else {
if ($case <= 0) $blockC = '<font color="red">Planète pleine</font>';
else $blockC = verification_des_ress(3, $metal, $cristal, $hydrogene, $a, $b, 0);
}
$template->assign_block_vars('batiment',array('IMAGE' => $batimeni[2], 'NOMR' => $batimend[2], 'NOM' => $batiment[2], 'NIVEAU' => $niveau, 'DESCRIPTION' => $description, 'RESSOURCES' => $ressources, 'TEMPS' => $temps, 'BLOCKC' => $blockC));
//
if ($centrale_s > 0) $niveau = '(Niveau '.$centrale_s.')'; else $niveau = '';
$description = 'DESCRIPTION';
$a=ceil(exp(0.442*$centrale_s)*165); $b=ceil(exp(0.442*$centrale_s)*99);
$ressources = ressources($metal, $cristal, $hydrogene, $a, $b, 0, $mine_m, $mine_c, $mine_h);
$temps = sec(ceil((pow(1.68,$centrale_s)*190)/(pow(1.23,$centre_info)+0.0025*$ingeneieur)));
if ($temps_b > 0) {
if ($bat == 4) {
$tr=$temps_b-time();
$blockC = '<table align=center><tr><td><div id="axion"></div></td></tr><script language="JavaScript">reste('.$tr.');</script><tr><td><a href="batiment_anul.php?bat=4">Annuler</a></td></tr></table>';
}
}
else {
if ($case <= 0) $blockC = '<font color="red">Planète pleine</font>';
else $blockC = verification_des_ress(4, $metal, $cristal, $hydrogene, $a, $b, 0);
}
$template->assign_block_vars('batiment',array('IMAGE' => $batimeni[3], 'NOMR' => $batimend[3], 'NOM' => $batiment[3], 'NIVEAU' => $niveau, 'DESCRIPTION' => $description, 'RESSOURCES' => $ressources, 'TEMPS' => $temps, 'BLOCKC' => $blockC));
$template->assign_vars(array('RACE' => $race));
$template->pparse('bati');
exit;
echo '</div>
<br class="a">
<div class="a">
<img src="images/batiments/'.$batimeni[3].'" alt="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[3].'">'.$batiment[3].'</a> '; if ($centrale_s > 0) echo '(Niveau '.$centrale_s.')'; echo '<br>
Description.<br>
Besoin de : ';
$a=ceil(exp(0.442*$centrale_s)*165); $b=ceil(exp(0.442*$centrale_s)*99);
ressources($metal, $cristal, $hydrogene, $a, $b, 0, $mine_m, $mine_c, $mine_h); echo '<br>
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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
if ($bat==4) {
$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>";
}
}
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><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">
<a href="descriptions.php?bat='.$batimend[4].'">'.$batiment[4].'</a> '; if ($centrale_f > 0) echo '(Niveau '.$centrale_f.')'; echo '<br>
Description.<br>
Besoin de : ';
$a=ceil(pow(1.8,$centrale_s)*300);
$b=ceil(pow(1.82,$centrale_s)*230);
ressources($metal, $cristal, $hydrogene, $a, $b, 0, $mine_m, $mine_c, $mine_h); echo '<br>
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); }
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>";
}
}
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 '<div class=a>
<img src="images/batiments/'.$batimeni[5].'" alt="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[5].'">'.$batiment[5].'</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)/(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); }
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ète pleine</font>';
else verification_des_ress(6, $metal, $cristal, $hydrogene, $a, $b, $c);
}
echo '</div><br class="a">';
}
echo '<div class="a">
<img src="images/batiments/'.$batimeni[6].'" alt="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[6].'">'.$batiment[6].'</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)/(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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
if ($bat==7) {
$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>";
}
}
else {
if ($case <= 0) echo "<font color=red>Planète pleine</font>";
else {
if($tec > 0) echo '<font color="red"><br><br>Recherche en cours dans le </font><a href="laboratoire.php">laboratoire</a>';
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="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[7].'">'.$batiment[7].'</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)/(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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
if ($bat==8) {
$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>";
}
}
else {
if ($case <= 0) echo '<font color="red">Planète pleine</font>';
else {
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>'; }
else verification_des_ress(8, $metal, $cristal, $hydrogene, $a, $b, 0);
}
}
echo '</div>
<br class="a">';
if ($chantier_terrestre >= 2) {
echo '<div class="a">
<img src="images/batiments/'.$batimeni[8].'">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[8].'">'.$batiment[8].'</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)/(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); }
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ète pleine</font>";
else {
if($unit_s > 0) echo "<font color=red><br><br>Construction en cours dans le </font><a href=chantier_terrestre.php>chantier terrestre</a>";
else verification_des_ress(9, $metal, $cristal, $hydrogene, $a, $b, 0);
}
}
echo '</div><br class="a">';
}
echo '<div class="a">
<img src="images/batiments/'.$batimeni[9].'" alt="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[9].'">'.$batiment[9].'</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)/(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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
if ($bat==10) {
$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>";
}
}
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>
<br class="a">
<div class="a">
<img src="images/batiments/'.$batimeni[10].'" alt="">
</div>
<div class="b">
<a href="descriptions.php?bat='.$batimend[10].'">'.$batiment[10].'</a> '; if ($silo > 0) echo '(Niveau '.$silo.')'; 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)/(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); }
echo '</div>
<div class="c">';
if ($temps_b > 0) {
if ($bat==11) {
$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>";
}
}
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>';
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>
Description.<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)/(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); }
echo '</div>
<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ète pleine</font>';
else verification_des_ress(12, $metal, $cristal, $hydrogene, $a, $b, $c);
}
echo '</div>'; }
echo '</td></tr></table></div>';
echo'</body>
</html>';
?>

View file

@ -1,4 +1,5 @@
<?php
require_once('flotte_dep.php');
require('../connectBDD.php');
$z = mysql_query("SELECT * FROM user WHERE id='$id' ");
@ -33,8 +34,8 @@ $reacteur_f = $donnees['reacteur_f'];
$reacteur_ff = $donnees['reacteur_ff'];
$medecine = $donnees['medecine'];
$tactique = $donnees['tactique'];
$developement = $donnees['developement'];
$blindage = $donnees['blindage'];
$spartan = $donnees['spartan'];
$y = mysql_query("SELECT * FROM planete WHERE id_user='$id' AND galaxie='$galaxy' AND position='$pos' AND ss='$ss'");
$donnees = mysql_fetch_array($y);
@ -68,18 +69,7 @@ $chantier_terrestre = $donnees['chantier_terrestre'];
$chantier_spatial = $donnees['chantier_spatial'];
$caserne = $donnees['caserne'];
$silo = $donnees['silo'];
$transporteur = $donnees['transporteur'];
$gtransporteur = $donnees['gtransporteur'];
$vcolo = $donnees['vcolo'];
$sonde = $donnees['sonde'];
$recycleur = $donnees['recycleur'];
$chasseur = $donnees['chasseur'];
$fregate = $donnees['fregate'];
$croiseur = $donnees['croiseur1'];
$croiseur2 = $donnees['croiseur2'];
$pv = $donnees['pv'];
$sto = $donnees['sto'];
$centre_info = $donnees['centre_info'];
$temps_caserne = $donnees['cas_contruct_time'];
$cons_caserne = $donnees['cas_contruct_nb'];
@ -108,6 +98,12 @@ $vaisseau_8 = $donnees['vaisseau_8'];
$vaisseau_9 = $donnees['vaisseau_9'];
$vaisseau_10 = $donnees['vaisseau_10'];
$vaisseau_11 = $donnees['vaisseau_11'];
$vaisseau_12 = $donnees['vaisseau_12'];
$cons_terrestre = $donnees['cons_terrestre'];
$unit_t = $donnees['unit_t'];
$temps_t = $donnees['temps_t'];
$temps_terrestre = $temps_t;
$vais_0 = $donnees['vais_0'];
$vais_1 = $donnees['vais_1'];
@ -115,11 +111,6 @@ $vais_2 = $donnees['vais_2'];
$vais_3 = $donnees['vais_3'];
$vais_4 = $donnees['vais_4'];
$cons_terrestre = $donnees['cons_terrestre'];
$unit_t = $donnees['unit_t'];
$temps_t = $donnees['temps_t'];
$temps_terrestre = $temps_t;
$vcl_1 = $donnees['vcl_1'];
$vcl_2 = $donnees['vcl_2'];
$vcl_3 = $donnees['vcl_3'];
@ -136,4 +127,5 @@ require_once('chantier_spacial_ajout.php');
require_once('chantier_terrestre_ajout.php');
require_once('laboratoire_ajout.php');
require_once('ajout_terrestre.php');
mysql_close();
?>

View file

@ -1,59 +0,0 @@
<?php
session_start();
define('DESIGN', 'descriptions/diz/base.css');
require('../header.php');
require('../connectBDD.php');
if (isset($_GET['galaxy'])) $g=$_GET['galaxy']; else $g=$_SESSION['galaxy'];
if (isset($_GET['ss'])) $s=$_GET['ss']; else $s=$_SESSION['ss'];
?>
<body>
<?php
echo'<style TYPE=text/css>
TD.z {
border: 0px;
}
</style>
<form action="carte.php" method="get">
<table border="0" align="center">
<tbody>
<tr><td>
<table>
<tbody>
<tr><td class="z" colspan="3">Galaxie</td></tr>
<tr><td class="z"><input name="galaxy" value="'.$g.'" size="5" maxlength="1" type="text" class="zone_texte"></td></tr>
</tbody></table></td>
<td><table><tbody>
<tr><td class="z" colspan="3">Système solaire</td></tr>
<tr><td class="z"><input name="ss" value="'.$s.'" size="5" maxlength="3" type="text" class="zone_texte"></td></tr>
</tbody></table></td></tr>
<tr><td colspan="2" align="center"><input value="Afficher" type="submit" class="bouton"></td></tr>
</tbody></table>
</form>
<br>
<table align="center">
<tr><td colspan="6" class="z" align="left">Système '.$g.' : '.$s.'</td></tr>
<tr><td>Position</td><td>Nom</td><td>Débris métal</td><td>Débris cristal</td><td>Joueur</td><td>Message</td></tr>';
for ($i=1; $i<=12; $i++) {
$resultat = mysql_query("SELECT * FROM planete WHERE galaxie='$g' AND ss='$s' AND position='$i' ");
if(mysql_num_rows($resultat)>=1) {
$x = mysql_query("SELECT * FROM planete WHERE galaxie='$g' AND ss='$s'AND position='$i' ");
$d = mysql_fetch_array($x);
if ($d['race'] == 'covenant') $ra='(c)';
else $ra='(h)';
echo '<tr><td height="20">'.$i.'</td><td>'.$d['nom'].'</td><td>'.$d['debris_met'].'</td><td>'.$d['debris_cri'].'</td><td>'.$ra.' '.$d['pseudo'].'</td><td><a href="envoyer_message.php?pseudo='.$d['pseudo'].'"><img src="descriptions/diz/m.gif"></a></td></tr>';
}
else echo '<tr><td height="20">'.$i.'</td><td></td><td></td><td></td><td></td><td></td></tr>';
}
echo '</table>';
mysql_close();
?>
</body>
</html>

View file

@ -1,16 +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('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 'caserne_ajout.php';
require_once 'noms.php';
function sec($time) {
$output = '';
@ -30,36 +38,38 @@ function sec($time) {
echo $output;
}
function cons_max($fer,$cristal,$hydrogene,$need_fer,$need_cristal,$need_hydrogene) {
if (need_fer > 0) {
$m1 = floor($fer)/$need_fer; }
if (need_cristal > 0) {
$m2 = floor($cristal)/$need_cristal; }
if (need_hydrogene > 0) {
$m3 = floor($hydrogene)/$need_hydrogene; }
if (isset($m1) && isset($m2) && isset($m3)) { $m = min($m1,$m2,$m3); echo floor($m);}
elseif (isset($m1) && isset($m2) && !isset($m3)) { $m = min($m1,$m2); echo floor($m);}
} //(maximum ";cons_max($fer,$cristal,$hydrogene,80,45,0);echo" unitées)<br>
$f = ceil(60/pow(1.25,$caserne));
$g = ceil(240/pow(1.25,$caserne));
$h = ceil(240/pow(1.25,$caserne));
$i = ceil(720/pow(1.25,$caserne));
$j = ceil(300/pow(1.25,$caserne));
$k = ceil(29700/pow(1.25,$caserne));
$l = ceil(90/pow(1.25,$caserne));
$m = ceil(90/pow(1.25,$caserne));
$n = ceil(900/pow(1.25,$caserne));
$f = ceil(60/pow(1.25,($caserne-1)));
$g = ceil(240/pow(1.25,($caserne-2)));
$h = ceil(240/pow(1.25,($caserne-3)));
$i = ceil(720/pow(1.25,($caserne-5)));
$j = ceil(300/pow(1.25,($caserne-3)));
$k = ceil(29700/pow(1.25,($caserne-10)));
$l = ceil(90/pow(1.25,($caserne-2)));
$m = ceil(90/pow(1.25,($caserne-2)));
$n = ceil(900/pow(1.25,($caserne-5)));
if ($temps_caserne>0) {
$unit = $casernea[--$unit];
/* switch ($unit) {
case 1: $unit= "marines"; break;
case 2: $unit= "fusillers"; break;
case 3: $unit= "grenadiers"; break;
case 4: $unit= "T.C.A.O."; break;
case 5: $unit= "snipers"; break;
case 6: $unit= "spartans"; break;
case 7: $unit= "médecins"; break;
case 8: $unit= "ingénieurs"; break;
case 9: $unit= "soldats exo squellette"; break;
}*/
}
if ($temps_caserne>0) $unit = $casernea[--$unit];
?>
</head>
<body>
<script language="javascript" src="time.js"></script>
<?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 ($caserne > 0) {
if ($temps_caserne >0) {
echo "<table align=center><tr><td>Entrainement terminé dans : ";
@ -69,126 +79,167 @@ if ($caserne > 0) {
echo "</td></tr><tr><td>Entrainement de : ".$cons_caserne." ".$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 ($caserne >= 1) {
echo "<form method=\"post\" action=\"validation_soldat.php\">
<tr>
<td><img src=\"descriptions/diz/caserne/.jpg\"></td>
<td align=left><a href=\"descriptions/.php\">".$casernen[0]."</a>"; if ($soldat1 > 0) { echo" (".$soldat1." unités)"; } echo"<br>Métal : 80<br>Cristal : 45<br>Temps : "; sec($f); echo"<br></td>
<td>";
if ($bat == 10) echo "Caserne en construction";
else {
if ($metal >= 80 && $cristal >= 45) { if ($temps_caserne < time()) { echo "<input type=text class=zone_texte size=4 maxlength=4 name=cons_soldat1 /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo"</td></tr></form>";
}
if ($caserne >= 1) {
echo'<div class=d><a href="arbre_unitees_'.$race.'.php">Arbre des technologies</a></div><br class="a">
<div style="text-align: center; border: none;"><table style="margin-left: auto; margin-right: auto;"><tr><td style="border:none; background: transparent;">
<div class=a>
<img src="images/caserne/'.$casernei[0].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$casernen[0].'</a>'; if ($soldat1 > 0) { echo" (".$soldat1." unités)"; }
echo '<br>'.$casernde[0].'<br>Besoin de : Métal : <span class=rc>80</span> Cristal : <span class=rc>45</span><br>
Temps de construction : '; sec($f);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_soldat.php">';
if ($bat == 10) echo "<br><br><br>Caserne en construction";
else {
if ($metal >= 80 && $cristal >= 45) { if ($temps_caserne < time()) { echo "<br><br><br><input type=text class=zone_texte size=4 maxlength=4 name=cons_soldat1 /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo '</form></div><br class=a>'; }
if ($caserne >= 2) {
echo "<form method=\"post\" action=\"validation_soldat.php\">
<tr>
<td><img src=\"descriptions/diz/caserne/.jpg\"></td>
<td align=left><a href=\"descriptions/.php\">".$casernen[1]."</a> "; if ($soldat2 > 0) { echo" (".$soldat2." unités)"; } echo"<br>Métal : 110<br>Cristal : 90<br>Temps : "; sec($g); echo"<br></td>
<td>";
if ($bat == 10) echo "Caserne en construction";
else {
if ($metal >= 110 && $cristal >= 90) { if ($temps_caserne < time()) { echo "<input type=text class=zone_texte size=4 maxlength=4 name=cons_soldat2 /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo "</td></tr></form>";
}
if ($caserne >= 2) {
echo'<div class=a>
<img src="images/caserne/'.$casernei[1].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$casernen[1].'</a>'; if ($soldat2 > 0) { echo" (".$soldat2." unités)"; }
echo '<br>'.$casernde[1].'<br>Besoin de : Métal : <span class=rc>110</span> Cristal : <span class=rc>90</span><br>
Temps de construction : '; sec($g);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_soldat.php">';
if ($bat == 10) echo "<br><br><br>Caserne en construction";
else {
if ($metal >= 110 && $cristal >= 90) { if ($temps_caserne < time()) { echo "<br><br><br><input type=text class=zone_texte size=4 maxlength=4 name=cons_soldat2 /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo '</form></div><br class=a>'; }
if ($caserne >= 3 && $armement >= 2) {
echo "<form method=\"post\" action=\"validation_soldat.php\">
<tr>
<td><img src=\"descriptions/diz/caserne/.jpg\"></td>
<td align=left><a href=\"descriptions/.php\">".$casernen[2]."</a>"; if ($soldat3 > 0) { echo" (".$soldat3." unités)"; } echo"<br>Métal : 150<br>Cristal : 105<br>Hydrogène : 20<br>Temps : "; sec($h); echo"<br></td>
<td>";
if ($bat == 10) echo "Caserne en construction";
else {
if ($metal >= 150 && $cristal >= 105) { if ($temps_caserne < time()) { echo "<input type=text class=zone_texte size=4 maxlength=4 name=cons_soldat3 /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo"</td></tr></form>";
}
if ($caserne >= 3 && $armement >= 2) {
echo'<div class=a>
<img src="images/caserne/'.$casernei[2].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$casernen[2].'</a>'; if ($soldat3 > 0) { echo" (".$soldat3." unités)"; }
echo '<br>'.$casernde[2].'<br>Besoin de : Métal : <span class=rc>150</span> Cristal : <span class=rc>105</span><br>
'.$ressourc[2].' : 20<br>
Temps de construction : '; sec($h);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_soldat.php">';
if ($bat == 10) echo "<br><br><br>Caserne en construction";
else {
if ($metal >= 150 && $cristal >= 105 && $hydrogene >= 20) { if ($temps_caserne < time()) { echo "<br><br><br><input type=text class=zone_texte size=4 maxlength=4 name=cons_soldat3 /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo '</form></div><br class=a>'; }
if ($caserne >= 5 && $armement >= 3 && $tactique >= 2) {
echo "<form method=\"post\" action=\"validation_soldat.php\">
<tr>
<td><img src=\"descriptions/diz/caserne/.jpg\"></td>
<td align=left><a href=\"descriptions/.php\">".$casernen[3]."</a>"; if ($soldat4 > 0) { echo" (".$soldat4." unités)"; } echo"<br>Métal : 220<br>Cristal : 150<br>Temps : "; sec($i); echo"<br></td>
<td>";
if ($bat == 10) echo "Caserne en construction";
else {
if ($metal >= 220 && $cristal >= 150) { if ($temps_caserne < time()) { echo "<input type=text class=zone_texte size=4 maxlength=4 name=cons_soldat4 /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo"</td></tr></form>";
}
if ($caserne >= 5 && $armement >= 3 && $tactique >= 2) {
echo'<div class=a>
<img src="images/caserne/'.$casernei[3].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$casernen[3].'</a>'; if ($soldat4 > 0) { echo" (".$soldat4." unités)"; }
echo '<br>'.$casernde[3].'<br>Besoin de : Métal : <span class=rc>220</span> Cristal : <span class=rc>150</span><br>
Temps de construction : '; sec($i);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_soldat.php">';
if ($bat == 10) echo "<br><br><br>Caserne en construction";
else {
if ($metal >= 220 && $cristal >= 150) { if ($temps_caserne < time()) { echo "<br><br><br><input type=text class=zone_texte size=4 maxlength=4 name=cons_soldat4 /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo '</form></div><br class=a>'; }
if ($caserne >= 3 && $armement >= 1) {
echo "<form method=\"post\" action=\"validation_soldat.php\">
<tr>
<td><img src=\"descriptions/diz/caserne/.jpg\"></td>
<td align=left><a href=\"descriptions/.php\">".$casernen[4]."</a>"; if ($sniper > 0) { echo" (".$sniper." unités)"; } echo"<br>Métal : 180<br>Cristal : 100<br>Temps : "; sec($j); echo"<br></td>
<td>";
if ($bat == 10) echo "Caserne en construction";
else {
if ($metal >= 180 && $cristal >= 100) { if ($temps_caserne < time()) { echo "<input type=text class=zone_texte size=4 maxlength=4 name=cons_sniper /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo"</td></tr></form>";
}
if ($caserne >= 3 && $armement >= 1) {
echo'<div class=a>
<img src="images/caserne/'.$casernei[4].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$casernen[4].'</a>'; if ($sniper > 0) { echo" (".$sniper." unités)"; }
echo '<br>'.$casernde[4].'<br>Besoin de : Métal : <span class=rc>180</span> Cristal : <span class=rc>100</span><br>
Temps de construction : '; sec($j);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_soldat.php">';
if ($bat == 10) echo "<br><br><br>Caserne en construction";
else {
if ($metal >= 180 && $cristal >= 100) { if ($temps_caserne < time()) { echo "<br><br><br><input type=text class=zone_texte size=4 maxlength=4 name=cons_sniper /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo '</form></div><br class=a>'; }
if ($caserne >= 10 && $armement >= 5 && $blindage >= 5 && $spartan >= 3) {
echo "<form method=\"post\" action=\"validation_soldat.php\">
<tr>
<td><img src=\"descriptions/diz/caserne/.jpg\"></td>
<td align=left><a href=\"descriptions/.php\">".$casernen[5]."</a>"; if ($spartam > 0) { echo" (".$spartam." unités)"; } echo"<br>Métal : 25000<br>Cristal : 10000<br>Temps : "; sec($k); echo"<br></td>
<td>";
if ($bat == 10) echo "Caserne en construction";
else {
if ($metal >= 25000 && $cristal >= 10000) { if ($temps_caserne < time()) { echo "<input type=text class=zone_texte size=4 maxlength=4 name=cons_spartan /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo"</td></tr></form>";
}
if ($caserne >= 10 && $armement >= 5 && $blindage >= 5 && $spartan >= 3) {
echo'<div class=a>
<img src="images/caserne/'.$casernei[5].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$casernen[5].'</a>'; if ($spartam > 0) { echo" (".$spartam." unités)"; }
echo '<br>'.$casernde[5].'<br>Besoin de : Métal : <span class=rc>25.000</span> Cristal : <span class=rc>10.000</span><br>
Temps de construction : '; sec($k);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_soldat.php">';
if ($bat == 10) echo "<br><br><br>Caserne en construction";
else {
if ($metal >= 25000 && $cristal >= 10000) { if ($temps_caserne < time()) { echo "<br><br><br><input type=text class=zone_texte size=4 maxlength=4 name=cons_spartam /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo '</form></div><br class=a>'; }
if ($caserne >= 2 && $medecine >= 2) {
echo "<form method=\"post\" action=\"validation_soldat.php\">
<tr>
<td><img src=\"descriptions/diz/caserne/.jpg\"></td>
<td align=left><a href=\"descriptions/.php\">".$casernen[6]."</a>"; if ($medecin > 0) { echo" (".$medecin." unités)"; } echo"<br>Métal : 100<br>Cristal : 100<br>Temps : "; sec($l); echo"<br></td>
<td>";
if ($bat == 10) echo "Caserne en construction";
else {
if ($metal >= 100 && $cristal >= 100) { if ($temps_caserne < time()) { echo "<input type=text class=zone_texte size=4 maxlength=4 name=cons_medecin /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo"</td></tr></form>";
}
if ($caserne >= 2 && $medecine >= 2) {
echo'<div class=a>
<img src="images/caserne/'.$casernei[6].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$casernen[6].'</a>'; if ($medecin > 0) { echo" (".$medecin." unités)"; }
echo '<br>'.$casernde[6].'<br>Besoin de : Métal : <span class=rc>100</span> Cristal : <span class=rc>100</span><br>
Temps de construction : '; sec($l);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_soldat.php">';
if ($bat == 10) echo "<br><br><br>Caserne en construction";
else {
if ($metal >= 100 && $cristal >= 100) { if ($temps_caserne < time()) { echo "<br><br><br><input type=text class=zone_texte size=4 maxlength=4 name=cons_medecin /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo '</form></div><br class=a>'; }
if ($caserne >= 2) {
echo "<form method=\"post\" action=\"validation_soldat.php\">
<tr>
<td><img src=\"descriptions/diz/caserne/.jpg\"></td>
<td align=left><a href=\"descriptions/.php\">".$casernen[7]."</a>"; if ($ingenieur > 0) { echo" (".$ingenieur." unités)"; } echo"<br>Métal : 90<br>Cristal : 105<br>Temps : "; sec($m); echo"<br></td>
<td>";
if ($bat == 10) echo "Caserne en construction";
else {
if ($metal >= 80 && $cristal >= 45) { if ($temps_caserne < time()) { echo "<input type=text class=zone_texte size=4 maxlength=4 name=cons_ingenieur /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo"</td></tr></form>";
}
if ($caserne >= 2) {
echo'<div class=a>
<img src="images/caserne/'.$casernei[7].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$casernen[7].'</a>'; if ($ingenieur > 0) { echo" (".$ingenieur." unités)"; }
echo '<br>'.$casernde[7].'<br>Besoin de : Métal : <span class=rc>90</span> Cristal : <span class=rc>105</span><br>
Temps de construction : '; sec($m);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_soldat.php">';
if ($bat == 10) echo "<br><br><br>Caserne en construction";
else {
if ($metal >= 90 && $cristal >= 105) { if ($temps_caserne < time()) { echo "<br><br><br><input type=text class=zone_texte size=4 maxlength=4 name=cons_ingenieur /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo '</form></div><br class=a>'; }
if ($caserne >= 5 && $armement >= 4 && $blindage >= 2) {
echo "<form method=\"post\" action=\"validation_soldat.php\">
<tr>
<td><img src=\"descriptions/diz/caserne/.jpg\"></td>
<td align=left><a href=\"descriptions/.php\">".$casernen[8]."</a>"; if ($soldat_lourd > 0) { echo" (".$soldat_lourd." unités)"; } echo"<br>Métal : 300<br>Cristal : 250<br>Temps : "; sec($n); echo"<br></td>
<td>";
if ($bat == 10) echo "Caserne en construction";
else {
if ($metal >= 80 && $cristal >= 45) { if ($temps_caserne < time()) { echo "<input type=text class=zone_texte size=4 maxlength=4 name=cons_soldat_lourd /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo"</td></tr></form>";
}
if ($caserne >= 5 && $armement >= 4 && $blindage >= 2) {
echo'<div class=a>
<img src="images/caserne/'.$casernei[8].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$casernen[8].'</a>'; if ($soldat_lourd > 0) { echo" (".$soldat_lourd." unités)"; }
echo '<br>'.$casernde[8].'<br>Besoin de : Métal : <span class=rc>300</span> Cristal : <span class=rc>250</span><br>
Temps de construction : '; sec($n);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_soldat.php">';
if ($bat == 10) echo "<br><br><br>Caserne en construction";
else {
if ($metal >= 300 && $cristal >= 250) { if ($temps_caserne < time()) { echo "<br><br><br><input type=text class=zone_texte size=4 maxlength=4 name=cons_soldat_lourd /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo '</form></div><br class=a>'; }
} else { ?><center><table><tr><td>Vous devez d'abord construire une caserne !</td></tr></table></center><?php }
echo "</table>"; ?>
} else { echo'<table align=center><tr><td>Vous devez d\'abord construire une caserne !</td></tr></table>'; }
?>
</td></tr></table></div>
</body>
</html>

View file

@ -1,16 +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'];
//include 'ajout_vaisseaux.php';
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_spacial_ajout.php';
require_once 'noms.php';
function sec ($time) {
$output = '';
@ -30,40 +38,26 @@ function sec ($time) {
echo $output;
}
$f = ceil(1080/pow(1.25,$chantier_spatial));
$g = ceil(6300/pow(1.25,$chantier_spatial));
$h = ceil(8280/pow(1.25,$chantier_spatial));
$i = ceil(1440/pow(1.25,$chantier_spatial));
$j = ceil(7380/pow(1.25,$chantier_spatial));
$k = ceil(1200/pow(1.25,$chantier_spatial));
$l = ceil(4680/pow(1.25,$chantier_spatial));
$m = ceil(16800/pow(1.25,$chantier_spatial));
$n = ceil(18060/pow(1.25,$chantier_spatial));
$p = ceil(32400/pow(1.25,$chantier_spatial));
$q = ceil(117000/pow(1.25,$chantier_spatial));
$f = ceil(1080/pow(1.25,($chantier_spatial-1)));
$g = ceil(6300/pow(1.25,($chantier_spatial-5)));
$h = ceil(8280/pow(1.25,($chantier_spatial-5)));
$i = ceil(1440/pow(1.25,($chantier_spatial-3)));
$j = ceil(7380/pow(1.25,($chantier_spatial-5)));
$k = ceil(1200/pow(1.25,($chantier_spatial-1)));
$l = ceil(4680/pow(1.25,($chantier_spatial-3)));
$m = ceil(16800/pow(1.25,($chantier_spatial-6)));
$n = ceil(18060/pow(1.25,($chantier_spatial-6)));
$p = ceil(32400/pow(1.25,($chantier_spatial-8)));
$q = ceil(117000/pow(1.25,($chantier_spatial-12)));
if ($temps_spatial > 0) {
$unit = $nomvaisa[--$unit_s];
/* switch ($unit_s) {
case 1: $unit= "cargos de classe Parabola"; break;
case 2: $unit= "cargos de classe Laden"; break;
case 3: $unit= "vaisseaux de colonisation de classe Odyssey"; break;
case 4: $unit= "drones despionnage de classe Clarion"; break;
case 5: $unit= "recycleurs de classe Minotaur"; break;
case 6: $unit= "C709 Longsword Interceptor"; break;
case 7: $unit= "frégates"; break;
case 8: $unit= "croiseurs de classe Halcyon"; break;
case 9: $unit= "croiseurs de classe Marathon"; break;
case 10: $unit= "porte vaisseaux"; break;
case 11: $unit= "stations orbitale"; break;
}*/
}
if ($temps_spatial > 0) $unit = $nomvaisa[--$unit_s];
?>
<script language="javascript" src="time.js"></script>
</head>
<body>
<?php if ($chantier_spatial > 0) {
<?php
if ($chantier_spatial > 0) {
if ($temps_spatial > 0) {
echo "<table align=center><tr><td>Construction terminé dans : ";
$tr=$temps_spatial-time();
@ -72,141 +66,197 @@ if ($temps_spatial > 0) {
echo "</td></tr><tr><td>Construction de : ".$cons_spatial." ".$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_spatial >= 1 && $reacteur >= 4) {
echo "<form method=\"post\" action=\"validation_vaisseaux.php\">
<tr>
<td><img src=\"images/".$nomvaisi[0].".jpg\"></td>
<td align=\"left\"><a href=\"descriptions/.php\">".$nomvaisn[0]."</a>"; if ($vaisseau_1 > 0) { echo" (".$vaisseau_1." vaisseaux)"; } echo"<br>Métal : 1000<br>Cristal : 800<br>Temps : "; sec($f); echo"<br></td>
<td>";
if ($bat == 9) echo "Chantier spatial en construction";
else {
if ($temps_spatial < time()) echo "<input type=text class=zone_texte size=4 maxlength=4 name=cons_transporteur /><br><input type=submit value=Envoyer class=bouton>";
}
echo"</td></tr></form>";
}
if ($chantier_spatial >= 5 && $reacteur_f >= 2) {
echo "<form method=\"post\" action=\"validation_vaisseaux.php\">
<tr>
<td><img src=\"images/".$nomvaisi[1].".jpg\"></td>
<td align=left><a href=\"descriptions/.php\">".$nomvaisn[1]."</a>"; if ($vaisseau_2 > 0) { echo" (".$vaisseau_2." vaisseaux)"; } echo"<br>Métal : 4000<br>Cristal : 3000<br>Temps : "; sec($g); echo"<br></td>
<td>";
if ($bat == 9) echo "Chantier spatial en construction";
else {
if ($temps_spatial < time()) echo "<input type=text class=zone_texte size=4 maxlength=4 name=cons_gtransporteur /><br><input type=submit value=Envoyer class=bouton>";
}
echo"</td></tr></form>";
}
if ($chantier_spatial >= 5 && $reacteur_ff >= 1) {
echo "<form method=post action=validation_vaisseaux.php>
<tr>
<td><img src=\"images/".$nomvaisi[2].".jpg\"></td>
<td align=left><a href=\"descriptions/.php\">".$nomvaisn[2]."</a>"; if ($vaisseau_3 > 0) { echo" (".$vaisseau_3." vaisseaux)"; } echo"<br>Métal : 9000<br>Cristal : 9000<br>Hydrogène : 1000<br>Temps : "; sec($h); echo"<br></td>
<td>";
if ($bat == 9) echo "Chantier spatial en construction";
else {
if ($temps_spatial < time()) echo "<input type=text class=zone_texte size=4 maxlength=4 name=cons_vcolo /><br><input type=submit value=Envoyer class=bouton>";
}
echo"</td></tr></form>";
}
if ($chantier_spatial >= 3 && $reacteur >= 5 && $detection >=2) {
echo "<form method=post action=validation_vaisseaux.php>
<tr>
<td><img src=\"images/".$nomvaisi[3].".jpg\"></td>
<td align=left><a href=\"descriptions/.php\">".$nomvaisn[3]."</a>"; if ($vaisseau_4 > 0) { echo" (".$vaisseau_4." vaisseaux)"; } echo"<br>Métal : 1000<br>Cristal : 1200<br>Hydrogène : 100<br>Temps : "; sec($i); echo"<br></td>
<td>";
if ($bat == 9) echo "Chantier spatial en construction";
else {
if ($temps_spatial < time()) echo "<input type=text class=zone_texte size=4 maxlength=4 name=cons_sonde /><br><input type=submit value=Envoyer class=bouton>";
}
echo"</td></tr></form>";
}
if ($chantier_spatial >= 5 && $reacteur_f >= 4 && $blindage >= 5) {
echo "<form method=post action=validation_vaisseaux.php>
<tr>
<td><img src=\"images/".$nomvaisi[4].".jpg\"></td>
<td align=left><a href=\"descriptions/.php\">".$nomvaisn[4]."</a>"; if ($vaisseau_5 > 0) { echo" (".$vaisseau_5." vaisseaux)"; } echo"<br>Métal : 15000<br>Cristal : 9000<br>Hydrogène : 1000<br>Temps : "; sec($j); echo"<br></td>
<td>";
if ($bat == 9) echo "Chantier spatial en construction";
else {
if ($temps_spatial < time()) echo "<input type=text class=zone_texte size=4 maxlength=4 name=cons_recycleur /><br><input type=submit value=Envoyer class=bouton>";
}
echo"</td></tr></form>";
}
if ($chantier_spatial >= 1 && $reacteur >= 4) {
echo "<form method=post action=validation_vaisseaux.php>
<tr>
<td><img src=\"images/".$nomvaisi[5].".jpg\"></td>
<td align=left><a href=\"descriptions/.php\">".$nomvaisn[5]."</a>"; if ($vaisseau_6 > 0) { echo" (".$vaisseau_6." vaisseaux)"; } echo"<br>Métal : 1700<br>Cristal : 1220<br>Temps : "; sec($k); echo"<br></td>
<td>";
if ($bat == 9) echo "Chantier spatial en construction";
else {
if ($temps_spatial < time()) echo "<input type=text class=zone_texte size=4 maxlength=4 name=cons_chasseur /><br><input type=submit value=Envoyer class=bouton>";
}
echo"</td></tr></form>";
}
if ($chantier_spatial >= 3 && $reacteur_f >= 3 && $armement >=1) {
echo "<form method=post action=validation_vaisseaux.php>
<tr>
<td><img src=\"images/".$nomvaisi[6].".jpg\"></td>
<td align=left><a href=\"descriptions/.php\">".$nomvaisn[6]."</a>"; if ($vaisseau_7 > 0) { echo" (".$vaisseau_7." vaisseaux)"; } echo"<br>Métal : 5800<br>Cristal : 1400<br>Temps : "; sec($l); echo"<br></td>
<td>";
if ($bat == 9) echo "Chantier spatial en construction";
else {
if ($temps_spatial < time()) echo "<input type=text class=zone_texte size=4 maxlength=4 name=cons_fregate /><br><input type=submit value=Envoyer class=bouton>";
}
echo"</td></tr></form>";
}
if ($chantier_spatial >= 6 && $reacteur_ff >= 2 && $armement >=3 && $blindage >= 4) {
echo "<form method=post action=validation_vaisseaux.php>
<tr>
<td><img src=\"images/".$nomvaisi[7].".jpg\"></td>
<td align=left><a href=\"descriptions/.php\">".$nomvaisn[7]."</a>"; if ($vaisseau_8 > 0) { echo" (".$vaisseau_8." vaisseaux)"; } echo"<br>Métal : 20000<br>Cristal : 16000<br>Hydrogène : 1600<br>Temps : "; sec($m); echo"<br></td>
<td>";
if ($bat == 9) echo "Chantier spatial en construction";
else {
if ($temps_spatial < time()) echo "<input type=text class=zone_texte size=4 maxlength=4 name=cons_croiseur /><br><input type=submit value=Envoyer class=bouton>";
}
echo"</td></tr></form>";
}
if ($chantier_spatial >= 6 && $reacteur_ff >= 3 && $armement >=4 && $blindage >= 4) {
echo "<form method=post action=validation_vaisseaux.php>
<tr>
<td><img src=\"images/".$nomvaisi[8].".jpg\"></td>
<td align=left><a href=\"descriptions/.php\">".$nomvaisn[8]."</a>"; if ($vaisseau_9 > 0) { echo" (".$vaisseau_9." vaisseaux)"; } echo"<br>Métal : 26000<br>Cristal : 16400<br>Hydrogène : 1600<br>Temps : "; sec($n); echo"<br></td>
<td>";
if ($bat == 9) echo "Chantier spatial en construction";
else {
if ($temps_spatial < time()) echo "<input type=text class=zone_texte size=4 maxlength=4 name=cons_croiseur2 /><br><input type=submit value=Envoyer class=bouton>";
}
echo"</td></tr></form>";
}
if ($chantier_spatial >= 8 && $reacteur_ff >= 5 && $armement >=6 && $blindage >= 6) {
echo "<form method=post action=validation_vaisseaux.php>
<tr>
<td><img src=\"images/".$nomvaisi[9].".jpg\"></td>
<td align=left><a href=\"descriptions/.php\">".$nomvaisn[9]."</a>"; if ($vaisseau_10 > 0) { echo" (".$vaisseau_10." vaisseaux)"; } echo"<br>Métal : 60000<br>Cristal : 40000<br>Hydrogène : 3000<br>Temps : "; sec($p); echo"<br></td>
<td>";
if ($bat == 9) echo "Chantier spatial en construction";
else {
if ($temps_spatial < time()) echo "<input type=text class=zone_texte size=4 maxlength=4 name=cons_pv /><br><input type=submit value=Envoyer class=bouton>";
}
echo"</td></tr></form>";
}
if ($chantier_spatial >= 12 && $reacteur_ff >= 10 && $armement >=12 && $blindage >= 12) {
echo "<form method=post action=validation_vaisseaux.php>
<tr>
<td><img src=\"images/".$nomvaisi[10].".jpg\"></td>
<td align=left><a href=\"descriptions/.php\">".$nomvaisn[10]."</a>"; if ($vaisseau_11 > 0) { echo" (".$vaisseau_11." vaisseaux)"; } echo"<br>Cette station reste en orbite autour de la planète et ne peut plus y bouger.<br>Métal : 500000<br>Cristal : 400000<br>Hydrogène : 250000<br>Temps : "; sec($q); echo"<br></td>
<td>";
if ($bat == 9) echo "Chantier spatial en construction";
else {
if ($temps_spatial < time()) echo "<input type=text class=zone_texte size=4 maxlength=4 name=cons_sto /><br><input type=submit value=Envoyer class=bouton>";
}
echo"</td></tr></form>";
}
echo'<div class=d><a href="arbre_vaisseaux_'.$race.'.php">Arbre des technologies</a></div><br class="a">
<div style="text-align: center; border: none;"><table style="margin-left: auto; margin-right: auto;"><tr><td style="border:none; background: transparent;">';
} else echo "<center><table><tr><td>Vous devez d'abord construire un chantier spatial !</td></tr></table></center>";
echo "</table>"; ?>
if ($chantier_spatial >= 1 && $reacteur >= 4) {
echo'<div class=a>
<img src="images/vaisseaux/'.$nomvaisi[0].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomvaisn[0].'</a>'; if ($vaisseau_1 > 0) echo" (".$vaisseau_1." vaisseaux)";
echo '<br><span class="description">'.$nomvaisd[0].'</span><br>Besoin de : Métal : <span class=rc>1.000</span> Cristal : <span class=rc>800</span><br>
Temps de construction : '; sec($f);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_vaisseaux.php">';
if ($bat == 9) echo "<br><br><br>Chantier spatial en construction";
else {
if ($metal >= 1000 && $cristal >= 800) { if ($temps_spatial < time()) { echo "<br><br><br><input type=text class=zone_texte size=4 maxlength=4 name=cons_transporteur /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo '</form></div><br class=a>'; }
if ($chantier_spatial >= 5 && $reacteur_f >= 2) {
echo'<div class=a>
<img src="images/vaisseaux/'.$nomvaisi[1].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomvaisn[1].'</a>'; if ($vaisseau_2 > 0) echo" (".$vaisseau_2." vaisseaux)";
echo '<br><span class="description">'.$nomvaisd[1].'</span><br>Besoin de : Métal : <span class=rc>4.000</span> Cristal : <span class=rc>3.000</span><br>
Temps de construction : '; sec($g);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_vaisseaux.php">';
if ($bat == 9) echo "<br><br><br>Chantier spatial en construction";
else {
if ($metal >= 4000 && $cristal >= 3000) { if ($temps_spatial < time()) { echo "<br><br><br><input type=text class=zone_texte size=4 maxlength=4 name=cons_gtransporteur /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo '</form></div><br class=a>'; }
if ($chantier_spatial >= 5 && $reacteur_ff >= 1) {
echo'<div class=a>
<img src="images/vaisseaux/'.$nomvaisi[2].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomvaisn[2].'</a>'; if ($vaisseau_3 > 0) echo" (".$vaisseau_3." vaisseaux)";
echo '<br><span class="description">'.$nomvaisd[2].'</span><br>Besoin de : Métal : <span class=rc>9.000</span> Cristal : <span class=rc>9.000</span> '.$ressourc[2].' : <span class=rc>1.000</span><br>
Temps de construction : '; sec($h);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_vaisseaux.php">';
if ($bat == 9) echo "<br><br><br>Chantier spatial en construction";
else {
if ($metal >= 9000 && $cristal >= 9000 && $hydrogene >= 1000) { if ($temps_spatial < time()) { echo "<br><br><br><input type=text class=zone_texte size=4 maxlength=4 name=cons_vcolo /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo '</form></div><br class=a>'; }
if ($chantier_spatial >= 3 && $reacteur >= 5 && $detection >=2) {
echo'<div class=a>
<img src="images/vaisseaux/'.$nomvaisi[3].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomvaisn[3].'</a>'; if ($vaisseau_4 > 0) echo" (".$vaisseau_4." vaisseaux)";
echo '<br><span class="description">'.$nomvaisd[3].'</span><br>Besoin de : Métal : <span class=rc>1.000</span> Cristal : <span class=rc>1.200</span> '.$ressourc[2].' : <span class=rc>100</span><br>
Temps de construction : '; sec($i);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_vaisseaux.php">';
if ($bat == 9) echo "<br><br><br>Chantier spatial en construction";
else {
if ($metal >= 1000 && $cristal >= 1200 && $hydrogene >= 100) { if ($temps_spatial < time()) { echo "<br><br><br><input type=text class=zone_texte size=4 maxlength=4 name=cons_sonde /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo '</form></div><br class=a>'; }
if ($chantier_spatial >= 5 && $reacteur_f >= 4 && $blindage >= 5) {
echo'<div class=a>
<img src="images/vaisseaux/'.$nomvaisi[4].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomvaisn[4].'</a>'; if ($vaisseau_5 > 0) echo" (".$vaisseau_5." vaisseaux)";
echo '<br><span class="description">'.$nomvaisd[4].'</span><br>Besoin de : Métal : <span class=rc>15.000</span> Cristal : <span class=rc>9.000</span> '.$ressourc[2].' : <span class=rc>1.000</span><br>
Temps de construction : '; sec($j);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_vaisseaux.php">';
if ($bat == 9) echo "<br><br><br>Chantier spatial en construction";
else {
if ($metal >= 15000 && $cristal >= 9000 && $hydrogene >= 1000) { if ($temps_spatial < time()) { echo "<br><br><br><input type=text class=zone_texte size=4 maxlength=4 name=cons_recycleur /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo '</form></div><br class=a>'; }
if ($chantier_spatial >= 1 && $reacteur >= 4) {
echo'<div class=a>
<img src="images/vaisseaux/'.$nomvaisi[5].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomvaisn[5].'</a>'; if ($vaisseau_6 > 0) echo" (".$vaisseau_6." vaisseaux)";
echo '<br><span class="description">'.$nomvaisd[5].'</span><br>Besoin de : Métal : <span class=rc>1.700</span> Cristal : <span class=rc>1.220</span><br>
Temps de construction : '; sec($k);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_vaisseaux.php">';
if ($bat == 9) echo "<br><br><br>Chantier spatial en construction";
else {
if ($metal >= 1700 && $cristal >= 1220) { if ($temps_spatial < time()) { echo "<br><br><br><input type=text class=zone_texte size=4 maxlength=4 name=cons_chasseur /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo '</form></div><br class=a>'; }
if ($chantier_spatial >= 3 && $reacteur_f >= 3 && $armement >=1) {
echo'<div class=a>
<img src="images/vaisseaux/'.$nomvaisi[6].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomvaisn[6].'</a>'; if ($vaisseau_7 > 0) echo" (".$vaisseau_7." vaisseaux)";
echo '<br><span class="description">'.$nomvaisd[6].'</span><br>Besoin de : Métal : <span class=rc>5.800</span> Cristal : <span class=rc>1.400</span><br>
Temps de construction : '; sec($l);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_vaisseaux.php">';
if ($bat == 9) echo "<br><br><br>Chantier spatial en construction";
else {
if ($metal >= 5800 && $cristal >= 1400) { if ($temps_spatial < time()) { echo "<br><br><br><input type=text class=zone_texte size=4 maxlength=4 name=cons_fregate /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo '</form></div><br class=a>'; }
if ($chantier_spatial >= 6 && $reacteur_ff >= 2 && $armement >=3 && $blindage >= 4) {
echo'<div class=a>
<img src="images/vaisseaux/'.$nomvaisi[7].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomvaisn[7].'</a>'; if ($vaisseau_8 > 0) echo" (".$vaisseau_8." vaisseaux)";
echo '<br><span class="description">'.$nomvaisd[7].'</span><br>Besoin de : Métal : <span class=rc>20.000</span> Cristal : <span class=rc>16.000</span> '.$ressourc[2].' : <span class=rc>1.600</span><br>
Temps de construction : '; sec($m);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_vaisseaux.php">';
if ($bat == 9) echo "<br><br><br>Chantier spatial en construction";
else {
if ($metal >= 20000 && $cristal >= 16000 && $hydrogene >= 1600) { if ($temps_spatial < time()) { echo "<br><br><br><input type=text class=zone_texte size=4 maxlength=4 name=cons_croiseur /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo '</form></div><br class=a>'; }
if ($chantier_spatial >= 6 && $reacteur_ff >= 3 && $armement >=4 && $blindage >= 4) {
echo'<div class=a>
<img src="images/vaisseaux/'.$nomvaisi[8].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomvaisn[8].'</a>'; if ($vaisseau_9 > 0) echo" (".$vaisseau_9." vaisseaux)";
echo '<br><span class="description">'.$nomvaisd[8].'</span><br>Besoin de : Métal : <span class=rc>26.000</span> Cristal : <span class=rc>16.400</span> '.$ressourc[2].' : <span class=rc>1.600</span><br>
Temps de construction : '; sec($n);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_vaisseaux.php">';
if ($bat == 9) echo "<br><br><br>Chantier spatial en construction";
else {
if ($metal >= 26000 && $cristal >= 16400 && $hydrogene >= 1600) { if ($temps_spatial < time()) { echo "<br><br><br><input type=text class=zone_texte size=4 maxlength=4 name=cons_croiseur2 /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo '</form></div><br class=a>'; }
if ($chantier_spatial >= 8 && $reacteur_ff >= 5 && $armement >=6 && $blindage >= 6) {
echo'<div class=a>
<img src="images/vaisseaux/'.$nomvaisi[9].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomvaisn[9].'</a>'; if ($vaisseau_10 > 0) echo" (".$vaisseau_10." vaisseaux)";
echo '<br><span class="description">'.$nomvaisd[9].'</span><br>Besoin de : Métal : <span class=rc>60.000</span> Cristal : <span class=rc>40.000</span> '.$ressourc[2].' : <span class=rc>3.000</span><br>
Temps de construction : '; sec($p);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_vaisseaux.php">';
if ($bat == 9) echo "<br><br><br>Chantier spatial en construction";
else {
if ($metal >= 60000 && $cristal >= 40000 && $hydrogene >= 3000) { if ($temps_spatial < time()) { echo "<br><br><br><input type=text class=zone_texte size=4 maxlength=4 name=cons_pv /><br><input type=submit value=Envoyer class=bouton>"; }}
}
echo '</form></div><br class=a>'; }
if ($chantier_spatial >= 12 && $reacteur_ff >= 10 && $armement >=12 && $blindage >= 12) {
echo'<div class=a>
<img src="images/vaisseaux/'.$nomvaisi[10].'" alt="" />
</div>
<div class=b>
<a href=\"descriptions/.php\">'.$nomvaisn[10].'</a>'; if ($vaisseau_11 > 0) echo " (".$vaisseau_11." vaisseaux)";
echo '<br><span class="description">'.$nomvaisd[10].'</span><br>Besoin de : Métal : <span class=rc>500.000</span> Cristal : <span class=rc>400.000</span> '.$ressourc[2].' : <span class=rc>250.000</span><br>
Temps de construction : '; sec($q);
echo '</div>
<div class="c">';
echo'<form method="post" action="validation_vaisseaux.php">';
if ($bat == 9) echo "<br><br><br>Chantier spatial en construction";
else {
if ($metal >= 500000 && $cristal >= 400000 && $hydrogene >= 250000) { if ($temps_spatial < time()) { echo "<br><br><br><input type=text class=zone_texte size=4 maxlength=4 name=cons_sto /><br><input type=submit value=Envoyer class=bouton>"; }}
}
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>

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>

View file

@ -24,6 +24,7 @@ if ((time()) >= $temps_terrestre && !empty($temps_terrestre)) {
case 13: $def_5 += $cons_terrestre; mysql_query("UPDATE planete SET def_5='$def_5' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos' AND id_user='$id'"); break;
}
mysql_query("UPDATE planetes SET terr_contruct_time='0', terr_contruct='0', terr_contruct_nb='0' WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos' AND id_user='$id'");
$cons_terrestre = 0; $unit_t = 0; $temps_terrestre = 0;
// if ($unit_t < 9 && $unit_t > 0) header("Location: chantier_terrestre.php");
// else if ($unit_t >= 9) header("Location: defense.php");
}

View file

@ -1,134 +0,0 @@
<?php
session_start();
$id=$_SESSION['id'];
$galaxy=$_SESSION['galaxy'];
$ss=$_SESSION['ss'];
$pos=$_SESSION['pos'];
$race=$_SESSION['race'];
require('bdd.php');
require('../connectBDD.php');
$x = mysql_query("SELECT * FROM planete WHERE galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
$donnees = mysql_fetch_array($x);
$y = mysql_query("SELECT * FROM user WHERE id='$id'");
$donneesy = mysql_fetch_array($y);
if ($_GET['tec'] == 1) {
$n=($informatique-1);
$metal -= ceil(pow(2,$n)*500);
$cristal -= ceil(pow(2,$n)*150);
$temps_tec = time() + (ceil((pow(2,$labo)*840) - ((pow(2,$labo)*840)*0.07*$labo)));
$tec = 1;
mysql_query("UPDATE planete SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'");
mysql_query("UPDATE user SET temps_t='$temps_tec', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 2) {
$n=($detection-1);
$metal -= ceil(pow(2,$n)*500);
$cristal -= ceil(pow(2,$n)*750);
$hydrogene -= ceil(pow(2,$n)*100);
$temps_tec = time() + (ceil((pow(2,$labo)*1200) - ((pow(2,$labo)*1200)*0.07*$labo)));
$tec = 2;
mysql_query("UPDATE planetes SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos';");
mysql_query("UPDATE user SET temps_t='$temps_tec', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 3) {
$n=($armement-1);
$metal -= ceil(pow(2,$n)*2500);
$cristal -= ceil(pow(2,$n)*500);
$temps_tec = time() + (ceil((pow(2,$labo)*3000) - ((pow(2,$labo)*3000)*0.07*$labo)));
$tec = 3;
mysql_query("UPDATE planetes SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos';");
mysql_query("UPDATE user SET temps_t='$temps_tec', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 5) {
$n=($energie_t-1);
$metal -= ceil(pow(2,$n)*2000);
$cristal -= ceil(pow(2,$n)*1500);
$hydrogene -= ceil(pow(2,$n)*300);
$temps_tec = time() + (ceil((pow(2,$labo)*1800) - ((pow(2,$labo)*1800)*0.07*$labo)));
$tec = 5;
mysql_query("UPDATE planetes SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos';");
mysql_query("UPDATE user SET temps_t='$temps_tec', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 6) {
$n=($reacteur-1);
$metal -= ceil(pow(2,$n)*1400);
$cristal -= ceil(pow(2,$n)*400);
$temps_tec = time() + (ceil((pow(2,$labo)*1020) - ((pow(2,$labo)*1020)*0.07*$labo)));
$tec = 6;
mysql_query("UPDATE planetes SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos';");
mysql_query("UPDATE user SET temps_t='$temps_tec', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 7) {
$n=($reacteur_f-1);
$metal -= ceil(pow(2,$n)*3000);
$cristal -= ceil(pow(2,$n)*2100);
$hydrogene -= ceil(pow(2,$n)*750);
$temps_tec = time() + (ceil((pow(2,$labo)*3300) - ((pow(2,$labo)*3300)*0.07*$labo)));
$tec = 7;
mysql_query("UPDATE planetes SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos';");
mysql_query("UPDATE user SET temps_t='$temps_tec', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 8) {
$n=($reacteur_ff-1);
$metal -= ceil(pow(2,$n)*5000);
$cristal -= ceil(pow(2,$n)*4000);
$hydrogene -= ceil(pow(2,$n)*1500);
$temps_tec = time() + (ceil((pow(2,$labo)*4800) - ((pow(2,$labo)*4800)*0.07*$labo)));
$tec = 8;
mysql_query("UPDATE planetes SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos';");
mysql_query("UPDATE user SET temps_t='$temps_tec', tec='$tec' WHERE id='$id'");
}
else if ( $_GET['tec'] == 9) {
$n=($medecine-1);
$metal -= ceil(pow(2,$n)*800);
$cristal -= ceil(pow(2,$n)*1000);
$temps_tec = time() + (ceil((pow(2,$labo)*720) - ((pow(2,$labo)*720)*0.07*$labo)));
$tec = 9;
mysql_query("UPDATE planetes SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos';");
mysql_query("UPDATE user SET temps_t='$temps_tec', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 10) {
$n=($tactique-1);
$metal -= ceil(pow(2,$n)*2600);
$cristal -= ceil(pow(2,$n)*2600);
$temps_tec = time() + (ceil((pow(2,$labo)*22800) - ((pow(2,$labo)*2280)*0.07*$labo)));
$tec = 10;
mysql_query("UPDATE planetes SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos';");
mysql_query("UPDATE user SET temps_t='$temps_tec', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 11) {
$n=($developpement-1);
$metal -= ceil(pow(2,$n)*10000);
$cristal -= ceil(pow(2,$n)*10000);
$hydrogene -= ceil(pow(2,$n)*5000);
$temps_tec = time() + (ceil((pow(2,$labo)*8220) - ((pow(2,$labo)*8220)*0.07*$labo)));
$tec = 11;
mysql_query("UPDATE planetes SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos';");
mysql_query("UPDATE user SET temps_t='$temps_tec', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 12) {
$n=($blindage-1);
$metal -= ceil(pow(2,$n)*3700);
$temps_tec = time() + (ceil((pow(2,$labo)*3420) - ((pow(2,$labo)*3420)*0.07*$labo)));
$tec = 12;
mysql_query("UPDATE planetes SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos';");
mysql_query("UPDATE user SET temps_t='$temps_tec', tec='$tec' WHERE id='$id'");
}
else if ($_GET['tec'] == 13) {
$n=($spartan-1);
$metal -= ceil(pow(3,$n)*5200);
$cristal -= ceil(pow(3,$n)*4250);
$hydrogene -= ceil(pow(3,$n)*850);
$temps_tec = time() + (ceil((pow(2,$labo)*10000) - ((pow(3,$labo)*10000)*0.07*$labo)));
$tec = 13;
mysql_query("UPDATE planetes SET metal='$metal', cristal='$cristal', hydrogene='$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos';");
mysql_query("UPDATE user SET temps_t='$temps_tec', tec='$tec' WHERE id='$id'");
}
mysql_close();
header('Location: laboratoire.php');
?>

View file

@ -81,16 +81,22 @@ if (isset($_POST['vaisseau8'])) print '<input type="hidden" name="vaisseau8" val
if (isset($_POST['vaisseau9'])) print '<input type="hidden" name="vaisseau9" value="'.$_POST['vaisseau9'].'">';
if (isset($_POST['vaisseau10'])) print '<input type="hidden" name="vaisseau10" value="'.$_POST['vaisseau10'].'">';
if (isset($_POST['vaisseau11'])) print '<input type="hidden" name="vaisseau11" value="'.$_POST['vaisseau11'].'">';
if (isset($_POST['vaisseau12'])) print '<input type="hidden" name="vaisseau12" value="'.$_POST['vaisseau12'].'">';
?>
<table align="center" width="500">
<tr><td colspan="2">Pr&eacute;paration de la flotte</td></tr>
<tr><td width="50%">Nom</td><td width="50%"><input type="text" name="nom" maxlength="255" size="20"></td></tr>
<tr><td width="50%">Destination</td><td width="50%"><input type="text" name="galaxie" maxlength="1" size="2" onchange="vaisTempsDeplacement(document.getElementById('end_galaxie').value, document.getElementById('end_ss').value, document.getElementById('end_position').value);" id="end_galaxie" value="<?php print $_SESSION['galaxy']; ?>">:<input type="text" name="ss" maxlength="2" size="2" onchange="vaisTempsDeplacement(document.getElementById('end_galaxie').value, document.getElementById('end_ss').value, document.getElementById('end_position').value);" id="end_ss" value="<?php print $_SESSION['ss']; ?>">:<input type="text" name="position" maxlength="1" size="2" onchange="vaisTempsDeplacement(document.getElementById('end_galaxie').value, document.getElementById('end_ss').value, document.getElementById('end_position').value);" id="end_position" value="<?php print $_SESSION['pos']; ?>"></td></tr>
<tr><td width="50%">Destination</td><td width="50%"><input type="text" name="galaxie" maxlength="1" size="2" onchange="vaisTempsDeplacement(document.getElementById('end_galaxie').value, document.getElementById('end_ss').value, document.getElementById('end_position').value);" id="end_galaxie" value="<?php print $_SESSION['galaxy']; ?>">:<input type="text" name="ss" maxlength="2" size="2" onchange="vaisTempsDeplacement(document.getElementById('end_galaxie').value, document.getElementById('end_ss').value, document.getElementById('end_position').value);" id="end_ss" value="<?php print $_SESSION['ss']; ?>">:<input type="text" name="position" maxlength="2" size="2" onchange="vaisTempsDeplacement(document.getElementById('end_galaxie').value, document.getElementById('end_ss').value, document.getElementById('end_position').value);" id="end_position" value="<?php print $_SESSION['pos']; ?>"></td></tr>
<tr><td width="50%">Vitesse</td><td width="50%"><select name="speed"><option value="100">100%</option></select></td></tr>
<tr><td width="50%">Temps de d&eacute;placement</td><td width="50%" id="temps"></td></tr>
<tr><td width="50%">Consomation</td><td width="50%" id="conso"></td></tr>
<tr><td colspan="2">Mission & Contenu</td></tr>
<tr><td width="50%">Mission</td><td width="50%"><select name="mission"><option value="1">Attaquer</option><option value="2">Transporter</option><option value="0">Stationner</option></select></td></tr>
<tr><td width="50%">Mission</td><td width="50%"><select name="mission"><option value="1">Attaquer</option><option value="2">Transporter</option><option value="0">Stationner</option>
<?php
if (isset($_POST['vaisseau5']) && $_POST['vaisseau5'] > 0) print '<option value="3" selected>Recycler</option>';
if (isset($_POST['vaisseau3']) && $_POST['vaisseau3'] > 0) print '<option value="3" selected>Coloniser</option>';
?>
</select></td></tr>
<tr><td width="50%"> </td><td width="50%"> </td></tr>
<tr><td width="50%">M&eacute;tal</td><td width="50%"><input type="text" name="metal" maxlength="6" size="10"></td></tr>
<tr><td width="50%">Cristal</td><td width="50%"><input type="text" name="cristal" maxlength="6" size="10"></td></tr>
@ -119,6 +125,7 @@ if (isset($_POST['vaisseau11'])) print '<input type="hidden" name="vaisseau11" v
if (!isset($_POST['vaisseau9'])) $_POST['vaisseau9'] = 0;
if (!isset($_POST['vaisseau10'])) $_POST['vaisseau10'] = 0;
if (!isset($_POST['vaisseau11'])) $_POST['vaisseau11'] = 0;
if (!isset($_POST['vaisseau12'])) $_POST['vaisseau12'] = 0;
$vaisseau1 = $_POST['vaisseau1'];
$vaisseau2 = $_POST['vaisseau2'];
$vaisseau3 = $_POST['vaisseau3'];
@ -130,13 +137,30 @@ if (isset($_POST['vaisseau11'])) print '<input type="hidden" name="vaisseau11" v
$vaisseau9 = $_POST['vaisseau9'];
$vaisseau10 = $_POST['vaisseau10'];
$vaisseau11 = $_POST['vaisseau11'];
$vaisseau12 = $_POST['vaisseau12'];
$armin = '';
if ($vaisseau1 > 0) $armin .= $vaisseau1.' ';
if ($vaisseau2 > 0) $armin .= $vaisseau2.' ';
if ($vaisseau3 > 0) $armin .= $vaisseau3.' ';
if ($vaisseau4 > 0) $armin .= $vaisseau4.' ';
if ($vaisseau5 > 0) $armin .= $vaisseau5.' ';
if ($vaisseau6 > 0) $armin .= $vaisseau6.' ';
if ($vaisseau7 > 0) $armin .= $vaisseau7.' ';
if ($vaisseau8 > 0) $armin .= $vaisseau8.' ';
if ($vaisseau9 > 0) $armin .= $vaisseau9.' ';
if ($vaisseau10 > 0) $armin .= $vaisseau10.' ';
if ($vaisseau11 > 0) $armin .= $vaisseau11.' ';
if ($vaisseau12 > 0) $armin .= $vaisseau12.' ';
// Vérification qu'il y ait suffisament de vaisseaau pour le joueur
if ($vaisseau_1 - $vaisseau1 < 0 || $vaisseau_2 - $vaisseau2 < 0 || $vaisseau_3 - $vaisseau3 < 0 || $vaisseau_4 - $vaisseau4 < 0 || $vaisseau_5 - $vaisseau5 < 0 || $vaisseau_6 - $vaisseau6 < 0 || $vaisseau_7 - $vaisseau7 < 0 || $vaisseau_8 - $vaisseau8 < 0 || $vaisseau_9 - $vaisseau9 < 0 || $vaisseau_10 - $vaisseau10 < 0 || $vaisseau_11 - $vaisseau11 < 0) { header('Location: flotte.php?err=2'); exit; }
if ($vaisseau_1 - $vaisseau1 < 0 || $vaisseau_2 - $vaisseau2 < 0 || $vaisseau_3 - $vaisseau3 < 0 || $vaisseau_4 - $vaisseau4 < 0 || $vaisseau_5 - $vaisseau5 < 0 || $vaisseau_6 - $vaisseau6 < 0 || $vaisseau_7 - $vaisseau7 < 0 || $vaisseau_8 - $vaisseau8 < 0 || $vaisseau_9 - $vaisseau9 < 0 || $vaisseau_10 - $vaisseau10 < 0 || $vaisseau_11 - $vaisseau11 < 0 || $vaisseau_12 - $vaisseau12 < 0) { header('Location: flotte.php?err=2'); exit; }
$nbvais = $vaisseau1 + $vaisseau2 + $vaisseau3 + $vaisseau4 + $vaisseau5 + $vaisseau6 + $vaisseau7 + $vaisseau8 + $vaisseau9 + $vaisseau10 + $vaisseau11;
$nbvais = $vaisseau1 + $vaisseau2 + $vaisseau3 + $vaisseau4 + $vaisseau5 + $vaisseau6 + $vaisseau7 + $vaisseau8 + $vaisseau9 + $vaisseau10 + $vaisseau11 + $vaisseau12;
if ($nbvais == 0) { header('Location: flotte.php?err=5'); exit; }
$nomFlotte = $_POST['nom'];
if (empty($nomFlotte)) { header('Location: flotte.php?err=6'); exit; }
$Cgalaxie = $_POST['galaxie'];
$Css = $_POST['ss'];
$Cposition = $_POST['position'];
@ -150,7 +174,28 @@ if (isset($_POST['vaisseau11'])) print '<input type="hidden" name="vaisseau11" v
if (!isset($_POST['ss']) || empty($_POST['ss'])) { header('Location: flotte.php?err=1'); exit; }
if (!isset($_POST['position']) || empty($_POST['position'])) { header('Location: flotte.php?err=1'); exit; }
$timeDep = vais_tempsDeplacement($galaxy, $ss, $pos, $_POST['galaxie'],$_POST['ss'],$_POST['position'],1, 0);
//$timeDep = vais_tempsDeplacement($galaxy, $ss, $pos, $_POST['galaxie'],$_POST['ss'],$_POST['position'],min(split(' ', trim())), 0);
$AvaisType = ''; $AvaisVitesseC = ''; $AvaisVitesseL = ''; $AvaisPrepC = ''; $AvaisChauffe = ''; $AvaisContenu = 0;
for ($i=0 ; $i<=12 ; $i++) {
for ($j = 1; $j <= ${'vaisseau'.$i}; $j++) {
$AvaisType .= ($i).' ';
$AvaisVitesseC .= $nomvais_dc[$i].' ';
$AvaisVitesseL .= $nomvais_dl[$i].' ';
$AvaisContenu .= $nomvais_rs[$i].' ';
$AvaisPrepC .= $nomvais_pdc[$i].' ';
$AvaisPrepL .= $nomvais_pdl[$i].' ';
$AvaisChauffe .= $nomvais_cdl[$i].' ';
}
}
$AvaisType = split(' ', trim($AvaisType)); $AvaisVitesseC = split(' ', trim($AvaisVitesseC)); $AvaisVitesseL = split(' ', trim($AvaisVitesseL)); $AvaisContenu = split(' ', trim($AvaisContenu)); $AvaisPrepC = split(' ', trim($AvaisPrepC)); $AvaisPrepL = split(' ', trim($AvaisPrepL)); $AvaisChauffe = split(' ', trim($AvaisChauffe));
if(min($AvaisVitesseC) != 0) {
$timeDep = vais_tempsDeplacement($galaxy, $ss, $pos, $_POST['galaxie'],$_POST['ss'],$_POST['position'],min($AvaisVitesseC),1,max($AvaisPrepC),0);
}
elseif(min($AvaisVitesseL) != 0) {
$timeDep = vais_tempsDeplacement($galaxy, $ss, $pos, $_POST['galaxie'],$_POST['ss'],$_POST['position'],min($AvaisVitesseL),1,max($AvaisPrepL),$AvaisChauffe);
}
else header('Location: flotte.php?err=7');
$metal -= $Cmetal;
$cristal -= $Ccristal;
$hydrogene -= vais_conso($timeDep) + $Chydrogene;
@ -159,7 +204,7 @@ if (isset($_POST['vaisseau11'])) print '<input type="hidden" name="vaisseau11" v
if ($hydrogene < 0) { header('Location: flotte.php?err=3'); exit; }
if ($cristal < 0 || $metal < 0) { header('Location: flotte.php?err=4'); exit; }
mysql_query("INSERT INTO `flottes` VALUES ('','$id','$mission','$start_time','$galaxy','$ss','$pos','$end_time','$Cgalaxie','$Css','$Cposition','1','$Cmetal','$Ccristal','$Chydrogene','$nbvais','$vaisseau1','$vaisseau2','$vaisseau3','$vaisseau4','$vaisseau5','$vaisseau6','$vaisseau7','$vaisseau8','$vaisseau9','$vaisseau10','$vaisseau11','$nomFlotte');");
mysql_query("INSERT INTO `flottes` VALUES ('','$id','$mission','0','$start_time','$galaxy','$ss','$pos','$end_time','$Cgalaxie','$Css','$Cposition','1','$Cmetal','$Ccristal','$Chydrogene','$nbvais','$vaisseau1','$vaisseau2','$vaisseau3','$vaisseau4','$vaisseau5','$vaisseau6','$vaisseau7','$vaisseau8','$vaisseau9','$vaisseau10','$vaisseau11','$vaisseau12','$nomFlotte');");
$vaisseau_1 -= $vaisseau1;
$vaisseau_2 -= $vaisseau2;
@ -173,7 +218,8 @@ if (isset($_POST['vaisseau11'])) print '<input type="hidden" name="vaisseau11" v
$vaisseau_10 -= $vaisseau10;
$vaisseau_11 -= $vaisseau11;
$vaisseau_11 -= $vaisseau11;
mysql_query("UPDATE `planete` SET `vaisseau_1` = '$vaisseau_1', `vaisseau_2` = '$vaisseau_2', `vaisseau_3` = '$vaisseau_3', `vaisseau_4` = '$vaisseau_4', `vaisseau_5` = '$vaisseau_5', `vaisseau_6` = '$vaisseau_6', `vaisseau_7` = '$vaisseau_7', `vaisseau_8` = '$vaisseau_8', `vaisseau_9` = '$vaisseau_9', `vaisseau_10` = '$vaisseau_10', `vaisseau_11` = '$vaisseau_11', `metal` = '$metal', `cristal` = '$cristal', `hydrogene` = '$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'") or die ("erreur sql ".mysql_error());
$vaisseau_12 -= $vaisseau12;
mysql_query("UPDATE `planete` SET `vaisseau_1` = '$vaisseau_1', `vaisseau_2` = '$vaisseau_2', `vaisseau_3` = '$vaisseau_3', `vaisseau_4` = '$vaisseau_4', `vaisseau_5` = '$vaisseau_5', `vaisseau_6` = '$vaisseau_6', `vaisseau_7` = '$vaisseau_7', `vaisseau_8` = '$vaisseau_8', `vaisseau_9` = '$vaisseau_9', `vaisseau_10` = '$vaisseau_10', `vaisseau_11` = '$vaisseau_11', `vaisseau_12` = '$vaisseau_12', `metal` = '$metal', `cristal` = '$cristal', `hydrogene` = '$hydrogene' WHERE id_user='$id' AND galaxie='$galaxy' AND ss='$ss' AND position='$pos'") or die ("erreur sql ".mysql_error());
header('Location: flotte.php?err=ok');
}
else header('Location: flotte.php');

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>

View file

@ -1,22 +1,7 @@
<?php
session_start();
$id=$_SESSION['id'];
$galaxy=$_SESSION['galaxy'];
$ss=$_SESSION['ss'];
$pos=$_SESSION['pos'];
$race=$_SESSION['race'];
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 >
<style TYPE=text/css>
define('DESIGN', 'descriptions/diz/base.css');
define('HEAD', '<style TYPE=text/css>
TD.c {
background-color: black;
}
@ -24,27 +9,27 @@ background-color: black;
TD.d {
background-color: #000043;
}
</style>');
require('../header.php');
#img {
margin-left: 100;
padding: 10 50 10 50;
border: 0;
background-color: #000043;
}
</style>";
$id=$_SESSION['id'];
$galaxy=$_SESSION['galaxy'];
$ss=$_SESSION['ss'];
$pos=$_SESSION['pos'];
$race=$_SESSION['race'];
include 'bdd.php';
include 'ressource.php';
require('../connectBDD.php');
$case = $cases - ($mine_m +$mine_c +$mine_h +$centrale_s +$centrale_f +$radar+$labo+$chantier_terrestre +$chantier_spatial+$caserne+$silo );
$diametre = $cases * 92;
require('../connectBDD.php');
$nbr = mysql_query("SELECT COUNT(*) AS nbre FROM mail WHERE destinataire='".$pseudo."' AND vu='1'");
$nbre_non = mysql_fetch_assoc($nbr);
$nbra = mysql_query("SELECT COUNT(*) AS nbre FROM mail WHERE destinataire='$pseudo' AND vu='1'");
$nbre_non = mysql_fetch_assoc($nbra);
$nbr = mysql_query("SELECT * FROM mail WHERE `destinataire` = '$pseudo' AND vu='1'");
$ee = mysql_query("SELECT pseudo, points, place_points FROM user WHERE id='".$id."'");
$ee = mysql_query("SELECT pseudo, points, place_points FROM user WHERE id='$id'");
$data = mysql_fetch_array($ee);
function convert_ts_fr($tstamp) { echo date('H:i:s d/m/Y', $tstamp); }
@ -52,21 +37,20 @@ function convert_ts_fr($tstamp) { echo date('H:i:s d/m/Y', $tstamp); }
echo"</head>
<body>
<table width=500 align=center>
<body>";
print "<table width=500 align=center>
<tr><td colspan=2 align=left class=c>Evènements</td></tr>
<tr><td witdh=50 class=d>Heure du serveur</td>
<td>"; convert_ts_fr(time()); echo"</td></tr>";
if ($nbre_non['nbre'] == 1) { echo "<tr><td colspan=2><a href=lire_message.php>Vous avez 1 nouveau message</a></td></tr>"; }
else if ($nbre_non['nbre'] > 1) {echo "<tr><td colspan=2><a href=lire_message.php>Vous avez ".$nbre_non['nbre']." nouveaux messages</a></td></tr>"; }
if (mysql_num_rows($nbr)== 1) echo "<tr><td colspan=2><a href=lire_message.php>Vous avez 1 nouveau message</a></td></tr>";
elseif (mysql_num_rows($nbr) > 1) {echo "<tr><td colspan=2><a href=lire_message.php>Vous avez ".mysql_num_rows($nbr)." nouveaux messages</a></td></tr>"; }
echo "<tr><td colspan=2 align=left class=c><a href=rename.php>".$nom_planete."</a> (".$data['pseudo'].")</td></tr>
<tr><td align=center colspan=2 height=220><div id=img><img src='descriptions/diz/planete/".$image.".jpg' height=200 width=200></div></td></tr>
<tr><td align=center colspan=2 height=220><img src='descriptions/diz/planete/".$image.".jpg' height=200 width=200></td></tr>
<tr><td witdh=50 class=d>Diamètre</td>
<td>".$diametre." km ( ".$case." / ".$cases." cases )</td></tr>

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 101 KiB

View file

@ -0,0 +1,215 @@
body
{
color: #7093DB;
background-color: #040e1e;
background-image: url('fondf.jpg');
background-attachment: fixed;
background-repeat: no-repeat;
background-position: top left;
scrollbar-arrow-color: #E6EBFB;
scrollbar-base-color: #344566;
scrollbar-track-color: #344566;
scrollbar-face-color: #344566;
scrollbar-highlight-color: #344566;
scrollbar-3dlight-color: #465673;
scrollbar-darkshadow-color: #344566;
scrollbar-shadow-color: #465673;
font-size: 13px;
font-family: Tahoma,sans-serif;
margin-left: 68px;
margin-bottom: 20px;
}
u {
font-style: underline;
}
i {
font-style: italic;
}
a {
color: #4080ff;
font-size: 12px;
font-family: verdana, serif;
text-decoration: underline;
border: none;
}
img {
border: 0;
}
a:hover {
cursor: pointer;
}
a:active, a:focus {
cursor: wait;
}
a:visited {
cursor: pointer;
}
.zone_texte {
background-color: #000031;
color: #4080ff;
border: 1px solid #1256C6;
font-family: verdana, serif;
}
.bouton {
background-color: navy;
color: #afbdff;
font-family: verdana, serif;
BORDER-LEFT-COLOR: white;
BORDER-BOTTOM-COLOR: navy;
BORDER-TOP-COLOR: white;
BACKGROUND-COLOR: navy;
BORDER-RIGHT-COLOR: navy;
BORDER-STYLE: outset;
}
.bouton:hover {
color: red;
}
.bouton:active {
BORDER-STYLE: inset;
color: red;
}
div {
border: 1px solid #004080;
float: left;
margin: 1 1 1 1;
}
div.a {
height: 132;
width: 130;
}
div.b {
height: 132;
width: 400;
text-align: justify;
background-image: url(fond/apb.jpg);
}
div.c {
height: 132;
width: 149;
text-align: center;
background-image: url(fond/apc.jpg);
}
div.d {
background-color: #00024A;
border: 1px solid #02058A;
margin-bottom: 20;
margin-left: 450;
}
div.fin {
height: 20;
width: 339;
text-align: center;
background-image: url(fond/apfin.jpg);
}
div.long {
font-weight: bold;
color: #ff8040;
width: 550;
text-align: center;
margin-left: 90px;
}
div.ensemble {
width: 550;
height: 300;
margin-left: 90px;
}
div.e {
height: 280;
width: 125;
text-align: justify;
background-color: #000151;
border: 0;
border-right: 1px solid #004080;
float: left;
margin: 0;
margin-right: 8px;
padding: 15 10 5 10;
}
#axion {
color: white;
font-weight: bold;
border: 0;
background-color: transparent;
margin-top: 50px;
}
span.description {
font-size: 12px;
font-style: italic;
}
br.a {
clear: both;
}
span.rc {
font-size: 13px;
font-family: Tahoma,sans-serif;
font-weight: bold;
color: #ffc080;
}
table {
border-collapse: separate;
empty-cells: show;
text-align: center;
border: 0px;
font-size: 12px;
vertical-align: middle;
}
table#ressource {
margin-bottom: 35px;
}
TD {
background-color: #00024A;
border: 1px solid #02058A;
}
TD.a {
background-color: #000151;
border: 1px solid #040e1e;
width: 210px;
}
TD.b {
background-color: #000151;
border: 1px solid #040e1e;
width: 150px;
}
TD.xyz {
background-color: #000151;
border: 1px solid #000170;
}
/*attaque {
color: #CC0000;
}
filter: alpha(opacity=10);
-moz-opacity: 0.9; */

View file

@ -2,10 +2,10 @@ body
{
color: #7093DB;
background-color: #040e1e;
background-image: url(.jpg);
background-image: url('fondf.jpg');
background-attachment: fixed;
background-repeat: no-repeat;
background-position: top right;
background-position: top left;
scrollbar-arrow-color: #E6EBFB;
scrollbar-base-color: #344566;
scrollbar-track-color: #344566;
@ -17,6 +17,7 @@ scrollbar-shadow-color: #465673;
font-size: 13px;
font-family: Tahoma,sans-serif;
margin-left: 68px;
margin-bottom: 20px;
}
u {
@ -28,7 +29,7 @@ font-style: italic;
}
a {
color: #4080ff;
color: #4080ff;
font-size: 12px;
font-family: verdana, serif;
text-decoration: underline;
@ -62,11 +63,11 @@ font-family: verdana, serif;
background-color: navy;
color: #afbdff;
font-family: verdana, serif;
BORDER-LEFT-COLOR: white;
BORDER-BOTTOM-COLOR: navy;
BORDER-TOP-COLOR: white;
BACKGROUND-COLOR: navy;
BORDER-RIGHT-COLOR: navy;
BORDER-LEFT-COLOR: white;
BORDER-BOTTOM-COLOR: navy;
BORDER-TOP-COLOR: white;
BACKGROUND-COLOR: navy;
BORDER-RIGHT-COLOR: navy;
BORDER-STYLE: outset;
}
@ -85,20 +86,27 @@ float: left;
margin: 1 1 1 1;
}
div.centre {
border: none;
float: none;
margin: auto;
text-align: center;
}
div.a {
height: 125;
width: 125;
height: 132;
width: 130;
}
div.b {
height: 125;
height: 132;
width: 400;
text-align: justify;
background-image: url(fond/apb.jpg);
}
div.c {
height: 125;
height: 132;
width: 149;
text-align: center;
background-image: url(fond/apc.jpg);
@ -153,6 +161,12 @@ background-color: transparent;
margin-top: 50px;
}
.description {
width: 99%;
font-style: italic;
border: none;
}
br.a {
clear: both;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

View file

@ -1,61 +0,0 @@
body
{
background-color: #040e1e;
background-image: url(.jpg);
background-attachment: fixed;
background-repeat: no-repeat;
background-position: top right;
scrollbar-arrow-color: #E6EBFB;
scrollbar-base-color: #344566;
scrollbar-track-color: #344566;
scrollbar-face-color: #344566;
scrollbar-highlight-color: #344566;
scrollbar-3dlight-color: #465673;
scrollbar-darkshadow-color: #344566;
scrollbar-shadow-color: #465673;
margin-left: 12;
margin-top: 20;
}
a {
color: #0096ff;
font-size: 13px;
font-family: Tahoma,sans-serif;
text-decoration: none;
border: none;
}
a:hover {
cursor: pointer;
}
a:active, a:focus {
cursor: wait;
}
a:visited {
cursor: pointer;
}
.link {
font-size: 10px;
}
div {
margin: 1 1 1 1;
width: 150px;
text-align: center;
border:1px #415680 solid;
background-image: url(fond/apmenu.jpg);
}
.blanc {
height: 27;
}
#datetime {
color: #4080ff;
font-family: Tahoma,sans-serif;
font-size: 15px;
margin-bottom: 5px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View file

@ -23,8 +23,8 @@ if (isset($_POST)) {
<br><br><br><br>
<TABLE align=center>
<? if ($_GET['ok'] == 1) { echo "<tr><td colspan=2><font color=lime>Message envoyé</font></td></tr>"; } ?>
<tr><td>Nom du destinataire</td><td><input type="text" class="zone_texte" size="40" maxlength="20" name="message_destinataire" <? echo "value=".$p;?> ></td></tr>
<tr><td>Sujet</td><td><input type="text" class="zone_texte" size="40" maxlength="20" name="sujet_message"></td></tr>
<tr><td>Nom du destinataire</td><td><input type="text" class="zone_texte" size="44" maxlength="20" name="message_destinataire" <? echo "value=".$p;?> ></td></tr>
<tr><td>Sujet</td><td><input type="text" class="zone_texte" size="44" maxlength="20" name="sujet_message"></td></tr>
<tr><td>Texte</td><td><textarea cols="30" rows="10" name="message" class="zone_texte"></textarea></td></tr>
<tr><td colspan="2"><input type="submit" value="Envoyer" class="bouton"></td></tr>
</TABLE>

View file

@ -9,7 +9,7 @@ function maxvaisseau(id) {
}
function maxvaisseaux() {
var id;
for (i=1; i < 12; i++) {
for (i=1; i <= 12; i++) {
id = "vaisseau"+i;
maxvaisseau(id);
}
@ -22,7 +22,7 @@ function aucunvaisseau(id) {
}
function aucunvaisseaux (){
var id;
for (i=1; i<12; i++) {
for (i = 1; i <= 12; i++) {
id = "vaisseau"+i;
aucunvaisseau(id);
}
@ -35,6 +35,8 @@ $id=$_SESSION['id'];
$galaxy=$_SESSION['galaxy'];
$ss=$_SESSION['ss'];
$pos=$_SESSION['pos'];
require_once('flotte_dep.php');
require_once('noms.php');
require_once('bdd.php');
require_once('ressource.php');
@ -56,13 +58,18 @@ if (isset($_GET['err'])) {
elseif ($_GET['err'] == 2) print '<table align="center"><tr><td><font color="#FF0000"><b>Vous n\'avez pas assez de vaisseaux.</b></font></td></tr></table><br>';
elseif ($_GET['err'] == 3) print '<table align="center"><tr><td><font color="#FF0000"><b>Vous n\'avez pas suffisament d\'hydrogène pour envoyer cette flotte.</b></font></td></tr></table><br>';
elseif ($_GET['err'] == 4) print '<table align="center"><tr><td><font color="#FF0000"><b>Vous n\'avez pas suffisament de ressources dans vos réserve pour les transporter.</b></font></td></tr></table><br>';
elseif ($_GET['err'] == 5) print '<table align="center"><tr><td><font color="#FF0000"><b>Vous devez au moins sélectionner un vaisseaux pour former une flotte</b></font></td></tr></table><br>';
elseif ($_GET['err'] == 6) print '<table align="center"><tr><td><font color="#FF0000"><b>Vous n\'avez pas nommé votre flotte</b></font></td></tr></table><br>';
elseif ($_GET['err'] == 7) print '<table align="center"><tr><td><font color="#FF0000"><b>Vous ne pouvez pas envoyer vous vaisseaux par ici dans la version béta ;)</b></font></td></tr></table><br>';
}
$req = mysql_query("SELECT * FROM flottes WHERE `id_user` = '$id'");
print '<table align="center"><tr><td colspan="7"><b>Flottes en action</b></td></tr><tr><td>Nom</td><td>Mission</td><td>Nb. vaisseaux</td><td>Destination</td><td>Heure d\'arrivée</td><td>Retour</td><td>Heure de retour</td></tr>';
while ($resultat = mysql_fetch_array($req)) {
print '<tr><td>'.$resultat['nom'].'</td><td>'.txtmission($resultat['mission']).'</td><td>'.$resultat['nb_vais'].'</td><td>'.$resultat['end_galaxie'].':'.$resultat['end_ss'].':'.$resultat['end_position'].'</td><td>'.date('d/m H:i:s',$resultat['start_time']+$resultat['end_time']).'</td><td>'.$resultat['start_galaxie'].':'.$resultat['start_ss'].':'.$resultat['start_position'].'</td><td>'.date('d/m H:i:s',$resultat['start_time']+2*$resultat['end_time']).'</td></tr>';
if (mysql_num_rows($req) > 0) {
print '<table align="center"><tr><td colspan="7"><b>Flottes en action</b></td></tr><tr><td>Nom</td><td>Mission</td><td>Nb. vaisseaux</td><td>Destination</td><td>Heure d\'arrivée</td><td>Retour</td><td>Heure de retour</td></tr>';
while ($resultat = mysql_fetch_array($req)) {
print '<tr><td><a href="flotte_detail.php?ref='.$resultat['id'].'">'.$resultat['nom'].'</a></td><td>'.txtmission($resultat['mission']).'</td><td>'.$resultat['nb_vais'].'</td><td>'.$resultat['end_galaxie'].':'.$resultat['end_ss'].':'.$resultat['end_position'].'</td><td>'.date('d/m H:i:s',$resultat['start_time']+$resultat['end_time']).'</td><td>'.$resultat['start_galaxie'].':'.$resultat['start_ss'].':'.$resultat['start_position'].'</td><td>'.date('d/m H:i:s',$resultat['start_time']+2*$resultat['end_time']).'</td></tr>';
}
print '</table><br>';
}
print '</table><br>';
?>
<form method="post" action="creerflotte.php">
<input type="hidden" name="action" value="avt">
@ -84,68 +91,74 @@ if($vaisseau_2 > 0) { ?>
<input type="text" class="zone_texte" size="8" maxlength="10" name="vaisseau2" /></td>
</tr><?php }
if($vaisseau_3 > 0) { ?>
<tr><td>Vaisseaux de colonisation de classe Odyssey</td>
<tr><td><?php print $nomvaisa[2]; ?></td>
<td><?php echo $vaisseau_3; ?></a></td>
<td width="70" ><a href="javascript:maxvaisseau('vaisseau3');">max</a></td>
<td><input name="maxvaisseau3" value="<?php echo $vaisseau_3; ?>" type="hidden">
<input type="text" class="zone_texte" size="8" maxlength="10" name="vaisseau3" /></td>
</tr><?php }
if($vaisseau_4 > 0) { ?>
<tr><td>Drones despionnage de classe Clarion</td>
<tr><td><?php print $nomvaisa[3]; ?></td>
<td><?php echo $vaisseau_4; ?></a></td>
<td width="70" ><a href="javascript:maxvaisseau('vaisseau4');">max</a></td>
<td><input name="maxvaisseau4" value="<? echo $vaisseau_4; ?>" type="hidden">
<input type="text" class="zone_texte" size="8" maxlength="10" name="vaisseau4" /></td>
</tr><?php }
if($vaisseau_5 > 0) { ?>
<tr><td>Recycleurs de classe Minotaur </td>
<tr><td><?php print $nomvaisa[4]; ?></td>
<td><?php echo $vaisseau_5; ?></a></td>
<td width="70" ><a href="javascript:maxvaisseau('vaisseau5');">max</a></td>
<td><input name="maxvaisseau5" value="<? echo $vaisseau_5; ?>" type="hidden">
<input type="text" class="zone_texte" size="8" maxlength="10" name="vaisseau5" /></td>
</tr><?php }
if($vaisseau_6 > 0) { ?>
<tr><td>C709 Longsword Interceptor</td>
<tr><td><?php print $nomvaisa[5]; ?></td>
<td><?php echo $vaisseau_6; ?></a></td>
<td width="70" ><a href="javascript:maxvaisseau('vaisseau6');">max</a></td>
<td><input name="maxvaisseau6" value="<?php echo $vaisseau_6; ?>" type="hidden">
<input type="text" class="zone_texte" size="8" maxlength="10" name="vaisseau6" /></td>
</tr><?php }
if($vaisseau_7 > 0) { ?>
<tr><td>Frégate</td>
<td><?php echo $vaisseau_7; ?></a></td>
<tr><td><?php print $nomvaisa[6]; ?></td>
<td><?php print $vaisseau_7; ?></a></td>
<td width="70" ><a href="javascript:maxvaisseau('vaisseau7');">max</a></td>
<td><input name="maxvaisseau7" value="<?php echo $vaisseau_7; ?>" type="hidden">
<input type="text" class="zone_texte" size="8" maxlength="10" name="vaisseau7" /></td>
</tr><?php }
if($vaisseau_8 > 0) { ?>
<tr><td>Croiseurs de classe Halcyon</td>
<tr><td><?php print $nomvaisa[7]; ?></td>
<td><?php echo $vaisseau_8; ?></a></td>
<td width="70" ><a href="javascript:maxvaisseau('vaisseau8');">max</a></td>
<td><input name="maxvaisseau8" value="<?php echo $vaisseau_8; ?>" type="hidden">
<input type="text" class="zone_texte" size="8" maxlength="10" name="vaisseau8" /></td>
</tr><?php }
if($vaisseau_9 > 0){ ?>
<tr><td>Croiseurs de classe Marathon</td>
<tr><td><?php print $nomvaisa[8]; ?></td>
<td><?php echo $vaisseau_9; ?></a></td>
<td width="70" ><a href="javascript:maxvaisseau('vaisseau9');">max</a></td>
<td><input name="maxvaisseau9" value="<?php echo $vaisseau_9; ?>" type="hidden">
<input type="text" class="zone_texte" size="8" maxlength="10" name="vaisseau9" /></td>
</tr><?php }
if($vaisseau_10 > 0){ ?>
<tr><td>Portes vaisseaux</td>
<tr><td><?php print $nomvaisa[9]; ?></td>
<td><?php echo $vaisseau_10; ?></a></td>
<td width="70" ><a href="javascript:maxvaisseau('vaisseau10');">max</a></td>
<td><input name="maxvaisseau10" value="<?php echo $vaisseau_10; ?>" type="hidden">
<input type="text" class="zone_texte" size="8" maxlength="10" name="vaisseau10" /></td>
</tr><?php }
if($vaisseau_11 > 0){ ?>
<tr><td>Stations orbitales</td>
<tr><td><?php print $nomvaisa[10]; ?></td>
<td><?php echo $vaisseau_11; ?></a></td>
<td width="70" ></td>
<td></td>
</tr><?php }
if($vaisseau_12 > 0){ ?>
<tr><td><?php print $nomvaisa[11]; ?></td>
<td><?php echo $vaisseau_12; ?></a></td>
<td width="70" ><a href="javascript:maxvaisseau('vaisseau12');">max</a></td>
<td><input name="maxvaisseau12" value="<?php echo $vaisseau_12; ?>" type="hidden">
<input type="text" class="zone_texte" size="8" maxlength="10" name="vaisseau12" /></td>
</tr><?php } ?>
<tr><td colspan="2"><a href="javascript:maxvaisseaux();">Tous les vaisseaux</a></td><td colspan="2">
<a href="javascript:aucunvaisseaux();">Aucun vaisseau</a></TD></TR>
<tr><td colspan="4"><?php if ($nbr < ($trez)) echo '<input type="submit" value="Envoyer" class="bouton">'; else echo 'Nombre de flotte total atteint'; ?></td></tr>

156
pages/flotte_dep.php Normal file
View file

@ -0,0 +1,156 @@
<?php
session_start();
$id=$_SESSION['id'];
$galaxy=$_SESSION['galaxy'];
$ss=$_SESSION['ss'];
$pos=$_SESSION['pos'];
/* ! ATTENTION ! NE PAS FAIRE DE REFERENCE A UNE DONNEE DU FICHIER BDD.PHP OU
* DE L'UTILISATEUR COURANT CAR LE SCRIPT EST LANCE PAR L'ATTAQUANT ET PAR
* L'ATTAQUé.
*/
require_once('noms.php');
require('../connectBDD.php');
function resteVaisseau($tableau){
for ($i = 0; $i < count($tableau); $i++) {
if (!empty($tableau[$i])) return true;
}
return false;
}
$req = mysql_query("SELECT * FROM flottes WHERE `id_user` = '$id' OR (`end_galaxie` = '$galaxy' AND `end_ss` = '$ss' AND `end_position` = '$pos')");
while ($resultat = mysql_fetch_array($req)) {
$id_flotte = $resultat['id'];
$mission = $resultat['mission'];
$end_galaxie = $resultat['end_galaxie'];
$end_ss = $resultat['end_ss'];
$end_position = $resultat['end_position'];
if ($resultat['effectue'] != 1 && time() >= $resultat['start_time'] + $resultat['end_time'] && !empty($resultat['end_time'])) {
//Mission attaquer
if ($mission == 1) {
$reqd = mysql_query("SELECT * FROM planete WHERE `galaxie` = '$end_galaxie' AND `ss` = '$end_ss' AND `position` = '$end_position'") or die ("erreur sql ".mysql_error());
$resultatd = mysql_fetch_array($reqd);
$ATvais = ''; $ENvais = ''; $ATvais_pv = ''; $ENvais_pv = '';
for ($i = 1; $i <= 12; $i++) {
for ($j = 1; $j <= $resultat['vaisseau_'.$i]; $j++) { $ATvais .= $i.' '; $ATvais_pv .= $nomvais_pv[$i].' '; }
for ($j = 1; $j <= $resultatd['vaisseau_'.$i]; $j++) { $ENvais .= $i.' '; $ENvais_pv .= $nomvais_pv[$i].' '; }
}
$ATvais = split(' ', trim($ATvais)); $ENvais = split(' ', trim($ENvais)); $ATvais_pv = split(' ', trim($ATvais_pv)); $ENvais_pv = split(' ', trim($ENvais_pv));
while(resteVaisseau($ENvais) && resteVaisseau($ATvais)) {
for ($i = 0; $i < count($ATvais); $i++) {
//Définition des paramètres du vaisseau qui va attaquer
$vaisAT_id = $i;
$vaisAT_type = $ATvais[$vaisAT_id];
$vaisAT_pv = $ATvais_pv[$vaisAT_id];
$vaisAT_bc = $nomvais_bc[$vaisAT_type];
$vaisAT_at = $nomvais_at[$vaisAT_type];
while($vaisAT_at > 0 && resteVaisseau($ENvais) && $vaisAT_pv > 0) {
$vaisEN_id = rand(0,count($ENvais)-1); //Sélection du vaisseau qui va être attaqué
$vaisEN_type = $ENvais[$vaisEN_id];
$vaisEN_pv = $ENvais_pv[$vaisEN_id];
$vaisEN_bc = $nomvais_bc[$vaisEN_type];
$vaisAT_rf = $nomvais_rf[$vaisAT_type][$vaisEN_type]; //Recherche du rapide fire pour le vaisseau attaqué
if ($vaisEN_pv + $vaisEN_bc <= $vaisAT_at) {
$ENvais[$vaisEN_id] = '';
$ENvais_pv[$vaisEN_id] = 0;
$vaisAT_at -= $vaisEN_pv + $vaisEN_bc;
}
else {
$ENvais_pv[$vaisEN_id] -= $vaisAT_at - $vaisEN_bc;
$vaisAT_at -= $vaisEN_pv + $vaisEN_bc;
}
}
}
for ($i = 0; $i < count($ENvais); $i++) {
//Définition des paramètres du vaisseau qui va attaquer
$vaisEN_id = $i;
$vaisEN_type = $ENvais[$vaisEN_id];
$vaisEN_pv = $ENvais_pv[$vaisEN_id];
$vaisEN_bc = $nomvais_bc[$vaisEN_type];
$vaisEN_at = $nomvais_at[$vaisEN_type];
while($vaisEN_at > 0 && resteVaisseau($ATvais) && $vaisEN_pv > 0) {
$vaisAT_id = rand(0,count($ATvais)-1); //Sélection du vaisseau qui va être attaqué
$vaisAT_type = $ATvais[$vaisAT_id];
$vaisAT_pv = $ATvais_pv[$vaisAT_id];
$vaisAT_bc = $nomvais_bc[$vaisAT_type];
$vaisEN_rf = $nomvais_rf[$vaisEN_type][$vaisAT_type]; //Recherche du rapide fire pour le vaisseau attaqué
if ($vaisAT_pv + $vaisAT_bc <= $vaisEN_at) {
$ATvais[$vaisAT_id] = '';
$ATvais_pv[$vaisAT_id] = 0;
$vaisEN_at -= $vaisAT_pv + $vaisAT_bc;
}
else {
$ATvais_pv[$vaisAT_id] -= $vaisEN_at - $vaisAT_bc;
$vaisEN_at -= $vaisAT_pv + $vaisAT_bc;
}
}
}
}
$ATvaisseaux = array_count_values($ATvais);
$ATvaisseau_1 = $ATvaisseaux['1']; $ATvaisseau_2 = $ATvaisseaux['2']; $ATvaisseau_3 = $ATvaisseaux['3']; $ATvaisseau_4 = $ATvaisseaux['4']; $ATvaisseau_5 = $ATvaisseaux['5']; $ATvaisseau_6 = $ATvaisseaux['6']; $ATvaisseau_7 = $ATvaisseaux['7']; $ATvaisseau_8 = $ATvaisseaux['8']; $ATvaisseau_9 = $ATvaisseaux['9']; $ATvaisseau_10 = $ATvaisseaux['10']; $ATvaisseau_11 = $ATvaisseaux['11']; $ATvaisseau_12 = $ATvaisseaux['12'];
$AT_nbvais = $ATvaisseau_1 + $ATvaisseau_2 + $ATvaisseau_3 + $ATvaisseau_4 + $ATvaisseau_5 + $ATvaisseau_6 + $ATvaisseau_7 + $ATvaisseau_8 + $ATvaisseau_9 + $ATvaisseau_10 + $ATvaisseau_11 + $ATvaisseau_12;
$ENvaisseaux = array_count_values($ENvais);
$ENvaisseau_1 = $ENvaisseaux['1']; $ENvaisseau_2 = $ENvaisseaux['2']; $ENvaisseau_3 = $ENvaisseaux['3']; $ENvaisseau_4 = $ENvaisseaux['4']; $ENvaisseau_5 = $ENvaisseaux['5']; $ENvaisseau_6 = $ENvaisseaux['6']; $ENvaisseau_7 = $ENvaisseaux['7']; $ENvaisseau_8 = $ENvaisseaux['8']; $ENvaisseau_9 = $ENvaisseaux['9']; $ENvaisseau_10 = $ENvaisseaux['10']; $ENvaisseau_11 = $ENvaisseaux['11']; $ENvaisseau_12 = $ENvaisseaux['12'];
if (!resteVaisseau($ATvais)) mysql_query("DELETE FROM `flottes` WHERE `id` = '$id_flotte'") or die ("erreur sql ".mysql_error());
else {
$Cmetal = $resultat['contenu_metal'] + 2500;
$Ccristal = $resultat['contenu_cristal'] + 1250;
$Chydrogene = $resultat['contenu_hydrogene'] + 625;
mysql_query("UPDATE `flottes` SET `effectue` = '1', `contenu_metal` = '$Cmetal', `contenu_cristal` = '$Ccristal', `contenu_hydrogene` = '$Chydrogene', `nb_vais` = '$AT_nbvais', `vaisseau_1` = '$ATvaisseau_1', `vaisseau_2` = '$ATvaisseau_2', `vaisseau_3` = '$ATvaisseau_3', `vaisseau_4` = '$ATvaisseau_4', `vaisseau_5` = '$ATvaisseau_5', `vaisseau_6` = '$ATvaisseau_6', `vaisseau_7` = '$ATvaisseau_7', `vaisseau_8` = '$ATvaisseau_8', `vaisseau_9` = '$ATvaisseau_9', `vaisseau_10` = '$ATvaisseau_10', `vaisseau_11` = '$ATvaisseau_11', `vaisseau_12` = '$ATvaisseau_12' WHERE `id` = '$id_flotte'") or die ("erreur sql ".mysql_error());
}
mysql_query("UPDATE `planete` SET `vaisseau_1` = '$ENvaisseau_1', `vaisseau_2` = '$ENvaisseau_2', `vaisseau_3` = '$ENvaisseau_3', `vaisseau_4` = '$ENvaisseau_4', `vaisseau_5` = '$ENvaisseau_5', `vaisseau_6` = '$ENvaisseau_6', `vaisseau_7` = '$ENvaisseau_7', `vaisseau_8` = '$ENvaisseau_8', `vaisseau_9` = '$ENvaisseau_9', `vaisseau_10` = '$ENvaisseau_10', `vaisseau_11` = '$ENvaisseau_11', `vaisseau_12` = '$ENvaisseau_12' WHERE `galaxie` = '$end_galaxie' AND `ss` = '$end_ss' AND `position` = '$end_position'") or die ("erreur sql ".mysql_error());
}
//Mission Transporter
elseif ($mission == 2) {
$reqT = mysql_query("SELECT metal,cristal,hydrogene FROM `planete` WHERE `galaxie` = '$end_galaxie' AND `ss` = '$end_ss' AND `position` = '$end_position'") or die ("erreur sql ".mysql_error());
$resultatT = mysql_fetch_array($reqT);
$Cmetal = $resultat['contenu_metal'] + $resultatT['metal'];
$Ccristal = $resultat['contenu_cristal'] + $resultatT['cristal'];
$Chydrogene = $resultat['contenu_hydrogene'] + $resultatT['hydrogene'];
mysql_query("UPDATE `planete` SET `metal` = '$Cmetal', `cristal` = '$Ccristal', `hydrogene` = '$Chydrogene' WHERE `galaxie` = '$end_galaxie' AND `ss` = '$end_ss' AND `position` = '$end_position'") or die ("erreur sql ".mysql_error());
mysql_query("UPDATE `flottes` SET `effectue` = '1', `contenu_metal` = '0', `contenu_cristal` = '0', `contenu_hydrogene` = '0' WHERE `id` = '$id_flotte'") or die ("erreur sql ".mysql_error());
}
//Mission Coloniser
elseif ($mission == 3) {
$reqT = mysql_query("SELECT * FROM `planete` WHERE `galaxie` = '$end_galaxie' AND `ss` = '$end_ss' AND `position` = '$end_position'") or die ("erreur sql ".mysql_error());
if (!mysql_num_rows($reqT) > 0) {
$time = time();
$cases = mt_rand(125,222);
$image = mt_rand(1,15);
mysql_query("INSERT INTO planete (`id_user`, `nom_planete`, `galaxie`, `ss`, `position`, `image`, `cases`, `timestamp`, `metal`, `cristal`) VALUES ('$id', 'Planète colonisée', '$end_galaxie', '$end_ss', '$end_position', '$image', '$cases', '$time', '1000', '700')") or die ("erreur sql ".mysql_error());
mysql_query("UPDATE `flottes` SET `effectue` = '1', `vaisseau_3` = '0' WHERE `id` = '$id_flotte'") or die ("erreur sql ".mysql_error());
}
}
}
if (time() >= $resultat['start_time'] + $resultat['end_time'] * 2 && !empty($resultat['end_time']) && $resultat['mission'] != 0) {
$start_galaxie = $resultat['start_galaxie'];
$start_ss = $resultat['start_ss'];
$start_position = $resultat['start_position'];
$id_flotte = $resultat['id'];
$reqP = mysql_query("SELECT * FROM planete WHERE `id_user` = '$id' AND `galaxie` = '$start_galaxie' AND `ss` = '$start_ss' AND `position` = '$start_position'") or die ("erreur sql ".mysql_error());
$resultatP = mysql_fetch_array($reqP);
$metal = $resultat['contenu_metal'] + $resultatP['metal'];
$cristal = $resultat['contenu_cristal'] + $resultatP['cristal'];
$hydrogene = $resultat['contenu_hydrogene'] + $resultatP['hydrogene'];
for($i = 1; $i <= 12; $i++) {
${'Pvaisseaux_'.$i} = $resultatP['vaisseau_'.$i] + $resultat['vaisseau_'.$i];
mysql_query("UPDATE `planete` SET `vaisseau_$i` = '${'Pvaisseaux_'.$i}' WHERE `id_user` = '$id' AND `galaxie` = '$start_galaxie' AND `ss` = '$start_ss' AND `position` = '$start_position'");
}
mysql_query("UPDATE `planete` SET `metal` = '$metal', `cristal` = '$cristal', `hydrogene` = '$hydrogene' WHERE `id_user` = '$id' AND `galaxie` = '$start_galaxie' AND `ss` = '$start_ss' AND `position` = '$start_position'");
mysql_query("DELETE FROM `flottes` WHERE `id_user` = '$id' AND `id` = '$id_flotte'");
}
}
mysql_close();
?>

3
pages/flotte_detail.php Normal file
View file

@ -0,0 +1,3 @@
<?php
?>

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Some files were not shown because too many files have changed in this diff Show more