Nabeel, Or anybody else who can help, heres my problem…
When i go to: (download fspaxconfig) i get this error:
Warning: Cannot modify header information - headers already sent by (output started at /home3/pulseair/public_html/members/core/modules/Mail/Mail.php:131) in /home3/pulseair/public_html/members/core/modules/ACARS/ACARS.php on line 106
menu_name=Pulse Air :: Members Area; base_url=http://members.pulseair.co.uk; path_stats=index.php/acars; path_export=action.php/acars/fspax; username=PLS0012; password=none;
This is the code for the Mail.php, seems to be fine to me,
<?php
class Mail extends CodonModule
{
function Controller()
{
switch($this->get->page)
{
case 'inbox':
if(!Auth::LoggedIn())
{
echo 'You must be logged in to use the mail system';
return;
}
$pid = PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid);
Template::Set('mail', MailData::getallmail($pid));
Template::Set('pilotcode', PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid));
Template::Show('mail_inbox.tpl');
break;
case 'item':
if(!Auth::LoggedIn())
{
echo 'You must be logged in to use the mail system';
return;
}
$mailid = $_GET['mailid'];
$result = MailData::getmailitem($mailid);
Template::Set('mail', $result);
Template::Show('mail_open.tpl');
break;
case 'new':
if(!Auth::LoggedIn())
{
echo 'You must be logged in to use the mail system';
return;
}
Template::Set('pilotcode', PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid));
Template::Show('mail_new.tpl');
break;
case 'send':
if(!Auth::LoggedIn())
{
echo 'You must be logged in to use the mail system';
return;
}
$username=$_POST[username];
$whofrom=$_POST[whofrom];
$subject=$_POST[subject];
$message=$_POST[message];
Template::Set('pilotcode', PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid));
$sql="INSERT INTO airmail (username, whofrom, subject, message, date, time)
VALUES ('$username', '$whofrom', '$subject', '$message', NOW(), NOW())";
DB::query($sql);
echo "<center><h2>AIRmail sent!</h2></center>";
Template::Show('mail_menu.tpl');
break;
case 'sent':
if(!Auth::LoggedIn())
{
echo 'You must be logged in to use the mail system';
return;
}
$pid = PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid);
Template::Set('mail', MailData::getsentmail($pid));
Template::Set('pilotcode', PilotData::GetPilotCode(Auth::$userinfo->code, Auth::$userinfo->pilotid));
Template::Show('mail_sentitems.tpl');
break;
case 'delete':
if(!Auth::LoggedIn())
{
echo 'You must be logged in to use the mail system';
return;
}
$mailid = $_GET['mailid'];
$result = MailData::deletemailitem($mailid);
Template::Set('mail', $result);
Template::Show('mail_deleted.tpl');
break;
case 'reply':
if(!Auth::LoggedIn())
{
echo 'You must be logged in to use the mail system';
return;
}
$mailid = $_GET['mailid'];
$result = MailData::getmailcontent($mailid);
Template::Set('mail', $result);
Template::Show('mail_reply.tpl');
}
}
}
?>