Version 1.13a

This commit is contained in:
nemunaire 2020-11-15 16:12:30 +01:00
commit ba8f323879
1634 changed files with 10080 additions and 213021 deletions

View file

@ -5,7 +5,7 @@ $titre = 'Carte spatiale';
//Récupération d'un numéro d'amas à regarder
if (isset($_GET['galaxie']))
$g = floor($_GET['galaxie']);
$g = intval(gpc('galaxie'));
else
$g = $planete->galaxie;
@ -19,7 +19,7 @@ if ($g > $VAR['nb_amas'])
//Récupération d'un numéro de système à regarder
if (isset($_GET['ss']))
$s = floor($_GET['ss']);
$s = intval(gpc('ss'));
else
$s = $planete->ss;
@ -68,25 +68,15 @@ for ($i = 1; $i <= $VAR['nb_planete']; $i++)
if ($s%5 == 2 && $i == ceil($VAR['nb_planete']/2))
{
$bdd->reconnexion();
$bdd->escape($g);
$bdd->escape($s);
$d = $bdd->unique_query("SELECT race, nom_asteroide, debris_met, debris_cri, nom, tag, fondateur FROM $table_alliances WHERE galaxie = $g AND ss = $s;");
$d = $bdd->unique_query("SELECT race, nom_asteroide, debris_met, debris_cri, nom_alliance, image, tag, fondateur FROM $table_alliances WHERE galaxie = $g AND ss = $s;");
$bdd->deconnexion();
if($d) {
if ($d['race'] == 'covenant') $ra = '(c)';
elseif ($auth_level >= 6 && md5($d['race']) == '34c19b21bd4a3dda389e767d32fe9779') $ra = '(f)';
else $ra = '(h)';
$TEMP_carte[] = array('A', $d['nom_asteroide'], $d['debris_met'], $d['debris_cri'], $ra, $d['nom'], '<a href="?p=envoyer&amp;d='.$d['fondateur'].'" class="msg"><span>Message</span></a>', $d['tag']);//, $eA['tag']);
}
else {
if($d)
$TEMP_carte[] = array('A', $d['nom_asteroide'], $d['debris_met'], $d['debris_cri'], $d['race'], $d['nom_alliance'], $d['tag'], $d['image'], 0);
else
$TEMP_carte[] = array('A');
}
}
$bdd->reconnexion();
$bdd->escape($g);
$bdd->escape($s);
$resultat = $bdd->query("SELECT id FROM $table_planete WHERE galaxie = $g AND ss = $s AND position = $i;");
if($resultat) {
$d = $bdd->unique_query("SELECT P.nom_planete, P.image, P.debris_met, P.debris_cri, U.pseudo, U.race, U.politique, U.id_alliance, A.tag FROM $table_planete P INNER JOIN $table_user U ON U.id = P.id_user LEFT OUTER JOIN $table_alliances A ON A.id = U.id_alliance WHERE P.galaxie = $g AND P.ss = $s AND P.position = $i;");
@ -102,4 +92,6 @@ for ($i = 1; $i <= $VAR['nb_planete']; $i++)
$template->assign('carte', $TEMP_carte);
$template->assign('position', array($g, $s, $Gpu, $Spu, $Gmu, $Smu));
unset($TEMP_carte, $g, $s, $Gpu, $Spu, $Gmu, $Smu, $resultat, $d, $i);
?>