grublox/error.php

71 lines
2.7 KiB
PHP

<?php
require_once 'core/classes.php';
headStart();
require_once 'core/classes.php';
require_once 'core/classes/user.php';
if(isset($_SESSION['user'])) {
$user = new User($con, $_SESSION['user'] ?? 0);
}
// 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 = "https://www.freeiconspng.com/thumbs/minions-png/evil-minions-png-24.png";
$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."</h5></a>";
}
if($conType == 403) {
$errorImage = "https://i.pinimg.com/originals/c4/d7/55/c4d7559b99559a3dc0f4c43e4e589451.png";
$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."</h5></a>";
}
if($conType == 400) {
$errorImage = "https://www.clipartmax.com/png/full/185-1850059_minion-41-despicable-me-minions-thinking.png";
$errorTextMain = "400 Bad Request";
$errorTextExtra = "ummmmmmmmmmmmmm 400 ummmmmmmmmmmmm";
$errorButton = "<a class='btn btn-primary' href='javascript:history.back()'><h5>Go back to ".$sitename."</h5></a>";
}
if($conType == 502) {
$errorImage = "https://www.freeiconspng.com/thumbs/minions-png/minions-png-file-8.png";
$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."</h5></a>";
}
if($conType == 504) {
$errorImage = "https://static.wikia.nocookie.net/mycun-the-movie/images/f/fc/Dave_the_Minion.png/revision/latest/scale-to-width-down/1200";
$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 text-center" style="transform: translateY(25vh); width: 100%; height: 90vh;">
<img src="<?php echo $errorImage; ?>" height="300" alt="<?php echo htmlspecialchars($errorTextMain); ?>">
<h1><?php echo $errorTextMain; ?></h1>
<h5 class="text-muted"><?php echo $errorTextExtra; ?></h5>
<?php echo $errorButton; ?>
</main>
</body>
</html>