new_user($_POST['username'], $_POST['password'], $_POST['access'], $_POST['email']); echo "Added new user ". $_POST['username']; } if($_POST['submitted'] == 2){ if($users->change_password($_POST['username'], $_POST['old_password'], $_POST['new_password'])) echo "Changed ". $_POST['username'] ."'s Password."; else echo"Failed to change password, check Username and Password"; } if($_REQUEST['user']) if($_REQUEST['email']){ $users->delete_user($_REQUEST['user'], $_REQUEST['email']); echo "Deleted ".$_REQUEST['user']; } echo << SCRIPTS; /** Everythign inside this ifblock requires admin access */ if($_SESSION['access'] == "admin") { echo "Edit New User Email"; echo $users->display_users(); echo <<
Add User
ADD_USER; } echo <<
Change Password CHANGE_PASS; if($_SESSION['access'] == "admin") echo <<
CHANGE_PASS; else echo ""; echo <<
CHANGE_PASS; include("classes/footer.php"); ?>