Project

General

Profile

« Previous | Next » 

Revision 1773

Added by Dietmar about 12 years ago

! account split html and code
+ add signup activation registering
+ add missing icons in themes

View differences:

branches/2.8.x/CHANGELOG
13 13

  
14 14

  
15 15

  
16
28 Sep-2012 Build 1773 Dietmar Woellbrink (Luisehahne)
17
! account split html and code
18
+ add signup activation registering
19
+ add missing icons in themes
16 20
28 Sep-2012 Build 1772 Dietmar Woellbrink (Luisehahne)
17 21
# fixed show e-mail in submission overview
18 22
! set  title to tooltip if you add a pageX
branches/2.8.x/wb/admin/skel/themes/htt/users_form.htt
6 6
	document.getElementById(radio_off).checked = true;
7 7
}
8 8
</script>
9
<div class="account">
9 10

  
10 11
<h2 class="left" style="{DISPLAY_EXTRA}">{HEADING_MODIFY_USER}</h2>
11 12

  
......
13 14
<input type="hidden" name="user_id" value="{USER_ID}" />
14 15
<input type="hidden" name="username_fieldname" value="{USERNAME_FIELDNAME}" />
15 16
{FTAN}
16
<table summary="" cellpadding="5" cellspacing="0" border="0" width="100%">
17
<table>
17 18
<!-- BEGIN show_modify_loginname_block -->
18 19
<tr>
19
	<td width="150">{TEXT_USERNAME}:</td>
20
	<td>{TEXT_USERNAME}:</td>
20 21
	<td class="value_input">
21 22
		<input type="hidden" name="{USERNAME_FIELDNAME}" value="{USERNAME}" />
22 23
		<input class="button" type="button" value="{USERNAME}" disabled="disabled" readonly="readonly" />
......
25 26
<!-- END show_modify_loginname_block -->
26 27
<!-- BEGIN show_add_loginname_block -->
27 28
<tr>
28
	<td width="150">{TEXT_USERNAME}:</td>
29
	<td>{TEXT_USERNAME}:</td>
29 30
	<td class="value_input">
30 31
		<input type="text" name="{USERNAME_FIELDNAME}" maxlength="30" value="{USERNAME}" />
31 32
	</td>
......
92 93
	</td>
93 94
</tr>
94 95
<tr>
95
	<td>&nbsp;</td>
96
	<td>
96
	<td colspan="2" class="center">
97 97
		<input type="submit" name="submit" value="{SUBMIT_TITLE}" />
98 98
		<input type="reset" name="reset" value="{TEXT_RESET}" />
99
		<input type="button" style="width: 100px; margin-top: 5px;" onclick="javascript: window.location = 'index.php';" value="{TEXT_CANCEL}" />
99
		<input type="button" style="width: 100px; margin-top: 5px;" onclick="javascript:window.location='index.php';" value="{TEXT_CANCEL}" />
100 100
	</td>
101 101
</tr>
102 102
</table>
103 103

  
104 104
</form>
105

  
105
</div>
106 106
<!-- END main_block -->
branches/2.8.x/wb/admin/interface/version.php
51 51

  
52 52
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
53 53
if(!defined('VERSION')) define('VERSION', '2.8.3');
54
if(!defined('REVISION')) define('REVISION', '1772');
54
if(!defined('REVISION')) define('REVISION', '1773');
55 55
if(!defined('SP')) define('SP', '');
branches/2.8.x/wb/account/preferences.htt
1
<!-- BEGIN main_block -->
2
<!-- BEGIN success_block -->
3
<p class="mod_preferences_success">
4
	{SUCCESS_VALUE}
5
</p>
6
<!-- END success_block -->
7
<!-- BEGIN error_block -->
8
<p class="mod_preferences_error">
9
	{ERROR_VALUE}
10
</p>
11
<!-- END error_block -->
12
<div style="margin: 1em auto;">
13
	<button type="button" value="cancel" onclick="javascript:window.location = '{HTTP_REFERER}';">{TEXT_CANCEL}</button>
14
</div>
15
<hr />
16
<form name="details" action="" method="post">
17
	<h3>{HEADING_MY_SETTINGS}</h3>
18
	<table summary="" cellpadding="5" cellspacing="0" border="0" width="100%">
19
		<tr>
20
			<td width="160">{TEXT_DISPLAY_NAME}:</td>
21
			<td>
22
				<input class="button" type="button" name="display_name" value="{DISPLAY_NAME}" disabled="disabled" readonly="readonly"
23
				 style="border :1px solid #666666; color :#000000; text-align :left; font-weight :bold; background-color :#dddddd; margin : 2px auto; padding :2px 0px 2px 6px; width :71%;"/>
24
			</td>
25
		</tr>
26
		<tr>
27
			<td>{TEXT_LANGUAGE}:</td>
28
			<td>
29
				<select name="language" id="language">
30
					<!-- BEGIN language_list_block -->
31
						<option value="{CODE}"{SELECTED} style="background: url({FLAG}.png) no-repeat center left; padding-left: 20px;">{NAME} ({CODE})</option>
32
					<!-- END language_list_block -->
33
				</select>
34
			</td>
35
		</tr>
36
		<tr>
37
			<td>{TEXT_TIMEZONE}:</td>
38
			<td>
39
				<select name="timezone" style="width: 98%;">
40
					<option value="-20">{MOD_PREFERENCE_PLEASE_SELECT}</option>
41
<!-- BEGIN timezone_list_block -->
42
					<option value="{VALUE}" {SELECTED}>{NAME}</option>
43
<!-- END timezone_list_block -->
44
				</select>
45
			</td>
46
		</tr>
47
		<tr>
48
			<td>{TEXT_DATE_FORMAT}:</td>
49
			<td>
50
				<select name="date_format" style="width: 98%;">
51
					<option value="">{MOD_PREFERENCE_PLEASE_SELECT}</option>
52
<!-- BEGIN date_format_list_block -->
53
					<option value="{VALUE}" {SELECTED}>{NAME}</option>
54
<!-- END date_format_list_block -->
55
				</select>
56
			</td>
57
		</tr>
58
		<tr>
59
			<td>{TEXT_TIME_FORMAT}:</td>
60
			<td>
61
				<select name="time_format" style="width: 98%;">
62
					<option value="">{MOD_PREFERENCE_PLEASE_SELECT}</option>
63
<!-- BEGIN time_format_list_block -->
64
					<option value="{VALUE}" {SELECTED}>{NAME}</option>
65
<!-- END time_format_list_block -->
66
				</select>
67
			</td>
68
		</tr>
69
		<tr>
70
			<td>&nbsp;</td>
71
			<td>
72
				<button type="reset" name="reset" value="reset">{TEXT_RESET}</button>
73
				<button type="submit" name="action" value="details">{MOD_PREFERENCE_SAVE_SETTINGS}</button>
74
			</td>
75
		</tr>
76
	</table>
77
</form>
78
<hr />
79
<form name="email" action="" method="post">
80
	<h3>{HEADING_MY_EMAIL}</h3>
81
	<table summary="" cellpadding="5" cellspacing="0" border="0" width="100%">
82
		<tr>
83
			<td>{TEXT_EMAIL}:</td>
84
			<td>
85
				<input type="text" name="email" value="{EMAIL}" style="width: 98%;" />
86
			</td>
87
		</tr>
88
		<tr>
89
			<td width="160">{TEXT_CURRENT_PASSWORD}:</td>
90
			<td>
91
				<input type="password" name="current_password" style="width: 98%;" />
