Jump to content

flyalaska

Members
  • Posts

    1941
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by flyalaska

  1. Line 23 is the closing bracket for the month section. Here is the whole code. I looked and everything seems to match with the others. <?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 (c) 2009-2010, David Clark //@license http://creativecommons.org/licenses/by-nc-sa/3.0/ class TouchdownStatsData extends CodonData { public function get_all_stats($month) { $query = "SELECT pilotid, code, flightnum, depicao, arricao, aircraft, landingrate, submitdate FROM `".TABLE_PREFIX."pireps` WHERE landingrate < '0' AND MONTH(submitdate) = '$month' ORDER BY landingrate DESC"; return DB::get_results($query); } 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); } public function get_pilot_landingstats($pilotid, $howmany) { $query = "SELECT * FROM `".TABLE_PREFIX."pireps` WHERE landingrate < '0' AND pilotid = '$pilotid' ORDER BY landingrate DESC LIMIT $howmany;"; return DB::get_results($query); } 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; } } Fatal error: Cannot redeclare TouchdownStatsData::get_all_stats() in /home/caspsh1/public_html/fly/core/common/TouchdownStatsData.class.php on line 25
  2. Tried that really screwed up my page. Here is the section of the code of TouchdownStatsData.class. The month section is at the bottom 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); } public function get_pilot_landingstats($pilotid, $howmany) { $query = "SELECT * FROM `".TABLE_PREFIX."pireps` WHERE landingrate < '0' AND pilotid = '$pilotid' ORDER BY landingrate DESC LIMIT $howmany;"; return DB::get_results($query); } 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 get_all_stats($month) { $query = "SELECT pilotid, code, flightnum, depicao, arricao, aircraft, landingrate, submitdate FROM `".TABLE_PREFIX."pireps` WHERE landingrate < '0' AND MONTH(submitdate) = '$month' ORDER BY landingrate DESC"; return DB::get_results($query); }
  3. Looking at my Top Landing, the top 10 which is displayed on the index page. It has a few -1 and the rest are -2's. Is there a way to display the top 10 for the currant month rather than overall?
  4. You can move all your files to the new domain. Cpanel is set with your host.
  5. Got it working, with the IP Content Module.
  6. http://forum.phpvms.net/page/index.html?record=24
  7. Thats what I thought. I have alot of people with no avatars, just blank. The no avatar image is in the above location.
  8. Can someone show me how to set a default avatar? For people who never update their avatar.
  9. Check your fuel prices. I was in debt like that several months ago. Found out it was from the fuel. Also could be from pilots using 100% on a short flight .
  10. It doesn't go on your page, need to create a block in the IP admin. Do you have MSN or Skype? Or PM me your forum admin info, I can make it for you.
  11. Make new block via Ip Content <div class='general_box'> <if test="is_array( $records ) && count( $records )"> {parse striping="feed_striping" classes="row1,row2 altrow"} <table id="tabledlist" class="tablesorter"> <thead> <tr> <th>Forum Topic</th> <th>Date</th> <th>Posted By</th> </tr> </thead> <foreach loop="$records as $r"> <tr> <td><a href='{$r['url']}' title='{$r['title']}'>{$r['title']}</a></td> <td><abbr class="published" title="{parse expression="date( 'c', $r['date'] )"}"> {parse date="$r['date']" format="short"}</abbr></td> <td>{$r['lastpostername']}</td> </tr> </foreach> </table> </if> </div>
  12. Look on the IPB forums for help with SSI. I wouldn't buy IP Content just for the latest post. I use mine as a blog. Not worth the $50 just the recent post.
  13. I think there are some free mods for the SSI in the marketplace.
  14. No idea! Only used it for a short time, it was so bad looking, I bought the IP Content.
  15. For the Latest post you have to purchase IP Content, or used there version of SSI. Which will only display on topic.
  16. I am thinking of re writing my schedules. Will this mess up the old flight logs?
  17. Send me an email and I'll give you the code. It's just a html table added to the pages.
  18. That systems requires a VPS server.
  19. There was a stable Simulated B6 on Vatsim about 5 years ago
×
×
  • Create New...