Code Snippets
Pieces of code you can use around your site
327 topics in this forum
-
- 4 replies
- 2.4k views
How can I get the Great Circle Mapper Code only show the Pilots flights. <?php $flights = PIREPData::getRecentReportsByCount(5); $string = ""; foreach($flights as $flight) { $string = $string.$flight->depicao.'+-+'.$flight->arricao.',+'; } ?> <img src="http://www.gcmap.com/map?P=<?php echo $string ?>&MS=bm&MR=240&MX=790x400&PM=permr:diamond7:green%2b%22%25I%22:white&PC=%fffff" /><br /> Maps generated by the <a href="http://www.gcmap.com/">Great Circle Mapper</a> It should only show the logged in pilots flights on the map. Thanks in Advance.
Last reply by Stealthbird97, -
My intent is to be able to click on the "File a new PIREP" link....have it take me to a page with only two buttons....."File a FSX Flight" and "File a DCS Flight." Each a link to a different PIREP form. I utilized David Clarke's great content module tutorial to create two new pages (tutorial: http://david-clark.n...content-module/). It appears that I used the tutorial correctly...my links are working, but the data stream seems to have been broken somewhere. Explanation: New pages are called "pirep_fsx.tpl" and "pirep_dcs.tpl" I created the new module, as directed in the tutorial....but I do not think it is the problem (I could be wrong) I replaced the data in the def…
Last reply by Parkho, -
- 1 follower
- 5 replies
- 3.1k views
anyone know a code/script for a snow falling effect to add to the site?
Last reply by Vangelis, -
- 5 replies
- 4.5k views
Hey Guys, Just wanted to give everyone the opportunity to use this great Javascript snow script. To use it for phpVMS just simply follow the directions below. Open layout.tpl and find the </body> tag. Create a line above it and copy and paste the code below. <SCRIPT type="text/javascript"> // Set the number of snowflakes (more than 30 - 40 not recommended) var snowmax=35 // Set the colors for the snow. Add as many colors as you like var snowcolor=new Array("#aaaacc","#ddddff","#ccccdd","#f3f3f3","#f0ffff") // Set the fonts, that create the snowflakes. Add as many fonts as you like var snowtype=new Array("Times","Arial","Times","Verdana") // Set the lett…
Last reply by Taran, -
- 11 replies
- 3.5k views
Hello, Would anybody know the code to split up the hubs into airline categories on the registration page like this?. Regards Michael
Last reply by Stealthbird97, -
- 4 replies
- 2.5k views
Does anyone know how do I add like to a fleet page how many planes we have on order something that can change automatically
Last reply by Dominican Airways, -
- 9 replies
- 3.5k views
Hi all I have adapted my code to show country and rank but I have a problem it shows the country fine but not the rank here is my code any help would be great thanks. <div id="box"> <div> <h2>Users Online</h2> <p> <?php $usersonline = StatsData::UsersOnline(); $guestsonline = StatsData::GuestsOnline(); ?> <h4>Pilots Online</h4> <?php $shown = array(); foreach($usersonline as $pilot) { if(in_array($pilot->pilotid, $shown)) continue; else $shown[] = $pilot->pilotid; echo "<p>"; echo '<img src="'.Countries::getCountryImage($pilot->location).'" alt="'.Countries::getCountryName($pilot-&…
Last reply by Stealthbird97, -
- 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, -
- 1 reply
- 1.4k views
Anyone have the code or know how I can add like something showing our Team Speak Server?
Last reply by servetas, -
- 1 reply
- 1.8k views
Hi, i hope that anyone can help me. i search for a code that pilots can schedules on time. example: Select An Airline Select your departure airport: Select your arrival airport: Select aircraft: and than: schedule time: i hope that anyone can help greets michael kraan
Last reply by Tato123, -
- 1 follower
- 4 replies
- 3k views
Here is a small code that you can use in pilot center or public profile. It shows total flights in a particular airline that pilot has flown. Note: If your database table prefix is not phpvms, change this part "phpvms_pireps" to yours in the code. Enjoy <table class="balancesheet" width="50%"> <tr class="balancesheet_header"> <td colspan="2">Airline Flight Count For a Pilot</td> </tr> <tr> <td align="center"><strong>Airline Name</strong></td> <td align="center"><strong>Flight Count</strong></td> </tr> <?php $airlines = OperationsData::getAllAirlines(); foreach($airlines as …
Last reply by michael Kraan, -
- 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, -
- 1 reply
- 1.7k views
I am a web designer and would like to build my own VA website, do you guys have all the codes that i would need to add different functionality to my site and is there any video tutorial that explains step by step how to go about adding such scripts in for some who may not know who are beginners....reason i ask is because i have many folks here who is into aviation looking to start a VA and get their sites up but i have to first get clearification as to building one and teaching them how i got it done.
Last reply by Sava, -
- 3 followers
- 33 replies
- 9.9k views
First off add a column into your phpvms_pilots in your DB as "bonus" the type must be "float" and set default az "0". Then open the following: Admin/modules/PIREPadmin/PIREPAdmin.php go down to line 298 and find the function called : approve_pirep_post(). Now go to the end of it and add the following: After this: # Call the event CodonEvent::Dispatch('pirep_accepted', 'PIREPAdmin', $pirep_details); Add this: # Give Bonus to good pilots $pilotbonus = "500"; $userinfo = PilotData::getPilotData($pirep_details->pilotid); if($pirep_details->landingrate > -50 OR $pirep_details->flighttime > 8) { $totalpay = $pilotbonus + $userinfo->totalpay ; $…
Last reply by Parkho, -
- 5 replies
- 2.1k views
Hey, I think,if have a way to get routes direct from other sites,because if you have a lot of a routes do add, is very tiring and time consuming to add with admin panel. Waiting. Thanx
Last reply by Gabriel Fernandez, -
- 7 replies
- 3k views
Has anyone got a script which creates a different pilot badge depending on the pilot rank? Thanks
-
- 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, -
- 13 replies
- 4.5k views
Hi Guys, I'm trying to code a form that enables pilots to enter in a nickname of their choice and click connect and then it logs them into the server with that nickname but i already have this working.The bit I would like to do is that once the pilot is logged in to phpVMS. When he uses the form to login to the TeamSpeak server his username is already there in the nickname box in a defined pattern. I would like the value box on the form to be able to pull the firstname lastname and pilot id, For example Michael Atherton JCA001. I have tried this code <center>Pilot Name - Pilot ID<br> <input type="text" name="NICKNAME" value="<?php echo PilotData::get…
Last reply by kkoseoglu, -
- 1 reply
- 1.6k views
Please help me, i want to limit access to specific module. Probably via .htaccess and password. Please help if you know how ... P.
Last reply by simpilot, -
- 9 replies
- 2.7k views
Hello, Could Some one provide me the code to echo the password for the signed in pilot, for creation of kAcars config file. pilot id was: <?php echo $pilotcode?> is there some same code but, for the password? greetz, Jacques
Last reply by Oxymoron290, -
- 0 replies
- 1.3k views
Hi, How would I go about creating a page in the Admin panel of PHPVMS? I understand about adding the link in the nav on the left, but I can't link it up etc. If anybody could help, would be great. Thanks Daniel
Last reply by PlumbBum, -
- 7 replies
- 3.7k views
Exist module or way to display list of aircraft locations as follow based on pireps? maybe last 10 flights for each.... for example: Aircraft A date: LZIB-LZKZ date: LZKZ-EDDM ... Aircraft B date: XXXX-YYYY date: YYYY-FFFF Thans for help. Peter
Last reply by shiljo, -
- 1 follower
- 10 replies
- 3.6k views
Instead of just showing a drop down for Signature banners, I would like to also show a preview of the sig ban. Anyone ever done this?
Last reply by freshJet, -
- 5 replies
- 2.3k views
Hello, I'm trying to make it so that random ID's are assigned to pilots, and not in sequential order. Is there a possibility to this? I've done it for other CMS's but I don't know if the MySQL wont like the randomness. Thanks for your help Dave
Last reply by Talisman57, -
- 2 replies
- 1.9k views
Hi guys, Sorry for my persistance, But i'd like to request some codes... I want to change money to points system... Exemple every flight do by pilot, he make 1 point per 10 minutes. Is possible? And implement a pilot efficiency system... Exemple 90% average pilot efficiency... And Restrict some routes to pilots without required rank and award to fly for exemple LPMA. And is possible restrict some pages in profile_main.tpl and only show exam center for pilots with 'Student' rank? And how I do to when the pilot chooses the HUB in registration proccess, exemple if he choose LPPT for his HUB, his location is automatically LPPT (HUB chosen) and automatically just ha…
Last reply by Parkho, -
- 5 replies
- 3.8k views
Is possible in phpvms prevent to receive pireps for flights who are non booked? One of my pilots manualy fill acars and after flight complete send and system receive flight which is not in va system.
Last reply by Ephendi, -
- 7 replies
- 3.3k views
Can someone help me with this topic? I finished code to show schedules for aircrafts located on airport based on last pirep. Next step and need help with code, probably in Schedule.php and schedule_results.tpl -> when flight is in bid i need to bided aircraft will be hidden from all schedules to time, when flight is in bid.
Last reply by Yash, -
- 3 replies
- 2.2k views
Hello, Could someone please provide me with a bit of code that echo's out the id of the current signed in pilot. I can already make it go VIRXXXX but I just need it to show the XXXX part, without the "VIR" infront? If that makes sense, Thanks for help in advanced, Regards, Daniel
Last reply by Sava, -
- 23 replies
- 8.2k 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, -
- 4 replies
- 1.8k views
Whilst looking at my bookings list for my pilots the idea of having a reminder of bookings hit me. I know this can be done. I was considering something along the lines having an email sent to the pilot if their bid is more than one week old. And to prevent several emails at once (say the pilot booked a 10-leg journey) mention each booking in the one mail. I would do a rough code but my brain won't work. I've been working on a lot tonight. ----- Oh and one more thing, some of you may remember me asking what the cons of deleting a pilot were. Well, I found this in my PilotData.class.php: public static function deletePilot($pilotid) { $sql = array(); unset(self::$pi…
Last reply by freshJet,