Version 2007-11-05
This commit is contained in:
parent
ebc73c5744
commit
d08fb34825
58 changed files with 1819 additions and 1447 deletions
68
pages/carte.php
Normal file
68
pages/carte.php
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
session_start();
|
||||
define('DESIGN', 'descriptions/diz/base.css');
|
||||
require('../header.php');
|
||||
|
||||
require('../fonctions.php');
|
||||
require('../connectBDD.php');
|
||||
|
||||
if (isset($_GET['galaxy'])) $g = floor($_GET['galaxy']); else $g = $_SESSION['galaxy'];
|
||||
if ($g < 1) $g = 1;
|
||||
if ($g > 15) $g = 15;
|
||||
|
||||
if (isset($_GET['ss'])) $s=floor($_GET['ss']); else $s=$_SESSION['ss'];
|
||||
if ($s < 1) $s = 1;
|
||||
if ($s > 300) $s = 300;
|
||||
?>
|
||||
<body>
|
||||
<?php
|
||||
echo'<style TYPE=text/css>
|
||||
TD.z {
|
||||
border: 0px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<form action="carte.php" method="get">
|
||||
<table border="0" align="center">
|
||||
<tbody>
|
||||
<tr><td>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr><td class="z" colspan="3">Galaxie</td></tr>
|
||||
<tr><td class="z"><input name="galaxy" value="'.$g.'" size="5" maxlength="2" type="text" class="zone_texte"></td></tr>
|
||||
</tbody></table></td>
|
||||
<td><table><tbody>
|
||||
<tr><td class="z" colspan="3">Système solaire</td></tr>
|
||||
<tr><td class="z"><input name="ss" value="'.$s.'" size="5" maxlength="3" type="text" class="zone_texte"></td></tr>
|
||||
</tbody></table></td></tr>
|
||||
<tr><td colspan="2" align="center"><input value="Afficher" type="submit" class="bouton"></td></tr>
|
||||
</tbody></table>
|
||||
</form>
|
||||
<br>
|
||||
<table align="center">
|
||||
<tr><td colspan="6" class="z" align="left">Système '.$g.' : '.$s.'</td></tr>
|
||||
<tr><td>Position</td><td>Nom</td><td>Débris métal</td><td>Débris cristal</td><td>Joueur</td><td>Message</td></tr>';
|
||||
for ($i=1; $i<=12; $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);
|
||||
|
||||
$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)';
|
||||
else $ra='(h)';
|
||||
|
||||
echo '<tr><td height="20">'.$i.'</td><td>'.$d['nom_planete'].'</td><td>'.$d['debris_met'].'</td><td>'.$d['debris_cri'].'</td><td>'.$ra.' '.trouvNom($d['id_user']).'</td><td><a href="envoyer_message.php?pseudo='.trouvNom($d['id_user']).'"><img src="descriptions/diz/m.gif"></a></td></tr>';
|
||||
}
|
||||
|
||||
else echo '<tr><td height="20">'.$i.'</td><td></td><td></td><td></td><td></td><td></td></tr>';
|
||||
}
|
||||
echo '</table>';
|
||||
|
||||
mysql_close();
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue