-
Notifications
You must be signed in to change notification settings - Fork 0
/
login.php
54 lines (48 loc) · 1.83 KB
/
login.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
51
52
53
54
<?php include('server.php'); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>TS Clinic IS</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="https://www.stud.fit.vutbr.cz/~xzubri00/IIS/style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-inverse">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="index.php">TS Clinic IS</a>
</div>
</div>
</nav>
<div class="container">
<div class="form-header">
<h4>Log in as an
<?php echo (isset($_GET['user']) && $_GET['user']=="0") ? "admin": "employee"?>
</h4>
</div>
<form class="login-form" method="post" action="login.php?<?php echo "user=".$_GET['user'];?>">
<?php include('errors.php');?>
<div class="form-group">
<label for="inputUsername">Username</label>
<input type="text" name="username" class="form-control" placeholder="Username" required>
</div>
<div class="form-group">
<label for="inputPassword">Password</label>
<input type="password" name="password" class="form-control" placeholder="Password" required>
</div>
<button type="submit" name="login" class="btn btn-primary">Login</button>
<a style="float: right;" href="index.php" class="btn btn-primary" role="button">Back</a>
</form>
</div>
</body>
</html>
<script>
/*JS Script removing resubmission of form */
if ( window.history.replaceState ) {
window.history.replaceState( null, null, window.location.href );
}
</script>