Version 1.7b
This commit is contained in:
parent
58928889ed
commit
8a8280758b
716 changed files with 4361 additions and 33524 deletions
39
onyx/hb_game/jeu/admin/mail.php
Normal file
39
onyx/hb_game/jeu/admin/mail.php
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?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'];
|
||||
$req = $chapeau->unique_query("SELECT * FROM `$table_ope_mail` WHERE `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';");
|
||||
|
||||
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'];
|
||||
$req = $chapeau->unique_query("SELECT * FROM `$table_ope_mail` WHERE `id` = '$id';");
|
||||
|
||||
$template->assign('req', $req);
|
||||
$template->assign('id', $id);
|
||||
$pagea = 'mail_view';
|
||||
}
|
||||
elseif (!empty($_GET['d']) && $sess->values['auth_level'] >= 5) {
|
||||
$id = $_GET['d'];
|
||||
$chapeau->query("DELETE FROM `$table_ope_mail` WHERE `id` = '$id';");
|
||||
|
||||
header('Location: admin.php?p=courrier');
|
||||
exit;
|
||||
}
|
||||
else {
|
||||
$req = $chapeau->query("SELECT * FROM `$table_ope_mail` ORDER BY `time` DESC;");
|
||||
//TODO JOIN dans la requete SQL pour avoir le nom du joueur qui a encoyé le message
|
||||
$template->assign('mails', $req);
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue