session_start();
header("Cache-control: private"); //IE 6 Fix
error_reporting(E_ALL ^ E_NOTICE);
function ai($aVal){
if ($aVal==1){
$aStatus = "Active";
}
else{
$aStatus = "Inactive";
}
return $aStatus;
}
$GSOFinal = $_SESSION['McMember_GSO'];
// Get the PHP file containing the DbConnector class
require_once('../DbConnector.php');
// Create an instance of DbConnector
$connector = new DbConnector();
$thehiddenSubmitter = $_POST['hiddensubmitter'];
$theGrpId = $_POST['GrpId'];
If ($thehiddenSubmitter == "pookachoo"){
// GET THE POST DATA AND UPDATE THE GROUP IF NECESSARY
// $NotIn = "SELECT MemID FROM grp_mems WHERE GrpId=".$theGrpId;
// $qVals11 ="SELECT * FROM oda LEFT JOIN mem ON oda.MemId = mem.MemID WHERE ((OrgId =".$_SESSION['McMember_OrgId'];
// $qVals11 = $qVals11.") AND (mem.Deleted=0) AND (oda.MemID NOT IN (".$NotIn.")))";
$NotIn = "SELECT MemID FROM grp_mems WHERE GrpId=".$theGrpId;
$qVals11 ="SELECT * FROM oda LEFT JOIN mem ON oda.MemId = mem.MemID WHERE ((OrgId =".$_SESSION['McMember_OrgId'];
$qVals11 = $qVals11.") AND (mem.Deleted=0) AND (oda.MemID NOT IN (".$NotIn."))) ORDER BY mem.LastName";
// echo $qVals11."
";
$result2 = $connector->query($qVals11);
$record_found = mysql_num_rows($result2);
$nrows2 = mysql_num_rows($result2);
for($j=0;$j<$nrows2;$j++){
$row2 = mysql_fetch_array($result2);
$theCB = "Bob".$row2['MemId'];
$theCurrentVal = $_POST[$theCB];
// echo $row2."-".$theCB."=".$theCurrentVal."
";
if ($theCurrentVal == "OFF"){
$qVals999 = "INSERT INTO grp_mems (GrpId,MemId) VALUES (".$theGrpId.",".$row2["MemId"].")";
// echo "...".$qVals999."
";
$result3 = $connector->query($qVals999);
$row3 = mysql_fetch_array($result3);
}
}
echo '';
} // END SUBMITTED DATA
// GET THE ORG DETAILS
// THROW THEM INTO VARIABLES
$qVals11 = "SELECT * FROM org WHERE OrgId =".$_SESSION['McMember_OrgId'];
$result = $connector->query($qVals11);
// Get the result
$row = $connector->fetchArray($result);
$OrgName = $row["OrgName"];
$OrgNumber = $row["OrgNumber"];
// >> GET MEMBER PERMISSIONS
// CHECK PERMISSIONS OF THE USER TO SEE WHAT THEY CAN DO WITH MEMBERS
// POPULATE SESSION PERMISSIONS BASED ON THOSE VALUES.
if(isset($_GET['ID'])){
$theGrpId = $_GET['ID'];
}
// echo $theGrpId;
// >> PULL UP THE DATA TO BE USED IN THE LIST
$NotIn = "SELECT MemID FROM grp_mems WHERE GrpId=".$theGrpId;
$qVals11 ="SELECT * FROM oda LEFT JOIN mem ON oda.MemId = mem.MemID WHERE ((OrgId =".$_SESSION['McMember_OrgId'];
$qVals11 = $qVals11.") AND (mem.Deleted=0) AND (oda.MemID NOT IN (".$NotIn."))) ORDER BY mem.LastName";
// echo $qVals11."
";
$result = $connector->query($qVals11);
$record_found = mysql_num_rows($result);
$nrows = mysql_num_rows($result);
// $row = $connector->fetchArray($result);
print "