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.

compose.php 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?php
  2. declare(strict_types = 1);
  3. if (empty($Return)) {
  4. $ToID = $_GET['to'];
  5. /*
  6. if ($ToID == $LoggedUser['ID']) {
  7. error('You cannot start a conversation with yourself!');
  8. header('Location: ' . Inbox::get_inbox_link());
  9. }
  10. */
  11. }
  12. if (!$ToID || !is_number($ToID)) {
  13. error(404);
  14. }
  15. if (!empty($LoggedUser['DisablePM']) && !isset($StaffIDs[$ToID])) {
  16. error(403);
  17. }
  18. $DB->query("
  19. SELECT Username
  20. FROM users_main
  21. WHERE ID='$ToID'");
  22. list($Username) = $DB->next_record();
  23. if (!$Username) {
  24. error(404);
  25. }
  26. View::show_header(
  27. 'Compose',
  28. 'inbox,bbcode,vendor/jquery.validate.min,form_validate,vendor/easymde.min',
  29. 'vendor/easymde.min'
  30. );
  31. ?>
  32. <div>
  33. <div class="header">
  34. <h2>Send a message to <a href="user.php?id=<?=$ToID?>"><?=$Username?></a></h2>
  35. </div>
  36. <form class="send_form" name="message" action="inbox.php" method="post" id="messageform">
  37. <div class="box pad">
  38. <input type="hidden" name="action" value="takecompose" />
  39. <input type="hidden" name="toid" value="<?=$ToID?>" />
  40. <input type="hidden" name="auth"
  41. value="<?=$LoggedUser['AuthKey']?>" />
  42. <div id="quickpost">
  43. <h3>Subject</h3>
  44. <input type="text" class="required" name="subject" size="95"
  45. value="<?=(!empty($Subject) ? $Subject : '')?>" /><br />
  46. <h3>Body</h3>
  47. <?php
  48. new TEXTAREA_PREVIEW(
  49. $Name = 'body',
  50. $ID = 'body',
  51. $Value = (!empty($Body) ? $Body : '')
  52. ); ?>
  53. </div>
  54. <div id="preview" class="hidden"></div>
  55. <div id="buttons" class="center">
  56. <input type="button" value="Preview" onclick="Quick_Preview();" />
  57. <input type="submit" value="Send message" />
  58. </div>
  59. </div>
  60. </form>
  61. </div>
  62. <?php View::show_footer();