session_start();
header("Cache-control: private"); //IE 6 Fix
error_reporting(E_ALL ^ E_NOTICE);
$UCID = $_GET['UCID'];
$theSelectedSort = $_GET['SO'];
$_SESSION['McMember_SO'] = "";
$_SESSION['McMember_NavPage'] = "2";
function GetSortOrder($theSelectedColumn){
switch ( $theSelectedColumn )
{
case "1":
// echo "test case 1";
$MSO = " ORDER BY mem.FirstName";
// echo $MSO;
break;
case "2":
$MSO = " ORDER BY mem.LastName";
break;
case "3":
$MSO = " ORDER BY mem.Phone_Display";
break;
case "4":
$MSO = " ORDER BY mem.Email";
break;
case "5":
$MSO = " ORDER BY mem.MemType";
break;
case "6":
$MSO = " ORDER BY mem.MemStatus";
break;
case "7":
$MSO = " ORDER BY mem.MemberSince";
break;
case "8":
$MSO = " ORDER BY mem.Birthdate";
break;
default:
$MSO = " ORDER BY mem.LastName";
break;
}
return $MSO;
}
if ($theSelectedSort){
$MSOFinal = GetSortOrder($theSelectedSort);
$_SESSION['McMember_SO'] = $MSOFinal;
}
else{
$MSOFinal = " ORDER BY Name";
}
if($_SESSION['McMember_OrgId']){
// everything is alright
}else{
// something has gone wrong, the org id cant be located
$_SESSION['McMember_FailureReason'] = "UnableToLocateOrgId";
header("location: Login.php");
}
?>
if (!empty($_SESSION['ValidateMessage'])){
$theDisplayMessage = $_SESSION['ValidateMessage'];
$_SESSION['ValidateMessage'] = "";
print "
";
print "
";
print "";
print"";
print "".$theDisplayMessage."";
print " | ";
print "
";
print "
";
}
Else{
switch($UCID){
case 1 :
include "EditUnits.php";
break;
case 2 :
include "EditUnits.php";
break;
case 22 :
include "UnitMembers.php";
break;
case 3 :
include "SearchUnits.php";
break;
default:
include "EditUnits.php";
break;
} // END SWITCH
} // END ELSE
?>
$_SESSION['ValidateProblem'] = ""; ?>