Project

General

Profile

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: login_form.php 1473 2011-07-09 00:40:50Z Luisehahne $
14
 * @filesource		$HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/account/login_form.php $
15
 * @lastmodified    $Date: 2011-07-09 02:40:50 +0200 (Sat, 09 Jul 2011) $
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
$username_fieldname = 'username';
23
$password_fieldname = 'password';
24
	
25
if(defined('SMART_LOGIN') AND SMART_LOGIN == 'enabled') {
26
	// Generate username field name
27
	$username_fieldname = 'username_';
28
	$password_fieldname = 'password_';
29

    
30
	$temp = array_merge(range('a','z'), range(0,9));
31
	shuffle($temp);
32
	for($i=0;$i<=7;$i++) {
33
		$username_fieldname .= $temp[$i];
34
		$password_fieldname .= $temp[$i];
35
	}
36
}
37
?>
38
<h1>&nbsp;Login</h1>
39
&nbsp;<?php echo $thisApp->message; ?>
40
<br />
41
<br />
42

    
43
<form action="<?php echo WB_URL.'/account/login.php'; ?>" method="post">
44
<p style="display:none;"><input type="hidden" name="username_fieldname" value="<?php echo $username_fieldname; ?>" /></p>
45
<p style="display:none;"><input type="hidden" name="password_fieldname" value="<?php echo $password_fieldname; ?>" /></p>
46
<p style="display:none;"><input type="hidden" name="url" value="<?php echo $thisApp->redirect_url;?>" /></p>
47

    
48
<table cellpadding="5" cellspacing="0" border="0" width="90%">
49
<tr>
50
	<td style="width:100px"><?php echo $TEXT['USERNAME']; ?>:</td>
51
	<td class="value_input">
52
		<input type="text" name="<?php echo $username_fieldname; ?>" maxlength="30" style="width:220px;"/>
53
    	<script type="text/javascript">
54
    	// document.login.<?php echo $username_fieldname; ?>.focus();
55
    	var ref= document.getElementById("<?php echo $username_fieldname; ?>");
56
    	if (ref) ref.focus();
57
    	</script>
58
	</td>
59
</tr>
60
<tr>
61
	<td style="width:100px"><?php echo $TEXT['PASSWORD']; ?>:</td>
62
	<td class="value_input">
63
		<input type="password" name="<?php echo $password_fieldname; ?>" maxlength="30" style="width:220px;"/>
64
	</td>
65
</tr>
66
<?php if($username_fieldname != 'username') { ?>
67
<tr>
68
	<td>&nbsp;</td>
69
	<td>
70
		<input type="checkbox" name="remember" id="remember" value="true"/>
71
		<label for="remember"><?php echo $TEXT['REMEMBER_ME']; ?></label>
72
	</td>
73
</tr>
74
<?php } ?>
75
<tr>
76
	<td>&nbsp;</td>
77
	<td>
78
		<input type="submit" name="submit" value="<?php echo $TEXT['LOGIN']; ?>"  />
79
		<input type="reset" name="reset" value="<?php echo $TEXT['RESET']; ?>"  />
80
	</td>
81
</tr>
82
</table>
83

    
84
</form>
85

    
86
<br />
87

    
88
<a href="<?php echo WB_URL; ?>/account/forgot.php"><?php echo $TEXT['FORGOTTEN_DETAILS']; ?></a>
(7-7/14)