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

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