This commit is contained in:
nolanwhy 2023-02-05 13:00:43 +01:00
parent 87760f7795
commit fdf24cd200
2 changed files with 8 additions and 8 deletions

View File

@ -30,7 +30,7 @@ $possiblePages = [
if(isset($_GET["p"])) {
$page = (int) $_GET["p"];
if(!in_array($page,$possiblePages)) {
header('location: /catalog');
header('location: /error?err=404');
exit;
}
} else {

View File

@ -18,33 +18,33 @@ if(!isset($conType)) {
header("Location: /");
}
if($conType == 404) {
$errorImage = "";
$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." HQ</h5></a>";
}
if($conType == 403) {
$errorImage = "";
$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." HQ</h5></a>";
}
if($conType == 400) {
$errorImage = "";
$errorTextMain = "ummmmmmmmmmmm";
$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." HQ</h5></a>";
}
if($conType == 502) {
$errorImage = "";
$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." HQ</h5></a>";
}
if($conType == 504) {
$errorImage = "";
$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>";
@ -61,7 +61,7 @@ $getitstarted->header();
<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; ?>
<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; ?>