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.

mass_pm.php 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. #declare(strict_types = 1);
  3. if (!check_perms("users_mod")) {
  4. error(403);
  5. }
  6. $Classes = Users::get_classes()[0];
  7. // If your user base is large, sending a PM to the lower classes will take a long time
  8. // add the class ID into this array to skip it when presenting the list of classes
  9. $SkipClassIDs = array(USER, MEMBER, POWER, ELITE, TORRENT_MASTER, DONOR, POWER_TM, ELITE_TM);
  10. View::show_header(
  11. 'Compose Mass PM',
  12. 'inbox,bbcode,vendor/jquery.validate.min,form_validate'
  13. ); ?>
  14. <main>
  15. <div class="header">
  16. <h2>Send a mass PM</h2>
  17. </div>
  18. <form class="send_form" name="message" action="tools.php" method="post" id="messageform">
  19. <div class="box pad">
  20. <input type="hidden" name="action" value="take_mass_pm" />
  21. <input type="hidden" name="auth"
  22. value="<?=G::$LoggedUser['AuthKey']?>" />
  23. <div id="quickpost">
  24. <h3>Class</h3>
  25. <select id="class_id" name="class_id">
  26. <option>---</option>
  27. <?php foreach ($Classes as $Class) {
  28. if (!in_array($Class['ID'], $SkipClassIDs)) { ?>
  29. <option value="<?=$Class['ID']?>">
  30. <?=$Class['Name']?>
  31. </option>
  32. <?php }
  33. } ?>
  34. </select>
  35. <h3>Subject</h3>
  36. <input type="text" class="required" name="subject" size="95" /><br />
  37. <h3>Body</h3>
  38. <textarea id="body" class="required" name="body" cols="95" rows="10" onkeyup="resize('body')"></textarea>
  39. </div>
  40. <input type="checkbox" name="from_system" id="from_system" />Send as System
  41. <div id="preview" class="hidden"></div>
  42. <div id="buttons" class="center">
  43. <input type="button" value="Preview" onclick="Quick_Preview();" />
  44. <input type="submit" value="Send message" />
  45. </div>
  46. </div>
  47. </form>
  48. </main>
  49. <?php View::show_footer();