-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
69 lines (68 loc) · 2.24 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
58
59
60
61
62
63
64
65
66
67
68
69
<!DOCTYPE html>
<?php
require("config.php");
require("functions/login.php");
if(isset($_POST["blogin"]) && $_POST["blogin"]=="Logga in") {
$login=login($_POST["password"]);
if($login=="0") {
header("Location:activity.php");
exit;
} elseif($login=="1") {
$action="toastr.error('Felaktigt lösenord');";
} else {
$action="toastr.error('Ett fel uppstod');";
}
}
if(isset($_GET["error"]) && $_GET["error"]=="1") {
$action="toastr.error('Inte inloggad');";
}
if(isset($_GET["logout"]) && $_GET["logout"]=="1") {
$action="toastr.success('Du är nu utloggad');";
}
?>
<html lang="se">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>PrintFlow</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/adminlte.min.css">
<link rel="stylesheet" href="css/toastr.min.css">
<link rel="stylesheet" href="css/printflow.css">
<!--[if lt IE 9]>
<script src="js/html5shiv.min.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->
</head>
<body class="hold-transition login-page" onload="<?php if(isset($action)) { print($action); } ?>">
<div class="login-box">
<div class="login-logo">
<b>PRINT</b>FLOW
</div>
<div class="login-box-body">
<form action="index.php" method="post">
<div class="form-group has-feedback">
<input type="password" name="password" id="password" class="form-control" placeholder="Lösenord" autofocus>
<span class="fa fa-lock form-control-feedback"></span>
</div>
<div class="row">
<div class="col-xs-8">
</div>
<div class="col-xs-4">
<input type="submit" class="btn btn-primary btn-block btn-flat" name="blogin" value="Logga in">
</div>
</div>
</form>
</div>
</div>
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.slimscroll.min.js"></script>
<script src="js/fastclick.min.js"></script>
<script src="js/app.min.js"></script>
<script src="js/toastr.min.js"></script>
</body>
</html>