当前位置: 首页>>代码示例>>PHP>>正文


PHP Appointment::setByOffset方法代码示例

本文整理汇总了PHP中Appointment::setByOffset方法的典型用法代码示例。如果您正苦于以下问题:PHP Appointment::setByOffset方法的具体用法?PHP Appointment::setByOffset怎么用?PHP Appointment::setByOffset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Appointment的用法示例。


在下文中一共展示了Appointment::setByOffset方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: trim

            echo " in the drop down list, then please select another time to try again.</p>";
        } 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 />";
开发者ID:ajkovar,项目名称:CAHS,代码行数:31,代码来源:createApp.php


注:本文中的Appointment::setByOffset方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。