diff options
Diffstat (limited to 'htdocs/moderate/schedule')
-rw-r--r-- | htdocs/moderate/schedule/index.php | 48 |
1 files changed, 36 insertions, 12 deletions
diff --git a/htdocs/moderate/schedule/index.php b/htdocs/moderate/schedule/index.php index 93dfc3a..9015350 100644 --- a/htdocs/moderate/schedule/index.php +++ b/htdocs/moderate/schedule/index.php @@ -16,37 +16,61 @@ require_once('../src/header.inc.php'); echo "<h3>Moderation Schedule</h3>"; // List out moderators in order with next moderation week +$ui = new ModerationSchedule(); +$ui->query(); + +echo "<div class=\"userrow header\">" + . "<span class=\"name\">Name</span>" + . " <span class=\"email\">Email</span>" + . " <span class=\"admin\">Next Week</span>" + . " </div>"; +for ($i = 0; $i < $ui->getNumberOfModerators(); $i++, $ui->next()) { + $user = $ui->current(); + + printf("<div class=\"userrow\">" + . "<span class=\"name\">%s %s</span>" + . " <span class=\"email\"><a href=\"mailto:%s\">%s</a></span>" + . " <span class=\"admin\">%s</span></div>", + $user->getName(), + $ui->isException() ? '*' : '', + $user->getEmail(), $user->getEmail(), + date('F j', $ui->key()) + ); +} echo "<h3>Exceptions</h3>"; echo "<p><a href=\"exception.php\">New Exception</a></p>"; // List out exceptions in order. - -$ui = new UserIterator(); -$ui->query(); +$exceptions = new ModerationExceptions(); +$exceptions->query(); echo "<div class=\"userrow header\">" . "<span class=\"name\">Name</span>" . " <span class=\"email\">Email</span>" - . " <span class=\"admin\">Admin</span>" - . " <span class=\"actions\">Actions</span></div>"; + . " <span class=\"admin\">Exception Week</span>" + . " </div>"; + +while ($exceptions->valid()) { + $user = $exceptions->current(); -foreach ($ui as $user) { printf("<div class=\"userrow\">" . "<span class=\"name\">%s</span>" . " <span class=\"email\"><a href=\"mailto:%s\">%s</a></span>" - . " <span class=\"admin\">%s</span>" - . " <span class=\"actions\">" - . " <a class=\"smallbutton\" href=\"editor.php?id=%s\">edit</a>" - . " <a class=\"smallbutton\" href=\"delete.php?id=%s\">delete</a></span></div>", + . " <span class=\"admin\">%s</span></div>", $user->getName(), $user->getEmail(), $user->getEmail(), - $user->isAdmin() ? 'Yes' : 'No', - $user->getId(), $user->getId() + date('F j', $exceptions->key()) ); + + + + $exceptions->next(); } + + require_once('../src/footer.inc.php'); ?> |