Version 1.13a

This commit is contained in:
nemunaire 2020-11-15 16:12:30 +01:00
commit ba8f323879
1634 changed files with 10080 additions and 213021 deletions

View file

@ -1,29 +1,46 @@
<?php
if(!defined('INDEX')) { header('Location: ../'); exit; }
if(!defined('INDEX')) { header('Location: ./'.$VAR['first_page']); exit; }
$page = 'arbre';
$titre = 'Arbre des technologies';
if (empty($_GET['q']))
$_GET['q'] = '';
$template->assign('defaut',$_GET['q']);
$template->assign('defaut', gpc('q'));
//Récupération et vérification de la race voulue ou définition d'une race par défaut
if (empty($_GET['r']) || ($_GET['r'] != 'humain' && $_GET['r'] != 'covenant'))
if (empty($_GET['r']) || (gpc('r') != 'humain' && gpc('r') != 'covenant'))
$_GET['r'] = $planete->race;
$race = $_GET['r'];
$race = gpc('r');
$template->assign('raceAff', $race);
$TEMP_liste = array();
foreach($planete->batiments as $id => $batiment)
if (SURFACE == "asteroide")
{
if (!empty($LANG[$race]["batiments"]["noms_sing"][$id]))
$TEMP_liste[$id] = array(
'niveau' => $batiment,
'etat' => Donnee::print_neededBatiments($id, $planete, $race)
);
$TEMP_liste = array();
foreach($planete->batiments as $id => $batiment)
{
if (!empty($LANG[$race]["alli_batiments"]["noms_sing"][$id]))
$TEMP_liste[$id] = array(
'niveau' => $batiment,
'etat' => Donnee::print_neededAlli_Batiments($id, $planete, $race)
);
}
$template->assign('batiments', $TEMP_liste);
}
$template->assign('batiments', $TEMP_liste);
else
{
$TEMP_liste = array();
foreach($planete->batiments as $id => $batiment)
{
if (!empty($LANG[$race]["batiments"]["noms_sing"][$id]))
$TEMP_liste[$id] = array(
'niveau' => $batiment,
'etat' => Donnee::print_neededBatiments($id, $planete, $race)
);
}
$template->assign('batiments', $TEMP_liste);
}
/*
$TEMP_technologies = array();
$nb = count($technolo);
@ -69,4 +86,6 @@ foreach($planete->vaisseaux as $id => $unite)
);
}
$template->assign('vaisseaux', $TEMP_liste);
unset($TEMP_liste, $id, $unite);
?>