forked from jjeroennl/quantiweb
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin.php
More file actions
executable file
·44 lines (40 loc) · 815 Bytes
/
admin.php
File metadata and controls
executable file
·44 lines (40 loc) · 815 Bytes
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'])){
echo "something went wrong";
header("Location: admin.php?loginform");
}
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();
}
}
}
?>