Jump to content

pirep report! I need help


bass

Recommended Posts

  • 2 weeks later...
  • Moderators

Hi, can you tell me to do so in a report on the flight shows how the landing took place ??? Good, crash, landing in bad meteorological conditions, excellent fit.

You need to write a code to show those details on certain landing rates. I can give you a hint and you can start writing the code if you have the knowledge.

Link to comment
Share on other sites

In "pirep_viewreport.tpl, I use the following code to give a landing report:

<li><strong>Landing Rate: </strong><?php echo $pirep->landingrate; ?> f/pm</li>
 <li><strong>Landing Report: </strong><?php if(abs($pirep->landingrate) <= 50)
				    echo '!! OUTSTANDING LANDING !!';
	    elseif( abs($pirep->landingrate) >=51  && abs($pirep->landingrate) <= 100)
				    echo 'Have we landed yet? Greased Landing!';
	    elseif( abs($pirep->landingrate) >=101  && abs($pirep->landingrate) <= 150)
				    echo 'Smooth Landing, well done!';
  elseif( abs($pirep->landingrate) >=151  && abs($pirep->landingrate) <= 199)
				    echo 'OK! Steady Landing.';
  elseif( abs($pirep->landingrate) >=200  && abs($pirep->landingrate) <= 299)
				    echo 'BUMP! Not to bad.';
  elseif( abs($pirep->landingrate) >=300  && abs($pirep->landingrate) <= 399)
				    echo 'BOUNCE! BUMP! THUMP! Average Landing.';
  elseif( abs($pirep->landingrate) >=400  && abs($pirep->landingrate) <= 499)
				    echo 'OUCH! Passengers thought they had crashed!';
 elseif( abs($pirep->landingrate) >=500  && abs($pirep->landingrate) <= 599)
				    echo 'Hard Landing. You burst a tyre!';
  elseif( abs($pirep->landingrate) >=600  && abs($pirep->landingrate) <= 650)
				    echo 'The tyres have burst & the undercarriage is badly damaged!';
	    elseif( abs($pirep->landingrate) >=651  && abs($pirep->landingrate) <= 800)
				    echo 'Undercarrage has collapsed causing substantial a/c damage!';
	    elseif( abs($pirep->landingrate) >=801  && abs($pirep->landingrate) <= 99999)
				    echo '!! CRASH !! CRASH !! CRASH !! CRASH !! CRASH !! CRASH !!';?></li>

This is how it looks: http://www.orange-air.co.uk/index.php/pireps/viewreport/2476

Hope this helps?

Link to comment
Share on other sites

In "pirep_viewreport.tpl, I use the following code to give a landing report:

<li><strong>Landing Rate: </strong><?php echo $pirep->landingrate; ?> f/pm</li>
 <li><strong>Landing Report: </strong><?php if(abs($pirep->landingrate) <= 50)
				 echo '!! OUTSTANDING LANDING !!';
	 elseif( abs($pirep->landingrate) >=51 && abs($pirep->landingrate) <= 100)
				 echo 'Have we landed yet? Greased Landing!';
	 elseif( abs($pirep->landingrate) >=101 && abs($pirep->landingrate) <= 150)
				 echo 'Smooth Landing, well done!';
elseif( abs($pirep->landingrate) >=151 && abs($pirep->landingrate) <= 199)
				 echo 'OK! Steady Landing.';
elseif( abs($pirep->landingrate) >=200 && abs($pirep->landingrate) <= 299)
				 echo 'BUMP! Not to bad.';
elseif( abs($pirep->landingrate) >=300 && abs($pirep->landingrate) <= 399)
				 echo 'BOUNCE! BUMP! THUMP! Average Landing.';
elseif( abs($pirep->landingrate) >=400 && abs($pirep->landingrate) <= 499)
				 echo 'OUCH! Passengers thought they had crashed!';
 elseif( abs($pirep->landingrate) >=500 && abs($pirep->landingrate) <= 599)
				 echo 'Hard Landing. You burst a tyre!';
elseif( abs($pirep->landingrate) >=600 && abs($pirep->landingrate) <= 650)
				 echo 'The tyres have burst & the undercarriage is badly damaged!';
	 elseif( abs($pirep->landingrate) >=651 && abs($pirep->landingrate) <= 800)
				 echo 'Undercarrage has collapsed causing substantial a/c damage!';
	 elseif( abs($pirep->landingrate) >=801 && abs($pirep->landingrate) <= 99999)
				 echo '!! CRASH !! CRASH !! CRASH !! CRASH !! CRASH !! CRASH !!';?></li>

This is how it looks: http://www.orange-ai...viewreport/2476

Hope this helps?

SUPER!!! This is exactly what I wanted to do! Thank you so much!

  • Like 1
Link to comment
Share on other sites

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