Jump to content

MrAmsterdam

Members
  • Posts

    277
  • Joined

  • Last visited

Everything posted by MrAmsterdam

  1. MrAmsterdam

    Obsess Blue

    Hey guys, Could you have a look at the following link? http://serious-airlines.com/index.php/Screenshots when you click the screenshot, the screenshot falls out of the website. Can i fix this in the .css file? Can i make the website a little wider maybe? Thanks for the help everyone! Lucas
  2. Cool! i will be waiting for that upload!
  3. Simpilot, I saw that i made a mistake.. evetything runs now! Thanks for the help!! Lucas
  4. Simpilot, No, as far as i know i have a standard installation with a skin installed. i can't recall doing anything really special... when i go into the sql database and run this query i get a result back... select * from phpvms_pilots WHERE pilotid = 1; i get the name of the pilot that is using pilotid nr 1. (it's me :-) ) Regards, Lucas
  5. Hi, I used this: <?php echo 'Pilot average landing rate '.round(TouchdownStatsData::pilot_average('1'), 2); ?> and then i get the error message. Maybe you can have a look at http://serious-airlines.com/index.php/pages/averagelandingrate there is the error message. I can't seem to understand where i am messing stuff up... :-( Sorry for being a pain in the a$$ Lucas
  6. So this is my touchdownstats file: <?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); } } and the error message that i get is: Warning: Invalid argument supplied for foreach() in /home/seriousa/public_html/core/common/TouchdownStatsData.class.php on line 28 Warning: Division by zero in /home/seriousa/public_html/core/common/TouchdownStatsData.class.php on line 33 Pilot average landing rate 2 any idea's on this issue? Thanks again guys! Lucas
  7. Simpilot, Thanks for the help! I'll try this and post back if everything is working :-) Regards Lucas
  8. OK. i am officially lost now. I want to show the average landing rate per pilot. Now i have created this query that is very basic and simple but it shows what i need. It's this: SELECT (phpvms_pilots.firstname), (phpvms_pilots.lastname) AS Name, avg(phpvms_pireps.landingrate) AS Average_Landingrate FROM phpvms_pilots INNER JOIN phpvms_pireps ON phpvms_pireps.pilotid = phpvms_pilots.pilotid GROUP BY phpvms_pilots.pilotid ORDER BY phpvms_pireps.landingrate DESC i was looking at the simpilot module but i really am lost and i don't even know where to start getting different data. Is it possible to execute the query above? how can i do that? thanks in advance.. again, :-) Lucas
  9. OK. i'll see if i can get this thing working. If i have it working, i'll post it here :-) Thanks guys Lucas
  10. Hi guys, Is someone going to have a look if it's possible to get the average touchdown rate per pilot? And per month, year and all time? :-) Please forigive me if someone is already working on this... :-) Regards, Lucas
  11. Yeah that's a good idea... and yeah, the more stats the better of course :-p Regards Lucas
  12. Yeah, that would be great! Could you make a selection between all time, year and month? (month is the least important for me though) :-) Thanks in advance! Lucas
  13. Yeah i would like to know that as well.. i can't find it anywhere... :-(
  14. Hi guys, i have created a query where i can see the landing stats average and i want to use the query on my website (hosted by fivedev). The query works, but now i would like to put it onto my site. When i do, nothing shows. How can i make this happen? Do i need to connect to my database first? i think so right, but how? Hopefully someone can give me a standard template or something so i can put the info on the website.... (www.serious-airlines.com) Thanks in advance and sorry if this is a stupid question... *sigh* Lucas
  15. hey, looks good.. hopefully it will become a success.. i will keep an eye on it! me and my friends fly online once a week together.. maybe this is a nice option.. cool!
  16. Yeah that must be it. I had the same problem... easy to overlook :-)
  17. Hi Guys, Can someone help me out with the following issue? I have added Serious-airlines.com to the VACentral. The problem is when i want to add the logo via the gallery, i upload a picture that is 5kb. The size shouldn't be the problem because it's just as small as the rest of the companies. when i save the picture, nothing happens and the logo keeps showing "No Image". Is there another way to upload a logo or am i doing something wrong? Thanks for the help! Regards Lucas
  18. Yeah, i have the top 20 selected on my site. I really want the average pilot landing rate as well. is this easy to create? Thanks all! Lucas
  19. what about this one: "Striker, listen, and you listen close: flying a plane is no different than riding a bicycle, just a lot harder to put baseball cards in the spokes" whahahaha priceless!
  20. aargh... its always sooooo easy... sorry guys...
  21. Hi, Yes i know and that's ok. The questions is.. what can the user do when i give him the persmission to add routes etc. but NOT admin rights? Because when i give every right but admin, you don't get the admin page. What can they do if they do not have the admin page? Regards, Lucas
  22. Hey guys, I am looking into a problem that i have with the admin panel. I want to give a member some rights to add and change routes and stuff... i just don't want him to access the exprenses, pilot and some other tabs. When i select everything except admin rights, the admin tab does not pop up. Is there something that i am missing? Is the only option to change routes and for example add news, to choose admin rights? Maybe you guys have a simple answer for this? Thanks in advance, Lucas
  23. i got it! I didn't import all the sql queries... sorry guys!
  24. Thanks.. i am looking into the problem as well.. Regards Lucas
  25. guys, can anyone help me here? When i try to add a shop type or product type, it says that the type has been added, but when i look at all the types or at the database, nothing is added at all... Strange,.. can someone tell me the steps to take to figure out where the problem is? Regards, Lucas
×
×
  • Create New...