Jump to content

simpilot

Administrators
  • Posts

    2773
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by simpilot

  1. Good catch Jeff, that is one of the bugs with the EXAMCenter addon as well, and on the list if I ever do rewrite it.
  2. Nice Work Lorenzo! Nice to see you contributing to phpVMS
  3. The functions are all already in phpVMS to do this, you just need to add a little direction. In the PIREPData class in the filePIREP function add a directive that IF the LANDINGRATE is less than -300 (or whatever number you want) then direct the class to use the PilotData class function updateProfile to deduct whatever pay you want to from the pilot. In between you will have to use the getPilotPay function in PilotData to get the current pay to start your equation.
  4. http://forum.phpvms.net/topic/2826-gallery/page__view__findpost__p__22093 - Probably Soon -
  5. As NEvA has been closed down and will probably disappear after September of this year, I will start releasing some of the scripts used to build it, this one included. Ill see what I can do to build a generic package this week for the screenshot script.
  6. Add something like this to your statsdata class -> public static function TotalCargoCarried($airline_code = '') { $key = 'total_cargo_carried'; if($airline_code != '') { $key .= '_'.$airline_code; } $total = CodonCache::read($key); if($total === false) { $params = array( 'table' => TABLE_PREFIX.'pireps', 'fields' => 'SUM(`load`) as `total`', 'where' => array( 'accepted' => PIREP_ACCEPTED, 'flighttype' => 'C' ), ); if(!empty($airline_code)) { $params['where']['code'] = $airline_code; $params['group'] = 'code'; } $sql = DB::build_select($params); $results = DB::get_results($sql); if(!$results) { $total = 0; } else { $total = $results[0]->total; } CodonCache::write($key, $total, '15minute'); } return $total; } And use -> <?php echo StatsData::TotalCargoCarried(); ?> to display it
  7. simpilot

    Airport Tables

    No, doesnt look like he has been on the site since late June.
  8. Look back through the posts, I posted what you have to change to make it work for your custom table but you keep bringing the native code that Jeff posts back which will not work in your situation.
  9. Then it is the template, there are a few in the skinning threads for the new version phpVMS, but your best bet is to probably take some time and create your own.
  10. When I go to your site it looks like you have never installed the application, if you have maybe the local.config.php file has gotten deleted, overwritten, renamed, or corrupted. If your data is still in the database you can get it back, you just need to create a new config file.
  11. Did you try changing the template back to the stock supplied crystal template to see if the maps worked within it as I had posted a couple of posts back? It would verify if it is a template or application issue.
  12. Most developers setup a test instance on their local pc to do their editing work and testing, then load the edited files up to their site, that way you avoid things like this.
  13. What you are probably refering to is that the database auto increments the pilot id's, even if you delete one it does not set the database back prior to the line number you deleted, you can go in the database and edit the auto increment value, which I would highly suggest against doing, as almost everything in the system is tied back to a pilot id (ie PIREPS, Groupmembers, etc...)
  14. Need to give us a little more info than "the pilot numbers is off". There are ways to set offsets and starting numbers for pilot id's, they are posted throughout the forums if this is what you are refering to.
  15. Change your template back to the crystal template included with the application and see if the maps work, I really think this is a template issue. Are you on a free host?
  16. I just looked and your avatar file at http://virtualamerican.org/lib/avatars/AAL001.png does not exist, you get a 404 error. Do you have write permissions set correctly on the folders for the avatars? Look in the avatars folder and see if there are actually any avatars in it. Also, it really looks to me like you are using a 1.0 based template on the 2.x phpVMS system, it may be part of the issue.
  17. The pilot groups (ie admins, pilots, managers, etc...) are configured in the groups table and then the pilot assignments use the groupmembers table. This allows a pilot/member to be a member of more than one group. Permission sets are based off of a bitwise value system that is embeded in the app.config.php file in the core folder and then the value for each group is stored within the groups table. Hope this helps. Then as Jeff says, the control panel for these values in in the admin center.
  18. What version are you guys running? Maybe something has changed in the latest that is cracking this script, it has worked up till now. It is designed to fall back and place the pilot at their hub if they have never filed a PIREP.
  19. @Jacob Are you using clowdy with 2.x? I do not think it is fully compatable with 2.x, it was designed for 1.0. Try replacing the acars map template with the newest version out of the 2.x download. I think this may solve your problems, and replace the route map template as well.
  20. Check your pilots table to see if there is actually a pilot with pilotid 1 - Do you have an offset set or something? - This code works on my development site, my va, and all the other va's that have installed it. Try using pilot id 2.
  21. Try putting <?php FinanceData::updateAllExpenses(); ?> in one of your pages and refresh the page one time, it should populate all the finance data. Remove it once it has run, as it will run everytime that page is called. I will look to try and find the change that disrupted the automated part.
  22. @MrAmsterdam Without a link it is hard to tell, but my guess is that you are not passing a pilot id to the function so it does not know what to look for in the database and is returning an empty variable. Read my post here -> http://forum.phpvms.net/topic/2989-touchdownstats-10/page__view__findpost__p__21572 for this additional code and make sure you are calling the data as specified, I imagine the label 'pilot#' has not been replaced with a variable.
  23. The data is not there, the tpl only calls the field name for the departure field once for each departure field. You can use the coding on line 49 of timetable_index.tpl as guide to get the field name you are looking for.
  24. <?php echo 'Pilot average landing rate '.round(TouchdownStatsData::pilot_average('pilot#'), 2); ?>
×
×
  • Create New...