Jump to content

simpilot

Administrators
  • Posts

    2773
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by simpilot

  1. I ran into this recently with a site on a server that had just had some updates done. What I found was that it was a new conflict between the mod_rewrite server settings and the .htaccess file for the site. It may be the same thing for your site. If you have an .htaccess file in your root phpvms directory I would try removing it and see what happens, it may be a simple as that, or it may need to have some modifications made to it.
  2. There is nothing that is built into the module out of the box. You could add a function to the model to simply count the rows that are present in the comments table for image id "x"
  3. So if I understand this correctly it is a seperate pilot center on another server in case your site goes down? Are you live replicating databases between the two servers I am guessing? I guess I just do not get it, if it is simply to make your pilot center look different from the rest of your site it seems to me that there are much simpler ways to do it. As a pilot joining an airline with a "Cloud based pilot center" what does it do for me?
  4. 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/
  5. 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; ?>
  6. simpilot

    Kacars Error

    What changed when this started? Were changes made to your phpVMS install, was the server updated? Is there anything in the server/error logs?
  7. 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?
  8. 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.
  9. 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.
  10. 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.
  11. 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.
  12. 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.
  13. Double Post -> http://forum.phpvms.net/topic/21468-eventssidebar-eventsphp-menu-not-showing/
  14. 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"
  15. 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.
  16. 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" />
  17. 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.
  18. 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.
  19. Is it a two hour difference for the other pilot as well?
  20. 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
  21. "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.
  22. 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
  23. Yes, then use php to trim off everything after the first three digits.
  24. 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.
  25. 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.
×
×
  • Create New...