Jump to content

Recommended Posts

Posted

Try putting this into your profile.php file

$this->set('pireps', PIREPData::GetLastReports(Auth::$userinfo->pilotid, '10'));

Then in your profile_main.tpl file, add this table:

<table align="center" border="0" width="100%">
<thead>
	 <tr border="0">
 <th align="center">Flight</th>
 <th align="center">Depart</th>
 <th align="center">Arrival</th>
 <th align="center">Time</th>
 <th align="center">Landing Rate</th>
	 </tr>
 </thead>
 <tbody>
 <?php

if(count($pireps) > 0)
{
foreach($pireps as $flight)
 {
echo '<tr><th>'.$flight->flightnum.'</th>
<th>'.$flight->depicao.'</th>
<th>'.$flight->arricao.'</th>
<th>'.date(DATE_FORMAT, strtotime($flight->submitdate)).'</th>
<th>'.$flight->landingrate.'</th>
</tr>';

 }
else
{
 echo "<tr><td>There are no recent flights!</td></tr>";
}
?>
</tbody>
</table>

This hasn't being tested so I am not 100% certain if it will work or not.

Hope this help! :)

Kindest Regards,

James

Posted

Try putting this into your profile.php file

$this->set('pireps', PIREPData::GetLastReports(Auth::$userinfo->pilotid, '10'));

Then in your profile_main.tpl file, add this table:

<table align="center" border="0" width="100%">
<thead>
	 <tr border="0">
 <th align="center">Flight</th>
 <th align="center">Depart</th>
 <th align="center">Arrival</th>
 <th align="center">Time</th>
 <th align="center">Landing Rate</th>
	 </tr>
 </thead>
 <tbody>
 <?php

if(count($pireps) > 0)
{
foreach($pireps as $flight)
 {
echo '<tr><th>'.$flight->flightnum.'</th>
<th>'.$flight->depicao.'</th>
<th>'.$flight->arricao.'</th>
<th>'.date(DATE_FORMAT, strtotime($flight->submitdate)).'</th>
<th>'.$flight->landingrate.'</th>
</tr>';

 }
else
{
 echo "<tr><td>There are no recent flights!</td></tr>";
}
?>
</tbody>
</table>

This hasn't being tested so I am not 100% certain if it will work or not.

Hope this help! :)

Kindest Regards,

James

I'll let you know.

You want a page with only pirep accepted and a second page with only pirep rejected for pilot??

I'm not bothered, either or

Posted

James, I get this error message:

Parse error: syntax error, unexpected T_ELSE in C:\xampp\htdocs\dev\vms\lib\skins\###\profile_main.tpl on line 236

	  <?php

if(count($pireps) > 0)
{
foreach($pireps as $flight)
	 {
echo '<tr><th>'.$flight->flightnum.'</th>
<th>'.$flight->depicao.'</th>
<th>'.$flight->arricao.'</th>
<th>'.date(DATE_FORMAT, strtotime($flight->submitdate)).'</th>
<th>'.$flight->landingrate.'</th>
</tr>';
	 }
       else
       {
	 echo "<tr><td>There are no recent flights!</td></tr>";
}
?>

Posted

There is one } missing from the code. :)

			 <?php

if(count($pireps) > 0)
{
foreach($pireps as $flight)
			 {
echo '<tr><th>'.$flight->flightnum.'</th>
<th>'.$flight->depicao.'</th>
<th>'.$flight->arricao.'</th>
<th>'.date(DATE_FORMAT, strtotime($flight->submitdate)).'</th>
<th>'.$flight->landingrate.'</th>
</tr>';
			 }
} //<- this one
		 else
		 {
			 echo "<tr><td>There are no recent flights!</td></tr>";
}
?>

  • 2 weeks 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...