freshJet Posted May 11, 2012 Report Share Posted May 11, 2012 There is no field for this so if I want the booking date I presume I would just find the phpvms_bids table and add a date field to for a timestamp? And if so is that all or is there more to it? Quote Link to comment Share on other sites More sharing options...
freshJet Posted May 11, 2012 Author Report Share Posted May 11, 2012 I'm surprised there isn't one actually Quote Link to comment Share on other sites More sharing options...
mseiwald Posted May 11, 2012 Report Share Posted May 11, 2012 There is a bid date in the Admin Center....so i thought it has to be saved somewhere? (null) Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted May 11, 2012 Moderators Report Share Posted May 11, 2012 There is a bid date in the Admin Center....so i thought it has to be saved somewhere? (null) I'm not sure what is the field name for the bid date, you can put this anywhere. <?php echo date(DATE_FORMAT, $bid->dateadded);?> check the bids time and see what is the field name for the date and then you can change the dateadded to something if it is not correct. Quote Link to comment Share on other sites More sharing options...
freshJet Posted May 11, 2012 Author Report Share Posted May 11, 2012 Thanks Kyle but that just displays them all as 31st December 1969 (311269) Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted May 16, 2012 Moderators Report Share Posted May 16, 2012 Thanks Kyle but that just displays them all as 31st December 1969 (311269) Sorry, stupid me. I thought the bid date was in MySQL date format. It's <?php echo $bid->dateadded;?> Quote Link to comment Share on other sites More sharing options...
freshJet Posted May 20, 2012 Author Report Share Posted May 20, 2012 Stupid me for not noticing that... Quote Link to comment Share on other sites More sharing options...
freshJet Posted May 20, 2012 Author Report Share Posted May 20, 2012 I think my site is cursed. Nothing works. Here's my full code: <?php $bookings = SchedulesData::GetAllBids(); if (count($lastbids) > 0) { ?> <table width="100%"> <tr> <th align="left"><b>Flight</b></td> <th align="left"><b>Pilot</b></td> <th align="left"><b>From</b></td> <th align="left"><b>To</b></td> <th align="left"><b>Aircraft</b></td> <th align="left"><b>Booked On</b></td> </tr> <?php foreach($lastbids as $lastbid) { $pilot_info = PilotData::GetPilotData($lastbid->pilotid); ?> <tr> <td align="left">FRX<?php echo $lastbid->flightnum; ?></td> <td align="left"><?php echo $pilot_info->firstname.' '.$pilot_info->lastname; ?></td> <td align="left"><?php echo $lastbid->depicao;?></td> <td align="left"><?php echo $lastbid->arricao; ?></td> <td align="left"><?php echo $lastbid->aircraft; ?></td> <td align="left"><?php echo $bid->dateadded;?></td> </tr> <?php } } else { ?> <p style="color:#cccccc; font-size:22px; text-align:center;">No bookings!</p> <?php } ?> </table> I tried $lastbid too... Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted May 20, 2012 Moderators Report Share Posted May 20, 2012 you used $booking on the second line. I changed it to $lastbids. try the new code. it should work. <?php $lastbids = SchedulesData::GetAllBids(); if (count($lastbids) > 0) { ?> <table width="100%"> <tr> <th align="left"><b>Flight</b></td> <th align="left"><b>Pilot</b></td> <th align="left"><b>From</b></td> <th align="left"><b>To</b></td> <th align="left"><b>Aircraft</b></td> <th align="left"><b>Booked On</b></td> </tr> <?php foreach($lastbids as $lastbid) { $pilot_info = PilotData::GetPilotData($lastbid->pilotid); ?> <tr> <td align="left">FRX<?php echo $lastbid->flightnum; ?></td> <td align="left"><?php echo $pilot_info->firstname.' '.$pilot_info->lastname; ?></td> <td align="left"><?php echo $lastbid->depicao;?></td> <td align="left"><?php echo $lastbid->arricao; ?></td> <td align="left"><?php echo $lastbid->aircraft; ?></td> <td align="left"><?php echo $lastbid->dateadded;?></td> </tr> <?php } } else { ?> <p style="color:#cccccc; font-size:22px; text-align:center;">No bookings!</p> <?php } ?> </table> Quote Link to comment Share on other sites More sharing options...
freshJet Posted May 20, 2012 Author Report Share Posted May 20, 2012 Yeahhhh. Thanks a lot Quote Link to comment Share on other sites More sharing options...
Moderators Kyle Posted May 20, 2012 Moderators Report Share Posted May 20, 2012 Not a problem! Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted May 24, 2012 Report Share Posted May 24, 2012 if you have more than one Airline running on one phpvms install this code is more than usefull <td align="left"><?php echo $lastbid->code; ?><?php echo $lastbid->flightnum; ?></td> replaced your "FRX" Airline prefix with a code piece that takes the Airline code used in Schedule is it possible to get the valid thru date of an bid example from 2012-05-23 - 2012-05-27 Quote Link to comment Share on other sites More sharing options...
Txmmy83 Posted May 24, 2012 Report Share Posted May 24, 2012 got it work I have set my bid expires after 48 hours= 2 days hope that help others <?php $lastbids = SchedulesData::GetAllBids(); if (count($lastbids) > 0) { ?> <table width="100%"> <tr> <th align="left"><b>Flight</b></td> <th align="left"><b>Pilot</b></td> <th align="left"><b>From</b></td> <th align="left"><b>To</b></td> <th align="left"><b>Aircraft</b></td> <th align="left"><b>Booked On</b></td> <th align="left"><b>Bid Expires</b></td> </tr> <?php foreach($lastbids as $lastbid) { $pilot_info = PilotData::GetPilotData($lastbid->pilotid); $date = date($lastbid->dateadded); $sNeuesDatum = date("Y-m-d", strtotime("$date + 2 day")); ?> <tr> <td align="left"><?php echo $lastbid->code; ?><?php echo $lastbid->flightnum; ?></td> <td align="left"><?php echo $pilot_info->firstname.' '.$pilot_info->lastname; ?></td> <td align="left"><?php echo $lastbid->depicao;?></td> <td align="left"><?php echo $lastbid->arricao; ?></td> <td align="left"><?php echo $lastbid->aircraft; ?></td> <td align="left"><?php echo $lastbid->dateadded;?></td> <td align="left"><?php echo $sNeuesDatum;?></td> </tr> <?php } } else { ?> <p style="color:#cccccc; font-size:22px; text-align:center;">No bookings!</p> <?php } ?> </table> 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.