Gazelle/sections/torrents/history.php

46 lines
1.1 KiB
PHP
Raw Normal View History

2011-03-28 14:21:28 +00:00
<?
/************************************************************************
2013-06-20 08:01:00 +00:00
||------------|| Torrent group wiki history page ||--------------------||
2011-03-28 14:21:28 +00:00
2013-06-20 08:01:00 +00:00
This page lists previous revisions of the torrent group page. It gets
called if $_GET['action'] == 'history'.
2011-03-28 14:21:28 +00:00
2013-06-20 08:01:00 +00:00
It also requires $_GET['groupid'].
2011-03-28 14:21:28 +00:00
2013-06-20 08:01:00 +00:00
The Wiki class is used here to generate the page history.
2011-03-28 14:21:28 +00:00
************************************************************************/
$GroupID = $_GET['groupid'];
2013-05-01 08:00:16 +00:00
if (!is_number($GroupID) || !$GroupID) {
error(0);
}
2011-03-28 14:21:28 +00:00
2013-06-20 08:01:00 +00:00
// Get the torrent group name and the body of the last revision
$DB->query("
SELECT Name
FROM torrents_group
WHERE ID = '$GroupID'");
2011-03-28 14:21:28 +00:00
list($Name) = $DB->next_record();
2013-05-01 08:00:16 +00:00
if (!$Name) {
error(404);
}
2011-03-28 14:21:28 +00:00
2012-10-11 08:00:15 +00:00
View::show_header("Revision history for $Name"); // Set title
2011-03-28 14:21:28 +00:00
// Start printing form
?>
<div class="thin">
2012-08-19 08:00:19 +00:00
<div class="header">
<h2>Revision history for <a href="torrents.php?id=<?=$GroupID?>"><?=$Name?></a></h2>
</div>
2011-03-28 14:21:28 +00:00
<?
2013-06-20 08:01:00 +00:00
// the Wiki class takes over from here
Wiki::revision_history('wiki_torrents', $GroupID, "/torrents.php?id=$GroupID");
2011-03-28 14:21:28 +00:00
?>
</div>
<?
2012-10-11 08:00:15 +00:00
View::show_footer();
2011-03-28 14:21:28 +00:00
?>