Jump to content

ProAvia

Administrators
  • Posts

    1648
  • Joined

  • Last visited

  • Days Won

    72

Posts posted by ProAvia

  1. In .../core/common/ PilotData.class.php - look for public static function generate Signature around line 895. A few lines below that you will see the 3 entries you wish to change Total Flights, Total Hours Total Earnings.

    Back up your original file first, then change only those 3 items. You can then re-generate signatures in the admin panel.

  2. Thanks for the reply

    On the first error, I think it's showing when a guest attempts to access something in Profile. The times shown in the error log are times members don't appear to be on the site. Since I recently updated to 5.5.2, it may take a bit to single out the issue as a bunch of modules were updated at one time.

    For the second, the profile_stats.php file is called when you go to access 'My Stats' from the 'My Career' page. http://www.freedomair.us/phpvms

  3. I don't believe this 2 issues are related.......

    1. I show this error in the 'error_log' file
      1. PHP Warning:  call_user_func_array() expects parameter 1 to be a valid callback, class 'Profile' does not have a method 'phpvms' in /home/rocke2/public_html/freedomair/phpvms/core/classes/MainController.class.php on line 218
      2. I can't figure out how or why this is being called.
      3. What is this error actually telling me?
    2. I can't get any charts to display in the defaulit phpVMS 5.5.2 file '....\templates\profile_stats.php' - even if I put the file in my skins folder.

    Any help is much appreciated. Thanks!

    Contents of profile_stats.php

     

    <?php if(!defined('IN_PHPVMS') && IN_PHPVMS !== true) { die(); } ?>
    <h3>Your Stats</h3>

    <?php
    /*
     Added in 2.0!
    */
    $chart_width = '800';
    $chart_height = '250';

    /* Don't need to change anything below this here */
    ?>
    <div align="center" style="width: 100%;">
     <div align="center" id="months_data"></div>
    </div>
    <br />
    <div align="center" style="width: 100%;">
     <div align="center" id="aircraft_data"></div>
    </div>

    <script type="text/javascript" src="<?php echo fileurl('/lib/js/ofc/js/swfobject.js')?>"></script>
    <script type="text/javascript">
    swfobject.embedSWF("<?php echo fileurl('/lib/js/ofc/open-flash-chart.swf');?>",
     "months_data", "<?php echo $chart_width;?>", "<?php echo $chart_height;?>",
     "9.0.0", "expressInstall.swf",
     {"data-file":"<?php echo actionurl('/pilots/statsmonthsdata/'.$pilot->pilotid);?>"});
     
     
    <?php
    $chart_width = '800';
    $chart_height = '300';

    /* Don't need to change anything below this here */
    ?>
    swfobject.embedSWF("<?php echo fileurl('/lib/js/ofc/open-flash-chart.swf');?>",
     "aircraft_data", "<?php echo $chart_width;?>", "<?php echo $chart_height;?>",
     "9.0.0", "expressInstall.swf",
     {"data-file":"<?php echo actionurl('/pilots/statsaircraftdata/'.$pilot->pilotid);?>"});
    </script>

  4. To set up an event you do not NEED to have anything set up yet. But eventually you will need a departure airport, an arrival airport and at least one active schedule (with a flight number) so your pilots can fly the event on your scheduled date and time.

  5. That's exactly the same as my import.php. I'm still using Excel 2003 for my CSV. I know there are some differences in mine and newer versions.

    Open the CSV file you used for import in Notepad++ (instead of Excel) and see what's in the route column. Maybe that will give us an idea.

    Another option may be to open the CSV in Open Office (freeware) and see what the route column looks like.

  6. What version of Excel are you using? When you saved the CSV, did you save as CSV (Comma delimited), CSV (MS-DOS) or another format? Also, when saving the CSV, be sure to select Yes if asked if you want to keep the workbook in this format (To keep this format, which leaves out any incompatible features, click Yes.).

    I seem to remember saving as one of those and had an issue with the import (not the ??? in the route field though). If you saved in one, try another to see if that solves the issue.

    Are you using the stock Import.php file in admin/modules/Import or an edited one? Maybe post the entire public function processimport () section for review here. I believe in version 5.5.2 it starts on line 314.

  7. 53 minutes ago, Aedwards521 said:

    $basictime = $distance / $cruisespeed;

    I don't have this module, so I don't know the exact names of any added database tables. In your database (in "schedules" or another table added by this module), are there any "cruisespeed" entries that equal zero? If so, you probably need to enter a cruise speed > 0.

    Also not exactly sure, but shouldn't phpVMS be installed in .../public_html/{VA_name_here}/phpvms instead of /home/flymyva/public_html ??

  8. Ok, good, you're using 5.5.2

    Do the PirepAutoAccept files in the template folder end in tpl or php? I'm betting tpl. In any case, change the file extension for all files in the template folder to php. Then, in the PirepAutoAccept.php file in the modules folder, find and replace any file reference of tpl to php and save the file.

    Let us know if that fixes the issue for you.

  9. Which version of phpVMS are you using - 2.1.x or 5.5.2? Listed the version number is much more helpful than saying it's the latest version.

    From the image it looks like you are using the PIREP Auto Accept module. If so, are you using version 1 or version 2 of this module? In admin/templates/PirepAutoAccept do the file names end in tpl or php?

    You may want to have a look through this post: 

     

  10. 2 hours ago, elmoussati said:

    Yes, ofc it will not, because the source website is down, check that link page with errors http://api.vacentral.net/index.php/airport/get/OERK
     

    If you scroll to the bottom of the page, after the error boxes, you should see:

    ({"totalResultsCount":1,"airports":[{"icao":"OERK","name":"King Khaled International Airport","countryName":"Saudi Arabia","lat":"24.9576","lng":"46.6988","lowlead":"0","jeta":"0"}]})

  11. 20 hours ago, OMGEDSON said:

    I do, but would prefer to PM it since it's not yet launched. I don't feel like its ready to release to the community yet, which leads me here.

    This forum isn't the VA community at large - which is what I believe you are meaning. This forum is for those developing/tweaking their phpVMS setups.

    While divulging your site's URL isn't a requirement - it may help others to assist you in your goals. In any case, you will need to add airports and aircraft to your database, along with schedules/routes. After that, you can use the payware modules you mentioned.

    As a heads up... Please do not post code from payware modules or ask here for specific help with them - mostly better to ask at the payware developers site. I think you may be able to get general questions answered about them here - or via PM from someone who owns the same module.

    Hopefully, others will be along to give you additional suggestions. :)

  12. Hey Ray

    In looking briefly at his site, it seems that the large black 'Staff Application' is his page title and the smaller blue 'Staff Application.' is a link. Note the period after the blue one - not that I know why the period is there. Could what he's seeing be due to the skin used???

    I noticed the title and link after viewing a few of the pages on his site that can be accessed without logging in.

  13. I think I may have figured it out.

    Attached is my current PIREPData.class.php file and the original file as supplied with phpVMS 5.5.2 (PIREPData.class.php.ORIG) for your reference. All line references are to my current file.

    1. updateFlightReport - starts line 805, see lines 829-834
      1. formats $flighttime_stamp and $pirepdata['flighttime'] correctly - regardless if initial flighttime contains a period or colon. In a manual PIREP submittal, the hours and minutes can be separated by a colon, a period, no separator, etc. - based on user input.
      2. used your initial edit (maybe on page one of this thread)
        1. commented out $pilot = PilotData::getPilotData($data['pilotid']); - as I don't think it's needed. And, if I edit a PIREP after a pilot's rank/pay changes, I don't know whether this line would change the pilotpay to the new rate.
        2. change 'explode' and calculate lines from $flighttime to $peices. I had changed this earlier in my latest testing to see if it changed anything, which it did not. But left it as $peices anyway.
      3. changed $pilot->payrate to $data['pilotpay'] to reflect $data array. Just a lucky guess, as I was trying all kinds other stuff here too.
    2. getPIREPRevenue - starts line 1040, see lines 1051-1063
      1. uses $data array and $payment_type - so I tried using $data['flighttime'] and $data['pilotpay'] for the pay calculation. This was after many failed attempts using other parameters - which resulted in the pay being passed as 0 to the $revenue calculation on line 1069 (I think).
    3. calculatePIREPayment - starts line 1260
      1. calculates $amount and passed to pireps table
      2. left this as original - as it seems to pass the correct data to the ledger table.
    4. A few things I changed/added for my specific operation
      1. changed .tpl to .php - lines 349, 360, 374, 383 - in the FSFlightKeeper section.
      2. added line 633 to display route string in upper case.
      3. changed/added 'Send an email to the admin...' after line 758 for my specific needs. I believe both options can be active at one time, but I want Admins to actually review PIREPs instead of just clicking to approve - at least for now.
      4. added notes so I remember what stuff does and what I did.

    In testing, both manual and ACARS PIREPs have been submitted. PIREPs have been viewed, edited, saved and accepted via the admin panel - in various combinations. After a PIREP has been accepted, it's been edited to change the Pilot Pay, saved and/or (re-)accepted. I think I've tried all possible combinations. The revenue and pilotpay appears to compute correctly. The correct $ amount now shows in the pireps table (after save and/or accept).

    ____________________

    PayChecker

    1. Final Revenue (per PIREP Pilotpay) is showing $revenue based on $pirep->pilotpay. The $pirep->pilotpay is the hourly pay (or per schedule pay) from the pireps table, not the actual pay based on $pirep->pilotpay times the flight time (in hours and minutes, not tenths). That section can probably be deleted.
      1. admin/templates/view_pilot_pireps.php - lines 73 and 74.
      2. admin/modules/PayChecker.php - lines 264-286.
    2. Everything else in the PayChecker works as advertised - and was a GREAT help in getting the end result we were after.

    ____________________

    I think I figured out the FUEL_DEFAULT_PRICE and FUEL_SURCHARGE stuff too - but will leave that for another time.

    Disclaimer: I really don't have a good handle on php - but I'm learning slowly. A lot of what I tried on my own was trial and error - along with many hours of staring at the computer screen looking for that "something" that would stand out and editing stuff, not knowing what the results would be. Glad I have a working live site and a test site to mess with.

    After 60+ posts and a LOT of confusion on my part, I believe it's finally working as it should. If you have the time, please check my work to see if you are getting the same results. After I hear back from you, I'll mark the thread as SOLVED - as least I hope I will.

    If all this pans out, maybe it will help with the version 3 development too.

    Thank you once again for all your time and effort! I really do appreciate all the advice and hand-holding!

     

    PIREPData.class.php.ORIG

    PIREPData.class.php

×
×
  • Create New...