Jump to content

Convert to php variable - acarsmap.php


Recommended Posts

Posted

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

Posted

PHPVMS 5.5.2.72 is a modified version made by @ProAvia 

What exactly do you want to do? The variable you listed should work as it is by default there. If there is nothing in the function calling to that column in the db table then it won't work.

Posted
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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...