if (!$a->CheckPermission('edit_permissions')) { echo '<center><b>You are not allowed to edit permissions.</b></center></body></html>'; die; } $u->DropPermission($_GET['user'], $_GET['permission']); echo 'Permission "' . $_GET['permission'] . '" has been dropped for user "' . $_GET['user'] . '"<br><br> <a href="' . $_SERVER['PHP_SELF'] . '?do=edit_perm&user='******'user'] . '">Back to user\'s permissions</a>'; } if ($_GET['do'] == 'add_permission') { if ($_GET['user'] == $_SESSION['login']) { echo '<center><b>You cannot edit yourself. Please use another account to edit yours.</b></center>'; die; } if (!$a->CheckPermission('edit_permissions')) { echo '<center><b>You are not allowed to edit permissions.</b></center></body></html>'; die; } if ($_GET['user'] == '') { die('No user given'); } if ($_GET['permission'] == '') { die('No permission given'); } $u->AddPermission($_GET['user'], $_GET['permission']); echo 'Permission "' . $_GET['permission'] . '" has been added for user "' . $_GET['user'] . '"<br><br> <a href="' . $_SERVER['PHP_SELF'] . '?do=edit_perm&user='******'user'] . '">Back to user\'s permissions</a>'; } ?> </body> </html>