51 lines
1.2 KiB
PHP
51 lines
1.2 KiB
PHP
<?php
|
|
require "../Backend/controller/accessControl.php";
|
|
require "../bootstrap.php";
|
|
|
|
use Backend\Model\Post;
|
|
?>
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
|
<meta charset="UTF-8">
|
|
<title>Home</title>
|
|
</head>
|
|
<style>
|
|
table {
|
|
font-family: arial, sans-serif;
|
|
border-collapse: collapse;
|
|
width: 100%;
|
|
}
|
|
|
|
td, th {
|
|
border: 1px solid #dddddd;
|
|
text-align: left;
|
|
padding: 8px;
|
|
}
|
|
|
|
tr:nth-child(even) {
|
|
background-color: #dddddd;
|
|
}
|
|
</style>
|
|
<body>
|
|
<p>Logget in som <?php echo $_SESSION['name'];?></p>
|
|
<a href="../Backend/controller/logout.php">Log ud</a>
|
|
<hr>
|
|
<p>Opret post</p>
|
|
<!--We use ajax to send the code to the backend-->
|
|
<input type="text" id="title" name="title" maxlength="255">
|
|
<input type="text" id="description" name="description" maxlength="2000">
|
|
<button id="submit" name="createPost">Opret opslag</button>
|
|
<hr>
|
|
|
|
|
|
<div id="dis"></div>
|
|
|
|
<script src="Assets/Ajax/deletePost.js"></script>
|
|
<script src="Assets/Ajax/fetchAndDisplayData.js"></script>
|
|
<script src="Assets/Ajax/createPost.js"></script>
|
|
|
|
|
|
</body>
|
|
</html>
|