md82
-
Posts
57 -
Joined
-
Last visited
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Posts posted by md82
-
-
Hi, this is working smooth on my website. Just one problem though. Once generating the brief finishes and the template loads, the navigation on my web site appears like im logged out even though I'm still logged in. The nav bar changes the links.
-
Hi everyone! I have the Great Circle Maps currently on my pilot profiles. I would like to use google maps to show the last 15 flights instead.
Thanks
-
Has anyone figured out how to have the list only show fields that have aircraft at it? I have many many airports with "no available aircraft" because people have flown charters to them and the airports have no scheduled routes.
-
Flights used to cost $5000 in fuel, now its costing $85000 for the same duration
-
-
what is the prefix for forum database supposed to be?
-
@ MD82....You have directly ripped off my skin and items off my site...Remove immediately or I am contacting your provider ....Your too much of a **d o u c h e** to even change the colors for christ sakes..
actually, this is a template freely available on the internet at 1234.info.. Good luck with that.
you want more proof?
http://www.1234.info/webtemplates/multiflex2/demo/index.html
- 1
-
It cant be the clock script, on the development phpvms install the map works.. its when we transfer the skin to the original phpvms install it stops working.
-
Mine isn't working either, I have the same error on firebug..
any help appreciated
-
Is it possible we could have average landing stats for each hub ?
-
That done did it !
Thanks a lot !
-
Hey guys, I'm trying to install the average landing function, it works for pilots who have flights logged, but for pilots with no flights yet it shows this:
Warning: Invalid argument supplied for foreach() in /home/flynryan/public_html/allegiantvirtual.com/core/common/TouchdownStatsData.class.php on line 30Warning: Division by zero in /home/flynryan/public_html/allegiantvirtual.com/core/common/TouchdownStatsData.class.php on line 35
Your Average Landing Rate: 0
my touchdown stats data class
<?php//simpilotgroup addon module for phpVMS virtual airline system
//
//simpilotgroup addon modules are licenced under the following license:
//Creative Commons Attribution Non-commercial Share Alike (by-nc-sa)
//To view full license text visit http://creativecommons.org/licenses/by-nc-sa/3.0/
//
//@author David Clark (simpilot)
//@copyright Copyright © 2009-2010, David Clark
//@license http://creativecommons.org/licenses/by-nc-sa/3.0/
class TouchdownStatsData extends CodonData
{
public function pilot_stats($pilotid) {
$query = "SELECT pilotid, code, flightnum, depicao, arricao, aircraft, landingrate, submitdate FROM `".TABLE_PREFIX."pireps`
WHERE landingrate < '0'
AND pilotid = '$pilotid'
ORDER BY landingrate DESC";
return DB::get_results($query);
}
public function pilot_average($pilotid) {
$stats = self::pilot_stats($pilotid);
$total = 0;
$count = 0;
foreach ($stats as $stat)
{
$total = $total + $stat->landingrate;
$count++;
}
$average = $total / $count;
return $average;
}
public function airline_average() {
$stats = self::get_all_stats();
$total = 0;
$count = 0;
foreach ($stats as $stat)
{
$total = $total + $stat->landingrate;
$count++;
}
$average = $total / $count;
return $average;
}
public function get_all_stats() {
$query = "SELECT pilotid, code, flightnum, depicao, arricao, aircraft, landingrate, submitdate FROM `".TABLE_PREFIX."pireps`
WHERE landingrate < '0'
ORDER BY landingrate DESC";
return DB::get_results($query);
}
public function get_stats($howmany) {
$query = "SELECT pilotid, code, flightnum, depicao, arricao, aircraft, landingrate, submitdate FROM `".TABLE_PREFIX."pireps`
WHERE landingrate < '0'
ORDER BY landingrate DESC
LIMIT $howmany";
return DB::get_results($query);
}
}
any help appreciated
-
When I put the code in the pilot profile, it still shows the VA's most recent flights instead of the pilots ???
-
I'm still a noob at php, is there a code I could copy and paste ?
Thanks again !
-
Hi guys ! hope everyone is having a nice holiday ! I know this has come up before, but I cant find what I'm looking for.
I've got the great circle mapper installed on my front page and working, but I want to install it in the pilot profile to show an individuals recent flights on the map. Anyone have this code ?
- 1
-
Hi, how do I make it so that when a pilot who searches for a flight, airports with no routes don't show up ? I have pilots flying charter flights, and the airport gets added to my airports listing. I want these airports with out schedules not showing up.
I'm new to php so I wouldn't have an idea where to start.
thanks !
-
I currently have just one airline running on my site. I've received a lot of requests to add a charter division. The problem is I don't want pilots going crazy and just flying charter 24/7. It would be great if someone could make an addon where it extracts pilot pay if they fly charter flights. Once their balance is gone they have to fly scheduled flights again.
thanks !
- 1
-
-
is the "field id" relevant ? I noticed the fieldid for the vatsim dropdown is 4. if the code only pulls (yes,no) from that fieldid could that help it ?
-
Thats a lot better- No errors when I go to that page- but the numbers aren't showing up..
Total Aircraft: 52
Total Flights Flown: 2
Total Flights Flown On Vatsim:
Total Hours Flown: 9.10
Passengers Carried: 235
Fuel Burned (lbs.): 24777
I really appreciate the help
-
I'm lost.. So I make a "class" in the /core/classes folder or where ? I apologize im such a noob
-
Where should I put this code:
<?phpfunction get_onlineflights() {
$query = "SELECT COUNT(*)AS total FROM '.TABLE_PREFIX.'pirepvalues WHERE value = 'Yes'";
return DB::get_row($query);
}
?>
I've tried a few different places but cant figure it out..
thanks as always !
-
awesome ! except didnt quite get it working.
what do I put this code inside of ?
$total = mynewdata.class::get_onlineflights();echo $total->total;
the existing codes look like
<strong>Total Flights Today: </strong><?php echo StatsData::totalflightstoday(); ?><br>thanks !!
-
TouchdownStats 1.0
in Simpilot Group Addons
Posted · Edited by md82
Hello, I would like to display the smoothest landing ever in a field on my stats page. Does anyone know how?
This one is working to show the VAs average landing rate:
<?php echo ''.round(TouchdownStatsData::airline_average('airline'), 0); ?>
How can I modify it to show the best landing rate? Thanks