This repository has been archived by the owner on Oct 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.php
49 lines (44 loc) · 1.72 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
<?php
if(!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == ""){
$redirect = "https://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
header("HTTP/1.1 301 Moved Permanently");
header("Location: $redirect");
}
$url = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
if(substr($url, -1) != '/' && !strpos($url, '?')){
header("Location: $url/");
}
require_once("scripts/tools/UserAgendParser.php");
//https://donatstudios.com/PHP-Parser-HTTP_USER_AGENT
$browser = parse_user_agent()['browser'];
$platform = parse_user_agent()['platform'];
if(($browser == "MSIE" || $browser == "IEMobile") && $_GET["msie"] != true){
header("Location: https://www.deepspace.onl/errors/unsupported_browser.html");
exit();
}
?>
<!DOCTYPE html>
<html>
<head>
<base href="/">
<meta charset="UTF-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1">
<meta name="description" content="Website for all sorts of content, particularly about coding">
<meta name="keywords" content="Coding, Web, Android, Java, Teamspeak">
<meta name="author" content="Sese Schneider, Dennis Kugelmann">
<title>DeepSpace</title>
<link rel="manifest" href="manifest.json">
<link rel="shortcut icon" href="img/favicon.png">
<link type="text/css" rel="stylesheet" href="css/style.css">
<?php if(isset($_GET["p"])){echo "<script>var isdialog = true; var dialogcontent = '" . $_GET["p"] . "';</script>";}?>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="js/main.js"></script>
<noscript>
<meta http-equiv="refresh" content="0;url=errors/javascript_disabled.html">
</noscript>
</head>
<body>
<content>
</content>
</body>
</html>