Jump to content
TennShadow

Adding Pilot Hub to PIREP Submit Emails

Recommended Posts

I'm wanting to add the Pilot Hub of the Pilot to the email that staff get when a pilot submits a PIREP.  I have located the email code in PIREPData.class.php but I'm not sure how to get the hub info to show up.  I've tried several different things but my lack of PHP and database knowledge is definitely showing here.  :-)  Any help would be appreciated.

 

# Send an email to the admin that a PIREP was submitted
            $sub = "A PIREP has been submitted by - {$pilotcode} ({$pirepdata['depicao']} - {$pirepdata['arricao']})";
            $message = "A PIREP has been submitted by {$pilotcode} "
                ."({$pilotinfo->firstname} {$pilotinfo->lastname})\n\n"
                ."{$pirepdata['code']}{$pirepdata['flightnum']}: {$pirepdata['depicao']} to {$pirepdata['arricao']}\n"
                ."Aircraft: {$pirepdata['aircraft']}\n" . "Flight Time: {$pirepdata['flighttime']}\n"
                ."Landing Rate: {$pirepdata['landingrate']}\n"."Filed using: {$pirepdata['source']}\n\n" 
                ."Comment: {$comment}\n\n";

 

Share this post


Link to post
Share on other sites
1 minute ago, servetas said:

Have you tried $pilot->hub?

It looks like it might actually be $pilotinfo->hub ;)

# Send an email to the admin that a PIREP was submitted
            $sub = "A PIREP has been submitted by - {$pilotcode} ({$pirepdata['depicao']} - {$pirepdata['arricao']})";
            $message = "A PIREP has been submitted by {$pilotcode} "
                ."({$pilotinfo->firstname} {$pilotinfo->lastname})\n\n"
                ."{$pirepdata['code']}{$pirepdata['flightnum']}: {$pirepdata['depicao']} to {$pirepdata['arricao']}\n"
                ."Aircraft: {$pirepdata['aircraft']}\n" . "Flight Time: {$pirepdata['flighttime']}\n"
                ."Landing Rate: {$pirepdata['landingrate']}\n"."Filed using: {$pirepdata['source']}\n\n" 
                ."Comment: {$comment}\n\n"
                ."Pilot's Hub: {$pilotinfo->hub}\n\n";

 

Share this post


Link to post
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...