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.

warn.php 2.4KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. <?php
  2. #declare(strict_types=1);
  3. if (!check_perms('users_warn')) {
  4. error(404);
  5. }
  6. Misc::assert_isset_request($_POST, array('postid', 'userid', 'key'));
  7. $PostID = (int) $_POST['postid'];
  8. $UserID = (int) $_POST['userid'];
  9. $Key = (int) $_POST['key'];
  10. $UserInfo = Users::user_info($UserID);
  11. $DB->query("
  12. SELECT p.Body, t.ForumID
  13. FROM forums_posts AS p
  14. JOIN forums_topics AS t ON p.TopicID = t.ID
  15. WHERE p.ID = '$PostID'");
  16. list($PostBody, $ForumID) = $DB -> next_record();
  17. View::show_header('Warn User');
  18. ?>
  19. <div>
  20. <div class="header">
  21. <h2>
  22. Warning
  23. <a href="user.php?id=<?=$UserID?>"><?=$UserInfo['Username']?></a>
  24. </h2>
  25. </div>
  26. <div class="box pad">
  27. <form class="send_form" name="warning" action="" onsubmit="quickpostform.submit_button.disabled = true;"
  28. method="post">
  29. <input type="hidden" name="postid" value="<?=$PostID?>" />
  30. <input type="hidden" name="userid" value="<?=$UserID?>" />
  31. <input type="hidden" name="key" value="<?=$Key?>" />
  32. <input type="hidden" name="action" value="take_warn" />
  33. <table class="layout" align="center">
  34. <tr>
  35. <td class="label">Reason:</td>
  36. <td>
  37. <input type="text" name="reason" size="60" />
  38. </td>
  39. </tr>
  40. <tr>
  41. <td class="label">Length:</td>
  42. <td>
  43. <select name="length">
  44. <option value="verbal">Verbal</option>
  45. <option value="1">1 week</option>
  46. <option value="2">2 weeks</option>
  47. <option value="4">4 weeks</option>
  48. <?php if (check_perms('users_mod')) { ?>
  49. <option value="8">8 weeks</option>
  50. <?php } ?>
  51. </select>
  52. </td>
  53. </tr>
  54. <tr>
  55. <td class="label">Private message:</td>
  56. <td>
  57. <textarea id="message" style="width: 95%;" tabindex="1" onkeyup="resize('message');" name="privatemessage"
  58. cols="90" rows="4"></textarea>
  59. </td>
  60. </tr>
  61. <tr>
  62. <td class="label">Edit post:</td>
  63. <td>
  64. <textarea id="body" style="width: 95%;" tabindex="1" onkeyup="resize('body');" name="body" cols="90"
  65. rows="8"><?=$PostBody?></textarea>
  66. <br />
  67. <input type="submit" id="submit_button" value="Warn user" tabindex="1" />
  68. </td>
  69. </tr>
  70. </table>
  71. </form>
  72. </div>
  73. </div>
  74. <?php View::show_footer();