Jump to content

web541

Members
  • Posts

    700
  • Joined

  • Last visited

  • Days Won

    17

Everything posted by web541

  1. You'll want to make sure in core/common/ScreenshotsData.class.php (or similar named file), all the public function xxx()... are changed to (note the word static) public static function xxx()... Then if that doesn't work, instead of this <?php Screenshots::show_newest_screenshot(); ?> Try this <?php $screenshot = new Screenshots(); $screenshot->show_newest_screenshot(); ?>
  2. web541

    Editing ID's

    It seems to be working for me, have you tried the most up to date version on github? Also, you might be confused about the User ID: User ID: The ID of the user, but it remains the same in the database regardless of the change in the admin panel (to keep everything synced nicely across the app). This shouldn't be changed. Pilot ID: The Pilot ID of the User which is used to create the "callsign" you see (mix of Airline Code & Pilot ID). This can be changed in the admin panel and will update the callsign accordingly. If it's still not working, see if there are any errors in the laravel.log file and/or submit an issue on github
  3. Which graph are you looking to get? For the donut, you would have to change this 'url': "<?php echo actionurl('/pilots/morrisstatsaircraftdata/'.Auth::$userinfo->pilotid.'');?>", to this 'url': "<?php echo actionurl('/pilots/morrisstatsaircraftdata/'.$pilot->pilotid.'');?>", And similarly, for the monthly chart, you would have to replace this public function morrisstatsbymonthdata() { $data = PIREPData::getIntervalDataByMonth(array('p.pilotid'=>Auth::$userinfo->pilotid), 3); header("Content-type: application/json"); echo json_encode($data); } with this public function morrisstatsbymonthdata($pilotid) { $data = PIREPData::getIntervalDataByMonth(array('p.pilotid'=> DB::escape($pilotid)), 3); header("Content-type: application/json"); echo json_encode($data); } And this $.ajax({ 'async': false, 'global': false, 'url': "<?php echo actionurl('/pilots/morrisstatsbymonthdata');?>", 'dataType': "json", 'success': function(data) { json = data; } }); return json; Replace with this $.ajax({ 'async': false, 'global': false, 'url': "<?php echo actionurl('/pilots/morrisstatsbymonthdata/'.$pilot->pilotid.'');?>", 'dataType': "json", 'success': function(data) { json = data; } }); return json; and I would think that would work.
  4. Is there anything in your PHP error_log file? Also, not sure if that's from your code or from view source, but your include statements should look like this <?php include('/home/YOURUSERNAME/public_html/core/codon.config.php'); include('/home/YOURUSERNAME/public_html/core/local.config.php'); ?> where YOURUSERNAME should be your cPanel username (it could be FSV_phpvms?), you are on shared hosting? And confirm which version of phpVMS (v2 or 5.5.x) and PHP (5.5, 5.6, 7.0, etc.) you are using?
  5. Not sure if this still works, but you could try this <?php MainController::Run('ACARS', 'index'); ?> // or // <?php MainController::Run('ACARS', 'viewmap'); ?> Your includes look fine, but you may have to adjust them to this <?php include('/home/YOURUSERNAME/public_html/FSV_phpvms/core/codon.config.php');?>
  6. Had it saved and updated it for phpVMS 5.5.x for you. Given that it was originally free, I'm sure he won't mind. https://github.com/web541/phpvMS-Random-Flights
  7. It's really up to the VA to determine how their times are set. Ideally, it would be set at real time and the sim time would be the same as the real time, but it should be up to the VA to have a policy in place to make sure all times are uniform across the board (not mixing sim and real). It's also up to the VA to determine when it is appropriate to complete the flight, so there might be a policy that states you must fly the flight at the specified time, or it could be flown at any time.
  8. Yes @ProAvia is right, you have installed the skin incorrectly. Read his EDIT. Plus, the skin shouldn't have a core_htmlhead.php file anyway, that should remain in core/templates and should not be edited (unless absolutely necessary). Any JS that would need to be added should go into the layout.php file anyway.
  9. Oops didn't get the memo that you had fixed it already, good job 👍
  10. Yeah where did you get that code from? It looks like nothing is happening with these lines: path.push(L.latLng(nav.lat, nav.lng)); points.push(loc); As in there's nothing in that snippet to say that they are being added to the map, although the navaids look like they should be showing up from the .addTo(map); Can you check that you've added that snipped in correctly? Also, what is actually missing right now (flight path or navaids), if anything?
  11. During the flight and before you file the PIREP, is the route_details column of the `acarsdata` table also empty? If so then it is probably a parsing issue where it can't find the waypoint in the table. I guess you could check the values of $results here https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/common/NavData.class.php#L315 but if it's empty it would return an array which is what we are seeing I think.
  12. Provided that the route isn't empty, the `route_details` field should populate automatically as seen here https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/common/PIREPData.class.php#L643 which will then call NavData::parseRoute() leading to here where it finds the waypoint in your `_navdata` table https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/common/NavData.class.php#L311 It's possible that it's not finding the waypoint in the table properly and thus not saving the route_details in PIREPData.
  13. What version of phpVMS do you have (which github link did you download it from?). It looks like the skin is incompatible with your phpVMS version (as in the skin has .tpl and your phpvMS is .php, or vice-versa), or if the developer has more than one version, you have downloaded the incorrect one for your setup.
  14. Really, it's up to you. The migrator should be fixed provided a stable version of v7 has officially been released. I believe it already migrates pilots, pireps, schedules and fleet across to some extent and the functionality will continue to be improved for the release as far as I'm aware. Check here https://forum.phpvms.net/topic/26778-700-beta-2/ that should give you the entire git with the vendor folder extracted. Bear in mind that it will need to be updated manually when Nabeel releases the next official version.
  15. This is in the phpVMS v7 forum (which isn't completely stable yet). If you want a current, working version of phpVMS then I suggest uploading this https://github.com/DavidJClark/phpvms_5.5.x to your server and making sure your PHP version is compatible. If you are looking for phpVMS v7 to install, then follow these instructions http://docs.phpvms.net/setup/installation and just by chance, are you using ssh on your server?
  16. Have to agree on both answers for this one, smartCARS & TFDi don't use the raw data field (although they say their smartCARS v3 will have this capability, but who knows when this will be released). Theoretically, you could catch/make an acars live tracking event through another module or integrate it (and serialize) the data from smartCARS to get it to work, but there is no native solution. This looks similar to what CC have done, but I haven't used the module myself.
  17. It looks like you're on PHP version 7.2/7.3, if you are able to I suggest changing to PHP 5.6 if possible (and still available from your host). Otherwise, you can try ProAvia's pack here https://github.com/ProAviaAZ/phpvms_5.5.2.72 and see if that works for you. The reason I say this is because that error Indicates the deprecation of the define(..,.., TRUE) and case-insensitive names in PHP 7.2^. You could try and change these lines define('OBJECT','OBJECT', true); define('ARRAY_A','ARRAY_A', true); define('ARRAY_N','ARRAY_N', true); to this define('OBJECT','OBJECT'); define('ARRAY_A','ARRAY_A'); define('ARRAY_N','ARRAY_N'); But I would assume that there will be a few more errors within your phpVMS installation and possible database connection issues if your PHP version is high enough.
  18. Just out of curiosity, is there a /public folder in the phpVMS you uploaded? If so, try YOURURL/public/install and see if that shows up. If it is, then you may have to do a .htaccess tweak, but it should work without it if you just upload the zip.
  19. The acars data travels from your acars software to the `phpvms_acarsdata` table. This is then read by phpvms and is output in JSON format to SITEURL/action.php/acars/data. Then in lib/js/acarsmap.js this is loaded into the map using a JS AJAX call: https://github.com/nabeelio/phpvms_v2/blob/master/lib/js/acarsmap.js#L216 Through a few more calls, this function is loaded as the time specified in the bottom of the acarsmap.php file (or specific to the template file you are using): refreshTime: 20000, Where 20000 is in milliseconds, therefore giving a 20 second refresh rate. Now every 20 seconds, the map (and table) will update using the populateMap() function here https://github.com/nabeelio/phpvms_v2/blob/master/lib/js/acarsmap.js#L141 as specified in the previous AJAX call. I haven't tried this myself, but I would think you would be able to just change this line https://github.com/nabeelio/phpvms_v2/blob/master/lib/js/acarsmap.js#L147 to if (data.length == 0) { $("#acars_map_table").hide(); // Or .css("display", "none"); return false; } $("#acars_map_table").show(); // or .css("display", "block"); And then in acarsmap.php add an id to the table, change this <script type="text/html" id="acars_map_bubble"> <table width="250px"> to this <script type="text/html" id="acars_map_bubble"> <table width="250px" id="acars_map_table"> And you would have to give the id to the table on the dashboard template as well. Hope you have some luck with this.
  20. Which list of flights, the user side cards or the admin side? And what subfleet information are you looking for? If the user cards then try this: After this line: https://github.com/nabeelio/phpvms/blob/dev/resources/views/layouts/default/flights/table.blade.php#L57 Add this: <h5 class="pt-2 mb-0">Available Subfleets:</h5> @if($flight->subfleets) @foreach($flight->subfleets as $subfleet) <span class="title">FLEET:&nbsp;</span> {{ $subfleet->type }} - {{ $subfleet->name }} <br /> @endforeach @endif
  21. Had a suspicion that would be the case. On the same line (The one that you just put in, Auth::$pilot = $pilot;), try and replace it with this: Auth::$pilot = PilotData::getPilotData($pilot->pilotid); If that doesn't work, try and replace these 3 functions and see if that works for you
  22. Did you manage to try the second part of that and did it work? If not then there's a couple more steps that need to be done.
  23. What do you mean by this? It looks like it is correct as two A320 NEO aircraft are showing up. Are there supposed to be more planes showing up? Check that the aircraft have the correct ICAO (A20N) and airline (AKD) set in the admin panel. If you mean how can you book more than one plane, than that is not possible at the moment, nor is it realistic. If you mean how can you have every plane in the database show for a route (is there another module for that?) or more than one aircraft type per route, then this is also not possible at this stage, but I would consider it for a future update.
  24. What happens if you replace if($this->post->action == 'saveprofile') { $this->save_profile_post(); } with if($this->post->action == 'saveprofile') { $this->save_profile_post(); $this->editProfile(); return; } Check if that has worked first, and if not try adding this: Auth::$pilot = $pilot; After this line in save_profile_post() function (around line 226) PilotData::SaveFields($pilot->pilotid, $_POST); That's a workaround (not ideal) so that the editProfile() function doesn't have to be changed slightly.
  25. Haven't tested this but this is one way to go about it. Go to here: https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/modules/PIREPS/PIREPS.php#L401 And change it to $pilotid = $this->post->pilotid; Note: The pilot you are entering for must have a bid already. Here, https://github.com/DavidJClark/phpvms_5.5.x/blob/master/core/templates/pirep_new.php#L10 You would need to change this to something like this <dd> <select name="pilotid"> <option value="">Select a Pilot</option> <?php $allpilots = PilotData::getAllPilots(); foreach($allpilots as $pilot) { echo '<option value="'.$pilot->pilotid.'">'.PilotData::getPilotCode($pilot->code, $pilot->pilotid).' - '.$pilot->firstname.' '.$pilot->lastname.'</option>'; } ?> </select> </dd> You may also have to alter the FilePIREPForm() function a little. This is answering the question, although I would recommend (if you have a lot of pilots) that you use a textbox and a JS AJAX request so that the list isn't really long and would require a lot of scrolling. Hope this helps in some way. Edit: Looks like Yash got there first.
×
×
  • Create New...