root/trunk/gui/orderpanel/addon.php

Revision 1327, 2.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  * @license This program is free software; you can redistribute it and/or modify it under
11  *    the terms of the MPL General Public License as published by the Free Software
12  *    Foundation; either version 1.1 of the License, or (at your option) any later
13  *    version.
14  *    You should have received a copy of the MPL Mozilla Public License along with
15  *    this program; if not, write to the Open Source Initiative (OSI)
16  *    http://opensource.org | osi@opensource.org
17  */
18
19 require '../include/ispcp-lib.php';
20
21 $tpl = new pTemplate();
22 $tpl->define_dynamic('page', Config::get('PURCHASE_TEMPLATE_PATH') . '/addon.tpl');
23 $tpl->define_dynamic('page_message', 'page');
24 $tpl->define_dynamic('purchase_header', 'page');
25 $tpl->define_dynamic('purchase_footer', 'page');
26
27 /**
28  * Functions start
29  */
30
31 function addon_domain($dmn_name) {
32     $dmn_name = strtolower($dmn_name);
33     $dmn_name = encode_idna($dmn_name);
34
35     if (!chk_dname($dmn_name)) {
36         set_page_message(tr('Wrong domain name syntax!'));
37         return;
38     } else if (ispcp_domain_exists($dmn_name, 0)) {
39         set_page_message(tr('Domain with that name already exists on the system!'));
40         return;
41     }
42
43     $_SESSION['domainname'] = $dmn_name;
44     header("Location: address.php");
45     die();
46 }
47
48 /**
49  * Functions end
50  */
51
52 /**
53  * static page messages.
54  */
55
56 if (isset($_SESSION['user_id'])) {
57     $user_id = $_SESSION['user_id'];
58
59     if (isset($_SESSION['plan_id'])) {
60         $plan_id = $_SESSION['plan_id'];
61     } else if (isset($_GET['id'])) {
62         $plan_id = $_GET['id'];
63         $_SESSION['plan_id'] = $plan_id;
64     } else {
65         system_message(tr('You do not have permission to access this interface!'));
66     }
67 } else {
68     system_message(tr('You do not have permission to access this interface!'));
69 }
70
71 if (isset($_SESSION['domainname'])) {
72     header("Location: address.php");
73     die();
74 }
75
76 if (isset($_POST['domainname']) && $_POST['domainname'] != '') {
77     addon_domain($_POST['domainname']);
78 }
79
80 gen_purchase_haf($tpl, $sql, $user_id);
81 gen_page_message($tpl);
82
83 $tpl->assign(
84     array('DOMAIN_ADDON' => tr('Add On A Domain'),
85         'TR_DOMAIN_NAME' => tr('Domain name'),
86         'TR_CONTINUE' => tr('Continue'),
87         'TR_EXAMPLE' => tr('(e.g. domain-of-your-choice.com)'),
88         'THEME_CHARSET' => tr('encoding'),
89
90         )
91     );
92
93 $tpl->parse('PAGE', 'page');
94 $tpl->prnt();
95
96 if (Config::get('DUMP_GUI_DEBUG'))
97     dump_gui_debug();
98
99 unset_messages();
100
101 ?>
Note: See TracBrowser for help on using the browser.