本文整理汇总了PHP中Appointment::reserveAppointment方法的典型用法代码示例。如果您正苦于以下问题:PHP Appointment::reserveAppointment方法的具体用法?PHP Appointment::reserveAppointment怎么用?PHP Appointment::reserveAppointment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Appointment
的用法示例。
在下文中一共展示了Appointment::reserveAppointment方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: trim
} else {
echo "We are sorry. There are no spaces available to rent for that time period. Please select another time and try again.";
}
}
} else {
if (isset($_POST['submitted2'])) {
// note validation SHOULD occur here (user input should never be trusted), but this is outside the scope of this project
$serviceId = trim($_POST['service']);
$dayOffset = trim($_POST['day']);
$startTime = trim($_POST['time']);
$help = trim($_POST['helpRequired']);
$roomRequest = trim($_POST['roomRequest']);
echo "<h2>Create an appointment - Complete</h2>";
$appointment = new Appointment();
$appointment->setByOffset($user, $serviceId, $dayOffset, $startTime, $help);
$appointment->reserveAppointment();
$appointment->reserveResource($roomRequest);
$workSpace = $appointment->getAttachedResources('S');
echo "<p>Congratulations! Your appointment has been reserved!</p>";
echo "<p><strong><u>Appointment Details:</u></strong></p><div class='indented'>";
echo "<strong>Service name:</strong> " . $appointment->service->name . "<br /><strong>Service cost:</strong> \$" . $appointment->service->cost;
echo "<br /><strong>Start time:</strong> " . $appointment->startDateDisplay . "<br /><strong>End time:</strong> " . $appointment->endDateDisplay . "<br /><strong>Workspace:</strong> " . $workSpace->name . "<br /><strong>Workspace cost:</strong> \$" . $workSpace->price;
echo "<br /><strong>Help:</strong> ";
if ($help == null) {
echo "No help requested<br /><br /></div>";
} else {
echo "Help requested<br /><br /></div>";
}
$total = $appointment->service->cost + $workSpace->price;
echo "<br /><strong><u>Total Amount Owed:</u></strong> \$" . $total . "<br /><br />";
if ($help != null) {