-
Posts
1375 -
Joined
-
Last visited
-
Days Won
5
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by Parkho
-
HAHAHA, you know why?
-
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'; } ?>
-
That error is actually good, that means that the elseif is unexpected somewhere. He He, so I get to keep my hair.
-
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';
-
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.
-
right on, good night then
-
of course! you only need the code in one place
-
lol, okay all the same?
-
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);
-
Usually it happens when you hit the start flight before setting up your airplane fuel.
-
Okay then the tpl should go to admin/templates.
-
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);
-
Okay i know why Wait a bit I'll let you know
-
Nothing at all or maybe an empty email?
-
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); }
-
I can't get it to work Help!
-
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
-
info@bnfgallery.com
-
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
-
Yes, but you'll need to find the filePIREP() function and place it in there, right now you're in updatePIREP() function
-
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
-
PIREPS are being filed but not showing up [SOLVED]
Parkho replied to Curshad's topic in Support Forum
, There you go! -
PIREPS are being filed but not showing up [SOLVED]
Parkho replied to Curshad's topic in Support Forum
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. -
PIREPS are being filed but not showing up [SOLVED]
Parkho replied to Curshad's topic in Support Forum
Check your DB to see if the tables are still there.