Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/29/17 in all areas

  1. Hello guys, I just wanted to share with you some code I have running on our logging site. For this to work you need Zumeweb's Pacific skin, stuartpb's Airport Information Addon and Vansers VFleetTracker added. This bit of code will display flights that have been bidded on on a table form with some cool links to the modules listed above. When there is a flight that has been bidded on something like this will appear: If no flights have been bidded on then this will appear: (not the latest flights table, the thing below that). Here is the code: <?php $lastbid = SchedulesData::GetAllBids(); if (count($lastbid) > 0) { ?> <div class="row-fluid"> <div class="span12"> <div class="box"> <table width="100%" border="0" bordercolor="#FFFFFF"> <h3><center>Upcoming Departures</h3> </div> <style type="text/css"> table th { text-align: center; color:black; font-weight:bold;} table td { text-align: center; } </style> <thead> <tr> <style type="text/css"> { text-align: center; } </style> <th><div align="center">Flight Number</div></th> <th><div align="center">Pilot</div></th> <th><div align="center">Departure</div></th> <th><div align="center">Arrival</div></th> <th><div align="center">Flight Duration</div></th> <th><div align="center">Aircraft</th> <th><div align="center">Registration</div></th> </tr> </thead> <tbody> <?php foreach($lastbids as $lastbid) { ?> <?php $flightid = $lastbid->id ?> <td height="25" width="10%" align="center"><span><a href="<?php echo SITE_URL?>/index.php/schedules/details/<?php echo '' . $flightid . '';?> "><?php echo $lastbid->code; ?><?php echo $lastbid->flightnum; ?></span></td> <?php $params = $lastbid->pilotid; $pilot = PilotData::GetPilotData($params); $pname = $pilot->firstname; $psurname = $pilot->lastname; ?> <td height="25" width="10%" align="center"><span><a href="<?php echo SITE_URL?>/index.php/profile/view/<?php echo '' . $params . ''; ?>"><?php echo $pname; ?> <?php echo $psurname; ?></span></td> <td height="25" width="10%" align="center"><span><?php echo '<a href=" '.SITE_URL.'/index.php/airports/get_airport?icao='.$lastbid->depicao.'">'.$lastbid->depicao.'</a>';?></span></td> <td height="25" width="10%" align="center"><span><?php echo '<a href=" '.SITE_URL.'/index.php/airports/get_airport?icao='.$lastbid->arricao.'">'.$lastbid->arricao.'</a>';?></span></td> <td height="25" width="10%" align="center"><span><?php echo $lastbid->flighttime; ?> hours</span></td> <td height="25" width="10%" align="center"><span><a href="<?php echo SITE_URL?>/index.php/vFleetTracker/view/<?php echo '' . $lastbid->registration . ''; ?>"><?php echo $lastbid->aircraft; ?></a></td> <td height="25" width="10%" align="center"><span><a href="<?php echo SITE_URL?>/index.php/vFleetTracker/view/<?php echo '' . $lastbid->registration . ''; ?>"><?php echo $lastbid->registration; ?></a></td> </tr> </div> </div> </div> <?php } } else { ?> <div class="row-fluid"> <div class="span12"> <div class="box"> <table width="100%" border="0" bordercolor="#FFFFFF"> <h3><center>There Are No Upcoming Departures!</h3> </div> <?php } ?> </tbody> </table> </div> For this to work you need to paste this into your frontpage_recentbids.tpl file. Remember the links will not work unless you have the modules mentioned above installed. Enjoy!
    1 point
  2. Sorry, it was my fault. I was working on phpVMS 2 and forgot to make the required updates. Please replace this: $('.deleteitem').live('click', function() { with this: $('.deleteitem').on('click', function() {
    1 point
  3. The selector in the last code I pasted is :"$('.deleteitem')". If it was "target" you would have to change your schedule_bids file too. Now you do not need to. +1 for pointing that
    1 point
  4. After a small search on the internet, I found this. The first reply seems very helpful. It seems that mobile phones do not support the dblclick event and the user who posted it suggests to fake the double click via taking into consideration the interval between the two clicks on the remove bid button. Which phpVMS version are you using?
    1 point
  5. https://www.cloud-coach.net/general/kindness/ have a look at this
    1 point
  6. Glad that the code works A like would be appreciated
    1 point
×
×
  • Create New...