Jump to content

simpilot

Administrators
  • Posts

    2773
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by simpilot

  1. The sql syntax is the same as it would be in open php, then you can use the simple "DB::query(query)" to run the query within phpVMS without having to connect to the db and such. $query = 'INSERT INTO '.TABLE_PREFIX.'thetable (column) VALUES (data)'; DB::query($sql);
  2. simpilot

    Airport Tables

    @FlyAlaska You can build a little data class to count the pireps to that airport. Maybe this -> file AirportData.class.php in core/common <?php class AirportData extends CodonData { function get_number_flights($icao) { $sql = 'SELECT pirepid FROM '.TABLE_PREFIX.'pireps WHERE arricao="'.$icao.'"'; $result = DB::get_results($sql); return count($result); } } Then in your template call it out like this -> <?php echo 'Total Arrivals To KJFK: '.AirportData::get_number_flights('KJFK'); ?>
  3. Update to the new version here -> http://forum.phpvms.net/topic/1062-popupnewsmodule/page__view__findpost__p__17155
  4. You have two image calls there with "width=387px" in their style definitions and they are right next to each other so the minimum the page width will end up being is 774px or the images will break out of the container depending on how your site is built. It also looks like you are calling an image from weather underground that is 640px wide, which will do the same thing.
  5. It depends on what you are doing exactly, when you say remove, do you mean you are making the pilot inactive, or are you deleteing the pilot from the va completely. If you are just making them inactive you could just use the automated system built in and set it up in your config file for the ammount of days you want before they are auto "retired". That automatically sends out the email_pilot_retired.tpl to the pilot when it happens. If you are deleteing them completely you will have to build an even into the delete pilot function in PilotAdmin.php and then I would build a standalone module to listen for the event and send the email. You will have to watch the PilotAdmin file and update it as bneeded as it will be overwritten in a phpVMS update.
  6. Looks like you did not put the popupnews_list.tpl file in your core/templates or skin folder.
  7. Have you made sure to use the correct sql upload format, there are some choices when you go to import the file.
  8. It is set in index.php on line 64.
  9. I just found that the other site with this issue has the original version of AirMail (1.0) installed. I am not sure where it came from as I believe the only one posted here in the forum is the latest (2.1) at the beginning of this thread. Any version prior to 2.0 will not work with any phpVMS version past 785. Overwrite the files with the files at the start of this thread and either drop the airmail table from your database and run the new install sql file or use the update file to change the database from version 1.0.
  10. What is the link to your site?
  11. This is the second time today I have seen this pop up. I have just downloaded the copy of this module off of the site and installed it on a fresh install of ver934 without issue. Are you using the base template? if not try switching back to the crystal template and see if the module works and let me know.
  12. I use; <?php echo PilotData::getPilotCode($pilot->code, $pilot->pilotid); ?>
  13. You can use /action.php to go skinless and design the page how you would like. The template you call will have to include everything a normal web page would, head, html, etc.. but you will have phpVMS classes available as well. example: Create a controller with a template call class Clean extends CodonModule { function index() { $this->show('mytemplate.tpl'); } } Then create a template called mytemplate.tpl and put a complete webpage in it. You can link to different css or whatever you would like. Then link to it using action.php <a href="<?php echo SITE_URL; ?>/action.php/clean">My Link</a> You should have all the functionality of phpVMS classes available to you in the template as well.
  14. You may be putting it in between existing php tags, or there is an extra, or a missing curly brace somewhere.
  15. In your class you are calling "by_aircraft" But in your data model you have named the function "get_stats_by_aircraft"
  16. This needs to be asked in the skinning forum, it is not a coding issue with the module.
  17. Not sure what to tell you, I have tried it on a WAMP server here on my local machine, on XAMPP installed on a thumb drive, and on my live site which is running on a CENT OS 5.6 base with php 5.2.10. Try putting a simpler definition in there to see if it works. define('TEST_TRY', 'testing');
  18. It needs to be turned off. Your host will have to probably do it unless you have root access, ie, a vps or dedicated server.
  19. I put it in the same place you are indicating, right after the SITE_URL definition. Do you get the same problem if you add it but do not add the echo statement in the template?
  20. I believe your problem is a server side issue, not Exam Center; open_basedir restriction in effect Submit a ticket with your host to see if they will adjust the settings for your server. What are you using for a server? (dedicated, shared, vps, free, etc)
  21. The answer is in the question I believe; You are not using the correct user and/or password for your mysql database. Correct that and you should be fine.
  22. I just double checked it and it works fine on my test install. My guess is you have dropped or added a character somewhere in the file. Are you getting a headers already sent error as well?
×
×
  • Create New...