fixed 500 page looks buggy
This commit is contained in:
parent
b415818fbf
commit
9a7e60b474
3 changed files with 69 additions and 1 deletions
64
internal/500.php
Normal file
64
internal/500.php
Normal file
|
@ -0,0 +1,64 @@
|
|||
<?php
|
||||
function getError500()
|
||||
{
|
||||
return <<<EOF
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>500 - Internal Server error</title>
|
||||
<link href="/css/404.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<!-- Matomo Image Tracker-->
|
||||
<img src="https://matomo.jonasled.de/matomo.php?idsite=1&rec=1" style="border:0" alt="" />
|
||||
<!-- End Matomo -->
|
||||
<div class="moon"></div>
|
||||
<div class="moon__crater moon__crater1"></div>
|
||||
<div class="moon__crater moon__crater2"></div>
|
||||
<div class="moon__crater moon__crater3"></div>
|
||||
|
||||
<div class="star star1"></div>
|
||||
<div class="star star2"></div>
|
||||
<div class="star star3"></div>
|
||||
<div class="star star4"></div>
|
||||
<div class="star star5"></div>
|
||||
|
||||
<div class="error">
|
||||
<div class="error__title">500</div>
|
||||
<div class="error__subtitle">Hmmm...</div>
|
||||
<div class="error__description">It looks like the server doesn't do what you want</div>
|
||||
</div>
|
||||
|
||||
<div class="astronaut">
|
||||
<div class="astronaut__backpack"></div>
|
||||
<div class="astronaut__body"></div>
|
||||
<div class="astronaut__body__chest"></div>
|
||||
<div class="astronaut__arm-left1"></div>
|
||||
<div class="astronaut__arm-left2"></div>
|
||||
<div class="astronaut__arm-right1"></div>
|
||||
<div class="astronaut__arm-right2"></div>
|
||||
<div class="astronaut__arm-thumb-left"></div>
|
||||
<div class="astronaut__arm-thumb-right"></div>
|
||||
<div class="astronaut__leg-left"></div>
|
||||
<div class="astronaut__leg-right"></div>
|
||||
<div class="astronaut__foot-left"></div>
|
||||
<div class="astronaut__foot-right"></div>
|
||||
<div class="astronaut__wrist-left"></div>
|
||||
<div class="astronaut__wrist-right"></div>
|
||||
|
||||
<div class="astronaut__cord">
|
||||
<canvas id="cord" height="500px" width="500px"></canvas>
|
||||
</div>
|
||||
|
||||
<div class="astronaut__head">
|
||||
<canvas id="visor" width="60px" height="60px"></canvas>
|
||||
<div class="astronaut__head-visor-flare1"></div>
|
||||
<div class="astronaut__head-visor-flare2"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/js/404.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
EOF;
|
||||
}
|
|
@ -1,4 +1,5 @@
|
|||
<?php
|
||||
include "mysql.php";
|
||||
|
||||
function getFooter(){
|
||||
include "mysql.php";
|
||||
|
|
|
@ -4,5 +4,8 @@ include "config.php";
|
|||
$conn = new mysqli($mysqlServer, $mysqlUser, $mysqlPassword, $mysqlDatabase);
|
||||
// Check connection
|
||||
if ($conn->connect_error) {
|
||||
die("Connection to database failed");
|
||||
include "500.php";
|
||||
|
||||
header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);
|
||||
die(getError500());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue