Jump to content

Parkho

Moderators
  • Posts

    1381
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Parkho

  1. yw
  2. That's because of the aircraft id. It happens if the aircraft id is not the same as the pirep's aircraft and it could be the same situation if the schedule's aircraft is changed or deleted but that does not affect the PIREPS and Pilot's hours and number of flights.
  3. Open pireps_list.tpl in admin/templates and look for the following button: <?php # If there was an error, don't allow the PIREP to go through if($error == false) { ?> <button href="<?php echo SITE_URL?>/admin/action.php/pirepadmin/<?php echo $load; ?>?pilotid=<?php echo $pirep->pilotid?>" action="approvepirep" id="<?php echo $pirep->pirepid;?>" class="pirepaction {button:{icons:{primary:'ui-icon-check'}}}">Accept</button> <?php } ?> Now you need to add an if statement to it like this: <?php # If there was an error, don't allow the PIREP to go through if($error == false) { if($pirep->pilotid != Auth::$userinfo->pilotid) { ?> <button href="<?php echo SITE_URL?>/admin/action.php/pirepadmin/<?php echo $load; ?>?pilotid=<?php echo $pirep->pilotid?>" action="approvepirep" id="<?php echo $pirep->pirepid;?>" class="pirepaction {button:{icons:{primary:'ui-icon-check'}}}">Accept</button> <?php } } ?> This will remove the "accept" button if the pirep belongs to the staff.
  4. True.
  5. I think you can change the units frm kg to lbs in local config.php at the following line but I never tried it myself: Config::Set('LiquidUnit', '2'); # 0=liter 1=gal 2=kg 3=lbs
  6. yw. Glad it helped. Please mark your post as solved.
  7. you will need to remove the check box at the bottom of your created page where it says "Enabled?" and check the one that says "Public?" in admin center pages. Now I think you have the page published and in navigation.tpl you can link to it using drop down.
  8. Yw. Did it work for you?
  9. Like this: This is the code I use in schedule_results.tpl : <table> <tr> <th align="center" bgcolor="black"><font color="white">Flight Map</font></th> </tr> <tr> <td width="100%"> <?php $string = ""; $string = $string.$route->depicao.'+-+'.$route->arricao.',+'; ?> <img width="100%" src="http://www.gcmap.com/map?P=<?php echo $string ?>&MS=bm&MR=240&MX=680x200&PM=pemr:diamond7:red%2b%22%25I%22:red&PC=%230000ff" /> </td> </tr> </table>
  10. gr8
  11. how many aircraft do you have in your fleet? The default reports_aircraft.tpl, was it showing before replacement?
  12. Did you replace the tpl with the one you had in admin/templates?
  13. is two a page or a variable?
  14. Where did you put the file I provided?
  15. Are you using the default reports_aircraft.tpl?
  16. Josh90, To test the beta version of aircraft maintenance, go to my website at www.parkho.ir/Module Test/Login using the provided info and click on "Try out center - admin" click on "Add Ons" and then hit "Aircraft Manager". This will give you an idea of how it works but I'm still working on the part that when the aircraft goes for maintenance for x amount of time, disable the aircraft and the schedule until x is over and then enable the aircraft and schedule. Right now it all can be done manually but I want this to be done automatically. GrizzW, Yes it can be viable add on but certainly not a free one.
  17. yw
  18. Change this: $acstats = AircraftUsage::aircrafts(); foreach($acstats as $stat)----- this is line 4 { To this: $stats = AircraftUsage::aircrafts(); foreach($stats as $stat)----- this is line 4 {
  19. Sorry! Add the following to the reports_aircraft.tpl right after "<?php" : $acstats = AircraftUsage::aircrafts();
  20. Why not asking Simpilot for it?
  21. Mine's adding all the hours correctly unless the submitted PIREP has empty field in flight hour.
  22. This one is in PilotData.class.php: public static function changePilotRank($pilotid, $rankid) { $rank = RanksData::getRankInfo($rankid); if (!($rank_level = RanksData::getRankLevel($rankid))) { return false; } return self::updateProfile($pilotid, array( 'rankid' => $rank->rankid, 'rank' => $rank->rank, 'ranklevel' => $rank_level )); } And this is in RanksData.class.php: public static function calculatePilotRanks() { /* Don't calculate a pilot's rank if this is set */ if (Config::Get('RANKS_AUTOCALCULATE') === false) { return; } $ranks_list = self::getAllRanks(); $pilots = PilotData::getAllPilots(); if (count($pilots) == 0 || !is_array($pilots)) { return; } foreach ($pilots as $pilot) { self::calculateUpdatePilotRank($pilot->pilotid, $ranks_list); } } Hope these help.
  23. I'm not sure if that's helping but change "true" to "false" in the following line and see if it makes any differences: Config::Set('SIGNATURE_USE_CUSTOM_FONT', true); Not Tested though, so don't know.
×
×
  • Create New...