-
Posts
267 -
Joined
-
Last visited
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Posts posted by mattia
-
-
Confirm
I am having the same problem
-
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
-
yes, I have the module simpilot TouchdownStats and top pilot
-
hi jeff
tried your code in profile_main.tpl but does not work
this is my error
Fatal error: Call to undefined method TouchdownStatsData::pilot_average() in /var/www/virtual/italianivolanti.it/htdocs/iv/core/templates/profile_main.tpl on line 308
-
is a problem va central
-
the download not work
-
any idea
-
-
<?php $pirep->pilotid.' '.$pirep->firstname.' '.$pirep->lastname?>
or
<th>'.$pirep->pilotid.' '.$pirep->firstname.' '.$pirep->lastname.'</th>
hi jeff
thanks for help but dont work i try
<?php $query="SELECT * FROM phpvms_11pireps WHERE flighttime_stamp > '00:00:00' ORDER BY flighttime_stamp DESC LIMIT 15"; $list=DB::get_results($query); foreach ($list as $pirep) { echo '<tr><th> '.$pirep->pilotid.' '.$pirep->firstname.' '.$pirep->lastname.' </th> <th>'.$pirep->flightnum.'</th> <th>'.$pirep->flighttime_stamp .'</th> <th>'.$pirep->source.'</th> </tr>'; } echo '</table>' ?>
appears only pilot id
-
hi all,
I created this code to see the longest flight
<h4>TEST</h4> <table width="100%" border="1" align="center"> <tr bgcolor=blue> <th><b><font color=black>pilot</th></b> <th><b><font color=black>flight</th><b/b> <th><b><font color=black>time</th></b> <th><b><font color=black>cliente</th></b> </tr> <?php $query="SELECT * FROM phpvms_11pireps WHERE flighttime_stamp > '00:00:00' ORDER BY flighttime_stamp DESC LIMIT 15"; $list=DB::get_results($query); foreach ($list as $pirep) { echo '<tr><th>'.$pirep->pilotid.'</th> <th>'.$pirep->flightnum.'</th> <th>'.$pirep->flighttime_stamp .'</th> <th>'.$pirep->source.'</th> </tr>'; } echo '</table>' ?>
works, but how can I take from the pilot ID his name and surname of the pilot??
thanks in advance to all
-
How about something like this Mark;
Add to TouchdownstataData.class.php
function get_averages($howmany) { $avg = array(); $pilots = PilotData::findPilots(array('retired' => '0')); foreach($pilots as $pilot) { $query = "SELECT AVG(landingrate) as average, pilotid FROM ".TABLE_PREFIX."pireps WHERE landingrate < '0' AND pilotid='$pilot->pilotid'"; $result = DB::get_row($query); if($result->pilotid != '') {$avg[] = $result;} } rsort($avg); return array_slice($avg, '0', $howmany); }
Add to TouchdownStats.php
function averages($howmany) { $this->set('stats', TouchdownStatsData::get_averages($howmany)); $this->show('touchdownstats/touchdownstats_averages.tpl'); }
Add a new template in core/templates/touchdownstats called touchdownstats_averages.tpl
<h3>Best Average Landing Rate</h3> <?php if($stats) { echo '<table>'; echo '<tr>'; echo '<th>Landing Rate</th>'; echo '<th>Pilot</th>'; echo '</tr>'; foreach($stats as $stat) { $pilot = PilotData::getPilotData($stat->pilotid); echo '<tr>'; echo '<td>'.round($stat->average, 1).'</td>'; echo '<td>'.PilotData::getPilotCode($pilot->code, $pilot->pilotid).' - '.$pilot->firstname.' '.$pilot->lastname.'</td>'; echo '</tr>'; } echo '</table>'; } else { echo 'No Stats Available'; } ?>
Then call it by url and pass how many records you want as the last element
http://www.yoursite.com/index.php/touchdownstats/averages/10
or within another template
<?php MainController::run('touchdownstats', 'averages', '10'); ?>
Hi Dave!
does not work for me, no result, only exits "No Stats Available"
http://s3.imagestime.com/out.php/i631825_Immagine.png
thanks and happy new year
-
ok thanks
-
hi Mr.Bean
soory but how do I order them with the flight number
thanks and Merry Christmas
-
yes mseiwald
pleaseee help!
-
Ciao Davide
the problem is not solved
I attach another picture
http://s3.imagestime.com/out.php/i628385_Problemaordinedelletratte2.png
-
hi all
I have a problem with the number of flights, does not insert them in numerical order. link to photo to better understand the problem.
http://s3.imagestime.com/out.php/i628371_432.png
Thank for the help
Have a Merry Christmas and a Happy New Year!
-
-
hi TAV1702
you are getting the copy right?
-
where I put this code?
-
hi all
I put the skin "layout_dark" in admin center, but when I go on the airport list or pilots list does not appear to open the Filter button or buttons to change pages.
attach photo
-
This is the link working!
-
hello
I have this skin you see on my website: http://www.italianivolanti.it/ (click on "virtual airline")
if you want I send you the file
-
ok no problem thanks!
-
hi TAV1702 !
When I click on "Reset pilot pay" returns all the money the pilot
Exam Center - Time
in Development Help
Posted
check this
http://forum.phpvms.net/topic/5181-solved-examcenter-with-time-please-help-me/page__p__34653__hl__%2Bexam+%2Bcenter+%2Bwith+%2Btime__fromsearch__1#entry34653