Affiche les 1000 première planètes dans la page d'admin, c'est donc plus simple de les trouver

This commit is contained in:
Nigel Sheldon 2021-02-26 17:13:43 +01:00
parent 28b0ceeee8
commit 6d8bf942db
2 changed files with 23 additions and 1 deletions

View File

@ -65,5 +65,9 @@ if (!empty($_GET['id']) && !empty($_GET['key']) && $_GET['key'] == 'hash_planete
header('Location: '.$VAR["menu"]["vplanetes"].'&id='.$req['id']);
exit;
} else {
$bdd = new BDD();
$req = $bdd->query("SELECT planete.id, nom_planete, pseudo, galaxie, ss, position FROM planete LEFT JOIN user ON (id_user=user.id) LIMIT 1000;");
$bdd->deconnexion();
$template->assign('planetes', $req);
$pagea = 'print_choixP';
}

View File

@ -37,4 +37,22 @@
</td>
</tr>
</table>
<br />
<h2>Liste des planètes existantes</h2>
<table>
<tr>
<th>Planète</th>
<th>Joueur</th>
<th>Position</th>
<th></th>
</tr>
{foreach from=$planetes item=planete}
<tr>
<td>{$planete.nom_planete}</td>
<td>{$planete.pseudo}</td>
<td>{$planete.galaxie}:{$planete.ss}:{$planete.position}</td>
<td><a href="admin.php?p={$linkpage}&id={$planete.id}"><input type="submit" class="submit" value="GO" /></a></td>
<tr>
{/foreach}
</table>
{include file='game/footer.tpl'}