summaryrefslogtreecommitdiff
path: root/htdocs/moderate/schedule
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2011-10-06 14:55:18 -0700
committerJesse Morgan <jesse@jesterpm.net>2017-09-04 11:16:53 -0700
commitfa9a4f7eb160fc435dc34c493e6822d2fbb7e484 (patch)
tree3f0abf30ba7ba35089f44fc4acf29437095b65b7 /htdocs/moderate/schedule
parentb025f5ea3b560b9c66625a9f3112b26d48611b94 (diff)
Completed schedule iterator and almost completed exception iterator. Still need to add the 'Add Exception' page and make use of the schedule in the moderator email code.
Diffstat (limited to 'htdocs/moderate/schedule')
-rw-r--r--htdocs/moderate/schedule/index.php48
1 files changed, 36 insertions, 12 deletions
diff --git a/htdocs/moderate/schedule/index.php b/htdocs/moderate/schedule/index.php
index 93dfc3a..9015350 100644
--- a/htdocs/moderate/schedule/index.php
+++ b/htdocs/moderate/schedule/index.php
@@ -16,37 +16,61 @@ require_once('../src/header.inc.php');
echo "<h3>Moderation Schedule</h3>";
// List out moderators in order with next moderation week
+$ui = new ModerationSchedule();
+$ui->query();
+
+echo "<div class=\"userrow header\">"
+ . "<span class=\"name\">Name</span>"
+ . " <span class=\"email\">Email</span>"
+ . " <span class=\"admin\">Next Week</span>"
+ . " </div>";
+for ($i = 0; $i < $ui->getNumberOfModerators(); $i++, $ui->next()) {
+ $user = $ui->current();
+
+ printf("<div class=\"userrow\">"
+ . "<span class=\"name\">%s %s</span>"
+ . " <span class=\"email\"><a href=\"mailto:%s\">%s</a></span>"
+ . " <span class=\"admin\">%s</span></div>",
+ $user->getName(),
+ $ui->isException() ? '*' : '',
+ $user->getEmail(), $user->getEmail(),
+ date('F j', $ui->key())
+ );
+}
echo "<h3>Exceptions</h3>";
echo "<p><a href=\"exception.php\">New Exception</a></p>";
// List out exceptions in order.
-
-$ui = new UserIterator();
-$ui->query();
+$exceptions = new ModerationExceptions();
+$exceptions->query();
echo "<div class=\"userrow header\">"
. "<span class=\"name\">Name</span>"
. " <span class=\"email\">Email</span>"
- . " <span class=\"admin\">Admin</span>"
- . " <span class=\"actions\">Actions</span></div>";
+ . " <span class=\"admin\">Exception Week</span>"
+ . " </div>";
+
+while ($exceptions->valid()) {
+ $user = $exceptions->current();
-foreach ($ui as $user) {
printf("<div class=\"userrow\">"
. "<span class=\"name\">%s</span>"
. " <span class=\"email\"><a href=\"mailto:%s\">%s</a></span>"
- . " <span class=\"admin\">%s</span>"
- . " <span class=\"actions\">"
- . " <a class=\"smallbutton\" href=\"editor.php?id=%s\">edit</a>"
- . " <a class=\"smallbutton\" href=\"delete.php?id=%s\">delete</a></span></div>",
+ . " <span class=\"admin\">%s</span></div>",
$user->getName(),
$user->getEmail(), $user->getEmail(),
- $user->isAdmin() ? 'Yes' : 'No',
- $user->getId(), $user->getId()
+ date('F j', $exceptions->key())
);
+
+
+
+ $exceptions->next();
}
+
+
require_once('../src/footer.inc.php');
?>