Kieran Jones Posted March 18, 2012 Report Share Posted March 18, 2012 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 Quote Link to comment Share on other sites More sharing options...
HighFlyerPL185 Posted March 18, 2012 Report Share Posted March 18, 2012 I am looking for something similar if anyone has something like this. 1 Quote Link to comment Share on other sites More sharing options...
mattia Posted March 18, 2012 Report Share Posted March 18, 2012 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> Quote Link to comment Share on other sites More sharing options...
Kieran Jones Posted March 18, 2012 Author Report Share Posted March 18, 2012 I got an error????? "Fatal error: Access to undeclared static property: Auth::$pilot in/home/monarch/public_html/lib/skins/monarchvirtual/layout.tplon line 157" Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted March 18, 2012 Moderators Report Share Posted March 18, 2012 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> Quote Link to comment Share on other sites More sharing options...
HighFlyerPL185 Posted March 18, 2012 Report Share Posted March 18, 2012 How can I link a specific booked flight to it's briefing? And is it possible to code all of the booked flights in a dropdown box? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.