本文整理汇总了PHP中Appointment::removeEvent方法的典型用法代码示例。如果您正苦于以下问题:PHP Appointment::removeEvent方法的具体用法?PHP Appointment::removeEvent怎么用?PHP Appointment::removeEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Appointment
的用法示例。
在下文中一共展示了Appointment::removeEvent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
$app->appointmentEmail($data, true);
$data['success'] = true;
}
header('Content-Type: application/json; charset=utf-8');
echo json_encode($data);
exit;
} elseif ($_GET['page'] === "cancel-booked") {
$now = new \DateTime();
$date = new \DateTime($_POST['appointment_start']);
$now->add(new \DateInterval("PT" . STUDENT_APPOINTMENT_MIN_HOURS_CANCELLATION . "H"));
if ($now > $date) {
throw new \InvalidArgumentException("Cannot cancel appointment.");
}
$data['appointment_start'] = $_POST['appointment_start'];
$data['student'] = $SESSION->student_num;
$data['emp_id'] = $app->removeEvent($data['student'], $data['appointment_start']);
$data['remaining'] = $app->getAppointmentCount($_POST['appointment_type_id'], $_POST['appointment_start']);
$app->appointmentEmail($data, false);
header('Content-Type: application/json; charset=utf-8');
echo json_encode($data);
exit;
} elseif ($_GET['page'] === "fetch-open") {
$openSlots = $app->getStudentAppointments($_GET['start'], $_GET['end'], $_GET['appointment_type_id'], $_GET['emp_id']);
$bookedSlots = $app->getStudentAppointments($_GET['start'], $_GET['end'], $_GET['appointment_type_id'], $_GET['emp_id'], false);
// map a [datetime+employee_id] to the corresponding booked slots info
foreach ($bookedSlots as $slot) {
$booked["{$slot['appointment_start']}{$slot['emp_id']}"] = $slot;
}
$ownedSlots = array();
$foundOpen = array();
$slots = array();