Oppaitime'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.

takeedit.php 1.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?
  2. authorize();
  3. $UserID = $LoggedUser['ID'];
  4. $ConvID = $_POST['convid'];
  5. $DB->query("
  6. SELECT UserID
  7. FROM pm_conversations_users
  8. WHERE UserID = ? AND ConvID = ?", $UserID, $ConvID);
  9. if (!$DB->has_results()) {
  10. error(403);
  11. }
  12. if (isset($_POST['delete'])) {
  13. $DB->query("
  14. UPDATE pm_conversations_users
  15. SET
  16. InInbox = '0',
  17. InSentbox = '0',
  18. Sticky = '0'
  19. WHERE ConvID = ? AND UserID = ?", $ConvID, $UserID);
  20. } else {
  21. if (isset($_POST['sticky'])) {
  22. $DB->query("
  23. UPDATE pm_conversations_users
  24. SET Sticky = '1'
  25. WHERE ConvID = ? AND UserID = ?", $ConvID, $UserID);
  26. } else {
  27. $DB->query("
  28. UPDATE pm_conversations_users
  29. SET Sticky = '0'
  30. WHERE ConvID = ? AND UserID = ?", $ConvID, $UserID);
  31. }
  32. if (isset($_POST['mark_unread'])) {
  33. $DB->query("
  34. UPDATE pm_conversations_users
  35. SET Unread = '1'
  36. WHERE ConvID = ?
  37. AND InInbox = '1'
  38. AND UserID = ?", $ConvID, $UserID);
  39. $Cache->increment('inbox_new_'.$UserID);
  40. }
  41. }
  42. header('Location: ' . Inbox::get_inbox_link());
  43. ?>