Jump to content

Parkho

Moderators
  • Posts

    1381
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Parkho

  1. change it to "::"
  2. Something like this: <?php if($pirep->accepted == PIREP_ACCEPTED) { $pilotid = Auth::$userinfo->pilotid; $rep = PIREPData::getLastReports($pilotid, 1); $pilotfirstname = Auth::$userinfo->firstname; $pilotlastname= Auth::$userinfo->lastname; $email = Auth::$userinfo->email; $code = $rep->code; $flightnum = $rep->flightnum; Template::Set('pilotinfo', Auth::$userinfo); Template::Set('flight', $pirep); $sub = 'Flight Report for: '.$code.''.$flightnum; $message = Template::Get('email_pirep_accep.tpl', true); echo 'Accepted'; ?> <input type="button" onclick="<?php echo Util::SendEmail($email, $sub, $message);?>" value="Send Email"> <?php } elseif($pirep->accepted == PIREP_REJECTED) { echo 'Rejected'; } elseif($pirep->accepted == PIREP_PENDING) { echo 'Approval Pending'; } ?>
  3. Okay, that's good news. Now, we can add a button right next to the "Accept" status to send the the email manually once it's accepted.
  4. Getting there, re load the page and you might get something.
  5. <?php if(Auth::$userinfo->Rank == " FirstOfficer") { ?> <li><a href="<?php echo url('pages/discounts'); ?>">Discounts</a></li> <?php } ?>
  6. Change this: Util::SendEmail($email, $sub, $message); To this: echo Util::SendEmail($email, $sub, $message) ;
  7. HAHAHA, you know why?
  8. here, replace with this: <?php if($pirep->accepted == PIREP_ACCEPTED) { $pilotfirstname = Auth::$userinfo->firstname; $pilotlastname= Auth::$userinfo->lastname; $email = Auth::$userinfo->email; $code = $pirep->code; $flightnum = $pirep->flightnum; Template::Set('pilotinfo', Auth::$userinfo); Template::Set('flight', $pirep); $sub = 'Flight Report for: '.$code.''.$flightnum; $message = Template::Get('email_pirep_accep.tpl', true); Util::SendEmail($email, $sub, $message); echo 'Accepted'; } elseif($pirep->accepted == PIREP_REJECTED) { echo 'Rejected'; } elseif($pirep->accepted == PIREP_PENDING) { echo 'Approval Pending'; } ?>
  9. That error is actually good, that means that the elseif is unexpected somewhere. He He, so I get to keep my hair.
  10. Okay. Open admin/templates/pirep_list.tpl go down around line 60 and find "Current Status". Now there is an if statement that says "If($pirep->accepted == PIREP_ACCEPTED)" open a bracket like "{" and paste the following after that and close the bracket like "}" then try and send a PIREP. I swear if it doesn't work I'm gonna pull my hair. $pilotfirstname = Auth::$userinfo->firstname; $pilotlastname= Auth::$userinfo->lastname; $email = Auth::$userinfo->email; $code = $pirep->code; $flightnum = $pirep->flightnum; Template::Set('pilotinfo', Auth::$userinfo); Template::Set('flight', $pirep); $sub = 'Flight Report for: '.$code.''.$flightnum; $message = Template::Get('email_pirep_accep.tpl', true); Util::SendEmail($email, $sub, $message); echo 'Accepted';
  11. It's because the PIREP has not been accepted, so it sends out the email once it gets null value. Let me work on it to see how we can do this and let you know.
  12. right on, good night then
  13. of course! you only need the code in one place
  14. lol, okay all the same?
  15. okay.
  16. Okay here is my last shot : # Send an email to the pilot who submitted that PIREP //PILOT INFO $pilotfirstname = Auth::$userinfo->firstname; $pilotlastname= Auth::$userinfo->lastname; $email = Auth::$userinfo->email; //PIREP INFO (This all goes into the email, we will need to add those into the TPL $code = $pirep_details->code; $flightnum = $pirep_details->flightnum; Template::Set('pilotinfo', Auth::$userinfo); Template::Set('flight', $pirep_details); $sub = 'Flight Report for: '.$code.''.$flightnum; $message = Template::Get('email_pirep_accep.tpl', true); Util::SendEmail($email, $sub, $message);
  17. Usually it happens when you hit the start flight before setting up your airplane fuel.
  18. Okay then the tpl should go to admin/templates.
  19. Okay, open admin/module/PIREPAdmin and paste the following in the approve_pirep_post() function at the very end. I think it should go through: # Send an email to the pilot who submitted that PIREP //PILOT INFO $pilotfirstname = $pilotinfo->firstname; $pilotlastname= $pilotinfo->lastname; $email = $pilotinfo->email; //PIREP INFO (This all goes into the email, we will need to add those into the TPL $code = $pirepdata['code']; $flightnum = $pirepdata['flightnum']; Template::Set('pilotinfo', $pilotinfo); Template::Set('flight', $pirepdata); $sub = 'Flight Report for: '.$code.''.$flightnum; $message = Template::Get('email_pirep_accep.tpl', true); Util::SendEmail($email, $sub, $message);
  20. Okay i know why Wait a bit I'll let you know
  21. Nothing at all or maybe an empty email?
  22. Okay try this: # Send an email to the pilot who submitted that PIREP //PILOT INFO $pilotfirstname = $pilotinfo->firstname; $pilotlastname= $pilotinfo->lastname; $email = $pilotinfo->email; //PIREP INFO (This all goes into the email, we will need to add those into the TPL $code = $pirepdata['code']; $flightnum = $pirepdata['flightnum']; Template::Set('pilotinfo', $pilotinfo); Template::Set('flight', $pirepdata); $sub = 'Flight Report for: '.$code.''.$flightnum; $message = Template::Get('email_pirep_accep.tpl', true); if($pirepdata['accepted'] == "1") { Util::SendEmail($email, $sub, $message); }
  23. I can't get it to work Help!
  24. Don't forget to change this: Dear <?php echo $pilotinfo->firstname. ' ' .$pilotinfo->lastname?>, Your pirep has been accepted. To view it, visit: <?php echo SITE_URL;?>/index.php/pireps/view/<?php echo $pirepdata->pirepid;?> Thanks! The <?php echo SITE_NAME;?> Team
  25. info@bnfgallery.com
×
×
  • Create New...