root/trunk/gui/reseller/settings_lostpassword.php

Revision 1327, 3.7 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_lostpassword.tpl');
27 $tpl->define_dynamic('page_message', 'page');
28 $tpl->define_dynamic('logged_from', 'page');
29 $tpl->define_dynamic('custom_buttons', 'page');
30
31 $theme_color = Config::get('USER_INITIAL_THEME');
32 $user_id = $_SESSION['user_id'];
33
34 $selected_on = '';
35 $selected_off = '';
36
37 $data_1 = get_lostpassword_activation_email($user_id);
38 $data_2 = get_lostpassword_password_email($user_id);
39
40 if (isset($_POST['uaction']) && $_POST['uaction'] == 'apply') {
41
42     $err_message = "";
43
44     $data_1['subject'] = clean_input($_POST['subject1'], false);
45     $data_1['message'] = clean_input($_POST['message1'], false);
46     $data_2['subject'] = clean_input($_POST['subject2'], false);
47     $data_2['message'] = clean_input($_POST['message2'], false);
48
49     if (empty($data_1['subject']) OR empty($data_2['subject'])) {
50         $err_message = tr('Please specify a subject!');
51     }
52     if (empty($data_1['message']) OR empty($data_2['message'])) {
53         $err_message = tr('Please specify message!');
54     }
55
56     if(!empty($err_message)) {
57         set_page_message($err_message);
58         return false;
59     }
60     else {
61         set_lostpassword_activation_email($user_id, $data_1);
62         set_lostpassword_password_email($user_id, $data_2);
63         set_page_message(tr('Auto email template data updated!'));
64     }
65 }
66
67 /*
68  *
69  * static page messages.
70  *
71  */
72
73 $tpl->assign(
74             array(
75                 'TR_LOSTPW_EMAL_SETUP' => tr('ispCP - Reseller/Lostpw email setup'),
76                 'THEME_COLOR_PATH' => "../themes/$theme_color",
77                 'THEME_CHARSET' => tr('encoding'),
78                 'ISP_LOGO' => get_logo($_SESSION['user_id'])
79             )
80         );
81
82 gen_reseller_mainmenu($tpl, Config::get('RESELLER_TEMPLATE_PATH') . '/main_menu_users_manage.tpl');
83 gen_reseller_menu($tpl, Config::get('RESELLER_TEMPLATE_PATH') . '/menu_users_manage.tpl');
84
85 gen_logged_from($tpl);
86
87 $tpl->assign(
88         array(
89             'TR_LOSTPW_EMAIL' => tr('Lostpw email'),
90             'TR_MESSAGE_TEMPLATE_INFO' => tr('Message template info'),
91             'TR_MESSAGE_TEMPLATE' => tr('Message template'),
92             'SUBJECT_VALUE1' => $data_1['subject'],
93             'MESSAGE_VALUE1' => $data_1['message'],
94             'SUBJECT_VALUE2' => $data_2['subject'],
95             'MESSAGE_VALUE2' => $data_2['message'],
96             'SENDER_EMAIL_VALUE' => $data_1['sender_email'],
97             'SENDER_NAME_VALUE' => $data_1['sender_name'],
98             'TR_ACTIVATION_EMAIL' => tr('Activation E-Mail'),
99             'TR_PASSWORD_EMAIL' => tr('Password E-Mail'),
100             'TR_USER_LOGIN_NAME' => tr('User login (system) name'),
101             'TR_USER_PASSWORD' => tr('User password'),
102             'TR_USER_REAL_NAME' => tr('User (first and last) name'),
103             'TR_LOSTPW_LINK' => tr('Lostpw link'),
104             'TR_SUBJECT' => tr('Subject'),
105             'TR_MESSAGE' => tr('Message'),
106             'TR_SENDER_EMAIL' => tr('Senders email'),
107             'TR_SENDER_NAME' => tr('Senders name'),
108             'TR_APPLY_CHANGES' => tr('Apply changes'),
109             'TR_BASE_SERVER_VHOST' => tr('URL to this admin panel')
110             )
111         );
112
113 gen_page_message($tpl);
114
115 $tpl->parse('PAGE', 'page');
116 $tpl->prnt();
117
118 if (Config::get('DUMP_GUI_DEBUG'))
119     dump_gui_debug();
120
121 unset_messages();
122
123 ?>
Note: See TracBrowser for help on using the browser.