summaryrefslogtreecommitdiff
path: root/htdocs/postings.php
diff options
context:
space:
mode:
Diffstat (limited to 'htdocs/postings.php')
-rw-r--r--htdocs/postings.php30
1 files changed, 28 insertions, 2 deletions
diff --git a/htdocs/postings.php b/htdocs/postings.php
index ec98ddc..15d3d5f 100644
--- a/htdocs/postings.php
+++ b/htdocs/postings.php
@@ -45,8 +45,12 @@ if (isset($_SESSION['currentUser'])) {
// Post waiting for approval...
echo "<div class=\"moderationbox\">You are moderating this post: ";
printf("<a href=\"../moderate/moderate.php?id=%s&action=approve\">approve</a> "
- . "<a href=\"../moderate/moderate.php?id=%s&action=reject\">reject</a>",
- $post->getid(), $post->getid());
+ . " or <a href=\"../moderate/moderate.php?id=%s&action=reject\">reject</a>."
+ , $post->getid(), $post->getid());
+
+ // Print Source information
+ printSourceInfo($post);
+
echo "<p><a href=\"../moderate/index.php\">return to moderation</a></p>";
echo "</div>";
@@ -58,6 +62,9 @@ if (isset($_SESSION['currentUser'])) {
printf("<a href=\"../moderate/moderate.php?id=%s&action=delete\">delete post</a><br />"
. "<a href=\"../moderate/moderate.php?id=%s&action=reject\">reject post</a>",
$post->getid(), $post->getid());
+
+ printSourceInfo($post);
+
echo "</div>";
}
@@ -91,6 +98,25 @@ foreach ($post->getImages() as $imgid) {
require_once "src/footer.inc.php";
+function printSourceInfo($post) {
+ // Print Source information
+ $source = $post->getSource();
+
+ if ($source !== false) {
+ // Get source from source id
+ $sourceObj = Source::getById($source);
+ $source = $sourceObj->getName();
+
+
+ } else {
+ // Get other
+ $source = $post->getOtherSource();
+ }
+
+ printf("<p>This post was posted by %s from %s.</p>",
+ $post->getEmail(), $source);
+}
+
function errorNotFound() {
// Get the 404 page
$page = Page::getByUrl('404');