Jump to content

Schedule Booking on frontpage


Kieran Jones

Recommended Posts

Hey guys,

Just wondering if anyone have some code so that on the sidebar menu it will have "My Bookings" and underneath it will say "you havent booked a flight yet<br />Click Here to to get a flight. And when you have Bid for a flight it will shouw the departure and destination???

Thanks for the help ;) (See ya in the skies)

Kieran

Link to comment
Share on other sites

Copy this in your frontpage:

<?php
$bids = SchedulesData::GetBids(Auth::$pilot->pilotid);

if(!$bids)
{
?>
<p align="center">you havent booked a flight yet<br />
<a href="<?php echo url('/schedules') ?>">Click Here to to get a flight</a>
</p>
<?php
return;
}
?>
<table id="tabledlist" class="tablesorter">
<thead>
<tr>
<th>Route</th>
</tr>
</thead>
<tbody>
<?php
foreach($bids as $bid)
{
?>
<tr id="bid<?php echo $bid->bidid ?>">
<td align="center"><?php echo $bid->depicao; ?> to <?php echo $bid->arricao; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>

Link to comment
Share on other sites

  • Moderators

Try this, there was a slight change in the Auth Class in the beta's.

<?php
$bids = SchedulesData::GetBids(Auth::$userinfo->pilotid);
if(!$bids)
{
?>
<p align="center">you havent booked a flight yet<br />
<a href="<?php echo url('/schedules') ?>">Click Here to to get a flight</a>
</p>
<?php
return;
}
?>
<table id="tabledlist" class="tablesorter">
<thead>
<tr>
<th>Route</th>
</tr>
</thead>
<tbody>
<?php
foreach($bids as $bid)
{
?>
<tr id="bid<?php echo $bid->bidid ?>">
<td align="center"><?php echo $bid->depicao; ?> to <?php echo $bid->arricao; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...