1
|
<?php
|
2
|
/*
|
3
|
*
|
4
|
* About WebsiteBaker
|
5
|
*
|
6
|
* Website Baker is a PHP-based Content Management System (CMS)
|
7
|
* designed with one goal in mind: to enable its users to produce websites
|
8
|
* with ease.
|
9
|
*
|
10
|
* LICENSE INFORMATION
|
11
|
*
|
12
|
* WebsiteBaker is free software; you can redistribute it and/or
|
13
|
* modify it under the terms of the GNU General Public License
|
14
|
* as published by the Free Software Foundation; either version 2
|
15
|
* of the License, or (at your option) any later version.
|
16
|
*
|
17
|
* WebsiteBaker is distributed in the hope that it will be useful,
|
18
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
19
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
20
|
* See the GNU General Public License for more details.
|
21
|
*
|
22
|
* You should have received a copy of the GNU General Public License
|
23
|
* along with this program; if not, write to the Free Software
|
24
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
25
|
*
|
26
|
* WebsiteBaker Extra Information
|
27
|
*
|
28
|
*
|
29
|
*/
|
30
|
/**
|
31
|
*
|
32
|
* @category frontend
|
33
|
* @package account
|
34
|
* @author WebsiteBaker Project
|
35
|
* @copyright 2004-2009, Ryan Djurovich
|
36
|
* @copyright 2009-2010, Website Baker Org. e.V.
|
37
|
* @link http://www.websitebaker2.org/
|
38
|
* @license http://www.gnu.org/licenses/gpl.html
|
39
|
* @platform WebsiteBaker 2.8.x
|
40
|
* @requirements PHP 4.3.4 and higher
|
41
|
* @version $Id: preferences_form.php 1268 2010-01-22 17:21:02Z Luisehahne $
|
42
|
* @filesource $HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/account/preferences_form.php $
|
43
|
* @lastmodified $Date: 2010-01-22 18:21:02 +0100 (Fri, 22 Jan 2010) $
|
44
|
*
|
45
|
*/
|
46
|
|
47
|
if(!defined('WB_URL')) die(header('Location: ../../index.php'));
|
48
|
|
49
|
?>
|
50
|
|
51
|
<h2> <?php print $HEADING['MY_SETTINGS']; ?></h2>
|
52
|
|
53
|
<form name="user" action="<?php print WB_URL.'/account/preferences.php'; ?>" method="post" style="margin-bottom: 5px;">
|
54
|
<input type="hidden" name="user_id" value="{USER_ID}" />
|
55
|
|
56
|
<table cellpadding="5" cellspacing="0" border="0" width="97%">
|
57
|
<tr>
|
58
|
<td width="140"><?php print $TEXT['DISPLAY_NAME']; ?>:</td>
|
59
|
<td class="value_input">
|
60
|
<input type="text" name="display_name" style="width: 380px;" maxlength="255" value="<?php print $wb->get_display_name(); ?>" />
|
61
|
</td>
|
62
|
</tr>
|
63
|
<tr>
|
64
|
<td><?php print $TEXT['LANGUAGE']; ?>:</td>
|
65
|
<td>
|
66
|
<select name="language" style="width: 380px;">
|
67
|
<?php
|
68
|
/**
|
69
|
*
|
70
|
* Getting the languages from the database. (addons)
|
71
|
* It's a little bit corious, but the language-shortform is
|
72
|
* storred in the field "directory" ...
|
73
|
*
|
74
|
*/
|
75
|
$query = "SELECT directory, name from ".TABLE_PREFIX."addons where type='language' order by 'name'";
|
76
|
$result = $database->query($query);
|
77
|
if ($result) {
|
78
|
$options_html = "";
|
79
|
while($data = $result->fetchRow()) {
|
80
|
$sel = ($data['directory'] == LANGUAGE) ? " selected=\"selected\" " : "";
|
81
|
$options_html .= "<option value=\"".$data['directory']."\" ".$sel.">".$data['name']." (".$data['directory'].")</option>\n";
|
82
|
}
|
83
|
echo $options_html;
|
84
|
}
|
85
|
?>
|
86
|
</select>
|
87
|
</td>
|
88
|
</tr>
|
89
|
<tr>
|
90
|
<td><?php print $TEXT['TIMEZONE']; ?>:</td>
|
91
|
<td>
|
92
|
<select name="timezone" style="width: 380px;">
|
93
|
<option value="-20"><?php print $TEXT['PLEASE_SELECT']; ?>...</option>
|
94
|
<?php
|
95
|
// Insert default timezone values
|
96
|
require_once(ADMIN_PATH.'/interface/timezones.php');
|
97
|
$test_time = $wb->get_timezone();
|
98
|
$options_html = "";
|
99
|
foreach($TIMEZONES as $hour_offset => $title) {
|
100
|
$sel = ($test_time == $hour_offset*60*60) ? " selected=\"selected\" " : "";
|
101
|
$options_html .= "<option value=\"".$hour_offset."\" ".$sel.">".$title."</option>\n";
|
102
|
}
|
103
|
print $options_html;
|
104
|
?>
|
105
|
|
106
|
</select>
|
107
|
</td>
|
108
|
</tr>
|
109
|
<tr>
|
110
|
<td><?php print $TEXT['DATE_FORMAT']; ?>:</td>
|
111
|
<td>
|
112
|
<select name="date_format" style="width: 98%;">
|
113
|
<option value=""><?php print $TEXT['PLEASE_SELECT']; ?>...</option>
|
114
|
<?php
|
115
|
// Insert date format list
|
116
|
$user_time = true;
|
117
|
require_once(ADMIN_PATH.'/interface/date_formats.php');
|
118
|
foreach($DATE_FORMATS AS $format => $title) {
|
119
|
$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
|
120
|
if($format != 'system_default') {
|
121
|
$value = $format;
|
122
|
} else {
|
123
|
$value = '';
|
124
|
}
|
125
|
if(DATE_FORMAT == $format AND !isset($_SESSION['USE_DEFAULT_DATE_FORMAT'])) {
|
126
|
$selected = ' selected="selected"';
|
127
|
} elseif($format == 'system_default' AND isset($_SESSION['USE_DEFAULT_DATE_FORMAT'])) {
|
128
|
$selected = ' selected="selected"';
|
129
|
} else {
|
130
|
$selected = '';
|
131
|
}
|
132
|
print '<option value="'.$value.'"'.$selected.'>'.$title.'</option>'."\n";
|
133
|
}
|
134
|
?>
|
135
|
</select>
|
136
|
</td>
|
137
|
</tr>
|
138
|
<tr>
|
139
|
<td><?php print $TEXT['TIME_FORMAT']; ?>:</td>
|
140
|
<td>
|
141
|
<select name="time_format" style="width: 98%;">
|
142
|
<option value=""><?php print $TEXT['PLEASE_SELECT']; ?>...</option>
|
143
|
<?php
|
144
|
// Insert time format list
|
145
|
$user_time = true;
|
146
|
require_once(ADMIN_PATH.'/interface/time_formats.php');
|
147
|
foreach($TIME_FORMATS AS $format => $title)
|
148
|
{
|
149
|
$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
|
150
|
$value = ($format != 'system_default') ? $format : '';
|
151
|
|
152
|
$selected = ((TIME_FORMAT == $format AND ! isset($_SESSION['USE_DEFAULT_TIME_FORMAT']))
|
153
|
OR ($format == 'system_default' AND isset($_SESSION['USE_DEFAULT_TIME_FORMAT'])))
|
154
|
? ' selected="selected"' : '';
|
155
|
|
156
|
print '<option value="'.$value.'"'.$selected.'>'.$title.'</option>';
|
157
|
}
|
158
|
?>
|
159
|
</select>
|
160
|
</td>
|
161
|
</tr>
|
162
|
<tr>
|
163
|
<td> </td>
|
164
|
<td>
|
165
|
<input type="submit" name="submit" value="<?php print $TEXT['SAVE']; ?>" />
|
166
|
<input type="reset" name="reset" value="<?php print $TEXT['RESET']; ?>" />
|
167
|
</td>
|
168
|
</tr>
|
169
|
</table>
|
170
|
|
171
|
</form>
|
172
|
|
173
|
<h2> <?php print $HEADING['MY_EMAIL']; ?></h2>
|
174
|
|
175
|
<form name="email" action="<?php print WB_URL.'/account/preferences.php'; ?>" method="post" style="margin-bottom: 5px;">
|
176
|
<input type="hidden" name="user_id" value="{USER_ID}" />
|
177
|
|
178
|
<table cellpadding="5" cellspacing="0" border="0" width="97%">
|
179
|
<tr>
|
180
|
<td width="140"><?php print $TEXT['CURRENT_PASSWORD']; ?>:</td>
|
181
|
<td>
|
182
|
<input type="password" name="current_password" style="width: 380px;" />
|
183
|
</td>
|
184
|
</tr>
|
185
|
<tr>
|
186
|
<td><?php print $TEXT['EMAIL']; ?>:</td>
|
187
|
<td class="value_input">
|
188
|
<input type="text" name="email" style="width: 380px;" maxlength="255" value="<?php print $wb->get_email(); ?>" />
|
189
|
</td>
|
190
|
</tr>
|
191
|
<tr>
|
192
|
<td> </td>
|
193
|
<td>
|
194
|
<input type="submit" name="submit" value="<?php print $TEXT['SAVE']; ?>" />
|
195
|
<input type="reset" name="reset" value="<?php print $TEXT['RESET']; ?>" />
|
196
|
</td>
|
197
|
</tr>
|
198
|
</table>
|
199
|
|
200
|
</form>
|
201
|
|
202
|
|
203
|
<h2> <?php print $HEADING['MY_PASSWORD']; ?></h2>
|
204
|
|
205
|
<form name="user" action="<?php print WB_URL.'/account/preferences.php'; ?>" method="post">
|
206
|
<input type="hidden" name="user_id" value="{USER_ID}" />
|
207
|
|
208
|
<table cellpadding="5" cellspacing="0" border="0" width="97%">
|
209
|
<tr>
|
210
|
<td width="140"><?php print $TEXT['CURRENT_PASSWORD']; ?>:</td>
|
211
|
<td>
|
212
|
<input type="password" name="current_password" style="width: 380px;" />
|
213
|
</td>
|
214
|
</tr>
|
215
|
<tr>
|
216
|
<td><?php print $TEXT['NEW_PASSWORD']; ?>:</td>
|
217
|
<td>
|
218
|
<input type="password" name="new_password" style="width: 380px;" />
|
219
|
</td>
|
220
|
</tr>
|
221
|
<tr>
|
222
|
<td><?php print $TEXT['RETYPE_NEW_PASSWORD']; ?>:</td>
|
223
|
<td>
|
224
|
<input type="password" name="new_password2" style="width: 380px;" />
|
225
|
</td>
|
226
|
</tr>
|
227
|
<tr>
|
228
|
<td> </td>
|
229
|
<td>
|
230
|
<input type="submit" name="submit" value="<?php print $TEXT['SAVE']; ?>" />
|
231
|
<input type="reset" name="reset" value="<?php print $TEXT['RESET']; ?>" />
|
232
|
</td>
|
233
|
</tr>
|
234
|
</table>
|
235
|
|
236
|
</form>
|