Jump to content

mark1million

Moderators
  • Posts

    2283
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by mark1million

  1. Right, You want to import users from your existing setup, what is the format, it is compatible with vms, ie letter letter letter number number number, example, abc 123 The minimum things you would need to provide with the import is pilot id, email, passwords are encrypted so the easiest way to handle that would be for pilots to hit the forgot password link and set their own based on your imported email data. Other fields to import are optional but would be recommended. Another function to handle with the import would be the pilots group, if i remember off the top of my head its done on the primary key from the pilots table. The export and import is fairly easy to do, just do one at a time and see what happens, if they can reset the password / login, im not really sure what other functions are provided when a user registers behind the scenes, you could take a look in to code in the modules folder just to see exactly what happens and if there are any major show stoppers and work through any problems that come up.
  2. Yeh i never updated for about 7 months then when i do i have a list of files that i need to preserve in different folders and compare differences so its never easy for me to update, all the betas go up to the dev site first where i link in to the live database just to make sure everything is ok.
  3. Cheers Nabeel, can i wget these from github, there must be an easier way than whit im currently doing which is downloading to local machine extracting then uploading to the server after testing
  4. For reference, <?php //by:simpilot //www.simpilotgroup.com class FrontSchedulesData extends CodonData { public function findschedules($arricao, $depicao, $airline, $aircraft) { $query = "SELECT phpvms_schedules.*, phpvms_aircraft.name AS aircraft, phpvms_aircraft.registration FROM phpvms_schedules, phpvms_aircraft WHERE phpvms_schedules.depicao LIKE '$depicao' AND phpvms_schedules .enabled=1 AND phpvms_schedules.arricao LIKE '$arricao' AND phpvms_schedules.code LIKE '$airline' AND phpvms_schedules.aircraft LIKE '$aircraft' AND phpvms_aircraft.id LIKE '$aircraft'"; return DB::get_results($query); } public function findschedule($arricao, $depicao, $airline) { $query = "SELECT phpvms_schedules.*, phpvms_aircraft.name AS aircraft, phpvms_aircraft.registration FROM phpvms_schedules, phpvms_aircraft WHERE phpvms_schedules.depicao LIKE '$depicao' AND phpvms_schedules .enabled=1 AND phpvms_schedules.arricao LIKE '$arricao' AND phpvms_schedules.code LIKE '$airline' AND phpvms_aircraft.id LIKE phpvms_schedules.aircraft"; return DB::get_results($query); } public function findaircrafttypes() { $query = "SELECT DISTINCT icao FROM phpvms_aircraft"; return DB::get_results($query); } public function findaircraft($aircraft) { $query = "SELECT id FROM phpvms_aircraft WHERE icao='$aircraft'"; return DB::get_results($query); } public function findcountries() { $query = "SELECT DISTINCT country FROM phpvms_airports"; return DB::get_results($query); } }
  5. Dave, I am trying go to restrict the return to enabled schedules only and aircraft would be good but more importantly enabled schedules only, I have tried putting a WHERE enabled='1' but its not making any difference, can you help please? This is the FrontSchedulesData.class.php code that i tried it in. <?php //by:simpilot //www.simpilotgroup.com class FrontSchedulesData extends CodonData { public function findschedules($arricao, $depicao, $airline, $aircraft) { $query = "SELECT phpvms_schedules.*, phpvms_aircraft.name AS aircraft, phpvms_aircraft.registration FROM phpvms_schedules, phpvms_aircraft WHERE phpvms_schedules.depicao LIKE '$depicao' AND phpvms_schedules.arricao LIKE '$arricao' AND phpvms_schedules.code LIKE '$airline' AND phpvms_schedules.aircraft LIKE '$aircraft' AND phpvms_aircraft.id LIKE '$aircraft'"; return DB::get_results($query); } public function findschedule($arricao, $depicao, $airline) { $query = "SELECT phpvms_schedules.*, phpvms_aircraft.name AS aircraft, phpvms_aircraft.registration FROM phpvms_schedules, phpvms_aircraft WHERE phpvms_schedules.depicao LIKE '$depicao' AND phpvms_schedules.arricao LIKE '$arricao' AND phpvms_schedules.code LIKE '$airline' AND phpvms_aircraft.id LIKE phpvms_schedules.aircraft"; return DB::get_results($query); } public function findaircrafttypes() { $query = "SELECT DISTINCT icao FROM phpvms_aircraft"; return DB::get_results($query); } public function findaircraft($aircraft) { $query = "SELECT id FROM phpvms_aircraft WHERE icao='$aircraft'"; return DB::get_results($query); } public function findcountries() { $query = "SELECT DISTINCT country FROM phpvms_airports"; return DB::get_results($query); } }
  6. I had a pop earlier and yes, basically add a new sql function to Core->Common->TopPilotData.Class.php its very similar to the public function top_pilot_flights($month, $year, $howmany) { $query = "SELECT * FROM top_flights WHERE month='$month' AND year='$year' ORDER BY flights DESC LIMIT $howmany"; return DB::get_results($query); } Function but just remove the month, and call it something else like top_pilot_flights_year get rid of the month selection and just use the year.
  7. Nabeel, does this download include the other previous changes in 2.1.934-85 and 86?
  8. Yeh im just looking at it now i believe it would be possible with a mod on the code in that top hours for current month table.
  9. Stat Detail Totals Total Fuel Burned (kg) 49018719 Total Miles Flown 5136168 Total Aircraft 302 Total Schedules 1788 Total News Items 98 Total Pilots 768 Total Flights 9278 Total Flights Today 33 Total Flight Hours 17240.08 Total PAX Carried 1400430 Average Landing Rate -399.43 This is a table i have in the top pilots module by Dave ffs lol thats the thread we in Its late here thats my excuse
  10. Cant remember if this is the one now but you can try, http://forum.phpvms.net/topic/2447-working-notams-v10/
  11. Hi its warning of a certificate mismatch, its fine but there is a local notam generator in the addons section here
  12. On the check install im getting, [Checksum failed] /install/dbtest.php did not match, possibly corrupt or out of date [Checksum failed] /core/modules/ACARS/ACARS.php did not match, possibly corrupt or out of date On the checkdb its just a blank page, doesnt seem to do anything.
  13. Hmmm ok not happening for me, When you run the update do you get a progress as to whats happening to the database, mine is just blank and it says complete?
  14. Nabeel, How does this feed work is it just a case of posting news and it gets pushed to VA Central?
  15. Did you regenerate them from the admin panel?
  16. This is the output, { "elements": [ { "type": "pie", "start-angle": 35, "animate": [ { "type": "fade" }, { "type": "bounce", "distance": 4 } ], "gradient-fill": true, "tip": "#val# of #total# #percent# of 100%", "colours": [ "#FF6600", "#00FF00", "#1F8FA1", "#FF0000", "#333333", "#0000FF" ], "values": [ { "value": 1013663.5973206, "label": "Fuel Costs" }, { "value": 7633.7663888644, "label": "Pilot Pay" } ] } ], "title": { "text": "Expenses breakdown" }, "y_axis": { }, "x_axis": { }, "bg_colour": "#FFFFFF" } You can see by that the only data going in is the fuel cost and pilot pay. If i do the same in the admin side its fully populates, { "elements": [ { "type": "pie", "start-angle": 35, "animate": [ { "type": "fade" }, { "type": "bounce", "distance": 4 } ], "gradient-fill": true, "tip": "#val# of #total# #percent# of 100%", "colours": [ "#FF6600", "#00FF00", "#1F8FA1", "#FF0000", "#333333", "#0000FF" ], "values": [ { "value": 1013663.5973206, "label": "Fuel Costs" }, { "value": 7633.7663888644, "label": "Pilot Pay" }, { "value": 161000, "label": "Landing Fees" }, { "value": 16100, "label": "Ramp Fees" }, { "value": 48300, "label": "Catering" }, { "value": 8050, "label": "Cleaning" }, { "value": 48300, "label": "Tug and Ground Crew" }, { "value": 114381.75, "label": "Crew Hotels" } ] } ], "title": { "text": "Expenses breakdown" }, "y_axis": { }, "x_axis": { }, "bg_colour": "#FFFFFF" }
  17. The data is being pulled and displayed ok in textual form but its just the pie chart that is not graphically displaying the expenses, all that is shown is Pilot Pay and Fuel, the others are not being graphically depicted.
  18. My chart for the summary and yearly are working fine its just the monthly expense breakdown the isnt populating the pie chart. Its the same (hope you dont mind Jeff) on Jeffs site as well, http://www.phoenixva.org/index.php/finances/viewreport?type=m1301716800&submit=View+Report
  19. What code drives that data and ill check to see if its the same.
  20. Nabeel, I keep getting this when the maintenance cron is run, PHP Notice: A non well formed numeric value encountered in /core/common/StatsData.class.php on line 89 This is the block, /** * Get all of the months since a certain date */ public static function getMonthsSinceDate($start) { $key_month = date('MY', $start); //This is line 89 $key = 'months_since_' . $key_month; $months = CodonCache::read($key); if ($months === false) { if (!is_numeric($start)) { $start = strtotime($start); } $end = date('Ym'); do { # Get the months $month = date('M Y', $start); $months[$month] = $start; # Set the timestamp $start = strtotime('+1 month +1 day', strtotime($month)); # Convert to YYYYMM to compare $check = intval(date('Ym', $start)); } while ($check <= $end); CodonCache::write($key, $months, 'long'); } return $months; }
  21. Now there was a module about here somewhere that showed how many sectors an aircraft has flown and where is currently is if thats any good to you, ill post the files.
×
×
  • Create New...