-
Posts
1375 -
Joined
-
Last visited
-
Days Won
5
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by Parkho
-
FlightBookingSystem_V2.0 (Removed from Github due to some issues)
Parkho replied to Parkho's topic in Parkho's Addons
Thanks for your respond. The module is now Available for download at Github. Enjoy. -
How to Show Airline Logo on Flight Stats? [SOLVED]
Parkho replied to SkilledPilotA320's topic in Support Forum
Your code should be fine and view the images but you may want to try changing "fileurl" to "SITE_URL" and see if it does make any differences. Also, make sure that you're directing to the correct path of the image. -
Replace the entire code in frontpage_recentbids.tpl with the following: <?php if(!$lastbids) { echo 'No bids have been made'; return; } foreach($lastbids as $lastbid); { ?> <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0"> <tr> <td>Flight #</td> <td>Pilot</td> <td>Departure</td> <td>Arrival</td> <td>Aircraft</td> </tr> <tr> <td><?php echo $lastbid->code.$lastbid->flightnum ;?></td> <td> <?php $pilotid = $lastbid->pilotid; $pilot = PilotData::getPilotData($pilotid); echo $pilot->firstname.' '.$pilot->lastname ;?> </td> <td><?php echo $lastbid->depicao ;?></td> <td><?php echo $lastbid->arricao ;?></td> <td><?php echo $lastbid->aircraft ;?></td> </tr> </table> <?php } ?>
-
I would do this in the following order. First, place this in your front page: <?php MainController::Run('FrontBids', 'RecentFrontPage', 10); ?> Secondly, go to frontpage_recentbids.tpl and put what you want to show there. Below is the default code in there: <?php if(!$lastbids) { echo 'No bids have been made'; return; } foreach($lastbids as $lastbid); { ?> <style type="text/css"> <!-- .style2 { font-family: Arial; font-size: 10px; } --> </style> <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0"> <tr> <td><p class="style2"><?php echo $lastbid->bidid . ' - ' . $lastbid->code.$lastbid->flightnum.' - '.$lastbid->depicao.' to '.$lastbid->arricao?></a> </p> <?php } ?></p></td> </tr> </table> Remember you can put any number instead of 10 in the first code and that's the number of rows it will return.
-
You have to create the module folder exactly the same as it was provided.( ex. core/modules/Fuelcalculator).
-
right on
-
airport_search.tpl and below is the code you're looking for: <tr> <td>Select An Aircraft Type</td> <td> <select class="search" name="aircraft"> <option value="">All</option> <?php foreach ($aircrafts as $aircraft) {echo '<option value="'.$aircraft->icao.'">'.$aircraft->icao.'</option>';} ?> </select> </td> </tr>
-
Anytime man, I'm happy . I just realized that when a pirep gets rejected an email is sent to the pilot, so I went to the reject function, pulled the code, and placed in the accept function and Bingo.
-
Nope. Here like this: protected function approve_pirep_post() { $pirepid = $this->post->id; if($pirepid == '') return; $pirep_details = PIREPData::GetReportDetails($pirepid); # See if it's already been accepted if(intval($pirep_details->accepted) == PIREP_ACCEPTED) return; # Update pilot stats SchedulesData::IncrementFlownCount($pirep_details->code, $pirep_details->flightnum); PIREPData::ChangePIREPStatus($pirepid, PIREP_ACCEPTED); // 1 is accepted PilotData::UpdateFlightData($pirep_details->pilotid, $pirep_details->flighttime, 1); PilotData::UpdatePilotPay($pirep_details->pilotid, $pirep_details->flighttime); RanksData::CalculateUpdatePilotRank($pirep_details->pilotid); PilotData::GenerateSignature($pirep_details->pilotid); StatsData::UpdateTotalHours(); LogData::addLog(Auth::$userinfo->pilotid, 'Approved PIREP #'.$pirepid); # Call the event CodonEvent::Dispatch('pirep_accepted', 'PIREPAdmin', $pirep_details); $this->set('firstname', $pirep_details->firstname); $this->set('lastname', $pirep_details->lastname); $this->set('pirepid', $pirepid); $message = Template::GetTemplate('email_pirep_accep.tpl', true); Util::SendEmail($pirep_details->email, 'PIREP Accepted.', $message); }
-
okay man, I just found a very simple way that you wouldn't even believe it copy the following, go to admin/modules/PIREPAdmin/PIREPAdmin.php and find this function approve_pirep_post() and place it at the end before the bracket : It's tested. $this->set('firstname', $pirep_details->firstname); $this->set('lastname', $pirep_details->lastname); $this->set('pirepid', $pirepid); $message = Template::GetTemplate('email_pirep_accep.tpl', true); Util::SendEmail($pirep_details->email, 'Comment Added', $message); How easy was that!!!!???
-
okay, remove the following and place it at the end right before the </body> and after ?>. Now it sends only one email to you when you hit it. <input type="button" onclick="<?php echo Util::SendEmail($email, $sub, $message);?>" value="Send Email">
-
Okay. You see, I added a button to send an email once the pirep is accepted and that has to be done by the admin manually but I think it disappears when you hit the accept button. Now if you go to view recent pireps the button should be there right next to the status field.
-
Okay. Do you see the email button?
-
Did it work?
-
I know, I'm working on someone's website and it's been like this lately. That website is also on fivedev.
-
Did you change this part to this?: $rep = PIREPData::getLastReports($pilotid, 1);
-
change it to "::"
-
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'; } ?>
-
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.
-
Getting there, re load the page and you might get something.
-
<?php if(Auth::$userinfo->Rank == " FirstOfficer") { ?> <li><a href="<?php echo url('pages/discounts'); ?>">Discounts</a></li> <?php } ?>
-
Change this: Util::SendEmail($email, $sub, $message); To this: echo Util::SendEmail($email, $sub, $message) ;