Tweaking for mobiles, see #14
[PHPCredLocker.git] / modules / login-navbar / login-navbar.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
/** Login Module
*
* Copyright (C) 2012 B Tasker
* Released under GNU GPL V2
* See LICENSE
*
*/
defined('_CREDLOCK') or die;
?>
<ul class="nav pull-right">
 
 
<li class="nav dropdown">
 
    <?php if (!empty(BTMain::getUser()->name)): ?>
<a class="dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-user icon-white"></i>
    <span class="hidden-phone"><?php echo BTMain::getUser()->name; ?></span>
 
    </a>
 
 
        <ul class="dropdown-menu" role="menu" id='CurUserMenu' aria-Labelled-by='dLabel'>
          <li><a href="index.php?option=logout">Log Out</a></li>
          <li><a href="index.php?option=changePassword">Change Password</a></li>
        </ul>
 
 
<?php else: 
 
$frmToken = ProgAuth::generateFormToken();
?>
 
 
      <form method='POST' class="navbar-form navbar-search pull-right" onsubmit="return loginReqProcess();">
      <input type="hidden" disabled="disabled" value="<?php echo $tls;?>" id="tls">
      <input type="hidden" name="option" value="LogIn">
      <input type="hidden" name="FormToken" value="<?php echo $frmToken; ?>">
 
    <input type='text' name='FrmUsername' class="search-query" id='FrmUsername' placeholder="Username">
    <input type="hidden" id="FrmPass" name="FrmPass"><!-- The form element that's actually submitted -->
    <input type='password' name='FrmPassPlace' class="search-query" id='FrmPassPlace' placeholder="Password">
      
 
      <input type="submit" class="btn btn-inverse" value="Login">
      </form>
<?php endif; ?>
</li>
</ul>