PageRenderTime 54ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/public/codeCore/php/secure/adminEditLink.php

https://github.com/IAmCorbin/MooKit
PHP | 21 lines | 14 code | 0 blank | 7 comment | 1 complexity | f25ff15b52a48aeee7bb20d050b40cac MD5 | raw file
Possible License(s): GPL-3.0
  1. <?
  2. /**
  3. * Administrator - Edit an Existing Link
  4. * @package MooKit
  5. */
  6. //require Administrator Access
  7. if(Security::clearance() & ACCESS_ADMIN) {
  8. $link = new Link(array('name'=>$_POST['name'],
  9. 'href'=>$_POST['href'],
  10. 'desc'=>$_POST['desc'],
  11. 'weight'=>$_POST['weight'],
  12. 'ajaxLink'=>$_POST['ajaxLink'],
  13. 'menuLink'=>$_POST['menuLink'],
  14. 'access_level'=>$_POST['access_level']));
  15. //attempt to add it to the database
  16. $link->update($_POST['link_id']);
  17. //return results
  18. echo $link->json_status;
  19. } else
  20. echo "Unauthorized";
  21. ?>