Oppaitime's version of Gazelle
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

grouplog.php 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?
  2. $GroupID = $_GET['groupid'];
  3. if (!is_number($GroupID)) {
  4. error(404);
  5. }
  6. View::show_header("History for Group $GroupID");
  7. $Groups = Torrents::get_groups(array($GroupID), true, true, false);
  8. if (!empty($Groups[$GroupID])) {
  9. $Group = $Groups[$GroupID];
  10. $Title = Artists::display_artists($Group['ExtendedArtists']).'<a href="torrents.php?id='.$GroupID.'">'.$Group['Name'].'</a>';
  11. } else {
  12. $Title = "Group $GroupID";
  13. }
  14. ?>
  15. <div class="thin">
  16. <div class="header">
  17. <h2>History for <?=$Title?></h2>
  18. </div>
  19. <div class="box">
  20. <table>
  21. <tr class="colhead">
  22. <td style="min-width:95px;">Date</td>
  23. <td>Torrent</td>
  24. <td>User</td>
  25. <td>Info</td>
  26. </tr>
  27. <?
  28. $Log = $DB->query("
  29. SELECT TorrentID, UserID, Info, Time
  30. FROM group_log
  31. WHERE GroupID = $GroupID
  32. ORDER BY Time DESC");
  33. $LogEntries = $DB->to_array(false, MYSQLI_NUM);
  34. foreach ($LogEntries AS $LogEntry) {
  35. list($TorrentID, $UserID, $Info, $Time) = $LogEntry;
  36. ?>
  37. <tr class="row">
  38. <td><?=$Time?></td>
  39. <?
  40. if ($TorrentID != 0) {
  41. /*
  42. $DB->query("
  43. SELECT Media, Format, Encoding
  44. FROM torrents
  45. WHERE ID = $TorrentID");
  46. */
  47. $DB->query("
  48. SELECT Container, AudioFormat, Media
  49. FROM torrents
  50. WHERE ID = $TorrentID");
  51. list($Container, $AudioFormat, $Media) = $DB->next_record();
  52. if (!$DB->has_results()) { ?>
  53. <td><a href="torrents.php?torrentid=<?=$TorrentID?>"><?=$TorrentID?></a> (Deleted)</td><?
  54. } elseif ($Media == '') { ?>
  55. <td><a href="torrents.php?torrentid=<?=$TorrentID?>"><?=$TorrentID?></a></td><?
  56. } else { ?>
  57. <td><a href="torrents.php?torrentid=<?=$TorrentID?>"><?=$TorrentID?></a> (<?=$Container?>/<?=$AudioFormat?>/<?=$Media?>)</td>
  58. <? }
  59. } else { ?>
  60. <td></td>
  61. <? } ?>
  62. <td><?=Users::format_username($UserID, false, false, false)?></td>
  63. <td><?=$Info?></td>
  64. </tr>
  65. <?
  66. }
  67. ?>
  68. </table>
  69. </div>
  70. </div>
  71. <?
  72. View::show_footer();
  73. ?>