當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。