Ither
Members-
Posts
54 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by Ither
-
AH, gotcha -- OK. Did you by chance convert to OSM? I'm considering grabbing it but it looks like the company is super quiet. I have their Charter/Cargo so far and I haven't had much trouble. I do run OSM for other maps and I wasn't sure how difficult it was to migrate to and if you had. My two biggest wants is having the actual path shown on live map when you click pilot and of course having it on the PIREP instead. It seems that module does it as I can tell.
-
I couldn't find answer besides "CC Flight Tracker' module -- is there a secret trick to enabling raw data on PIREPS? I did shoot message over to SmartCARS to ask them but wanted to check here first. I found couple threads about it but they ultimately ended up as "SmartCARS can but I went to CC Flight Tracker."
-
Web... You are awesome! That is exactly what I needed.
-
Does anyone know how to write code that will hide the table if no flights exist? Show when they do? It bothers me that I have a table header showing of my column titles below ACARS map and no flights. I don't know JS well enough to build if/else on this (I can't do it in PHP) nor do I quite understand how the ACARS traffic is flowing. These are from Nabeel's OSM migration files. ACARSMAP.php <?php /** * These are some options for the ACARS map, you can change here * * By default, the zoom level and center are ignored, and the map * will try to fit the all the flights in. If you want to manually set * the zoom level and center, set "autozoom" to false. * * You can use these MapTypeId's: * http://code.google.com/apis/maps/documentation/v3/reference.html#MapTypeId * * Change the "TERRAIN" to the "Constant" listed there - they are case-sensitive * * Also, how to style the acars pilot list table. You can use these style selectors: * * table.acarsmap { } * table.acarsmap thead { } * table.acarsmap tbody { } * table.acarsmap tbody tr.even { } * table.acarsmap tbody tr.odd { } */ ?> <div id="acarsmap" class="routemap"></div> <script src="<?php echo SITE_URL?>/lib/js/base_map.js"></script> <script src="<?php echo SITE_URL?>/lib/js/acarsmap.js"></script> <?php /* This is the template for the little map bubble which pops up when you click on a flight Same principle as above, keep the <%=...%> tags intact. The same variables are available to use here as are available above. */ ?> <script type="text/html" id="acars_map_bubble"> <table width="250px"> <tr> <td colspan="2"><b>Pilot: </b><a href="<?php echo url('/profile/view');?>/<%=flight.pilotid%>"><%=flight.pilotname%></a></td> </tr> <tr> <td width="125px"><b>Departure: </b><%=flight.depicao%></td> <td width="125px"><b>Arrival: </b><%=flight.arricao%></td> </tr> <tr> <td><b>Flight: </b><%=flight.flightnum%></td> <td><b>Aircraft: </b><%=flight.aircraftname%></td> </tr> <tr> <td><b>Distance: </b><%=flight.distremaining%> <?php echo Config::Get('UNITS');?></td> <td><b>ETE: </b><%=flight.timeremaining%></td> </tr> <tr> <td colspan="2"><b>Status: </b><%=flight.phasedetail%></td> </tr> </table> </script> <?php /* This is a small template for information about a navpoint popup Variables available: <%=nav.title%> <%=nav.name%> <%=nav.freq%> <%=nav.lat%> <%=nav.lng%> <%=nav.type%> 2=NDB 3=VOR 4=DME 5=FIX 6=TRACK */ ?> <script type="text/html" id="navpoint_bubble"> <span style="font-size: 10px; text-align:left; width: 100%" align="left"> <strong>Name: </strong><%=nav.title%> (<%=nav.name%>)<br /> <strong>Type: </strong> <?php /* Show the type of point */ ?> <% if(nav.type == 2) { %> NDB <% } %> <% if(nav.type == 3) { %> VOR <% } %> <% if(nav.type == 4) { %> DME <% } %> <% if(nav.type == 5) { %> FIX <% } %> <% if(nav.type == 6) { %> TRACK <% } %> <br /> <?php /* Only show frequency if it's not a 0*/ ?> <% if(nav.freq != 0) { %> <strong>Frequency: </strong><%=nav.freq%> <% } %> </span> </script> <script type="text/javascript"> <?php /* These are the settings for the Google map. You can see the Google API reference if you want to add more options. There's two options I've added: autozoom: This will automatically center in on/zoom so all your current flights are visible. If false, then the zoom and center you specify will be used instead refreshTime: Time, in seconds * 1000 to refresh the map. The default is 10000 (10 seconds) */ ?> const opts = { render_elem: 'acarsmap', provider: '<?php echo Config::Get("MAP_TYPE"); ?>', autozoom: false, zoom: <?php echo Config::Get('MAP_ZOOM_LEVEL'); ?>, center: L.latLng("<?php echo Config::Get('MAP_CENTER_LAT'); ?>", "<?php echo Config::Get('MAP_CENTER_LNG'); ?>"), refreshTime: 20000, autoClose: false }; renderAcarsMap(opts); </script> <script type="text/html" id="acars_map_row"> <tr class="<%=flight.trclass%>"> <td height="40"><%=flight.flightnum%></td> <td class="hidden-xs"><a href="<?php echo url('/profile/view');?>/<%=flight.pilotid%>"><%=flight.pilotname%></a></td> <td><%=flight.aircraftname%></td> <td class="hidden-xs"><%=flight.depicao%></td> <td class="hidden-xs"><%=flight.arricao%></td> <td class="hidden-xs"><%=flight.phasedetail%></td> <td class="hidden-xs"><%=flight.alt%> ft</td> <td class="hidden-xs"><%=flight.gs%> kts</td> <td><%=flight.distremaining%> <?php echo Config::Get('UNITS');?></td> <td><%=flight.timeremaining%></td> </tr> </script> Live Flights Table (this is what I call onto dashboard.) <?php /** * These are some options for the ACARS map, you can change here * * By default, the zoom level and center are ignored, and the map * will try to fit the all the flights in. If you want to manually set * the zoom level and center, set "autozoom" to false. * * You can use these MapTypeId's: * http://code.google.com/apis/maps/documentation/v3/reference.html#MapTypeId * * Change the "TERRAIN" to the "Constant" listed there - they are case-sensitive * * Also, how to style the acars pilot list table. You can use these style selectors: * * table.acarsmap { } * table.acarsmap thead { } * table.acarsmap tbody { } * table.acarsmap tbody tr.even { } * table.acarsmap tbody tr.odd { } */ ?> <?php /* See below for details and columns you can use in this table */ ?> <table border = "0" width="100%" class="acarsmap table table-striped"> <thead> <tr height="40"> <th><b>Flight</b></th> <th class="hidden-xs"><b>Pilot</b></th> <th><b>Aircraft</b></th> <th class="hidden-xs"><b>Departure</b></th> <th class="hidden-xs"><b>Arrival</b></th> <th class="hidden-xs"><b>Status</b></th> <th class="hidden-xs"><b>Altitude</b></th> <th class="hidden-xs"><b>Speed</b></th> <th><b>Distance</b></th> <th><b>ETE</b></th> </tr> </thead> <tbody id="pilotlist"></tbody> </table> <?php /* This is the template which is used in the table above, for each row. Be careful modifying it. You can simply add/remove columns, combine columns too. Keep each "section" (<%=...%>) intact Variables you can use (what they are is pretty obvious) Variable: Notes: <%=flight.pilotid%> <%=flight.firstname%> <%=flight.lastname%> <%=flight.pilotname%> First and last combined <%=flight.flightnum%> <%=flight.depapt%> Gives the airport name <%=flight.depicao%> <%=flight.arrapt%> Gives the airport name <%=flight.arricao%> <%=flight.phasedetail%> <%=flight.heading%> <%=flight.alt%> <%=flight.gs%> <%=flight.disremaining%> <%=flight.timeremaning%> <%=flight.aircraft%> Gives the registration <%=flight.aircraftname%> Gives the full name <%=flight.client%> FSACARS/Xacars/FSFK, etc <%=flight.trclass%> "even" or "odd" You can also use logic in the templating, if you so choose: http://ejohn.org/blog/javascript-micro-templating/ */ ?> <script type="text/html" id="acars_map_row"> <tr class="<%=flight.trclass%>"> <td height="40"><%=flight.flightnum%></td> <td class="hidden-xs"><a href="<?php echo url('/profile/view');?>/<%=flight.pilotid%>"><%=flight.pilotname%></a></td> <td><%=flight.aircraftname%></td> <td class="hidden-xs"><%=flight.depicao%></td> <td class="hidden-xs"><%=flight.arricao%></td> <td class="hidden-xs"><%=flight.phasedetail%></td> <td class="hidden-xs"><%=flight.alt%> ft</td> <td class="hidden-xs"><%=flight.gs%> kts</td> <td><%=flight.distremaining%> <?php echo Config::Get('UNITS');?></td> <td><%=flight.timeremaining%></td> </tr> </script>
-
Profile Module; redirect on update (success or error)
Ither replied to Ither's topic in Support Forum
That solved it; now it's pulling data correctly. It also now returns to edit profile page and gives you the error/success instead of tossing you to the main dashboard. -
Profile Module; redirect on update (success or error)
Ither replied to Ither's topic in Support Forum
Same situation; it works fine in regards to updating the columns in the database--but the this-> editprofile just pulls back up previous data in cache -
Profile Module; redirect on update (success or error)
Ither replied to Ither's topic in Support Forum
Oh. I didn't think I had to do that since it did update in database and took me to edit profile page. Let me make those modifications and I'll report back soon. -
Profile Module; redirect on update (success or error)
Ither replied to Ither's topic in Support Forum
Yes and no; it did update the database but when it returned to edit profile the value was previous value. If I hit refresh then the field would show update. -
How do I push user back to his profile edit page if core_success or core_error is thrown? In the code below index() pulls profile_main.php which is not used (at all)--I can't set profile_edit because if I do then it shows no data. Is there way to force index() to move on to public function view($pilotid='') where the actual profile builds? public function index() { if(!Auth::LoggedIn()) { $this->set('message', 'You must be logged in to access this feature!'); $this->render('core_error.php'); return; } /* * This is from /profile/editprofile */ if(isset($this->post->action)) { if($this->post->action == 'saveprofile') { $this->save_profile_post(); } /* this comes from /profile/changepassword */ if($this->post->action == 'changepassword') { $this->change_password_post(); } } $pilot = PilotData::getPilotData(Auth::$pilot->pilotid); if(Config::Get('TRANSFER_HOURS_IN_RANKS') == true) { $totalhours = $pilot->totalhours + $pilot->transferhours; } else { $totalhours = $pilot->totalhours; } $this->set('pilotcode', PilotData::getPilotCode($pilot->code, $pilot->pilotid)); $this->set('report', PIREPData::getLastReports($pilot->pilotid)); $this->set('nextrank', RanksData::getNextRank($totalhours)); $this->set('allawards', AwardsData::getPilotAwards($pilot->pilotid)); $this->set('userinfo', $pilot); $this->set('pilot', $pilot); $this->set('pilot_hours', $totalhours); /*$this->render('profile_main.php');*/ CodonEvent::Dispatch('profile_viewed', 'Profile'); }
-
Leaflet Live Map (Remove Points after closing popup (solution)
Ither replied to Ither's topic in Support Forum
See first post for solution on what I wanted. -
Leaflet Live Map (Remove Points after closing popup (solution)
Ither replied to Ither's topic in Support Forum
I thought that 10,000 was refresh rate of the map. Is that the only way to clear markers? Update it doesn't clear markers for me. I click on airplane; I get the markers for dep/arr/nav fixes and bubble over aircraft showing details. In 10 seconds the bubble disappears but the markers stay and I'm stuck zoomed in on that flight. I want the opposite to happen; I want all markers to go away at most. So that when I zoom out I have clean map of just airplane icons until I click another flight. I've seen other maps do it with Google where you click X on navbubble and it clears everything. I'm not real good with leaflet so I haven't found magic button that does it. I see where markers get pushed tho. -
Leaflet Live Map (Remove Points after closing popup (solution)
Ither posted a topic in Support Forum
Hi. I grabbed Nabeel files for moving to leaflet and all is well except 1 thing--whenever you click on an aircraft that's on live map you get the bubble popup that shows flight info, nav markers for route, etc. However, when you click X the only thing that disappears is navbubble. How do you get all the markers clear? --- SOLUTION --- If you want the points to disappear when clicking "X" in the pop up find the following in acarsmap.js .bindPopup(tmpl("navpoint_bubble", { nav: nav })) .bindPopup(detailed_bubble) and replace with .bindPopup(tmpl("navpoint_bubble", { nav: nav })).on("popupopen", () => { $(".leaflet-popup-close-button").on("click", e => { clearSelMarkers(); }) }) .bindPopup(detailed_bubble).on("popupopen", () => { $(".leaflet-popup-close-button").on("click", e => { clearSelMarkers(); }) }) -
You can get 1902 from here.
-
Does anyone have a thought on how I go about figuring out why a pirep wasn't approved? 4 out of 5 flights were auto approved; 5th one is sitting at pending. The only difference is I have no criteria specified now -- previously I had the defaults but found I didn't want them. Do I have to specify some kind of criteria for it to work? I don't appear to have any errors in the php log. And I'm assuming now that it failed because I had nothing defined in "Criteria". I guess I must have at least "1" criteria in the list.
-
It's freeware; here is link: https://github.com/web541/phpVMS-FltbookSystem-v2 He just wrote me back with some guidance; it's modifications required in the TFDI interface file and he didn't want to publicly post them out of respect. I'm going to find the issue which I know is because the table is modified for FltbookSystem to work. One of reasons I want this plugin is that it allows me to import say Delta Airlines schedule; set all the flight registrations to fake reg aircraft that is disabled; then it gives drops down for user to select any plane in fleet. Since my VA is not like real airliner; I want my pilots to have option to fly any one of 17 types in our fleet.
-
Yep, they show up on bid page but not in SmartCARS. Once I modify the DB and install FltSystem it stops and when I back it all out it returns. I sent a PM to Web; he did say there was something that had to be changed; a foreach function but he didn't say what.
-
I ended up getting a VPS; should have from start. I've now got everything running silky smooth.
-
Does anyone know the trick to the SmartCARS to get it to show bids? I'm getting "You have no bids." I saw the post where Web said there was something but didn't list it.
-
I figured out the error. Here is what I was getting; [08:07:51 PM] [ERROR] An unknown or unsatisfactoy response was received during the PIREP filing. It was : <br /> <b>Warning</b>: imagecreatefromstring(): Empty string or invalid image in <b>/home/u565345103/domains/walkerair.us/public_html/crew/core/common/PilotData.class.php</b> on line <b>1016</b><br /> <br /> <b>Fatal error</b>: Call to undefined method PilotData::UpdatePilotPay() in <b>/home/u565345103/domains/walkerair.us/public_html/crew/core/common/PirepAcData.class.php</b> on line <b>170</b><br /> The first error "imagecreatefromstring" was due to me not using full URL or rank images--I had to go back and modify that in admin. The second error was that UpdatePilotPay() is missing from the Autopirep zip file in this thread. Unknown why but I managed to find a link to file that had the entire function (it was also not in the phpvms I downloaded either.... weird) Once I did that my pireps were going through with no error from SmartCARS. Here is code that was missing from PilotData.class.php /** * Update a pilot's pay. Pass the pilot ID, and the number of * hours they are being paid for * * @param int $pilotid The pilot ID * @param int $flighthours Number of hours to pay the pilot for * @return bool Success * */ public static function updatePilotPay($pilotid, $flighthours) { $sql = 'SELECT payrate FROM '.TABLE_PREFIX.'ranks r, '.TABLE_PREFIX.'pilots p WHERE p.rank=r.rank AND p.pilotid='.$pilotid; $payrate = DB::get_row($sql); $payupdate = self::getPilotPay($flighthours, $payrate->payrate); $sql = 'UPDATE '.TABLE_PREFIX.'pilots SET totalpay=totalpay+'.$payupdate.' WHERE pilotid='.$pilotid; DB::query($sql); if(DB::errno() != 0) return false; return true; }
-
It is a new database; I have no previous data. I did google and it's leading me to issues with php and mysql api/library versions. Talking to my hosting provider I have no options to interchange between the php/mysql libraries--they're preset by whatever "version" they install. I would need to move to a VPS to have control -- which I am highly considering now because if I open this up to people I would like it to run smoothly.
-
Did anyone find reason for SmartCARS error? I'm too getting the issue now. The auto-accept is GREAT.
-
Disregard; my latest install was with MySQL. If I install using MySQLI (Extended) I get this error. Warning: mysqli::mysqli(): Headers and client library minor version mismatch. Headers:50562 Library:100138 in /home/u565345103/domains/walkerair.us/public_html/crew/core/classes/ezdb/ezdb_mysqli.class.php on line 101 Warning: mysqli::mysqli(): Headers and client library minor version mismatch. Headers:50562 Library:100138 in /***/public_html/crew/core/classes/ezdb/ezdb_mysqli.class.php on line 101 Host said I cannot change my install; so I would have to move to VPS to have any control. Here is phpinfo page to show what server has. http://walkerair.us/phpinfo.php
-
I don't get this -- so I originally had phpVMS 5.5.2 from Simpilot github; with anything over php 5.3 it threw error listed above. I just went to iCrew github (I run iCrew Lite--it threw errors even with Cystal template) and saw they have a fork of Simpilots phpVMS; I just installed that and put my php version to 5.6 with 10.1.38-MariaDB -- errors are gone. Everything is fine. Maybe I was downloading the wrong Simpilot 5.5.2? Who knows.
-
I have this same problem.
-
I was starting with a shared host at Hostinger for dev practice;testing. It seems like php 5.5 or php 5.6 ends up with MariaDB 10.1.38-- Warning: mysqli::mysqli(): Headers and client library minor version mismatch. Headers:50549 Library:100138 in /*/public_html/dev/core/classes/ezdb/ezdb_mysqli.class.php on line 97 If I back down to php 5.3 error goes away and I'm using MySQL 5.1 (think, need to look again). However, I noticed that when I completed a flight my stats on pilot (verified in db) did not change. Total flight is still 0, total hours is still 0. My assumption is something in php 5.3 isn't working and I need to get up to 5.5/6? I've tested with Simpilot's 5.5.x version as well as Nabel v2 Master which I believe is updated to php and supporting 5.6+. -- Did reach out to Hostinger but my guess is they can't do anything on "shared" setup. Perhaps I need to jump to cloud host or vps?