92
			</td>
93
		</tr>
94
		<tr>
95
			<td>&nbsp;</td>
96
			<td>
97
				<button type="reset" name="reset" value="reset">{TEXT_RESET}</button>
98
				<button type="submit" name="action" value="email">{MOD_PREFERENCE_SAVE_EMAIL}</button>
99
			</td>
100
		</tr>
101
	</table>
102
</form>
103
<hr />
104
<form name="password" action="" method="post">
105
	<h3>{HEADING_MY_PASSWORD}</h3>
106
	<table summary="" cellpadding="5" cellspacing="0" border="0" width="100%">
107
		<tr>
108
			<td width="160">{TEXT_CURRENT_PASSWORD}:</td>
109
			<td>
110
				<input type="password" name="current_password" style="width: 98%;" />
111
			</td>
112
		</tr>
113
		<tr>
114
			<td width="160">{TEXT_NEW_PASSWORD}:</td>
115
			<td>
116
				<input type="password" name="new_password" style="width: 98%;" />
117
			</td>
118
		</tr>
119
		<tr>
120
			<td width="160">{TEXT_RETYPE_NEW_PASSWORD}:</td>
121
			<td>
122
				<input type="password" name="new_password2" style="width: 98%;" />
123
			</td>
124
		</tr>
125
		<tr>
126
			<td>&nbsp;</td>
127
			<td>
128
				<button type="reset" name="reset" value="reset">{TEXT_RESET}</button>
129
				<button type="submit" name="action" value="password">{MOD_PREFERENCE_SAVE_PASSWORD}</button>
130
			</td>
131
		</tr>
132
	</table>
133
</form>
134
<div style="margin: 1em auto;">
135
	<button type="button" value="cancel" onclick="javascript:window.location = '{HTTP_REFERER}';">{TEXT_CANCEL}</button>
136
</div>
137
<!-- END main_block -->
138 0

  
branches/2.8.x/wb/account/signup2.php
1
<?php
2
/**
3
 *
4
 * @category        frontend
5
 * @package         account
6
 * @author          WebsiteBaker Project
7
 * @copyright       2004-2009, Ryan Djurovich
8
 * @copyright       2009-2011, Website Baker Org. e.V.
9
 * @link			http://www.websitebaker2.org/
10
 * @license         http://www.gnu.org/licenses/gpl.html
11
 * @platform        WebsiteBaker 2.8.x
12
 * @requirements    PHP 5.2.2 and higher
13
 * @version         $Id$
14
 * @filesource		$HeadURL$
15
 * @lastmodified    $Date$
16
 *
17
 */
18

  
19
// Must include code to stop this file being access directly
20
if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
21

  
22
// require_once(WB_PATH.'/framework/class.wb.php');
23
$wb = new wb('Start', 'start', false, false);
24
include_once (WB_PATH.'/framework/functions.php');
25
// Get details entered
26
$groups_id = FRONTEND_SIGNUP;
27
$active = 1;
28
$username = strtolower(strip_tags($wb->get_post_escaped('username')));
29
$display_name = strip_tags($wb->get_post_escaped('display_name'));
30
$email = $wb->get_post('email');
31

  
32
// Create a javascript back link
33
$js_back = WB_URL.'/account/signup.php';
34
/*
35
if (!$wb->checkFTAN())
36
{
37
	$wb->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], $js_back, false);
38
	exit();
39
}
40
*/
41
// Check values
42
if($groups_id == "") {
43
	$wb->print_error($MESSAGE['USERS_NO_GROUP'], $js_back, false);
44
}
45
if(!preg_match('/^[a-z]{1}[a-z0-9_-]{2,}$/i', $username)) {
46
	$wb->print_error( $MESSAGE['USERS_NAME_INVALID_CHARS'].' / '.
47
	                  $MESSAGE['USERS_USERNAME_TOO_SHORT'], $js_back);
48
}
49
if($email != "") {
50
	if($wb->validate_email($email) == false) {
51
		$wb->print_error($MESSAGE['USERS_INVALID_EMAIL'], $js_back, false);
52
	}
53
} else {
54
	$wb->print_error($MESSAGE['SIGNUP_NO_EMAIL'], $js_back, false);
55
}
56

  
57
$email = $wb->add_slashes($email);
58
$search = array('{SERVER_EMAIL}');
59
$replace = array( SERVER_EMAIL);
60
// Captcha
61
if(ENABLED_CAPTCHA) {
62
	$aServerEmail = (defined('SERVER_EMAIL') && SERVER_EMAIL != '' ? SERVER_EMAIL : $_SERVER['SERVER_NAME']);
63
	$replace = array('SERVER_EMAIL' => $aServerEmail );
64
	$MESSAGE['MOD_FORM_INCORRECT_CAPTCHA'] = replace_vars($MESSAGE['MOD_FORM_INCORRECT_CAPTCHA'], $replace);
65
	if(isset($_POST['captcha']) AND $_POST['captcha'] != ''){
66
		// Check for a mismatch
67
		if(!isset($_POST['captcha']) OR !isset($_SESSION['captcha']) OR $_POST['captcha'] != $_SESSION['captcha']) {
68
			$wb->print_error($MESSAGE['MOD_FORM_INCORRECT_CAPTCHA'], $js_back, false);
69
		}
70
	} else {
71
		$wb->print_error($MESSAGE['MOD_FORM_INCORRECT_CAPTCHA'], $js_back, false);
72
	}
73
}
74
if(isset($_SESSION['captcha'])) { unset($_SESSION['captcha']); }
75

  
76
// Generate a random password then update the database with it
77
$new_pass = '';
78
$salt = "abchefghjkmnpqrstuvwxyz0123456789";
79
srand((double)microtime()*1000000);
80
$i = 0;
81
while ($i <= 7) {
82
	$num = rand() % 33;
83
	$tmp = substr($salt, $num, 1);
84
	$new_pass = $new_pass . $tmp;
85
	$i++;
86
}
87
$md5_password = md5($new_pass);
88

  
89
// Check if username already exists
90
$results = $database->query("SELECT user_id FROM ".TABLE_PREFIX."users WHERE username = '$username'");
91
if($results->numRows() > 0) {
92
	$wb->print_error($MESSAGE['USERS_USERNAME_TAKEN'], $js_back, false);
93
}
94

  
95
// Check if the email already exists
96
$results = $database->query("SELECT user_id FROM ".TABLE_PREFIX."users WHERE email = '".$wb->add_slashes($email)."'");
97
if($results->numRows() > 0) {
98
	if(isset($MESSAGE['USERS_EMAIL_TAKEN'])) {
99
		$wb->print_error($MESSAGE['USERS_EMAIL_TAKEN'], $js_back, false);
100
	} else {
101
		$wb->print_error($MESSAGE['USERS_INVALID_EMAIL'], $js_back, false);
102
	}
103
}
104

  
105
// MD5 supplied password
106
$md5_password = md5($new_pass);
107

  
108
// Inser the user into the database
109
$query = "INSERT INTO ".TABLE_PREFIX."users (group_id,groups_id,active,username,password,display_name,email) VALUES ('$groups_id', '$groups_id', '$active', '$username','$md5_password','$display_name','$email')";
110
$database->query($query);
111

  
112
if($database->is_error()) {
113
	// Error updating database
114
	$message = $database->get_error();
115
} else {
116
	// Setup email to send
117
	$mail_to = $email;
118
	$mail_subject = $MESSAGE['SIGNUP2_SUBJECT_LOGIN_INFO'];
119

  
120
	// Replace placeholders from language variable with values
121
	$search = array('{LOGIN_DISPLAY_NAME}', '{LOGIN_WEBSITE_TITLE}', '{LOGIN_NAME}', '{LOGIN_PASSWORD}');
122
	$replace = array($display_name, WEBSITE_TITLE, $username, $new_pass); 
123
	$mail_message = str_replace($search, $replace, $MESSAGE['SIGNUP2_BODY_LOGIN_INFO']);
124

  
125
	// Try sending the email
126
	if($wb->mail(SERVER_EMAIL,$mail_to,$mail_subject,$mail_message)) {
127
		$display_form = false;
128
		$wb->print_success($MESSAGE['FORGOT_PASS_PASSWORD_RESET'], WB_URL.'/account/login.php' );
129
	} else {
130
		$database->query("DELETE FROM ".TABLE_PREFIX."users WHERE username = '$username'");
131
		$wb->print_error($MESSAGE['FORGOT_PASS_CANNOT_EMAIL'], $js_back, false);
132
	}
133
}
134

  
135 0

  
branches/2.8.x/wb/account/signup_mails.php
1
<?php
2
/**
3
 *
4
 * @category        frontend
5
 * @package         account
6
 * @author          WebsiteBaker Project
7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
8
 * @link			http://www.websitebaker2.org/
9
 * @license         http://www.gnu.org/licenses/gpl.html
10
 * @platform        WebsiteBaker 2.8.x
11
 * @requirements    PHP 5.2.2 and higher
12
 * @version         $Id$
13
 * @filesource		$HeadURL$
14
 * @lastmodified    $Date$
15
 *
16
 */
