} if (isset($_POST["Notes"])) { $newNotes = $sanitize($_POST["Notes"]); } if (isset($_POST["ParentLastName"])) { $newParentLastName = $sanitize($_POST["ParentLastName"]); } if (isset($_POST["ParentFirstName"])) { $newParentFirstName = $sanitize($_POST["ParentFirstName"]); } $myReservation = new Reservation($roomReservationActivityID, $roomReservationRequestID, $socialWorkerProfileId, $rmhStaffProfileId, $familyProfileId, $activityType, $status, $swDateStatusSubmitted, $rmhDateStatusSubmitted, $beginDate, $endDate, $patientDiagnosis, $roomnote); $myReservation = insert_RoomReservationActivity(); } //end if( $_POST['submit'] == "submit" ) } else { if (isset($_POST['form_token']) && !validateTokenField($_POST)) { $referralform = false; //if the security validation failed. display/store the error: //'The request could not be completed: security check failed!' } else { $referralform = false; //there was no POST DATA } } $errorMessage = ""; //check that the fields are not blank and tell the user to fill them in if (empty($newBeginDate)) { $errorMessage .= " Please enter a BeginDate. "; } if (empty($newEndDate)) { $errorMessage .= " Please enter a EndDate. ";
$table .= "</td>"; $table .= "<td>"; $table .= $family->get_patientnotes(); $table .= "</td>"; $table .= "</td>\n</tr>"; // TODO : put familyProfileId into the elements of the array created above //var_dump($family); $numFamilies++; } $table .= "</table>"; echo "Please click on the patient name to create a reservation for that patient"; echo $table; } //end if is_array } else { if (isset($_POST["form_token"]) && !validateTokenField($_POST)) { //if the security validation failed. display/store the error: //'The request could not be completed: security check failed!' } else { //there was no POST DATA } } if (isset($_GET['id'])) { //gets the familyid passed down by the family profile search and when the profile is selected(clicked) $familyID = sanitize($_GET['id']); $familyProfile = retrieve_FamilyProfile($familyID); if ($familyProfile) { makeReservation($familyProfile); } else { $content = "not found"; }