Jump to content

mattia

Members
  • Posts

    267
  • Joined

  • Last visited

Everything posted by mattia

  1. $query = "SELECT * FROM phpvms_schedules ORDER BY deptime + 0 ASC"; $list = DB::get_results($query); echo '<h3>Upcoming Departures - Current Time is '.date('G:i').'</h3>'; echo '<table width="80%" border="0">'; echo '<tr><td><b>Flight Number</b></td><td><b>Departure</b></td><td><b>Arrival</b></td><td><b>Departure Time</b></td><td><b>Aircraft</b></td><td><b>Status</b></td></tr>'; $count = 0; foreach($list as $flight) { if(date('G:i') >= '23') {$time = '0';} else {$time = date('G:i');} if(($flight->deptime + 0) > $time) { if($count < 10) { $aircraft = OperationsData::getAircraftInfo($flight->aircraft); echo '<tr><td>'.$flight->flightnum.'</td><td>'.$flight->depicao.'</td><td>'.$flight->arricao.'</td><td>'.$flight->deptime.'</td><td>'.$aircraft->fullname.'</td>'; echo '<td>'; if(($flight->deptime - date('G:i')) <= 1) { echo 'Now Boarding'; } else { echo 'Scheduled Departure'; } echo '</td></tr>'; $count++; } } } echo '</table>'; echo '<h3>Upcoming Arrivals - Current Time is '.date('G:i').'</h3>'; echo '<table width="80%" border="0">'; echo '<tr><td><b>Flight Number</b></td><td><b>Departure</b></td><td><b>Arrival</b></td><td><b>Arrival Time</b></td><td><b>Aircraft</b></td><td><b>Status</b></td></tr>'; $count = 0; foreach($list as $flight) { if(date('G:i') >= '23') {$time = '0';} else {$time = date('G:i');} if(($flight->arrtime + 0) > $time) { if($count < 10) { $aircraft = OperationsData::getAircraftInfo($flight->aircraft); echo '<tr><td>'.$flight->flightnum.'</td><td>'.$flight->depicao.'</td><td>'.$flight->arricao.'</td><td>'.$flight->arrtime.'</td><td>'.$aircraft->fullname.'</td>'; echo '<td>'; if(($flight->arrtime - date('G:i')) <= 1) { echo 'Arriving Soon'; } else { echo 'On Time'; } echo '</td></tr>'; $count++; } } } echo '</table>';
  2. 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>
  3. you created the database in phpmyadmin?
  4. http://www.simpilotgroup.com/home/modules
  5. but I see him well his site
  6. hi Daniel, i created the table following your instructions but you can color the numbers and the words "first" "next" "last" "previous" many thanks for table is very nice
  7. MANY THANKS DAVE FOR YOUR HELP NOW THE PROBLES IS SOLVED THANKS
  8. i put your code <?php foreach($pireps as $flight) { $aircraft = OperationsData::getAircraftInfo($flight->aircraft); echo '<tr><th>'.$flight->code.' <b>'.$flight->flightnum.'</th> <th>'.$aircraft->name.'</th> <th>'.date(DATE_FORMAT, strtotime($flight->submitdate)).'</th> <th>'.$flight->flighttime.'</th> echo '<th>'; <-------------------this is line 211 if($flight->accepted == '0'){echo 'Pending';} elseif($flight->accepted == '1'){echo 'Accepted';} elseif($flight->accepted == '2'){echo 'Rejected';} else{echo 'Unknown';} echo '</th></tr>'; } ?> but this error appears Parse error: syntax error, unexpected '>' in /var/www/virtual/italianivolanti.it/htdocs/iv/core/templates/pilot_public_profile.tpl on line 211 Many thanks for help Dave
  9. WOOOOWWWWWWWWW MANY THANKS DAVE WORKSSS NOWWW!!!! last pleasure Dave how to convert the status of the flight? 0=approval pending 1=accept 2=reject
  10. hi Dave, many thanks for your help put your code in my profile.php $this->set('pireps', PIREPData::GetLastReports(Auth::$userinfo->pilotid, '10')); and in my pilot_public_profile.tpl write this <?php foreach($pireps as $flight) { echo '<tr><th>'.$flight->code.' <b>'.$flight->flightnum.'</th> <th>'.$flight->aircraft.'</th> <th>'.date(DATE_FORMAT, strtotime($flight->submitdate)).'</th> <th>'.$flight->flighttime.'</th> <th>'.$flight->accepted.'</th> </tr>'; } ?> works but does not give me the name of the aircraft, how do I take the name of the aircraft and the flight status (attach photo)
  11. http://yoursite.com/index.php/Fleet
  12. in my profile.php have add $this->set('pireps', PIREPData::GetLastReports(Auth::$userinfo->pilotid)); in my pilot_public_profile.tpl I changed my code like this: <?php foreach($pireps as $flight) { echo '<tr><th>'.$flight->code.' <b>'.$flight->flightnum.'</th> <th>'.$flight->aircraft.'</th> <th>'.date(DATE_FORMAT, strtotime($flight->submitdate)).'</th> <th>'.$flight->flighttime.'</th> <th>'.$flight->accepted.'</th> </tr>'; } ?> but so it takes all pirep, you can take only the top 10? thanks for your help guys
  13. hi joeri and jeff Thanks for your patience, if I use this code takes the last pirep arrived, but I need the last 10 pirep sent a single pilot to put in the pilot_public_profile.tpl sorry for my english I hope I explained myself now
  14. thanks for your code, but this takes all pirep. I need the pirep a single pilot to put in pilot_public_profile: tpl
  15. hi jeff thanks for your help I tried your code but not work
  16. hi all I wrote this code to get the last flight of a pilot <table> <tr> </tr> <TR><TD colspan="5"><hr color="red" size="1"> </TD></TR> <TR><TD colspan="5"><font color=yellow> <font size="3px"><b> Recent Flight Reports </b></font></font> </TD></TR> <TR><TD colspan="5"><hr color="red" size="1"> </TD></TR> <tr> <td><font color=red>Flight N°</td> <td><font color=red>Aircraft</td> <td><font color=red>Submitted</td> <td><font color=red>Flight Time</td> <td><font color=red>Status</td> </tr> <?php $query="SELECT * FROM phpvms_11pireps WHERE pilotid = '$userinfo->pilotid' ORDER BY submitdate DESC LIMIT 13"; $list=DB::get_results($query); foreach ($list as $flight) { echo '<tr><th>'.$flight->code.' <b>'.$flight->flightnum.'</th> <th>'.$flight->aircraft.'</th> <th>'.date(DATE_FORMAT, strtotime($flight->submitdate)).'</th> <th>'.$flight->flighttime.'</th> <th>'.$flight->accepted.'</th> </tr>'; } ?> but when I make $flight->aircraft I get a number of aircraft but not your name The same thing also for flight status. I also tried $flight->aircraftname or $flight->aircraftcode but dont work. how can I get the name of the aircraft and flight status? thanks for help
  17. hello guys I was wondering if you could create a gadget for win7 that gives you flight status nd other data. What do you think? Best Regards Mattia
  18. hi Tylor try this <img src="<?php echo Countries::getCountryImage($userinfo->location);?>" /> - <font color=yellow><?php echo Countries::getCountryName($userinfo->location);?>
  19. hi Fernando, I was wondering if you could create a ranking of the top 10 on average landings
×
×
  • Create New...