Code Snippets
Pieces of code you can use around your site
327 topics in this forum
-
- 1 reply
- 1.7k views
Would like to see what the code is to show the number of pending pilots.
Last reply by Kyle, -
Im trying to get the Percentage of something but its not working. This is what I have dont so far: <?php $flown = 20; $total = 100; $final_percentage = $total * ( 1 - $flown/100); echo "Final Percentage: ".$final_percentage; ?>% But it ends up with 80% when it should be 20% (20/100). Does anyone know where I went wrong? Thanks, James
Last reply by James142, -
- 12 replies
- 51.1k views
Hi all, Does anyone have the code for displaying phpbb3 latest forum posts on the frontpage? also is there a auto register code for phpbb? thanks in advance Scott
Last reply by TAV1702, -
- 11 replies
- 4.6k views
If you would like to use phpfree chat, here goes. Visit their page for docs, their info is really helpful. Upload phpfree chat to your website . Place this at the beginning of your chat page. <?php require_once dirname(__FILE__)."/phpfreechat-1.5/src/phpfreechat.class.php"; //this is the location of your chat directory $params = array(); $params["admins"] = array('your-admin-name' => 'your-password');//this is the admin name and password - you can have more than one admin $params["title"] = "Pilot's Lounge"; //name of the chat room $params['firstisadmin'] = false; //do not change this $params["theme"] = "blune"; //this is where you change the theme $params['…
Last reply by RogerB, -
- 5 replies
- 2.2k views
I'm stuck and need some help from the gurus on this board. I am trying to insert phpvms content within another cms without relying on an iframe. I want to be able to use modules within phpvms but use the cms framework to build pages etc with another system. Right now my folder structure is \root\ where the cms is and \root\phpvms\ where phpvms is installed. I've got this code so far but I don't know if I am missing elements? Thanks,
Last reply by Tom, -
- 7 replies
- 3k views
Has anyone got a script which creates a different pilot badge depending on the pilot rank? Thanks
-
- 1 reply
- 1.4k views
Does anyone know the code or what I have to do to be able to add notes to the pilot center for the pilots to see?
Last reply by Parkho, -
- 2 replies
- 2k views
Is there any way to get like a roster of the pilots in a hub on to a hub page?
Last reply by rpalmer800, -
- 1 reply
- 1.7k views
Many people have commented that their pilot list items get out of alignment as items go on. Add the following line in each <th> tag as so Example: <th align= "center" width="200px">Crew ID</th> It will make a once misaligned table: http://i.gyazo.com/6df264d06a0e144c5da2548ce0e920e5.png Look Aligned: http://gyazo.com/935e4c5e7015075368ff381217c59b2e Cheers!
Last reply by in2tech, -
- 22 replies
- 7.9k 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, -
- 0 replies
- 1.8k views
Does anyone know of a code or something else that I can use to allow the pilots to pic one language before signing up? For example they would press on the registration link but it would take them to some where that would let them pic either English or French. Also does anyone know how I can make a separate different language pilot application.
Last reply by Dominican Airways, -
- 3 replies
- 1.8k views
Hi all, Is there a module about or a piece of code that would send an email automatically to a pilot if he/she has not completed a flight within the first 10 days of registering. Or within 30 days of a completed flight Thanks in advance Scott
Last reply by flyalaska, -
- 1 reply
- 1.8k views
Hey guys so I installed the Pilot Shop Add-on nothing appears in it and it tells me PilotHome No products have been bought! that's in the pilot home page. Then via the admin center when I try to add some products it saids " An Error Was Encountered The module "SHOPADMIN" doesn't exist!" Anyone know how to fix it?
Last reply by TAV1702, -
- 5 replies
- 2.3k 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, -
- 2 followers
- 28 replies
- 9.4k views
Hi all I have created this form to place in the pilot centre so that if a pilot would like a route added to the VA he/she can fill this in and send it to the schedules manager. I have built the front end but I am struggling with the back end (PHP) could someone help me out? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <form name="contactform" method="post" action="send_form_email.php"> <table width='100%' border='0'> <tr> &…
Last reply by Vangelis, -
- 5 replies
- 3.1k views
I want to display the pilots Hub in the pilot center but I can't figure it out. I don't even have a clue as to what code to be using. If anyone has done this would you mind to post the code? Thanks in advance. Keith
Last reply by JustinRomaine, -
- 2 followers
- 13 replies
- 5.4k 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, -
- 7 replies
- 6k 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, -
- 3 replies
- 3.4k views
Nabeel, i have a pilots list currently displayed in the va stats, listed i have all the countries displaying the flag and location in a table (for anyone else this is the code)Page in action <?php echo '<td align="center" width="250px" valign="top">'; echo '<table cellspacing="1" cellpadding="1" border="1">'; echo '<th width="150px"><div align="left">Country Location</div></th>'; echo '<th width="100px"><div align="center">Pilots</div></th>'; $country_info = DB::get_results('SELECT COUNT(pilotid) as total, location FROM '.TABLE_PREFIX.'pilots GROUP BY LOCATION'); foreach($country_info as $country) { echo …
Last reply by Nabeel, -
- 2 replies
- 1.9k views
Can anyone share there pilots page that separates by Airline?
Last reply by Strider, -
- 11 replies
- 5.1k 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
- 12 replies
- 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, -
- 0 replies
- 1.5k views
Hi, Would anybody please have a snippet of code that I can add to my pending PIREPs page, which has a drop down of the airports stored in my phpvms_airports database? When selecting an airport, it will filter the PIREPs to show only those with a departure/arrival airport of the one selected? I hope that makes sense, Thank you in advanced. Daniel
Last reply by danielp1997, -
Pirep times
by Alex- 4 replies
- 2.7k views
I have been getting complaints in relation to the filing of Pireps and in particular the flight duration box. We know that 5.3 = 5 1/2hrs or 5 hours 30 minutes. however some people have difficulty with this ???? is there a code snippet to include a box "hours" "minutes" in text format so that this issue can be resolved? Any help with coding would be appreciated, even if it's just to get the monkey off my back.
Last reply by Alex, -
- 0 replies
- 2.7k views
Hey, Hope somebody can help? Is there a way to show the offblock/onblock times, start and finish, also takeoff and landing times? Need help to source a code? TIA
Last reply by Mickey, -
- 3 replies
- 2k views
Is there any way at all to show pireps by certain hub only? I have been tossing around some code and got a few things to work but not this one. I have been at it for a few hours now. I keep getting it to pull pireps that have been filed, but it is giving it to me for all hubs, not just the one I would like it to show.
-
- 4 replies
- 2.5k views
How to add here, "http://www.power-team-radio.com/freedomair/index.php/pireps/view/28" where Route Map is purely the map. who can help
Last reply by TAV1702, -
- 7 replies
- 4.1k views
Hey, Does anyone know how to make a popup box appear on login? For example, a survey, or a status telling the pilot how many messages they have, their bids, etc. So: Pilot Logs in > PopUp displays > Pilot can then click on one of the links or click 'Close'.
Last reply by freshJet, -
- 0 replies
- 1.1k views
is it possible to show the vaCentrlal Live Map instead the acars map? i cannot find any code for the vacentral llive map...
Last reply by Melli, -
- 1 follower
- 6 replies
- 2.9k views
Good morning to all , How are you ? I am trying to do something for pilots who has less than 10 flights in our Virtual to prevent download the files from Downloads page in our Virtual how can i do that ?? i have this code but i am not sure if it work and where can i put it $userid = $_SESSION["userid"]; $result = mysql_query("SELECT count(*) from `topics` where `userid` = '$userid') or die(mysql_error()); $topicCount = mysql_result($result,0); if($topicCount < 10){ echo "You have $topicCount topics so far. You need a minimum of 10 to get access to downloads."; } download just for pilot who has more than 10 flights otherways pilot cannot download the fi…
Last reply by servetas,