-
Posts
1375 -
Joined
-
Last visited
-
Days Won
5
Content Type
Profiles
Forums
phpVMS Resources
Downloads
Everything posted by Parkho
-
Okay! The first problem is that you want this add-on to search by airline and your current location because now it only shows you the scheds from your last location which is EHAM. Now I remember I changed the code to disregard the airline search in order for it to get scheds from current location since I don't have multiple airlines, so I will have to go over it to see if I can fix it. the second problem, just copy the following line without the description: Config::Set('JUMPSEAT_COST','.25'); That should kill the bug! thanks
-
eliminate, destroy, truncate, erase, etc.
-
Okay! do these steps: 1. Get rid of first install. 2. DL Second Zip and install it (sql table too if not yet installed). 3. let me know if there is still a problem. cheers
-
That's weird! Are you sure you added the code to LOCAL.CONFIG.PHP cause that's where it has to go. About the airline search, it's working on my site with no problem maybe you want to reinstall everything.
-
Hello there Okay! I've been trying to change the codes in a way to add the A/C id to the bids table in DB. Here is what i've done so far: 1- Added one column to bids table as "aircraftid". 2- changed the code in ScheduleData.class.php/ Add Bid section as follows: public function setBidOnSchedule($scheduleid, $bidid, $aircraftid) { $scheduleid = intval($scheduleid); $bidid = intval($bidid); [color="#FF0000"]$aircraftid = intval($aircraftid);[/color] $sql = 'UPDATE '.TABLE_PREFIX.'schedules SET `bidid`='.$bidid.' [color="#FF0000"]SET `aircraftid`='.$aircraftid.'[/color] WHERE `id`='.$scheduleid; DB::query($sql); if(DB::errno() != 0) return false; return true; } /** * Add a bid */ public static function addBid($pilotid, $routeid, [color="#FF0000"]$aircraftid[/color]) { $pilotid = DB::escape($pilotid); $routeid = DB::escape($routeid); $aircraftid = DB::escape($aircraftid); if(DB::get_row('SELECT bidid FROM '.TABLE_PREFIX.'bids WHERE pilotid='.$pilotid.' AND routeid='.$routeid.' AND aircraftid='.$aircraftid )) { return false; } $pilotid = DB::escape($pilotid); $routeid = DB::escape($routeid); $aircraftid = DB::escape($aircraftid); $sql = 'INSERT INTO '.TABLE_PREFIX.'bids (pilotid, routeid, dateadded) VALUES ('.$pilotid.', '.$routeid.', '.$aircraftid.', NOW())'; DB::query($sql); self::setBidOnSchedule($routeid, $aircraftid, DB::$insert_id); if(DB::errno() != 0) return false; return true; } 3- Changed the code in schedules.php as follows: public function addbid() { if(!Auth::LoggedIn()) return; $routeid = $this->get->id; $aircraftid = $this->get->id; if($routeid == '' && $aircraftid == '') { echo 'No route passed'; return; } // See if this is a valid route $route = SchedulesData::findSchedules(array('s.id' => $routeid)); if(!is_array($route) && !isset($route[0])) { echo 'Invalid Route'; return; } CodonEvent::Dispatch('bid_preadd', 'Schedules', $routeid); /* Block any other bids if they've already made a bid */ if(Config::Get('DISABLE_BIDS_ON_BID') == true) { $bids = SchedulesData::getBids(Auth::$userinfo->pilotid); # They've got somethin goin on if(count($bids) > 0) { echo '<img src="http://alvandair.com/lib/skins/aqua/images/BookingButt/Exist_.png" border="0">'; return; } } $ret = SchedulesData::AddBid(Auth::$userinfo->pilotid, $routeid, $aircraftid); CodonEvent::Dispatch('bid_added', 'Schedules', $routeid, $aircraftid); if($ret == true) { echo '<img src="http://alvandair.com/lib/skins/aqua/images/BookingButt/Booked.png" border="0">'; } else { echo '<img src="http://alvandair.com/lib/skins/aqua/images/BookingButt/Next.png" border="0">'; } } Now I need help since these changes doesn't insert the A/C id into the DB. Please tell me where I'm wrong. Thanks
-
Hi Michael Add this code to your local.config.php any where at the bottom. and set the price to whatever you want. # Jumpseat Ticket Cost Per NM Config::Set('JUMPSEAT_COST', '.25')//0.25 is now the rate change it to your desire ; Cheers
-
Hi Yes unfortunately that is the case but don't worry I'm working on it and soon it'll be resolved. I just removed the upload for the time being until it's fixed. Thanks
-
Hi All I played with code in realschedulelite_index.tpl and managed to get it to show only the airports with any aircraft available rather than the long list of all Airports. Here is how it looks: Just replace the realschedulelite_index.php with the one you have up and you should be good to go. Let me know if you have any problems. Cheers >>NOT WORKING YET!<<
-
Hi All I played with code in realschedulelite_index.tpl and managed to get it to show only the airports with any aircraft available rather than the long list of all Airports. Here is how it looks: Just replace the realschedulelite_index.php with the one you have up and you should be good to go. Let me know if you have any problems. Cheers core.zip
-
Hi I have a question. Is it possible to change the calculation of pilotpay in PIREP.class.data so that it calculates a percentage of the flight revenue instead of per hour pay? I appreciate any help. Thanks
-
Hi Is it possible to do a calculation based on a percentage of the revenue for pilotpay? meaning the pilot gets paid for example 0.03 % of the total revenue instead of per hour. Thanks
-
Unzip the folder and upload the contents in lib/images/ranks. remember that if you want to use them you need to create ranks and use the link of these images.
-
Thanks mark. You're a life saver.
-
Hello All I'm trying to change the country flags in lib/images/countries using the original namme.png but I still get the default flag even if I removed it. Any suggestions? Thanks
-
You're welcome. The pilot will be transfered once the PIREP is sent and right now I'm working on A/C transfer too and I will publish it when finished.
-
Hi there I think it might be a good idea to share the link to your VA's website here. Thanks
-
Hi Add this to your profile_main.tpl: <li><a href="<?php echo SITE_URL?>/index.php/FrontSchedules">Book a Flight</a></li>
-
Sorry! Here it is www.alvandair.com
-
*More than 50 different destinations. *20 A/C types *Advanced flight booking system *Weekly events and group flights. *FSPassengers pirep system with all the positive and negative points counted for pilot ranking. Website: www.alvandair.com Picture:
-
Hello Simpilot Just wanted to thank you for this and let you know that I managed the coding and it's now working like a charm. Here is my site for reference : www.alvandair.com Thanks again Cheers
-
Hi Simpilot Is it possible to change the code to find the lowest or highest between the landing rates and show them as the best and the worst on daily PIREPS? Thanks
-
Ok thanks I'll see what i can do.
-
Well I just added the function to the Class and called it in my .tpl, does it mean that I have to assign the month and the year in the module?
-
Hi Simpilot ok here is what I did: 1. I added the public function to TouchDownStats.class.data 2. The I changed the code of my table to the following: <?php $stats = TouchdownStatsData::get_monthly_landingrate($month, $year, '2'); <====== Here! foreach($stats as $stat) { $pilot = PilotData::getPilotData($stat->pilotid); $aircraft = OperationsData::getAircraftInfo($stat->aircraft); echo '<tr>'; echo '<td align="center">'.$pilot->firstname.' '.$pilot->lastname.'</td>'; echo '<td align="center">'.$aircraft->name.'</td>'; echo '<td align="center"><font color="red">'.$stat->landingrate.' ft/m</font></td>'; echo '</tr>'; } ?> But I get this error: Warning: Invalid argument supplied for foreach() in /home/alvandai/domains/alvandair.com/public_html/lib/skins/aqua/frontpage_main.tpl on line 204 and the table is empty. I don't know where I'm doing it wrong!