2012-01-24 08:00:19 +00:00
|
|
|
<?
|
|
|
|
$GroupID = $_GET['groupid'];
|
|
|
|
if (!is_number($GroupID)) { error(404); }
|
|
|
|
|
|
|
|
show_header("History for Group $GroupID");
|
2012-02-27 08:00:22 +00:00
|
|
|
|
|
|
|
$Groups = get_groups(array($GroupID), true, true, false);
|
|
|
|
if (!empty($Groups['matches'][$GroupID])) {
|
|
|
|
$Group = $Groups['matches'][$GroupID];
|
|
|
|
$Title = display_artists($Group['ExtendedArtists']).'<a href="torrents.php?id='.$GroupID.'">'.$Group['Name'].'</a>';
|
|
|
|
} else {
|
|
|
|
$Title = "Group $GroupID";
|
|
|
|
}
|
2012-01-24 08:00:19 +00:00
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="thin">
|
2012-02-27 08:00:22 +00:00
|
|
|
<h2>History for <?=$Title?></h2>
|
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>
|
|
|
|
<?
|
|
|
|
$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);
|
|
|
|
foreach ($LogEntries AS $LogEntry)
|
2012-01-24 08:00:19 +00:00
|
|
|
{
|
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) {
|
|
|
|
$DB->query("SELECT Media, Format, Encoding FROM torrents WHERE ID=".$TorrentID);
|
|
|
|
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><?
|
2012-05-18 13:35:17 +00:00
|
|
|
} elseif ($Media == "") { ?>
|
|
|
|
<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
|
|
|
<? } ?>
|
|
|
|
<td><?=format_username($UserID, false, false, false)?></td>
|
2012-01-24 08:00:19 +00:00
|
|
|
<td><?=$Info?></td>
|
|
|
|
</tr>
|
|
|
|
<?
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
<?
|
|
|
|
show_footer();
|
|
|
|
?>
|