Jump to content

How to format the PIREP=>LOG Field


Rogerox

Recommended Posts

Hi,

I am programming my own ACARS and everything is going fine, but I cannot use the correct format for displaying the LOG field, on PIREP, same way kACARS does.

I would like the LOG on PIREP to display this way:

[00:00] bla bla bla

[00:01] bla bla ...

[00:02] bla...

...

Can you please help me?

Thank you!

Regards,

Roger

Link to comment
Share on other sites

Not sure what you mean, on the phpVMS side? You have to write an ACARS module and however you pass a detailed log to it you have to store that

Yes. I´ve already made my ACARS and I am passing the data. For example DATA1=one|two|three|four

I want to make the $log_str = $_GET['DATA1'] directed to $PIREP = array ( ..., ... 'log'=> $log_str, ... )

Formatted using that:

$log_str = str_replace('|', ' ', $log_str);

$log_str = wordwrap($log_str, 25, "\n");

The problem is that when I process the PIREP array (using ACARSData::FilePIREP($pilotid, $PIREP) ), looking on the ...pirepadmin/viewpending the LOG field looks like this

one two three four

and I want it displayed as:

one

two

three

four

That´s what I really need :)

Appreciate any light on that.

Thanks

Link to comment
Share on other sites

Found a solution!

I was using "\n" and 25 as a limit on the wordwrap()

Now I am using str_replace with two changes '|' for '<br />' and '~' for ' '

Thanks anyway!

I´m not good on PHP code, that´s why I´m having this kind of problems. :P

Thanks again for your time!

Regards,

Roger

Link to comment
Share on other sites

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