This repository has been archived by the owner on Oct 28, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
49 lines (43 loc) · 1.76 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
include "imports/requests.php";
include "imports/makeSVG.php";
if ((isset($_GET['num']) || isset($_GET['team'])) && !isset($_GET['banner'])){
// I moved the SVG making into a function but I am too lazy to change the code so that it is its own "page"
createSVG();
}else if ((isset($_GET['num']) || isset($_GET['team'])) && isset($_GET['banner'])){
}else{
// Check if home file exists and if hosted on localhost
//if (file_exists("pages/home.html") && $_SERVER ['SERVER_NAME'] == "localhost") {
// Check if home file exists and if so load it
if (file_exists("pages/home.html")) {
header($_SERVER["SERVER_PROTOCOL"] . " 200 OK");
header("Content-Length:".filesize("pages/home.html"));
readfile("pages/home.html");
die();
} else {
echo("<style>
body {
font-family: \"Montserrat\", sans-serif;
background-color: black;
height: 100vh;
display: -webkit-box;
display: flex;
-webkit-box-align: center;
align-items: center;
-webkit-box-pack: center;
justify-content: center;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
flex-direction: column;
}
error{
color: red;
}
message{
color: green;
}
</style>");
//die("<message>Home page is in the works.</message><message>Please don't worry it will be here soon!</message>");
die("<error>Error: The home page was not found please submit a issue on <a href='https://github.com/Cool-showTTV/TheBlueAlliance-Embed'>github</a>.</error><br><error>In the report please give the link because this is strange!</error>");
}
}