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
49
game/jeu/admin/mail.php
Normal file
49
game/jeu/admin/mail.php
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
if(!defined('INDEX')) { header('Location: ../'); exit; }
|
||||
$pagea = 'mail_liste';
|
||||
$titre = 'Demandes et problèmes de la galaxie';
|
||||
|
||||
$template->assign('linkpage', 'courrier');
|
||||
|
||||
if (!empty($_GET['w']) || !empty($_GET['x'])) {
|
||||
if (!empty($_GET['w'])) $id = $_GET['w'];
|
||||
else $id = $_GET['x'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($id);
|
||||
$req = $chapeau->unique_query("SELECT $table_user.pseudo, $table_ope_mail.statut, $table_ope_mail.time, $table_ope_mail.titre, $table_ope_mail.contenu, $table_ope_mail.id FROM $table_ope_mail INNER JOIN $table_user ON $table_user.id = $table_ope_mail.id_user WHERE $table_ope_mail.id = '$id';");
|
||||
if ($req['statut'] >= 6) $chapeau->query("UPDATE $table_ope_mail SET statut = '0' WHERE id = '$id';");
|
||||
else $chapeau->query("UPDATE $table_ope_mail SET statut = statut + 1 WHERE id = '$id';");
|
||||
$chapeau->deconnexion();
|
||||
|
||||
if (isset($_GET['x'])) header('Location: admin.php?p=courrier&v='.$id);
|
||||
else header('Location: admin.php?p=courrier');
|
||||
exit;
|
||||
}
|
||||
elseif (!empty($_GET['v'])) {
|
||||
$id = $_GET['v'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($id);
|
||||
$req = $chapeau->unique_query("SELECT $table_user.pseudo, $table_ope_mail.statut, $table_ope_mail.time, $table_ope_mail.titre, $table_ope_mail.contenu, $table_ope_mail.id FROM $table_ope_mail INNER JOIN $table_user ON $table_user.id = $table_ope_mail.id_user WHERE $table_ope_mail.id = '$id';");
|
||||
$chapeau->deconnexion();
|
||||
|
||||
$template->assign('req', $req);
|
||||
$template->assign('id', $id);
|
||||
$pagea = 'mail_view';
|
||||
}
|
||||
elseif (!empty($_GET['d']) && $sess->values['auth_level'] >= 5) {
|
||||
$id = $_GET['d'];
|
||||
$chapeau->connexion();
|
||||
$chapeau->escape($id);
|
||||
$chapeau->query("DELETE FROM $table_ope_mail WHERE id = '$id';");
|
||||
$chapeau->deconnexion();
|
||||
|
||||
header('Location: admin.php?p=courrier');
|
||||
exit;
|
||||
}
|
||||
else {
|
||||
$chapeau->connexion();
|
||||
$req = $chapeau->query("SELECT $table_user.pseudo, $table_ope_mail.statut, $table_ope_mail.time, $table_ope_mail.titre, $table_ope_mail.contenu, $table_ope_mail.id FROM $table_ope_mail INNER JOIN $table_user ON $table_user.id = $table_ope_mail.id_user ORDER BY $table_ope_mail.time DESC;");
|
||||
$chapeau->connexion();
|
||||
$template->assign('mails', $req);
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue