$sSQLp = "CREATE TABLE groupprop_" . $iGroupID . " (\n\t\t\t\t\t\tper_ID mediumint(8) unsigned NOT NULL default '0',\n\t\t\t\t\t\tPRIMARY KEY (per_ID),\n \t\t\t\t\t\tUNIQUE KEY per_ID (per_ID)\n\t\t\t\t\t\t) ENGINE=MyISAM;"; RunQuery($sSQLp); // If this is an existing group, add rows in this table for each member if (!$bGetKeyBack) { $sSQL = "SELECT per_ID FROM person_per INNER JOIN person2group2role_p2g2r ON per_ID = p2g2r_per_ID WHERE p2g2r_grp_ID = " . $iGroupID . " ORDER BY per_ID"; $rsGroupMembers = RunQuery($sSQL); while ($aRow = mysql_fetch_array($rsGroupMembers)) { $sSQLr = "INSERT INTO groupprop_" . $iGroupID . " ( `per_ID` ) VALUES ( '" . $aRow[0] . "' );"; RunQuery($sSQLr); } } } if (array_key_exists("EmptyCart", $_POST) && $_POST["EmptyCart"] && count($_SESSION['aPeopleCart']) > 0) { $iCount = 0; while ($element = each($_SESSION['aPeopleCart'])) { AddToGroup($_SESSION['aPeopleCart'][$element['key']], $iGroupID, $iDefaultRole); $iCount += 1; } $sGlobalMessage = $iCount . " records(s) successfully added to selected Group."; Redirect("GroupEditor.php?GroupID=" . $iGroupID . "&Action=EmptyCart"); } else { Redirect("GroupEditor.php?GroupID={$iGroupID}"); } } } else { //FirstPass //Are we editing or adding? if (strlen($iGroupID) > 0) { //Editing.... //Get the information on this familyAge Groups for the drop down $sSQL = "SELECT * FROM group_grp WHERE grp_ID = " . $iGroupID;
// Include the function library require "Include/Config.php"; require "Include/Functions.php"; // Security: User must have Manage Groups & Roles permission if (!$_SESSION['bManageGroups']) { Redirect("Menu.php"); exit; } // Was the form submitted? if (isset($_POST["Submit"]) && count($_SESSION['aPeopleCart']) > 0) { // Get the GroupID $iGroupID = FilterInput($_POST["GroupID"], 'int'); $iGroupRole = FilterInput($_POST["GroupRole"], 'int'); // Loop through the session array while ($element = each($_SESSION['aPeopleCart'])) { AddToGroup($_SESSION['aPeopleCart'][$element[key]], $iGroupID, $iGroupRole); } $sGlobalMessage = $iCount . " records(s) successfully added to selected Group."; Redirect("GroupView.php?GroupID=" . $iGroupID . "&Action=EmptyCart"); } // Get all the groups $sSQL = "SELECT * FROM group_grp ORDER BY grp_Name"; $rsGroups = RunQuery($sSQL); // Set the page title and include HTML header $sPageTitle = gettext("Add Cart to Group"); require "Include/Header.php"; if (count($_SESSION['aPeopleCart']) > 0) { ?> <script type="text/javascript"> var IFrameObj; // our IFrame object
* * InfoCentral is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ******************************************************************************/ // Include the function library require "Include/Config.php"; require "Include/Functions.php"; // Get the person ID from the querystring $iPersonID = FilterInput($_GET["PersonID"], 'int'); $iRemoveVO = FilterInput($_GET["RemoveVO"], 'int'); if (isset($_POST["GroupAssign"]) && $_SESSION['bManageGroups']) { $iGroupID = FilterInput($_POST["GroupAssignID"], 'int'); AddToGroup($iPersonID, $iGroupID, 0); } if (isset($_POST["VolunteerOpportunityAssign"]) && $_SESSION['bEditRecords']) { $iVolunteerOpportunityID = FilterInput($_POST["VolunteerOpportunityID"], 'int'); AddVolunteerOpportunity($iPersonID, $iVolunteerOpportunityID); } // Service remove-volunteer-opportunity (these links set RemoveVO) if ($iRemoveVO > 0 && $_SESSION['bEditRecords']) { RemoveVolunteerOpportunity($iPersonID, $iRemoveVO); } $dSQL = "SELECT per_ID FROM person_per order by per_LastName, per_FirstName"; $dResults = RunQuery($dSQL); $last_id = 0; $next_id = 0; $capture_next = 0; while ($myrow = mysql_fetch_row($dResults)) {
// Include the function library require "Include/Config.php"; require "Include/Functions.php"; // Security: User must have Manage Groups & Roles permission if (!$_SESSION['bManageGroups']) { Redirect("Menu.php"); exit; } $iPersonID = FilterInput($_GET["PersonID"], 'int'); // Was the form submitted? if (isset($_POST["Submit"])) { // Get the GroupID $iGroupID = FilterInput($_POST["GroupID"], 'int'); $iGroupRole = FilterInput($_POST["GroupRole"], 'int'); $sPreviousQuery = strip_tags($_POST["prevquery"]); AddToGroup($iPersonID, $iGroupID, $iGroupRole); Redirect("SelectList.php?{$sPreviousQuery}"); } else { $sPreviousQuery = strip_tags(rawurldecode($_GET["prevquery"])); } // Get all the groups $sSQL = "SELECT * FROM group_grp ORDER BY grp_Name"; $rsGroups = RunQuery($sSQL); // Set the page title and include HTML header $sPageTitle = gettext("Add Person to Group"); require "Include/Header.php"; ?> <script type="text/javascript"> var IFrameObj; // our IFrame object