Project

General

Profile

1
<?php
2

    
3
// $Id: login_form.php 1261 2010-01-21 06:54:48Z 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>&nbsp;Login</h1>
45
&nbsp;<?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
    	var ref= document.getElementById("<?php echo $username_fieldname; ?>");
62
    	if (ref) ref.focus();
63
    	</script>
64
	</td>
65
</tr>
66
<tr>
67
	<td style="width:100px"><?php echo $TEXT['PASSWORD']; ?>:</td>
68
	<td class="value_input">
69
		<input type="password" name="<?php echo $password_fieldname; ?>" maxlength="30" style="width:220px;"/>
70
	</td>
71
</tr>
72
<?php if($username_fieldname != 'username') { ?>
73
<tr>
74
	<td>&nbsp;</td>
75
	<td>
76
		<input type="checkbox" name="remember" id="remember" value="true"/>
77
		<label for="remember"><?php echo $TEXT['REMEMBER_ME']; ?></label>
78
	</td>
79
</tr>
80
<?php } ?>
81
<tr>
82
	<td>&nbsp;</td>
83
	<td>
84
		<input type="submit" name="submit" value="<?php echo $TEXT['LOGIN']; ?>"  />
85
		<input type="reset" name="reset" value="<?php echo $TEXT['RESET']; ?>"  />
86
	</td>
87
</tr>
88
</table>
89

    
90
</form>
91

    
92
<br />
93

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