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 1599 2012-02-06 15:59:24Z Luisehahne $
|
14
|
* @filesource $HeadURL: svn://isteam.dynxs.de/wb-archiv/tags/2.8.3/wb/account/login_form.php $
|
15
|
* @lastmodified $Date: 2012-02-06 16:59:24 +0100 (Mon, 06 Feb 2012) $
|
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
|
$thisApp->redirect_url = (isset($thisApp->redirect_url) && ($thisApp->redirect_url!='') ? $thisApp->redirect_url : $_SESSION['HTTP_REFERER'] );
|
39
|
?>
|
40
|
<div style="margin: 1em auto;">
|
41
|
<button type="button" value="cancel" onClick="javascript: window.location = '<?php print $_SESSION['HTTP_REFERER'] ?>';"><?php print $TEXT['CANCEL'] ?></button>
|
42
|
</div>
|
43
|
<h1> Login</h1>
|
44
|
<?php echo $thisApp->message; ?>
|
45
|
<br />
|
46
|
<br />
|
47
|
|
48
|
<form class="login-box" action="<?php echo WB_URL.'/account/login.php'; ?>" method="post">
|
49
|
<input type="hidden" name="username_fieldname" value="<?php echo $username_fieldname; ?>" />
|
50
|
<input type="hidden" name="password_fieldname" value="<?php echo $password_fieldname; ?>" />
|
51
|
<input type="hidden" name="redirect" value="<?php echo $thisApp->redirect_url;?>" />
|
52
|
|
53
|
<table cellpadding="5" cellspacing="0" border="0" width="90%">
|
54
|
<tr>
|
55
|
<td style="width:100px"><?php echo $TEXT['USERNAME']; ?>:</td>
|
56
|
<td class="value_input">
|
57
|
<input type="text" name="<?php echo $username_fieldname; ?>" maxlength="30" style="width:220px;"/>
|
58
|
<script type="text/javascript">
|
59
|
// document.login.<?php echo $username_fieldname; ?>.focus();
|
60
|
var ref= document.getElementById("<?php echo $username_fieldname; ?>");
|
61
|
if (ref) ref.focus();
|
62
|
</script>
|
63
|
</td>
|
64
|
</tr>
|
65
|
<tr>
|
66
|
<td style="width:100px"><?php echo $TEXT['PASSWORD']; ?>:</td>
|
67
|
<td class="value_input">
|
68
|
<input type="password" name="<?php echo $password_fieldname; ?>" maxlength="30" style="width:220px;"/>
|
69
|
</td>
|
70
|
</tr>
|
71
|
<?php if($username_fieldname != 'username') { ?>
|
72
|
<tr>
|
73
|
<td> </td>
|
74
|
<td>
|
75
|
<input type="checkbox" name="remember" id="remember" value="true"/>
|
76
|
<label for="remember"><?php echo $TEXT['REMEMBER_ME']; ?></label>
|
77
|
</td>
|
78
|
</tr>
|
79
|
<?php } ?>
|
80
|
<tr>
|
81
|
<td> </td>
|
82
|
<td>
|
83
|
<input type="submit" name="submit" value="<?php echo $TEXT['LOGIN']; ?>" />
|
84
|
<input type="reset" name="reset" value="<?php echo $TEXT['RESET']; ?>" />
|
85
|
</td>
|
86
|
</tr>
|
87
|
</table>
|
88
|
|
89
|
</form>
|
90
|
|
91
|
<br />
|
92
|
|
93
|
<a href="<?php echo WB_URL; ?>/account/forgot.php"><?php echo $TEXT['FORGOTTEN_DETAILS']; ?></a>
|