root/trunk/gui/reseller/orders_delete.php

Revision 1327, 1.6 kB (checked in by rats, 4 months ago)

* Fixed: --scan-knownbad-files and --check-deleted are no longer supported by rkhunter
* Fixed #1471: chkrootkit should be in lenny / hardy
* Updated Chinese (simplified)
* Updated German
* Fixed #1475: typo on installation (ispcp-setup)
* Fixed: default user for rkhunter.log

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 $reseller_id = $_SESSION['user_id'];
26
27
28 if(isset($_GET['order_id']) && is_numeric($_GET['order_id'])){
29     $order_id = $_GET['order_id'];
30 } else {
31     set_page_message(tr('Wrong order ID!'));
32     Header("Location: orders.php");
33     die();
34 }
35
36 $query = <<<SQL_QUERY
37     select
38         id
39     from
40         orders
41     where
42             id = ?
43         and
44             user_id = ?
45 SQL_QUERY;
46
47     $rs = exec_query($sql, $query, array($order_id, $reseller_id));
48
49         if ($rs -> RecordCount() == 0) {
50
51             set_page_message(tr('Permission deny!'));
52             header('Location: orders.php');
53             die();
54         }
55
56 //delete all FTP Accounts
57   $query = <<<SQL_QUERY
58           delete from
59               orders
60           where
61               id = ?
62 SQL_QUERY;
63   $rs = exec_query($sql, $query, array($order_id));
64
65 set_page_message(tr('Customer order was removed successful!'));
66
67 write_log($_SESSION['user_logged'].": deletes customer order.");
68 header( "Location: orders.php");
69 die();
70 ?>
Note: See TracBrowser for help on using the browser.