- $marked = unserialize($_SESSION['marked']);
- unset($_SESSION['marked']);
- $query = array();
- $error = array();
- foreach ($marked as $mail_id) {
- $query[] = "delete from msgs where mail_id = '$mail_id'";
- $query[] = "delete from msgrcpt where mail_id = '$mail_id'";
- $query[] = "delete from quarantine where mail_id = '$mail_id'";
- $success = $DB->update($query);
- if (! $success) {
- $error[] = $mail_id;
- }
- }
- if (count($error) > 0) {
- $str = implode(', ', $error);
- error("The following messages was not purged [$str], contact administrator");
- exit;
- }
- header('Location: index.php');
- } else if ($loggedIn) {
- header('Location: index.php');
+ $marked = unserialize($_SESSION['marked']);
+ unset($_SESSION['marked']);
+ $query = array();
+ $error = array();
+ foreach ($marked as $mail_id) {
+ $query[] = "delete from msgs where mail_id = '$mail_id'";
+ $query[] = "delete from msgrcpt where mail_id = '$mail_id'";
+ $query[] = "delete from quarantine where mail_id = '$mail_id'";
+ $success = $DB->update($query);
+ if (! $success) {
+ $error[] = $mail_id;
+ }
+ }
+ if (count($error) > 0) {
+ $str = implode(', ', $error);
+ error("The following messages was not purged [$str], contact administrator");
+ exit;
+ }
+ header('Location: index.php');
+ } else if ($loggedIn) {
+ header('Location: index.php');