1
|
<?php
|
2
|
|
3
|
// $Id: login_form.php 1190 2009-11-26 17:17:44Z Luisehahne $
|
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
|
|
92
|
<a href="<?php echo WB_URL; ?>/account/forgot.php"><?php echo $TEXT['FORGOTTEN_DETAILS']; ?></a>
|