v0.1.0 added 404,403 and 500

This commit is contained in:
Victor 2021-06-08 11:09:28 +02:00
parent 350b22923a
commit e2aa419efa
5 changed files with 164 additions and 6 deletions

3
.htaccess Normal file
View File

@ -0,0 +1,3 @@
ErrorDocument 404 https://localhost/itdskp-odense/Frontend/404.php
ErrorDocument 403 https://localhost/itdskp-odense/Frontend/403.php
ErrorDocument 500 https://localhost/itdskp-odense/Frontend/500.php

46
Frontend/403.php Normal file
View File

@ -0,0 +1,46 @@
<!DOCTYPE html>
<html>
<title>403</title>
<style>
*{
padding: 0;
margin: 0;
}
body{
width: 100%;
}
.error403{
padding: 30px;
font-size: 40px;
color: lightseagreen;
margin-left: auto;
margin-right: auto;
}
.backGo{
margin: 40px;
background-color: #4CAF50;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
cursor: pointer;
}
</style>
<body>
<div class="error403"><p>403 Forbidden pages</p></div>
<button onclick="goBack()" class="backGo"> tilbage</button>
<script>
function goBack() {
window.history.back();
}
</script>
</body>
</html>

46
Frontend/404.php Normal file
View File

@ -0,0 +1,46 @@
<!DOCTYPE html>
<html>
<title>404</title>
<style>
*{
padding: 0;
margin: 0;
}
body{
width: 100%;
}
.error404{
padding: 30px;
font-size: 40px;
color: lightseagreen;
margin-left: auto;
margin-right: auto;
}
.backGo{
margin: 40px;
background-color: #4CAF50;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
cursor: pointer;
}
</style>
<body>
<div class="error404"><p>404 Pages not found</p></div>
<button onclick="goBack()" class="backGo"> tilbage</button>
<script>
function goBack() {
window.history.back();
}
</script>
</body>
</html>

46
Frontend/500.php Normal file
View File

@ -0,0 +1,46 @@
<!DOCTYPE html>
<html>
<title>500</title>
<style>
*{
padding: 0;
margin: 0;
}
body{
width: 100%;
}
.error500{
padding: 30px;
font-size: 40px;
color: lightseagreen;
margin-left: auto;
margin-right: auto;
}
.backGo{
margin: 40px;
background-color: #4CAF50;
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
cursor: pointer;
}
</style>
<body>
<div class="error500"><p>500 Server error</p></div>
<button onclick="goBack()" class="backGo"> tilbage</button>
<script>
function goBack() {
window.history.back();
}
</script>
</body>
</html>

View File

@ -49,15 +49,32 @@ use Backend\Model\Post;
<body> <body>
<div class="container mb-4 mt-4"> <div class="container mb-4 mt-4">
<div class="row"> <div class="row">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="admin.php">Admin panel</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item active">
<a class="nav-link" href="index.php">Index</a>
</li>
<li class="nav-item">
<a class="nav-link" href="../Backend/controller/logout.php">Log af</a>
</li>
<li class="nav-item">
<a class="nav-link disabled" href="#"><p><u><?php echo ucfirst($_SESSION['name']);?></u></p></a>
</li>
</ul>
</div>
</nav>
<div class="col"> <div class="col">
<p><u><?php echo ucfirst($_SESSION['name']);?></u></p>
<a href="../Backend/controller/logout.php">Log ud</a>
<br>
<a href="index.php">Index pages</a>
<hr>
<div class="row"> <div class="row">
<div class="col"> <div class="col">
<button class="btn btn-secondary mb-4" onclick="createPostSwal()">Opret Post</button> <button class="btn btn-success mb-4" onclick="createPostSwal()">Opret Post</button>
<table id="table_id"> <table id="table_id">
<thead> <thead>
<th>Oprettet</th> <th>Oprettet</th>