linkinfo.inc.php 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * Insipid
  4. * Personal web-bookmark-system
  5. *
  6. * Copyright 2016-2020 Johannes Keßler
  7. *
  8. * Development starting from 2011: Johannes Keßler
  9. * https://www.bananas-playground.net/projekt/insipid/
  10. *
  11. * creator:
  12. * Luke Reeves <luke@neuro-tech.net>
  13. *
  14. * This program is free software: you can redistribute it and/or modify
  15. * it under the terms of the GNU General Public License as published by
  16. * the Free Software Foundation, either version 3 of the License, or
  17. * (at your option) any later version.
  18. *
  19. * This program is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. * GNU General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU General Public License
  25. * along with this program. If not, see http://www.gnu.org/licenses/gpl-3.0.
  26. *
  27. */
  28. $_id = false;
  29. if(isset($_GET['id']) && !empty($_GET['id'])) {
  30. $_id = trim($_GET['id']);
  31. $_id = Summoner::validate($_id,'nospace') ? $_id : false;
  32. }
  33. $linkData = $Management->loadLink($_id);
  34. if(empty($linkData)) {
  35. header("HTTP/1.0 404 Not Found");
  36. exit();
  37. }
  38. $_displayEditButton = false;
  39. if(Summoner::simpleAuthCheck() === true) {
  40. $_displayEditButton = true;
  41. }