From 8b44cecf9637e77cf0495e5ad08fdd033b39f06f Mon Sep 17 00:00:00 2001 From: cflip <36554078+cflip@users.noreply.github.com> Date: Sun, 6 Jun 2021 09:05:53 -0600 Subject: Remove manage post and search pages --- manage_post.php | 80 --------------------------------------------------------- 1 file changed, 80 deletions(-) delete mode 100644 manage_post.php (limited to 'manage_post.php') diff --git a/manage_post.php b/manage_post.php deleted file mode 100644 index 99f0ad4..0000000 --- a/manage_post.php +++ /dev/null @@ -1,80 +0,0 @@ -get_from_database($_GET['id']); - if ($result == 0) { - http_response_code(404); - include_once './includes/templates/404.php'; - die(); - } - } -} else { - $id = filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT); - $delete = filter_input(INPUT_POST, 'delete', FILTER_SANITIZE_STRING); - $post_content = filter_input(INPUT_POST, 'post_content', FILTER_SANITIZE_STRING); - - $post = new Post(); - $post->get_from_database($id); - - if (strcasecmp($delete, "on") == 0) { - delete_post($post); - } else { - edit_post($post, $post_content); - } - - header("Location: /viewthread.php?id=" . $post->thread->id); -} -?> - - -
-You must be signed in to manage a post.
'; - return; -} - -// Admin users should be able to delete posts, but they should not be able to edit them -// Or should they?? -if (Session::get()->get_current_user()->id != $current->author->id) { - echo 'You can\'t manage another user\'s post!
'; - return; -} - -// TODO: Disallow editing/deleting posts if they have been around for a while -?> - - - -- cgit v1.2.3