forked from halo-battle/game
Version 1.13a
This commit is contained in:
parent
de31cd3e9a
commit
ba8f323879
1634 changed files with 10080 additions and 213021 deletions
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
if(!defined('INDEX') || SURFACE != "planete") { header('Location: ./'.$VAR['first_page']); exit; }
|
||||
$page = 'caserne';
|
||||
$titre = $LANG[$planete->race]['batiments']['noms_sing'][9];
|
||||
|
||||
|
|
@ -8,19 +8,21 @@ $titre = $LANG[$planete->race]['batiments']['noms_sing'][9];
|
|||
erreur('Vous devez d\'abord construire une '.$LANG[$planete->race]['batiments']['noms_sing'][9], "red", '?p=batiments', 3500);
|
||||
|
||||
//Lancement d'une nouvelle construction
|
||||
if (isset($_GET['v']) && is_numeric($_GET['v']) && $nbv = floor(gpc('nombre', 'post'))) {
|
||||
$planete->file_cas->caserne_addObjet(intval(gpc('v')), $nbv, $planete);
|
||||
|
||||
redirection($VAR['menu']['caserne']);
|
||||
}
|
||||
if (isset($_GET['c']) && ($id = intval(gpc('c'))) >= 0 && $nbc = floor(gpc('cas'.$id, 'post')))
|
||||
{
|
||||
$planete->file_cas->caserne_addObjet($id, $nbc, $planete);
|
||||
|
||||
redirection($VAR['menu']['caserne']);
|
||||
}
|
||||
//Annulation d'une nouvelle construction
|
||||
if (isset($_GET['a'])) {
|
||||
$n = intval(gpc('n'));
|
||||
if (empty($n)) $n = 1;
|
||||
$planete->file_cas->caserne_delObjet(intval(gpc('a')), $n, $planete);
|
||||
|
||||
redirection($VAR['menu']['caserne']);
|
||||
}
|
||||
if (isset($_GET['a']))
|
||||
{
|
||||
$n = intval(gpc('s'));
|
||||
if (empty($n)) $n = 1;
|
||||
$planete->file_cas->caserne_delObjet(intval(gpc('a')), $n, $planete);
|
||||
|
||||
redirection($VAR['menu']['caserne']);
|
||||
}
|
||||
|
||||
$TEMP_liste = array();
|
||||
foreach($planete->casernes as $i => $nombre)
|
||||
|
|
@ -42,4 +44,6 @@ $titre = $LANG[$planete->race]['batiments']['noms_sing'][9];
|
|||
|
||||
$template->assign('unites', $TEMP_liste);
|
||||
$template->assign('file', $planete->file_cas->printFile($planete));
|
||||
|
||||
unset($TEMP_liste, $i, $n, $niveau);
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue