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


PHP Appointment::setById方法代码示例

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


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

示例1: Appointment

<?php

include './modules/wrappers/header-customer-required.php';
?>
			<div class="infoBox">
				<h2>Choose a Bid</h2>
				<?php 
if (isset($_GET['bid'])) {
    $bidId = $_GET['bid'];
    $user->selectBid($bidId);
    echo "<p><strong>Bid has been accepted.</strong></p><p>This mechanic will now assist you with your service on the day of your appointment.\n\t\t\t\t\t\t\tYou will be required to pay for the full amount of your services prior to the appointment.</p>";
} else {
    if (isset($_GET['job'])) {
        $appointmentId = $_GET['job'];
        $appointment = new Appointment();
        $appointment->setById($appointmentId);
        ?>
					<p>Here are the bids that have currently been placed on your <strong><?php 
        echo $appointment->getStartTime('g:i a') . " " . $appointment->service->name;
        ?>
</strong> on <strong><?php 
        echo $appointment->getStartTime('F d, Y');
        ?>
</strong>.  
					Choose one of these bids to select the mechanic as your service provider.</p>	
					<p><strong>Current Bids</strong></p>
					<?php 
        $bids = $appointment->getBids();
        echo "<table border='1' class='result_table'><tr><th>Username</th><th>Bid Amount</th><th>Bid Date</th><th>&nbsp;</th></tr>";
        if ($bids != null) {
            foreach ($bids as $bid) {
开发者ID:ajkovar,项目名称:CAHS,代码行数:31,代码来源:selectBid.php

示例2: Appointment

        } else {
            echo "<p><strong>Your bid failed.</strong></p><p>Please contact one of the site administrators if you think there is a problem.</p>";
        }
    } else {
        $error = true;
        $errorMessage = "You must submit a valid number for the amount.";
    }
}
if (isset($_GET['job']) || isset($_POST['submitted']) && $error == true) {
    ?>
				
				<p>You have selected to place a bid on the following appointment:</p>
					
			<?php 
    $appointment = new Appointment();
    $appointment->setById($_GET['job']);
    echo "<table><tr><td><strong>Service Type:</strong></td><td>" . $appointment->service->name . "</td></tr>";
    echo "<tr><td><strong>Start time:</strong></td><td>" . $appointment->getStartTime('g:i a - F d, Y') . "</td></tr>";
    echo "<tr><td><strong>End time:</strong></td><td>" . $appointment->getEndTime('g:i a - F d, Y') . "</td></tr></table>";
    echo "<strong>Bidding History</strong>";
    $bids = $appointment->getBids();
    echo "<table border='1' class='result_table'><tr><th>Username</th><th>Bid Amount</th><th>Bid Date</th></tr>";
    if ($bids != null) {
        foreach ($bids as $bid) {
            echo "<tr><td>" . $bid->username . "</td><td>" . $bid->amount . "</td><td>" . $bid->date . "</td></tr>";
        }
    } else {
        echo "<tr><td colspan=3 style='padding:20px;'>No bids have been placed on this appointment.</td></tr>";
    }
    echo "</table>";
    ?>
开发者ID:ajkovar,项目名称:CAHS,代码行数:31,代码来源:placeBid.php


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