Revision 1190
Added by Luisehahne almost 16 years ago
| branches/2.8.x/CHANGELOG | ||
|---|---|---|
| 12 | 12 |
|
| 13 | 13 |
------------------------------------- 2.8.1 ------------------------------------- |
| 14 | 14 |
26-Nov-2009 Dietmar Woellbrink (Luisehahne) |
| 15 |
! validate some output files |
|
| 16 |
26-Nov-2009 Dietmar Woellbrink (Luisehahne) |
|
| 15 | 17 |
! fix some PHP 5.3 deprecated functions |
| 16 | 18 |
25-Nov-2009 Dietmar Woellbrink (Luisehahne) |
| 17 | 19 |
! Fix to load edit_full_area only if needed |
| branches/2.8.x/wb/account/login_form.php | ||
|---|---|---|
| 1 |
<?php |
|
| 2 |
|
|
| 3 |
// $Id$ |
|
| 4 |
|
|
| 5 |
/* |
|
| 6 |
|
|
| 7 |
Website Baker Project <http://www.websitebaker.org/> |
|
| 8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
| 9 |
|
|
| 10 |
Website Baker is free software; you can redistribute it and/or modify |
|
| 11 |
it under the terms of the GNU General Public License as published by |
|
| 12 |
the Free Software Foundation; either version 2 of the License, or |
|
| 13 |
(at your option) any later version. |
|
| 14 |
|
|
| 15 |
Website Baker is distributed in the hope that it will be useful, |
|
| 16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 18 |
GNU General Public License for more details. |
|
| 19 |
|
|
| 20 |
You should have received a copy of the GNU General Public License |
|
| 21 |
along with Website Baker; if not, write to the Free Software |
|
| 22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
| 23 |
|
|
| 24 |
*/ |
|
| 25 |
|
|
| 26 |
if(!defined('WB_URL')) {
|
|
| 27 |
header('Location: ../pages/index.php');
|
|
| 28 |
exit(0); |
|
| 29 |
} |
|
| 30 |
|
|
| 31 |
if(defined('SMART_LOGIN') AND SMART_LOGIN == 'enabled') {
|
|
| 32 |
// Generate username field name |
|
| 33 |
$username_fieldname = 'username_'; |
|
| 34 |
$password_fieldname = 'password_'; |
|
| 35 |
$salt = "abchefghjkmnpqrstuvwxyz0123456789"; |
|
| 36 |
srand((double)microtime()*1000000); |
|
| 37 |
$i = 0; |
|
| 38 |
while ($i <= 7) {
|
|
| 39 |
$num = rand() % 33; |
|
| 40 |
$tmp = substr($salt, $num, 1); |
|
| 41 |
$username_fieldname = $username_fieldname . $tmp; |
|
| 42 |
$password_fieldname = $password_fieldname . $tmp; |
|
| 43 |
$i++; |
|
| 44 |
} |
|
| 45 |
} else {
|
|
| 46 |
$username_fieldname = 'username'; |
|
| 47 |
$password_fieldname = 'password'; |
|
| 48 |
} |
|
| 49 |
|
|
| 50 |
?> |
|
| 51 |
<style> |
|
| 52 |
.value_input input, .value_input text, .value_input select {
|
|
| 53 |
width: 220px; |
|
| 54 |
} |
|
| 55 |
</style> |
|
| 56 |
|
|
| 57 |
<h1> Login</h1> |
|
| 58 |
<?php echo $thisApp->message; ?> |
|
| 59 |
<br /> |
|
| 60 |
<br /> |
|
| 61 |
|
|
| 62 |
<form name="login" action="<?php echo WB_URL.'/account/login.php'; ?>" method="post"> |
|
| 63 |
<input type="hidden" name="username_fieldname" value="<?php echo $username_fieldname; ?>" /> |
|
| 64 |
<input type="hidden" name="password_fieldname" value="<?php echo $password_fieldname; ?>" /> |
|
| 65 |
<input type="hidden" name="redirect" value="<?php echo $thisApp->redirect_url;?>" /> |
|
| 66 |
|
|
| 67 |
<table cellpadding="5" cellspacing="0" border="0" width="90%"> |
|
| 68 |
<tr> |
|
| 69 |
<td width="100"><?php echo $TEXT['USERNAME']; ?>:</td> |
|
| 70 |
<td class="value_input"> |
|
| 71 |
<input type="text" name="<?php echo $username_fieldname; ?>" maxlength="30" /> |
|
| 72 |
<script type="text/javascript" language="javascript"> |
|
| 73 |
document.login.<?php echo $username_fieldname; ?>.focus(); |
|
| 74 |
</script> |
|
| 75 |
</td> |
|
| 76 |
</tr> |
|
| 77 |
<tr> |
|
| 78 |
<td width="100"><?php echo $TEXT['PASSWORD']; ?>:</td> |
|
| 79 |
<td class="value_input"> |
|
| 80 |
<input type="password" name="<?php echo $password_fieldname; ?>" maxlength="30" /> |
|
| 81 |
</td> |
|
| 82 |
</tr> |
|
| 83 |
<?php if($username_fieldname != 'username') { ?>
|
|
| 84 |
<tr> |
|
| 85 |
<td> </td> |
|
| 86 |
<td> |
|
| 87 |
<input type="checkbox" name="remember" id="remember" value="true" /> |
|
| 88 |
<label for="remember"> |
|
| 89 |
<?php echo $TEXT['REMEMBER_ME']; ?> |
|
| 90 |
</label> |
|
| 91 |
</td> |
|
| 92 |
</tr> |
|
| 93 |
<?php } ?> |
|
| 94 |
<tr> |
|
| 95 |
<td> </td> |
|
| 96 |
<td> |
|
| 97 |
<input type="submit" name="submit" value="<?php echo $TEXT['LOGIN']; ?>" /> |
|
| 98 |
<input type="reset" name="reset" value="<?php echo $TEXT['RESET']; ?>" /> |
|
| 99 |
</td> |
|
| 100 |
</tr> |
|
| 101 |
</table> |
|
| 102 |
|
|
| 103 |
</form> |
|
| 104 |
|
|
| 105 |
<br /> |
|
| 106 |
|
|
| 1 |
<?php |
|
| 2 |
|
|
| 3 |
// $Id$ |
|
| 4 |
|
|
| 5 |
/* |
|
| 6 |
|
|
| 7 |
Website Baker Project <http://www.websitebaker.org/> |
|
| 8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
| 9 |
|
|
| 10 |
Website Baker is free software; you can redistribute it and/or modify |
|
| 11 |
it under the terms of the GNU General Public License as published by |
|
| 12 |
the Free Software Foundation; either version 2 of the License, or |
|
| 13 |
(at your option) any later version. |
|
| 14 |
|
|
| 15 |
Website Baker is distributed in the hope that it will be useful, |
|
| 16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 18 |
GNU General Public License for more details. |
|
| 19 |
|
|
| 20 |
You should have received a copy of the GNU General Public License |
|
| 21 |
along with Website Baker; if not, write to the Free Software |
|
| 22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
| 23 |
|
|
| 24 |
*/ |
|
| 25 |
|
|
| 26 |
if(!defined('WB_URL')) die(header('Location: ../../index.php'));
|
|
| 27 |
|
|
| 28 |
$username_fieldname = 'username'; |
|
| 29 |
$password_fieldname = 'password'; |
|
| 30 |
|
|
| 31 |
if(defined('SMART_LOGIN') AND SMART_LOGIN == 'enabled') {
|
|
| 32 |
// Generate username field name |
|
| 33 |
$username_fieldname = 'username_'; |
|
| 34 |
$password_fieldname = 'password_'; |
|
| 35 |
|
|
| 36 |
$temp = array_merge(range('a','z'), range(0,9));
|
|
| 37 |
shuffle($temp); |
|
| 38 |
for($i=0;$i<=7;$i++) {
|
|
| 39 |
$username_fieldname .= $temp[$i]; |
|
| 40 |
$password_fieldname .= $temp[$i]; |
|
| 41 |
} |
|
| 42 |
} |
|
| 43 |
?> |
|
| 44 |
<h1> Login</h1> |
|
| 45 |
<?php echo $thisApp->message; ?> |
|
| 46 |
<br /> |
|
| 47 |
<br /> |
|
| 48 |
|
|
| 49 |
<form action="<?php echo WB_URL.'/account/login.php'; ?>" method="post"> |
|
| 50 |
<p style="display:none;"><input type="hidden" name="username_fieldname" value="<?php echo $username_fieldname; ?>" /></p> |
|
| 51 |
<p style="display:none;"><input type="hidden" name="password_fieldname" value="<?php echo $password_fieldname; ?>" /></p> |
|
| 52 |
<p style="display:none;"><input type="hidden" name="redirect" value="<?php echo $thisApp->redirect_url;?>" /></p> |
|
| 53 |
|
|
| 54 |
<table cellpadding="5" cellspacing="0" border="0" width="90%"> |
|
| 55 |
<tr> |
|
| 56 |
<td style="width:100px"><?php echo $TEXT['USERNAME']; ?>:</td> |
|
| 57 |
<td class="value_input"> |
|
| 58 |
<input type="text" name="<?php echo $username_fieldname; ?>" maxlength="30" style="width:220px;"/> |
|
| 59 |
<script type="text/javascript"> |
|
| 60 |
document.login.<?php echo $username_fieldname; ?>.focus(); |
|
| 61 |
</script> |
|
| 62 |
</td> |
|
| 63 |
</tr> |
|
| 64 |
<tr> |
|
| 65 |
<td style="width:100px"><?php echo $TEXT['PASSWORD']; ?>:</td> |
|
| 66 |
<td class="value_input"> |
|
| 67 |
<input type="password" name="<?php echo $password_fieldname; ?>" maxlength="30" style="width:220px;"/> |
|
| 68 |
</td> |
|
| 69 |
</tr> |
|
| 70 |
<?php if($username_fieldname != 'username') { ?>
|
|
| 71 |
<tr> |
|
| 72 |
<td> </td> |
|
| 73 |
<td> |
|
| 74 |
<input type="checkbox" name="remember" id="remember" value="true"/> |
|
| 75 |
<label for="remember"><?php echo $TEXT['REMEMBER_ME']; ?></label> |
|
| 76 |
</td> |
|
| 77 |
</tr> |
|
| 78 |
<?php } ?> |
|
| 79 |
<tr> |
|
| 80 |
<td> </td> |
|
| 81 |
<td> |
|
| 82 |
<input type="submit" name="submit" value="<?php echo $TEXT['LOGIN']; ?>" /> |
|
| 83 |
<input type="reset" name="reset" value="<?php echo $TEXT['RESET']; ?>" /> |
|
| 84 |
</td> |
|
| 85 |
</tr> |
|
| 86 |
</table> |
|
| 87 |
|
|
| 88 |
</form> |
|
| 89 |
|
|
| 90 |
<br /> |
|
| 91 |
|
|
| 107 | 92 |
<a href="<?php echo WB_URL; ?>/account/forgot.php"><?php echo $TEXT['FORGOTTEN_DETAILS']; ?></a> |
| branches/2.8.x/wb/account/preferences_form.php | ||
|---|---|---|
| 1 |
<?php |
|
| 2 |
|
|
| 3 |
// $Id$ |
|
| 4 |
|
|
| 5 |
/* |
|
| 6 |
|
|
| 7 |
Website Baker Project <http://www.websitebaker.org/> |
|
| 8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
| 9 |
|
|
| 10 |
Website Baker is free software; you can redistribute it and/or modify |
|
| 11 |
it under the terms of the GNU General Public License as published by |
|
| 12 |
the Free Software Foundation; either version 2 of the License, or |
|
| 13 |
(at your option) any later version. |
|
| 14 |
|
|
| 15 |
Website Baker is distributed in the hope that it will be useful, |
|
| 16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 18 |
GNU General Public License for more details. |
|
| 19 |
|
|
| 20 |
You should have received a copy of the GNU General Public License |
|
| 21 |
along with Website Baker; if not, write to the Free Software |
|
| 22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
| 23 |
|
|
| 24 |
*/ |
|
| 25 |
|
|
| 26 |
if(!defined('WB_URL')) {
|
|
| 27 |
header('Location: ../index.php');
|
|
| 28 |
exit(0); |
|
| 29 |
} |
|
| 30 |
|
|
| 31 |
?> |
|
| 32 |
|
|
| 33 |
<h1> <?php echo $HEADING['MY_SETTINGS']; ?></h1> |
|
| 34 |
|
|
| 35 |
<form name="user" action="<?php echo WB_URL.'/account/preferences.php'; ?>" method="post" style="margin-bottom: 5px;"> |
|
| 36 |
<input type="hidden" name="user_id" value="{USER_ID}" />
|
|
| 37 |
|
|
| 38 |
<table cellpadding="5" cellspacing="0" border="0" width="97%"> |
|
| 39 |
<td width="140"><?php echo $TEXT['DISPLAY_NAME']; ?>:</td> |
|
| 40 |
<td class="value_input"> |
|
| 41 |
<input type="text" name="display_name" style="width: 380px;" maxlength="255" value="<?php echo $wb->get_display_name(); ?>" /> |
|
| 42 |
</td> |
|
| 43 |
</tr> |
|
| 44 |
<tr> |
|
| 45 |
<td><?php echo $TEXT['LANGUAGE']; ?>:</td> |
|
| 46 |
<td> |
|
| 47 |
<select name="language" style="width: 380px;"> |
|
| 48 |
<?php |
|
| 49 |
// Insert language values |
|
| 50 |
if($handle = opendir(WB_PATH.'/languages/')) {
|
|
| 51 |
while (false !== ($file = readdir($handle))) {
|
|
| 52 |
if($file != '.' AND $file != '..' AND $file != '.svn' AND $file != 'index.php') {
|
|
| 53 |
// Get language name |
|
| 54 |
require(WB_PATH.'/languages/'.$file); |
|
| 55 |
// Check if it is selected |
|
| 56 |
if(LANGUAGE == $language_code) {
|
|
| 57 |
?> |
|
| 58 |
<option value="<?php echo $language_code; ?>" selected><?php echo $language_name.' ('.$language_code.')'; ?></option>
|
|
| 59 |
<?php |
|
| 60 |
} else {
|
|
| 61 |
?> |
|
| 62 |
<option value="<?php echo $language_code; ?>"><?php echo $language_name.' ('.$language_code.')'; ?></option>
|
|
| 63 |
<?php |
|
| 64 |
} |
|
| 65 |
} |
|
| 66 |
} |
|
| 67 |
// Restore language to original file |
|
| 68 |
require(WB_PATH.'/languages/'.LANGUAGE.'.php'); |
|
| 69 |
} |
|
| 70 |
?> |
|
| 71 |
</select> |
|
| 72 |
</td> |
|
| 73 |
</tr> |
|
| 74 |
<tr> |
|
| 75 |
<td><?php echo $TEXT['TIMEZONE']; ?>:</td> |
|
| 76 |
<td> |
|
| 77 |
<select name="timezone" style="width: 380px;"> |
|
| 78 |
<option value="-20"><?php echo $TEXT['PLEASE_SELECT']; ?>...</option> |
|
| 79 |
<?php |
|
| 80 |
// Insert default timezone values |
|
| 81 |
require_once(ADMIN_PATH.'/interface/timezones.php'); |
|
| 82 |
foreach($TIMEZONES AS $hour_offset => $title) {
|
|
| 83 |
if($wb->get_timezone() == $hour_offset*60*60) {
|
|
| 84 |
?> |
|
| 85 |
<option value="<?php echo $hour_offset; ?>" selected><?php echo $title; ?></option> |
|
| 86 |
<?php |
|
| 87 |
} else {
|
|
| 88 |
?> |
|
| 89 |
<option value="<?php echo $hour_offset; ?>"><?php echo $title; ?></option> |
|
| 90 |
<?php |
|
| 91 |
} |
|
| 92 |
} |
|
| 93 |
?> |
|
| 94 |
</select> |
|
| 95 |
</td> |
|
| 96 |
</tr> |
|
| 97 |
<tr> |
|
| 98 |
<td><?php echo $TEXT['DATE_FORMAT']; ?>:</td> |
|
| 99 |
<td> |
|
| 100 |
<select name="date_format" style="width: 98%;"> |
|
| 101 |
<option value="">Please select...</option> |
|
| 102 |
<?php |
|
| 103 |
// Insert date format list |
|
| 104 |
$user_time = true; |
|
| 105 |
require_once(ADMIN_PATH.'/interface/date_formats.php'); |
|
| 106 |
foreach($DATE_FORMATS AS $format => $title) {
|
|
| 107 |
$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
|
|
| 108 |
if($format != 'system_default') {
|
|
| 109 |
$value = $format; |
|
| 110 |
} else {
|
|
| 111 |
$value = ''; |
|
| 112 |
} |
|
| 113 |
if(DATE_FORMAT == $format AND !isset($_SESSION['USE_DEFAULT_DATE_FORMAT'])) {
|
|
| 114 |
$selected = ' selected'; |
|
| 115 |
} elseif($format == 'system_default' AND isset($_SESSION['USE_DEFAULT_DATE_FORMAT'])) {
|
|
| 116 |
$selected = ' selected'; |
|
| 117 |
} else {
|
|
| 118 |
$selected = ''; |
|
| 119 |
} |
|
| 120 |
echo '<option value="'.$value.'"'.$selected.'>'.$title.'</option>'; |
|
| 121 |
} |
|
| 122 |
?>> |
|
| 123 |
</select> |
|
| 124 |
</td> |
|
| 125 |
</tr> |
|
| 126 |
<tr> |
|
| 127 |
<td><?php echo $TEXT['TIME_FORMAT']; ?>:</td> |
|
| 128 |
<td> |
|
| 129 |
<select name="time_format" style="width: 98%;"> |
|
| 130 |
<option value="">Please select...</option> |
|
| 131 |
<?php |
|
| 132 |
// Insert time format list |
|
| 133 |
$user_time = true; |
|
| 134 |
require_once(ADMIN_PATH.'/interface/time_formats.php'); |
|
| 135 |
foreach($TIME_FORMATS AS $format => $title) {
|
|
| 136 |
$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
|
|
| 137 |
if($format != 'system_default') {
|
|
| 138 |
$value = $format; |
|
| 139 |
} else {
|
|
| 140 |
$value = ''; |
|
| 141 |
} |
|
| 142 |
if(TIME_FORMAT == $format AND !isset($_SESSION['USE_DEFAULT_TIME_FORMAT'])) {
|
|
| 143 |
$selected = ' selected'; |
|
| 144 |
} elseif($format == 'system_default' AND isset($_SESSION['USE_DEFAULT_TIME_FORMAT'])) {
|
|
| 145 |
$selected = ' selected'; |
|
| 146 |
} else {
|
|
| 147 |
$selected = ''; |
|
| 148 |
} |
|
| 149 |
echo '<option value="'.$value.'"'.$selected.'>'.$title.'</option>'; |
|
| 150 |
} |
|
| 151 |
?> |
|
| 152 |
</select> |
|
| 153 |
</td> |
|
| 154 |
</tr> |
|
| 155 |
<tr> |
|
| 156 |
<td> </td> |
|
| 157 |
<td> |
|
| 158 |
<input type="submit" name="submit" value="<?php echo $TEXT['SAVE']; ?>" /> |
|
| 159 |
<input type="reset" name="reset" value="<?php echo $TEXT['RESET']; ?>" /> |
|
| 160 |
</td> |
|
| 161 |
</tr> |
|
| 162 |
</table> |
|
| 163 |
|
|
| 164 |
</form> |
|
| 165 |
|
|
| 166 |
|
|
| 167 |
<h1> <?php echo $HEADING['MY_EMAIL']; ?></h1> |
|
| 168 |
|
|
| 169 |
<form name="email" action="<?php echo WB_URL.'/account/preferences.php'; ?>" method="post" style="margin-bottom: 5px;"> |
|
| 170 |
<input type="hidden" name="user_id" value="{USER_ID}" />
|
|
| 171 |
|
|
| 172 |
<table cellpadding="5" cellspacing="0" border="0" width="97%"> |
|
| 173 |
<tr> |
|
| 174 |
<td width="140"><?php echo $TEXT['CURRENT_PASSWORD']; ?>:</td> |
|
| 175 |
<td> |
|
| 176 |
<input type="password" name="current_password" style="width: 380px;" /> |
|
| 177 |
</td> |
|
| 178 |
</tr> |
|
| 179 |
<tr> |
|
| 180 |
<td><?php echo $TEXT['EMAIL']; ?>:</td> |
|
| 181 |
<td class="value_input"> |
|
| 182 |
<input type="text" name="email" style="width: 380px;" maxlength="255" value="<?php echo $wb->get_email(); ?>" /> |
|
| 183 |
</td> |
|
| 184 |
</tr> |
|
| 185 |
<tr> |
|
| 186 |
<td> </td> |
|
| 187 |
<td> |
|
| 188 |
<input type="submit" name="submit" value="<?php echo $TEXT['SAVE']; ?>" /> |
|
| 189 |
<input type="reset" name="reset" value="<?php echo $TEXT['RESET']; ?>" /> |
|
| 190 |
</td> |
|
| 191 |
</tr> |
|
| 192 |
</table> |
|
| 193 |
|
|
| 194 |
</form> |
|
| 195 |
|
|
| 196 |
|
|
| 197 |
<h1> <?php echo $HEADING['MY_PASSWORD']; ?></h1> |
|
| 198 |
|
|
| 199 |
<form name="user" action="<?php echo WB_URL.'/account/preferences.php'; ?>" method="post"> |
|
| 200 |
<input type="hidden" name="user_id" value="{USER_ID}" />
|
|
| 201 |
|
|
| 202 |
<table cellpadding="5" cellspacing="0" border="0" width="97%"> |
|
| 203 |
<tr> |
|
| 204 |
<td width="140"><?php echo $TEXT['CURRENT_PASSWORD']; ?>:</td> |
|
| 205 |
<td> |
|
| 206 |
<input type="password" name="current_password" style="width: 380px;" /> |
|
| 207 |
</td> |
|
| 208 |
</tr> |
|
| 209 |
<tr> |
|
| 210 |
<td><?php echo $TEXT['NEW_PASSWORD']; ?>:</td> |
|
| 211 |
<td> |
|
| 212 |
<input type="password" name="new_password" style="width: 380px;" /> |
|
| 213 |
</td> |
|
| 214 |
</tr> |
|
| 215 |
<tr> |
|
| 216 |
<td><?php echo $TEXT['RETYPE_NEW_PASSWORD']; ?>:</td> |
|
| 217 |
<td> |
|
| 218 |
<input type="password" name="new_password2" style="width: 380px;" /> |
|
| 219 |
</td> |
|
| 220 |
</tr> |
|
| 221 |
</tr> |
|
| 222 |
<tr> |
|
| 223 |
<td> </td> |
|
| 224 |
<td> |
|
| 225 |
<input type="submit" name="submit" value="<?php echo $TEXT['SAVE']; ?>" /> |
|
| 226 |
<input type="reset" name="reset" value="<?php echo $TEXT['RESET']; ?>" /> |
|
| 227 |
</td> |
|
| 228 |
</tr> |
|
| 229 |
</table> |
|
| 230 |
|
|
| 1 |
<?php |
|
| 2 |
|
|
| 3 |
// $Id$ |
|
| 4 |
|
|
| 5 |
/* |
|
| 6 |
|
|
| 7 |
Website Baker Project <http://www.websitebaker.org/> |
|
| 8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
| 9 |
|
|
| 10 |
Website Baker is free software; you can redistribute it and/or modify |
|
| 11 |
it under the terms of the GNU General Public License as published by |
|
| 12 |
the Free Software Foundation; either version 2 of the License, or |
|
| 13 |
(at your option) any later version. |
|
| 14 |
|
|
| 15 |
Website Baker is distributed in the hope that it will be useful, |
|
| 16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 18 |
GNU General Public License for more details. |
|
| 19 |
|
|
| 20 |
You should have received a copy of the GNU General Public License |
|
| 21 |
along with Website Baker; if not, write to the Free Software |
|
| 22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
| 23 |
|
|
| 24 |
*/ |
|
| 25 |
|
|
| 26 |
if(!defined('WB_URL')) die(header('Location: ../../index.php'));
|
|
| 27 |
|
|
| 28 |
?> |
|
| 29 |
|
|
| 30 |
<h2> <?php print $HEADING['MY_SETTINGS']; ?></h2> |
|
| 31 |
|
|
| 32 |
<form name="user" action="<?php print WB_URL.'/account/preferences.php'; ?>" method="post" style="margin-bottom: 5px;"> |
|
| 33 |
<input type="hidden" name="user_id" value="{USER_ID}" />
|
|
| 34 |
|
|
| 35 |
<table cellpadding="5" cellspacing="0" border="0" width="97%"> |
|
| 36 |
<tr> |
|
| 37 |
<td width="140"><?php print $TEXT['DISPLAY_NAME']; ?>:</td> |
|
| 38 |
<td class="value_input"> |
|
| 39 |
<input type="text" name="display_name" style="width: 380px;" maxlength="255" value="<?php print $wb->get_display_name(); ?>" /> |
|
| 40 |
</td> |
|
| 41 |
</tr> |
|
| 42 |
<tr> |
|
| 43 |
<td><?php print $TEXT['LANGUAGE']; ?>:</td> |
|
| 44 |
<td> |
|
| 45 |
<select name="language" style="width: 380px;"> |
|
| 46 |
<?php |
|
| 47 |
/** |
|
| 48 |
* |
|
| 49 |
* Getting the languages from the database. (addons) |
|
| 50 |
* It's a little bit corious, but the language-shortform is |
|
| 51 |
* storred in the field "directory" ... |
|
| 52 |
* |
|
| 53 |
*/ |
|
| 54 |
$query = "SELECT directory, name from ".TABLE_PREFIX."addons where type='language' order by 'name'"; |
|
| 55 |
$result = $database->query($query); |
|
| 56 |
if ($result) {
|
|
| 57 |
$options_html = ""; |
|
| 58 |
while($data = $result->fetchRow()) {
|
|
| 59 |
$sel = ($data['directory'] == LANGUAGE) ? " selected=\"selected\" " : ""; |
|
| 60 |
$options_html .= "<option value=\"".$data['directory']."\" ".$sel.">".$data['name']." (".$data['directory'].")</option>\n";
|
|
| 61 |
} |
|
| 62 |
echo $options_html; |
|
| 63 |
} |
|
| 64 |
?> |
|
| 65 |
</select> |
|
| 66 |
</td> |
|
| 67 |
</tr> |
|
| 68 |
<tr> |
|
| 69 |
<td><?php print $TEXT['TIMEZONE']; ?>:</td> |
|
| 70 |
<td> |
|
| 71 |
<select name="timezone" style="width: 380px;"> |
|
| 72 |
<option value="-20"><?php print $TEXT['PLEASE_SELECT']; ?>...</option> |
|
| 73 |
<?php |
|
| 74 |
// Insert default timezone values |
|
| 75 |
require_once(ADMIN_PATH.'/interface/timezones.php'); |
|
| 76 |
$test_time = $wb->get_timezone(); |
|
| 77 |
$options_html = ""; |
|
| 78 |
foreach($TIMEZONES as $hour_offset => $title) {
|
|
| 79 |
$sel = ($test_time == $hour_offset*60*60) ? " selected=\"selected\" " : ""; |
|
| 80 |
$options_html .= "<option value=\"".$hour_offset."\" ".$sel.">".$title."</option>\n"; |
|
| 81 |
} |
|
| 82 |
print $options_html; |
|
| 83 |
?> |
|
| 84 |
|
|
| 85 |
</select> |
|
| 86 |
</td> |
|
| 87 |
</tr> |
|
| 88 |
<tr> |
|
| 89 |
<td><?php print $TEXT['DATE_FORMAT']; ?>:</td> |
|
| 90 |
<td> |
|
| 91 |
<select name="date_format" style="width: 98%;"> |
|
| 92 |
<option value="">Please select...</option> |
|
| 93 |
<?php |
|
| 94 |
// Insert date format list |
|
| 95 |
$user_time = true; |
|
| 96 |
require_once(ADMIN_PATH.'/interface/date_formats.php'); |
|
| 97 |
foreach($DATE_FORMATS AS $format => $title) {
|
|
| 98 |
$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
|
|
| 99 |
if($format != 'system_default') {
|
|
| 100 |
$value = $format; |
|
| 101 |
} else {
|
|
| 102 |
$value = ''; |
|
| 103 |
} |
|
| 104 |
if(DATE_FORMAT == $format AND !isset($_SESSION['USE_DEFAULT_DATE_FORMAT'])) {
|
|
| 105 |
$selected = ' selected="selected"'; |
|
| 106 |
} elseif($format == 'system_default' AND isset($_SESSION['USE_DEFAULT_DATE_FORMAT'])) {
|
|
| 107 |
$selected = ' selected="selected"'; |
|
| 108 |
} else {
|
|
| 109 |
$selected = ''; |
|
| 110 |
} |
|
| 111 |
print '<option value="'.$value.'"'.$selected.'>'.$title.'</option>'."\n"; |
|
| 112 |
} |
|
| 113 |
?> |
|
| 114 |
</select> |
|
| 115 |
</td> |
|
| 116 |
</tr> |
|
| 117 |
<tr> |
|
| 118 |
<td><?php print $TEXT['TIME_FORMAT']; ?>:</td> |
|
| 119 |
<td> |
|
| 120 |
<select name="time_format" style="width: 98%;"> |
|
| 121 |
<option value="">Please select...</option> |
|
| 122 |
<?php |
|
| 123 |
// Insert time format list |
|
| 124 |
$user_time = true; |
|
| 125 |
require_once(ADMIN_PATH.'/interface/time_formats.php'); |
|
| 126 |
foreach($TIME_FORMATS AS $format => $title) |
|
| 127 |
{
|
|
| 128 |
$format = str_replace('|', ' ', $format); // Add's white-spaces (not able to be stored in array key)
|
|
| 129 |
$value = ($format != 'system_default') ? $format : ''; |
|
| 130 |
|
|
| 131 |
$selected = ((TIME_FORMAT == $format AND ! isset($_SESSION['USE_DEFAULT_TIME_FORMAT'])) |
|
| 132 |
OR ($format == 'system_default' AND isset($_SESSION['USE_DEFAULT_TIME_FORMAT']))) |
|
| 133 |
? ' selected="selected"' : ''; |
|
| 134 |
|
|
| 135 |
print '<option value="'.$value.'"'.$selected.'>'.$title.'</option>'; |
|
| 136 |
} |
|
| 137 |
?> |
|
| 138 |
</select> |
|
| 139 |
</td> |
|
| 140 |
</tr> |
|
| 141 |
<tr> |
|
| 142 |
<td> </td> |
|
| 143 |
<td> |
|
| 144 |
<input type="submit" name="submit" value="<?php print $TEXT['SAVE']; ?>" /> |
|
| 145 |
<input type="reset" name="reset" value="<?php print $TEXT['RESET']; ?>" /> |
|
| 146 |
</td> |
|
| 147 |
</tr> |
|
| 148 |
</table> |
|
| 149 |
|
|
| 150 |
</form> |
|
| 151 |
|
|
| 152 |
<h2> <?php print $HEADING['MY_EMAIL']; ?></h2> |
|
| 153 |
|
|
| 154 |
<form name="email" action="<?php print WB_URL.'/account/preferences.php'; ?>" method="post" style="margin-bottom: 5px;"> |
|
| 155 |
<input type="hidden" name="user_id" value="{USER_ID}" />
|
|
| 156 |
|
|
| 157 |
<table cellpadding="5" cellspacing="0" border="0" width="97%"> |
|
| 158 |
<tr> |
|
| 159 |
<td width="140"><?php print $TEXT['CURRENT_PASSWORD']; ?>:</td> |
|
| 160 |
<td> |
|
| 161 |
<input type="password" name="current_password" style="width: 380px;" /> |
|
| 162 |
</td> |
|
| 163 |
</tr> |
|
| 164 |
<tr> |
|
| 165 |
<td><?php print $TEXT['EMAIL']; ?>:</td> |
|
| 166 |
<td class="value_input"> |
|
| 167 |
<input type="text" name="email" style="width: 380px;" maxlength="255" value="<?php print $wb->get_email(); ?>" /> |
|
| 168 |
</td> |
|
| 169 |
</tr> |
|
| 170 |
<tr> |
|
| 171 |
<td> </td> |
|
| 172 |
<td> |
|
| 173 |
<input type="submit" name="submit" value="<?php print $TEXT['SAVE']; ?>" /> |
|
| 174 |
<input type="reset" name="reset" value="<?php print $TEXT['RESET']; ?>" /> |
|
| 175 |
</td> |
|
| 176 |
</tr> |
|
| 177 |
</table> |
|
| 178 |
|
|
| 179 |
</form> |
|
| 180 |
|
|
| 181 |
|
|
| 182 |
<h2> <?php print $HEADING['MY_PASSWORD']; ?></h2> |
|
| 183 |
|
|
| 184 |
<form name="user" action="<?php print WB_URL.'/account/preferences.php'; ?>" method="post"> |
|
| 185 |
<input type="hidden" name="user_id" value="{USER_ID}" />
|
|
| 186 |
|
|
| 187 |
<table cellpadding="5" cellspacing="0" border="0" width="97%"> |
|
| 188 |
<tr> |
|
| 189 |
<td width="140"><?php print $TEXT['CURRENT_PASSWORD']; ?>:</td> |
|
| 190 |
<td> |
|
| 191 |
<input type="password" name="current_password" style="width: 380px;" /> |
|
| 192 |
</td> |
|
| 193 |
</tr> |
|
| 194 |
<tr> |
|
| 195 |
<td><?php print $TEXT['NEW_PASSWORD']; ?>:</td> |
|
| 196 |
<td> |
|
| 197 |
<input type="password" name="new_password" style="width: 380px;" /> |
|
| 198 |
</td> |
|
| 199 |
</tr> |
|
| 200 |
<tr> |
|
| 201 |
<td><?php print $TEXT['RETYPE_NEW_PASSWORD']; ?>:</td> |
|
| 202 |
<td> |
|
| 203 |
<input type="password" name="new_password2" style="width: 380px;" /> |
|
| 204 |
</td> |
|
| 205 |
</tr> |
|
| 206 |
<tr> |
|
| 207 |
<td> </td> |
|
| 208 |
<td> |
|
| 209 |
<input type="submit" name="submit" value="<?php print $TEXT['SAVE']; ?>" /> |
|
| 210 |
<input type="reset" name="reset" value="<?php print $TEXT['RESET']; ?>" /> |
|
| 211 |
</td> |
|
| 212 |
</tr> |
|
| 213 |
</table> |
|
| 214 |
|
|
| 231 | 215 |
</form> |
| branches/2.8.x/wb/account/signup_form.php | ||
|---|---|---|
| 1 |
<?php |
|
| 2 |
|
|
| 3 |
// $Id$ |
|
| 4 |
|
|
| 5 |
/* |
|
| 6 |
|
|
| 7 |
Website Baker Project <http://www.websitebaker.org/> |
|
| 8 |
Copyright (C) 2004-2009, Ryan Djurovich |
|
| 9 |
|
|
| 10 |
Website Baker is free software; you can redistribute it and/or modify |
|
| 11 |
it under the terms of the GNU General Public License as published by |
|
| 12 |
the Free Software Foundation; either version 2 of the License, or |
|
| 13 |
(at your option) any later version. |
|
| 14 |
|
|
| 15 |
Website Baker is distributed in the hope that it will be useful, |
|
| 16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
| 17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
| 18 |
GNU General Public License for more details. |
|
| 19 |
|
|
| 20 |
You should have received a copy of the GNU General Public License |
|
| 21 |
along with Website Baker; if not, write to the Free Software |
|
| 22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
| 23 |
|
|
| 24 |
*/ |
|
| 25 |
|
|
| 26 |
if(!defined('WB_URL')) {
|
|
| 27 |
header('Location: ../index.php');
|
|
| 28 |
exit(0); |
|
| 29 |
} |
|
| 30 |
require_once(WB_PATH.'/include/captcha/captcha.php'); |
|
| 31 |
|
|
| 32 |
?> |
|
| 33 |
<style type="text/css"> |
|
| 34 |
.value_input input, .value_input text, .value_input select {
|
|
| 35 |
width: 300px; |
|
| 36 |
} |
|
| 37 |
<?php if(ENABLED_ASP) { ?>
|
|
| 38 |
.nixhier { display:none; }
|
|
| 39 |
<?php } ?> |
|
| 40 |
</style> |
|
| 41 |
|
|
| 42 |
<h1> <?php echo $TEXT['SIGNUP']; ?></h1> |
|
| 43 |
|
|
| 44 |
<form name="user" action="<?php echo WB_URL.'/account/signup.php'; ?>" method="post"> |
|
| 45 |
|
|
| 46 |
<table cellpadding="5" cellspacing="0" border="0" width="90%"> |
|
| 47 |
<tr> |
|
| 48 |
<?php if(ENABLED_ASP) { // add some honeypot-fields
|
|
| 49 |
?> |
|
| 50 |
<input type="hidden" name="submitted_when" value="<?php $t=time(); echo $t; $_SESSION['submitted_when']=$t; ?>" /> |
|
| 51 |
<p class="nixhier"> |
|
| 52 |
email-address: |
|
| 53 |
<label for="email-address">Leave this field email-address blank:</label> |
|
| 54 |
<input id="email-address" name="email-address" size="60" value="" /><br /> |
|
| 55 |
username (id): |
|
| 56 |
<label for="name">Leave this field name blank:</label> |
|
| 57 |
<input id="name" name="name" size="60" value="" /><br /> |
|
| 58 |
Full Name: |
|
| 59 |
<label for="full_name">Leave this field full_name blank:</label> |
|
| 60 |
<input id="full_name" name="full_name" size="60" value="" /><br /> |
|
| 61 |
</p> |
|
| 62 |
<?php } |
|
| 63 |
?> |
|
| 64 |
<td width="180"><?php echo $TEXT['USERNAME']; ?>:</td> |
|
| 65 |
<td class="value_input"> |
|
| 66 |
<input type="text" name="username" maxlength="30" /> |
|
| 67 |
</td> |
|
| 68 |
</tr> |
|
| 69 |
<tr> |
|
| 70 |
<td><?php echo $TEXT['DISPLAY_NAME']; ?> (<?php echo $TEXT['FULL_NAME']; ?>):</td> |
|
| 71 |
<td class="value_input"> |
|
| 72 |
<input type="text" name="display_name" maxlength="255" /> |
|
| 73 |
</td> |
|
| 74 |
</tr> |
|
| 75 |
<tr> |
|
| 76 |
<td><?php echo $TEXT['EMAIL']; ?>:</td> |
|
| 77 |
<td class="value_input"> |
|
| 78 |
<input type="text" name="email" maxlength="255" /> |
|
| 79 |
</td> |
|
| 80 |
</tr> |
|
| 81 |
<?php |
|
| 82 |
// Captcha |
|
| 83 |
if(ENABLED_CAPTCHA) {
|
|
| 84 |
?><tr> |
|
| 85 |
<td class="field_title"><?php echo $TEXT['VERIFICATION']; ?>:</td> |
|
| 86 |
<td><?php call_captcha(); ?></td> |
|
| 87 |
</tr> |
|
| 88 |
<?php |
|
| 89 |
} |
|
| 90 |
?> |
|
| 91 |
<tr> |
|
| 92 |
<td> </td> |
|
| 93 |
<td> |
|
| 94 |
<input type="submit" name="submit" value="<?php echo $TEXT['SIGNUP']; ?>" /> |
|
| 95 |
<input type="reset" name="reset" value="<?php echo $TEXT['RESET']; ?>" /> |
|
| 96 |
</td> |
|
| 97 |
</tr> |
|
| 98 |
</table> |
|
| 99 |
|
|
| 100 |
</form> |
|
| 101 |
|
|
| 102 |
<br /> |
|
| 103 |
|
|
| 1 |
<?php + |
|
| 2 |
+ |
|
| 3 |
// $Id$ + |
|
| 4 |
+ |
|
| 5 |
/* + |
|
| 6 |
+ |
|
| 7 |
Website Baker Project <http://www.websitebaker.org/> + |
|
| 8 |
Copyright (C) 2004-2009, Ryan Djurovich + |
|
| 9 |
+ |
|
| 10 |
Website Baker is free software; you can redistribute it and/or modify + |
|
| 11 |
it under the terms of the GNU General Public License as published by + |
|
| 12 |
the Free Software Foundation; either version 2 of the License, or + |
|
| 13 |
(at your option) any later version. + |
|
| 14 |
+ |
|
| 15 |
Website Baker is distributed in the hope that it will be useful, + |
|
| 16 |
but WITHOUT ANY WARRANTY; without even the implied warranty of + |
|
| 17 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + |
|
| 18 |
GNU General Public License for more details. + |
|
| 19 |
+ |
|
| 20 |
You should have received a copy of the GNU General Public License + |
|
| 21 |
along with Website Baker; if not, write to the Free Software + |
|
| 22 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + |
|
| 23 |
+ |
|
| 24 |
*/ + |
|
| 25 |
+ |
|
| 26 |
if(!defined('WB_URL')) {
+
|
|
| 27 |
header('Location: ../index.php');
+
|
|
| 28 |
exit(0); + |
|
| 29 |
} + |
|
| 30 |
require_once(WB_PATH.'/include/captcha/captcha.php'); + |
|
| 31 |
+ |
|
| 32 |
?> + |
|
| 33 |
+ |
|
| 34 |
<h1> <?php echo $TEXT['SIGNUP']; ?></h1> + |
|
| 35 |
+ |
|
| 36 |
<form name="user" action="<?php echo WB_URL.'/account/signup.php'; ?>" method="post"> + |
|
| 37 |
+ |
|
| 38 |
<?php if(ENABLED_ASP) { // add some honeypot-fields
+
|
|
| 39 |
?> + |
|
| 40 |
<div style="display:none;"> + |
|
| 41 |
<input type="hidden" name="submitted_when" value="<?php $t=time(); echo $t; $_SESSION['submitted_when']=$t; ?>" /> + |
|
| 42 |
<p class="nixhier"> + |
|
| 43 |
email-address: + |
|
| 44 |
<label for="email-address">Leave this field email-address blank:</label> + |
|
| 45 |
<input id="email-address" name="email-address" size="60" value="" /><br /> + |
|
| 46 |
username (id): + |
|
| 47 |
<label for="name">Leave this field name blank:</label> + |
|
| 48 |
<input id="name" name="name" size="60" value="" /><br /> + |
|
| 49 |
Full Name: + |
|
| 50 |
<label for="full_name">Leave this field full_name blank:</label> + |
|
| 51 |
<input id="full_name" name="full_name" size="60" value="" /><br /> + |
|
| 52 |
</p> + |
|
| 53 |
<?php } + |
|
| 54 |
?> + |
|
| 55 |
</div> + |
|
| 56 |
<table cellpadding="5" cellspacing="0" border="0" width="90%"> + |
|
| 57 |
<tr> + |
|
| 58 |
<td width="180"><?php echo $TEXT['USERNAME']; ?>:</td> + |
|
| 59 |
<td class="value_input"> + |
|
| 60 |
<input type="text" name="username" maxlength="30" style="width:300px;"/> + |
|
| 61 |
</td> + |
|
| 62 |
</tr> + |
|
| 63 |
<tr> + |
|
| 64 |
<td><?php echo $TEXT['DISPLAY_NAME']; ?> (<?php echo $TEXT['FULL_NAME']; ?>):</td> + |
|
| 65 |
<td class="value_input"> + |
|
| 66 |
<input type="text" name="display_name" maxlength="255" style="width:300px;" /> + |
|
| 67 |
</td> + |
|
| 68 |
</tr> + |
|
| 69 |
<tr> + |
|
| 70 |
<td><?php echo $TEXT['EMAIL']; ?>:</td> + |
|
| 71 |
<td class="value_input"> + |
|
| 72 |
<input type="text" name="email" maxlength="255" style="width:300px;"/> + |
|
| 73 |
</td> + |
|
| 74 |
</tr> + |
|
| 75 |
<?php + |
|
| 76 |
// Captcha + |
|
| 77 |
if(ENABLED_CAPTCHA) {
+
|
|
| 78 |
?><tr> + |
|
| 79 |
<td class="field_title"><?php echo $TEXT['VERIFICATION']; ?>:</td> + |
|
| 80 |
<td><?php call_captcha(); ?></td> + |
|
| 81 |
</tr> + |
|
| 82 |
<?php + |
|
| 83 |
} + |
|
| 84 |
?> + |
|
| 85 |
<tr> + |
|
| 86 |
<td> </td> + |
|
| 87 |
<td> + |
|
| 88 |
<input type="submit" name="submit" value="<?php echo $TEXT['SIGNUP']; ?>" /> + |
|
| 89 |
<input type="reset" name="reset" value="<?php echo $TEXT['RESET']; ?>" /> + |
|
| 90 |
</td> + |
|
| 91 |
</tr> + |
|
| 92 |
</table> + |
|
| 93 |
+ |
|
| 94 |
</form> + |
|
| 95 |
+ |
|
| 96 |
<br /> + |
|
| 97 |
+ |
|
Also available in: Unified diff
validate some output files