-
Posts
2773 -
Joined
-
Last visited
-
Days Won
3
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by simpilot
-
American Airlines Virtual | Arriving September 27, 2014
simpilot replied to B77W's topic in Virtual Airlines Discussion
Forgive me if this shows how old or out of touch I am but I have seen the phrase "Cloud Based Pilot Center" twice over the last few days. What is this? Is this simply a reworked version or idea of the old IFE that seemed to be popular for a bit? Like this? http://forum.phpvms.net/topic/5393-in-flight-entertainment-system/ http://forum.phpvms.net/topic/7863-whats-with-ife-dont-get-it/ -
Then yes, this should get you the field from your database. Just make sure the name is the same as you have set in the table. In your example you have "Aircraft", if it is "aircraft" in your table then you probably not going to see it, you will probably get an error that the variable is undefined. <?php echo $allfields->Aircraft; ?>
-
What changed when this started? Were changes made to your phpVMS install, was the server updated? Is there anything in the server/error logs?
-
I think that I may be mis-understanding what you are trying to do. Is this a custom field added to the pilot profile through the phpvms admin panel, or is this a field you have manually added to another database table?
-
I believe if you search there are a couple of phpbb scripts to auto register new phpvms users, by vanseers I think. I do not have any plans to build a bridge for it.
-
events/sidebar_events.php MENU NOT SHOWING
simpilot replied to ChrisTaylor's topic in Simpilot Group Addons
It looks like you have made a change to the code that has caused a php error. Try to only replace the "php" with "tpl" and save the file. -
I would try running the update.php after you back everything up. I do not see any obvious reason it would not work. It would also depend in your native phpVMS tables not being customized as well.
-
Add something like $this->set('allfields', PilotData::GetFieldData($pilotid, false)); to your controller replacing the $pilotid with whatever is relevant for that controller and then in your template use the "allfields" variable to show the fields you want.
-
Try a var_dump($awards); at the start of your template and see if there is anything in the variable. It is most likely empty, then start working your way back to the originating function.
-
Double Post -> http://forum.phpvms.net/topic/21468-eventssidebar-eventsphp-menu-not-showing/
-
events/sidebar_events.php MENU NOT SHOWING
simpilot replied to ChrisTaylor's topic in Simpilot Group Addons
Take a look at the line near the top of /admin/modules/events_admin/Events_admin.php that looks something like: $this->set('sidebar', 'events/sidebar_events.php'); Make sure the ending ".php" matches the type of template you are using, most likely it needs to be ".tpl" -
It is probably how they are being added. The core system converts all the times to hours and minutes instead of just adding them together. The system uses the function -> Util::AddTime <- when figuring the pilot hours versus the module just add up the raw numbers in that column.
-
No just add the line I show right above the existing line to add it to the array. then in your template you should be able to do something like <img src="path/to/my/image/<%=flight.flightcode%>.jpg" alt="alt" />
-
Is there an option to show the monthly profit?
simpilot replied to CedGauche's topic in Support Forum
Does it show the same thing on the regular financials page? I am guessing the calculation in the data class is not right if they match. -
Best way to do it is probably to add it to the initial call for data. In /core/modules/ACARS/ACARS.php find $this->acarsflights[] = $c; and add $c['flightcode'] = substr($c['flightnum'], 0, 3); on the line above it. Now in your acars map template you should have the js variable <%=flight.flightcode%> available that holds only the ABC of the flight number. NOTE: this is a core file hack so in an update it will be overwritten. Best thing would be to create a new module that holds this code to protect it in an update.
-
Is it a two hour difference for the other pilot as well?
-
Is there an option to show the monthly profit?
simpilot replied to CedGauche's topic in Support Forum
You must be on a newer version of php, that is an error that crops up in newer versions when you have not declared a new object and you try to use it. Try adding $finances = new stdClass(); prior to the code snippet. You may have to do the same thing for $month_info -
"load" is a reserved word in MySql so it needs to be escaped in order to be used in anything outside of its function. Also "get_results($sql)" is going to return an array when in this case you want an object so you should use "get_row()" $query = "SELECT SUM(`load`) AS `total_pax` FROM ".TABLE_PREFIX."pireps WHERE pilotid = $pilotid"; $result = DB::get_row($query); echo $result->total_pax; This works as long as you have the correct variable for the $pilotid. I would also suggest putting the sql query into a model and not in your template.
-
Problems since hosting updated php and mysql
simpilot replied to VatmeGroup's topic in Support Forum
http://forum.phpvms.net/topic/20629-most-common-fixes-phpvms-installation/page__hl__%26%23036%3B_files http://forum.phpvms.net/topic/15623-fatal-error/page__hl__%26%23036%3B_files http://forum.phpvms.net/topic/16816-solvedmultiple-errors-after-restore/page__hl__$_files#entry85887 -
Yes, then use php to trim off everything after the first three digits.
-
Do you have 2 transfer hours set for him? The public profile page includes transfer hours in with the actual PIREP hours which the TopPilot script does not.
-
If you have data in the database it looks like it should work. It is not my code so I would be guessing past anything other than if there is data for the module to calculate. Maybe try using var_dump on the incoming data variables and see what if anything is there.
-
If you are going to offer long term support for the system I can create a forum for it if you would like. Let me know.
-
I would guess you do not have the negative (-) sign in front of the longitude value, that would put it in the middle of the North Sea. They should be - 55.950785 -3.361453
-
Is there an option to show the monthly profit?
simpilot replied to CedGauche's topic in Support Forum
You could use the Finance Data class to get the info in an array, something like $month_info->timestamp = time(); $finances = FinanceData::calculateFinances($month_info); Then you should have the $finances variable filled with; revenue gross fuelprice pilotpay so to show total revenue for the month you could use echo $finances->revenue