mirror of
https://github.com/ZeJMaN/LBCAlerte_ynh.git
synced 2025-07-17 17:10:48 +02:00
Initial commit
Functional, without SSO
This commit is contained in:
14
sources/app/mail/scripts/form-delete.php
Normal file
14
sources/app/mail/scripts/form-delete.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
if (!isset($_GET["id"])) {
|
||||
header("LOCATION: ./?mod=mail"); exit;
|
||||
}
|
||||
$alert = $storage->fetchById($_GET["id"]);
|
||||
if (!$alert->id) {
|
||||
header("LOCATION: ./?mod=mail"); exit;
|
||||
}
|
||||
if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
if (isset($_POST["id"]) && $_POST["id"] == $_GET["id"]) {
|
||||
$storage->delete($alert);
|
||||
}
|
||||
header("LOCATION: ./?mod=mail"); exit;
|
||||
}
|
Reference in New Issue
Block a user