17

  
18
/* -------------------------------------------------------- */
19
// Must include code to stop this file being accessed directly
20
if(defined('WB_PATH') == false)
21
{
22
	die('<h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2>');
23
}
24
/* -------------------------------------------------------- */
25

  
26
		//WB_MAILER settings
27
			$sServerEmail = (defined('SERVER_EMAIL') && SERVER_EMAIL != '' ? SERVER_EMAIL : emailAdmin());
28
			$sWebMailer   = (defined('WBMAILER_DEFAULT_SENDERNAME') && WBMAILER_DEFAULT_SENDERNAME != '' ? WBMAILER_DEFAULT_SENDERNAME : 'WebsiteBaker Mailer');
29

  
30
			$aDebugUserMail  = array();
31
			$aDebugAdminMail = array();
32

  
33
			$bSendRegistrationMailtoUser = false;
34
			// Send mail to Admin easy old style
35
			if(!CONFIRMED_REGISTRATION)
36
			{
37
			// first send to admin
38
				$bSendRegistrationMailtoAdmin = false;
39
				$sql  = 'SELECT `user_id` FROM `'.TABLE_PREFIX.'users` ';
40
				$sql .= 'ORDER BY `user_id` DESC ';
41
				$user_id = $database->get_one($sql)+1;
42

  
43
				$mail_replyto = $email_to;
44
				$mail_replyName = $sDisplayName;
45
				$mail_message = $MESSAGE['SIGNUP2_ADMIN_INFO'];
46
				$email_subject = $MESSAGE['SIGNUP2_NEW_USER'];
47
				$search = array('{LOGIN_EMAIL}','{LOGIN_ID}', '{SIGNUP_DATE}', '{LOGIN_NAME}', '{LOGIN_IP}');
48
				$replace = array($email_to, $email_fromname.' ('.$user_id.')', date(DATE_FORMAT.' '.TIME_FORMAT,$get_ts ), $sLoginName, $get_ip);
49
				$mail_message = str_replace($search, $replace, $mail_message);
50
				$email_body = preg_replace( "/(content-type:|bcc:|cc:|to:|from:)/im", "", $mail_message );
51
				$success_email_to = emailAdmin();
52

  
53
				$bSendRegistrationMailtoAdmin = $wb->mail($sServerEmail,$success_email_to,$email_subject,$email_body,$mail_replyName,$mail_replyto);
54

  
55
// prepare confirmation mail to user, easy old style
56
				if(($email_to != '') && $bSaveRegistration) {
57
					$email_subject = $MESSAGE['SIGNUP2_SUBJECT_LOGIN_INFO'];
58
					$mail_message = $MESSAGE['SIGNUP2_BODY_LOGIN_INFO'].$MESSAGE['SUCCESS_EMAIL_TEXT_GENERATED'];
59
					$search = array('{LOGIN_DISPLAY_NAME}', '{LOGIN_WEBSITE_TITLE}', '{LOGIN_NAME}', '{LOGIN_PASSWORD}');
60
					$replace = array($sDisplayName, WEBSITE_TITLE, $sLoginName, $sNewPassword);
61
					$mail_message = str_replace($search, $replace, $mail_message);
62
				}
63
			} else {
64
// prepare confirmation mail to user, Register with confirmation
65
				if(($email_to != '') && $bSaveRegistration) {
66
//					$daylight_saving = date('I');
67
					$sConfirmedTimeOut = gmdate('Y/m/d H:i',$sTimeOut).' GMT';
68
					$email_subject = $MESSAGE['SIGNUP_ACTIVATION'];
69
					$search = array('{LOGIN_DISPLAY_NAME}', '{LOGIN_WEBSITE_TITLE}', '{LOGIN_NAME}', '{LINK}', '{CONFIRMED_REGISTRATION_ENDTIME}');
70
					$replace = array($sDisplayName, WEBSITE_TITLE, $sLoginName, $sConfirmedLink,$sConfirmedTimeOut);
71
					$mail_message = $MESSAGE['SEND_CONFIRMED_REGISTRATION'].$MESSAGE['SUCCESS_EMAIL_TEXT_GENERATED'];
72
					$mail_message = str_replace($search, $replace, $mail_message);
73
				}
74
			}
75
// now send user email, first prepare values for both of type
76
			$email_body = '';
77
			$regex = "/[^a-z0-9ßöäüÖÄÜ !?:;,.\/_\-=+@#$&\*\(\)]/im";
78
			$recipient = preg_replace( $regex, "?", $sDisplayName );
79
			$email_fromname = preg_replace( "/(content-type:|bcc:|cc:|to:|from:)/im", "?", $recipient );
80
			$email_body = preg_replace( "/(content-type:|bcc:|cc:|to:|from:)/im", "", $mail_message );
81

  
82
			$bSendRegistrationMailtoUser = $wb->mail($sServerEmail,$email_to,$email_subject,$email_body,$sWebMailer);
0 83

  
branches/2.8.x/wb/account/confirm_form_mask.php
1
<?php
2
/**
3
 *
4
 * @category        frontend
5
 * @package         account
6
 * @author          WebsiteBaker Project
7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
8
 * @link			http://www.websitebaker2.org/
9
 * @license         http://www.gnu.org/licenses/gpl.html
10
 * @platform        WebsiteBaker 2.8.x
11
 * @requirements    PHP 5.2.2 and higher
12
 * @version         $Id$
13
 * @filesource		$HeadURL$
14
 * @lastmodified    $Date$
15
 *
16
 */
17
/* -------------------------------------------------------- */
18
// Must include code to stop this file being accessed directly
19
if(defined('WB_PATH') == false)
20
{
21
	die('<h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2>');
22
}
23
/* -------------------------------------------------------- */
24

  
25

  
26
// set template file and assign module and template block
27
	$oTpl = new Template(dirname(__FILE__).'/htt','keep');
