本文整理汇总了PHP中Appointment::getStartTime方法的典型用法代码示例。如果您正苦于以下问题:PHP Appointment::getStartTime方法的具体用法?PHP Appointment::getStartTime怎么用?PHP Appointment::getStartTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Appointment
的用法示例。
在下文中一共展示了Appointment::getStartTime方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Appointment
?>
<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> </th></tr>";
if ($bids != null) {
foreach ($bids as $bid) {
echo "<tr><td>" . $bid->username . "</td><td>" . $bid->amount . "</td><td>" . $bid->date . "</td><td><a href='selectBid.php?bid=" . $bid->id . "'>Select</a></td></tr>";
}
} else {
示例2: Appointment
}
} 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>";
?>
<form action='placeBid.php' method='post'>
<input type="hidden" name="submitted" value="true" />