Code Snippets
Pieces of code you can use around your site
314 topics in this forum
-
- 5 replies
- 6.5k views
Hi all, Anybody knows how to do it? http://aviancavirtual.net/br/operations/route-network It's making me crazy trying to do it to my VA. Any help? Regards,
Last reply by Fabiodm, -
- 0 replies
- 3.7k views
Hello, How to recover some information on the log with the variables For example: 12:35 start engine 2, 12:50 overspeed .... Thanks for your help
Last reply by Salem, -
- 2 followers
- 16 replies
- 10.6k views
G'day Guys, I've been fidding around with METAR information, and have managed to get a working script of the VATSIM metar information. Best part about it is that there is NO iframes! Here is a quick shot to show you what it looks like For Departure Airport: <?php $metar = $_POST['metar']; $url = 'http://metar.vatsim.net/'.$schedule->depicao.''; $page = file_get_contents($url); echo $page; ?> For Arrival Airport: <?php $metar = $_POST['metar']; $url = 'http://metar.vatsim.net/'.$schedule->arricao.''; $page = file_get_contents($url); echo $page; ?> Hopefully you guys find this valuable
Last reply by Nabeel, -
- 1 follower
- 21 replies
- 9.3k views
Hello guys, I just wanted to share with you some code I have running on our logging site. For this to work you need Zumeweb's Pacific skin, stuartpb's Airport Information Addon and Vansers VFleetTracker added. This bit of code will display flights that have been bidded on on a table form with some cool links to the modules listed above. When there is a flight that has been bidded on something like this will appear: If no flights have been bidded on then this will appear: (not the latest flights table, the thing below that). Here is the code: <?php $lastbid = SchedulesData::GetAllBids(); if (count($lastbid) > 0) { ?> <div class="row-fluid"> &l…
Last reply by Heritage1, -
- 9 replies
- 3.2k views
Hey guys! I have a problem when coding this: <li class="list-group-item"> <b>Rank Progress</b> <div style="width: 80%;display: inline;" class="progress-group"> <span class="progress-number">XX%</span> <div class="progress sm"> <div class="progress-bar progress-bar-blue-light" style="width: XX%"></div> </div> </div> </li> I want to add code to display precentage to next rank and progress bar with it. Does someone have an idea? I would appreciate any help! Thanks, Relja
Last reply by CarlosEduardo2409, -
- 1 follower
- 25 replies
- 10.3k views
-
Last reply by AidasP, -
- 1 reply
- 2k views
I was wondering if there was a way we could check if pireps are accepted or unaccepted. I was think of something like we can check if the user is an admin or not if he is then the system would check if there are unaccepted pireps. If there are the user would be redirected to the admin page or could be given a notification?
Last reply by Heritage1, -
- 0 replies
- 1.6k views
hello, im use this module, but between to 50 files i want pagination.... <div class="table-responsive"> <table class="table table-hover"> <thead > <tr align="center"> <th>Tipo de Aeronave</th> <th>Matricula</th> <th>Rango</th> <th>Aerolinea</th> <th>Pasajeros</th> <th>Carga Maxima</th> <th>Detalles</th> </tr> </thead> …
Last reply by OWA001, -
- 6 replies
- 3.5k views
Just touching up my pilots list page and wanted to be able to click on Vatsim (mainly) or ivao ID on pilot profile to bring up their flight histories on relevant stats page.. <td> <div align="center"> <a href="<?php echo url('https://vatstats.net/flights/?pilot='.$pilot->pilotid, 'VATSIM ID');?>"> <?php echo PilotData::GetFieldValue($pilot->pilotid, 'VATSIM ID'); ?> </a></td> This is displaying their vatsim ID correctly as a clickable link, however its bringing up "http://www.susiairvirtual.com/index.php/https://vatstats.net/flights/?pilot=1" rather than the vatstats page, and its also using the pil…
Last reply by flyalaska, -
- 5 replies
- 2.5k views
Hey everyone, Does anyone know how to go about implementing something like the picture I have attached? Just trying to think of ways of "modernizing" the stats shown on our VA.
Last reply by flyalaska, -
- 19 replies
- 6.8k views
Hey guys, i made a template to use this great weather map with phpvms. Its just a iframe but its doing his job! The map is very accurate!!.. i tested it yesterday with AS16 (P3D) https://www.ventusky.com/ put this in core/modules/ACARS/ACARS.php public function viewmapwxr() { $this->render('wxrmap.php'); } create a file called "wxrmap.php" inyour /lib/skins/YOURSKIN/wxrmap.php <style> .embed-container { position: relative; padding-bottom: 56.25%; /* ratio 16x9 */ height: 0; overflow: hidden; width: 100%; height: auto; } .embed-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } /* ratio 4x3 *…
Last reply by Lausitzaircargo, -
- 0 replies
- 1.4k views
Hello I was digging around in phpvms today and came across the functions for url, actionurl, adminurl etc. So I started thinking, it'd be really handy to have something similar for the skin url. So instead of href="<?php echo SITE_URL?>/lib/skins/crystal/styles.css" you would go href="<?php echo url('styles.css'); ?>" that's much shorter, and also if for some reason you'd want to change the folder of your skin you don't need to recode everything. so I wrote that little function, here it is: function skinurl($path="") { if($path[0] != '/') $path='/'.$path; return SITE_URL.'/lib/skins/'.CURRENT_SKIN.$path; } all you n…
Last reply by mischka, -
- 0 replies
- 1.5k views
Closed
Last reply by PedroBoreio, -
- 1 reply
- 1.7k views
Closed topic
Last reply by shakamonkey88, -
Hi i have loded it all up and all ok but when you click the generate button i get this error in the console.. https://imgur.com/3MJL04T
Last reply by sev, -
- 27 replies
- 10.2k views
Hello all, For those of you who know, Google has released a new version of the reCaptcha that doesn't have a Captcha: noCaptcha reCaptcha. Some more information can be found at http://www.google.co...ntro/index.html. Now, I've figured out (kind of) on how to implement it (very easy change), so I'm hoping it's backwards compatible. If anyone is willing to give it a try, please try my code snippet. My development copy of phpVMS isn't working as I want it to due to the skin, and I'm too lazy to go into the admin panel to change the skin to crystal. recaptchalib.php is attached, to install, go to (phpVMS isntall directory)\core\lib\recaptcha. Make sure to backup your old o…
Last reply by OWA001, -
- 9 replies
- 4.7k views
Hi is there a quick way of displaying the current flight bids on another page just like they are in the admin section?
Last reply by Aaryan, -
Flight Board
by sev- 0 replies
- 1.6k views
Hi im looking for the code to apply a acars map and flight board on a landing page before going into crew centre...Thanks Karl Alden
Last reply by sev, -
- 3 replies
- 4.7k views
How to Change the Look of the ACARS Map As usual, We highly suggest backing up before making any changes. 1. Find the Style you want on https://snazzymaps.com 2. Click on "COPY" by the Code Snippet 3. Open up the file "acarsmap.tpl" located in your skins folder 4. Around line 38, BEFORE the acars_map_default variable add the following code: var myStyle = PASTE HERE 5. Paste what you copied in step #2 where it says "PASTE HERE" in the snippet above. 6. INSIDE the acars_map_default variable add the following code: var acars_map_defaults = { autozoom: true, styles: myStyle, // <-- ADD THIS zoom: 4, center: new google.maps.LatLng("<?php echo Config::…
Last reply by Ariel, -
- 3 replies
- 1.8k views
Hi all, hope all is well with everyone. Anyways, I've been trying for few days on how to change the length size of the slider images on my new VA website, I have no clue! can someone please help me. Please visit the site at http://lifeflightvirtual.us/index.php/ Thanks, Tac
Last reply by Karamellwuerfel, -
- 4 replies
- 2.1k views
Dear friends, please help me with the site. I want to not registered polzavateli vidili here it is: and authorized vidili here it is: How is it possible to implement?
Last reply by sev, -
- 3 replies
- 2.1k views
Hi, I'm not the best at coding but I would like to know if anyone knows a function that will count all live flight from the acars db and put it in a number. For example if the acars map shows 6 flight I would like the function to show 6 Thanks
Last reply by tim260, -
- 1 reply
- 1.9k views
I am trying to make a way for pilots to search any meter they want. I have done this so far, and it doesn't work, can someone please help? <div> ICAO Code: <input type="text" name="icao"> <input type="submit"> <?php $metar = $_POST['metar']; $url = 'http://metar.vatsim.net/'.'icao'.''; $page = file_get_contents($url); echo $page; ?> …
Last reply by ProSkyDesign, -
- 4 replies
- 1.9k views
Hello php coders, I wanted to create a module for my airline such that an admin can assign a particular flight for the pilot. How do I create it? Can anyone give me a start for this as I tend to create more modules. Thanks!
Last reply by ProSkyDesign, -
- 2 replies
- 1.4k views
Hey folks, This is the code for showing the money on your PROFILE page: <?php echo FinanceData::FormatMoney($userinfo->totalpay) ?> I was wondering what is the code for the MAIN PAGE... It is not the same code!
Last reply by Royzzzz, -
- 1 follower
- 1 reply
- 1.6k views
Hello, Am wondering if anyone would be ever so kind to tell or send me some code. I have seen on various websites airport delays NOTAMS, I would like to implement this into my home page. Thanks
Last reply by Vangelis, -
- 4 replies
- 2.9k views
How can I get the total hours a CID has logged under a specific airline ICAO? I've searched the VATSIM API but so far only find info on how to return their ratings or online status.
Last reply by Jetwave, -
- 2 replies
- 1.7k views
Hi, is there a code snippet available for the following, a pilot joins and receives BBB002 then leaves another pilot joins, they are given BBB003 by the system, instead of the lowest available number. thanks in advance
Last reply by shaun105, -
- 0 replies
- 1.6k views
Hi, I wanna share my code that I'm using to the briefing to my pilots. This code display the pax and cargo that they will use to their flight. It incluides Cargo and Passengers flight. <div class="col-md-4"> <table style="width: 100%"> <tr> <td class="auto-style12"><span class="auto-style26"><strong> <?php if($schedule->flighttype == "P") { echo "Pasajeros:"; } else if($schedule->flighttype == "C") { echo "Carga (KG):"; } ?></strong></span> <span class="auto-style26"><?php $allaircraft = OperationsData::GetAllAircraft(true)…
Last reply by ProSkyDesign, -
- 2 replies
- 1.8k views
Hi guys, wondering if there is any tweaks out there to change fleet page. Is it posssible to seperate all fleet by airline?
Last reply by ProSkyDesign,