root/trunk/gui/reseller/settings_welcome_mail.php

Revision 1327, 3.0 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') . '/settings_welcome_mail.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_welcome_email($user_id);
35
36 if (isset($_POST['uaction']) && $_POST['uaction'] == 'email_setup') {
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_welcome_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_ADMIN_MANAGE_EMAIL_SETUP_PAGE_TITLE' => tr('ispCP - Reseller/Manage users/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_users_manage.tpl');
64 gen_reseller_menu($tpl, Config::get('RESELLER_TEMPLATE_PATH') . '/menu_users_manage.tpl');
65
66 gen_logged_from($tpl);
67
68 $tpl->assign(
69     array(
70         'TR_EMAIL_SETUP' => tr('Email setup'),
71         'TR_MESSAGE_TEMPLATE_INFO' => tr('Message template info'),
72         'TR_USER_LOGIN_NAME' => tr('User login (system) name'),
73         'TR_USER_PASSWORD' => tr('User password'),
74         'TR_USER_REAL_NAME' => tr('User real (first and last) name'),
75         'TR_MESSAGE_TEMPLATE' => tr('Message template'),
76         'TR_SUBJECT' => tr('Subject'),
77         'TR_MESSAGE' => tr('Message'),
78         'TR_SENDER_EMAIL' => tr('Senders email'),
79         'TR_SENDER_NAME' => tr('Senders name'),
80         'TR_APPLY_CHANGES' => tr('Apply changes'),
81         'TR_USERTYPE' => tr('User type (admin, reseller, user)'),
82         'TR_BASE_SERVER_VHOST' => tr('URL to this admin panel'),
83         'SUBJECT_VALUE' => $data['subject'],
84         'MESSAGE_VALUE' => $data['message'],
85         'SENDER_EMAIL_VALUE' => $data['sender_email'],
86         'SENDER_NAME_VALUE' => $data['sender_name']
87         )
88     );
89
90 gen_page_message($tpl);
91
92 $tpl->parse('PAGE', 'page');
93 $tpl->prnt();
94
95 if (Config::get('DUMP_GUI_DEBUG'))
96     dump_gui_debug();
97
98 unset_messages();
99
100 ?>
Note: See TracBrowser for help on using the browser.