Version 1.2

This commit is contained in:
nemunaire 2008-11-22 12:00:00 +01:00
commit 083eb365c5
73 changed files with 1165 additions and 361 deletions

View file

@ -23,7 +23,7 @@ $titre = 'Laboratoire';
if (isset($_GET['t']) && isset($technolo[$_GET['t']])) {
$i = $_GET['t'];
if(requestDeblok($technoloTECH[$i], $queryPlanete, $queryUser)) {
$n=($queryUser[$technoloVAR[$i]]+1);
$n = $queryUser[$technoloVAR[$i]] + 1;
eval($technoloCALC[$i][0]); $metal -= $a;
eval($technoloCALC[$i][1]); $cristal -= $b;
eval($technoloCALC[$i][2]); $hydrogene -= $c;
@ -35,9 +35,17 @@ $titre = 'Laboratoire';
exit;
}
eval($technoloCALC[$i][3]);
if ($fileT->addObjet($i, 1, ceil($sec))) {
$export = mysql_real_escape_string(serialize($fileT));
mysql_query("UPDATE `planete` SET `metal` = '$metal', `cristal` = '$cristal', `hydrogene` = '$hydrogene', `file_tech` = '$export' WHERE `id` = '$idPlan';");
if (!$fileT->existe($i) && $fileT->addObjet($i, 1, ceil($sec))) {
$export = serialize($fileT);
$chapeau->escape($export);
$chapeau->query("UPDATE `$table_planete` SET `metal` = '$metal', `cristal` = '$cristal', `hydrogene` = '$hydrogene', `file_tech` = '$export' WHERE `id` = '$idPlan';");
}
elseif ($file->existe($i)) {
$template->assign('message','Cette rechrche est déjà dans la file d\'attente !');
$template->assign('script','<script type="text/javascript">setTimeout(\'document.location.href="?p=laboratoire";\', 3500);</script>');
$template->assign('couleur','red');
$template->display('game/erreur.tpl');
exit;
}
else {
$template->assign('message','Vous ne pouvez pas mettre plus de recherche en file d\'attente.');
@ -54,13 +62,14 @@ $titre = 'Laboratoire';
if (isset($_GET['a']) && isset($technolo[$_GET['a']])) {
$i = $_GET['a'];
if($fileT->existe($i)) {
$n=($queryUser[$technoloVAR[$i]]+1);
$n = $queryUser[$technoloVAR[$i]] + 1;
eval($technoloCALC[$i][0]); $metal += $a;
eval($technoloCALC[$i][1]); $cristal += $b;
eval($technoloCALC[$i][2]); $hydrogene += $c;
$fileT->delobjet($i);
$export = mysql_real_escape_string(serialize($fileT));
mysql_query("UPDATE `planete` SET `metal` = '$metal', `cristal` = '$cristal', `hydrogene` = '$hydrogene', `file_tech` = '$export' WHERE `id` = '$idPlan';");
$export = serialize($fileT);
$chapeau->escape($export);
$chapeau->query("UPDATE `$table_planete` SET `metal` = '$metal', `cristal` = '$cristal', `hydrogene` = '$hydrogene', `file_tech` = '$export' WHERE `id` = '$idPlan';");
header('Location: ?p=laboratoire');
exit;
}
@ -76,10 +85,11 @@ $titre = 'Laboratoire';
}*/
for ($i=0 ; $i<$nbstop ; $i++) {
$tr = 0; $a = 0; $b = 0; $c = 0; $sec = 0;
$tr = 0; $a = 0; $b = 0; $c = 0; $sec = 0; $enFile = false;
$nom_bdd = $technoloVAR[$i];
if ($queryUser[$nom_bdd] > 0) $niveau = $queryUser[$nom_bdd]; else $niveau = 0;
$n=($queryUser[$nom_bdd]+1); eval($technoloCALC[$i][0]); eval($technoloCALC[$i][1]); eval($technoloCALC[$i][2]); eval($technoloCALC[$i][3]);
if ($fileT->existe($i)) $enFile = true;
if (!empty($technolo[$i]) && requestDeblok($technoloTECH[$i], $queryPlanete, $queryUser)) $TEMP_recherches[] =
array(
'image' => $technoli[$i],
@ -94,6 +104,7 @@ $titre = 'Laboratoire';
'nec_cristalS' => separerNombres($b),
'nec_hydrogeneS' => separerNombres($c),
'num' => $i,
'enfile' => $enFile,
'temps' => sec($sec),
'maq_metal' => ceil($a-$metal),
'maq_cristal' => ceil($b-$cristal),