session_start();
header("Cache-control: private"); //IE 6 Fix
$_SESSION['McMember_SpecialTitle'] = "Edit Unit";
// Gets rid of all the error reporting on servers which are not configured appropriately.
error_reporting(E_ALL ^ E_NOTICE);
// Get the PHP file containing the DbConnector class
require_once('../DbConnector.php');
// Create an instance of DbConnector
$connector = new DbConnector();
$theOrgId = $_SESSION['McMember_OrgId'];
$theMemId = $_SESSION['McMember_MemId'];
$thehiddenSubmitter = $_POST['hiddensubmitter'];
$Name=$_POST['Name'];
$Topic=$_POST['Topic'];
$MeetingDate=$_POST['Date'];
$Start=$_POST['Start'];
$End=$_POST['End'];
$Duration=$_POST['Duration'];
$Location=$_POST['Location'];
$Contact=$_POST['Contact'];
$AC=$_POST['AC'];
$PF=$_POST['PF'];
$SF=$_POST['SF'];
$Email=$_POST['Email'];
$Status = 'Active';
$Display2 = $AC."-".$PF."-".$SF;
If ($thehiddenSubmitter == "pookachoo"){
$FieldNames = "Name='$Unit',HouseNumber='$HouseNumber',BlockName='$BlockName'";
$FieldNames = $FieldNames.",Address1='$Address1',Address2='$Address2',City='$City',State='$State',Zip='$Zip',Country='$Country'";
$FieldNames = $FieldNames.",Phone1='$Display1',Phone1Type='$PT1',Phone1AC='$AC1',Phone1P='$P1',Phone1S='$S1'";
$FieldNames = $FieldNames.",Phone2='$Display2',Phone2Type='$PT2',Phone2AC='$AC2',Phone2P='$P2',Phone2S='$S2'";
$FieldNames = $FieldNames.",Email='$Email'";
$qVals = "UPDATE unit SET $FieldNames WHERE UnitId=".$UnitId;
// echo $qVals;
$result = $connector->query("$qVals");
echo '';
}
?>
if(isset($_GET['ID'])){
$theUnitId = $_GET['ID'];
}
$FieldNames = "Name,HouseNumber,BlockName,Address1,Address2,City,State,Zip,Country,";
$FieldNames = $FieldNames."Phone1,Phone1Type,Phone1AC,Phone1P,Phone1S,";
$FieldNames = $FieldNames."Phone2,Phone2Type,Phone2AC,Phone2P,Phone2S,";
$FieldNames = $FieldNames."Email,CreateDate,CreatedBy,OrgId";
$qVals = "SELECT * FROM unit WHERE UnitId=".$theUnitId;
$result = $connector->query("$qVals");
$row = mysql_fetch_array($result);
?>
?>