Project

General

Profile

1
<?php
2
/**
3
 *
4
 * @category        frontend
5
 * @package         account
6
 * @author          WebsiteBaker Project
7
 * @copyright       Ryan Djurovich
8
 * @copyright       Website Baker Org. e.V.
9
 * @link            http://websitebaker.org/
10
 * @license         http://www.gnu.org/licenses/gpl.html
11
 * @platform        WebsiteBaker 2.8.3
12
 * @requirements    PHP 5.3.6 and higher
13
 * @version         $Id: login_form.php 2 2017-07-02 15:14:29Z Manuela $
14
 * @filesource      $HeadURL: svn://isteam.dynxs.de/wb/2.10.x/trunk/account/login_form.php $
15
 * @lastmodified    $Date: 2017-07-02 17:14:29 +0200 (Sun, 02 Jul 2017) $
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
if(defined('SMART_LOGIN') && SMART_LOGIN == 'true') {
25
    $sTmp = '_'.substr(md5(microtime()), -8);
26
    $username_fieldname .= $sTmp;
27
    $password_fieldname .= $sTmp;
28
}
29

    
30
$thisApp->redirect_url = (isset($thisApp->redirect_url) && ($thisApp->redirect_url!='')  ? $thisApp->redirect_url : $_SESSION['HTTP_REFERER'] );
31

    
32
?>
33
<div style="margin: 1em auto;">
34
    <button type="button" value="cancel" onclick="javascript: window.location = '<?php print $_SESSION['HTTP_REFERER'] ?>';"><?php print $TEXT['CANCEL'] ?></button>
35
</div>
36
<h1>&nbsp;Login</h1>
37
&nbsp;<?php
38

    
39
    echo $thisApp->getMessage();
40
?>
41
<br />
42
<br />
43

    
44
<form class="login-box account" action="<?php echo WB_URL.'/account/login.php'; ?>" method="post">
45
<input type="hidden" name="username_fieldname" value="<?php echo $username_fieldname; ?>" />
46
<input type="hidden" name="password_fieldname" value="<?php echo $password_fieldname; ?>" />
47
<input type="hidden" name="redirect" value="<?php echo $thisApp->redirect_url;?>" />
48

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

    
85
</form>
86

    
87
<br />
88

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