initial commit

This commit is contained in:
jan.skoda
2024-01-10 12:26:54 +01:00
commit c65052e5c4
62 changed files with 4307 additions and 0 deletions

19
admin/manage_posts.php Executable file
View File

@@ -0,0 +1,19 @@
<?php
include_once '../models/Database.php';
include_once '../models/Post.php';
include_once '../Config.php';
$database = new Database();
$db = $database->getConnection();
$post = new Post($db);
if(!empty($_POST['action']) && $_POST['action'] == 'postListing') {
$post->getPostsListing();
}
if(!empty($_POST['action']) && $_POST['action'] == 'postDelete') {
$post->id = (isset($_POST['postId']) && $_POST['postId']) ? $_POST['postId'] : '0';
$post->delete();
}
?>