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/css/main.css | 10 +++++++++- htdocs/moderate/admin.css | 5 +++++ htdocs/moderate/schedule/index.php | 25 +++++++++++++++++-------- htdocs/moderate/src/header.inc.php | 1 + htdocs/src/ModerationExceptions.inc.php | 23 +++++++++++++++++++++-- htdocs/src/ModerationSchedule.inc.php | 5 +++-- htdocs/src/Post.inc.php | 11 +++++------ 7 files changed, 61 insertions(+), 19 deletions(-) (limited to 'htdocs') diff --git a/htdocs/css/main.css b/htdocs/css/main.css index 756d312..831ee18 100644 --- a/htdocs/css/main.css +++ b/htdocs/css/main.css @@ -6,6 +6,11 @@ body { font-family: Helvetica; } +h3 { + margin-bottom: 0em; + margin-top: 1.75em; +} + #nav, #content, #footer, #buttonblock { margin: 0 auto 0 auto; width: 660px; @@ -44,7 +49,6 @@ body { background: url('../images/headerbg.jpg') repeat-x center top; text-align: center; height: 191px; - padding-top: 10px; } #about { @@ -143,3 +147,7 @@ a, a:visited { .errorbox p { margin: 0; } + +.nomargin { + margin: .5em 0 .5em 0; +} 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'])) {