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.9KB

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