2012-01-24 08:00:19 +00:00
|
|
|
<?
|
|
|
|
$GroupID = $_GET['groupid'];
|
2013-05-14 08:00:34 +00:00
|
|
|
if (!is_number($GroupID)) {
|
|
|
|
error(404);
|
|
|
|
}
|
2012-01-24 08:00:19 +00:00
|
|
|
|
2012-10-11 08:00:15 +00:00
|
|
|
View::show_header("History for Group $GroupID");
|
2012-02-27 08:00:22 +00:00
|
|
|
|
2012-10-11 08:00:15 +00:00
|
|
|
$Groups = Torrents::get_groups(array($GroupID), true, true, false);
|
2012-02-27 08:00:22 +00:00
|
|
|
if (!empty($Groups['matches'][$GroupID])) {
|
|
|
|
$Group = $Groups['matches'][$GroupID];
|
2012-10-11 08:00:15 +00:00
|
|
|
$Title = Artists::display_artists($Group['ExtendedArtists']).'<a href="torrents.php?id='.$GroupID.'">'.$Group['Name'].'</a>';
|
2012-02-27 08:00:22 +00:00
|
|
|
} else {
|
|
|
|
$Title = "Group $GroupID";
|
|
|
|
}
|
2012-01-24 08:00:19 +00:00
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="thin">
|
2012-08-19 08:00:19 +00:00
|
|
|
<div class="header">
|
|
|
|
<h2>History for <?=$Title?></h2>
|
|
|
|
</div>
|
2012-01-24 08:00:19 +00:00
|
|
|
<table>
|
|
|
|
<tr class="colhead">
|
|
|
|
<td>Date</td>
|
|
|
|
<td>Torrent</td>
|
|
|
|
<td>User</td>
|
|
|
|
<td>Info</td>
|
|
|
|
</tr>
|
|
|
|
<?
|
2013-06-19 08:01:09 +00:00
|
|
|
$Log = $DB->query("
|
|
|
|
SELECT TorrentID, UserID, Info, Time
|
|
|
|
FROM group_log
|
|
|
|
WHERE GroupID = $GroupID
|
|
|
|
ORDER BY Time DESC");
|
2012-04-02 08:00:21 +00:00
|
|
|
$LogEntries = $DB->to_array(false, MYSQL_NUM);
|
2013-05-14 08:00:34 +00:00
|
|
|
foreach ($LogEntries AS $LogEntry) {
|
2012-04-02 08:00:21 +00:00
|
|
|
list($TorrentID, $UserID, $Info, $Time) = $LogEntry;
|
2012-01-24 08:00:19 +00:00
|
|
|
?>
|
|
|
|
<tr class="rowa">
|
|
|
|
<td><?=$Time?></td>
|
|
|
|
<?
|
|
|
|
if ($TorrentID != 0) {
|
2013-06-19 08:01:09 +00:00
|
|
|
$DB->query("
|
|
|
|
SELECT Media, Format, Encoding
|
|
|
|
FROM torrents
|
|
|
|
WHERE ID = $TorrentID");
|
2012-01-24 08:00:19 +00:00
|
|
|
list($Media, $Format, $Encoding) = $DB->next_record();
|
2012-05-18 13:35:17 +00:00
|
|
|
if ($DB->record_count() == 0) { ?>
|
2012-01-24 08:00:19 +00:00
|
|
|
<td><a href="torrents.php?torrentid=<?=$TorrentID?>"><?=$TorrentID?></a> (Deleted)</td><?
|
2013-05-14 08:00:34 +00:00
|
|
|
} elseif ($Media == '') { ?>
|
2012-05-18 13:35:17 +00:00
|
|
|
<td><a href="torrents.php?torrentid=<?=$TorrentID?>"><?=$TorrentID?></a></td><?
|
2012-01-24 08:00:19 +00:00
|
|
|
} else { ?>
|
|
|
|
<td><a href="torrents.php?torrentid=<?=$TorrentID?>"><?=$TorrentID?></a> (<?=$Format?>/<?=$Encoding?>/<?=$Media?>)</td>
|
|
|
|
<? }
|
|
|
|
} else { ?>
|
|
|
|
<td />
|
2012-03-28 08:00:20 +00:00
|
|
|
<? } ?>
|
2012-10-11 08:00:15 +00:00
|
|
|
<td><?=Users::format_username($UserID, false, false, false)?></td>
|
2012-01-24 08:00:19 +00:00
|
|
|
<td><?=$Info?></td>
|
|
|
|
</tr>
|
|
|
|
<?
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<?
|
2012-10-11 08:00:15 +00:00
|
|
|
View::show_footer();
|
2012-01-24 08:00:19 +00:00
|
|
|
?>
|