AIRMail beta2

Hey simpilot , i swear your coding is the best , i love it . Now small question is there any way i cant post how many messages they have and the link to to check that messages, I want that to be in my Pilot Center. Please reply back telling me how to do it . Thank you

Ex: how can you disply the last 5mails or 1 or 2 or 3 for example like latest pilots so i put it

under you got mail

@pouzo,

If you want to show how many AIRmail’s are waiting instead of the image you can ->

1 - open mail_check.tpl - unless you have changed it, it should look like this ->

<center>
<?php
    if ($items > 0)
	{
		echo '<img src="'.SITE_URL.'/mailimages/new_mail.gif" border="0" /><br />';
		echo 'You Have Mail';
	}
	else
	{
		echo 'You have no new mail';
	}
?>
</center>

2 - change it to

<center>
<?php
    if ($items > 0)
	{
		echo 'You Have '.$items.' New Mail Items';
	}
	else
	{
		echo 'You have no new mail';
	}
?>
</center>

That should get the result you are looking for.

You can call it anywhere in the template using -

<?php MainController::Run('Mail', 'checkmail'); ?>

I am not sure what you are looking for with the second request. When you go to your inbox it gives you a list of your mail… let me know what you are trying to do.

Hey man, Thank you so much for the reply , it works like a charm , I added the link so if they have a mail they can click on it and check their new mail.

<center>
<?php
    if ($items > 0)
	{
		echo '<a href="index.php/Mail/inbox">You Have '.$items.' New Mail Items </a>';
	}
	else
	{
		echo 'You have no new mail';
	}
?>
</center>

I’m not showing the drop down menu with the pilot IDs. When I send an email  , I get a message " You must select a recipient" when I sent out a test email.

I’m not showing the drop down menu with the pilot IDs. When I send an email  , I get a message " You must select a recipient" when I sent out a test email.

Hi Eddie - did you update all the files from the first beta with the files for the second one? The first version did not have a drop down for pilots. Also, what version phpVMS are you running, I think I may have to do some work to adhere to the newer beta structure for modules.

I am using Version 1.2.743 . I have deleted all the of the files from the first beta. Then installed the the new files.

Is it an empty drop down or no drop down at all? I have it running on a beta past that version without any issue.

It shows no drop menu

Can you pastebin the template you are using for mail_new.tpl so I can look at it

<style>

.left {

width: 200px;

float: left;

min-height: 300px;

padding: 15px 0 15px 5px;

}

.right {

margin-left: 210px;

}

</style>

<div class=“left”>

<?php Template::Show (‘mail_menu.tpl’); ?>

</div>

<div class=“right”>

<center>

<table bgcolor=“#000000” cellspacing=“1” cellpadding=“5” border=“0”>

<form method=“post” action=“<?php echo SITE_URL?>/index.php/Mail/send”>

<input type=“hidden” name=“who_from” value=“<?php echo Auth::$userinfo->pilotid ?>” />

<tr bgcolor=“#cccccc”>

<td>

<b>To:</b>

<select type=“text” name=“who_to”>

<option value=“”>Select a pilot</option>

<?php if(PilotGroups::group_has_perm(Auth::$usergroups, ACCESS_ADMIN))

  {

  ?>

      <option value=“all”>NOTAM (All Pilots)</option>

  <?php

  }

foreach($allpilots as $pilots)

{

echo ‘<option value="’.$pilots->pilotid.‘">’.$pilots->firstname.’ ‘.$pilots->lastname.’ - ‘.PilotData::GetPilotCode($pilots->code, $pilots->pilotid).’</option>';

}

?>

</select>

</td>

<td><b>Subject:<input type=“text” name=“subject”></b></td>

</tr>

<tr bgcolor=“#eeeeee”>

<td colspan=“2”><b>Message:</b><br /><br />

<textarea name=“message” rows=“10” cols=“60”></textarea></td></tr>

<tr bgcolor=“#cccccc”>

<td colspan=“2”>

<input type=“submit” value=“Send AIRmail”>

</td>

</tr>

</form>

</table>

</center>

</div>

<br />

<center><b><font size=“1.5px”>AIRmail © 2009 <a href="http://www.simpilotgroup.com">simpilotgroup.com</a></font></b></center>

<br />

put a

print_r($allpilots);

right at the start of the page and refresh it, see if any of the pilot data is there.

Also - did you update the MailData.Class.php file when you updated everything else?

That didn’t work. I deleted everything from the first betta. So I have the newest data class/

I am on msn

AIRMail Beta 2.1 released ->