diff options
author | Jesse Morgan <jesse@jesterpm.net> | 2011-10-13 12:24:43 -0700 |
---|---|---|
committer | Jesse Morgan <jesse@jesterpm.net> | 2017-09-04 11:16:53 -0700 |
commit | 326a23aded279dedc8a4e6de64618f0fbee17bac (patch) | |
tree | a3444296e388ac65709dfac25490828fc8f433f1 /htdocs/moderate/schedule/index.php | |
parent | 94f12b0a85feb8d8e6effb89021bf79a82174fce (diff) |
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.
Diffstat (limited to 'htdocs/moderate/schedule/index.php')
-rw-r--r-- | htdocs/moderate/schedule/index.php | 25 |
1 files changed, 17 insertions, 8 deletions
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 "<h3>Exceptions</h3>"; -echo "<p><a href=\"exception.php\">New Exception</a></p>"; +echo "<p class=\"nomargin\"><a href=\"editor.php\">New Exception</a></p>"; // List out exceptions in order. $exceptions = new ModerationExceptions(); @@ -48,20 +48,29 @@ $exceptions->query(); echo "<div class=\"userrow header\">" . "<span class=\"name\">Name</span>" - . " <span class=\"email\">Email</span>" - . " <span class=\"admin\">Exception Week</span>" + . "<span class=\"name\">Substitute</span>" + . " <span class=\"admin\">Week</span>" . " </div>"; while ($exceptions->valid()) { - $user = $exceptions->current(); + $user = $exceptions->getUser(); + $substitute = $exceptions->getSubstitute(); + + $remove = ""; + + if ($_SESSION['currentUser']->getId() == $user->getId()) { + $remove = "<a href=\"remove.php?uid=" . $user->getId() ."&time=". $exceptions->key() ."\">remove</a>"; + } printf("<div class=\"userrow\">" . "<span class=\"name\">%s</span>" - . " <span class=\"email\"><a href=\"mailto:%s\">%s</a></span>" - . " <span class=\"admin\">%s</span></div>", + . "<span class=\"name\">%s</span>" + . " <span class=\"admin\">%s</span>" + . " <span class=\"remove\">%s</span></div>", $user->getName(), - $user->getEmail(), $user->getEmail(), - date('F j', $exceptions->key()) + $substitute->getName(), + date('F j', $exceptions->key()), + $remove ); |