Version 1.7i
This commit is contained in:
parent
8a8280758b
commit
ba5e741c99
136 changed files with 2561 additions and 2105 deletions
|
|
@ -8,9 +8,12 @@ $titre = 'Demandes et problèmes de la galaxie';
|
|||
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';");
|
||||
$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');
|
||||
|
|
@ -18,7 +21,10 @@ if (!empty($_GET['w']) || !empty($_GET['x'])) {
|
|||
}
|
||||
elseif (!empty($_GET['v'])) {
|
||||
$id = $_GET['v'];
|
||||
$req = $chapeau->unique_query("SELECT * FROM `$table_ope_mail` WHERE `id` = '$id';");
|
||||
$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);
|
||||
|
|
@ -26,14 +32,18 @@ elseif (!empty($_GET['v'])) {
|
|||
}
|
||||
elseif (!empty($_GET['d']) && $sess->values['auth_level'] >= 5) {
|
||||
$id = $_GET['d'];
|
||||
$chapeau->query("DELETE FROM `$table_ope_mail` WHERE `id` = '$id';");
|
||||
$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 {
|
||||
$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
|
||||
$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