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.

masspm.php 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?
  2. if (!isset($_GET['id']) || !is_number($_GET['id']) || !isset($_GET['torrentid']) || !is_number($_GET['torrentid'])) {
  3. error(0);
  4. }
  5. $GroupID = $_GET['id'];
  6. $TorrentID = $_GET['torrentid'];
  7. $DB->query("
  8. SELECT
  9. t.Media,
  10. t.FreeTorrent,
  11. t.GroupID,
  12. t.UserID,
  13. t.Description AS TorrentDescription,
  14. tg.CategoryID,
  15. tg.Name AS Title,
  16. tg.Year,
  17. tg.ArtistID,
  18. ag.Name AS ArtistName
  19. FROM torrents AS t
  20. JOIN torrents_group AS tg ON tg.ID=t.GroupID
  21. LEFT JOIN artists_group AS ag ON ag.ArtistID=tg.ArtistID
  22. WHERE t.ID='$TorrentID'");
  23. list($Properties) = $DB->to_array(false,MYSQLI_BOTH);
  24. if (!$Properties) {
  25. error(404);
  26. }
  27. View::show_header('Edit torrent', 'upload');
  28. if (!check_perms('site_moderate_requests')) {
  29. error(403);
  30. }
  31. ?>
  32. <div class="thin">
  33. <div class="header">
  34. <h2>Send PM To All Snatchers Of "<?=$Properties['ArtistName']?> - <?=$Properties['Title']?>"</h2>
  35. </div>
  36. <form class="send_form" name="mass_message" action="torrents.php" method="post">
  37. <input type="hidden" name="action" value="takemasspm" />
  38. <input type="hidden" name="auth" value="<?=$LoggedUser['AuthKey']?>" />
  39. <input type="hidden" name="torrentid" value="<?=$TorrentID?>" />
  40. <input type="hidden" name="groupid" value="<?=$GroupID?>" />
  41. <table class="layout">
  42. <tr>
  43. <td class="label">Subject</td>
  44. <td>
  45. <input type="text" name="subject" value="" size="60" />
  46. </td>
  47. </tr>
  48. <tr>
  49. <td class="label">Message</td>
  50. <td>
  51. <textarea name="message" id="message" cols="60" rows="8"></textarea>
  52. </td>
  53. </tr>
  54. <tr>
  55. <td colspan="2" class="center">
  56. <input type="submit" value="Send Mass PM" />
  57. </td>
  58. </tr>
  59. </table>
  60. </form>
  61. </div>
  62. <? View::show_footer(); ?>