removeContactGroup($group); } else { if ($_GET['action'] == removeContactType && $_SESSION['access'] >= 50) { //get the contact ID and remove that $contactType = new Persontype($_GET['contactTypeID']); removeContactType($contactType); } else { if ($_GET['action'] == removeContactDB && $_SESSION['access'] >= 50 || $_GET['action'] == removePersonDB && $_SESSION['access'] >= 50) { //get the contact ID and remove that $contact = new Person($_GET['contactID']); removeContactDB($contact); } else { if ($_GET['action'] == removeGroup && $_SESSION['access'] >= 50) { //get the contact ID and remove that $group = new Contact($_GET['groupID']); removeGroup($group); } else { if ($_GET['action'] == 'showGroupTypes') { displayAllGroupTypes(); } else { if ($_GET['action'] == 'showContactTypes') { displayAllContactTypes(); } else { if ($_GET['action'] == 'showPeople') { displayAllPeople(); } else { if ($_GET['action'] == 'showArchivedGroup') { $groupTypes = new ContactType(); displayAllArchived($groupTypes); } else { $groupTypes = new ContactType();
$db = JFactory::getDBO(); $query = 'UPDATE #__acctexp_eventlog' . ' SET `notify` = \'0\'' . ' WHERE `notify` = \'1\''; $db->setQuery($query); $db->query(); aecCentral($option); break; case 'toggleajax': toggleProperty(aecGetParam('type'), aecGetParam('id'), aecGetParam('property')); exit; break; case 'addgroupajax': addGroup(aecGetParam('type'), aecGetParam('id'), aecGetParam('group')); exit; break; case 'removegroupajax': removeGroup(aecGetParam('type'), aecGetParam('id'), aecGetParam('group')); exit; break; case 'recallinstall': include_once JPATH_SITE . '/administrator/components/com_acctexp/install.acctexp.php'; com_install(); break; case 'initsettings': $aecConfig = new aecConfig(); $aecConfig->initParams(); echo 'SPLINES RETICULATED.'; break; case 'parsertest': $top = new templateOverrideParser(); break; case 'lessen':
} else { $name = "{$view}'s"; $afterStr = ""; } echo "<h2 class='title'>{$name} Groups</h2><div class='display'>"; showGroups($view); echo $afterStr; die("</div></div></body></html>"); } //add or remove groups if (isset($_GET['add'])) { $add = sanitizeString($_GET['add']); addGroup($user, $add); } elseif (isset($_GET['remove'])) { $remove = sanitizeString($_GET['remove']); removeGroup($user, $remove); } // display groups $result = queryMysql("SELECT course, coursename FROM courses ORDER BY course"); $num = $result->num_rows; echo "<h2 class='title'>Groups</h2><div class='display'><ul>"; for ($i = 0; $i < $num; $i++) { $row = $result->fetch_array(MYSQLI_ASSOC); echo "<li><a href='group.php?view=" . $row['course'] . "'>" . $row['course'] . " " . $row['coursename'] . "</a>"; // check if the user is in a group $result1 = queryMysql("SELECT * FROM groups WHERE user='******' AND course='" . $row['course'] . "'"); if ($result1->num_rows) { echo "<span class='action'><a class='button small' href='groups.php?remove=" . $row['course'] . "'>drop</a>"; echo "<span class='state'>You are in this group</span></span>"; } else { echo "<span class='action'><a class='button small' href='groups.php?add=" . $row['course'] . "'>join</a><span class='action'>";
} else { echo json_encode(['error' => 'Incorrect name length', 'code' => 400]); } break; /** * Delete the group */ /** * Delete the group */ case 'deleteGroup': requireAuth(); // We need the exact ID: this means no 003106 (only 316...) if (isset($_GET['gid']) && is_numeric($_GET['gid'])) { $gid = $_GET['gid']; removeGroup($gid); $result = ['success' => true, 'gid' => $gid]; echo json_encode($result); } else { echo json_encode(['error' => 'No phone number supplied!', 'code' => 400]); } break; /** * Get a profile picture of a account that is being tracked */ /** * Get a profile picture of a account that is being tracked */ case 'getProfilePic': if (isValidSha256($_GET['hash'])) { $hash = $_GET['hash'];
$response = createUser($json["raw"]); } else { if ($request == "saveGroups") { $response = saveGroups($json["data"]); } else { if ($request == "removeUserFromGroup") { $response = removeUserFromGroup($json["data"]); } else { if ($request == "addUserToGroup") { $response = addUserToGroup($json["data"]); } else { if ($request == "getUsersUngroup") { $response = getUsersUngroup($json["data"]); } else { if ($request == "removeGroup") { $response = removeGroup($json["data"]); } else { if ($request == "createGroup") { $response = createGroup($json["data"]); } else { $response = getJSONFromCodeError(202); } } } } } } } } } }
/* Script para eliminar información en la base de datos */ require_once 'functions.php'; if (isset($_POST['id']) and isset($_POST['removeData'])) { switch ($_POST['removeData']) { case 0: if (isset($_POST['user'])) { echo removeUser($_POST['user']); } else { echo "No proper data"; } break; case 1: if (isset($_POST['group'])) { echo removeGroup($_POST['group']); } else { echo "No proper data"; } break; case 2: if (isset($_POST['task'])) { echo removeTask($_POST['task']); } else { echo "No proper data"; } break; case 3: if (isset($_POST['student']) and isset($_POST['group'])) { echo deleteStudent($_POST['student'], $_POST['group']); } else {
* @copyright Copyright (C) 2003 - 2009 Johan Janssens and Mathias Verraes. All rights reserved. * @license GNU GPLv2 <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html> * @link http://www.joomladocman.org */ defined('_JEXEC') or die('Restricted access'); include_once dirname(__FILE__) . '/groups.html.php'; JArrayHelper::toInteger($cid); switch ($task) { case "new": editGroup($option, 0); break; case "edit": editGroup($option, $cid[0]); break; case "remove": removeGroup($cid); break; case "apply": case "saveg": case "save": saveGroup($option); break; case "cancel": cancelGroup($option); break; case "emailgroup": emailGroup($gid); break; case "sendemail": sendEmail($gid); break;
addUserToGroup(); } else { if (isset($_POST['delUserFromGroup'])) { delUserFromGroup(); } else { if (isset($_POST['delUser'])) { removeUser(); } else { if (isset($_POST['updateUser'])) { updateUser(); } else { if (isset($_POST['addGroup'])) { addGroup(); } else { if (isset($_POST['delGroup'])) { removeGroup(); } else { if (isset($_POST['updateGroup'])) { updateGroup(); } else { if (isset($_POST['update_group_key'])) { updateGroupKey(); } else { if ($_GET['action'] == add) { } else { if ($_GET['action'] == remove) { } else { if (isset($_POST['updateProp'])) { updateProperties($properties); } else { displayLDAP($properties);