forked from halo-battle/game
Version 1.9a
This commit is contained in:
parent
5f81f76b17
commit
d028822d0b
437 changed files with 27543 additions and 81793 deletions
42
game/jeu/admin/supprimer_joueur.php
Normal file
42
game/jeu/admin/supprimer_joueur.php
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
$titre = '!!! Supprimer joueur !!!';
|
||||
$pagea = 'erreur';
|
||||
|
||||
$template->assign('linkpage', 'djoueurs');
|
||||
|
||||
if ($sess->values['auth_level'] >= 5 && !empty($_GET['id'])) {
|
||||
$id = $_GET['id'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($id);
|
||||
$req = $chapeau->unique_query("SELECT * FROM $table_user WHERE id = '$id';");
|
||||
$chapeau->deconnexion();
|
||||
if ($req) {
|
||||
$nom = trouvNom($id);
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($nom);
|
||||
$chapeau->query("DELETE FROM $table_mail WHERE destinataire = '$nom';");
|
||||
$chapeau->query("DELETE FROM $table_user WHERE id = '$id';");
|
||||
$chapeau->query("DELETE FROM $table_flottes WHERE id_user = '$id';");
|
||||
$chapeau->query("DELETE FROM $table_planete WHERE id_user = '$id';");
|
||||
$chapeau->deconnexion();
|
||||
$template->assign('message', 'Le joueur a été supprimé du jeu ainsi que toutes les données le concernant !');
|
||||
}
|
||||
else {
|
||||
$chapeau->deconnexion();
|
||||
$template->assign('message', 'Le joueur n\'a pas été trouvé !');
|
||||
}
|
||||
}
|
||||
elseif (!empty($_GET['name'])) {
|
||||
$name = $_GET['name'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($name);
|
||||
$req = $chapeau->unique_query("SELECT * FROM $table_user WHERE pseudo = '$name';");
|
||||
$chapeau->deconnexion();
|
||||
header('Location: admin.php?p=djoueurs&id='.$req['id']);
|
||||
exit;
|
||||
}
|
||||
else {
|
||||
$pagea = 'print_choixU';
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue