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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <?php require_once './include/head.php'; ?> <?php require_once './include/login.php'; ?> <script> $(document).ready(function(){ $('#name').focus(); }); </script> <style type="text/css"> body { padding-top: 60px; /* 60px to make the container go all the way to the bottom of the topbar */ padding-bottom: 40px; background-color: #f5f5f5; }
.form-signin { max-width: 300px; padding: 19px 29px 29px; margin: 0 auto 20px; background-color: #fff; border: 1px solid #e5e5e5; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05); -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05); box-shadow: 0 1px 2px rgba(0,0,0,.05); } .form-signin .form-signin-heading { margin-bottom: 10px; } .form-signin input[type="text"], .form-signin input[type="password"] { font-size: 16px; height: auto; margin-bottom: 15px; padding: 7px 9px; } </style> </head> <body>
<?php if (isset($_POST['submit'])) { login($dbh, $_POST['name'], $_POST['password']); echo $status; } ?> <div class="container">
<form method="post" class="form-signin" action="" autocomplete="off"> <?php if (isset($_POST['submit']) && !$status) { ?> <div class="alert alert-error"> <button type="button" class="close" data-dismiss="alert">×</button> <h5 class="alert-heading">Error !</h5> <p>User name or password not correct.</p> </div> <?php } ?> <h2 class="form-signin-heading text-center"><img src="images/pathways_logo.png" alt="Logo" title="Pathways MIS" /></h2> <div class="control-group"> <label class="control-label" for="name">User name</label> <div class="controls"> <input type="text" id="name" name="name" value="<?= isset($name) ? $name : '' ?>" class="input-block-level" placeholder="User name" maxlength="200" /> </div> </div> <div class="control-group"> <label class="control-label" for="password">Password</label> <div class="controls"> <input type="password" id="password" name="password" class="input-block-level" placeholder="Password" maxlength="200" autocomplete="off" /> </div> </div> <div class="control-group"> <div class="controls"> <div class="text-right"> <input name="submit" class="btn btn-large btn-danger" type="submit" value="Sign in" /> </div> </div> </div> </form>
</div> <!-- /container --> </body> </html>
|