-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAuth.php
More file actions
60 lines (55 loc) · 1.67 KB
/
Copy pathAuth.php
File metadata and controls
60 lines (55 loc) · 1.67 KB
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
<?php
include_once "PHP/Functions.php";
if(isset($_POST['login'])){
if(isAdminExist($_POST['name'], $_POST['pass'])){
$_SESSION['adminID'] = $_POST['name'];
$_SESSION['isAdmin'] = true;
}
header("location:index.php");
}
else if($_SESSION['adminID'] == -1){
?>
<html>
<head>
<?php
getHead("Auth");
?>
<link rel="stylesheet" type="text/css" href="CSS/custom/Board.css">
</head>
<body style="background-color:#2E4874">
<div class = "sixteen wide column"><?php printHTMLHeader() ?></div>
<div class="ui container">
<form action="auth.php" method="POST" align="center">
<input type="hidden" name="login" value="true">
<div class="ui inverted segment">
<div class="ui inverted form">
<div class="one fields">
<div class="field">
<label>Admin Name</label>
<input type="text" value="" name="name">
</div>
</div>
<div class="one fields">
<div class="field">
<label>Admin Pass</label>
<input type="password" name="pass">
</div>
</div>
<div class="one fields">
<div class="field">
<button class="ui button">AUTH</button>
</div>
</div>
</div>
</div>
</form>
</div>
</body>
<html>
<?php
}else{
$_SESSION['adminID'] = -1;
$_SESSION['isAdmin'] = false;
header("location:index.php");
}
?>