Jump to content

Parkho

Moderators
  • Posts

    1375
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Parkho

  1. 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'; } ?>
  2. That error is actually good, that means that the elseif is unexpected somewhere. He He, so I get to keep my hair.
  3. 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';
  4. 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.
  5. of course! you only need the code in one place
  6. 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);
  7. Usually it happens when you hit the start flight before setting up your airplane fuel.
  8. Okay then the tpl should go to admin/templates.
  9. 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);
  10. Okay i know why Wait a bit I'll let you know
  11. Nothing at all or maybe an empty email?
  12. 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); }
  13. 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
  14. You also need to change what's in your .tpl to the following: 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
  15. Yes, but you'll need to find the filePIREP() function and place it in there, right now you're in updatePIREP() function
  16. I have something that sends an email of the submitted PIREP to the pilot. Maybe you can change its code to send the email when PIREP is accepted. It's actually pretty easy to do. Here, try this but I haven't tested it: # 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); $pireps = self::getLastReports($pilotinfo->pilotid, 1); if($pireps->accepted == "1") { Util::SendEmail($email, $sub, $message); } Now you need to make a file named "email_pirep_accep.tpl" and write in there whatever you want to tell your pilots about their PIREP and you need to add this to your PIREPData.class.php inside the function filePIREP() around line 800. Mine is at line 842 Let me know if it works or not Salamaty
  17. Did you see pilot information like the hours and total money before the crash? Several things might have happened, maybe a Virus from your side was trying to get into their server and they blocked and suspended the whole account or a Hacker might have gotten in and did things to mess it up. It happened to me like a year ago and I had to redo almost everything but I had the back up of pilot's data, so hopefully your case is not this.
  18. Check your DB to see if the tables are still there.
×
×
  • Create New...