Version 2007-11-04
BIN
ab/0.TTF
Normal file
BIN
ab/1.TTF
Normal file
BIN
ab/2.TTF
Normal file
70
ab/ab.php
Normal file
|
@ -0,0 +1,70 @@
|
|||
<?php
|
||||
// On crée la session avant tout
|
||||
session_start();
|
||||
|
||||
// On défini la configuration :
|
||||
if(!IsSet($_GET['nbr_chiffres']) || $_GET['nbr_chiffres'] < 5) {
|
||||
$nbr_chiffres = 7; // Nombre de chiffres qui formerons le nombre par défaut
|
||||
}
|
||||
else {
|
||||
$nbr_chiffres = $_GET['nbr_chiffres']; // Si l'on met dans l'adresse un ?nbr_chiffres=X
|
||||
}
|
||||
|
||||
// Là, on défini le header de la page pour la transformer en image
|
||||
header ("Content-type: image/png");
|
||||
// Là, on crée notre image
|
||||
$_img = imagecreatefromgif('fond_verif_img.gif');
|
||||
|
||||
// On défini maintenant les couleurs
|
||||
// Couleur de fond :
|
||||
//$arriere_plan = imagecolorallocate($_img, 0, 0, 0); // Au cas où on utiliserai pas d'image de fond, on utilise cette couleur là.
|
||||
// Autres couleurs :
|
||||
$couleur = mt_rand(0, 4);
|
||||
if ($couleur == 0) $avant_plan = imagecolorallocate($_img, rand(250,225), rand(0,25), rand(0,25));
|
||||
elseif ($couleur == 1) $avant_plan = imagecolorallocate($_img, rand(0,25), rand(250,225), rand(0,25));
|
||||
// elseif ($couleur == 2) $avant_plan = imagecolorallocate($_img, rand(0,55), rand(0,55), rand(250,255));
|
||||
elseif ($couleur == 3) $avant_plan = imagecolorallocate($_img, rand(0,25), rand(250,225), rand(250,225));
|
||||
elseif ($couleur == 4) $avant_plan = imagecolorallocate($_img, rand(250,225), rand(0,25), rand(250,225));
|
||||
elseif ($couleur == 5) $avant_plan = imagecolorallocate($_img, rand(250,225), rand(250,225), rand(0,25));
|
||||
else $avant_plan = imagecolorallocate($_img, rand(200,225), rand(200,225), rand(200,225)); // Couleur des chiffres
|
||||
|
||||
$i = 0;
|
||||
while($i < $nbr_chiffres) {
|
||||
$chiffre = mt_rand(1, 18); // On génère le nombre aléatoire
|
||||
if ($chiffre == 10) $chiffre="a";
|
||||
elseif ($chiffre == 2) $chiffre="w";
|
||||
elseif ($chiffre == 11) $chiffre="t";
|
||||
elseif ($chiffre == 12) $chiffre="c";
|
||||
elseif ($chiffre == 13) $chiffre="n";
|
||||
elseif ($chiffre == 14) $chiffre="p"; // e avec l'écriture Google
|
||||
elseif ($chiffre == 15) $chiffre="f";
|
||||
elseif ($chiffre == 16) $chiffre="y";
|
||||
elseif ($chiffre == 17) $chiffre="m";
|
||||
elseif ($chiffre == 18) $chiffre="k";
|
||||
$chiffres[$i] = $chiffre;
|
||||
$i++;
|
||||
}
|
||||
$nombre = null;
|
||||
// On explore le tableau $chiffres afin d'y afficher toutes les entrées qu'y s'y trouvent
|
||||
foreach ($chiffres as $caractere) {
|
||||
$nombre .= $caractere;
|
||||
}
|
||||
|
||||
$_SESSION['aleat_nbr'] = $nombre;
|
||||
// On détruit les variables inutiles :
|
||||
unset($chiffre);
|
||||
unset($i);
|
||||
unset($caractere);
|
||||
unset($chiffres);
|
||||
|
||||
//$fontfile = mt_rand(0, 2).'.TTF';
|
||||
// Free
|
||||
//$fontfile = '/mnt/152/free.fr/b/c/www.msnparadize/util/ab/1.TTF';
|
||||
$fontfile = './2.TTF';
|
||||
|
||||
//imagestring($_img, 5, 18, 8, $nombre, $avant_plan);
|
||||
if ($fontfile == '0.TTF') ImageTTFText($_img, 18, 2, 0, 23, $avant_plan, $fontfile, strtoupper($nombre));
|
||||
else ImageTTFText($_img, 18.5, 2, rand(0,6), 23, $avant_plan, $fontfile, $nombre);
|
||||
|
||||
imagepng($_img);
|
||||
?>
|
BIN
ab/fond_verif_img.gif
Normal file
After Width: | Height: | Size: 914 B |
BIN
ab/fond_verif_img.png
Normal file
After Width: | Height: | Size: 240 B |
128
ab/sound.php
Normal file
|
@ -0,0 +1,128 @@
|
|||
<?php
|
||||
session_start();
|
||||
|
||||
class wave
|
||||
{
|
||||
public $nombre;
|
||||
public function __construct($nombre = 0)
|
||||
{
|
||||
if(!empty($nombre))
|
||||
{
|
||||
$this->nombre = $nombre.'r'.$nombre;
|
||||
$strlen = strlen($this->nombre);
|
||||
|
||||
$binary = ''; // Contiendra les donnees, juste les donnees.
|
||||
|
||||
for($i = 0; $i < $strlen; $i++)
|
||||
{
|
||||
$binary .= $this->get_datas('../'.$this->nombre{$i}.'.wav');
|
||||
}
|
||||
|
||||
$this->package($binary);
|
||||
}
|
||||
}
|
||||
|
||||
public function analyse($wav,$arg = FALSE)
|
||||
{
|
||||
if(file_exists('../'.$wav))
|
||||
{
|
||||
|
||||
$entete_unpack = 'a4file_type/Lfile_size/a4file_id/A4nom_zone1/Ltaille_zone1/SFormatTag/SChannels/LSamplesPerSec/LAvgBytesPerSec/SBlockAlign/SBitsPerSample/A4nom_data/Ltaille_data';
|
||||
|
||||
$fp = fopen('../'.$wav,'r');
|
||||
$file = fread($fp, 44 );
|
||||
|
||||
$entete = unpack($entete_unpack,$file);
|
||||
fclose($fp);
|
||||
|
||||
|
||||
if( ($entete['file_type'] !== chr(0x52).chr(0x49).chr(0x46).chr(0x46) ) OR ( $entete['file_id'] !== chr(0x57).chr(0x41).chr(0x56).chr(0x45) ) )
|
||||
{
|
||||
trigger_error('Le fichier '.$wav.' n\'est pas un fichier wav',E_USER_ERROR);
|
||||
}
|
||||
|
||||
if(!$arg)
|
||||
return $entete;
|
||||
else
|
||||
return $entete[$arg];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
trigger_error('fonction analyse, le fichier '.$wav.' est neccessaire mais manquant', E_USER_ERROR);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
private function get_datas($wav)
|
||||
{
|
||||
if(file_exists('../'.$wav))
|
||||
{
|
||||
$fp = fopen('../'.$wav,'r');
|
||||
fseek($fp, 44 );
|
||||
|
||||
$datas = fread($fp, $this->analyse($wav, 'taille_data'));
|
||||
|
||||
fclose($fp);
|
||||
|
||||
return $datas;
|
||||
}
|
||||
else
|
||||
{
|
||||
trigger_error('fonction analyse, le fichier '.$wav.' est neccessaire mais manquant', E_USER_ERROR);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
private function package($datas)
|
||||
{
|
||||
$entete_pack = 'a4La4A4LSSLLSSA4L';
|
||||
|
||||
$entete = $this->analyse('../'.$this->nombre{0}.'.wav');
|
||||
|
||||
for($i = 1;$i<strlen($this->nombre); $i ++)
|
||||
{
|
||||
$entete2 = $this->analyse('../'.$this->nombre{$i}.'.wav');
|
||||
if($entete !== $entete2)
|
||||
{
|
||||
if($entete['Channels'] !== $entete2['Channels'])
|
||||
{
|
||||
trigger_error('fonction package, un ou plusieurs fichiers wad n\'ont pas le même nombre de canaux',E_USER_ERROR);
|
||||
}
|
||||
|
||||
if($entete['BitsPerSample'] !== $entete2['BitsPerSample'])
|
||||
{
|
||||
trigger_error('fonction package, un ou plusieurs fichiers wad, n\'on pas le même nombres d\'échantillons par seconde', E_USER_ERROR);
|
||||
}
|
||||
|
||||
if($entete['SamplesPerSec'] !== $entete2['SamplesPerSec'])
|
||||
{
|
||||
trigger_error('fonction package, un ou plusieurs fichiers wad, n\'ont pas la même fréquence d\'échantillonage', E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* On calcule la taille des donnees que l'on à creer selon la formule de soundeditor */
|
||||
$entete['taille_data'] = strlen($datas);
|
||||
$entete['taille_data'] /= $entete['BlockAlign'];
|
||||
$entete['taille_data'] *= $entete['BlockAlign'];
|
||||
|
||||
$entete['file_size'] = 44 + strlen($datas);
|
||||
|
||||
/* on "pack l entete et on y ajoute les donnees */
|
||||
$binary = pack($entete_pack, $entete['file_type'],$entete['file_size'],$entete['file_id'],$entete['nom_zone1'],
|
||||
$entete['taille_zone1'],$entete['FormatTag'],$entete['Channels'],$entete['SamplesPerSec'],$entete['AvgBytesPerSec'],
|
||||
$entete['BlockAlign'],$entete['BitsPerSample'],$entete['nom_data'],$entete['taille_data']);
|
||||
$binary .= $datas;
|
||||
|
||||
/* On transmet ou enregistre */
|
||||
header('Content-type: audio/x-wav');
|
||||
header('Content-Disposition: attachment; filename="code.wav"');
|
||||
echo $binary;
|
||||
}
|
||||
}
|
||||
|
||||
$wav = new wave($_SESSION['aleat_nbr']);
|
||||
?>
|
BIN
ab/un.ttf
Normal file
BIN
ab/wave/1.WAV
Normal file
BIN
ab/wave/2.WAV
Normal file
BIN
ab/wave/3.WAV
Normal file
BIN
ab/wave/4.WAV
Normal file
BIN
ab/wave/5.wav
Normal file
BIN
ab/wave/6.WAV
Normal file
BIN
ab/wave/7.WAV
Normal file
BIN
ab/wave/8.WAV
Normal file
BIN
ab/wave/9.WAV
Normal file
BIN
ab/wave/A.WAV
Normal file
BIN
ab/wave/B.WAV
Normal file
BIN
ab/wave/C.WAV
Normal file
BIN
ab/wave/D.WAV
Normal file
BIN
ab/wave/E.WAV
Normal file
BIN
ab/wave/F.WAV
Normal file
BIN
ab/wave/G.WAV
Normal file
BIN
ab/wave/H.WAV
Normal file
BIN
ab/wave/I.WAV
Normal file
BIN
ab/wave/J.WAV
Normal file
BIN
ab/wave/K.WAV
Normal file
BIN
ab/wave/L.WAV
Normal file
BIN
ab/wave/M.WAV
Normal file
BIN
ab/wave/N.WAV
Normal file
BIN
ab/wave/O.WAV
Normal file
BIN
ab/wave/P.WAV
Normal file
BIN
ab/wave/Q.WAV
Normal file
BIN
ab/wave/R.WAV
Normal file
BIN
ab/wave/S.WAV
Normal file
BIN
ab/wave/T.WAV
Normal file
BIN
ab/wave/U.WAV
Normal file
BIN
ab/wave/V.WAV
Normal file
BIN
ab/wave/W.WAV
Normal file
BIN
ab/wave/X.WAV
Normal file
BIN
ab/wave/Y.WAV
Normal file
BIN
ab/wave/Z.WAV
Normal file
23
b_index.php
|
@ -1,13 +1,24 @@
|
|||
<?php
|
||||
session_start();
|
||||
//define('DESIGN', 'pages/design/design1.css');
|
||||
require('securitebanni.php');
|
||||
require('header.php');
|
||||
?>
|
||||
<frameset cols="180,*" frameborder="0" border="0" noresize>
|
||||
<frame src="pages/menu.php" frameborder="0" border="0" noresize>
|
||||
<frame src="pages/depart.php" name="changement" frameborder="0" border="0" noresize>
|
||||
|
||||
if(!isset($_SESSION['charg']) || $_SESSION['charg'] != 1) echo '<meta http-equiv="refresh" content="0; url=\'index.php?erreur=7\'"/>';
|
||||
elseif(!isset($_GET['v'])){
|
||||
$url=@eregi_replace($_SERVER['DOCUMENT_ROOT'],'http://'.$_SERVER['HTTP_HOST'],$_SERVER['SCRIPT_FILENAME']);
|
||||
echo '<script type="text/javascript">window.location.href="'.$url.'?v='.sha1(time()).'";</script>';
|
||||
echo '<noscript><meta http-equiv="refresh" content="0; url=\'index.php?erreur=6\'"/></noscript>';
|
||||
}
|
||||
|
||||
if(($_GET['v'] == sha1(time()) || $_GET['v'] == sha1(time() - 1) || $_GET['v'] == sha1(time() - 2) || $_GET['v'] == sha1(time() - 3) || $_GET['v'] == sha1(time() - 4) || $_GET['v'] == sha1(time() - 5) || $_GET['v'] == sha1(time() - 6) || $_GET['v'] == sha1(time() - 7) || $_GET['v'] == sha1(time() - 8) || $_GET['v'] == sha1(time() - 9) || $_GET['v'] == sha1(time() - 10)) && isset($_SESSION['charg']) && $_SESSION['charg'] == 1) echo '<frameset cols="182,*" frameborder="0" border="0" noresize>
|
||||
<frame src="pages/menu.php" frameborder="0" border="0" noresize />
|
||||
<frame src="pages/depart.php" name="changement" frameborder="0" border="0" noresize />
|
||||
</frameset>
|
||||
<body>
|
||||
<body bgcolor="#000000">
|
||||
<p> </p>
|
||||
</body>
|
||||
</html>
|
||||
</html>';
|
||||
elseif(!isset($_SESSION['charg']) || $_SESSION['charg'] != 1) echo '<meta http-equiv="refresh" content="0; url=\'index.php?erreur=7\'"/>';
|
||||
else echo '<meta http-equiv="refresh" content="0; url=\'b_index.php\'"/>';
|
||||
?>
|
||||
|
|
255
classement.php
Normal file
|
@ -0,0 +1,255 @@
|
|||
<html>
|
||||
<head>
|
||||
<link rel="stylesheet" media="screen" name="design" href="design/design.css">
|
||||
</head>
|
||||
<body>
|
||||
<?
|
||||
mysql_connect("localhost", "root", "");
|
||||
mysql_select_db("leon0");
|
||||
|
||||
|
||||
$nbr_non_vus = mysql_query("SELECT COUNT(*) AS nb FROM user");
|
||||
$nbre = mysql_fetch_assoc($nbr_non_vus);
|
||||
$idh = $nbre['nb'];
|
||||
|
||||
|
||||
for($id=0;$id<=$idh;$id++) {
|
||||
|
||||
$result = mysql_query("SELECT pseudo FROM user WHERE id='".$id."'");
|
||||
if(mysql_num_rows($result)>=1) {
|
||||
|
||||
|
||||
$retour = mysql_query("SELECT COUNT(*) AS nb1 FROM user WHERE id='".$id."'");
|
||||
$data = mysql_fetch_array($retour);
|
||||
$nb1 = $data['nb1'];
|
||||
|
||||
$points = 0;
|
||||
$flotte = 0;
|
||||
$recherches = 0;
|
||||
$terrestre = 0;
|
||||
|
||||
for ($i=0; $i<=$nb1; $i++) { // comptabiliser les bat, les def, les vaisseaux ...
|
||||
|
||||
$x = mysql_query("SELECT * FROM planete WHERE nb='".$i."' AND id_user='".$id."'");
|
||||
$donnees = mysql_fetch_array($x);
|
||||
|
||||
$pseudo = $donnees['pseudo'];
|
||||
$race = $donnees['race'];
|
||||
|
||||
$temps_b = $donnees['temps_b'];
|
||||
$bat = $donnees['bat'];
|
||||
$mine_m = $donnees['mine_m'];
|
||||
$mine_c = $donnees['mine_c'];
|
||||
$mine_h = $donnees['mine_h'];
|
||||
$centrale_s = $donnees['centrale_s'];
|
||||
$centrale_f = $donnees['centrale_f'];
|
||||
$radar = $donnees['radar'];
|
||||
$labo = $donnees['labo'];
|
||||
$chantier_terrestre = $donnees['chantier_terrestre'];
|
||||
$chantier_spatial = $donnees['chantier_spatial'];
|
||||
$caserne = $donnees['caserne'];
|
||||
$silo = $donnees['silo'];
|
||||
$centre_info = $donnees['centre_info'];
|
||||
|
||||
$vaisseau_1 = $donnees['vaisseau_1'];
|
||||
$vaisseau_2 = $donnees['vaisseau_2'];
|
||||
$vaisseau_3 = $donnees['vaisseau_3'];
|
||||
$vaisseau_4 = $donnees['vaisseau_4'];
|
||||
$vaisseau_5 = $donnees['vaisseau_5'];
|
||||
$vaisseau_6 = $donnees['vaisseau_6'];
|
||||
$vaisseau_7 = $donnees['vaisseau_7'];
|
||||
$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'];
|
||||
|
||||
$soldat1 = $donnees['soldat1'];
|
||||
$soldat2 = $donnees['soldat2'];
|
||||
$soldat3 = $donnees['soldat3'];
|
||||
$soldat4 = $donnees['soldat4'];
|
||||
$sniper = $donnees['sniper'];
|
||||
$spartam = $donnees['spartam'];
|
||||
$medecin = $donnees['medecin'];
|
||||
$ingenieur = $donnees['ingenieur'];
|
||||
$soldat_lourd = $donnees['soldat_lourd'];
|
||||
|
||||
$vais_0 = $donnees['vais_0'];
|
||||
$vais_1 = $donnees['vais_1'];
|
||||
$vais_2 = $donnees['vais_2'];
|
||||
$vais_3 = $donnees['vais_3'];
|
||||
$vais_4 = $donnees['vais_4'];
|
||||
$vcl_1 = $donnees['vcl_1'];
|
||||
$vcl_2 = $donnees['vcl_2'];
|
||||
$vcl_3 = $donnees['vcl_3'];
|
||||
$vcl_4 = $donnees['vcl_4'];
|
||||
$def_1 = $donnees['def_1'];
|
||||
$def_2 = $donnees['def_2'];
|
||||
$def_3 = $donnees['def_3'];
|
||||
$def_4 = $donnees['def_4'];
|
||||
$def_5 = $donnees['def_5'];
|
||||
|
||||
|
||||
for ($j=0;$j<=$mine_m;$j++) {
|
||||
$points += ceil(exp(0.4*$mine_m)*190)+ceil(exp(0.4*$mine_m)*90);}
|
||||
for ($j=0;$j<=$mine_c;$j++) {
|
||||
$points += ceil(exp(0.43*$mine_c)*205)+ceil(exp(0.43*$mine_c)*110);}
|
||||
for ($j=0;$j<=$mine_h;$j++) {
|
||||
$points += ceil(exp(0.445*$mine_h)*235)+ceil(exp(0.445*$mine_h)*150);}
|
||||
for ($j=0;$j<=$centrale_s;$j++) {
|
||||
$points += ceil(exp(0.442*$centrale_s)*165)+ceil(exp(0.442*$centrale_s)*99);}
|
||||
for ($j=0;$j<=$centrale_f;$j++) {
|
||||
$points += ceil(pow(1.8,$centrale_f)*300)+ceil(pow(1.82,$centrale_f)*230);}
|
||||
for ($j=0;$j<=$radar;$j++) {
|
||||
$points += ceil(pow(2,$radar)*750)+ceil(pow(2,$radar)*500)+ceil(pow(2,$radar)*50);}
|
||||
for ($j=0;$j<=$labo;$j++) {
|
||||
$points += ceil(pow(2,$labo)*200)+ceil(pow(2,$labo)*150);}
|
||||
for ($j=0;$j<=$chantier_terrestre;$j++) {
|
||||
$points += ceil(pow(2,$chantier_terrestre)*520)+ceil(pow(2,$chantier_terrestre)*380);}
|
||||
for ($j=0;$j<=$chantier_spatial;$j++) {
|
||||
$points += ceil(pow(2,$chantier_spatial)*600)+ceil(pow(2,$chantier_spatial)*450);}
|
||||
for ($j=0;$j<=$caserne;$j++) {
|
||||
$points += ceil(pow(2,$caserne)*200)+ceil(pow(2,$caserne)*100);}
|
||||
for ($j=0;$j<=$silo;$j++) {
|
||||
$points += ceil(pow(2,$silo)*400)+ceil(pow(2,$silo)*260);}
|
||||
for ($j=0;$j<=$centre_info;$j++) {
|
||||
$points += ceil(pow(1.7,$centre_info)*600)+ceil(pow(1.7,$centre_info)*420)+ceil(pow(1.7,$centre_info)*100);}
|
||||
|
||||
$points -= 7454; // sinon quand on a tous les bat au niveau 0 on a 7454 points
|
||||
|
||||
|
||||
$flotte += ($vaisseau_1*1.8)+
|
||||
($vaisseau_2*7)+
|
||||
($vaisseau_3*19)+
|
||||
($vaisseau_4*2.3)+
|
||||
($vaisseau_5*25)+
|
||||
($vaisseau_6*2.92)+
|
||||
($vaisseau_7*7.2)+
|
||||
($vaisseau_8*37.6)+
|
||||
($vaisseau_9*44)+
|
||||
($vaisseau_10*63)+
|
||||
($vaisseau_11*1150);
|
||||
|
||||
|
||||
$terrestre +=
|
||||
($soldat1*0.125)+
|
||||
($soldat2*0.2)+
|
||||
($soldat3*0.275)+
|
||||
($soldat4*0.37)+
|
||||
($sniper*0.28)+
|
||||
($spartam*35)+
|
||||
($medecin*0.2)+
|
||||
($ingenieur*0.195)+
|
||||
($soldat_lourd*0.55)+
|
||||
|
||||
($vais_0*0.8)+
|
||||
($vais_1*1.1)+
|
||||
($vais_2*1.6)+
|
||||
($vais_3*2.35)+
|
||||
($vcl_1*0.64)+
|
||||
($vcl_2*0.74)+
|
||||
($vcl_3*1.02)+
|
||||
($vcl_4*1.5)+
|
||||
($def_1*0.7)+
|
||||
($def_2*6)+
|
||||
($def_3*5.9)+
|
||||
($def_4*23)+
|
||||
($def_5*26);
|
||||
|
||||
}
|
||||
|
||||
|
||||
$retour = mysql_query("SELECT COUNT(*) AS nb2 FROM user WHERE pseudo='".$pseudo."' AND id='".$id."'");
|
||||
$donnees = mysql_fetch_array($retour);
|
||||
$nb2 = $donnees['nb2'];
|
||||
|
||||
for ($r=0; $r<=$nb2; $r++) { // pour les vaisseaux qui sont en vol mais sont compabilisés
|
||||
|
||||
$xxx = mysql_query("SELECT * FROM flottes WHERE id_user='id'");
|
||||
$d = mysql_fetch_array($xxx);
|
||||
|
||||
$vaisseau_1 = $d['vaisseau_1'];
|
||||
$vaisseau_2 = $d['vaisseau_2'];
|
||||
$vaisseau_3 = $d['vaisseau_3'];
|
||||
$vaisseau_4 = $d['vaisseau_4'];
|
||||
$vaisseau_5 = $d['vaisseau_5'];
|
||||
$vaisseau_6 = $d['vaisseau_6'];
|
||||
$vaisseau_7 = $d['vaisseau_7'];
|
||||
$vaisseau_8 = $d['vaisseau_8'];
|
||||
$vaisseau_9 = $d['vaisseau_9'];
|
||||
$vaisseau_10 = $d['vaisseau_10'];
|
||||
$vaisseau_11 = $d['vaisseau_11'];
|
||||
$vaisseau_12 = $d['vaisseau_12'];
|
||||
|
||||
$flotte += ($vaisseau_1*1.8)+
|
||||
($vaisseau_2*7)+
|
||||
($vaisseau_3*19)+
|
||||
($vaisseau_4*2.3)+
|
||||
($vaisseau_5*25)+
|
||||
($vaisseau_6*2.92)+
|
||||
($vaisseau_7*7.2)+
|
||||
($vaisseau_8*37.6)+
|
||||
($vaisseau_9*44)+
|
||||
($vaisseau_10*63)+
|
||||
($vaisseau_11*1150);
|
||||
|
||||
}
|
||||
|
||||
$z = mysql_query("SELECT * FROM user WHERE id='$id' "); // comptabilise les recherches
|
||||
$data = mysql_fetch_array($z);
|
||||
|
||||
$informatique = 0;
|
||||
$detection = 0;
|
||||
$armement = 0;
|
||||
$blindage = 0;
|
||||
$energie_t = 0;
|
||||
$reacteur = 0;
|
||||
$reacteur_f = 0;
|
||||
$reacteur_ff = 0;
|
||||
$medecine = 0;
|
||||
$tactique = 0;
|
||||
$developement = 0;
|
||||
$spartan = 0;
|
||||
|
||||
$recherches = 0;
|
||||
|
||||
for ($k=0;$k<=$informatique;$k++) {
|
||||
$recherches += ceil(pow(2,$informatique)*500)+ceil(pow(2,$informatique)*150);}
|
||||
for ($k=0;$k<=$detection;$k++) {
|
||||
$recherches += ceil(pow(2,$detection)*500)+ceil(pow(2,$detection)*750)+ceil(pow(2,$detection)*100);}
|
||||
for ($k=0;$k<=$armement;$k++) {
|
||||
$recherches += ceil(pow(2,$armement)*2500)+ceil(pow(2,$armement)*500);}
|
||||
for ($k=0;$k<=$blindage;$k++) {
|
||||
$recherches += ceil(pow(2,$blindage)*4000)+ceil(pow(2,$blindage)*1500);}
|
||||
for ($k=0;$k<=$energie_t;$k++) {
|
||||
$recherches += ceil(pow(2,$energie_t)*2000)+ceil(pow(2,$energie_t)*1500)+ceil(pow(2,$energie_t)*300);}
|
||||
for ($k=0;$k<=$reacteur;$k++) {
|
||||
$recherches += ceil(pow(2,$reacteur)*1400)+ceil(pow(2,$reacteur)*400);}
|
||||
for ($k=0;$k<=$reacteur_f ;$k++) {
|
||||
$recherches += ceil(pow(2,$reacteur_f )*3000)+ceil(pow(2,$reacteur_f )*2100)+ceil(pow(2,$reacteur_f )*750);}
|
||||
for ($k=0;$k<=$reacteur_ff;$k++) {
|
||||
$recherches += ceil(pow(2,$reacteur_ff)*5000)+ceil(pow(2,$reacteur_ff)*4000)+ceil(pow(2,$reacteur_ff)*1500);}
|
||||
for ($k=0;$k<=$medecine;$k++) {
|
||||
$recherches += ceil(pow(2,$medecine)*800)+ceil(pow(2,$medecine)*1000);}
|
||||
for ($k=0;$k<=$tactique;$k++) {
|
||||
$recherches += ceil(pow(2,$tactique)*2600)+ceil(pow(2,$tactique)*2600);}
|
||||
for ($k=0;$k<=$developement;$k++) {
|
||||
$recherches += ceil(pow(2,$developement)*10000)+ceil(pow(2,$developement)*10000)+ceil(pow(2,$developement)*5000);}
|
||||
for ($k=0;$k<=$spartan;$k++) {
|
||||
$recherches += ceil(pow(3,$spartan)*5200)+ceil(pow(3,$spartan)*4250)+ceil(pow(3,$spartan)*850);}
|
||||
|
||||
|
||||
$recherches /= 1000;
|
||||
$recherche = floor($recherches);
|
||||
$point = floor($points);
|
||||
$point += $flotte + $recherche + $terrestre;
|
||||
|
||||
|
||||
|
||||
//mysql_query("UPDATE classement SET points='".$point."', flottes='".$flottes."', recherches='".$recherches."', race='".$race."' WHERE pseudo='".$pseudo."'");
|
||||
|
||||
}
|
||||
}
|
||||
?>
|
||||
</body>
|
||||
</html>
|
168
flotte.php
Normal file
|
@ -0,0 +1,168 @@
|
|||
<?php
|
||||
session_start();
|
||||
define('DESIGN', 'descriptions/diz/base.css');
|
||||
define('HEAD', '<script language="javascript">
|
||||
function maxvaisseau(id) {
|
||||
if (document.getElementsByName(id)[0]) {
|
||||
document.getElementsByName(id)[0].value = document.getElementsByName("max" + id)[0].value;
|
||||
}
|
||||
}
|
||||
function maxvaisseaux() {
|
||||
var id;
|
||||
for (i=1; i <= 12; i++) {
|
||||
id = "vaisseau"+i;
|
||||
maxvaisseau(id);
|
||||
}
|
||||
}
|
||||
|
||||
function aucunvaisseau(id) {
|
||||
if (document.getElementsByName(id)[0]) {
|
||||
document.getElementsByName(id)[0].value = \'\';
|
||||
}
|
||||
}
|
||||
function aucunvaisseaux (){
|
||||
var id;
|
||||
for (i = 1; i <= 12; i++) {
|
||||
id = "vaisseau"+i;
|
||||
aucunvaisseau(id);
|
||||
}
|
||||
}
|
||||
</script>');
|
||||
require('../header.php');
|
||||
require('../fonctions.php');
|
||||
|
||||
$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');
|
||||
|
||||
require('../connectBDD.php');
|
||||
|
||||
$retour = mysql_query("SELECT COUNT(*) AS nbre_entrees FROM bug WHERE pseudo='$pseudo'");
|
||||
$donnees = mysql_fetch_array($retour);
|
||||
$nbr = $donnees['nbre_entrees'];
|
||||
|
||||
$trez = $informatique+1;
|
||||
?>
|
||||
<body>
|
||||
<?php
|
||||
if (isset($_GET['err'])) {
|
||||
if ($_GET['err'] == 'ok') print '<table align="center"><tr><td><font color="#00FF00"><b>Votre flotte a correctement été envoyé</b></font></td></tr></table><br>';
|
||||
elseif ($_GET['err'] == 0) print '<table align="center"><tr><td><font color="#FF0000"><b>Vous n\'avez pas assez de slots disponible pour lancer cette flotte</b></font></td></tr></table><br>';
|
||||
elseif ($_GET['err'] == 1) print '<table align="center"><tr><td><font color="#FF0000"><b>Vous ne pouvez pas envoyer une flotte sur votre planète</b></font></td></tr></table><br>';
|
||||
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'");
|
||||
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>';
|
||||
}
|
||||
?>
|
||||
<form method="post" action="creerflotte.php">
|
||||
<input type="hidden" name="action" value="avt">
|
||||
<table align="center">
|
||||
<td width="200">Vaisseaux</td><td width="150">Nombre disponible</td><td width="50">Max</td><td width="100">A envoyer<br><?php echo 'Flottes : '.$nbr.'/'.$trez.'</td></tr>'; ?>
|
||||
<?php
|
||||
if($vaisseau_1 > 0) { ?>
|
||||
<tr><td><?php print $nomvaisa[0]; ?></td>
|
||||
<td><?php echo $vaisseau_1; ?></a></td>
|
||||
<td width="70" ><a href="javascript:maxvaisseau('vaisseau1');">max</a></td>
|
||||
<td><input name="maxvaisseau1" value="<?php echo $vaisseau_1; ?>" type="hidden">
|
||||
<input type="text" class="zone_texte" size="8" maxlength="10" name="vaisseau1" /></td>
|
||||
</tr><?php }
|
||||
if($vaisseau_2 > 0) { ?>
|
||||
<tr><td><?php print $nomvaisa[1]; ?></td>
|
||||
<td><?php echo $vaisseau_2; ?></a></td>
|
||||
<td width="70" ><a href="javascript:maxvaisseau('vaisseau2');">max</a></td>
|
||||
<td><input name="maxvaisseau2" value="<?php echo $vaisseau_2; ?>" type="hidden">
|
||||
<input type="text" class="zone_texte" size="8" maxlength="10" name="vaisseau2" /></td>
|
||||
</tr><?php }
|
||||
if($vaisseau_3 > 0) { ?>
|
||||
<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><?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><?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><?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><?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><?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><?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><?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><?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>
|
||||
</table>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
156
flotte_dep.php
Normal 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
flotte_detail.php
Normal file
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
|
||||
?>
|
|
@ -1,28 +1,20 @@
|
|||
<?php
|
||||
function vais_tempsDeplacement($start_galaxie,$start_ss,$start_position,$end_galaxie,$end_ss,$end_position,$vitesse,$chauffe = 0) {
|
||||
function vais_tempsDeplacement($start_galaxie,$start_ss,$start_position,$end_galaxie,$end_ss,$end_position,$vitesse,$coefvitesse = 1,$preparation = 0,$chauffe = 0) {
|
||||
if ($end_galaxie-$start_galaxie == 0 && $end_ss-$start_ss == 0 && $end_position-$start_position == 0) $temps = 0;
|
||||
elseif ($end_galaxie-$start_galaxie == 0 && $end_ss-$start_ss == 0) $temps = 900+abs($end_position-$start_position)*300/$vitesse;
|
||||
elseif ($end_galaxie-$start_galaxie == 0) {
|
||||
if ($end_ss-$start_ss < 25) $temps = 20*60/$vitesse;
|
||||
elseif ($end_ss-$start_ss < 75) $temps = 35*60/$vitesse;
|
||||
else $temps = 50*60/$vitesse;
|
||||
}
|
||||
else {
|
||||
if ($end_galaxie-$start_galaxie < 10) $temps = 3600/$vitesse;
|
||||
elseif ($end_galaxie-$start_galaxie < 25) $temps = 4500/$vitesse;
|
||||
else $temps = 5400/$vitesse;
|
||||
}
|
||||
if ($chauffe != 0 && abs($temps) > 120) {
|
||||
if ($end_galaxie-$start_galaxie == 0 && $end_ss-$start_ss == 0) $temps += 2*1*60/$chauffe;
|
||||
elseif ($end_galaxie-$start_galaxie == 0) $temps += 2*2.5*60/$chauffe;
|
||||
else $temps += 2*5*60/$chauffe;
|
||||
}
|
||||
elseif ($end_galaxie-$start_galaxie == 0 && $end_ss-$start_ss == 0 && $chauffe == 0) $temps = $preparation+abs($end_position-$start_position)*$vitesse/12;
|
||||
elseif ($end_galaxie-$start_galaxie == 0 && $chauffe == 0) $temps = $preparation+abs($end_ss-$start_ss)*$vitesse;
|
||||
elseif ($chauffe == 0) $temps = $preparation+abs($end_ss-$start_ss)*$vitesse*300;
|
||||
elseif ($end_galaxie-$start_galaxie == 0 && $end_ss-$start_ss == 0) $temps = $preparation+abs($end_position-$start_position)*($vitesse*2)/12+$preparation;
|
||||
/*elseif ($end_galaxie-$start_galaxie == 0 && $end_ss-$start_ss <= $chauffe) $temps = abs($end_ss-$start_ss)*(($vitesse/$chauffe)*($chauffe-abs($end_ss-$start_ss))+$vitesse)+$preparation;
|
||||
elseif ($end_galaxie-$start_galaxie == 0) $temps = $vitesse*abs($end_ss-$start_ss)+$vitesse*10+$preparation;*/
|
||||
elseif ($end_galaxie-$start_galaxie == 0) $temps = (abs($end_ss-$start_ss)*(($vitesse/$chauffe)*((abs($chauffe-abs($end_ss-$start_ss))+($chauffe-abs($end_ss-$start_ss)))/2)+$vitesse))+(20-(abs($chauffe-abs($end_ss-$start_ss))+($chauffe-abs($end_ss-$start_ss)))/2)*54+$preparation;
|
||||
else $temps = (($vitesse/$chauffe)*($chauffe-abs($end_galaxie-$start_galaxie))+$vitesse)*300+108+$preparation;
|
||||
|
||||
return $temps;
|
||||
return $temps/$coefvitesse;
|
||||
}
|
||||
|
||||
function vais_conso($tempsDeplacement){
|
||||
return $tempsDeplacement/6*100;
|
||||
return $tempsDeplacement/9*100;
|
||||
}
|
||||
|
||||
function vais_tempsArrivee($start_time,$start_galaxie,$start_ss,$start_position,$end_galaxie,$end_ss,$end_position,$vitesse,$chauffe = 0){
|
||||
|
@ -50,6 +42,13 @@ function txtmission($mission){
|
|||
if ($mission == 0) return 'Stationner';
|
||||
elseif ($mission == 1) return 'Attaquer';
|
||||
elseif ($mission == 2) return 'Transporter';
|
||||
elseif ($mission == 3) return 'Coloniser';
|
||||
else return 'Erreur';
|
||||
}
|
||||
|
||||
function trouvNom($id_user){
|
||||
$req = mysql_query("SELECT pseudo FROM user WHERE `id` = '$id_user'");
|
||||
$resultat = mysql_fetch_array($req);
|
||||
return $resultat['pseudo'];
|
||||
}
|
||||
?>
|
31
header.php
|
@ -1,31 +0,0 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<title><?php
|
||||
if (defined('TITLE')) echo TITLE;
|
||||
else print 'Halo Battle';
|
||||
?></title>
|
||||
<meta http-equiv="Content-Language" content="fr">
|
||||
<meta http-equiv="Content-Script-Type" content="text/javascript">
|
||||
<meta name="Title" lang="fr" content="Bigorneaux VS Bulots">
|
||||
<meta name="Description" lang="fr" content="Jeu en php de simulation de guerre spatiale">
|
||||
<meta name="Abstract" content="Jeu en php de simulation de guerre spatiale">
|
||||
<meta name="Category" content="Jeu php">
|
||||
<meta name="Date-Creation-yyyymmdd" content="20070621">
|
||||
<meta name="Author" content="Halo Battle">
|
||||
<meta name="Distribution" content="Global">
|
||||
<meta name="Rating" content="General">
|
||||
<meta name="Robots" content="noindex, follow">
|
||||
<meta name="Revisit-After" content="10 days">
|
||||
<meta http-equiv="Cache-Control" content="no-cache">
|
||||
<meta http-equiv="Pragma" content="no-cache">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
|
||||
<?php
|
||||
if (defined('DESIGN')) echo '<link rel="stylesheet" media="screen" type="text/css" href="'.DESIGN.'">';
|
||||
?>
|
||||
|
||||
<?php
|
||||
if (defined('HEAD')) echo HEAD;
|
||||
?>
|
||||
</head>
|
BIN
images/Thumbs.db
206
index.php
|
@ -1,200 +1,44 @@
|
|||
<?php
|
||||
session_start();
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
include('template.php');
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Language" content="fr" />
|
||||
<title> ::Halo-Battle:: Bêta - Login</title>
|
||||
<style type="text/css">
|
||||
body
|
||||
{
|
||||
background-color:black;
|
||||
background-image:url(images/background.jpg);
|
||||
background-attachment: fixed ;
|
||||
background-position:center 10%;
|
||||
background-repeat: no-repeat;
|
||||
text-align: center;
|
||||
$template = new Template('./');
|
||||
$template->set_filenames(array('index' => 'templates/index.tpl'));
|
||||
|
||||
}
|
||||
|
||||
.contenu
|
||||
{
|
||||
width:790px;
|
||||
margin-top: 260px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.texte
|
||||
{
|
||||
background-color:black;
|
||||
filter:alpha(opacity=90);
|
||||
-moz-opacity:0.90;
|
||||
opacity: 0.90;
|
||||
border: 1px solid #383C51;
|
||||
float: left;
|
||||
width:450px;
|
||||
height:330px;
|
||||
padding: 5px;
|
||||
padding-top: 5%;
|
||||
text-align: center;
|
||||
color: white;
|
||||
font-family:"verdana";
|
||||
font-size: 12px;
|
||||
line-height:20px;
|
||||
}
|
||||
|
||||
.login
|
||||
{
|
||||
background-color:black;
|
||||
filter:alpha(opacity=50);
|
||||
-moz-opacity:0.50;
|
||||
opacity: 0.50;
|
||||
border: 1px solid #383C51;
|
||||
padding: 10px;
|
||||
float: right;
|
||||
width: 275px;
|
||||
height: 375px;
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
.cellulestxt
|
||||
{
|
||||
text-align: right;
|
||||
color: white;
|
||||
font-family:"verdana";
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.connexion
|
||||
{
|
||||
color: white;
|
||||
font-family:"verdana";
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
text-decoration:none;
|
||||
background: transparent;
|
||||
border: 0px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.connexion:hover
|
||||
{
|
||||
color: #519FFF;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
background: transparent;
|
||||
border: 0px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.footer
|
||||
{
|
||||
position: absolute;
|
||||
top: 690px;
|
||||
left:0px;
|
||||
width:100%;
|
||||
text-align: center;
|
||||
color: #B0B0B0;
|
||||
font-family:"verdana";
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
input.champ {
|
||||
border:1px solid #B0B0B0;
|
||||
background-color:white;
|
||||
color:#B0B0B0;
|
||||
}
|
||||
input.champ:hover {
|
||||
border:1px solid black;
|
||||
background-color:white;
|
||||
color:black;
|
||||
}
|
||||
input.champ:focus {
|
||||
border:1px solid #071831;
|
||||
background-color:#B9C0E6;
|
||||
color:black;
|
||||
}
|
||||
|
||||
.lien
|
||||
{
|
||||
color:white;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.lien:visited
|
||||
{
|
||||
color:white;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.lien:hover
|
||||
{
|
||||
color:white;
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="contenu">
|
||||
<div class="texte">
|
||||
<?php
|
||||
if (isset($_GET['erreur'])) {
|
||||
if ($_GET['erreur'] == '0') print '<b><font color="#FF0000">Nom d\'utilisateur ou mot de passe incorrect.</font><br /><br />Cliquez ici si vous avez perdu votre mot de passe.</b>';
|
||||
elseif (strtolower($_GET['erreur']) == 'b2') print '<b><font color="#FF0000">Vous n\'avez pas trouvé votre mot de passe au bout de 15 essais. Par mesure de sécurité, vous avez été banni 3 heures.</font></b>';
|
||||
elseif ($_GET['erreur'] == '2') print '<script type="text/javascript">var i = 0; function gen() { i++;
|
||||
if ($_GET['erreur'] == '0') $texte = '<b><font color="#FF0000">Nom d\'utilisateur ou mot de passe incorrect.</font><br /><br />Cliquez ici si vous avez perdu votre mot de passe.</b>';
|
||||
elseif (strtolower($_GET['erreur']) == 'b2') $texte = '<b><font color="#FF0000">Vous n\'avez pas trouvé votre mot de passe au bout de 15 essais. Par mesure de sécurité, vous avez été banni 3 heures.</font></b>';
|
||||
elseif ($_GET['erreur'] == '2') $texte = '<script type="text/javascript">var i = 0; function gen() { i++;
|
||||
//<![CDATA[
|
||||
document.getElementById(\'gen\').innerHTML=\'<img src="ab/ab.php?\'+i+\'" alt="Captcha"\\/>\';
|
||||
//]]>
|
||||
}</script><b><font color="#FF0000">Le texte situé dans l\'image ne correspond pas, réessayez.</font></b><br /><br />Vous pouvez générer une nouvelle image en <a href="javascript:gen();" class="lien">cliquant ici</a><br /><br />Si vous êtes visuellement déficient, contactez un <a href="mailto:staffhb@hotmail.fr" class="lien">administrateur</a>.';
|
||||
elseif ($_GET['erreur'] == '3') print '<b><font color="#FF0000">Veuillez vous connecter depuis le formulaire d\'identification ci-contre.</font></b>';
|
||||
elseif ($_GET['erreur'] == '1') print '<b><font color="#FF0000">Impossible de valider la session, veuillez vous reconnecter.</font></b>';
|
||||
elseif ($_GET['erreur'] == '4') print '<b><font color="#FF0000">Veuillez vous connecter depuis le formulaire d\'identification ci-contre.</font></b>';
|
||||
elseif (strtolower($_GET['erreur']) == 'b') print '<b><font color="#FF0000">Vous êtes banni du jeu. Vous ne pouvez pas vous identifier</font></b>';
|
||||
else print '<b><font color="#FF0000">Erreur !</font></b>';
|
||||
elseif ($_GET['erreur'] == '3') $texte = '<b><font color="#FF0000">Veuillez vous connecter depuis le formulaire d\'identification ci-contre.</font></b>';
|
||||
elseif ($_GET['erreur'] == '1') $texte = '<b><font color="#FF0000">Impossible de valider la session, veuillez vous reconnecter.</font></b>';
|
||||
elseif ($_GET['erreur'] == '4') $texte = '<b><font color="#FF0000">Veuillez vous connecter depuis le formulaire d\'identification ci-contre.</font></b>';
|
||||
elseif ($_GET['erreur'] == '5') $texte = '<b><font color="#FF0000">Votre session a expiré. Veuillez vous reconnecter.</font></b>';
|
||||
elseif ($_GET['erreur'] == '6') $texte = '<b><font color="#FF0000">Le JavaScript n\'est pas activé dans votre navigateur.</font><br /><br />Veuillez activer le JavaScript pour que votre connexion soit possible.<br /><a href="?erreur=aidejs" class="lien">Cliquez ici</a> pour savoir comment activer le JavaScript</b>';
|
||||
elseif ($_GET['erreur'] == 'aidejs') $texte = '<b>Section en cours de réalisation. Si vous n\'arrivez pas à activer le JavaScript, <a href="mailto:staffhb@hotmail.fr" class="lien">contactez le staff</a></b>';
|
||||
elseif ($_GET['erreur'] == '7') $texte = '<b><font color="#FF0000">Erreur lors de l\'identification</font><br /><br />Veuillez vous identifier à nouveau.<br />Si le problème perciste, <a href="mailto:staffhb@hotmail.fr" class="lien">contactez le staff</a></b>';
|
||||
elseif (strtolower($_GET['erreur']) == 'b') $texte = '<b><font color="#FF0000">Vous êtes banni du jeu. Vous ne pouvez pas vous identifier</font></b>';
|
||||
else $texte = '<b><font color="#FF0000">Erreur !</font></b>';
|
||||
}
|
||||
else print 'Bienvenue sur la page de connexion de la version Beta d'Halo-Battle,<br />
|
||||
else $texte = 'Bienvenue sur la page de connexion de la version Beta d'Halo-Battle,<br />
|
||||
La béta étant réservée à certains utilisateurs, vous ne pouvez pas encore vous inscrire pour jouer.<br />
|
||||
Si vous possèdez un code d\'activation de compte béta-testeur, <a href="inscription.php" class="lien">cliquez ici pour activer votre compte</a><br />
|
||||
Pour suivre l'avancement du projet, rendez-vous sur le <a class="lien" target="_blank" href="http://halo-battle.s-fr.com/forum/">forum</a>.<br /><br />
|
||||
<div style="text-align:left; text-indent:10%;font-weight: bold;">Staff Halo-Battle</div>';
|
||||
?>
|
||||
</div>
|
||||
|
||||
<div class="login">
|
||||
<form name="login" method="post" action="verifLogin.php">
|
||||
$login = '<form name="login" method="post" action="verifLogin.php">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="cellulestxt">:: Pseudo :: </td><td><input type="text" class="champ" name="login" /></td></tr>
|
||||
<tr><td class="cellulestxt">:: Mot de Passe :: </td><td><input type="password" class="champ" name="password" /></td></tr>
|
||||
<?php
|
||||
if (isset($_SESSION['essaimdp']) && $_SESSION['essaimdp'] >= 3 && strtolower($_GET['erreur']) != 'b') print '<tr><td class="cellulestxt" colspan="2" style="text-align: center;"><br />Veuillez recopier le texte de cette image<br /><br /><span id="gen"><img src="ab/ab.php" alt="Captcha" /></span><br /><input type="text" class="champ" name="captcha" /></td></tr>';
|
||||
?>
|
||||
<tr><td align="center" colspan="2"><br />
|
||||
<tr><td class="cellulestxt">:: Mot de Passe :: </td><td><input type="password" class="champ" name="password" /></td></tr>';
|
||||
if (isset($_SESSION['essaimdp']) && $_SESSION['essaimdp'] >= 3 && strtolower($_GET['erreur']) != 'b') $login .= '<tr><td class="cellulestxt" colspan="2" style="text-align: center;"><br />Veuillez recopier le texte de cette image<br /><br /><span id="gen"><img src="ab/ab.php" alt="Captcha" /></span><br /><input type="text" class="champ" name="captcha" /></td></tr>';
|
||||
$login .= '<tr><td align="center" colspan="2"><br />
|
||||
<input class="connexion" type="submit" value="› Connexion ‹" /></td></tr></table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
Design by Odst | Halo-Battle.com Tous Droits Réservés. Halo, Bungie et Microsoft sont des marques et logos déposés par Microsoft Corporation. Tous droits réservés Copyright © 2007-2008
|
||||
</div>
|
||||
<div id="player">
|
||||
<object id="mediaplayer" width="0" height="0" type="audio/mpeg" data="08_ost_sacred_icon_suite.mp3">
|
||||
<param name="filename" value="08_ost_sacred_icon_suite.mp3" />
|
||||
<param name="autostart" value="true" />
|
||||
<param name="repeat" value="true"/>
|
||||
</object>
|
||||
</div>
|
||||
<!-- \\******* By Phantom *******// Halo-Battle, Tous droits réservés. -->
|
||||
</body>
|
||||
</html>
|
||||
</form>';
|
||||
|
||||
$template->assign_vars(array('TITRE' => 'Login','TEXTE' => $texte,'LOGIN' => $login));
|
||||
$template->pparse('index');
|
||||
?>
|
227
inscription.php
|
@ -1,188 +1,53 @@
|
|||
<?php
|
||||
session_start();
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
||||
<meta http-equiv="Content-Language" content="fr" />
|
||||
<title> ::Halo-Battle:: Bêta - Login</title>
|
||||
<style type="text/css">
|
||||
body
|
||||
{
|
||||
background-color:black;
|
||||
background-image:url(images/background.jpg);
|
||||
background-attachment: fixed ;
|
||||
background-position:center 10%;
|
||||
background-repeat: no-repeat;
|
||||
text-align: center;
|
||||
include('template.php');
|
||||
require('connectBDD.php');
|
||||
$affichage = false;
|
||||
$textep = '<tr><td colspan="3"><br /></td></tr>';
|
||||
|
||||
$template = new Template('./');
|
||||
$template->set_filenames(array('index' => 'templates/index.tpl'));
|
||||
if (isset($_GET['err'])) {
|
||||
if ($_GET['err'] == 0) $textep = '<tr><td colspan="3"><font color="#FF0000">Veuillez remplir tous les champs de se formulaire avant de valider votre inscription</font><br /><br /></td></tr>';
|
||||
elseif ($_GET['err'] == 1) $textep = '<tr><td colspan="3"><font color="#FF0000">Code d\'activation incorrect</font><br /><br /></td></tr>';
|
||||
}
|
||||
|
||||
.contenu
|
||||
{
|
||||
width:790px;
|
||||
margin-top: 260px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
if (isset($_POST['code']) && isset($_POST['pseudo']) && isset($_POST['mail']) && isset($_POST['mdp2']) && isset($_POST['mdp']) && isset($_POST['race'])) {
|
||||
$code = strtoupper(str_replace('\'','\'\'',$_POST['code']));
|
||||
$req = mysql_query("SELECT * FROM cds_beta WHERE `code` = '$code' AND `utilise` = '0'");
|
||||
if(mysql_num_rows($req) >= 1) {
|
||||
$pseudo = str_replace('\'','\'\'',$_POST['pseudo']);
|
||||
$mail = str_replace('\'','\'\'',$_POST['mail']);
|
||||
$mdp = str_replace('\'','\'\'',$_POST['mdp']);
|
||||
$mdp2 = str_replace('\'','\'\'',$_POST['mdp2']);
|
||||
$race = str_replace('\'','\'\'',$_POST['race']);
|
||||
$code = str_replace('\'','\'\'',$_POST['code']);
|
||||
$affichage = true;
|
||||
}
|
||||
else $textep = '<tr><td colspan="3"><font color="#FF0000">Code d\'activation incorrect</font><br /><br /></td></tr>';
|
||||
}
|
||||
if ($affichage == false) {
|
||||
$texte = '<div style="text-align: center;">
|
||||
<form method="post" action="inscription_validation.php">
|
||||
<table style="margin-left: auto; margin-right: auto;">'.$textep.'</table>
|
||||
<table style="margin-left: auto; margin-right: auto;">
|
||||
<tr><td colspan="3"><b><font size="+1">Inscription</font></b><br /><br /></td></tr>
|
||||
<tr><td class="cellulestxt">Code d\'activation : </td><td class="cellulestxt"><input type="text" class="champ" onfocus="document.getElementById(\'description\').innerHTML = \'<br /><br /><b>Code d\\\'activation</b><br /><br />Entrez ici le code d\\\'activation qui vous a été fournis par un administrateur.<br />Ce code est indispensable pour vérifier que vous êtes autorisé à tester la béta.<br /><br />Si vous avez perdu votre code d\\\'activation ou s\\\'il ne vous a pas été communiqué, contactez un administrateur via le forum du jeu.\';" size="20" maxlength="15" name="code" /></td></tr>
|
||||
<tr><td class="cellulestxt">Pseudo : </td><td class="cellulestxt"><input type="text" class="champ" onfocus="document.getElementById(\'description\').innerHTML = \'<br /><br /><br /><br /><b>Pseudo</b><br /><br />Votre pseudo est le nom que vous porterez dans le jeu.<br /><br />Vous pouvez utiliser toutes les lettres, les chiffres ainsi que le caractère _\';" size="20" maxlength="15" name="pseudo" /></td></tr>
|
||||
<tr><td class="cellulestxt">Mot de passe : </td><td class="cellulestxt"><input type="password" class="champ" onfocus="document.getElementById(\'description\').innerHTML = \'<br /><br /><br /><br /><br /><b>Mot de passe</b><br /><br />Le mot de passe sert à empêcher d\\\'autres joueurs d\\\'accèder à votre compte.<br />Choisissez de préférence un mot de passe compliqué avec au minimum 6 caractères.\';" size="20" maxlength="30" name="mdp" /></td></tr>
|
||||
<tr><td class="cellulestxt">Confirmer le mot de passe : </td><td class="cellulestxt"><input type="password" class="champ" onfocus="document.getElementById(\'description\').innerHTML = \'<br /><br /><br /><br /><br /><br /><br /><br /><b>Confirmer le mot de passe</b><br /><br />Recopier le mot de passe que vous venez d\\\'écrire dans le champs précédent.\';" size="20" maxlength="30" name="mdp2" /></td></tr>
|
||||
<tr><td class="cellulestxt">Adresse mail : </td><td class="cellulestxt"><input type="text" class="champ" onfocus="document.getElementById(\'description\').innerHTML = \'<br /><br /><br /><br /><br /><br /><br /><b>Adresse électronique</b><br /><br />Afin de vous tenir informé des principales informations sur le jeu et pour valider votre compte, nous vous demandons de bien vouloir indiquer votre adresse électronique.<br /><br />Nous ne diffusion pas vos adresses et/ou informations personnelles à des sites tiers ou commerciaux.\';" size="20" maxlength="30" name="mail" /></td></tr>
|
||||
<tr><td class="cellulestxt">Race : </td><td class="cellulestxt" style="text-align: left;"><label><input type="radio" name="race" value="covenant" /> Covenant</label><br />
|
||||
<label><input type="radio" name="race" value="humain" /> Humain</label></td></tr>
|
||||
<tr><td colspan="3" class="cellulestxt"><input class="connexion" type="button" onclick="history.back();" value="Retour" />
|
||||
<input type="reset" value="Recommencer" class="connexion" />
|
||||
<input type="submit" value="› Envoyer ‹" class="connexion" />
|
||||
</td></tr></table>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">document.forms[0].elements[0].focus();</script>';
|
||||
|
||||
.texte
|
||||
{
|
||||
background-color:black;
|
||||
filter:alpha(opacity=90);
|
||||
-moz-opacity:0.90;
|
||||
opacity: 0.90;
|
||||
border: 1px solid #383C51;
|
||||
float: left;
|
||||
width:450px;
|
||||
height:330px;
|
||||
padding: 5px;
|
||||
padding-top: 5%;
|
||||
text-align: center;
|
||||
color: white;
|
||||
font-family:"verdana";
|
||||
font-size: 12px;
|
||||
line-height:20px;
|
||||
$login = '<div style="text-align: center;"><table style="margin-left: auto; margin-right: auto;"><tr><td class="cellulestxt" style="text-align: center;" id="description"><br /><br /><b>Code d\'activation</b><br /><br />Entrez ici le code d\'activation qui vous a été fournis par un administrateur.<br />Ce code est indispensable pour vérifier que vous êtes autorisé à tester la béta.<br /><br />Si vous avez perdu votre code d\'activation ou s\'il ne vous a pas été communiqué, contactez un administrateur via le forum du jeu.</td></tr></table></div>';
|
||||
}
|
||||
|
||||
.login
|
||||
{
|
||||
background-color:black;
|
||||
filter:alpha(opacity=50);
|
||||
-moz-opacity:0.50;
|
||||
opacity: 0.50;
|
||||
border: 1px solid #383C51;
|
||||
padding: 10px;
|
||||
float: right;
|
||||
width: 275px;
|
||||
height: 375px;
|
||||
margin: 1px;
|
||||
}
|
||||
|
||||
.cellulestxt
|
||||
{
|
||||
text-align: right;
|
||||
color: white;
|
||||
font-family:"verdana";
|
||||
font-weight: bold;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.connexion
|
||||
{
|
||||
color: white;
|
||||
font-family:"verdana";
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
text-decoration:none;
|
||||
background: transparent;
|
||||
border: 0px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.connexion:hover
|
||||
{
|
||||
color: #519FFF;
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
background: transparent;
|
||||
border: 0px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.footer
|
||||
{
|
||||
position: absolute;
|
||||
top: 690px;
|
||||
left:0px;
|
||||
width:100%;
|
||||
text-align: center;
|
||||
color: #B0B0B0;
|
||||
font-family:"verdana";
|
||||
font-size: 10px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
input.champ {
|
||||
border:1px solid #B0B0B0;
|
||||
background-color:white;
|
||||
color:#B0B0B0;
|
||||
}
|
||||
input.champ:hover {
|
||||
border:1px solid black;
|
||||
background-color:white;
|
||||
color:black;
|
||||
}
|
||||
input.champ:focus {
|
||||
border:1px solid #071831;
|
||||
background-color:#B9C0E6;
|
||||
color:black;
|
||||
}
|
||||
|
||||
.lien
|
||||
{
|
||||
color:white;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.lien:visited
|
||||
{
|
||||
color:white;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.lien:hover
|
||||
{
|
||||
color:white;
|
||||
font-weight: bold;
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="contenu">
|
||||
<div class="texte">
|
||||
<div style="text-align: center;">
|
||||
<table style="margin-left: auto; margin-right: auto;">
|
||||
<form method="post" action="inscription_validation.php">
|
||||
<tr><td colspan="3"><b>Inscription</b></td></tr>
|
||||
<tr><td class="cellulestxt">Code d'activation : </td><td class="cellulestxt"><input type="text" class="zone_texte" size="20" maxlength="15" name="code" /></td></tr>
|
||||
<tr><td class="cellulestxt">Pseudo : </td><td class="cellulestxt"><input type="text" class="zone_texte" size="20" maxlength="15" name="pseudo" /></td></tr>
|
||||
<tr><td class="cellulestxt">Mot de passe : </td><td class="cellulestxt"><input type="password" class="zone_texte" size="20" maxlength="30" name="mdp" /></td></tr>
|
||||
<tr><td class="cellulestxt">Confirmer le mot de passe : </td><td class="cellulestxt"><input type="password" class="zone_texte" size="20" maxlength="30" name="mdp2" /></td></tr>
|
||||
<tr><td class="cellulestxt">Adresse mail : </td><td class="cellulestxt"><input type="text" class="zone_texte" size="20" maxlength="30" name="mail" /></td></tr>
|
||||
<tr><td class="cellulestxt">Race : </td><td class="cellulestxt"><label><input type="radio" name="race" value="covenant" /> Covenant</label><br>
|
||||
<label><input type="radio" name="race" value="humain" /> Humain</label><br>
|
||||
|
||||
<tr><td colspan="3" class="cellulestxt"><input type="button" VALUE="Retour" onClick="history.back()" class="bouton">
|
||||
<input type="reset" value="Recommencer" class="bouton">
|
||||
<input type="submit" value="Envoyer" class="bouton">
|
||||
</td></tr>
|
||||
</form>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="login">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer">
|
||||
Design by Odst | Halo-Battle.com Tous Droits Réservés. Halo, Bungie et Microsoft sont des marques et logos déposés par Microsoft Corporation. Tous droits réservés Copyright © 2007-2008
|
||||
</div>
|
||||
<div id="player">
|
||||
<object id="mediaplayer" width="0" height="0" type="audio/mpeg" data="08_ost_sacred_icon_suite.mp3">
|
||||
<param name="filename" value="08_ost_sacred_icon_suite.mp3" />
|
||||
<param name="autostart" value="true" />
|
||||
<param name="repeat" value="true"/>
|
||||
</object>
|
||||
</div>
|
||||
<!-- \\******* By Phantom *******// Halo-Battle, Tous droits réservés. -->
|
||||
</body>
|
||||
</html>
|
||||
$template->assign_vars(array('TITRE' => 'Inscription','TEXTE' => $texte,'LOGIN' => $login));
|
||||
$template->pparse('index');
|
||||
?>
|
|
@ -1,46 +1,25 @@
|
|||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>Erreur !</TITLE>
|
||||
<link rel="stylesheet" media="screen" name="design" href="pages/design/design.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 >
|
||||
</HEAD>
|
||||
<BODY BGCOLOR=#0A2F59 LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
|
||||
<center>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<center>
|
||||
<?php
|
||||
//define('DESIGN', 'pages/design/design.css');
|
||||
//define('TITLE', 'Space battleship');
|
||||
//require('header.php');
|
||||
?>
|
||||
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" style="background-color: #0A2F59;">
|
||||
<div style="text-align: center;">
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<br>
|
||||
<?php
|
||||
require_once('connectBDD.php');
|
||||
if (isset($_POST['code']) && $_POST['code'] == 'new staff' && isset($_POST['pseudo']) && isset($_POST['mail']) && isset($_POST['mdp2']) && isset($_POST['mdp']) && isset($_POST['race'])) {
|
||||
if (isset($_POST['code']) && isset($_POST['pseudo']) && isset($_POST['mail']) && isset($_POST['mdp2']) && isset($_POST['mdp']) && isset($_POST['race'])) {
|
||||
$code = strtoupper(str_replace('\'','\'\'',$_POST['code']));
|
||||
$req = mysql_query("SELECT * FROM cds_beta WHERE `code` = '$code' AND `utilise` = '0'");
|
||||
if(mysql_num_rows($req) >= 1) {
|
||||
$pseudo = str_replace('\'','\'\'',$_POST['pseudo']);
|
||||
$mail = str_replace('\'','\'\'',$_POST['mail']);
|
||||
$mdp = str_replace('\'','\'\'',$_POST['mdp']);
|
||||
$mdp2 = str_replace('\'','\'\'',$_POST['mdp2']);
|
||||
$race = str_replace('\'','\'\'',$_POST['race']);
|
||||
$code = str_replace('\'','\'\'',$_POST['code']);
|
||||
mysql_query("UPDATE `cds_beta` SET `user` = '$pseudo', `utilise` = '1' WHERE `code`='$code';") or die ("erreur sql ".mysql_error());
|
||||
|
||||
$pseudo = $_POST['pseudo'];
|
||||
$mail = addslashes($_POST['mail']);
|
||||
$mdp = addslashes($_POST['mdp']);
|
||||
$mdp2 = addslashes($_POST['mdp2']);
|
||||
$race = addslashes($_POST['race']);
|
||||
$code = addslashes($_POST['code']);
|
||||
$erreurs = '<table style="width: 75%; margin-left: auto; margin-right: auto;">';
|
||||
$inscriptOk = true;
|
||||
}
|
||||
else {
|
||||
header('Location: inscription.php?err=1');
|
||||
exit;
|
||||
}
|
||||
|
||||
$erreurs = '<table style="width: 75%; margin-left: auto; margin-right: auto;">';
|
||||
$inscriptOk = true;
|
||||
|
||||
// Diverses vérification pour savoir si tous les champs sont remplis et s'ils ont tous les données valides
|
||||
if (addslashes(preg_replace('@[^a-zA-Z0-9_]@i', '', $pseudo)) != $pseudo || $pseudo == '') {
|
||||
|
@ -89,16 +68,17 @@ if (isset($_POST['code']) && $_POST['code'] == 'new staff' && isset($_POST['pseu
|
|||
|
||||
$planete_trouvee = false;
|
||||
while ($planete_trouvee != true) {
|
||||
$galaxie = mt_rand(2,4);
|
||||
$ss = mt_rand(1,150);
|
||||
$pos = mt_rand(1,12);
|
||||
$galaxie = 1;
|
||||
//$galaxie = mt_rand(2,4);
|
||||
$ss = mt_rand(1,100);
|
||||
$pos = mt_rand(1,15);
|
||||
|
||||
// Test pour savoir si la planète est déjà habitée
|
||||
$result = mysql_query("SELECT id FROM planete WHERE galaxie='$galaxie' AND ss='$ss' AND position='$pos'");
|
||||
if(mysql_num_rows($result)>=1) $planete_trouvee = false;
|
||||
else $planete_trouvee = true;
|
||||
}
|
||||
$image = mt_rand(1,12);
|
||||
$image = mt_rand(1,15);
|
||||
|
||||
mysql_query("INSERT INTO user (`pseudo`, `race`, `mdp`, `mail`, `last_ip`, `time_inscription`, `last_visite`) VALUES ('$pseudo', '$race', '$mdp', '$mail', '$ip', '$time', '$time')") or die ("erreur sql ".mysql_error());
|
||||
$req = mysql_query("SELECT id FROM user WHERE pseudo='$pseudo'");
|
||||
|
@ -107,12 +87,25 @@ if (isset($_POST['code']) && $_POST['code'] == 'new staff' && isset($_POST['pseu
|
|||
$cases = mt_rand(150,250);
|
||||
mysql_query("INSERT INTO planete (`id_user`, `nom_planete`, `galaxie`, `ss`, `position`, `image`, `cases`, `timestamp`, `metal`, `cristal`) VALUES ('$id_user', 'Planète mère', '$galaxie', '$ss', '$pos', '$image', '$cases', '$time', '1000', '700')") or die ("erreur sql ".mysql_error());
|
||||
|
||||
echo "<a href='index.php'><center><font color=red >Enregistrement OK<br><br>Cliquez ici pour vous loguer</font></center></a>";
|
||||
include('template.php');
|
||||
$template = new Template('./');
|
||||
$template->set_filenames(array('index' => 'templates/index.tpl'));
|
||||
$login = '<form name="login" method="post" action="verifLogin.php">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="cellulestxt">:: Pseudo :: </td><td><input type="text" class="champ" name="login" /></td></tr>
|
||||
<tr><td class="cellulestxt">:: Mot de Passe :: </td><td><input type="password" class="champ" name="password" /></td></tr>
|
||||
<tr><td align="center" colspan="2"><br />
|
||||
<input class="connexion" type="submit" value="› Connexion ‹" /></td></tr></table>
|
||||
</form>';
|
||||
$texte = '<br /><br /><br /><font color="#00FF00"><b>Votre inscription a bien été prise en compte.</b></font><br /><br />Vous pouvez dès maintenant utiliser le formulaire de connexion ci-contre pour accèdez à la béta de Halo-Battle.<br /><br />Bon jeu !';
|
||||
$template->assign_vars(array('TITRE' => 'Inscription validée','TEXTE' => $texte,'LOGIN' => $login));
|
||||
$template->pparse('index');
|
||||
}
|
||||
}
|
||||
else print '<font color="#FF0000"><b>Aucune donnée n\'a été tramise au serveur.</b></font>';
|
||||
else {
|
||||
header('Location: inscription.php?err=0');
|
||||
exit;
|
||||
}
|
||||
mysql_close();
|
||||
?>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
?>
|
13
logout.php
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
// On appelle la session
|
||||
session_start();
|
||||
|
||||
// On écrase le tableau de session
|
||||
$_SESSION = array();
|
||||
unset($_SESSION);
|
||||
|
||||
// On détruit la session
|
||||
session_destroy();
|
||||
|
||||
header("Location: index.php");
|
||||
?>
|
94
pages/Copie de flotte_dep.php
Normal 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'");
|
||||
}
|
||||
}
|
||||
?>
|
|
@ -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'");
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>'; ?>
|
|
@ -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>'; ?>
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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
|
@ -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>';
|
||||
?>
|
|
@ -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();
|
||||
?>
|
|
@ -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");
|
||||
?>
|
|
@ -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
|
@ -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>';
|
||||
?>
|
|
@ -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();
|
||||
?>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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 d’espionnage 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>
|
|
@ -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>
|
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
?>
|
|
@ -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é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é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é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');
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
||||
|
|
BIN
pages/descriptions/diz/1782.JPG
Normal file
After Width: | Height: | Size: 248 KiB |
BIN
pages/descriptions/diz/1783.jpg
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
pages/descriptions/diz/180.jpg
Normal file
After Width: | Height: | Size: 100 KiB |
BIN
pages/descriptions/diz/180p.jpg
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
pages/descriptions/diz/181.jpg
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
pages/descriptions/diz/182.jpg
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
pages/descriptions/diz/183.jpg
Normal file
After Width: | Height: | Size: 101 KiB |
215
pages/descriptions/diz/base.anc.css
Normal 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; */
|
|
@ -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;
|
||||
}
|
||||
|
|
BIN
pages/descriptions/diz/fond.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
BIN
pages/descriptions/diz/fondf.jpg
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
pages/descriptions/diz/fondfp.jpg
Normal file
After Width: | Height: | Size: 248 KiB |
|
@ -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;
|
||||
}
|
BIN
pages/descriptions/diz/planete/13.jpg
Normal file
After Width: | Height: | Size: 30 KiB |
BIN
pages/descriptions/diz/planete/14.jpg
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
pages/descriptions/diz/planete/15.jpg
Normal file
After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 11 KiB |