SiDoMan/index.php

54 lines
1.3 KiB
PHP
Raw Normal View History

2020-10-21 21:37:20 +00:00
<?php
date_default_timezone_set("Europe/Berlin");
header('Strict-Transport-Security: max-age=657000');
error_reporting(E_ALL);
session_start();
include_once("classen/HTML.php");
include_once("classen/GoogleAuthenticator.php");
2020-10-23 09:55:26 +00:00
include_once("classen/docker.php");
2020-10-21 21:37:20 +00:00
2020-10-23 19:59:35 +00:00
$RUNTIME = array();
if(!file_exists("./pages/systemkey.txt"))
{
$randomKey = md5(rand(111111111, 999999999));
file_put_contents("./pages/systemkey.txt", $randomKey);
}
$RUNTIME['SYSTEMKEY'] = file_get_contents("./pages/systemkey.txt");
2020-10-21 23:00:19 +00:00
2020-10-23 20:17:17 +00:00
$_SESSION['CONATINER'] = "Game.OpenSimulator.Twix";
2020-10-23 12:23:40 +00:00
$_SESSION['LOGIN'] = "true";
2020-10-23 12:06:02 +00:00
2020-10-21 21:37:20 +00:00
if(isset($_REQUEST['logout']))
if($_REQUEST['logout'] == '1')
$_SESSION = array();
if(isset($_SESSION['LOGIN']))
if($_SESSION['LOGIN'] == 'true')
{
if(!isset($_REQUEST['page']))
$_REQUEST['page'] = 'dashboard';
if(file_exists("./pages/".$_REQUEST['page'].".php")){
if($_REQUEST['page'] == str_replace("/"," ",$_REQUEST['page']) and $_REQUEST['page'] == str_replace("\\"," ",$_REQUEST['page']) and $_REQUEST['page'] == str_replace(".."," ",$_REQUEST['page'])){
include "./pages/".$_REQUEST['page'].".php";
}else{
include "./pages/error.php";
}
}else{
include "./pages/error.php";
}
die();
}
2020-10-21 21:48:34 +00:00
if(file_exists("./pages/login.php")){
include "./pages/login.php";
}else{
include "./pages/error.php";
}
2020-10-23 12:06:02 +00:00
2020-10-21 21:37:20 +00:00
?>