-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
57 lines (56 loc) · 2.53 KB
/
index.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
55
56
57
<?php
include 'process/connect_db.php';
session_start();
// Mencegah kembali ke halaman Login sebelum melakukan Logout
if (ISSET($_SESSION['level'])) {
header('Location: beranda.php');
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>SPK Metode DEA</title>
<!-- Bootstrap -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/css/style.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-sm-4 col-sm-offset-4" id="login-box">
<div class="panel panel-default">
<div class="panel-body">
<?php
if (ISSET($_SESSION['error'])) {
// Terdapat Error Saat Login
echo '<div class="alert alert-dismissible alert-danger"><button type="button" class="close" data-dismiss="alert">×</button><span class="glyphicon glyphicon-exclamation-sign"></span> '.$_SESSION['error'].'</div>';
}
?>
<h2 id="login-text"> <img src="assets/img/logo_polibest.jpg" width="180px" class="img-responsive center-block"> </h2>
<form role="form" action="process/login.php" method="post">
<div class="form-group">
<div class="input-group input-group-md">
<label class="sr-only">Username</label>
<span class="input-group-addon"><span class="glyphicon glyphicon-user"></span></span>
<input type="text" class="form-control" placeholder="Username" name="username" required>
</div>
</div>
<div class="form-group">
<div class="input-group input-group-md">
<label class="sr-only">Password</label>
<span class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></span>
<input type="password" class="form-control" placeholder="Password" name="password" required>
</div>
</div>
<button type="submit" class="btn btn-primary" name="login" value="login" id="login-button">Login</button>
</form>
<hr />
<h5 id="copyright">© 2023 All Rights Reserved.</h5>
</div>
</div>
</div>
<?php include 'layout2.php' ?>