diff options
Diffstat (limited to 'htdocs/moderate')
-rw-r--r-- | htdocs/moderate/admin.css | 5 | ||||
-rw-r--r-- | htdocs/moderate/schedule/index.php | 25 | ||||
-rw-r--r-- | htdocs/moderate/src/header.inc.php | 1 |
3 files changed, 23 insertions, 8 deletions
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 "<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 ); 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'])) { <div id="modnav"> <ul> <li><a href="<?= buildUrl('moderate/') ?>">Moderate Posts</a></li> + <li><a href="<?= buildUrl('moderate/schedule/') ?>">Schedule</a></li> <?php // Admin Navigation |