From a39f9512f0efd3ec3e0a31df656e25dd3f824f6d Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Tue, 24 May 2011 17:08:38 -0700 Subject: Working on moderation approve/reject --- htdocs/validate.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'htdocs/validate.php') diff --git a/htdocs/validate.php b/htdocs/validate.php index 272640b..d69510b 100644 --- a/htdocs/validate.php +++ b/htdocs/validate.php @@ -14,6 +14,26 @@ require_once "src/header.inc.php"; echo "

Email Verification

"; -if (isset($_POST +if (isset($_GET['id'])) { + $id = addslashes($_GET['id']); + $post = Post::getBySecretId($id); + + if ($post) { + $post->verify(); + $post->save(); + + echo "

Your email address has been validated. Your post will be listed" + . " as soon as we approve the content. You will recieve an email when" + . " the post is approved.

"; + + } else { + echo "
Invalid validation ID provided.
"; + } + +} else { + echo "
No validation ID provided.
"; +} + +require_once "src/footer.inc.php"; ?> -- cgit v1.2.3