Jump to content

AlexOlPed

Members
  • Posts

    16
  • Joined

  • Last visited

Posts posted by AlexOlPed

  1. Hi,

    I open this thread to ask two questions:

    1.- How can I see the amount of memory PHPVms is using? to monitor resources.

    2.- I have doubts in the phpvms_sessions table, it seems that the sessions of that table are not eliminated and I have more than 4000 records. Many of these registers put Pilotid = 0, which also makes me wonder who is the pilotid = 0 ... (Could it be SmartCARS?). I would need to have your opinion to optimize this section of sessions and that they do not accumulate so much, because I think I do not have it well optimized. in the App.config I have this set:

    # Cookie information
    Config :: Set ('SESSION_LOGIN_TIME', (60 * 60 * 24 * 30)); # Expire after 30 days, in seconds
    Config :: Set ('SESSION_GUEST_EXPIRE', '30'); # Clear guest sessions 30 minutes

    I am using: Version Phpvms 5.5.2.72 simpilot / php7.2

  2. 7 minutes ago, Strider said:

    Look for:

    
      // If they selected autozoom, only do the zoom first time
            if (opts.autozoom == true && run_once == false) {
                map.fitBounds(bounds);
                run_once = true;
            }

     

    Comment it out. That should stop the zoom when you click on a flight. Do not remove it, so if it doesn't work or it breaks something you can just uncomment it and it will work again.

    I have commented on what you tell me in the acarsmap.js file but it keeps zooming when I click on a flight that is live.

  3. Someone know how I can do so that on the Leaflet map, where the flights that are live appear to me, when I click on one of them, the map zooms, I would like it not to zoom when I click on one of the flights of the Map. Someone know how to I can do?

     

    Skin: StislaSkin

    phpVMS 5.5.2.72 simpilot/php7.2

     

  4. On 9/12/2020 at 1:34 AM, web541 said:

    You should be able to modify this function in PHP:

    https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/modules/ACARS/ACARS.php#L60

     

    which is read here:

    https://github.com/DavidJClark/phpvms_5.5.x/blob/master/lib/js/acarsmap.js#L65

     

    and it should allow you to use the templating tags.

    Thank you very much, it is just what I was looking for. once again thanks for the contribution.

  5. In the acarsmap.php file a text appears as we can use a series of variables to put in the HTML, ok. But I would like from acarsmap.php to call a function that I have in php but passing one of those variables to it, I don't see the way to do it. Can anybody help me?

    I thought that maybe I could do it if I manage to convert <%=flight.pilotid%> it to a php $ variable, then I pass that variable in the function and that's it, but I don't know how to convert it.

     

        Variable:                            
        <%=flight.pilotid%>

     

    I'm usign 5.5.2.72 simpilot/php7.2

  6. 1 hour ago, Ither said:

     

    Yep; few posts up I posted about this -- he calls a function that is missing from phpvms (dunno why) but I re-added it and then his module worked fine. Here is the function you need to add back to that class file.

     

    
    /**
    	 * Update a pilot's pay. Pass the pilot ID, and the number of
    	 * hours they are being paid for
    	 *
    	 * @param int $pilotid The pilot ID
    	 * @param int $flighthours Number of hours to pay the pilot for
    	 * @return bool Success
    	 *
    	 */
    	public static function updatePilotPay($pilotid, $flighthours)
    	{
    		$sql = 'SELECT payrate
    					FROM '.TABLE_PREFIX.'ranks r, '.TABLE_PREFIX.'pilots p
    					WHERE p.rank=r.rank
    						AND p.pilotid='.$pilotid;
    
    		$payrate = DB::get_row($sql);
    
    		$payupdate = self::getPilotPay($flighthours, $payrate->payrate);
    
    		$sql = 'UPDATE '.TABLE_PREFIX.'pilots
    					SET totalpay=totalpay+'.$payupdate.'
    					WHERE pilotid='.$pilotid;
    
    		DB::query($sql);
    
    		if(DB::errno() != 0)
    			return false;
    
    		return true;
    	}

     

    oooh, I'm going to try it, I'll tell you how it went shortly. Thank you very much.

  7. 6 hours ago, Ither said:

     

    Can you check your PilotData.class.php and search for "public static function updatePilotPay"

     

    See if that exists?

    No, in my file PilotData.class.php not exists the function updatePilotPay.

     

    It's for this reason the problem?

  8. 44 minutes ago, Strider said:

    The only version of phpvms that will install without errors into php v7.3 is phpvms v7 which is only in beta testing right now. Make sure you have the settings correctly setup in the admin panel. You need to set the criteria to accept pireps, if it doesn't find or they are not setup it won't work.

    What criteria do I have to add in the list to accept the pireps?

  9. 18 hours ago, ProAvia said:

    phpVMS 5.5.2 or 5.5.2.72 ??

     

    PHP 7.3 may be an issue. phpVMS 5.5.2.72 will install in PHP 7.0-7.2 . It shows errors with PHP 7.3 and above. I am not even sure that phpVMS 5.5.2 will easily install in PHP 7.0 and above.

    MariaDB 10.3 and above also cause issues with phpVMS 5.5.2 and 5.5.2.72

     

    Is this a new install or an existing install? If existing, what was the old PHP version?

    I have this version: PhpVMS 5.5.2.72 simpilot/php7.2

     

    I need this version because it's the version that is compatible with SmartCARS. My intention is that when version phpvms 7 is compatible with SmartCARS, then I would either migrate to that new version or make a new environment.

  10. 16 minutes ago, Ither said:

    Can you post your pirepdata.class file?

     

    I recall when I integrated his (I use custom one now) way back at start the pirepdata file had the function in wrong spot so I ended up with pending pireps. 
     

    I can look at it and reference my backups from last year. 

     

    I attach the pirepdata.class

    PIREPData.class.php.zip

  11. 16 hours ago, Strider said:

    Sounds like you have not set it up correctly. If a module is setup correctly, it works, if it is not working then there is something amiss. Is the an admin sidie with settings? Do you have to edit the local.config file to add some lines to it? You have to make sure they are all in if so and you haven't missed anything. Have you added the criteria?

     

    Well, I have carried out all the steps correctly as indicated by the readme, and it does not throw any error and I see everything correctly, but I cannot get it to do the autoaccept.

     

    I attach the image

    Screenshot 2020-07-25_18-41-32-699.png.zip

  12. Hi!

    I have installed the module, configured everything correctly, it does not generate any error, unless I see it, and when I finish the flight and report with SmartCars, the PIREP remains as pending, it does not auto-accept.

    I don't know what may be failing. Can someone help me?

×
×
  • Create New...