From 0c72d673a9056c753503e6b2a8d4fbf3aba75a95 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Wed, 25 May 2011 11:32:49 -0700 Subject: Moderation workflow is.. working --- htdocs/postings.php | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'htdocs/postings.php') diff --git a/htdocs/postings.php b/htdocs/postings.php index e43f24e..5c3dd55 100644 --- a/htdocs/postings.php +++ b/htdocs/postings.php @@ -28,10 +28,24 @@ if (!is_numeric($id)) { // Get the post. $post = Post::getById($id); -if (!$post or $post->getStage() != 'approved') { +if (!$post or (!isset($_GET['moderate']) and $post->getStage() != 'approved')) { errorNotFound(); } +if (isset($_GET['moderate'])) { + if (!isset($_SESSION['currentUser'])) { + header('Location: ' . $CONFIG['urlroot'].'/moderate/login.php'); + exit(); + } + echo "
You are moderating this post: "; + printf("Approve " + . "Reject", + $post->getId(), $post->getId()); + echo "

Return to moderation

"; + echo "
"; + +} + // Display the post. echo "

". $post->getName() ."

"; -- cgit v1.2.3