Jump to content

PilotManager V2.2


Parkho

Your opinion  

27 members have voted

  1. 1. What do you think about this module?

    • Perfect
      12
    • Very Good
      5
    • Good
      6
    • So So!
      4
    • Not A Chance
      0
    • Very Bad
      0
    • Worst Module Ever
      0


Recommended Posts

  • 4 weeks later...
On 1.12.2016 at 4:31 PM, DesComm said:

Emails are not filling in the data pilotid, firstname, lastname, etc. see code below We are running simpilot 5.5.2.

CODE:

<?php

$pilotid = $pilot->pilotid;

$pirp = PManagerData::getpirep($pilotid);

$pir = $pirp->submitdate;

?>

<p>Dear <?php echo $pilot->firstname.' '.$pilot->lastname ;?>,</p>

<p>You are required to submit one PIREP every day. Your last PIREP was sent on <?php echo $pir; ?>.</p>

<p>Please be advised if you do not send a report within the next 2 days your account will be deleted.</p>

<p>Sincerely</p>

<p><?php echo SITE_NAME ;?> - Staff</p>

Email sent:

Dear ,

You are required to submit one PIREP every 30 days. Your last PIREP was sent on .

Please be advised if you do not send a report within the next 15 days your account will be deleted.

Sincerely

American Flight Airways - Staff

Like this

Link to comment
Share on other sites

  • 6 months later...
On 3/2/2016 at 7:05 PM, Longhaul444 said:

No it is not version 4.0. This is what myphp admin version is through my host provider:

  • Version information: 4.3.8, latest stable version: 4.5.5.1

 

That 4.0 version is what was on the file from your add-on:

-- phpMyAdmin SQL Dump

-- version 4.0.10.7

-- http://www.phpmyadmin.net

--

-- Host: localhost:3306

-- Generation Time: Dec 20, 2015 at 09:21 PM

-- Server version: 5.5.45-cll-lve

-- PHP Version: 5.4.31

I am using php v5.4. This is copied directly from your sql file after extracting it before it is uploaded into the server.

But I have it working with the corrections I made to the file, so it's a moot point now.

I have same problem, but not sure what to do... any help?

Link to comment
Share on other sites

  • 10 months later...
  • 4 weeks later...

Hi guys, how can I change the code below. I have to display the days that are missing for pilots who have not made any flights since the registration date. Thank you

pilot.jpg

(Date Joined)
<td><?php echo date("d-m-Y", $jtme) ;?></td>

 

This is the code

<?php $totaldays = Config::Get('PILOT_INACTIVE_TIME');
                       {

                ?>

<?php

if ($pilot->lastpirep == '0000-00-00 00:00:00') {
echo '<image src="/en/admin/lib/images/Warning.png">';
                        }

else {

 $datebefore1 = substr($pilot->lastpirep, 0, 10);
 
 
$datetoday2 = date("Y-m-d");

$datebefore3 = strtotime($datebefore1);

$datetoday4 = strtotime($datetoday2);

$newdate = $datetoday4-$datebefore3;

$lastpirep = floor($newdate/(60*60*24));

$daysleft = $totaldays-$lastpirep;

echo '';

if ($lastpirep == 0) { echo ''; }

else if ($lastpirep == 1) { echo ''; }
else {

echo '';

}

echo '<font color="#eb0f48">';

if ($daysleft <= 0) { echo '<image src="/en/admin/lib/images/OFF.png"><br>Pilot in pension'; }

else {
echo $daysleft . '</font>&nbsp; days left to be marked as a retired pilot.';

}
                     }

                        ?>
                                                               
                        <?php

  }

Edited by gio1961
Link to comment
Share on other sites

  • 1 year later...

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...