Advertisement
Guest User

Untitled

a guest
Dec 25th, 2013
373
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.39 KB | None | 0 0
  1. <div class="row-fluid">
  2. <div class="span12">
  3. <div class="box">
  4. <table width="100%" border="0" bordercolor="#FFFFFF">
  5. <h3><center>Latest Flights</h3>
  6. </div>
  7. <?php
  8. $count = 5;
  9. $pireps = PIREPData::getRecentReportsByCount($count);
  10. ?>
  11.  
  12. <style type="text/css">
  13. table th { text-align: center; color:black; font-weight:bold;}
  14. table td { text-align: center; }
  15. </style>
  16. <thead>
  17. <tr>
  18. <style type="text/css">
  19. { text-align: center; }
  20. </style>
  21. <th>Flight Number</th>
  22. <th>Pilot</th>
  23. <th>Departure</th>
  24. <th>Arrival</th>
  25. <th>Flight Duration</th>
  26. <th>Aircraft</th>
  27. <th>Date & Time Submitted (GMT)
  28. <th>Flight Status</th>
  29. </tr>
  30. </font>
  31. <tbody>
  32.  
  33. <?php
  34.  
  35. if(count($pireps) > 0)
  36. {
  37. foreach ($pireps as $pirep)
  38. {
  39. {
  40. $pilotinfo = PilotData::getPilotData($pirep->pilotid);
  41. $pilotid = PilotData::getPilotCode($pilotinfo->code, $pilotinfo->pilotid);
  42.  
  43. if($pirep->accepted == '0') $status = 'REJECTED';
  44. if($pirep->accepted == '1') $status = 'ACCEPTED';
  45. else $status = 'PENDING';
  46.  
  47. /*$aircraft = OperationsData::getAircraftInfo($pirep->aircraft);*/
  48. }
  49. ?>
  50. <tr>
  51. <td class="small"><a href="<?php echo SITE_URL?>/index.php/pireps/view/<?php echo '' . $pirep->pirepid . ''; ?>"><?php echo $pirep->code.$pirep->flightnum; ?></a></td>
  52. <td class="small"><a href="<?php echo SITE_URL?>/index.php/profile/view/<?php echo '' . $pilotinfo->pilotid . ''; ?>"><?php echo $pilotinfo->firstname.' '.$pilotinfo->lastname; ?></td>
  53. <td class="small"><?php echo $pirep->depicao; ?></td>
  54. <td class="small"><?php echo $pirep->arricao; ?></td>
  55. <td class="small"><?php echo $pirep->flighttime; ?></td>
  56. <td class="small"><?php echo $pirep->aircraft; ?></td>
  57. <td class="small"><?php echo date(DATE_FORMAT, $pirep->submitdate); ?> at <?php echo date('H:i', $pirep->submitdate);?></td>
  58. <td class="small"><?php
  59.  
  60. if($pirep->accepted == PIREP_ACCEPTED)
  61. echo '<font color="green">Arrived</font>';
  62. elseif($pirep->accepted == PIREP_REJECTED)
  63. echo '<font color="red">Rejected</font>';
  64. elseif($pirep->accepted == PIREP_PENDING)
  65. echo '<font color="orange">Awaiting Information</font>';
  66. elseif($pirep->accepted == PIREP_INPROGRESS)
  67. echo '<font color="blue">In Flight</font>';
  68.  
  69. ?>
  70. </td>
  71. </tr>
  72. <?php
  73. }
  74. }
  75. else
  76. {
  77. echo '<tr><td>There are no recent flights!</td></tr>';
  78. }
  79. ?>
  80.  
  81.  
  82.  
  83. </tbody>
  84. </div>
  85. </table>
  86. <br />
  87. <p><?php MainController::Run('FrontBids', 'RecentFrontPage', 5); ?><font color="yellow">In Flight</font></p>
  88. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement