Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php if($check_login == true) { ?>
- <section style="margin-top: -40px;" class="slider">
- <img src="http://vdalairlines.com/new/images/booked.png" /></section>
- <br />
- <?php if($_GET[m] == 1) { ?>
- <div class="alert alert-success">
- <span class="icon-info-sign fl"></span> Flight successfully booked.</div>
- <?php } ?>
- <?php if($_GET[m] == 2) { ?>
- <div class="alert alert-success">
- <span class="icon-info-sign fl"></span> Flight successfully removed.</div>
- <?php } ?>
- <?php
- $bid_q = mysql_query("SELECT * FROM bids WHERE pid='$info_id'");
- $count = mysql_num_rows($bid_q);
- if($count == 0) { echo '<center>Sorry! You currently have no booked flights!</center><br />';
- } else {
- ?>
- <?php
- $dt = explode(":", $route[deptime]);
- $dt2 = preg_replace("/[^0-9 ]/", '', $dt[1]);
- function minute($dec)
- {
- $hour = floor($dec);
- $min = round(60*($dec - $hour));
- return $min;
- }
- function hour($dec)
- {
- $hour = floor($dec);
- $min = round(60*($dec - $hour));
- return $hour;
- }
- ?>
- <table class="table table-striped">
- <thead>
- <tr cellpadding='2'>
- <th class='tablehead' align="center" height="23">Flight</th>
- <th class='tablehead' align="center" height="23">Departure</th>
- <th class='tablehead' align="center" height="23">Departure Time</th>
- <th class='tablehead' align="center" height="23">Arrival</th>
- <th class='tablehead' align="center" height="23">Arrival Time</th>
- <th class='tablehead' align="center" height="23">Aircraft</th>
- <th class='tablehead' align="center" height="23">Duration</th>
- <th class='tablehead' align="center" height="23">Dispatch</th>
- <th class='tablehead' align="center" height="23">Cancel</th>
- </tr></thead>
- <tbody>
- <?php
- while($bid = mysql_fetch_assoc($bid_q))
- {
- $bids_q = mysql_query("SELECT * FROM schedules WHERE id='$bid[fid]'");
- $route = mysql_fetch_assoc($bids_q);
- ?>
- <tr>
- <td cellpadding='2' align="center" class='tablemed' height='23'>
- <?php echo $route[code] . $route[flightnum]; ?>
- </td>
- <td cellpadding='2' align="center" class='tablemed' height='23'>
- <?php
- $depicao = $route[depicao];
- $depname = mysql_query("SELECT * FROM airports WHERE icao='$depicao'");
- while($row = mysql_fetch_array($depname))
- {
- echo '<abbr title="'.$row[name].'">'.$row['icao'].'</abbr>';
- }
- ?>
- </td>
- <td cellpadding='2' align="center" class='tablemed' height='23'>
- <?php echo $route[deptime];?>
- </td>
- <td cellpadding='2' align="center" class='tablemed' height='23'>
- <?php
- $arricao = $route[arricao];
- $arrname = mysql_query("SELECT * FROM airports WHERE icao='$arricao'");
- while($row = mysql_fetch_array($arrname))
- {
- echo '<abbr title="'.$row[name].'">'.$row['icao'].'</abbr>';
- }
- ?>
- </td>
- <td cellpadding='2' align="center" class='tablemed' height='23'>
- <?php echo $route[arrtime];?>
- </td>
- <td cellpadding='2' align="center" class='tablemed' height='23'>
- <?php
- $ac = $route[aircraft];
- $sel = mysql_query("SELECT * FROM aircraft WHERE id='$ac'");
- $d = mysql_fetch_assoc($sel);
- echo '<abbr title="'.$d[name].'">'.$d[icao].'</abbr>'; ?>
- </td>
- <td cellpadding='2' align="center" class='tablemed' height='23'>
- <?php echo $route[flighttime]; ?>
- </td>
- <td>
- <a id="<?php echo $route[id]; ?>" class="addbid" href="http://www.simbrief.com/system/dispatch.php?airline=AAL&fltnum=<?=$route[flightnum]; ?>&type=<?=$d[icao]?>&orig=<?=$route[depicao]?>&dest=<?=$route[arricao]?>&date=<?=strtoupper(date("dMy"))?>&deph=<?=$dt[0];?>&depm=<?=$dt2;?>&planformat=LIDO&units=lbs&steh=<?=hour($route[flighttime])?>&stem=<?=minute($route[flighttime])?>&fl=auto&altn=auto">Dispatch</a>
- </td>
- <td cellpadding='2' align="center" class='tablemed' height='23'>
- <?php
- if ($check_login == true)
- {
- ?>
- <a id="<?php echo $route[id]; ?>" style="text-decoration:none !important;border:none;" class="addbid" href="./base/unbook.php?id=<?php echo $bid[id]; ?>"><center></center><img style="text-decoration:none;height:20px;width:20px;" src="http://www.clker.com/cliparts/a/6/e/8/119498563188281957tasto_8_architetto_franc_01.svg.med.png"></center></a>
- <?php
- }
- ?>
- </td>
- </tr>
- <?php
- /* END OF ONE TABLE ROW */
- }
- ?>
- </tbody>
- </table><?php } ?>
- </section> <!-- END company-info -->
- </section> <!-- END main -->
- </section> <!-- END container -->
- <?php } ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement