From fa9a4f7eb160fc435dc34c493e6822d2fbb7e484 Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Thu, 6 Oct 2011 14:55:18 -0700 Subject: 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. --- htdocs/moderate/schedule/index.php | 48 ++++++++++++++++++++++++++++---------- 1 file changed, 36 insertions(+), 12 deletions(-) (limited to 'htdocs/moderate/schedule/index.php') 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 "

Moderation Schedule

"; // List out moderators in order with next moderation week +$ui = new ModerationSchedule(); +$ui->query(); + +echo "
" + . "Name" + . " Email" + . " Next Week" + . "
"; +for ($i = 0; $i < $ui->getNumberOfModerators(); $i++, $ui->next()) { + $user = $ui->current(); + + printf("
" + . "%s %s" + . " %s" + . " %s
", + $user->getName(), + $ui->isException() ? '*' : '', + $user->getEmail(), $user->getEmail(), + date('F j', $ui->key()) + ); +} echo "

Exceptions

"; echo "

New Exception

"; // List out exceptions in order. - -$ui = new UserIterator(); -$ui->query(); +$exceptions = new ModerationExceptions(); +$exceptions->query(); echo "
" . "Name" . " Email" - . " Admin" - . " Actions
"; + . " Exception Week" + . " "; + +while ($exceptions->valid()) { + $user = $exceptions->current(); -foreach ($ui as $user) { printf("
" . "%s" . " %s" - . " %s" - . " " - . " edit" - . " delete
", + . " %s", $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'); ?> -- cgit v1.2.3