forked from halo-battle/game
Version 1.9g
This commit is contained in:
parent
d028822d0b
commit
4c9814a99c
800 changed files with 237325 additions and 1949 deletions
|
|
@ -6,7 +6,7 @@ $titre = 'Carte spatiale';
|
|||
if (isset($_GET['galaxie'])) $g = floor($_GET['galaxie']);
|
||||
else $g = $planete->galaxie;
|
||||
|
||||
if ($queryUser['auth_level'] >= 5 && $g <= 0) $g = 0;
|
||||
if ($planete->auth_level >= 5 && $g <= 0) $g = 0;
|
||||
elseif ($g < 1) $g = 1;
|
||||
if ($g > MAX_AMAS) $g = 1;
|
||||
|
||||
|
|
@ -38,21 +38,39 @@ else {
|
|||
}
|
||||
|
||||
//Erreur au cas où la zone soit trop lointaine par rapport au niveau de la technologie
|
||||
if (($queryUser['detection'] < 1 && ($g != $planete->galaxie || $s != $planete->ss)) || ($queryUser['detection'] < 2 && $g != $planete->galaxie))
|
||||
erreur('Pour afficher cette zone de la carte spatiale, vous devez plus développer votre technologie '.nameLink(1, "technologie"));
|
||||
//if (($planete->technologies[1] < 1 && ($g != $planete->galaxie || $s != $planete->ss)) || ($planete->technologies[1] < 2 && $g != $planete->galaxie))
|
||||
// erreur('Pour afficher cette zone de la carte spatiale, vous devez plus développer votre technologie ');
|
||||
|
||||
$TEMP_carte = array();
|
||||
for ($i = 1; $i <= MAX_PLANETE; $i++) {
|
||||
if ($s%5 == 2 && $i == ceil(MAX_PLANETE/2)) {
|
||||
$bdd->connexion();
|
||||
$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;");
|
||||
$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&d='.$d['fondateur'].'" class="msg"><span>Message</span></a>', $d['tag']);//, $eA['tag']);
|
||||
}
|
||||
else {
|
||||
$TEMP_carte[] = array('A');
|
||||
}
|
||||
}
|
||||
$bdd->connexion();
|
||||
$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.debris_met, P.debris_cri, U.pseudo, U.race, 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 galaxie = $g AND ss = $s AND position = $i;");
|
||||
$bdd->deconnexion();
|
||||
$d = $bdd->unique_query("SELECT P.nom_planete, P.debris_met, P.debris_cri, U.pseudo, U.race, 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;");
|
||||
|
||||
if ($d['race'] == 'covenant') $ra = '(c)';
|
||||
elseif ($auth_level >= 6 && md5($d['race']) == '34c19b21bd4a3dda389e767d32fe9779') $ra = '(f)';
|
||||
else $ra = '(h)';
|
||||
$bdd->deconnexion();
|
||||
|
||||
$TEMP_carte[] = array($i, $d['nom_planete'], $d['debris_met'], $d['debris_cri'], $ra, $d['pseudo'], '<a href="?p=envoyer&d='.$d['pseudo'].'" class="msg"><span>Message</span></a>', $d['tag']);//, $eA['tag']);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue