This repository was archived by the owner on Oct 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecentchanges.php
More file actions
50 lines (41 loc) · 1.32 KB
/
recentchanges.php
File metadata and controls
50 lines (41 loc) · 1.32 KB
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
<?php
include_once 'common/base.php';
$title = "Recent changes";
include_once 'common/header.php';
$limit = 100;
?>
<div class="page-header">
<h1>Recent changes</h1>
</div>
<p>Showing up to <?php echo $limit; ?> changes.</p>
<table class="table table-striped">
<thead>
<tr>
<th style="width: 12em;">Timestamp</th>
<th>Page</th>
<th>User</th>
<th>Comment</th>
<th>Tags</th>
</tr>
</thead>
<tbody>
<?php
include_once 'common/classes/Special.php';
$special = new Special($db);
$rc = $special->getRecentChanges($limit);
include_once 'common/classes/Pages.php';
$pages = new Pages($db);
foreach ($rc as $row) {
echo '<tr>';
echo sprintf('<td><a href="viewrev.php?revid=%1$s">%2$s</a></td>', $row['rev_id'], formatTimestamp($row['rev_timestamp']) );
echo sprintf('<td><a href="view.php?page=%1$s">%1$s</a></td>', $row['page_title']);
echo sprintf('<td><a href="user.php?user=%1$s">%1$s</a></td>', $row['user_name']);
echo '<td>' . $row['rev_comment'] . '</td>';
$revtags = $pages->getRevTags($row['rev_id']);
echo '<td>' . $pages->formatTags($revtags) . '</td>';
echo '</tr>';
}
?>
</tbody>
</table>
<?php include_once 'common/footer.php'; ?>