-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathadmin.php
executable file
·44 lines (40 loc) · 874 Bytes
/
admin.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
<?php
include 'load.php';
if(isset($_GET['loginform'])){
if(isset($_SESSION['login'])){
header("Location: admin.php?p=3");
}
else{
system_loginform();
}
}
elseif(isset($_GET['login'])){
system_login_backend();
}
elseif(isset($_GET['register'])){
system_register($_POST['register-username'], $_POST['register-password'], $_POST['register-email']);
}
else{
if(!isset($_SESSION['login'])){
header("Location: admin.php?loginform");
die('<a href="admin.php?loginform">Click here</a> if you didn\'t get redirected.');
}
else{
if(isset($_GET['logout'])){
unset($_SESSION['login']);
header("Location: index.php");
}
if(isset($_GET['p'])){
if($_GET['p'] == 1){
admin_main();
}
else{
admin_loadpage($_GET['p']);
}
}
else{
admin_main();
}
}
}
?>