28
	$oTpl->set_file('page', 'confirm.htt');
29
	$oTpl->debug = false; // false, true
30
	$oTpl->set_block('page', 'main_block', 'main');
31
	$oTpl->set_var(array(
32
		'FTAN' => $wb->getFTAN(),
33
		'ACTION_URL' => WB_URL.'/account/confirm.php',
34
		'WB_URL' => WB_URL,
35
		'THEME_URL' => THEME_URL,
36
		'HTTP_REFERER' => isset($_SESSION['HTTP_REFERER']) ? $_SESSION['HTTP_REFERER'] : WB_URL,
37
		'CONFIRM_CODE' => $sConfirmationId,
38
		'MESSAGE_VALUE' => '',
39
		'ERROR_VALUE' => '',
40
		'HEADING_SIGNUP' => $mLang->HEADING_SIGNUP2_CONFIMED_REGISTRATION,
41
		'TEXT_LANGUAGE' => $TEXT['LANGUAGE'],
42
		'HELP_CONFIRM_PASSWORD' => $mLang->HELP_CONFIRM_PASSWORD,
43
		'HEADING_MESSAGE_WELCOME' => $mLang->HEADING_MESSAGE_WELCOME,
44
		'TEXT_SIGNUP' => $mLang->TEXT_ACTIVATION,
45
		'TEXT_RESET' => $TEXT['RESET'],
46
		'TEXT_CANCEL' => $TEXT['CANCEL'],
47
		)
48
	);
49
//print '<pre style="text-align: left;"><strong>function '.__FUNCTION__.'( '.$sSubmitAction.' );</strong>  basename: '.basename(__FILE__).'  line: '.__LINE__.' -> <br />';
50
//print_r( $sConfirmationId ); print '</pre>';
51

  
52
	$sSelected = ' selected="selected"';
53
	$checked   = ' checked="checked"';
54
// show messages, default block off
55
	$oTpl->set_block('main_block', 'message_block', 'message');
56
	$oTpl->parse('message', '');
57
	if( ($msg = msgQueue::getError()) != '')
58
	{
59
		$output = $wb->format_message($msg, 'error');
60
		$oTpl->set_var('MESSAGE_VALUE',$output);
61
		$oTpl->parse('message', 'message_block', true);
62
	}
63
	$oTpl->set_var('MESSAGE','');
64

  
65
	$oTpl->set_block('main_block', 'asp_block', 'asp');
66
	if(ENABLED_ASP) {
67
		$oTpl->set_var('DISPLAY_ASP','nixhier');
68
		$oTpl->parse('asp', 'asp_block', true);
69
	} else {
70
		$oTpl->parse('asp', '', true);
71
	}
72

  
73
	$oTpl->set_var(array(
74
			'DISPLAY_USER' => '',
75
			'TEXT_USERNAME' => $mLang->TEXT_USERNAME,
76
			'TEXT_PASSWORD' => $mLang->TEXT_PASSWORD,
77
			)
78
		);
79

  
80
	// Parse template object
81
	$oTpl->parse('main', 'main_block', false);
82
	$output = $oTpl->finish($oTpl->parse('output', 'page'));
83
	unset($oTpl);
84
	print $output;
0 85

  
branches/2.8.x/wb/account/confirm.php
1
<?php
2
/**
3
 *
4
 * @category        frontend
5
 * @package         account
6
 * @author          WebsiteBaker Project
7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
8
 * @link			http://www.websitebaker2.org/
9
 * @license         http://www.gnu.org/licenses/gpl.html
10
 * @platform        WebsiteBaker 2.8.x
11
 * @requirements    PHP 5.2.2 and higher
12
 * @version         $Id$
13
 * @filesource		$HeadURL$
14
 * @lastmodified    $Date$
15
 *
16
 */
17

  
18
require_once('../config.php');
19

  
20
require_once(WB_PATH.'/framework/class.admin.php');
21
// Create new frontend object
22
$wb = new admin();
23

  
24
//require_once(dirname(__FILE__).'/AccountSignup.php');
25

  
26
// load module language file
27
$sAutoLanguage = isset($_SESSION['language']) ? $_SESSION['language'] : AccountSignup::GetBowserLanguage(DEFAULT_LANGUAGE);
28

  
29
$mLang = ModLanguage::getInstance();
30
$mLang->setLanguage(dirname(__FILE__).'/languages/', $sAutoLanguage, DEFAULT_LANGUAGE);
31

  
32
// form faked? Check the honeypot-fields.
33
if(ENABLED_ASP && isset($_POST['username']) && (
34
	(!isset($_POST['submitted_when']) OR !isset($_SESSION['submitted_when']) ) OR
35
		($_POST['submitted_when'] != $_SESSION['submitted_when']) OR
36
			(!isset($_POST['email-address']) OR $_POST['email-address']) OR
37
				(!isset($_POST['name']) OR $_POST['name']) OR
38
					(!isset($_POST['full_name']) OR $_POST['full_name'])
39
	))
40
{
41
	$wb->send_header(WB_URL.'/index.php');
42
}
43

  
44
$page_id = isset($_SESSION['PAGE_ID']) ? intval($_SESSION['PAGE_ID']) : 0;
45
// needed for backlink/cancel
46
$_SESSION['HTTP_REFERER'] = isset($_SESSION['HTTP_REFERER']) ? ($_SESSION['HTTP_REFERER']) : WB_URL.'/';
47
// action modus
48
$_POST['action'] = !isset($_POST['action']) ? 'show' : $_POST['action'];
49

  
50
$page_description = '';
51
$page_keywords = '';
52
define('PAGE_ID', $page_id);
53
define('ROOT_PARENT', 0);
54
define('PARENT', 0);
55
define('LEVEL', 0);
56
define('PAGE_TITLE', $TEXT['SIGNUP']);
57
define('MENU_TITLE', $TEXT['SIGNUP']);
58
define('MODULE', '');
59
define('VISIBILITY', 'public');
60

  
61
define('PAGE_CONTENT', WB_PATH.'/account/confirm_form.php');
62

  
63

  
64
// Include the index (wrapper) file
65
require(WB_PATH.'/index.php');
66

  
0 67

  
branches/2.8.x/wb/account/password.php
15 15
 *
16 16
 */
17 17

  
18
// Must include code to stop this file being access directly
19
if(defined('WB_PATH') == false) { die("Cannot access this file directly"); }
18
/* -------------------------------------------------------- */
19
// Must include code to stop this file being accessed directly
20
if(defined('WB_PATH') == false)
21
{
22
	// Stop this file being access directly
23
		die('<h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2>');
24
}
25
/* -------------------------------------------------------- */
20 26

  
21 27
// Get entered values
22 28
	$iMinPassLength = 6;
branches/2.8.x/wb/account/signup.php
3 3
 *
4 4
 * @category        frontend
5 5
 * @package         account
6
 * @author          WebsiteBaker Project
7
 * @copyright       2004-2009, Ryan Djurovich
8
 * @copyright       2009-2011, Website Baker Org. e.V.
6
 * @author          Ryan Djurovich, WebsiteBaker Project
7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
9 8
 * @link			http://www.websitebaker2.org/
10 9
 * @license         http://www.gnu.org/licenses/gpl.html
11 10
 * @platform        WebsiteBaker 2.8.x
