-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmaintenance.php
125 lines (111 loc) · 3.24 KB
/
maintenance.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?php include 'components/authentication.php' ?>
<?php include 'components/session-check.php' ?>
<?php include 'controllers/base/head.php' ?>
<?php include 'controllers/navigation/first-navigation.php' ?>
<?php
if($_GET["request"]=="profile-update" && $_GET["status"]=="success"){
$dialogue="Your profile update was successful! ";
}
else if($_GET["request"]=="profile-update" && $_GET["status"]=="unsuccess"){
$dialogue="Your profile update was not at all successful! ";
}
else if($_GET["request"]=="login" && $_GET["status"]=="success"){
$dialogue="Welcome back again! ";
}
?>
<?php include '/var/www/_database/database.php' ?>
<?php echo '<link rel="stylesheet" type="text/css" href="style.css">';?>
<script>
$(document).bind("contextmenu",function(e) {
e.preventDefault();
});
$(document).keydown(function(e){
if(e.which === 123){
return false;
}
});
$(document).keydown(function(event){
if(event.keyCode==123){
return false;//Prevent from F12
}
else if(event.ctrlKey && event.shiftKey && event.keyCode==73){
return false; //Prevent from ctrl+shift+i
}
});
</script>
<?php
if ($current_user == "admin" or $current_user =="ItalianoBaffi" or $current_user =="root")
{?>
<br>
<center><h1>ADMINISTRATION</h1></center>
<br>
<br>
<center>
<h4>View all users</h4>
<button id="users" class="float-left submit-button" >Users</button>
<script type="text/javascript">
document.getElementById("users").onclick = function () {
location.href = "users.php";
};
</script>
</center>
<center>
<br>
<br>
<h4>Reviews</h4>
<button id="reviews" class="float-left submit-button" >Reviews</button>
<script type="text/javascript">
document.getElementById("reviews").onclick = function () {
location.href = "reviews.php";
};
</script>
<br>
<br>
<br>
<h4> BEWARE! CLICKING THIS BUTTON WILL DELETE THE CONTENTS OF THE DATABASE! ONLY DO THIS WITH ADMINISTRATOR APPROVAL!</h4>
<button id="trunicate" onclick="getConfirmatio();" class="float-left submit-button" >Destroy Database Contents</button>
<script type="text/javascript">
function getConfirmatio(){
var retVal = confirm("CAUTION! You are about to remove all contents of the database, are you sure... ?");
if( retVal == true ){
location.href = "trunicate.php";
return true;
}
else{
return false;
}
}
//-->
</script>
<br>
<br>
<br>
<br>
<button id="todo" class="float-left submit-button" >Developers ToDo</button>
<script type="text/javascript">
document.getElementById("todo").onclick = function () {
location.href = "todo.php";
};
</script>
<br>
<br>
<br>
<br>
<button id="removeblanks" class="float-left submit-button" >Remove Blanks</button>
<script type="text/javascript">
document.getElementById("removeblanks").onclick = function () {
location.href = "removeblanks.php";
};
</script>
</center>
<?php
}
else
{
echo "<br>";
echo "<br>";
echo "<br>";
echo "<center>";
echo "<h1>YOU ARE NOT PERMITTED TO ACCESS THIS PAGE!</h1>";
echo "</center>";
} ?>