To be honest, just noticed that this madule is a developed version of the PHP-VMS defult temps and madules which used in order to add and edit SCHEDULES from the Admin Panel .
So first of all I am going to admire the PHP-VMS Board!
We all know that there is already a pay-module owned by PHP-VMS Board that worths more than any charter modules!
But I believe this Charter Module is the Best Free-Module ever!
I think this module covers 80 precent of your demands!
This module works by giving access to your pilots to add and edit the limited number of flights. These flights will be added to an specific airline which Its name is “Charter Flight†and its code is “CHâ€!
These flights can ONLY be ADD or EDIT by its owner (Specific Pilot)! and also ADMIN of site!
Means that all pilots have a list of their own flights and have no access to others’!
Inorder to keep this activity onder control of ADMIN, I put the range limitation for flight numbers!
So we have work to do!
I appreciate all of you if help to improve this module
as I explained in the manuall, you have to …Put the codes below in your SchedulesData.class (make a backup first!).
/**
* Get the total number of schedules based on criterea for charters
*
* @param array $params key => value list
* @return int Returns the total number
*
*/
public static function CountCharterSchedules($icao, $price)
{ //Count schedules
$query = "SELECT * FROM ".TABLE_PREFIX."schedules WHERE price = '".$price."' AND code = '".$icao."'";
$results = DB::get_results($query);
return DB::num_rows($results);
}
you can find SchedulesData.class here:
YOUR WEBSITE ROOT/core/common/…
this code will count the charter flights of each pilot!
Isn’t there a mismatch of curly brackets, there? The problem is without another one before the closing “?>”, I get an error, but with it added, it doesn’t hide the CH airline in registration. Sorry if I seem confused.
Isn’t there a mismatch of curly brackets, there? The problem is without another one before the closing “?>”, I get an error, but with it added, it doesn’t hide the CH airline in registration. Sorry if I seem confused.
ok I’m so sorry, I forgot } at the end of the code to close FOREACH function !!
for example if you want to remove Departure Time from your Riquired Fields, you have to remove $this->post->deptime == ‘’ || from the code, and save the changes!
try this and find the field that has the problem!
but be advise that we use the $price field to keep the $pilotid info for each schedule! so do NOT remove $this->post->price == ‘’
for example if you want to remove Departure Time from your Riquired Fields, you have to remove $this->post->deptime == ‘’ || from the code, and save the changes!
try this and find the field that has the problem!
but be advise that we use the $price field to keep the $pilotid info for each schedule! so do NOT remove $this->post->price == ‘’
i go to test that. but i it possible that flight number automatic add ? then there come no problems with flight numbers
update:
have it removed. and look what it was. I can not find the problem. i think that the problem is flight type: is that possible?
That was the conclusion I came to, as well. There is a problem in that it does not hide the CH and someone can register with it. While I can, as administrator, edit the pilot, I’d still prefer to have CH not visible
BTW, I’d make the suggestion that for this package, you come up with a way that there are no dependencies on your site. While installing it took only a few minutes, downloading the necessary images and changing all the links to your site, took over an hour..
That was the conclusion I came to, as well. There is a problem in that it does not hide the CH and someone can register with it. While I can, as administrator, edit the pilot, I’d still prefer to have CH not visible
do you add the Charter Flight as an airline with exact “CH” code from your admin panel?
if so, it can not be cuse any problem!
because I have 17 airlines in my va and i already use this code to hide 17 airlines in my REGISTRATION FORM
please check the code for Charter airline. it have to be “CH” with no space or any character..
BTW, I’d make the suggestion that for this package, you come up with a way that there are no dependencies on your site. While installing it took only a few minutes, downloading the necessary images and changing all the links to your site, took over an hour..