forked from halo-battle/game
Version 0.10
This commit is contained in:
parent
73645ccc1f
commit
b9c240c781
246 changed files with 10218 additions and 1598 deletions
|
|
@ -7,41 +7,46 @@ $ss=$_SESSION['ss'];
|
|||
$pos=$_SESSION['pos'];
|
||||
$_SESSION['dernPage'] = 'defense.php';
|
||||
|
||||
require_once 'bdd.php';
|
||||
require_once('../securite.php');
|
||||
require_once 'ressourcetem.php';
|
||||
require_once 'noms.php';
|
||||
include_once('common.php');
|
||||
require('../template.php');
|
||||
$template = new Template('../templates/'.$templates);
|
||||
|
||||
/* Page défenses
|
||||
*
|
||||
*/
|
||||
function verification_des_ress($numtec, $metal, $calcium, $nourriture, $ress_ness_metal, $ress_ness_calcium, $ress_ness_nourriture) {
|
||||
if ($metal >= $ress_ness_metal && $calcium >= $ress_ness_calcium && $nourriture >= $ress_ness_nourriture) return '<form method="post" action="defense_validation.php"><input type="text" class="zone_texte" size="4" maxlength="4" name="sa" /><input type="hidden" name="type" value="'.$numtec.'" /><br /><input type="submit" value="Envoyer" class="bouton" /></form>';
|
||||
else return '<font color="red">Vous n\'avez pas suffisament de ressources</font>';
|
||||
if ($metal >= $ress_ness_metal && $calcium >= $ress_ness_calcium && $nourriture >= $ress_ness_nourriture) return '<form method="post" action="defense_validation.php"><p><input type="text" class="zone_texte" size="4" maxlength="4" name="sa" /><input type="hidden" name="type" value="'.$numtec.'" /><br /><input type="submit" value="Envoyer" class="bouton" /></p></form>';
|
||||
else return '<span style="color: #FF0000;">Vous n\'avez pas suffisament de ressources</span>';
|
||||
}
|
||||
|
||||
function verification_des_ressvf($numtec, $metal, $calcium, $nourriture, $ress_ness_metal, $ress_ness_calcium, $ress_ness_nourriture) {
|
||||
if ($metal >= $ress_ness_metal && $calcium >= $ress_ness_calcium && $nourriture >= $ress_ness_nourriture) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
function ressources($fer, $cristal, $ro, $need_fer, $need_cristal, $need_ro) {
|
||||
require 'noms.php';
|
||||
require 'includes/noms.php';
|
||||
$return = '';
|
||||
if ($need_fer > 0) {
|
||||
if ($fer <= $need_fer) {
|
||||
$z=floor($fer)-$need_fer;
|
||||
$return .= '<font color="red">'.$ressourc[0].' : <acronym title="Manque : '.abs($z).' unités de '.$ressourc[0].'">'.$need_fer.'</acronym></font> ';
|
||||
$return .= '<span style="color: #FF0000;">'.$ressourc[0].' : <acronym title="Manque : '.separerNombres(abs($z)).' unités de '.$ressourc[0].'">'.separerNombres($need_fer).'</acronym></span> ';
|
||||
}
|
||||
else $return .= $ressourc[0].' : <span class="rc">'.$need_fer.' </span>';
|
||||
else $return .= $ressourc[0].' : <span class="rc">'.separerNombres($need_fer).' </span>';
|
||||
}
|
||||
if ($need_cristal > 0) {
|
||||
if ($cristal <= $need_cristal) {
|
||||
$z=floor($cristal)-$need_cristal;
|
||||
$return .= '<font color="red">'.$ressourc[1].' : <acronym title="Manque : '.abs($z).' unités de '.$ressourc[0].'">'.$need_cristal.'</acronym></font> ';
|
||||
$return .= '<span style="color: #FF0000;">'.$ressourc[1].' : <acronym title="Manque : '.separerNombres(abs($z)).' unités de '.$ressourc[0].'">'.separerNombres($need_cristal).'</acronym></span> ';
|
||||
}
|
||||
else $return .= $ressourc[1].' : <span class="rc">'.$need_cristal.' </span>';
|
||||
else $return .= $ressourc[1].' : <span class="rc">'.separerNombres($need_cristal).' </span>';
|
||||
}
|
||||
if ($need_ro > 0) {
|
||||
if ($ro <= $need_ro) {
|
||||
$z=floor($ro)-$need_ro;
|
||||
$return .= '<font color="red">'.$ressourc[2].' : <acronym title="Manque : '.abs($z).' unités de '.$ressourc[0].'">'.$need_ro.'</acronym></font>';
|
||||
$return .= '<span style="color: #FF0000;">'.$ressourc[2].' : <acronym title="Manque : '.separerNombres(abs($z)).' unités de '.$ressourc[0].'">'.separerNombres($need_ro).'</acronym></span>';
|
||||
}
|
||||
else $return .= $ressourc[2].' : <span class="rc">'.$need_ro.'</span>';
|
||||
else $return .= $ressourc[2].' : <span class="rc">'.separerNombres($need_ro).'</span>';
|
||||
}
|
||||
return $return;
|
||||
}
|
||||
|
|
@ -64,53 +69,30 @@ function sec($time) {
|
|||
return $output;
|
||||
}
|
||||
|
||||
$template->set_filenames(array('defense' => 'defense.tpl'));
|
||||
|
||||
$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)));
|
||||
$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)));
|
||||
$iV = 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)));
|
||||
$nV = 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];
|
||||
|
||||
if ($temps_t > 0) $unit = $nomterra[--$unit_v];
|
||||
|
||||
if ($chantier_terrestre > 0) {
|
||||
if ($chantier_spatial > 0) {
|
||||
if (!isset($_GET['err'])) $_GET['err'] = '';
|
||||
$ERREUR = '';
|
||||
if ($_GET['err'] == 1) $ERREUR = '<div class="centre"><table style="margin-left: auto; margin-right: auto;"><tr><td><font color="#FF0000"><b>Cette technologie est déjà en cours de recherche, vous ne pouvez pas la rajouter dans la file d\'attente</b></font></td></tr></table></div><br />';
|
||||
elseif ($_GET['err'] == 2) $ERREUR = '<div class="centre"><table style="margin-left: auto; margin-right: auto;"><tr><td><font color="#FFCC00"><b>La production à la chaîne a été arrêtée</b></font></td></tr></table></div><br />';
|
||||
elseif ($_GET['err'] == 3) $ERREUR = '<div class="centre"><table style="margin-left: auto; margin-right: auto;"><tr><td><font color="#FF0000"><b>Vous n\'avez pas assez de ressources pour construire autant de défenses</b></font></td></tr></table></div><br />';
|
||||
elseif ($_GET['err'] == 3) $ERREUR = '<div class="centre"><table style="margin-left: auto; margin-right: auto;"><tr><td><font color="#FF0000"><b>Vous n\'avez pas assez de ressources pour construire autant de vaisseaux</b></font></td></tr></table></div><br />';
|
||||
|
||||
$template->set_filenames(array('ressourcestpl' => 'ressources.tpl'));
|
||||
$template->assign_vars( array('RES_IMAGE' => $RES_IMAGE, 'NOM_METAL' => $NOM_METAL, 'NOM_CRISTAL' => $NOM_CRISTAL, 'NOM_HYDROGENE' => $NOM_HYDROGENE, 'NOM_ENERGIE' => $NOM_ENERGIE, 'RES_METAL' => $RES_METAL, 'RES_CRISTAL' => $RES_CRISTAL, 'RES_HYDROGENE' => $RES_HYDROGENE, 'RES_ENERGIE' => $RES_ENERGIE, 'ERREUR' => $ERREUR, 'HEADER' => $HEADER, 'PUB' => $PUB));
|
||||
for ($i=0 ; $i<count($Aplan_value) ; $i++) {
|
||||
$template->assign_block_vars('planetes',array('RES_VALUE' => $Aplan_value[$i], 'RES_MORE' => $Aplan_more[$i], 'RES_REF' => $Aplan_ref[$i]));
|
||||
}
|
||||
|
||||
$template->set_filenames(array('defenses' => 'defenses.tpl'));
|
||||
$template->assign_var_from_handle('RESSOURCES', 'ressourcestpl');
|
||||
$CHAINE = '';
|
||||
if (!empty($fileVeh[0])) {
|
||||
$comp = 1;
|
||||
for ($i=0 ; $i<count($fileVeh) ; $i++) {
|
||||
if ($fileVeh[$i] != 'e') {
|
||||
if ($fileVeh[$i+1] == $fileVeh[$i]) $comp++;
|
||||
else {
|
||||
$template->assign_block_vars('file',array('NOM' => $comp.' '.$nomterrn[$fileVeh[$i]-1], 'NUM' => $fileVeh[$i], 'I' => $i));
|
||||
$comp = 1;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
$FILETXT = '';
|
||||
}
|
||||
else $FILETXT = 'Aucune défense en attente';
|
||||
|
||||
$tr = $fileTemps_v[0] + $fileTemps_v[1] - time();
|
||||
if (!empty($fileVeh[0])) $RESTE = $action = '<script type="text/javascript">reste('.$tr.');</script>';
|
||||
else $RESTE = '';
|
||||
|
||||
$template->assign_vars(array('RACE' => $race, 'FILETXT' => $FILETXT, 'CHAINE' => $CHAINE, 'RESTE' => $RESTE));
|
||||
$template->set_filenames(array('defense' => 'defense.tpl'));
|
||||
|
||||
$a=0; $b=0; $c=0;
|
||||
|
||||
|
|
@ -122,7 +104,8 @@ $a=0; $b=0; $c=0;
|
|||
$n=(${$nom_bdd}-1); $a=500; $b=200;
|
||||
if($bat == 8) $action = 'Le chantier terrestre est en cours d\'évolution';
|
||||
else $action = verification_des_ress($i+1, $metal, $cristal, $hydrogene, $a, $b, $c);
|
||||
if (!empty($nomterrn[$i])) $template->assign_block_vars('defense', array('IMAGE' => $nomterri[$i], 'NOM' => $nomterrn[$i], 'NUM' => $i, 'NIVEAU' => $niveau, 'DESCRIPTION' => $nomterde[$i], 'BESOIN' => ressources($metal, $cristal, $hydrogene, $a, $b, $c, $mine_m, $mine_c, $mine_h), 'TEMPS' => sec($f), 'ACTION' => $action));
|
||||
if (verification_des_ressvf($i+1, $metal, $cristal, $hydrogene, $a, $b, $c)) { $ACT = ''; $lien = 'defense_validation.php?type='.($i+1); } else { $ACT = 'none'; $lien = ''; }
|
||||
if (!empty($nomterrn[$i])) $template->assign_block_vars('defense', array('IMAGE' => $nomterri[$i], 'NOM' => $nomterrn[$i], 'NUM' => $i, 'NIVEAU' => $niveau, 'DESCRIPTION' => $nomterde[$i], 'BESOIN' => ressources($metal, $cristal, $hydrogene, $a, $b, $c, $mine_m, $mine_c, $mine_h), 'TEMPS' => sec($f), 'ACTION' => $action, 'NEC_METAL' => separerNombres($a), 'NEC_CRISTAL' => separerNombres($b), 'NEC_HYDROGENE' => separerNombres($c), 'ACT' => $ACT, 'NOME' => addslashes($nomterrn[$i]), 'DESCRIPTIONE' => addslashes($nomterde[$i]), 'LIEN' => $lien));
|
||||
}
|
||||
|
||||
// Défense n°2 : Strong shade/Tour Ion/DCA légère ; planete.def_2
|
||||
|
|
@ -133,7 +116,8 @@ $a=0; $b=0; $c=0;
|
|||
$n=(${$nom_bdd}-1); $a=4000; $b=2000;
|
||||
if($bat == 8) $action = 'Le chantier terrestre est en cours d\'évolution';
|
||||
else $action = verification_des_ress($i+1, $metal, $cristal, $hydrogene, $a, $b, $c);
|
||||
if (!empty($nomterrn[$i])) $template->assign_block_vars('defense', array('IMAGE' => $nomterri[$i], 'NOM' => $nomterrn[$i], 'NUM' => $i, 'NIVEAU' => $niveau, 'DESCRIPTION' => $nomterde[$i], 'BESOIN' => ressources($metal, $cristal, $hydrogene, $a, $b, $c, $mine_m, $mine_c, $mine_h), 'TEMPS' => sec($g), 'ACTION' => $action));
|
||||
if (verification_des_ressvf($i+1, $metal, $cristal, $hydrogene, $a, $b, $c)) { $ACT = ''; $lien = 'defense_validation.php?type='.($i+1); } else { $ACT = 'none'; $lien = ''; }
|
||||
if (!empty($nomterrn[$i])) $template->assign_block_vars('defense', array('IMAGE' => $nomterri[$i], 'NOM' => $nomterrn[$i], 'NUM' => $i, 'NIVEAU' => $niveau, 'DESCRIPTION' => $nomterde[$i], 'BESOIN' => ressources($metal, $cristal, $hydrogene, $a, $b, $c, $mine_m, $mine_c, $mine_h), 'TEMPS' => sec($g), 'ACTION' => $action, 'NEC_METAL' => separerNombres($a), 'NEC_CRISTAL' => separerNombres($b), 'NEC_HYDROGENE' => separerNombres($c), 'ACT' => $ACT, 'NOME' => addslashes($nomterrn[$i]), 'DESCRIPTIONE' => addslashes($nomterde[$i]), 'LIEN' => $lien));
|
||||
}
|
||||
|
||||
// Défense n°3 : Tourelle à barreau de combustible/Canon Orbital/DCA lourde ; planete.def_3
|
||||
|
|
@ -144,7 +128,8 @@ $a=0; $b=0; $c=0;
|
|||
$n=(${$nom_bdd}-1); $a=4500; $b=800; $c=600;
|
||||
if($bat == 8) $action = 'Le chantier terrestre est en cours d\'évolution';
|
||||
else $action = verification_des_ress($i+1, $metal, $cristal, $hydrogene, $a, $b, $c);
|
||||
if (!empty($nomterrn[$i])) $template->assign_block_vars('defense', array('IMAGE' => $nomterri[$i], 'NOM' => $nomterrn[$i], 'NUM' => $i, 'NIVEAU' => $niveau, 'DESCRIPTION' => $nomterde[$i], 'BESOIN' => ressources($metal, $cristal, $hydrogene, $a, $b, $c, $mine_m, $mine_c, $mine_h), 'TEMPS' => sec($h), 'ACTION' => $action));
|
||||
if (verification_des_ressvf($i+1, $metal, $cristal, $hydrogene, $a, $b, $c)) { $ACT = ''; $lien = 'defense_validation.php?type='.($i+1); } else { $ACT = 'none'; $lien = ''; }
|
||||
if (!empty($nomterrn[$i])) $template->assign_block_vars('defense', array('IMAGE' => $nomterri[$i], 'NOM' => $nomterrn[$i], 'NUM' => $i, 'NIVEAU' => $niveau, 'DESCRIPTION' => $nomterde[$i], 'BESOIN' => ressources($metal, $cristal, $hydrogene, $a, $b, $c, $mine_m, $mine_c, $mine_h), 'TEMPS' => sec($h), 'ACTION' => $action, 'NEC_METAL' => separerNombres($a), 'NEC_CRISTAL' => separerNombres($b), 'NEC_HYDROGENE' => separerNombres($c), 'ACT' => $ACT, 'NOME' => addslashes($nomterrn[$i]), 'DESCRIPTIONE' => addslashes($nomterde[$i]), 'LIEN' => $lien));
|
||||
}
|
||||
|
||||
// Défense n°4 : Canon à plasma/Drone/Canon Gauss ; planete.def_4
|
||||
|
|
@ -155,7 +140,8 @@ $a=0; $b=0; $c=0;
|
|||
$n=(${$nom_bdd}-1); $a=12000; $b=10000; $c=1000;
|
||||
if($bat == 8) $action = 'Le chantier terrestre est en cours d\'évolution';
|
||||
else $action = verification_des_ress($i+1, $metal, $cristal, $hydrogene, $a, $b, $c);
|
||||
if (!empty($nomterrn[$i])) $template->assign_block_vars('defense', array('IMAGE' => $nomterri[$i], 'NOM' => $nomterrn[$i], 'NUM' => $i, 'NIVEAU' => $niveau, 'DESCRIPTION' => $nomterde[$i], 'BESOIN' => ressources($metal, $cristal, $hydrogene, $a, $b, $c, $mine_m, $mine_c, $mine_h), 'TEMPS' => sec($h), 'ACTION' => $action));
|
||||
if (verification_des_ressvf($i+1, $metal, $cristal, $hydrogene, $a, $b, $c)) { $ACT = ''; $lien = 'defense_validation.php?type='.($i+1); } else { $ACT = 'none'; $lien = ''; }
|
||||
if (!empty($nomterrn[$i])) $template->assign_block_vars('defense', array('IMAGE' => $nomterri[$i], 'NOM' => $nomterrn[$i], 'NUM' => $i, 'NIVEAU' => $niveau, 'DESCRIPTION' => $nomterde[$i], 'BESOIN' => ressources($metal, $cristal, $hydrogene, $a, $b, $c, $mine_m, $mine_c, $mine_h), 'TEMPS' => sec($h), 'ACTION' => $action, 'NEC_METAL' => separerNombres($a), 'NEC_CRISTAL' => separerNombres($b), 'NEC_HYDROGENE' => separerNombres($c), 'ACT' => $ACT, 'NOME' => addslashes($nomterrn[$i]), 'DESCRIPTIONE' => addslashes($nomterde[$i]), 'LIEN' => $lien));
|
||||
}
|
||||
|
||||
// Défense n°5 : Lanceur de torpilles plasma/Station de defense/Lanceur de missiles ; planete.def_5
|
||||
|
|
@ -166,22 +152,61 @@ $a=0; $b=0; $c=0;
|
|||
$n=(${$nom_bdd}-1); $a=15000; $b=9500; $c=1500;
|
||||
if($bat == 8) $action = 'Le chantier terrestre est en cours d\'évolution';
|
||||
else $action = verification_des_ress($i+1, $metal, $cristal, $hydrogene, $a, $b, $c);
|
||||
if (!empty($nomterrn[$i])) $template->assign_block_vars('defense', array('IMAGE' => $nomterri[$i], 'NOM' => $nomterrn[$i], 'NUM' => $i, 'NIVEAU' => $niveau, 'DESCRIPTION' => $nomterde[$i], 'BESOIN' => ressources($metal, $cristal, $hydrogene, $a, $b, $c, $mine_m, $mine_c, $mine_h), 'TEMPS' => sec($h), 'ACTION' => $action));
|
||||
if (verification_des_ressvf($i+1, $metal, $cristal, $hydrogene, $a, $b, $c)) { $ACT = ''; $lien = 'defense_validation.php?type='.($i+1); } else { $ACT = 'none'; $lien = ''; }
|
||||
if (!empty($nomterrn[$i])) $template->assign_block_vars('defense', array('IMAGE' => $nomterri[$i], 'NOM' => $nomterrn[$i], 'NUM' => $i, 'NIVEAU' => $niveau, 'DESCRIPTION' => $nomterde[$i], 'BESOIN' => ressources($metal, $cristal, $hydrogene, $a, $b, $c, $mine_m, $mine_c, $mine_h), 'TEMPS' => sec($h), 'ACTION' => $action, 'NEC_METAL' => separerNombres($a), 'NEC_CRISTAL' => separerNombres($b), 'NEC_HYDROGENE' => separerNombres($c), 'ACT' => $ACT, 'NOME' => addslashes($nomterrn[$i]), 'DESCRIPTIONE' => addslashes($nomterde[$i]), 'LIEN' => $lien));
|
||||
}
|
||||
|
||||
$template->pparse('defenses');
|
||||
$CHAINE = '';
|
||||
$ut = false;
|
||||
|
||||
$tr = $fileTemps_v[0] + $fileTemps_v[1] - time();
|
||||
if (!empty($fileVeh[0])) $RESTE = $action = '<script type="text/javascript">reste('.$tr.');</script>';
|
||||
else $RESTE = '';
|
||||
|
||||
if (!empty($fileVeh[0])) {
|
||||
$comp = 1;
|
||||
for ($i=0 ; $i<count($fileVeh) ; $i++) {
|
||||
if ($fileVeh[$i] != 'e') {
|
||||
if ($fileVeh[$i+1] == $fileVeh[$i]) $comp++;
|
||||
else {
|
||||
if ($ut == false) {
|
||||
$template->assign_block_vars('file',array('NOM' => $comp.' '.$nomterrn[$fileVeh[$i]-1], 'NUM' => $fileVeh[$i], 'I' => $i, 'RESTANT' => 'prochain : <span id="axion"></span><script type="text/javascript">reste('.$tr.');</script> - '));
|
||||
$ut = true;
|
||||
}
|
||||
else $template->assign_block_vars('file',array('NOM' => $comp.' '.$nomterrn[$fileVeh[$i]-1], 'NUM' => $fileVeh[$i], 'I' => $i));
|
||||
$comp = 1;
|
||||
}
|
||||
|
||||
}
|
||||
//else $CHAINE = ' <br /> <a href="annul_tec.php?tec=e"><i>Arrêter de produire à la chaîne</i></a>';
|
||||
}
|
||||
$FILETXT = '';
|
||||
//if ($i == 1 && $vai_boucle == false) $CHAINE = ' <br /> <a href="construction.php?tec=e"><i>Produire à la chaîne</i></a>';
|
||||
}
|
||||
else $FILETXT = 'Aucune défense en attente';
|
||||
|
||||
$template->assign_vars(array('RACE' => $race, 'FILETXT' => $FILETXT, 'CHAINE' => $CHAINE, 'RESTE' => $RESTE, 'ERREUR' => $ERREUR));
|
||||
}
|
||||
else {
|
||||
$template->set_filenames(array('ressourcestpl' => 'ressources.tpl'));
|
||||
$template->assign_vars( array('RES_IMAGE' => $RES_IMAGE, 'NOM_METAL' => $NOM_METAL, 'NOM_CRISTAL' => $NOM_CRISTAL, 'NOM_HYDROGENE' => $NOM_HYDROGENE, 'NOM_ENERGIE' => $NOM_ENERGIE, 'RES_METAL' => $RES_METAL, 'RES_CRISTAL' => $RES_CRISTAL, 'RES_HYDROGENE' => $RES_HYDROGENE, 'RES_ENERGIE' => $RES_ENERGIE, 'ERREUR' => $ERREUR, 'HEADER' => $HEADER, 'PUB' => $PUB));
|
||||
for ($i=0 ; $i<count($Aplan_value) ; $i++) {
|
||||
$template->assign_block_vars('planetes',array('RES_VALUE' => $Aplan_value[$i], 'RES_MORE' => $Aplan_more[$i], 'RES_REF' => $Aplan_ref[$i]));
|
||||
}
|
||||
|
||||
$template->set_filenames(array('manque' => 'manque.tpl'));
|
||||
$template->assign_var_from_handle('RESSOURCES', 'ressourcestpl');
|
||||
|
||||
$template->assign_vars( array('TEXTE' => 'Vous devez d\'abord construire un chantier spatial !', 'PUB' => $PUB));
|
||||
$template->pparse('manque');
|
||||
$template->set_filenames(array('defense' => 'manque.tpl'));
|
||||
$template->assign_vars( array('TEXTE' => 'Vous devez d\'abord construire un chantier terrestre !'));
|
||||
}
|
||||
/* FIN Page défenses
|
||||
*
|
||||
*/
|
||||
|
||||
require('../connectBDD.php');
|
||||
$result = mysql_query("SELECT * FROM version ORDER BY temps DESC");
|
||||
$data = mysql_fetch_array($result);
|
||||
$version = $data['version'];
|
||||
mysql_close();
|
||||
|
||||
$template->set_filenames(array('base' => 'base.tpl'));
|
||||
$template->assign_vars(array('PUB' => $PUB, 'VERSION' => $version, 'RES_IMAGE' => $RES_IMAGE, 'NOM_METAL' => strtolower($NOM_METAL), 'NOM_CRISTAL' => strtolower($NOM_CRISTAL), 'NOM_HYDROGENE' => strtolower($NOM_HYDROGENE), 'NOM_ENERGIE' => strtolower($NOM_ENERGIE), 'RES_METAL' => $RES_METAL, 'RES_CRISTAL' => $RES_CRISTAL, 'RES_HYDROGENE' => $RES_HYDROGENE, 'RES_ENERGIE' => $RES_ENERGIE, 'DATEHEURET' => date('/dm/ H:i'), 'COUNTHUMAINS' => '7500', 'COUNTCOVENANTS' => '4500', 'PSEUDO' => $pseudo));
|
||||
for ($i=0 ; $i<count($Aplan_value) ; $i++) {
|
||||
$template->assign_block_vars('planetes',array('RES_VALUE' => $Aplan_value[$i], 'RES_MORE' => $Aplan_more[$i], 'RES_IMG' => $Aplan_img[$i], 'RES_NOM' => $Aplan_nom[$i], 'RES_REF' => $Aplan_ref[$i]));
|
||||
}
|
||||
|
||||
$template->assign_var_from_handle('CONTENU', 'defense');
|
||||
$template->pparse('base');
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue