BioTorrents.de’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

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