grublox/error.php

71 lines
2.2 KiB
PHP

<?php
session_start();
require_once 'core/classes.php';
require_once 'core/classes/user.php';
if(isset($_SESSION['user'])) {
$user = new User($con, $_SESSION['user']);
}
// qzip code (from now on im putting my name fuck you all ( i made catalog and games and home now shut)
if($_SERVER['REQUEST_METHOD'] == 'POST') {
$conType = $_POST['err'];
} else {
$conType = $_GET['err'];
}
if(!isset($conType)) {
header("Location: /");
}
if($conType == 404) {
$errorImage = "";
$errorTextMain = "404 Not found";
$errorTextExtra = "Whoops! Our minions couldn't find the page you were looking for...";
$errorButton = "<a class='btn btn-primary' href='javascript:history.back()'><h5>Go back to ".$sitename." HQ</h5></a>";
}
if($conType == 403) {
$errorImage = "";
$errorTextMain = "403 Forbidden";
$errorTextExtra = "Get out of here! Confidential data..";
$errorButton = "<a class='btn btn-primary' href='javascript:history.back()'><h5>Go back to ".$sitename." HQ</h5></a>";
}
if($conType == 400) {
$errorImage = "";
$errorTextMain = "ummmmmmmmmmmm";
$errorTextExtra = "ummmmmmmmmmmmmm 400 ummmmmmmmmmmmm";
$errorButton = "<a class='btn btn-primary' href='javascript:history.back()'><h5>Go back to ".$sitename." HQ</h5></a>";
}
if($conType == 502) {
$errorImage = "";
$errorTextMain = "502 Bad Gateway";
$errorTextExtra = "How does this even work for you if it's using PHP.";
$errorButton = "<a class='btn btn-primary' href='javascript:history.back()'><h5>Go back to ".$sitename." HQ</h5></a>";
}
if($conType == 504) {
$errorImage = "";
$errorTextMain = "504 Gateway Time-out";
$errorTextExtra = "TestTube reference.";
$errorButton = "<a class='btn btn-primary' href='javascript:history.back()'><h5>Go back to ".$sitename." HQ</h5></a>";
}
?>
<!DOCTYPE html>
<html data-bs-theme="dark">
<head>
<?php
$getitstarted = new PartyStarter;
$getitstarted->header();
?>
</head>
<title><?php echo $pagename; ?> | <?php echo $sitename; ?></title>
<body>
<main class="container mx-auto position-absolute top-50 start-50 translate-middle text-center" style="width: 100%;">
<?php echo $errorImage; ?>
<h1><?php echo $errorTextMain; ?></h1>
<h5 class="text-muted"><?php echo $errorTextExtra; ?></h5>
<?php echo $errorButton; ?>
</main>
</body>
</html>