Jump to content

hjhjhgjgjh

Members
  • Posts

    210
  • Joined

  • Last visited

Everything posted by hjhjhgjgjh

  1. thanks for that, will do it tomorrow
  2. no, i see your mistake. you forgot that there is another "if" in the middle of the code elseif($schedule->flighttime >= 1.01) you only have if($schedule->flighttime <= 1.0) but what happens when the flighttime is over 1 hour?
  3. looks correct for me. please check if you inserted the flighttimes for every flight in the format "H.MM" and then please check if you really choosed the aircraft names and not icao codes
  4. i used dreamweaver but will get netbeans,.. thanks for that hint here the last update for this script.. (read the instruction above how to get it to work) <tr> <td width="50%" > <?php if($schedule->flighttime == 0) { echo 'no fuel data available'; } elseif($schedule->flighttime <= 1.0) { if($schedule->aircraft=='MD MD-11') { $result = 8400 * ($schedule->flighttime * 100 / 60) + 3000; } elseif($schedule->aircraft=='MD DC10') { $result = 8000 * ($schedule->flighttime * 100 / 60) + 3500; } elseif($schedule->aircraft=='MD MD-11F') { $result = 8400 * ($schedule->flighttime * 100 / 60) + 3000; } elseif($schedule->aircraft=='E170') { $result = 1000 * ($schedule->flighttime * 100 / 60) + 900; } elseif($schedule->aircraft=='E190') { $result = 1200 * ($schedule->flighttime * 100 / 60) + 1000; } elseif($schedule->aircraft=='B737-800') { $result = 3300 * ($schedule->flighttime * 100 / 60) + 1200; } elseif($schedule->aircraft=='B737-400') { $result = 2900 * ($schedule->flighttime * 100 / 60) + 1500; } elseif($schedule->aircraft=='B747-200') { $result = 11364 * ($schedule->flighttime * 100 / 60) + 6000; } elseif($schedule->aircraft=='B747-200F') { $result = 11364 * ($schedule->flighttime * 100 / 60) + 6000; } elseif($schedule->aircraft=='B747-400F') { $result = 11364 * ($schedule->flighttime * 100 / 60) + 6000; } elseif($schedule->aircraft=='B727-200') { $result = 4512 * ($schedule->flighttime * 100 / 60) + 1000; } elseif($schedule->aircraft=='B747-400') { $result = 12582 * ($schedule->flighttime * 100 / 60) + 7000; } elseif($schedule->aircraft=='B703-200') { $result = 6690 * ($schedule->flighttime * 100 / 60) + 3000; } elseif($schedule->aircraft=='B737-200') { $result = 1600 * ($schedule->flighttime * 100 / 60) + 1500; } elseif($schedule->aircraft=='JS31') { $result = 234 * ($schedule->flighttime * 100 / 60) + 200; } elseif($schedule->aircraft=='DHC7') { $result = 330 * ($schedule->flighttime * 100 / 60) + 200; } } elseif($schedule->flighttime >= 1.01) { if($schedule->aircraft=='MD MD-11') { $result = 8400 * ($schedule->flighttime * 100 / 60) + 3000; } elseif($schedule->aircraft=='MD DC-10') { $result = 8000 * ($schedule->flighttime * 100 / 60) + 3500; } elseif($schedule->aircraft=='MD MD-11F') { $result = 8400 * ($schedule->flighttime * 100 / 60) + 3000; } elseif($schedule->aircraft=='E170') { $result = 1000 * ($schedule->flighttime * 100 / 60) + 900; } elseif($schedule->aircraft=='E190') { $result = 1200 * ($schedule->flighttime * 100 / 60) + 1000; } elseif($schedule->aircraft=='B737-800') { $result = 3300 * ($schedule->flighttime * 100 / 60) + 1200; } elseif($schedule->aircraft=='B737-400') { $result = 2900 * ($schedule->flighttime * 100 / 60) + 1500; } elseif($schedule->aircraft=='B747-200') { $result = 11364 * ($schedule->flighttime * 100 / 60) + 6000; } elseif($schedule->aircraft=='B747-200F') { $result = 11364 * ($schedule->flighttime * 100 / 60) + 6000; } elseif($schedule->aircraft=='B747-400F') { $result = 11364 * ($schedule->flighttime * 100 / 60) + 6000; } elseif($schedule->aircraft=='B727-200') { $result = 4512 * ($schedule->flighttime * 100 / 60) + 1000; } elseif($schedule->aircraft=='B747-400') { $result = 12582 * ($schedule->flighttime * 100 / 60) + 7000; } elseif($schedule->aircraft=='B703-200') { $result = 6690 * ($schedule->flighttime * 100 / 60) + 3000; } elseif($schedule->aircraft=='B737-200') { $result = 1600 * ($schedule->flighttime * 100 / 60) + 1500; } elseif($schedule->aircraft=='JS31') { $result = 234 * ($schedule->flighttime * 100 / 60) + 200; } elseif($schedule->aircraft=='DHC7') { $result = 330 * ($schedule->flighttime * 100 / 60) + 200; } } else { echo'invalid information provided'; } if($schedule->flighttime > 0) { echo round ($result,-2); echo ' kg - this includes fuel for taxi and reserves'; } ?> </td>
  5. again an update and the last for today in this script. this update automatically recognizes if your NAT is east or westbound and then shows only one map (e.g. east or westbound) <h3>Weather</h3> <div align="center"> <?php if (substr("$schedule->depicao", 0,1) == 'A') { echo '<b>Departure Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/auhisig12.gif" />'; } elseif(substr("$schedule->depicao",0,1) == 'B') { echo '<b>Departure Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/euwt30006.gif" />'; } elseif(substr("$schedule->depicao",0,1) == 'C') { echo '<b>Departure Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/cnhisig12.gif" />'; if($schedule->distance >= 3400.00) { echo '<br /><br /><b><u>NAT Eastbound</u></b><br /><img src="http://www.jetplan.com/weather/data/maps/ntfzsig12.gif" /><br /><br />'; } } elseif(substr("$schedule->depicao",0,1) == 'D') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'E') { echo '<b>Departure Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/euwt30006.gif" />'; if($schedule->distance >= 3400.00) { echo '<br /><br /><b><u>NAT Westbound</u></b><br /><img src="http://www.jetplan.com/weather/data/maps/ntfasig12.gif" /><br /><br />'; } } elseif(substr("$schedule->depicao",0,1) == 'F') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'G') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'H') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'I') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'J') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'K') { echo '<b>Departure Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/uswt30006.gif" />'; if($schedule->distance >= 3400.00) { echo '<br /><br /><b><u>NAT Eastbound</u></b><br /><img src="http://www.jetplan.com/weather/data/maps/ntfzsig12.gif" /><br /><br />'; } } elseif(substr("$schedule->depicao",0,1) == 'L') { echo '<b>Departure Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/euwt30006.gif" />'; if($schedule->distance >= 3400.00) { echo '<br /><br /><b><u>NAT Westbound</u></b><br /><img src="http://www.jetplan.com/weather/data/maps/ntfasig12.gif" /><br /><br />'; } } elseif(substr("$schedule->depicao",0,1) == 'M') { echo '<b>Departure Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/mxhisig12.gif" />'; if($schedule->distance >= 3400.00) { echo '<br /><br /><b><u>NAT Eastbound</u></b><br /><img src="http://www.jetplan.com/weather/data/maps/ntfzsig12.gif" /><br /><br />'; } } elseif(substr("$schedule->depicao",0,1) == 'N') { echo '<b>Departure Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/auhisig12.gif" />'; } elseif(substr("$schedule->depicao",0,1) == 'O') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; if($schedule->distance >= 3400.00) { echo '<br /><br /><b><u>NAT Westbound</u></b><br /><img src="http://www.jetplan.com/weather/data/maps/ntfasig12.gif" /><br /><br />'; } } elseif(substr("$schedule->depicao",0,1) == 'P') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; if($schedule->distance >= 3400.00) { echo '<br /><br /><b><u>NAT Eastbound</u></b><br /><img src="http://www.jetplan.com/weather/data/maps/ntfzsig12.gif" /><br /><br />'; } } elseif(substr("$schedule->depicao",0,1) == 'R') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'S') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'T') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'U') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'V') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'W') { echo '<b>Departure Airport</b><br /><br /><img src="http://www.jetplan.com/weather/data/maps/auhisig12.gif" /><br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'X') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'Y') { echo '<b>Departure Airport</b><br /><br /><img src="http://www.jetplan.com/weather/data/maps/auhisig12.gif" /><br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'Z') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } else { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } ?> <?php if (substr("$schedule->arricao", 0,1) == 'A') { echo '<br /><br /><br /><b>Arrival Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/auhisig12.gif" /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'B') { echo '<br /><br /><b>Arrival Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/euwt30012.gif" /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'C') { echo '<br /><br /><b>Arrival Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/cnhisig12.gif" /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'D') { echo '<br /><br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /> <br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'E') { echo '<br /><br /><b>Arrival Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/euwt30012.gif" /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'F') { echo '<br /><br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'G') { echo '<br /><br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'H') { echo '<br /><br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'I') { echo '<br /><br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'J') { echo '<br /><br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'K') { echo '<br /><br /><b>Arrival Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/uswt30024.gif" /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'L') { echo '<br /><br /><b>Arrival Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/euwt30012.gif" /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'M') { echo '<br /><br /><b>Arrival Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/mxhisig12.gif" /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'N') { echo '<br /><br /><b>Arrival Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/auhisig12.gif" /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'O') { echo '<br /><br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'P') { echo '<br /><br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'R') { echo '<br /><br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br />" /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'S') { echo '<br /><br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'T') { echo '<br /><br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'U') { echo '<br /><br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'V') { echo '<br /><br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'W') { echo '<br /><br /><b>Arrival Airport</b><br /><br /><img src="http://www.jetplan.com/weather/data/maps/auhisig12.gif" /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'X') { echo '<br /><br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'Y') { echo '<br /><br /><b>Arrival Airport</b><br /><br /><img src="http://www.jetplan.com/weather/data/maps/auhisig12.gif" /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'Z') { echo '<br /><br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } else { echo '<br /><br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } ?> </div>
  6. okay it works 8) replace the code with the weather maps in that schedule_briefing.tpl with the following codes /rmk: you can add/change the dedicated maps,.. i also dont have maps for asia and something included, because i didnt find some good ones.. This code will automatically show the weather map for departure and arrival airport(lets better say continent/country) on FL300. If the flight is longer than 3400nm, NAT maps are also included ! (Updated 12:20Z 29.10.09: Now the dep and arr maps are not the same. the dep map is a 6 hours forecast and arr is a 24 hours forecast but can be changed to 12 hours if required) <h3>Weather</h3> <div align="center"> <?php if (substr("$schedule->depicao", 0,1) == 'A') { echo '<b>Departure Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/auhisig12.gif" />'; } elseif(substr("$schedule->depicao",0,1) == 'B') { echo '<b>Departure Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/euwt30006.gif" />'; } elseif(substr("$schedule->depicao",0,1) == 'C') { echo '<b>Departure Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/cnhisig12.gif" />'; } elseif(substr("$schedule->depicao",0,1) == 'D') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'E') { echo '<b>Departure Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/euwt30006.gif" />'; } elseif(substr("$schedule->depicao",0,1) == 'F') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'G') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'H') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'I') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'J') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'K') { echo '<b>Departure Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/uswt30006.gif" />'; } elseif(substr("$schedule->depicao",0,1) == 'L') { echo '<b>Departure Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/euwt30006.gif" />'; } elseif(substr("$schedule->depicao",0,1) == 'M') { echo '<b>Departure Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/mxhisig12.gif" />'; } elseif(substr("$schedule->depicao",0,1) == 'N') { echo '<b>Departure Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/auhisig12.gif" />'; } elseif(substr("$schedule->depicao",0,1) == 'O') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'P') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'R') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'S') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'T') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'U') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'V') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'W') { echo '<b>Departure Airport</b><br /><br /><img src="http://www.jetplan.com/weather/data/maps/auhisig12.gif" /><br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'X') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'Y') { echo '<b>Departure Airport</b><br /><br /><img src="http://www.jetplan.com/weather/data/maps/auhisig12.gif" /><br /><br />'; } elseif(substr("$schedule->depicao",0,1) == 'Z') { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } else { echo '<b>Departure Airport</b><br /><br />no weather map available for departure airport<br /><br />'; } ?> <?php if($schedule->distance >= 3400.00) { echo '<br /><br /><b><u>NAT</u></b><br /><br /><b>Eastbound</b><br /><img src="http://www.jetplan.com/weather/data/maps/ntfasig12.gif" /><br /><br /><b>Westbound</b><br /><img src="http://www.jetplan.com/weather/data/maps/ntfzsig12.gif" /><br /><br />'; } ?> <?php if (substr("$schedule->arricao", 0,1) == 'A') { echo '<br /><b>Arrival Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/auhisig12.gif" /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'B') { echo '<br /><b>Arrival Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/euwt30012.gif" /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'C') { echo '<br /><b>Arrival Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/cnhisig12.gif" /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'D') { echo '<br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /> <br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'E') { echo '<br /><b>Arrival Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/euwt30012.gif" /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'F') { echo '<br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'G') { echo '<br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'H') { echo '<br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'I') { echo '<br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'J') { echo '<br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'K') { echo '<br /><b>Arrival Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/uswt30024.gif" /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'L') { echo '<br /><b>Arrival Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/euwt30012.gif" /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'M') { echo '<br /><b>Arrival Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/mxhisig12.gif" /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'N') { echo '<br /><b>Arrival Airport</b><br /> <br /><img src="http://www.jetplan.com/weather/data/maps/auhisig12.gif" /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'O') { echo '<br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'P') { echo '<br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'R') { echo '<br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br />" /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'S') { echo '<br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'T') { echo '<br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'U') { echo '<br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'V') { echo '<br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'W') { echo '<br /><b>Arrival Airport</b><br /><br /><img src="http://www.jetplan.com/weather/data/maps/auhisig12.gif" /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'X') { echo '<br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'Y') { echo '<br /><b>Arrival Airport</b><br /><br /><img src="http://www.jetplan.com/weather/data/maps/auhisig12.gif" /><br /><br /><br />'; } elseif(substr("$schedule->arricao",0,1) == 'Z') { echo '<br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } else { echo '<br /><b>Arrival Airport</b><br />no weather map available for arrival airport<br /><br /><br /><br />'; } ?> </div>
  7. Hi, ok this is what i want to do... we are on the pilot briefing page.. the departure icao is EDDT and the arrival doesnt matter for now. the weather map should now automatically show a map of europe instead of one from america or whatever. BUT if the icao is like KJFK, it should show a map of america of course. i started like that <?php if (substr('$schedule->depicao', 0,1) == 'E') { echo '<img src="map for e.g. europe" />'; } elseif(substr('$schedule->depicao',0,1) == 'K') { echo '<img src="map for e.g. north america" />'; } else { echo 'no map available'; } ?> but somehow it always shows "no map available".. what did i do wrong?
  8. did you add those lines to your mysql database?
  9. ok i made a lot of changes and will publish the new version tomorrow
  10. ah and btw, with this tutorial, you can make the screens then automated. http://www.redvodkajelly.com/blog/2007/10/15/how-to-create-pdf-preview-images-in-php/ hope it helps
  11. no i am using phpvms.. mostly for the internal area which is under "PAAintern" everything else is mostly custom code aaand a lot more but also there i took parts from phpvms.. take a look deeper into the systems
  12. thank you drop down menus for what or lets say.. where? in flash or in php? in what do you want to do with it? in php its only <select></select> and so on as far as i know
  13. :D:D i like that sentence
  14. www.panam-airways.com took me a long time to create everything like i want it but still not even 50% done.. even if it looks almost done
  15. it would be possible i think but that needs some adjustments to the database. otherwise you could also write it into the "notes" field. jantorre: well the problem is, that there is a picture of the ground charts. i just removed that. that makes it easier because i have more than 300 airports in my virtual airline and it would take a looong loong time until i make screens for every airport. so for me, there is only something like a "Download" button to the pdf charts on my server. i print those with a pdf printer from jeppview. thats all
  16. Ok got it to work, thanks a lot simpilot.. but BEFORE SOMEONE ADDS THIS, I would like to ask anyone who knows php very well to watch over that piece of code. I have that feeling that still something is wrong. There is still that "if statement" about less or more than one hour which is in my eyes now useless but i let it in the script because of my feeling that i did something wrong and i maybe will need it again Add those lines after any </tr> in your /core/templates/schedule_briefing.tpl ! After that, you have to customize it. In those lines here, I added the names of the aircrafts of my virtual airline. Not everybody has those aircrafts/has different names for those aircrafts or has other aircrafts. You can see those names in the admin panel from phpvms -> Airline Operations -> Add&Edit Fleet -> Name/Type !! this is very important. Then you have to google for the fuelflow of that aircraft. The formula goes like that: $result = fuelflow per/h * (flighttime * 100 / 60) + reserves and taxifuel <tr> <td colspan="2" style="padding: 6px;"> <?php if($schedule->flighttime <= 1.0) { if($schedule->aircraft=='MD MD-11') { $result = 8400 * ($schedule->flighttime * 100 / 60) + 3000; } elseif($schedule->aircraft=='MD DC10') { $result = 8000 * ($schedule->flighttime * 100 / 60) + 3500; } elseif($schedule->aircraft=='MD MD-11F') { $result = 8400 * ($schedule->flighttime * 100 / 60) + 3000; } elseif($schedule->aircraft=='E170') { $result = 1000 * ($schedule->flighttime * 100 / 60) + 900; } elseif($schedule->aircraft=='E190') { $result = 1200 * ($schedule->flighttime * 100 / 60) + 1000; } elseif($schedule->aircraft=='B737-800') { $result = 3300 * ($schedule->flighttime * 100 / 60) + 1200; } elseif($schedule->aircraft=='B737-400') { $result = 2900 * ($schedule->flighttime * 100 / 60) + 1500; } elseif($schedule->aircraft=='B747-200') { $result = 11364 * ($schedule->flighttime * 100 / 60) + 6000; } elseif($schedule->aircraft=='B727-200') { $result = 4512 * ($schedule->flighttime * 100 / 60) + 1000; } elseif($schedule->aircraft=='B747-400') { $result = 12582 * ($schedule->flighttime * 100 / 60) + 7000; } elseif($schedule->aircraft=='B703-200') { $result = 6690 * ($schedule->flighttime * 100 / 60) + 3000; } elseif($schedule->aircraft=='B737-200') { $result = 1600 * ($schedule->flighttime * 100 / 60) + 1500; } elseif($schedule->aircraft=='JS31') { $result = 234 * ($schedule->flighttime * 100 / 60) + 200; } elseif($schedule->aircraft=='DHC7') { $result = 330 * ($schedule->flighttime * 100 / 60) + 200; } } elseif($schedule->flighttime >= 1.01) { if($schedule->aircraft=='MD MD-11') { $result = 8400 * ($schedule->flighttime * 100 / 60) + 3000; } elseif($schedule->aircraft=='MD DC-10') { $result = 8000 * ($schedule->flighttime * 100 / 60) + 3500; } elseif($schedule->aircraft=='MD MD-11F') { $result = 8400 * ($schedule->flighttime * 100 / 60) + 3000; } elseif($schedule->aircraft=='E170') { $result = 1000 * ($schedule->flighttime * 100 / 60) + 900; } elseif($schedule->aircraft=='E190') { $result = 1200 * ($schedule->flighttime * 100 / 60) + 1000; } elseif($schedule->aircraft=='B737-800') { $result = 3300 * ($schedule->flighttime * 100 / 60) + 1200; } elseif($schedule->aircraft=='B737-400') { $result = 2900 * ($schedule->flighttime * 100 / 60) + 1500; } elseif($schedule->aircraft=='B747-200') { $result = 11364 * ($schedule->flighttime * 100 / 60) + 6000; } elseif($schedule->aircraft=='B727-200') { $result = 4512 * ($schedule->flighttime * 100 / 60) + 1000; } elseif($schedule->aircraft=='B747-400') { $result = 12582 * ($schedule->flighttime * 100 / 60) + 7000; } elseif($schedule->aircraft=='B703-200') { $result = 6690 * ($schedule->flighttime * 100 / 60) + 3000; } elseif($schedule->aircraft=='B737-200') { $result = 1600 * ($schedule->flighttime * 100 / 60) + 1500; } elseif($schedule->aircraft=='JS31') { $result = 234 * ($schedule->flighttime * 100 / 60) + 200; } elseif($schedule->aircraft=='DHC7') { $result = 330 * ($schedule->flighttime * 100 / 60) + 200; } } else { echo'invalid information provided'; } echo round ($result,-2); echo ' kg'; ?> </td> </tr>
  17. I try to integrate this into the pilot briefing page. My goal is, that the pilot can stay on that website to get all required informations about his flights. We want to make as much as possible for the pilots and this would be a nice information.. Not only for the financial situation ;D What do you think about replacing $schedules->aircraft with $aircraft->icao ? Maybe this works.. well i will just try it out but it will take some time for me to integrate it
  18. hahaha i had same idea today and also did it. just another way
  19. well i dont think this should be a problem (some database thing).. about the multiply thing.. i use it only if the hours are more than 1 or 1. otherwise i use / otherwise you get wrong values i think
  20. yea i think i know how to customize it or where to place it but not how to write it. my skills in developing are not very good. only in changing. actually, the following code is the first if-operation i have ever written. this is what i think how it maybe could look like. now i need someone who can tell me if this is correct <?php if($flighttime < 1.0) { if($schedule->aircraft = "MD11") { (4000 / $flighttime) + 3000 } else if("$schedule->aircraft" = "B737") { (2000 / $flighttime) + 1500 } else if("$schedule->aircraft" = "B747") { (4500 / $flighttime) + 5000 } else if($flighttime >= 1.0) { if($schedule->aircraft = "MD11") { (4000 * $flighttime) + 3000 } else if("$schedule->aircraft" = "B737") { (2000 * $flighttime) + 1500 } else if("$schedule->aircraft" = "B747") { (4500 * $flighttime) + 5000 } } echo $result ?>
  21. Is it possible to add automatic fuel calculations? Those do not have to be extremely accurate but can be used as a general value. So it goes like that.. if aircraft = MD11 -> Fuelflow x kg/h * hours flighttime + y% extra fuel = required fuel (which should then appear in the briefing) or something similar
  22. works for me, thanks a lot !
  23. it worked for me also but now it doesnt anymore or maybe it works again, i just dont want to try as i have more than 300 routes there My installation is about 2 month old. Well, maybe it was some mysql problem.. who knows. I will try to find out what it was
  24. well its not any version as i edited a lot of files to customize it as much as we require but i am pretty sure i didnt touch any of those files or codes which is needed to calculate some distance. what i can tell you is that this is based on the current stable version. i would like to always have the newest but then i have to alter my design every day again. i tried to "calculate route distance" for every of those flights in a row so always only a single flight and that did work
×
×
  • Create New...