Jump to content

Tom

Members
  • Posts

    1517
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Tom

  1. Tom

    php help

    I don't think you're going to have much luck with this unless you can use the javascript variables already given in the comments (which wouldn't really allow you to do what you want). The way the ACARS map is done is unfortunately really... odd.
  2. If you go and edit the first post you can add [sOLVED] to the topic title
  3. Well, if you're using separate airline codes for pax and cargo (which from reading your about page it looks so) you can just use <?php echo StatsData::TotalPaxCarried(MER); ?> for pax and <?php echo StatsData::TotalPaxCarried(somethingelse); ?> for cargo.
  4. It does. Pax and cargo aren't stored separately, they're just stored in 'load' - this function just adds it all up.
  5. Looks like either: 1. He doesn't have a font called Arial regulor 2. Someone can't spell Regular
  6. Technically you should have them I believe, but it doesn't really matter
  7. Tom

    php help

    Your PHP is fine, your maths is not as good <?php $flown = 20; $total = 100; $final_percentage = ($flown/$total) * 100; echo "Final Percentage: ".$final_percentage; ?>%
  8. I could make an iPhone skin for the admin panel (work on some kind of automagic detection too) and you could add it to the home screen as a web app...
  9. Tom

    VAForum 2

    Oh... well... As for alignment, you can do something like: ' [left]' => '<div style="float:left;">', '[/left] ' => '</div>' perhaps.
  10. Tom

    VAForum 2

    Could you paste your arrays please? In their entirety.
  11. Tom

    VAForum 2

    Okay, make sure when you're adding new ones that you have commas in the right places, after the original last array item and not after the new last item. You won't need to change anything other than the two arrays.
  12. Tom

    VAForum 2

    Could you paste your new BBCode arrays?
  13. If you only want it to appear on the frontpage: <?php if(MainController::$activeModule == 'FRONTPAGE'){ ?> <!-- Do stuff --> <?php } ?>
  14. In core/modules/Downloads/Downloads.php: public function index() { if(!Auth::LoggedIn()) { echo 'You must be logged in to access this page!'; return; } if(Auth::$userinfo->totalhours < 10){ echo 'You are not permitted access to downloads yet.'; return; } $this->set('allcategories', DownloadData::GetAllCategories()); $this->render('downloads_list.tpl'); } Slightly smaller and easier to manage than the above
  15. Vansers I just installed this for them. They haven't touched it. kairon, I know... I'd like to think I'm pretty good with skinning Hence the confusion.
  16. I just installed a copy of phpVMS for someone on an addon domain they have literally just created in their cpanel, with a fresh copy of phpVMS downloaded from the site. For some strange reason, despite the topbanner.jpg file I uploaded being the regular phpVMS one, it displays "Aurela Airlines" Take a look: http://www.nationwidevirtual.com/ Huh?
  17. I'm not sure if this is an issue with the rewrite, but when using actionurl() it just acts as a url() - I went into the actionurl function in whichever file it hides in and removed the if statement, seems to work now.
  18. My bad you want the view function... Assuming you haven't modified it, and I haven't modified it (taking this from EUG profile.php which I may have edited): public function view($pilotid='') { if(!is_numeric($pilotid)) { preg_match('/^([A-Za-z]*)(\d*)/', $pilotid, $matches); $code = $matches[1]; $pilotid = intval($matches[2]) - Config::Get('PILOTID_OFFSET'); } $userinfo = PilotData::getPilotData($pilotid); if($userinfo->retired == '1'){ $this->set('message', 'Sorry, this profile is not available.'); $this->render('core_error.tpl'); return; } $this->title = 'Profile of '.$userinfo->firstname.' '.$userinfo->lastname; $this->set('userinfo', $userinfo); $this->set('allfields', PilotData::GetFieldData($pilotid, false)); $this->set('pireps', PIREPData::GetAllReportsForPilot($pilotid)); $this->set('pilotcode', PilotData::GetPilotCode($userinfo->code, $userinfo->pilotid)); $this->set('allawards', AwardsData::GetPilotAwards($userinfo->pilotid)); $this->render('pilot_public_profile.tpl'); $this->render('pireps_viewall.tpl'); }
  19. Could you paste from the start of the index function?
  20. It will show up on the map for 12 hours or so after you're actually flying, obviously the flight isn't still in progress. You can change the setting in local.config.php
  21. That wouldn't save you any time really, because the only useful information it could take from the plan is departure icao and arrival icao, possibly cruise altitude...
  22. That sounds like a good idea for a little web app I may look into it. In fact, it would be pretty awkward to code, and equally as awkward to use. You'd need to enter the dep/arr times, days of the week, flight num, price... blah blah. It wouldn't really save any time.
  23. From a glance, this appears to be turning your phpVMS schedules into MSFS flight plans. Turning them back into schedules would be useless.
×
×
  • Create New...