rssdelete.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <?php
  2. /*
  3. FusionPBX
  4. Version: MPL 1.1
  5. The contents of this file are subject to the Mozilla Public License Version
  6. 1.1 (the "License"); you may not use this file except in compliance with
  7. the License. You may obtain a copy of the License at
  8. http://www.mozilla.org/MPL/
  9. Software distributed under the License is distributed on an "AS IS" basis,
  10. WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  11. for the specific language governing rights and limitations under the
  12. License.
  13. The Original Code is FusionPBX
  14. The Initial Developer of the Original Code is
  15. Mark J Crane <[email protected]>
  16. Portions created by the Initial Developer are Copyright (C) 2008-2012
  17. the Initial Developer. All Rights Reserved.
  18. Contributor(s):
  19. Mark J Crane <[email protected]>
  20. James Rose <[email protected]>
  21. */
  22. include "root.php";
  23. require_once "resources/require.php";
  24. require_once "resources/check_auth.php";
  25. require_once "config.php";
  26. if (permission_exists('content_delete')) {
  27. //access granted
  28. }
  29. else {
  30. echo "access denied";
  31. exit;
  32. }
  33. //add multi-lingual support
  34. $language = new text;
  35. $text = $language->get();
  36. if (count($_GET)>0) {
  37. $rss_uuid = check_str($_GET["rss_uuid"]);
  38. //mark the the item as deleted and who deleted it
  39. $sql = "update v_rss set ";
  40. $sql .= "rss_del_date = now(), ";
  41. $sql .= "rss_del_user = '".$_SESSION["username"]."' ";
  42. $sql .= "where domain_uuid = '$domain_uuid' ";
  43. $sql .= "and rss_uuid = '$rss_uuid' ";
  44. $sql .= "and rss_category = '$rss_category' ";
  45. $db->exec(check_sql($sql));
  46. unset($sql);
  47. $_SESSION["message"] = $text['message-delete-done'];
  48. header("Location: rsslist.php?rss_uuid=".$rss_uuid);
  49. return;
  50. }
  51. ?>