diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2011-05-12 16:59:36 -0700 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net ; true> | 2011-05-12 16:59:36 -0700 |
commit | dd24e2c973a7979894971bdc38d904d2aecc7d5d (patch) | |
tree | 2f8474d22cbf29749219bd6dd543bb22b959465e /htdocs/moderate/index.php | |
parent | e159ae5209a561043ceb89aa640b207df15181b7 (diff) |
Well, you can see posts on the moderation panel now
Diffstat (limited to 'htdocs/moderate/index.php')
-rw-r--r-- | htdocs/moderate/index.php | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/htdocs/moderate/index.php b/htdocs/moderate/index.php new file mode 100644 index 0000000..454a514 --- /dev/null +++ b/htdocs/moderate/index.php @@ -0,0 +1,50 @@ +<?php + +/* Foursquare Community Site + * + * Copyright (C) 2011 Foursquare Church. + * + * Developers: Jesse Morgan <jmorgan@foursquarestaff.com> + * + */ + +require_once('../src/base.inc.php'); + +if (!isset($_SESSION['currentUser'])) { + header('Location: ' . $CONFIG['urlroot'].'/moderate/login.php'); + exit(); +} + +require_once('header.inc.php'); + +?> + +<h2>Welcome</h2> + +<?php + +// List posts to be approved +echo "<h3>Moderate Posts</h3>"; + +$posts = new PostIterator(); +$posts->filterStage('moderation'); +$posts->query(); + +// TODO: Also filter by source? + +if ($posts->valid()) { + foreach ($posts as $id => $post) { + printf("<div class=\"post\"><p><a href=\"preview/%s\">%s</a></p>" + . "<div class=\"options\"><a href=\"approve/%s\">Approve</a>" + . " <a href=\"reject/%s\">Reject</a></div></div>", + + $id, $post->getName(), $id, $id); + } + +} else { + echo "<p>No posts awaiting approval</p>"; +} + +require_once('footer.inc.php'); + +?> |