......
19 18
require_once('../config.php');
20 19
ini_set('display_errors','0');
21 20

  
22
if(!( intval(FRONTEND_SIGNUP) && (  0 == (isset($_SESSION['USER_ID']) ? intval($_SESSION['USER_ID']) : 0) )))
21
require_once(WB_PATH.'/framework/class.admin.php');
22

  
23
// Create new frontend object
24
$wb = new admin();
25

  
26
//require_once(dirname(__FILE__).'/MySignUp.php');
27
//print '<pre style="text-align: left;"><strong>function '.__FUNCTION__.'( '.$page_id.' );</strong>  basename: '.basename(__FILE__).'  line: '.__LINE__.' -> <br />';
28
//print_r( dirname(__FILE__) ); print '</pre>';
29

  
30
//
31
if( ( (intval(FRONTEND_SIGNUP)==0) &&
32
    (  0 == (isset($_SESSION['USER_ID']) ? intval($_SESSION['USER_ID']) : 0) )))
23 33
{
24
	if(INTRO_PAGE) {
25
		header('Location: '.WB_URL.PAGES_DIRECTORY.'/index.php');
26
		exit(0);
27
	} else {
28
		header('Location: '.WB_URL.'/index.php');
29
		exit(0);
30
	}
34
	$wb->send_header(WB_URL.'/index.php');
35
//	if(INTRO_PAGE) {
36
//	} else {
37
//		header('Location: '.WB_URL.'/index.php');
38
//		exit(0);
39
//	}
31 40
}
32 41

  
33
if(ENABLED_ASP && isset($_POST['username']) && ( // form faked? Check the honeypot-fields.
34
	(!isset($_POST['submitted_when']) OR !isset($_SESSION['submitted_when'])) OR 
35
	($_POST['submitted_when'] != $_SESSION['submitted_when']) OR
36
	(!isset($_POST['email-address']) OR $_POST['email-address']) OR
37
	(!isset($_POST['name']) OR $_POST['name']) OR
38
	(!isset($_POST['full_name']) OR $_POST['full_name'])
39
)) {
40
	exit(header("Location: ".WB_URL.PAGES_DIRECTORY.""));
42
// form faked? Check the honeypot-fields.
43
if(ENABLED_ASP && isset($_POST['username']) && (
44
	(!isset($_POST['submitted_when']) OR !isset($_SESSION['submitted_when']) ) OR
45
//		($_POST['submitted_when'] != $_SESSION['submitted_when']) OR
46
			(!isset($_POST['email-address']) OR $_POST['email-address']) OR
47
				(!isset($_POST['name']) OR $_POST['name']) OR
48
					(!isset($_POST['full_name']) OR $_POST['full_name'])
49
	))
50
{
51
	$wb->send_header(WB_URL.'/index.php');
41 52
}
42 53

  
43 54
// Load the language file
44
if(!file_exists(WB_PATH.'/languages/'.DEFAULT_LANGUAGE.'.php')) {
45
	exit('Error loading language file '.DEFAULT_LANGUAGE.', please check configuration');
46
} else {
47
	require_once(WB_PATH.'/languages/'.DEFAULT_LANGUAGE.'.php');
48
	$load_language = false;
49
}
55
//if(!file_exists(WB_PATH.'/languages/'.LANGUAGE.'.php')) {
56
//	exit('Error loading language file '.LANGUAGE.', please check configuration');
57
//} else {
58
//	require_once(WB_PATH.'/languages/'.LANGUAGE.'.php');
59
//	$load_language = false;
60
//}
50 61

  
51
$page_id = (isset($_SESSION['PAGE_ID']) && ($_SESSION['PAGE_ID']!='') ? $_SESSION['PAGE_ID'] : 0);
62
$lang = WB_PATH . '/languages/' . LANGUAGE . '.php';
63
require_once(!file_exists($lang) ? WB_PATH . '/languages/EN.php' : $lang );
64

  
52 65
$_SESSION['display_form'] = true;
53 66

  
54
// Required page details
55
// $page_id = 0;
67
$page_id = isset($_SESSION['PAGE_ID']) ? intval($_SESSION['PAGE_ID']) : 0;
68

  
56 69
$page_description = '';
57 70
$page_keywords = '';
58 71
define('PAGE_ID', $page_id);
......
65 78
define('VISIBILITY', 'public');
66 79

  
67 80
define('PAGE_CONTENT', WB_PATH.'/account/signup_form.php');
68
/*
69
// Set the page content include file
70
if(isset($_POST['username'])) {
71
	define('PAGE_CONTENT', WB_PATH.'/account/signup2.php');
72
} else {
73
	define('PAGE_CONTENT', WB_PATH.'/account/signup_form.php');
74
}
75
*/
81

  
76 82
// Set auto authentication to false
77 83
$auto_auth = false;
78 84

  
branches/2.8.x/wb/account/htt/preferences.htt
1
<!-- BEGIN main_block -->
2
<!-- BEGIN success_block -->
3
	{SUCCESS_VALUE}
4
<!-- END success_block -->
5
<!-- BEGIN error_block -->
6
	{ERROR_VALUE}
7
<!-- END error_block -->
8
<hr />
9
<div class="account">
10

  
11
<div class="details">
12
<h3>{HEADING_MY_SETTINGS}</h3>
13
<form name="details" action="" method="post">
14
	<table>
15
		<tr>
16
			<td>{TEXT_DISPLAY_NAME}:</td>
17
			<td class="input">
18
				<input class="display_name" type="text" name="display_name" value="{DISPLAY_NAME}" readonly="readonly" />
19
			</td>
20
		</tr>
21
		<tr>
22
			<td>{TEXT_LANGUAGE}:</td>
23
			<td class="input">
24
				<select name="language" id="language">
25
					<!-- BEGIN language_list_block -->
26
						<option value="{CODE}"{SELECTED} style="background: url({FLAG}.png) no-repeat center left; padding-left: 20px;">{NAME} ({CODE})</option>
27
					<!-- END language_list_block -->
28
				</select>
29
			</td>
30
		</tr>
31
		<tr>
32
			<td>{TEXT_TIMEZONE}:</td>
33
			<td class="input">
34
				<select name="timezone" style="width: 98%;">
35
					<option value="-20">{MOD_PREFERENCE_PLEASE_SELECT}</option>
36
<!-- BEGIN timezone_list_block -->
37
					<option value="{VALUE}" {SELECTED}>{NAME}</option>
38
<!-- END timezone_list_block -->
39
				</select>
40
			</td>
41
		</tr>
42
		<tr>
43
			<td>{TEXT_DATE_FORMAT}:</td>
44
			<td class="input">
45
				<select name="date_format" style="width: 98%;">
46
					<option value="">{MOD_PREFERENCE_PLEASE_SELECT}</option>
47
<!-- BEGIN date_format_list_block -->
48
					<option value="{VALUE}" {SELECTED}>{NAME}</option>
49
<!-- END date_format_list_block -->
50
				</select>
51
			</td>
52
		</tr>
53
		<tr>
54
			<td>{TEXT_TIME_FORMAT}:</td>
55
			<td class="input">
56
				<select name="time_format" style="width: 98%;">
57
					<option value="">{MOD_PREFERENCE_PLEASE_SELECT}</option>
58
<!-- BEGIN time_format_list_block -->
59
					<option value="{VALUE}" {SELECTED}>{NAME}</option>
60
<!-- END time_format_list_block -->
61
				</select>
62
			</td>
63
		</tr>
64
        <tr>
65
        	<td colspan="2">&nbsp;</td>
66
        </tr>
67
		<tr>
68
			<td colspan="2" class="button">
69
				<button type="reset" name="reset" value="reset">{TEXT_RESET}</button>
70
				<button type="submit" name="action" value="details">{MOD_PREFERENCE_SAVE_SETTINGS}</button>
71
            	<button type="button" value="cancel" onclick="javascript:window.location='{HTTP_REFERER}';">{TEXT_CANCEL}</button>
72
			</td>
73
		</tr>
74
	</table>
75
</form>
76
</div>
77
<div class="email">
78
<h3>{HEADING_MY_EMAIL}</h3>
79
<form name="email" action="" method="post">
80
	<table>
81
		<tr>
82
			<td>{TEXT_EMAIL}:</td>
83
			<td class="input">
84
				<input type="text" name="email" value="{EMAIL}" style="width: 98%;" />
85
			</td>
86
		</tr>
87
		<tr>
88
			<td>{TEXT_CURRENT_PASSWORD}:</td>
89
			<td class="input">
90
				<input type="password" name="current_password" style="width: 98%;" />
91
			</td>
92
		</tr>
93
        <tr>
94
        	<td colspan="2">&nbsp;</td>
95
        </tr>
96
		<tr>
97
			<td colspan="2" class="button">
98
				<button type="reset" name="reset" value="reset">{TEXT_RESET}</button>
99
				<button type="submit" name="action" value="email">{MOD_PREFERENCE_SAVE_EMAIL}</button>
100
            	<button type="button" value="cancel" onclick="javascript:window.location='{HTTP_REFERER}';">{TEXT_CANCEL}</button>
101
			</td>
102
		</tr>
103
	</table>
104
</form>
105
</div>
106
<div class="password">
107
<h3>{HEADING_MY_PASSWORD}</h3>
108
<form name="password" action="" method="post">
109
	<table>
110
		<tr>
111
			<td>{TEXT_CURRENT_PASSWORD}:</td>
112
			<td class="input">
113
				<input type="password" name="current_password" style="width: 98%;" />
114
			</td>
115
		</tr>
116
		<tr>
117
			<td>{TEXT_NEW_PASSWORD}:</td>
118
			<td class="input">
119
				<input type="password" name="new_password" style="width: 98%;" />
120
			</td>
121
		</tr>
122
		<tr>
123
			<td>{TEXT_RETYPE_NEW_PASSWORD}:</td>
124
			<td class="input">
125
				<input type="password" name="new_password2" style="width: 98%;" />
126
			</td>
127
		</tr>
128
        <tr>
129
        	<td colspan="2">&nbsp;</td>
130
        </tr>
131
		<tr>
132
			<td colspan="2" class="button">
133
				<button type="reset" name="reset" value="reset">{TEXT_RESET}</button>
134
				<button type="submit" name="action" value="password">{MOD_PREFERENCE_SAVE_PASSWORD}</button>
135
            	<button type="button" value="cancel" onclick="javascript:window.location='{HTTP_REFERER}';">{TEXT_CANCEL}</button>
136
			</td>
137
		</tr>
138
	</table>
139
</form>
140
</div>
141
</div>
142
<!-- END main_block -->
0 143

  
branches/2.8.x/wb/account/htt/signup.htt
1
<!-- BEGIN main_block -->
2
<!-- BEGIN message_block -->
3
{MESSAGE_VALUE}
4
<!-- END message_block -->
5

  
6
<hr />
7
<div class="account">
8
<div class="signup">
9

  
10
<form name="signup" action="{ACTION_URL}" method="post">
11
	<input type="hidden" name="action" value="send" />
12
	<input type="hidden" name="submitted_when" value="{SET_TIME}" />
13
<!-- BEGIN asp_block -->
14
	<p class="{DISPLAY_ASP}" id="pot">
15
		<label>If you're human leave this blank:</label>
16
		<input name="robotest" id="robotest" class="robotest" />
17
		<label for="email-address">Leave this field email-address blank:</label>
18
		<input id="email-address" name="email-address" size="60" value="" /><br />
19
		<label for="name">Leave this field name blank:</label>
20
		<input id="name" name="name" size="60" value="" /><br />
21
		<label for="full_name">Leave this field full_name blank:</label>
22
		<input id="full_name" name="full_name" size="60" value="" /><br />
23
	</p>
24
<!-- END asp_block -->
25
	<h3>{HEADING_SIGNUP}</h3>
26
	<table>
27
		<tr>
28
			<td>{TEXT_USERNAME}:</td>
29
			<td class="input">
30
				<input type="text" name="login_name" value="{DISPLAY_USER}" />
31
			</td>
32
		</tr>
33
		<tr>
34
			<td>{TEXT_DISPLAY_NAME}:</td>
35
			<td class="input">
36
				<input type="text" name="display_name" value="{DISPLAY_NAME}" />
37
			</td>
38
		</tr>
39
		<tr>
40
			<td>{TEXT_EMAIL}:</td>
41
			<td class="input">
42
				<input type="text" name="email" value="{EMAIL}" />
43
			</td>
44
		</tr>
45
		<tr>
46
			<td>{TEXT_LANGUAGE}:</td>
47
			<td class="input">
48
				<select name="language" id="language">
49
					<!-- BEGIN language_list_block -->
50
						<option value="{CODE}"{SELECTED} style="background: url({FLAG}.png) no-repeat center left; padding-left: 20px;">{NAME} ({CODE})</option>
51
					<!-- END language_list_block -->
52
				</select>
53
			</td>
54
		</tr>
55
<!-- BEGIN password_block -->
56
		<tr>
57
			<td colspan="2"><div class="note">{HELP_SIGNUP_REMEMBER_PASSWORD}</div></td>
58
		</tr>
59
		<tr>
60
			<td>{TEXT_NEW_PASSWORD}:</td>
61
			<td class="input">
62
				<input type="password" name="new_password_1" />
63
			</td>
64
		</tr>
65
		<tr>
66
			<td>{TEXT_RETYPE_NEW_PASSWORD}:</td>
67
			<td class="input">
68
				<input type="password" name="new_password_2" />
69
			</td>
70
		</tr>
71
<!-- END password_block -->
72
<!-- BEGIN captcha_block -->
73
		<tr>
74
			<td class="field_title">{TEXT_VERIFICATION}:</td>
75
			<td class="input">{CAPTCHA}</td>
76
		</tr>
77
<!-- END captcha_block -->
78
        <tr>
79
        	<td colspan="2">&nbsp;</td>
80
        </tr>
81
		<tr>
82
			<td colspan="2" class="button">
83
        		<button type="submit" name="submit" value="">{TEXT_SIGNUP}</button>
84
        		<button type="reset" name="reset" value="reset">{TEXT_RESET}</button>
85
				<button type="button" value="cancel" onclick="javascript:window.location='{HTTP_REFERER}';">{TEXT_CANCEL}</button>
86
			</td>
87
		</tr>
88
	</table>
89
</form>
90
</div>
91
</div>
92
<!-- END main_block -->
0 93

  
branches/2.8.x/wb/account/htt/login.htt
3 3
{MESSAGE_VALUE}
4 4
<!-- END message_block -->
5 5
<hr /><br />
6
<div class="login-box rounded" style="overflow: hidden;width:100%;">
6
<div class="account">
7
<div class="login-box">
7 8
<form class="login-box" action="{ACTION_URL}" method="post">
8 9
	<input type="hidden" name="action" value="login" />
9 10
	<input type="hidden" name="username_fieldname" value="{USER_FIELDNAME}" />
10 11
	<input type="hidden" name="password_fieldname" value="{PASSWORD_FIELDNAME}" />
11 12
	<input type="hidden" name="redirect" value="{REDIRECT_URL}" />
12

  
13
<table summary="">
13
<h3>{TEXT_LOGIN}</h3>
14
<table>
14 15
<tbody>
15
<tr class="row1">
16
	<td colspan="3"><h1>{TEXT_LOGIN}</h1></td>
17
</tr>
18
<tr class="row2">
19
	<td colspan="3">
16
<tr>
17
	<td colspan="2" class="button">
20 18
	<strong>{THISAPP_MESSAGE_VALUE}</strong>
21 19
	</td>
22 20
</tr>
23
<tr class="row3">
24
	<td class="bold">{TEXT_USERNAME}:</td>
25
	<td colspan="2">
21
<tr>
22
	<td colspan="2">&nbsp;</td>
23
</tr>
24
<tr>
25
	<td>{TEXT_USERNAME}:</td>
26
	<td class="input">
26 27
		<input type="text" name="{USER_FIELDNAME}" maxlength="30"  style="width:98%;"/>
27 28
    	<script type="text/javascript">
28 29
    	// document.login.{USER_FIELDNAME}.focus();
......
31 32
    	</script>
32 33
	</td>
33 34
</tr>
34
<tr class="row4">
35
	<td class="bold">{TEXT_PASSWORD}:</td>
36
	<td colspan="2">
35
<tr>
36
	<td>{TEXT_PASSWORD}:</td>
37
	<td class="input">
37 38
		<input type="password" name="{PASSWORD_FIELDNAME}" maxlength="30" style="width:98%;"/>
38 39
	</td>
39 40
</tr>
40 41
<!-- BEGIN show_smart_login_block -->
41 42
<tr>
42 43
	<td>&nbsp;</td>
43
	<td colspan="2">
44
	<td class="input">
44 45
		<input type="checkbox" name="remember" id="remember" value="true"/>
45 46
		<label for="remember">{TEXT_REMEMBER_ME}</label>
46 47
	</td>
47 48
</tr>
48 49
<!-- END show_smart_login_block -->
49
<tr class="submit">
50
	<td>
51
	<p><input type="submit" name="submit" value="{TEXT_LOGIN}"  /></p>
50
<tr>
51
	<td colspan="2">&nbsp;</td>
52
</tr>
53
<tr>
54
	<td colspan="2" class="button">
55
	<button type="submit" name="submit" value="submit">{TEXT_LOGIN}</button>
56
	<button type="reset" name="reset" value="reset">{TEXT_RESET}</button>
57
    <button type="button" value="cancel" onclick="javascript:window.location='{WB_URL}/';" >{TEXT_CANCEL}</button>
52 58
	</td>
53
	<td>
54
	<p><input type="reset" name="reset" value="{TEXT_RESET}" /></p>
55
	</td>
56
	<td>
57
	<p><button type="button" value="cancel" onclick="javascript:window.location='{WB_URL}/';" >{TEXT_CANCEL}</button></p>
58
	</td>
59 59
</tr>
60
<tr class="row6">
61
	<td colspan="3">
60
<tr>
61
	<td colspan="2" class="button">
62 62
	<p class="link"><a href="{FORGOT_URL}">{TEXT_FORGOTTEN_DETAILS}</a></p>
63 63
	</td>
64 64
</tr>
......
66 66
</table>
67 67
</form>
68 68
</div>
69

  
69
</div>
70 70
<!-- END main_block -->
branches/2.8.x/wb/account/htt/success.htt
1 1
<!-- BEGIN main_block -->
2
<div class="msg-box info">
2
<div class="msg-box note center">
3 3
<!-- BEGIN show_registration_block -->
4 4
	<p>{MESSAGE_VALUE}</p>
5 5
<!-- END show_registration_block -->
branches/2.8.x/wb/account/htt/confirm.htt
1
<!-- BEGIN main_block -->
2
<!-- BEGIN message_block -->
3
{MESSAGE_VALUE}
4
<!-- END message_block -->
5

  
6
<hr />
7
<div class="account">
8
<form class="new-signup" name="signup" action="{ACTION_URL}" method="post">
9
	<input type="hidden" name="action" value="save_confirm" />
10
	<input type="hidden" name="confirm_code" value="{CONFIRM_CODE}" />
11
	<h3>{HEADING_SIGNUP}</h3>
12
<!-- BEGIN asp_block -->
13
	<p class="{DISPLAY_ASP}" id="pot">
14
		<label>If you're human leave this blank:</label>
15
		<input name="robotest" id="robotest" class="robotest" />
16
		<label for="email-address">Leave this field email-address blank:</label>
17
		<input id="email-address" name="email-address" size="60" value="" /><br />
18
		<label for="name">Leave this field name blank:</label>
19
		<input id="name" name="name" size="60" value="" /><br />
20
		<label for="full_name">Leave this field full_name blank:</label>
21
		<input id="full_name" name="full_name" size="60" value="" /><br />
22
	</p>
23
<!-- END asp_block -->
24
	<table>
25
        <tbody>
26
		<tr>
27
			<td colspan="2">{HEADING_MESSAGE_WELCOME}:</td>
28
		</tr>
29
<!-- BEGIN input_block -->
30
		<tr>
31
			<td colspan="2"><div class="note">{HELP_CONFIRM_PASSWORD}</div></td>
32
		</tr>
33
		<tr>
34
			<td>{TEXT_USERNAME}:</td>
35
			<td class="input">
36
				<input type="text" name="new_loginname" value="{DISPLAY_USER}" />
37
			</td>
38
		</tr>
39
		<tr>
40
			<td>{TEXT_PASSWORD}:</td>
41
			<td class="input">
42
				<input type="password" name="new_password_1" />
43
			</td>
44
		</tr>
45
<!-- END input_block -->
46
		<tr>
47
			<td colspan="2" class="button">
48
        		<button type="submit" name="submit" value="{TEXT_SIGNUP}">{TEXT_SIGNUP}</button>
49
        		<button type="reset" name="reset" value="reset">{TEXT_RESET}</button>
50
				<button type="button" value="cancel" onclick="javascript:window.location='{HTTP_REFERER}';">{TEXT_CANCEL}</button>
51
			</td>
52
		</tr>
53
    </tbody>
54
	</table>
55
</form>
56
</div>
57
<!-- END main_block -->
0 58

  
branches/2.8.x/wb/account/htt/forgot.htt
3 3
{MESSAGE_VALUE}
4 4
<!-- END message_block -->
5 5
<hr /><br />
6
<div class="login-box rounded" style="overflow: hidden;width:100%;">
6
<div class="account">
7
<div class="login-box">
7 8
<form class="login-box" action="{ACTION_URL}" method="post">
8 9
	<input type="hidden" name="action" value="forgot" />
9 10
	<input type="hidden" name="url" value="{URL}" />
10

  
11
<table summary="">
11
<h3>{MENU_FORGOT}</h3>
12
<table>
12 13
<tbody>
13
<tr class="row1">
14
	<td colspan="3"><h1>{MENU_FORGOT}</h1></td>
15
</tr>
16
<tr class="row2">
17
	<td colspan="3">
14
<tr>
15
	<td colspan="2" class="button">
18 16
	<strong>{THISAPP_MESSAGE_VALUE}</strong>
19 17
	</td>
20 18
</tr>
21
<tr class="row3">
22
	<td colspan="3">&nbsp;</td>
19
<tr>
20
	<td colspan="2">&nbsp;</td>
23 21
</tr>
24
<tr class="row4">
25
	<td class="bold">{TEXT_EMAIL}:</td>
26
	<td colspan="2">
22
<tr>
23
	<td>{TEXT_EMAIL}:</td>
24
	<td class="input">
27 25
		<input type="text" name="email" maxlength="255" style="width:98%;"/>
28 26
	</td>
29 27
</tr>
30
<tr class="row5" >
31
	<td colspan="3">&nbsp;</td>
28
<tr>
29
	<td colspan="2">&nbsp;</td>
32 30
</tr>
33
<tr class="submit">
34
	<td>
35
	<p><input type="submit" name="submit" value="{TEXT_SEND_DETAILS}"  /></p>
31
<tr>
32
	<td colspan="2">&nbsp;</td>
33
</tr>
34
<tr>
35
	<td colspan="2" class="button">
36
		<button type="submit" name="submit" value="email">{TEXT_SEND_DETAILS}</button>
37
		<button type="reset" name="reset" value="reset">{TEXT_RESET}</button>
38
        <button type="button" value="cancel" onclick="javascript:window.location='{WB_URL}/';" >{TEXT_CANCEL}</button>
36 39
	</td>
37
	<td>
38
	<p><input type="reset" name="reset" value="{TEXT_RESET}" /></p>
39
	</td>
40
	<td>
41
	<p><button type="button" value="cancel" onclick="javascript:window.location='{WB_URL}/';" >{TEXT_CANCEL}</button></p>
42
	</td>
43 40
</tr>
44 41
<tr>
45
	<td class="row6" colspan="3">
42
	<td class="button" colspan="2">
46 43
	<p class="link"><a href="{LOGIN_URL}">{TEXT_NEED_TO_LOGIN}</a></p>
47 44
	</td>
48 45
</tr>
......
50 47
</table>
51 48
</form>
52 49
</div>
50
</div>
53 51
<!-- END main_block -->
branches/2.8.x/wb/account/save_confirm.php
1
<?php
2
/**
3
 *
4
 * @category        frontend
5
 * @package         account
6
 * @author          WebsiteBaker Project
7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
8
 * @link			http://www.websitebaker2.org/
9
 * @license         http://www.gnu.org/licenses/gpl.html
10
 * @platform        WebsiteBaker 2.8.x
11
 * @requirements    PHP 5.2.2 and higher
12
 * @version         $Id$
13
 * @filesource		$HeadURL$
14
 * @lastmodified    $Date$
15
 *
16
 */
17

  
18
/* -------------------------------------------------------- */
19
// Must include code to stop this file being accessed directly
20
if(defined('WB_PATH') == false)
21
{
22
	die('<h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2>');
23
}
24
/* -------------------------------------------------------- */
25

  
26
require_once(dirname(__FILE__).'/AccountSignup.php');
27
AccountSignup::deleteOutdatedConfirmations();
28
$sPassword = isset($_POST['new_password_1'])     ? mysql_escape_string($_POST['new_password_1']) : '';
29
$sLoginName = isset($_POST['new_loginname'])     ? mysql_escape_string($_POST['new_loginname']) : '';
30
$sConfirmationId = isset($_POST['confirm_code']) ? mysql_escape_string($_POST['confirm_code'])   : '';
31

  
32
$bSendRegistrationMailtoUser = false;
33
$bSendRegistrationMailtoAdmin = false;
34
$aUser = array();
35
if( ($sPassword=='') || ($sLoginName=='') ) {
36
	msgQueue::add( $mLang->MESSAGE_LOGIN_BOTH_BLANK);
37
} else {
38
	if( $iUserId = AccountSignup::checkPassWordConfirmCode( $sPassword, $sConfirmationId )) {
39
		msgQueue::add( $mLang->MESSAGE_ACTIVATED_NEW_USER, true );
40
		AccountSignup::saveNewConfirmation($sConfirmationId);
41
        $email_to = AccountSignup::emailUser($iUserId);
42
        $bSaveRegistration = $iUserId > 0;
43
		$sSubmitAction = 'finished'; // default action
44
		$sql  = 'SELECT * FROM `'.TABLE_PREFIX.'users` ';
45
		$sql .= 'WHERE `user_id` ='.$iUserId.' ';
46
		if($oRes = $database->query($sql)) {
47
            $aUser = $oRes->fetchRow(MYSQL_ASSOC);
48
            $bSaveRegistration = true;
49
            $sDisplayName = $aUser['display_name'];
50
            $email_to = $aUser['email'];
51
            $sLoginIp = $aUser['login_ip'];
52
            $sLoginName = $aUser['username'];
53
		}
54

  
55
	} else {
56
		msgQueue::add( $mLang->MESSAGE_FAILED_NEW_USER );
57
	}
58
}
59

  
0 60

  
branches/2.8.x/wb/account/confirm_form.php
1
<?php
2
/**
3
 *
4
 * @category        frontend
5
 * @package         account
6
 * @author          WebsiteBaker Project
7
 * @copyright       2009-2012, WebsiteBaker Org. e.V.
8
 * @link			http://www.websitebaker2.org/
9
 * @license         http://www.gnu.org/licenses/gpl.html
10
 * @platform        WebsiteBaker 2.8.x
11
 * @requirements    PHP 5.2.2 and higher
12
 * @version         $Id$
13
 * @filesource		$HeadURL$
14
 * @lastmodified    $Date$
15
 *
16
 */
17
/* -------------------------------------------------------- */
18
// Must include code to stop this file being accessed directly
19
if(defined('WB_PATH') == false)
20
{
21
	die('<h2 style="color:red;margin:3em auto;text-align:center;">Cannot access this file directly</h2>');
22
}
23
/* -------------------------------------------------------- */
24

  
25
	require_once(dirname(__FILE__).'/AccountSignup.php');
26

  
27
    	// load module language file
28
    	$mLang = ModLanguage::getInstance();
29

  
30
		$sConfirmationId = ( isset($_GET['id']) ? $_GET['id'] : ( isset($_POST['confirm_code']) ? $_POST['confirm_code'] : '' ) );
31
		$sSubmitAction = 'show'; // default action
32
		$sSubmitAction = ( isset($_POST['action']) ? $_POST['action'] : $sSubmitAction );
33
		if( isset($_POST['action_cancel']))
34
		{
35
			unset($_POST);
36
			$sSubmitAction = 'cancel'; // default action
37
		}
38

  
39
		$output = '';
40
		msgQueue::clear();
41
		switch($sSubmitAction) :
42
			case 'save_confirm':
43
				include(dirname(__FILE__).'/save_confirm.php');
44
        		if($sSubmitAction=='finished') {
45
        			include(dirname(__FILE__).'/confirm_mails.php');
46
     				break;
47
           		}
48
				if(!msgQueue::isEmpty()) {
49
					include(dirname(__FILE__).'/confirm_form_mask.php');
50
				}
51
				break;
52
			default:
53
				include(dirname(__FILE__).'/confirm_form_mask.php');
54
		endswitch; // end of switch
55

  
56

  
57
//		if(!msgQueue::isEmpty())
58
//		{
59
//		}
60
//		if( ($msg = msgQueue::getSuccess()) != '')
61
//		{
62
//			$output = $admin->format_message($msg, 'ok').$output;
63
//		}
64
//		if( ($msg = msgQueue::getError()) != '')
65
//		{
66
//			$output = $admin->format_message($msg, 'error').$output;
67
//		}
68
//		print $output;
0 69

  
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff