forked from robinp7720/MC-CoreProtect-Web-GUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
60 lines (51 loc) · 1.7 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
<?php
$debug = 1;
if ($debug == 0) {
error_reporting(0);
@ini_set('display_errors', 0);
} else {
error_reporting(1);
@ini_set('display_errors', 1);
}
session_start();
require __DIR__ . "/configs/coreprotect.php";
require __DIR__ . "/configs/banhammer.php";
require __DIR__ . "/configs/general.php";
require __DIR__ . "/configs/version.php";
require __DIR__ . "/configs/plugins.php";
require __DIR__ . "/include/blocks.php";
require __DIR__ . "/include/functions.php";
require __DIR__ . '/include/MinecraftQuery.class.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php require "include/header.php" ?>
</head>
<body style="padding-top: 70px;">
<?php
if (isset($_GET["user"])) {
$user = $_GET["user"]; //Set user if aviable for later use
}
if (isset($_GET["page"])) {
$page = $_GET["page"]; //Set Page Variable to include the correct page
}
if (!isset($_GET["page"]) || empty($_GET["page"])) {
$page = "home"; // If no page is specified Home is used
}
if (!isset($settings["interfacepass"]) || !isset($settings["login"]) || isset($_SESSION["auth"]) || $settings["login"] == "") {
include "include/nav.php"; //If logged in or first install or no login add the nav bar
}
?>
<div class="container">
<?php
if (!isset($settings["interfacepass"]) || !isset($settings["login"]) || isset($_SESSION["auth"]) || $settings["login"] == "") {
include "pages/" . str_replace(array("/", ".", ":"), "", $page) . ".php"; //Include the page
} else {
include "pages/login.php"; //If not loggedin, show the login page
}
?>
</div>
</body>
<script>jQuery('#datetimepicker').datetimepicker();</script>
</html>