diff options
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 ); |