From 326a23aded279dedc8a4e6de64618f0fbee17bac Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Thu, 13 Oct 2011 12:24:43 -0700 Subject: Changed the moderator schedule table to a view. Finished the exception iterator. Modified Post to only notify the next moderator. Need to add exception adding/removal. --- htdocs/moderate/schedule/index.php | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'htdocs/moderate/schedule/index.php') diff --git a/htdocs/moderate/schedule/index.php b/htdocs/moderate/schedule/index.php index 9015350..f179c23 100644 --- a/htdocs/moderate/schedule/index.php +++ b/htdocs/moderate/schedule/index.php @@ -40,7 +40,7 @@ for ($i = 0; $i < $ui->getNumberOfModerators(); $i++, $ui->next()) { } echo "

Exceptions

"; -echo "

New Exception

"; +echo "

New Exception

"; // List out exceptions in order. $exceptions = new ModerationExceptions(); @@ -48,20 +48,29 @@ $exceptions->query(); echo "
" . "Name" - . " Email" - . " Exception Week" + . "Substitute" + . " Week" . "
"; while ($exceptions->valid()) { - $user = $exceptions->current(); + $user = $exceptions->getUser(); + $substitute = $exceptions->getSubstitute(); + + $remove = ""; + + if ($_SESSION['currentUser']->getId() == $user->getId()) { + $remove = "getId() ."&time=". $exceptions->key() ."\">remove"; + } printf("
" . "%s" - . " %s" - . " %s
", + . "%s" + . " %s" + . " %s", $user->getName(), - $user->getEmail(), $user->getEmail(), - date('F j', $exceptions->key()) + $substitute->getName(), + date('F j', $exceptions->key()), + $remove ); -- cgit v1.2.3