Code Snippets
Pieces of code you can use around your site
314 topics in this forum
-
- 23 replies
- 9k views
staff would like to know if someone has a script that creates the company badge with the picture, id pilot, hub and everything else! Thank you! Exemple:
Last reply by warpennys, -
- 18 replies
- 8.8k views
Hi all, Sorry if I put this in the wrong place. I wanted to know if it is possible to have a default skin for phpvms to load and then in each users profile section of the site under the profile options heading have a drop down box so they can select a skin and save it so that it becomes their fav skin and loads when ever they log in without affecting the skin other users see. An example of what I am trying to say is they user theme selection many forums use. Any thoughts on the idea would be great Cheers Jonny
Last reply by Nabeel, -
- 22 replies
- 8.6k views
Hello, I was wondering if there was a code to say if a pilot is online or offline on the website in the badge/signature? I have being looking around the forums but found nothing.. Thanks, James
Last reply by mark1million, -
- 11 replies
- 7.9k views
Hello i m looking for help ! I like to make an auto accept pirep system, if someone got a code to this please sheare the code with me. Thank you!
Last reply by Txmmy83, -
- 1 follower
- 4 replies
- 7.8k views
Hello Im using chatroll chat in iframe tags and it works as well. Chatroll also has php application but i cant figure out howto make it work in my website. The code of Php Application <?php // Chatroll Single Sign-On (SSO) Parameters $uid = 1; // Current user id $uname = 'test'; // Current user name $ulink = 'http://example.com/profile/test'; // Current user profile URL (leave blank for none) $upic = ''; // Current user profile picture URL (leave blank for none) $ismod = 0; // Is current user a moderator? $sig = md5($uid . $uname . $ismod . 'dwcbbkhmrlldo28m'); $ssoParams = '&uid=' . $uid . "&uname=" . urlencode($uname) . "&ulink="…
Last reply by gio1961, -
- 19 replies
- 7.5k views
Hi everyone, I have been looking about to use Pagination for my pilots pirep pages as some are now getting quite long, i have come across a few but does anyone have experience with integrating in to phpvms, your ideas and thoughts would be welcome Cheers.
Last reply by James142, -
- 13 replies
- 7.3k views
Hello All, Does anybody have the code for this? I cannot remember which VA it was on but it shows a list of all pilot's online Thanks!
Last reply by warpennys, -
- 10 replies
- 7.3k views
A great site for worldwide notams & weather at specific airports is notams.com I have found this to be the most reliable and widest coverage of the offerings. Especially if your not US based. It can be integrated using the following code in schedule_breifing.tpl <td width="50%" ><?php echo "{$schedule->depname} ($schedule->depicao)"; ?><br /> <a href="http://<?php echo $schedule->depicao?>.notams.com/Weather" target="_blank">Click here to check the Notam's & Aiport Info</a></td> <td width="50%" ><?php echo "{$schedule->arrname} ($schedule->a…
Last reply by CPC900, -
- 5 replies
- 7.3k views
No charts are displayed for any airports in the schdule briefing, so I modified the code to display charts found in the database. If no charts are found it will display the default link for airnav.com plus the message "No local charts found, try - [airnavlink]". You can see it here: http://www.flybritair.com/index.php/schedules/brief/1 You have to edit schedule_briefing.tpl Replace: <table width="98%" align="center"> <tr style="background-color: #333; color: #FFF;"> <td>Charts for <?php echo $schedule->depicao?></td> <td>Charts for <?php echo $schedule->arricao?></td> </tr> <tr align="center"> &l…
Last reply by tgycgijoes, -
- 19 replies
- 7.3k 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, -
- 11 replies
- 7.1k views
Good Day everyone ! I have create a small piece of code to use at your pilots_list.tpl to add an icon (Active/Inactive) to the pilot list.(taking data from the pilots active/inactive in admin panel) Demo here: Demo Pilot List The steps you need to follow are: 1. Add this code to add a column at the table: <th>Status</th> 2. Add this code under the column to create a row with the code you need:(replace the "yourskin" with your skin folder name) <td><?php if($pilot->retired == '1') {echo '<img src="'.SITE_URL.'/lib/skins/yourskin/images/no.png" alt="warning" /> - Retired';} else …
Last reply by hurkulez, -
- 7 replies
- 6.7k views
UPDATE ON 1/30/2016 To start off thanks dave for the Simpilotgroup charter system ! I have modified this script so it would fit my needs and now i thought that i would share it with everyone so whoever had this script would be able to use my idea. My idea was to modify the script so that it would automatically calculate a price for each flight and so it does now. It calculates the price by how many miles the flight is in total and then multiplies 0.75 or however much you want it to be per mile. ps.. No i didnt take this idea from the Realschedule. You will have to have a valid version of this module whether it might be php or the tpl version i have edited a…
Last reply by smokey68, -
- 5 replies
- 6.7k 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, -
staff online
by VAEA- 1 follower
- 14 replies
- 6.7k views
Hi everyone, I was wondering if anyone would be able to help me. On my site I have the normal pilots online,guests online. I would like to be able to show staff members online. has anyone any ideas. I have simpilots staff module so maybe i could use it in some way All help appreciated . Thanks in advance
Last reply by warpennys, -
- 1 follower
- 12 replies
- 6.6k views
Hello. I'm designing a system for automatic approval of pireps this system when the forwards pilot send your PIREP, the system reads the file PIREP "Log Check" Files for downloads http://www.crocko.co...Pirepsystem.rar File "LOGCHECK.TPL" Archive for approval of aircraft Log.tpl Can someone tell me if I'm going the right way? is my first system
Last reply by eliezerazevedo, -
- 7 replies
- 6.5k views
Hi all I am trying to show the below code on the profile_main.php but can't get any of the data to show. Here is the code, I have taken this from pirep_viewreport.php <b>Departure Airport</b> <p class="pull-right" style="color: #3C8DBC"><?php echo $pirep->depname?> (<?php echo $pirep->depicao; ?>)</p> </li> <li class="list-group-item"> <b>Arrival Airport</b> <p class="pull-right" style="color: #3C8DBC"><?php echo $pirep->arrname?> (<?php echo $pirep->arricao; ?>)</p>…
Last reply by sayedzaafir, -
- 18 replies
- 6.3k views
Is your Human Resources department tired of sending out welcome emails with their demographic information and general airline info? Here is a template I have constructed to solve the issue. It uses PHP Tags to pull registration info from the database such as pilot name, pilot ID, chosen hub, etc. Now you can spend less time sending emails and more time flying! Simply replace your email_registrationaccepted.tpl file with this code http://pastebin.com/Q2v4VuUR Cheers!
Last reply by simpilot, -
- 12 replies
- 6.1k views
Hey, If you would like an awards table if your site, use this code. The table is totally plain, but fully customisable using your standard table css/html. profile_mail.tpl <p> <strong>My Awards</strong><br /> <?php if(!$allawards) { echo 'No awards yet'; } else { /* To show the image: <img src="<?php echo $award->image?>" alt="<?php echo $award->descrip?>" /> */ ?> <ul> <table width="790" border="0" cellspacing="5" cellpadding="5"> <?php foreach($allawards as $award){ ?> <tr> <td width="25%"><center><img src="<?php echo $…
Last reply by Jeff, -
- 4 replies
- 6k views
is there a code that allows you to put the pilots hub next to their name in the pilot roster without sorting the roster by hubs?
Last reply by web541, -
Live Fuel Problem work around
by Guest lorathon- 9 replies
- 5.9k views
Since the live fuel server stopped allowing phpVMS users to access the live fuel I have been seeing too many flights with a zero for fuel price. I am assuming this was due to the copy that Nabeel put up for the live lookup. I still wanted to use the live lookup ( I dont like the idea of all of the airports having the same fuel price) so I just looked for a work around. What I wanted was to be able to poll the live fuel server, if there was a price there then use it. If not then use the default. The problem became that sometimes a zero was sent back. The script would then run the fuel calc with zero as the fuel price. So I dug in and worked out a way to accomplish…
Last reply by Ghiby, -
- 4 replies
- 5.9k views
Hello, I'm looking for the code to show the airline logo on the schedule list when pilots search for it? Does anybody have this code? Regards
Last reply by fardly83, -
- 11 replies
- 5.9k views
Hey everyone, I was helping another guy out with a problem and my solution worked for him so I will share it here in snippets. If you ever get an error like this Fatal error: Allowed memory size of 33554432 bytes exhausted on your website while trying to do anything, it is a low memory allowed per script on your server. To remedy this situation you can get into your local config file and find ?> after add ini_set("memory_limit","16M") If this does not work, it will if you go to root/.htaccess and add it there instead. If the 16 does not solve your problem you can bump it up some. Please beware that if it is not your server and you are on shared hosti…
Last reply by regexpress, -
- 2 followers
- 13 replies
- 5.8k views
Hey Guys! So we were doing some development at woava.net tonight and came up with this little puppy. Thought you guys would like it. It checks weather the selected user is in a flight or not, if the user is in a flight it displays the current status of a flight, (parked, pushing back, taking off, etc...), Their departure to arrival in the format of DEPICAO -> ARRICO, (ex, kdfw -> klax), and the precentage currently based on distance from the flight. You can also base it on time using the variables <?php $acars->deptime; $acars->timeremaining; //and $acars->arrtime; ?> Anyways, enjoy! <?php /** ==================VVVV Checking Current lo…
Last reply by Taran, -
- 16 replies
- 5.7k views
Does anyone know the code for this? I have seen one before, however it was for the public profile. I've got it working too, but I want it now on the Pilot Centre, so when the pilot views the pilot centre, it says how long it's been since their last flight, for example: Your last flight was 3 days ago. That way, they know whether they are in danger of being marked inactive or not. I remember Virtual Norwegian had it when I flew for them...
Last reply by tutmeister, -
- 11 replies
- 5.6k views
1_Edit the "frontpage_main.tpl" in /core/templates or /lib/Skins/. 2_ Place this code: <h3>Users Online<br /> <?php $usersonline = StatsData::UsersOnline(); $guestsonline = StatsData::GuestsOnline(); ?> </h3> <h4 class="style6">Pilots Online </h4> <?php foreach($usersonline as $pilot) { echo "<p>"; echo '<img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot->location).'" />'; echo " {$pilot->firstname} {$pilot->lastname}<br />"; echo "</p>"; } ?> <br /> Have <?php ech…
Last reply by Thomas, -
- 1 follower
- 3 replies
- 5.5k views
Hello, i'm trying to use google flight search api but dont know how to "decode" the result. The search is ok, i'm using this code with (solutions => "1") i put 1 just for tests, but want more <?php $data = array ( "request" => array( "passengers" => array( adultCount => 1 ), "slice" => array( array( origin => "LIS", destination => "OPO", date => "2015-05-09"), ), solutions => "1" ), ); $data_string = json_encode($data);$ch = curl_init('https://www.googleap...ch?key=MyAPIKey'); curl_setopt($ch, CURLOPT…
Last reply by aliatwa, -
- 8 replies
- 5.4k views
Hey guys, I have a new project that I want to do. I noticed the boarding pass does this thing where is gets a random gate, how can I make it randomly select the specific gate at an airport? For example, I have 14 gates at Las Vegas, and 11 gates at San Jose. If a pilot views the boarding pass I want it to randomly select one of the gate numbers I put in for Vegas. Then I plan on taking this method and putting it in my flight dispatch for pilots. So, how would I go about doing this? Would if be possible to write something like if $airport = KLAS select gates x - x or something of the sort? I'm not all to great with php..
Last reply by CPC900, -
- 5 replies
- 5.4k views
Hi guys, Our IVAO division want to see our PIREPS list with IVAO ID of each pilot. We have a custom field (phpvms_customfield) called IVAO. I did the code below. Its working (http://truewings.com.br/all_pireps_tws.php), but i can't see the pilot ivao id of the pirep sent. This part of the code is note ready. anybordy can help me? How canget this data from phpvms_customfield? <?php $servidor = ""; /*maquina a qual o banco de dados está*/ $usuario = ""; /*usuario do banco de dados MySql*/ $senha = ""; /*senha do banco de dados MySql*/ $banco = ""; /*seleciona o banco a ser usado*/ $conexao = mysql_connect($servidor,$usuario,$senha); /*Conecta no bando de dados…
Last reply by Ademar Andrade, -
- 10 replies
- 5.3k views
Decided to post this here as it's now lying around doing nothing. It's a jQuery slideshow plugin I created a few months ago, with the intention of publishing it elsewhere commercially. Instead, I'm posting it here for free. jQuery image sliders/slideshows are popular on VA websites. A lot of the times the ones available are quite complex. I remember when I first started making them I felt they were too complex for my needs. It's being released under the MIT licence, so you can use it as you wish, even commercially, provided you keep the copyright header in the code. Enjoy! simpleSlideshow.zip
Last reply by freshJet, -
- 1 follower
- 4 replies
- 5.2k views
Hi there. I'm the technical support staff from royal jordanian airlines which we are working on. I want to make an online box like this: http://rj-va.uphero.com/box.png. now i used this code <html> <head> <title>...</title> <style type="text/css"> .bg { width:300px; background:#333; border:1px solid #999; border-radius:10px; margin-left:auto; margin-right:auto; } </style> </head> <body> <?php $lng['trafficingb'] = 'Pilots'; $lng['notrafficingb'] = 'There is no traffic in the Jordanian Airspace.'; $weekdays = array( 1 => 'Monday', 2 => 'Tuesday', 3 => 'Wednesday', 4 => 'Thursday', 5 => 'Friday', 6 =>…
Last reply by Tameem,