Version 1.2
This commit is contained in:
parent
c4a18d4281
commit
083eb365c5
73 changed files with 1165 additions and 361 deletions
|
|
@ -3,11 +3,16 @@ if(!defined('INDEX')) { header('Location: ../'); exit; }
|
|||
$page = 'carte';
|
||||
$titre = 'Carte spatiale';
|
||||
|
||||
if (isset($_GET['galaxy'])) $g = floor($_GET['galaxy']); else $g = $queryPlanete['galaxie'];
|
||||
if ($g < 1) $g = 1;
|
||||
if (isset($_GET['galaxie'])) $g = $chapeau->escape(floor($_GET['galaxie']));
|
||||
else $g = $queryPlanete['galaxie'];
|
||||
|
||||
if ($queryUser['auth_level'] >= 5 && $g < 0) $g = 0;
|
||||
elseif ($g < 1) $g = 1;
|
||||
if ($g > MAX_AMAS) $g = 1;
|
||||
|
||||
if (isset($_GET['ss'])) $s = floor($_GET['ss']); else $s = $queryPlanete['ss'];
|
||||
if (isset($_GET['ss'])) $s = $chapeau->escape(floor($_GET['ss']));
|
||||
else $s = $queryPlanete['ss'];
|
||||
|
||||
if ($s < 1) $s = 1;
|
||||
if ($s > MAX_SYSTEME) $s = MAX_SYSTEME;
|
||||
|
||||
|
|
@ -33,20 +38,18 @@ else {
|
|||
}
|
||||
|
||||
$TEMP_carte = array();
|
||||
for ($i=1; $i<=MAX_PLANETE; $i++) {
|
||||
$resultat = mysql_query("SELECT * FROM planete WHERE galaxie='$g' AND ss='$s' AND position='$i'");
|
||||
if(mysql_num_rows($resultat)>=1) {
|
||||
$x = mysql_query("SELECT * FROM planete WHERE galaxie='$g' AND ss='$s'AND position='$i'");
|
||||
$d = mysql_fetch_array($x);
|
||||
for ($i = 1; $i <= MAX_PLANETE; $i++) {
|
||||
$resultat = $chapeau->query("SELECT * FROM `$table_planete` WHERE `galaxie` = '$g' AND `ss` = '$s' AND `position` = '$i';");
|
||||
if($resultat) {
|
||||
$d = $chapeau->unique_query("SELECT * FROM `$table_planete` WHERE `galaxie` = '$g' AND `ss` = '$s'AND `position` = '$i';");
|
||||
|
||||
$id_user = $d['id_user'];
|
||||
$y = mysql_query("SELECT race FROM user WHERE id='$id_user'");
|
||||
$e = mysql_fetch_array($y);
|
||||
if ($e['race'] == 'covenant') $ra='(c)';
|
||||
elseif (md5($e['race'] && $auth_level >= 6) == '34c19b21bd4a3dda389e767d32fe9779') $ra='(f)';
|
||||
else $ra='(h)';
|
||||
$e = $chapeau->unique_query("SELECT `pseudo`, `race` FROM `$table_user` WHERE `id` = '$id_user'");
|
||||
if ($e['race'] == 'covenant') $ra = '(c)';
|
||||
elseif ($auth_level >= 6 && md5($e['race']) == '34c19b21bd4a3dda389e767d32fe9779') $ra = '(f)';
|
||||
else $ra = '(h)';
|
||||
|
||||
$TEMP_carte[] = array($i, $d['nom_planete'], $d['debris_met'], $d['debris_cri'], $ra, trouvNom($d['id_user']), '<a href="?p=envoyer&d='.trouvNom($d['id_user']).'" class="msg"><span>Message</span></a>');
|
||||
$TEMP_carte[] = array($i, htmlspecialchars($d['nom_planete']), $d['debris_met'], $d['debris_cri'], $ra, $e['pseudo'], '<a href="?p=envoyer&d='.$e['pseudo'].'" class="msg"><span>Message</span></a>');
|
||||
}
|
||||
else $TEMP_carte[] = array($i);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue