forked from halo-battle/game
Version 1.2
This commit is contained in:
parent
c4a18d4281
commit
083eb365c5
73 changed files with 1165 additions and 361 deletions
|
|
@ -9,7 +9,7 @@ $titre = 'Chantier spatial';
|
|||
if (empty($queryPlanete['file_vais'])) $file = new gererFile($queryUser['prodfile']+2);
|
||||
else {
|
||||
$file = unserialize($queryPlanete['file_vais']);
|
||||
$file->limite = $queryUser['prodfile']+2;
|
||||
$file->limite = $queryUser['prodfile'] + 2;
|
||||
}
|
||||
|
||||
if ($queryPlanete['chantier_spatial'] == 0) {
|
||||
|
|
@ -38,8 +38,9 @@ $titre = 'Chantier spatial';
|
|||
}
|
||||
eval($nomvaisnCALC[$i][3]);
|
||||
if ($file->addObjet($i, $nbv, ceil($sec))) {
|
||||
$export = mysql_real_escape_string(serialize($file));
|
||||
mysql_query("UPDATE `planete` SET `file_vais` = '$export', `metal` = '$metal', `cristal` = '$cristal', `hydrogene` = '$hydrogene' WHERE `id` = '$idPlan';");
|
||||
$export = serialize($file);
|
||||
$chapeau->escape($export);
|
||||
$chapeau->query("UPDATE `$table_planete` SET `file_vais` = '$export', `metal` = '$metal', `cristal` = '$cristal', `hydrogene` = '$hydrogene' WHERE `id` = '$idPlan';");
|
||||
}
|
||||
else {
|
||||
$template->assign('message','Vous ne pouvez pas mettre plus de vaisseaux en file d\'attente.');
|
||||
|
|
@ -51,6 +52,13 @@ $titre = 'Chantier spatial';
|
|||
header('Location: ?p=chantierspatial');
|
||||
exit;
|
||||
}
|
||||
else {
|
||||
$template->assign('message','Vous n\'avez pas les technologies nécessaire pour construire ce vaisseau !');
|
||||
$template->assign('script','<script type="text/javascript">setTimeout(\'document.location.href="?p=chantierspatial";\', 3500);</script>');
|
||||
$template->assign('couleur','red');
|
||||
$template->display('game/erreur.tpl');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
//Annulation d'une nouvelle construction
|
||||
if (isset($_GET['a']) && isset($nomvaisn[$_GET['a']])) {
|
||||
|
|
@ -69,8 +77,9 @@ $titre = 'Chantier spatial';
|
|||
$cristal += $b*$nbvr;
|
||||
$hydrogene += $c*$nbvr;
|
||||
|
||||
$export = mysql_real_escape_string(serialize($file));
|
||||
mysql_query("UPDATE `planete` SET `file_vais` = '$export', `metal` = '$metal', `cristal` = '$cristal', `hydrogene` = '$hydrogene' WHERE `id` = '$idPlan';");
|
||||
$export = serialize($file);
|
||||
$chapeau->escape($export);
|
||||
$chapeau->query("UPDATE `$table_planete` SET `file_vais` = '$export', `metal` = '$metal', `cristal` = '$cristal', `hydrogene` = '$hydrogene' WHERE `id` = '$idPlan';");
|
||||
header('Location: ?p=chantierspatial');
|
||||
exit;
|
||||
}
|
||||
|
|
@ -85,7 +94,7 @@ $titre = 'Chantier spatial';
|
|||
exit;
|
||||
}*/
|
||||
|
||||
for ($i=0 ; $i<$nbstop ; $i++) {
|
||||
for ($i = 0; $i < $nbstop; $i++) {
|
||||
$tr = 0; $a = 0; $b = 0; $c = 0; $sec = 0;
|
||||
$nom_bdd = $nomvaisnVAR[$i]; $a = $nomvaisnCALC[$i][0]; $b = $nomvaisnCALC[$i][1]; $c = $nomvaisnCALC[$i][2]; eval($nomvaisnCALC[$i][3]);
|
||||
if ($queryPlanete[$nom_bdd] > 0) $nombre = $queryPlanete[$nom_bdd]; else $nombre = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue