forked from halo-battle/game
56 lines
1.9 KiB
PHP
56 lines
1.9 KiB
PHP
<?php
|
|
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
|
$page = 'arbre';
|
|
$titre = 'Arbre des technologies';
|
|
|
|
if (empty($_GET['q'])) $_GET['q'] = '';
|
|
$template->assign('defaut',$_GET['q']);
|
|
|
|
$TEMP_batiments = array();
|
|
$nb=count($batiment);
|
|
for ($id=0 ; $id<$nb ; $id++) {
|
|
if (!empty($batiment[$id])) $TEMP_batiments[] = array(
|
|
'url' => 'id='.$id.'&type=batiment&lvl='.$queryPlanete[$batimentVAR[$id]],
|
|
'nom' => $batiment[$id],
|
|
'niveau' => $queryPlanete[$batimentVAR[$id]],
|
|
'etat' => readDeblok($batimentTECH[$id], $queryPlanete, $queryUser)
|
|
);
|
|
}
|
|
$template->assign('batiments',$TEMP_batiments);
|
|
|
|
$TEMP_technologies = array();
|
|
$nb=count($technolo);
|
|
for ($id=0 ; $id<$nb ; $id++) {
|
|
if (!empty($technolo[$id])) $TEMP_technologies[] = array(
|
|
'url' => 'id='.$id.'&type=technologie&lvl='.$queryUser[$technoloVAR[$id]],
|
|
'nom' => $technolo[$id],
|
|
'niveau' => $queryUser[$technoloVAR[$id]],
|
|
'etat' => readDeblok($technoloTECH[$id], $queryPlanete, $queryUser)
|
|
);
|
|
}
|
|
$template->assign('technologies',$TEMP_technologies);
|
|
|
|
$TEMP_terrestre = array();
|
|
$nb=count($nomterrn);
|
|
for ($id=0 ; $id<$nb ; $id++) {
|
|
if (!empty($nomterrn[$id])) $TEMP_terrestre[] = array(
|
|
'url' => 'id='.$id.'&type=unite&lvl='.$queryPlanete[$nomterrnVAR[$id]],
|
|
'nom' => $nomterrn[$id],
|
|
'niveau' => $queryPlanete[$nomterrnVAR[$id]],
|
|
'etat' => readDeblok($nomterrnTECH[$id], $queryPlanete, $queryUser)
|
|
);
|
|
}
|
|
$template->assign('unites',$TEMP_terrestre);
|
|
|
|
$TEMP_vaisseaux = array();
|
|
$nb=count($nomvaisn);
|
|
for ($id=0 ; $id<$nb ; $id++) {
|
|
if (!empty($nomvaisn[$id])) $TEMP_vaisseaux[] = array(
|
|
'url' => 'id='.$id.'&type=unite&lvl='.$queryPlanete[$nomvaisnVAR[$id]],
|
|
'nom' => $nomvaisn[$id],
|
|
'niveau' => $queryPlanete[$nomvaisnVAR[$id]],
|
|
'etat' => readDeblok($nomvaisnTECH[$id], $queryPlanete, $queryUser)
|
|
);
|
|
}
|
|
$template->assign('vaisseaux',$TEMP_vaisseaux);
|
|
?>
|