root/trunk/gui/reseller/order_email.php

Revision 1327, 2.9 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 $tpl = new pTemplate();
26 $tpl->define_dynamic('page', Config::get('RESELLER_TEMPLATE_PATH') . '/order_email.tpl');
27 $tpl->define_dynamic('page_message', 'page');
28 $tpl->define_dynamic('logged_from', 'page');
29
30 $theme_color = Config::get('USER_INITIAL_THEME');
31
32 $user_id = $_SESSION['user_id'];
33
34 $data = get_order_email($user_id);
35
36 if (isset($_POST['uaction']) && $_POST['uaction'] == 'order_email') {
37     $data['subject'] = clean_input($_POST['auto_subject']);
38
39     $data['message'] = clean_input($_POST['auto_message']);
40
41     if ($data['subject'] == '') {
42         set_page_message(tr('Please specify a subject!'));
43     } else if ($data['message'] == '') {
44         set_page_message(tr('Please specify message!'));
45     } else {
46         set_order_email($user_id, $data);
47
48         set_page_message (tr('Auto email template data updated!'));
49     }
50 }
51
52 /*
53  *
54  * static page messages.
55  *
56  */
57
58 $tpl->assign(array('TR_RESELLER_ORDER_EMAL' => tr('ispCP - Reseller/Order email setup'),
59         'THEME_COLOR_PATH' => "../themes/$theme_color",
60         'THEME_CHARSET' => tr('encoding'),
61         'ISP_LOGO' => get_logo($_SESSION['user_id'])));
62
63 gen_reseller_mainmenu($tpl, Config::get('RESELLER_TEMPLATE_PATH') . '/main_menu_orders.tpl');
64 gen_reseller_menu($tpl, Config::get('RESELLER_TEMPLATE_PATH') . '/menu_orders.tpl');
65
66 gen_logged_from($tpl);
67
68 $tpl->assign(array('TR_EMAIL_SETUP' => tr('Email setup'),
69         'TR_MANAGE_ORDERS' => tr('Manage orders'),
70         'TR_MESSAGE_TEMPLATE_INFO' => tr('Message template info'),
71         'TR_USER_LOGIN_NAME' => tr('User login (system) name'),
72         'TR_USER_DOMAIN' => tr('Domain name'),
73         'TR_USER_REAL_NAME' => tr('User (first and last) name'),
74         'TR_MESSAGE_TEMPLATE' => tr('Message template'),
75         'TR_SUBJECT' => tr('Subject'),
76         'TR_MESSAGE' => tr('Message'),
77         'TR_SENDER_EMAIL' => tr('Senders email'),
78         'TR_SENDER_NAME' => tr('Senders name'),
79         'TR_APPLY_CHANGES' => tr('Apply changes'),
80         'SUBJECT_VALUE' => $data['subject'],
81         'MESSAGE_VALUE' => $data['message'],
82         'SENDER_EMAIL_VALUE' => $data['sender_email'],
83         'SENDER_NAME_VALUE' => $data['sender_name']));
84
85 gen_page_message($tpl);
86
87 $tpl->parse('PAGE', 'page');
88 $tpl->prnt();
89
90 if (Config::get('DUMP_GUI_DEBUG'))
91     dump_gui_debug();
92
93 unset_messages();
94
95 ?>
Note: See TracBrowser for help on using the browser.