root/trunk/gui/client/mail_catchall_delete.php

Revision 1412, 1.6 kB (checked in by scitech, 8 hours ago)

Fixed #1518: Virtual mail problem. Add support for alias subdomain mail (part I)

Line 
1 <?php
2 /**
3  * ispCP ω (OMEGA) a Virtual Hosting Control System
4  *
5  * @copyright     2001-2006 by moleSoftware GmbH
6  * @copyright     2006-2008 by ispCP | http://isp-control.net
7  * @version     SVN: $Id$
8  * @link         http://isp-control.net
9  * @author         ispCP Team
10  *
11  * @license
12  *   This program is free software; you can redistribute it and/or modify it under
13  *   the terms of the MPL General Public License as published by the Free Software
14  *   Foundation; either version 1.1 of the License, or (at your option) any later
15  *   version.
16  *   You should have received a copy of the MPL Mozilla Public License along with
17  *   this program; if not, write to the Open Source Initiative (OSI)
18  *   http://opensource.org | osi@opensource.org
19  */
20
21 require '../include/ispcp-lib.php';
22
23 check_login(__FILE__);
24
25 if (isset($_GET['id']) && $_GET['id'] !== '') {
26   $mail_id = $_GET['id'];
27   $item_delete_status = Config::get('ITEM_DELETE_STATUS');
28   $dmn_id = get_user_domain_id($sql, $_SESSION['user_id']);
29
30   $query = "
31         select
32             mail_id
33         from
34             mail_users
35         where
36             domain_id = ?
37         and
38             mail_id = ?
39     ";
40
41   $rs = exec_query($sql, $query, array($dmn_id, $mail_id));
42
43   if ($rs -> RecordCount() == 0) {
44     user_goto('mail_catchall.php');
45   }
46
47   check_for_lock_file();
48
49   $query = "
50         update
51             mail_users
52         set
53             status = ?
54         where
55             mail_id = ?
56     ";
57
58   $rs = exec_query($sql, $query, array($item_delete_status, $mail_id));
59
60   send_request();
61   write_log($_SESSION['user_logged'].": deletes email catch all!");
62   set_page_message(tr('Catch all account scheduled for deletion!'));
63   user_goto('mail_catchall.php');
64
65 } else {
66   user_goto('mail_catchall.php');
67 }
68
69 ?>
Note: See TracBrowser for help on using the browser.