Jump to content

petwouters

Members
  • Posts

    3
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

petwouters's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi guys, Happy New Year! I have a question, I've been trying to add the flightboard and it is working partially. I have adjusted the code which can be found elsewhere in this topic to reflect our circumstances etc. but the flight board comes up with a few gaps. First, the code I used/altered <?php $h = "6";// Hour for time zone goes here e.g. +7 or -4, just remove the + or - $hm = $h * 60; $ms = $hm * 60; $gmdate = gmdate("H:i", time()+($ms)); # # $query = "SELECT * FROM phpvms_schedules WHERE deptime>='$gmdate' AND depicao='UAAA' ORDER BY deptime"; # $list = DB::get_results($query); # echo '<h1>Almaty Departures - Current time is '.$gmdate.'</h1>'; # echo '<table width="100%" border="1" bgcolor="#FFFFFF" >'; # echo '<tr><td><b>Flight Number</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 < 5) { # $aircraft = OperationsData::getAircraftInfo($flight->aircraft); $depname = OperationsData::RetrieveAirportInfo($flight->depicao); $arrname = OperationsData::RetrieveAirportInfo($flight->arricao); # echo '<tr><td>TZE'.$flight->flightnum.'</td><td>'.$arrname->name.'</td><td>'.$flight->deptime.'</td><td>'.$aircraft->fullname.'</td>'; # echo '<td>'; # $minutes = explode(':', $flight->deptime); # if($minutes['0'] <= date('G')) { # if(($minutes['1'] - date('i')) <= 0) { # echo 'Departed'; # } # elseif(($minutes['1'] - date('i')) <= 15 && ($minutes['1'] - date('i')) >= 1) { # echo 'Final Call'; # } # elseif(($minutes['1'] - date('i')) >= 30 && ($minutes['1'] - date('i')) <= 20) { # echo 'Proceed to Gate'; # } # else { # echo 'Scheduled Departure'; # } # } # else { # echo 'Scheduled Departure'; # } # echo '</td></tr>'; # $count++; # } # } # } # echo '</table>'; # # echo '<h1>Expected Arrivals - Current Time is '.date('G:i').'</h1>'; # echo '<table width="90%" border="1" bgcolor="#FFFFFF" >'; # 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 < 5) { # $aircraft = OperationsData::getAircraftInfo($flight->aircraft); $depname = OperationsData::RetrieveAirportInfo($flight->depicao); $arrname = OperationsData::RetrieveAirportInfo($flight->arricao); # echo '<tr><td>TZE'.$flight->flightnum.'</td><td>'.$depname->name.'</td><td>'.$arrname->name.'</td><td>'.$flight->arrtime.'</td><td>'.$aircraft->fullname.'</td>'; # echo '<td>'; # $minutes2 = explode(':', $flight->arrtime); # if($minutes2['0'] <= date('G')) { # if($minutes2['1'] - (date('i')) >= 30) { # echo 'On Time'; # } # elseif(($minutes2['1'] - date('i')) >= 1 && ($minutes2['1'] - date('i')) <= 30) { # echo 'On Approach'; # } # else { # echo 'Landed'; # } # # } # else { # echo 'On Time'; # } # echo '</td></tr>'; # $count++; # } # } # } # echo '</table>'; $flights = PIREPData::getRecentReportsByCount(10); $string = ""; foreach($flights as $flight) { $string = $string.$flight->depicao.'+-+'.$flight->arricao.',+'; } ?> Here's a screenshot of what I mean - Note the gap in the destination on the second or so line. Don't know how that happens? Maybe this has something to do with flights that don't happen each day? Also, the code suggests the status should receive updates from Scheduled Departure to Go To Gate etc. and that's not happening either. As I know pretty much not a great deal about PHP, could anyone please suggest any solutions? Many thanks Peter
  2. petwouters

    Slideshow

    Hi all, I'm very very new to this and have only limited knowledge of HTML, PHP, JavaScript,... and have only been at this since a day or two... I'm trying to add a slideshow to my homepage. I've used many before on standard HTML pages and they all worked fine, but no matter what I try, I seem to get stuck here. In stead of seeing a nice fading result, it just places all the images I specified below each other. Can anyone clarify, or give a useful tip as to where I can find a solution for this problem? Many thanks Peter
  3. Hi everyone I installed phpvms a while ago and it worked fine - I however had to reinstall it, and now every time I run through the install, after the first screen i get a blank screen with Internal Server Error. It happens after I input all the db info and click on create db. .../phpvms/install/install.php?page=dbsetup This is where it happens... Didn't happen before, on the same host, with the same settings. Can anyone help? Many thanks
×
×
  • Create New...