Jump to content

simpilot

Administrators
  • Posts

    2773
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by simpilot

  1. and where did you copy it from - lol
  2. Ok, did you have a set of schedules you need to have converted to the icao codes?
  3. Yes, and your folder name and file name needs to be "East" as well.
  4. Make sure your modules folder is within the modules folder and your file is within it: /core/modules/East/East.php You really should start all class files with a capital and also use a capital in the class declaration in your file class East extends CodonModule Some servers get a little picky with case and it usually can be tracked down to the naming of classes. You will save yourself some headaches with "headers already sent" errors by removing the closing php tag (?>) from your module files as well. Just a heads up also, Nabeel has started to transition the structure to the use of $this-> for commands within the files. $this->show('mytemplate.tpl'); or $this->render('mytemplate.tpl'); and to set data $this->set('data', $data);
  5. Hey, I just looked at what I have and I have a listing of all the worldwide icao codes and their iata conversion (for those that have one). If you want to send your list over I will convert it for you.
  6. Mark, do you have a conversion table for the codes? (ie ABC = KABC) If you do it would only take a little bit to write a quick script to convert all the codes. I have done it before for a limited number of airfields and can do it for you if you have some type of conversion.
  7. IMO - it would be better to have one install with multiple skins, one for each language, and allow the user to choose which one to be used. You can find the code to use multiple skins here -> http://forum.phpvms.net/topic/3252-user-selectable-skins/page__view__findpost__p__22043
  8. Don't add it, I took that right out of your existing css file, you just need to edit what you already have.
  9. Just looking quickly I would guess it is probably coming from your settings for height in your wrapper div #wrapper #body #left { height: 1500px; width: 200px; float: left; } #wrapper #body #right { width: 750px; float: right; height: 1500px; } I would just remove it, you may have to create a div to clear the previous before your footer but then it will adapt to the length needed for each page.
  10. Copied who's code?
  11. Are you set as an exam center admin? If this is an initial install are you pilot number 1 on the database in order to have admin permissions assigned automatically?
  12. <?php if(Auth::LoggedIn())//are they logged in? {//yes they are if(PilotGroups::group_has_perm(Auth::$usergroups, EDIT_PIREPS))//do they have permission to edit pireps? { //yes they do - do your stuff for pilots logged in and with the edit pireps permission } else { //no they dont - send them back to the home page } } else { //no they are not logged in - send them back to the home page } ?>
  13. The template extensions are determined in the core config files. You would have to start there and work your way through the entire system, as Mark says, not real sure why you would want to do this.
  14. You need to pick your phpvms database from the column on the left, when you click on it a listing of all the tables in that database will come up in the main screen. From there you need to use the import option from the menu across the top of that listing.
  15. Moved to paid services.
  16. That is the main issue - probably a permissions error but you can create your own to get going, try this -> Try this -> http://pastebin.com/yz5BRwrA <- it has a few extras in it as I stripped it out of a test va install but it should work. You will have to use your editor to set your database info. Also set your url and email address lower in the file. You can prbably solve the issue by changing the permissions to the core folder during install.
  17. try something like this <?php $pilotsflying = count(ACARSData::GetACARSData()); echo '<marquee align="left" direction="left" onmouseover="this.stop();" onmouseout="this.start();" behavior="scroll" width="600">'; if($pilotsflying > 0) { echo 'There are '.$pilotsflying.' xacars flights - click <a href="'.SITE_URL.'/index.php/acars">here</a> to view'; } else { echo 'Welcome to our site'; } echo '</marquee>'; ?>
  18. You can assign the count to a variable like $pilotsflying = count(ACARSData::GetACARSData()); then use an if command to check to see if the count is greater than 0 if($pilotsflying > 0) { Do Stuff }
  19. Things seem to be working on my site, is it not showing any, or just the latest?
  20. Can you verify that the local.config.php file is being created in the core folder, and if it is, is there anything in it? it should have the database settings in the very first part of it, are the values the same as what you used during the install?
  21. Are there any PIREPS filed? The sql command is trying to count info from them as well?
  22. Are your aircraft enabled and have schedules attached to them?
  23. The error is in the sql command for the database, replace it with: $sql = 'SELECT a.*, a.name AS aircraft, COUNT(p.pirepid) AS routesflown, SUM(p.distance) AS distance, SEC_TO_TIME(SUM(p.flighttime*60*60)) AS totaltime, AVG(p.distance) AS averagedistance, AVG(p.flighttime) as averagetime FROM '.TABLE_PREFIX.'aircraft a LEFT OUTER JOIN '.TABLE_PREFIX.'pireps p ON (p.aircraft = a.id) WHERE enabled = 1 GROUP BY a.name'; That will only show enabled aircraft. Also, I am not sure how the current location in the template is relavent unless you only have one unit of each model in your fleet. The module combines all the like aircrtaft in one group, then displays a current location, but that would be just for the last ac in the list. Just pondering... the module runs slow on my local machine, but I have a lot of data in the database. Might benefit in speed to combine some of the data calls from the template into the model.
  24. You can use the PIREP Data class to get the last location of the pilot. Something like: $location = PIREPData::getLastReports($pilot->pilotid, 1, ''); echo $location->arricao; Would output the icao of the arrival field of the last PIREP filed by the pilot. You can use Operationsdata to get the airfield name from there if you want more than the icao code.
×
×
  • Create New...