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/admin.css | 5 +++++ htdocs/moderate/schedule/index.php | 25 +++++++++++++++++-------- htdocs/moderate/src/header.inc.php | 1 + 3 files changed, 23 insertions(+), 8 deletions(-) (limited to 'htdocs/moderate') diff --git a/htdocs/moderate/admin.css b/htdocs/moderate/admin.css index 65a5a7f..fbc82a6 100644 --- a/htdocs/moderate/admin.css +++ b/htdocs/moderate/admin.css @@ -50,6 +50,11 @@ h1 { width: 5em; } +.userrow .remove { + width: 5em; + margin-left: 2em; +} + input[type=text] { width: 20em; } 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 ); diff --git a/htdocs/moderate/src/header.inc.php b/htdocs/moderate/src/header.inc.php index f0abbe1..6b7f135 100644 --- a/htdocs/moderate/src/header.inc.php +++ b/htdocs/moderate/src/header.inc.php @@ -53,6 +53,7 @@ if (isset($_GET['logout'])) {