Project

General

Profile

1
<?php
2
/*
3
*
4
*                       About WebsiteBaker
5
*
6
* Website Baker is a PHP-based Content Management System (CMS)
7
* designed with one goal in mind: to enable its users to produce websites
8
* with ease.
9
*
10
*                       LICENSE INFORMATION
11
*
12
* WebsiteBaker is free software; you can redistribute it and/or
13
* modify it under the terms of the GNU General Public License
14
* as published by the Free Software Foundation; either version 2
15
* of the License, or (at your option) any later version.
16
*
17
* WebsiteBaker is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20
* See the GNU General Public License for more details.
21
*
22
* You should have received a copy of the GNU General Public License
23
* along with this program; if not, write to the Free Software
24
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
25
*
26
*                   WebsiteBaker Extra Information
27
*
28
*
29
*/
30
/**
31
 *
32
 * @category        frontend
33
 * @package         account
34
 * @author          Ryan Djurovich
35
 * @copyright       2004-2009, Ryan Djurovich
36
 * @copyright       2009-2010, Website Baker Org. e.V.
37
 * @filesource		$HeadURL: svn://isteam.dynxs.de/wb-archiv/branches/2.8.x/wb/account/login_form.php $
38
 * @author          Ryan Djurovich
39
 * @copyright       2004-2009, Ryan Djurovich
40
 *
41
 * @author          WebsiteBaker Project
42
 * @link			http://www.websitebaker2.org/
43
 * @copyright       2009-2010, Website Baker Org. e.V.
44
 * @link			http://start.websitebaker2.org/impressum-datenschutz.php
45
 * @license         http://www.gnu.org/licenses/gpl.html
46
 * @version         $Id: login_form.php 1262 2010-01-21 08:24:34Z Luisehahne $
47
 * @platform        WebsiteBaker 2.8.x
48
 * @requirements    PHP 4.3.4 and higher
49
 * @lastmodified    $Date: 2010-01-21 09:24:34 +0100 (Thu, 21 Jan 2010) $
50
 *
51
 */
52

    
53
if(!defined('WB_URL')) die(header('Location: ../../index.php'));
54

    
55
$username_fieldname = 'username';
56
$password_fieldname = 'password';
57
	
58
if(defined('SMART_LOGIN') AND SMART_LOGIN == 'enabled') {
59
	// Generate username field name
60
	$username_fieldname = 'username_';
61
	$password_fieldname = 'password_';
62

    
63
	$temp = array_merge(range('a','z'), range(0,9));
64
	shuffle($temp);
65
	for($i=0;$i<=7;$i++) {
66
		$username_fieldname .= $temp[$i];
67
		$password_fieldname .= $temp[$i];
68
	}
69
}
70
?>
71
<h1>&nbsp;Login</h1>
72
&nbsp;<?php echo $thisApp->message; ?>
73
<br />
74
<br />
75

    
76
<form action="<?php echo WB_URL.'/account/login.php'; ?>" method="post">
77
<p style="display:none;"><input type="hidden" name="username_fieldname" value="<?php echo $username_fieldname; ?>" /></p>
78
<p style="display:none;"><input type="hidden" name="password_fieldname" value="<?php echo $password_fieldname; ?>" /></p>
79
<p style="display:none;"><input type="hidden" name="redirect" value="<?php echo $thisApp->redirect_url;?>" /></p>
80

    
81
<table cellpadding="5" cellspacing="0" border="0" width="90%">
82
<tr>
83
	<td style="width:100px"><?php echo $TEXT['USERNAME']; ?>:</td>
84
	<td class="value_input">
85
		<input type="text" name="<?php echo $username_fieldname; ?>" maxlength="30" style="width:220px;"/>
86
    	<script type="text/javascript">
87
    	// document.login.<?php echo $username_fieldname; ?>.focus();
88
    	var ref= document.getElementById("<?php echo $username_fieldname; ?>");
89
    	if (ref) ref.focus();
90
    	</script>
91
	</td>
92
</tr>
93
<tr>
94
	<td style="width:100px"><?php echo $TEXT['PASSWORD']; ?>:</td>
95
	<td class="value_input">
96
		<input type="password" name="<?php echo $password_fieldname; ?>" maxlength="30" style="width:220px;"/>
97
	</td>
98
</tr>
99
<?php if($username_fieldname != 'username') { ?>
100
<tr>
101
	<td>&nbsp;</td>
102
	<td>
103
		<input type="checkbox" name="remember" id="remember" value="true"/>
104
		<label for="remember"><?php echo $TEXT['REMEMBER_ME']; ?></label>
105
	</td>
106
</tr>
107
<?php } ?>
108
<tr>
109
	<td>&nbsp;</td>
110
	<td>
111
		<input type="submit" name="submit" value="<?php echo $TEXT['LOGIN']; ?>"  />
112
		<input type="reset" name="reset" value="<?php echo $TEXT['RESET']; ?>"  />
113
	</td>
114
</tr>
115
</table>
116

    
117
</form>
118

    
119
<br />
120

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