summaryrefslogtreecommitdiff
path: root/htdocs/moderate/index.php
blob: 908c43be5e91770252a9c24275ac5e8ca8ae9864 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php

/* Foursquare Community Site
 * 
 * Copyright (C) 2011 Foursquare Church.
 * 
 * Developers: Jesse Morgan <jmorgan@foursquarestaff.com>
 *
 */

require_once('../src/base.inc.php');

require_once('src/header.inc.php');

?>

<?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=\"%s/postings/%s.html?moderate\">%s</a></p>"
                . "%s <a href=\"mailto:%s\">%s</a></div>",

                $GLOBALS['CONFIG']['urlroot'],
                $id, $post->getName(),
                $post->getCreated(),
                $post->getEmail(), $post->getEmail());
    }

} else {
    echo "<p>No posts awaiting approval</p>";
}

require_once('src/footer.inc.php');

?>