function checkGroup($group) { //If privacy is NOT null, then the group exists if (checkGroupPrivate($group) != null) { return true; } else { return false; } }
removeFromGroup($group, $user_to_remove); } } //If group is private, add the "add/remove" user dialogue here. if (checkGroupPrivate($group)) { $output .= file_get_contents("templates/add-remove-users.html"); } $output .= "<form name='leave-group' method='post' action=''><label>Set new group admin:</label><input type='text' name='newowner'><input type='submit' value='Leave Group' name='setowner'></form>"; } else { if (getGroupMember($username, $group)) { //Everyone else then sees... $output .= "<form name='leave-group' method='post' action=''><input type='submit' text='Leave Group'></form>"; } } //Group is private? if (checkGroupPrivate($group) && $_SESSION['admin'] == false) { header("Location: {$host}/403"); //No permission to view this } else { //Getting, prettifying and printing entries WITHOUT edit functionality. User currently must do that via landing page. $output .= encaseResults(getEntries($group, true)); } } else { //TODO - List all of the groups the user is a member of. if ($_SESSION['admin']) { //spit("Admin List"); //Get ALL groups $sql = "SELECT DISTINCT owner, groupid FROM Groups INNER JOIN GroupMembers"; } else { //spit("Normal List"); //Searched based on usename