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
|
|
@ -9,34 +9,31 @@ $bdd->reconnexion();
|
|||
|
||||
//On regarde si le joueur a une flotte en vue
|
||||
$radar = array();
|
||||
$nbPlan = count($queryPlanetes);
|
||||
//$detect = $planete->technologies[1]*1800;
|
||||
/*for($i = 0; $i < $nbPlan; $i++){
|
||||
$end_galaxie = $queryPlanetes[$i]['galaxie'];
|
||||
$end_ss = $queryPlanetes[$i]['ss'];
|
||||
$end_position = $queryPlanetes[$i]['position'];
|
||||
$radar[] = array($bdd->query("SELECT F.mission, F.start_galaxie, F.start_ss, F.start_position, F.start_time, F.end_time, F.start_time + F.end_time - ".time()." AS arrive_time, P.nom_planete, U.pseudo FROM $table_flottes F INNER JOIN $table_planete P ON P.galaxie = F.start_galaxie AND P.ss = F.start_ss AND P.position = F.start_position INNER JOIN $table_user U ON U.id = P.id_user WHERE F.effectue != '1' AND F.end_galaxie = '$end_galaxie' AND F.end_ss = '$end_ss' AND F.end_position = '$end_position' AND F.id_user != $id_user AND F.start_time + F.end_time - ".time()." <= $detect;"), array($queryPlanetes[$i]['nom_planete'], $queryPlanetes[$i]['galaxie'], $queryPlanetes[$i]['ss'], $queryPlanetes[$i]['position']));
|
||||
}*/
|
||||
$detect = 86400;
|
||||
foreach($queryPlanetes as $planeteJoueur)
|
||||
{
|
||||
$end_id = $planeteJoueur['id'];
|
||||
$radar[] = array($bdd->query("SELECT F.mission, F.start_planete, F.start_time, F.end_time, F.start_time + F.end_time - ".time()." AS arrive_time, P.nom_planete, P.galaxie as start_galaxie, P.ss as start_ss, P.position as start_position, U.pseudo FROM $table_flottes F INNER JOIN $table_planete P ON P.id = F.start_planete INNER JOIN $table_user U ON U.id = P.id_user WHERE F.statut != '1' AND F.end_planete = '$end_id' AND F.id_user != $id_user AND F.start_time + F.end_time - ".time()." <= $detect;"), array($planeteJoueur['nom_planete'], $planeteJoueur['galaxie'], $planeteJoueur['ss'], $planeteJoueur['position']));
|
||||
}
|
||||
$bdd->deconnexion();
|
||||
unset($nbPlan);
|
||||
$template->assign('radar',$radar);
|
||||
//$template->assign('alliance', $alli);
|
||||
unset($nbPlan, $end_id, $radar, $alli);
|
||||
|
||||
if (SURFACE == "planete") {
|
||||
//Affichage des informations sur la planète
|
||||
$template->assign('diametre', $planete->cases * 92);
|
||||
$template->assign('points', $planete->points);
|
||||
$template->assign('fileBat', $planete->file_bat->printFile($planete));
|
||||
$template->assign('fileCas', $planete->file_cas->printFile($planete));
|
||||
$template->assign('fileVais', $planete->file_vais->printFile($planete));
|
||||
$template->assign('fileTer', $planete->file_ter->printFile($planete));
|
||||
$template->assign('fileTech', $planete->file_tech->printFile($planete));
|
||||
}
|
||||
else
|
||||
{
|
||||
//On charge l'utilisateur pour récupérer son pseudo et l'afficher sur la page d'accueil
|
||||
$planete->fondateur = new User($planete->fondateur);
|
||||
$planete->loadDetails();
|
||||
}
|
||||
|
||||
$template->assign('radar',$radar);
|
||||
//$template->assign('alliance', $alli);
|
||||
|
||||
if (SURFACE == "planete")
|
||||
{
|
||||
$template->assign('fileBat', $planete->file_bat->printFile($planete));
|
||||
$template->assign('fileCas', $planete->file_cas->printFile($planete));
|
||||
$template->assign('fileVais', $planete->file_vais->printFile($planete));
|
||||
$template->assign('fileTer', $planete->file_ter->printFile($planete));
|
||||
$template->assign('fileTech', $planete->file_tech->printFile($planete));
|
||||
}
|
||||
|
||||
unset($radar, $alli)
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue