Jump to content

JustinFHI

Members
  • Posts

    12
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Germany, Cologne
  • Interests
    Programing in PHP, MySQL, HTML, CSS and JavaScript. Also of course flying on FlightSimulator

Recent Profile Visitors

2262 profile views

JustinFHI's Achievements

Newbie

Newbie (1/14)

1

Reputation

  1. Yes it is my own root-server. I can write to the table but only via SQL-Query and via an extra script. Via kACARS it doesn't work...
  2. Doesn't anybody know an answer?
  3. Hi, you can fix it like this: //Script order <?php MainController::Run('PIREPS', 'RecentFrontPage'); ?> //Content of frontpage_recent.tpl <?php $pir_sel = "SELECT * FROM pireps WHERE pilotid = 'Auth::$userinfo->pilotid' ORDER BY id DESC LIMIT 5"; $pir_go = mysql_query($pir_sql); while($report = mysql_fetch_object) { <li><a href="<?php echo url('/pireps/viewreport/'.$report->pirepid);?>">#<?php echo $report->pirepid . ' - ' . $report->code.$report->flightnum?> <span class="icon-align-left"></span><strong> Flying from <?php echo $report->depICAO . ' to ' . $report->arrICAO?></strong></a></li> } ?> I know that doesn't work with modules, but I think it's the easyst method.
  4. Hey Guys, I am currently program at a Trackingsystem, but I have a problem. We use in our airline kACARS only. For the Tracker, I have to change the "kACARS_Free.php" Module that, when kACARS send the liveupdate, these data also insert into a second table called "tracker_daten". Here the Code from liveupdate only. Rest of the code is default: <?php case 'liveupdate': $pilotid = PilotData::parsePilotID($xml->verify->pilotID); $lat = str_replace(",", ".", $xml->liveupdate->latitude); $lon = str_replace(",", ".", $xml->liveupdate->longitude); # Get the distance remaining $depapt = OperationsData::GetAirportInfo($xml->liveupdate->depICAO); $arrapt = OperationsData::GetAirportInfo($xml->liveupdate->arrICAO); $dist_remain = round(SchedulesData::distanceBetweenPoints( $lat, $lon, $arrapt->lat, $arrapt->lng)); # Estimate the time remaining if($xml->liveupdate->groundSpeed > 0) { $Minutes = round($dist_remain / $xml->liveupdate->groundSpeed * 60); $time_remain = self::ConvertMinutes2Hours($Minutes); } else { $time_remain = '00:00'; } // Start Trackingrecord $pid = $pilotid; $flug = $xml->liveupdate->slightNumber; $acrf = $xml->liveupdate->registration; // $lat // $lon $alt = $xml->liveupdate->altitude; $gs = $xml->liveupdate->groundSpeed; $dep = $xml->liveupdate->depICAO; $arr = $xml->liveupdate->arrICAO; $rte = $xml->liveupdate->route; $deptime = $xml->liveupdate->depTime; $eindeutige_flugnummer = $pid.$flug.$dep.$arr.$deptime; $md5id = md5($eindeutige_flugnummer); $sql = "INSERT INTO tracker_daten ('pilot', 'flug', 'acrf', 'lat', 'lon', 'alt', 'gs', 'dep', 'arr', 'rte', 'deptime', 'md5id') VALUES ('$pid', '$flug', '$acrf', '$lat', '$lon', '$alt', '$gs', '$dep', '$arr', $rte', '$deptime', '$md5id')"; $go = mysql_query($sql); // End Trackingrecord $fields = array( 'pilotid' =>$pilotid, 'flightnum' =>$xml->liveupdate->flightNumber, 'pilotname' =>'', 'aircraft' =>$xml->liveupdate->registration, 'lat' =>$lat, 'lng' =>$lon, 'heading' =>$xml->liveupdate->heading, 'alt' =>$xml->liveupdate->altitude, 'gs' =>$xml->liveupdate->groundSpeed, 'depicao' =>$xml->liveupdate->depICAO, 'arricao' =>$xml->liveupdate->arrICAO, 'deptime' =>$xml->liveupdate->depTime, 'arrtime' =>'', 'route' =>$xml->liveupdate->route, 'distremain' =>$dist_remain, 'timeremaining' =>$time_remain, 'phasedetail' =>$xml->liveupdate->status, 'online' =>'', 'client' =>'FlyHigh.acars', ); #$this->log("UpdateFlightData: \n".print_r($fields, true), 'kacars'); ACARSData::UpdateFlightData($pilotid, $fields); break; The problem now is: MySQL-Table "tracker_daten" is stil empty, but "acarsdata"-table become new data. Can you help me?
  5. Thank you! We need all airports for a funktion in a fuel-calc.
  6. Hi, has anyone a SQL-Table of all airports of the world? When not, can anyone help me to import all airports via PHP? Thanks!
  7. Hello, can you reupload this Add-On? I've get an Invaild-Link-Error.
  8. Hello, we have a big problem with our Pilots-Page. You can open it, but it's empty. We haven't change anything. Can anyone help us?
  9. Have someone the zip-file and can upload this in board?
×
×
  • Create New...