mirror of
https://github.com/WhatCD/Gazelle.git
synced 2024-12-14 19:36:25 +00:00
61 lines
1.6 KiB
PHP
61 lines
1.6 KiB
PHP
<?
|
|
$GroupID = $_GET['groupid'];
|
|
if (!is_number($GroupID)) { error(404); }
|
|
|
|
show_header("History for Group $GroupID");
|
|
|
|
$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";
|
|
}
|
|
?>
|
|
|
|
<div class="thin">
|
|
<div class="header">
|
|
<h2>History for <?=$Title?></h2>
|
|
</div>
|
|
<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");
|
|
$LogEntries = $DB->to_array(false, MYSQL_NUM);
|
|
foreach ($LogEntries AS $LogEntry)
|
|
{
|
|
list($TorrentID, $UserID, $Info, $Time) = $LogEntry;
|
|
?>
|
|
<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();
|
|
if ($DB->record_count() == 0) { ?>
|
|
<td><a href="torrents.php?torrentid=<?=$TorrentID?>"><?=$TorrentID?></a> (Deleted)</td><?
|
|
} elseif ($Media == "") { ?>
|
|
<td><a href="torrents.php?torrentid=<?=$TorrentID?>"><?=$TorrentID?></a></td><?
|
|
} else { ?>
|
|
<td><a href="torrents.php?torrentid=<?=$TorrentID?>"><?=$TorrentID?></a> (<?=$Format?>/<?=$Encoding?>/<?=$Media?>)</td>
|
|
<? }
|
|
} else { ?>
|
|
<td />
|
|
<? } ?>
|
|
<td><?=format_username($UserID, false, false, false)?></td>
|
|
<td><?=$Info?></td>
|
|
</tr>
|
|
<?
|
|
}
|
|
?>
|
|
</table>
|
|
</div>
|
|
<?
|
|
show_footer();
|
|
?>
|