Jump to content

Touchdown


Fernando

Recommended Posts

This is a system that calculates the

T/D pilot's average for its last flight.

Pilots not flying

td1dw.jpg

Pilots with record flight

td2v.jpg

Installation Manual

1° Download of the File (TouchdownStats)

2° Send the folder of the module to your website. within the system PHPVMS

3° Enter the code within the pages Profile_main.tpl and pilot_public_profile

Download of the MODULE here

Code to TPL

<?php		

		    $somar = mysql_query("SELECT SUM(landingrate) as landingrate FROM `phpvms_pireps` WHERE pilotid=$userinfo->pilotid");
		    $total = mysql_fetch_array($somar);
		    $v_total = $total['landingrate'];
		    $linha = mysql_query("SELECT *  FROM `phpvms_pireps` WHERE pilotid=$userinfo->pilotid");
		    $taxa = mysql_num_rows($linha);
		    $v_taxa = $taxa;	   		   

		    $media = $v_total/$v_taxa;
		    $v_media = number_format($media, 0, '.', '');
		?>
                 <?php echo $v_media." ft/min"; ?>

Great flights to all.

By.

Fernando

Link to comment
Share on other sites

  • 2 weeks later...

You can also just use this code (without using this module) to display the Avg. Landing rate of all your flights.

<strong><font color="#FF0000">Avg. Landing Rate: </font></strong><font color="green"><?php echo ''.round(TouchdownStatsData::pilot_average($userinfo->pilotid), 2); ?></font>

This works in the profile_main.tpl as well as the pilot_public_profile.tpl

Link to comment
Share on other sites

ok i solved with this code

<?php           

                           $somar = mysql_query("SELECT SUM(landingrate) as landingrate FROM `phpvms_pireps` WHERE pilotid=$userinfo->pilotid");
                           $total = mysql_fetch_array($somar);
                           $v_total = $total['landingrate'];
                           $linha = mysql_query("SELECT *  FROM `phpvms_pireps` WHERE pilotid=$userinfo->pilotid");
                           $taxa = mysql_num_rows($linha);
                           $v_taxa = $taxa;                       

                           $media = $v_total/$v_taxa;
                           $v_media = number_format($media, 0, '.', '');
                       ?>
                 <?php echo $v_media." ft/min"; ?>

but you can have a table to put our best 10?

thanks for the help

Link to comment
Share on other sites

ok i solved with this code

<?php           

                           $somar = mysql_query("SELECT SUM(landingrate) as landingrate FROM `phpvms_pireps` WHERE pilotid=$userinfo->pilotid");
                           $total = mysql_fetch_array($somar);
                           $v_total = $total['landingrate'];
                           $linha = mysql_query("SELECT *  FROM `phpvms_pireps` WHERE pilotid=$userinfo->pilotid");
                           $taxa = mysql_num_rows($linha);
                           $v_taxa = $taxa;                       

                           $media = $v_total/$v_taxa;
                           $v_media = number_format($media, 0, '.', '');
                       ?>
                 <?php echo $v_media." ft/min"; ?>

but you can have a table to put our best 10?

thanks for the help

You demand the rank of the best?

This

http://www.voeazulvirtual.com/acars/index.php/TopPilot

or this

http://www.voeazulvirtual.com/acars/index.php/TouchdownStats

By

Fernando

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