This repository has been archived by the owner on Feb 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy patheditorlist.php
61 lines (53 loc) · 1.66 KB
/
editorlist.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php // vim:set ts=4 sw=4 sts=4 et:
require_once "config.php";
require_once "html.php";
require_once "db-func.php";
require_once "utils.php";
// Redirect to the login page, if not logged in
$uid = isLoggedIn();
// Start HTML
head("editorlist");
echo '
<script type="text/javascript">
$(document).ready(function() {
// call the tablesorter plugin
$("#approvalstats").tablesorter({
sortList: [[1,1],[3,1]]
});
$("#discussionstats").tablesorter({
sortList: [[1,1],[3,1]]
});
});
</script>
';
function print_rows($rows) {
foreach ($rows as $row) {
echo "<tr>";
foreach (array_keys($row) as $key) {
echo "<td class='ed-stats'>".$row[$key] . "</td>";
}
echo "</tr>";
}
}
echo '<h2>List of Approval Editor Stats</h2>';
echo '<table id="approvalstats" class="tablesorter">';
echo '<thead><tr>';
echo '<th>Editor</th><th>Number of puzzles</th><th>Comments (total)</th><th>Comments (in last week)</th>';
echo '</tr></thead>';
print_rows(getApprovalEditorStats());
echo '</table><br><br>';
echo '<h2>List of Discussion Editor Stats</h2>';
echo '<table id="discussionstats" class="tablesorter">';
echo '<thead><tr>';
echo '<th>Editor</th><th>Number of puzzles</th><th>Comments (total)</th><th>Comments (in last week)</th>';
echo '</tr></thead>';
print_rows(getDiscussionEditorStats());
echo '</table><br><br>';
echo '<h2>List of Author Stats</h2>';
echo '<table id="authorstats" class="tablesorter">';
echo '<thead><tr>';
echo '<th>Author</th><th>Number of puzzles</th><th>Comments (total)</th><th>Comments (in last week)</th>';
echo '</tr></thead>';
print_rows(getAuthorStats());
echo '</table><br><br>';
foot();