/public/codeCore/php/secure/adminEditLink.php
PHP | 21 lines | 14 code | 0 blank | 7 comment | 1 complexity | f25ff15b52a48aeee7bb20d050b40cac MD5 | raw file
Possible License(s): GPL-3.0
- <?
- /**
- * Administrator - Edit an Existing Link
- * @package MooKit
- */
- //require Administrator Access
- if(Security::clearance() & ACCESS_ADMIN) {
- $link = new Link(array('name'=>$_POST['name'],
- 'href'=>$_POST['href'],
- 'desc'=>$_POST['desc'],
- 'weight'=>$_POST['weight'],
- 'ajaxLink'=>$_POST['ajaxLink'],
- 'menuLink'=>$_POST['menuLink'],
- 'access_level'=>$_POST['access_level']));
- //attempt to add it to the database
- $link->update($_POST['link_id']);
- //return results
- echo $link->json_status;
- } else
- echo "Unauthorized";
- ?>