Jump to content
iva

Charter Flight System v1.1.0 (UPDATED!)

  

48 members have voted

  1. 1. What is your opinion on this module?

    • It is really useful and simple
      29
    • A little complicated, but useful
      16
    • Useless and extremely complicated
      3


Recommended Posts

Charter Flight System

(Using PHP-VMS defult Temps and Modules)

[updated V1.1.0]

By Reza Farzam

Hello dear webmaster;

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 :rolleyes:

____________________________________

UPDATED!

change log :

- graphics added and images attached

- instructions modified

- module modified

- .tpl files modified

- error templates added

Charter_Flight_System_v1.1.0by.Reza.Farzamupdated.zip

  • Like 8

Share this post


Link to post
Share on other sites

Give your pilots some liberty !

Let them experience something they never experienced ,EVER!

by Charter Flight System ...

post-3295-0-99188600-1349628589_thumb.jpg

Share this post


Link to post
Share on other sites

2 days passed...13 downloads...

any comment?

any question?

:huh:

is this module good? bad? or what? :rolleyes:

Share this post


Link to post
Share on other sites

Hello,

So far I cant wait to test it, it seems interesting. But, I do have an issue:

Fatal error: Call to undefined method SchedulesData::countCharterSchedules() in .../core/templates/charter/ops_schedules.tpl on line 50

Thanks for your help.

Share this post


Link to post
Share on other sites

hi ,

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! ;)

Share this post


Link to post
Share on other sites

just be advise that we use the $price field to keep the $pilotid info for each schedule!

this is the trick of this module :D:rolleyes:

Share this post


Link to post
Share on other sites

note#

you can limit the aircrafts for your charter flights!

just need to change the code for AIRCRAFT SELECTION FIELD (DROPDOWN) in your ops_editscheduleform.tpl and ops_scheduleform.tpl

from

                      	 <?php

                           foreach($allaircraft as $aircraft)
                           {
                               if($aircraft->registration == $schedule->registration)
                                   $sel = 'selected';
                               else
                                   $sel = '';

                               echo '<option value="'.$aircraft->id.'" '.$sel.'>'.$aircraft->name.' ('.$aircraft->registration.')</option>';
                           } ?>

to this :

               <?php

                           foreach($allaircraft as $aircraft)
                           {
                           if($aircraft->icao == "Your FIRST aircraft ICAO code you dont want to show, goes here!" || 
							  $aircraft->icao == "Your SECOND aircraft ICAO code you dont want to show, goes here!" || 
								    $aircraft->icao == "and more...!" )
                           {
                           continue;
                           }
                           else
                           {
                               if($aircraft->registration == $schedule->registration)
                                   $sel = 'selected';
                               else
                                   $sel = '';

                               echo '<option value="'.$aircraft->id.'" '.$sel.'>'.$aircraft->fullname.'</option>';
                           }
                           }
                           ?>

also when you use $aircraft->fullname it's show the Full Name of your aircrafts!

you can do more simillar codings! :rolleyes:

Share this post


Link to post
Share on other sites

My bad again, but I hadn't changed the code to hide the CH airline. When I do, I get a bit of a problem. In looking at your code, which is this,

<?php

foreach($allairlines as $airline)

{

If($airline->code == “CHâ€)

{

Continue;

}

else

{

echo '<option value="'.$airline->code.'">'.$airline->code.' - '.$airline->name.'</option>';

}

?>

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.

Share this post


Link to post
Share on other sites

My bad again, but I hadn't changed the code to hide the CH airline. When I do, I get a bit of a problem. In looking at your code, which is this,

<?php

foreach($allairlines as $airline)

{

If($airline->code == “CHâ€)

{

Continue;

}

else

{

echo '<option value="'.$airline->code.'">'.$airline->code.' - '.$airline->name.'</option>';

}

?>

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 !! :unsure:

here is the correct code :

<?php

foreach($allairlines as $airline)

{

If($airline->code == “CHâ€)

{

Continue;

}

else

{

echo '<option value="'.$airline->code.'">'.$airline->code.' - '.$airline->name.'</option>';

}

}

?>

Share this post


Link to post
Share on other sites

i have a big problem, when i add a schedule than say he this: All of the requierd fields must be filled out

See the image, I filled everything what needed.

in CHARTER MODULE at line 798 ,

$this->post->code == '' || $this->post->flightnum == ''

|| $this->post->deptime == '' || $this->post->arrtime == ''

|| $this->post->depicao == '' || $this->post->arricao == ''

|| $this->post->price == ''

here you can add or remove your RIQUIRED FIELDS!

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 == ''

Share this post


Link to post
Share on other sites

in CHARTER MODULE at line 798 ,

$this->post->code == '' || $this->post->flightnum == ''

|| $this->post->deptime == '' || $this->post->arrtime == ''

|| $this->post->depicao == '' || $this->post->arricao == ''

|| $this->post->price == ''

here you can add or remove your RIQUIRED FIELDS!

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?

Share this post


Link to post
Share on other sites

ok I'm so sorry, I forgot } at the end of the code to close FOREACH function !! :unsure:

here is the correct code :

<?php

foreach($allairlines as $airline)

{

If($airline->code == “CHâ€)

{

Continue;

}

else

{

echo '<option value="'.$airline->code.'">'.$airline->code.' - '.$airline->name.'</option>';

}

}

?>

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.. :rolleyes:

Share this post


Link to post
Share on other sites

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 :huh:

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.. :rolleyes:

ok, thanks, i'll do it

Share this post


Link to post
Share on other sites

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?

did you edit the tpl files?

if so, please send them and i'll check them for you. thanks

my email : datmir@yahoo.com

Share this post


Link to post
Share on other sites

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 :huh:

please check the code for Charter airline. it have to be "CH" with no space or any character..

I guess we have a mystery. :D

Code:

 	 echo '<p class="error">Please enter your email address</p>';
?>
</dd>

<dt>Select Airline: *</dt>
<dd>
<select name="code" id="code">
<?php
foreach($allairlines as $airline)
{
If($airline->code == “CHâ€)
 {
 Continue;
 }
else
 {
echo '<option value="'.$airline->code.'">'.$airline->code.' - '.$airline->name.'</option>';
 }
}
?>
</select>
</dd>

Admin Panel:

ch1.jpg

Registration:

ch2.jpg

Share this post


Link to post
Share on other sites

did you edit the tpl files?

if so, please send them and i'll check them for you. thanks

my email : datmir@yahoo.com

Done!:)

I guess we have a mystery. :D

Code:

 	 echo '<p class="error">Please enter your email address</p>';
?>
</dd>

<dt>Select Airline: *</dt>
<dd>
<select name="code" id="code">
<?php
foreach($allairlines as $airline)
{
If($airline->code == “CHâ€)
 {
 Continue;
 }
else
 {
echo '<option value="'.$airline->code.'">'.$airline->code.' - '.$airline->name.'</option>';
 }
}
?>
</select>
</dd>

Admin Panel:

ch1.jpg

Registration:

ch2.jpg

i have that problem to.

Share this post


Link to post
Share on other sites

ok,

this module working perfect for me in my va.

so, I copied all my files from my va and made the module from the first step :wacko:

please get the module from the first reply in this topic agian. i think the module will work perfect now, I HOPE ;)

So it seems that we have just one simillar prob and that is HOW TO HIDE THE CH AIRLINE...

IF any body had problem with this step ,please send me all the TPL files you want to hide CH in them...I'LL FIX THEM for you ;)

here is my email : datmir@yahoo.com

by the way be advise that sth simillar to this module have a price for 40$ us :blink:

just kiding but it's real :P

Share this post


Link to post
Share on other sites

It is good to see active support. I'll look at the new version in the morning. I've been sitting at my keyboard for over 15 hours and don't think I trust myself to do anything until I get some sleep..

Share this post


Link to post
Share on other sites

FYI, there is a spelling error in line 193 of ops_schedules.tpl.

It is, currently:

Flight <span lang="en-us">Brifing</span></font></th>

It should be:

Flight <span lang="en-us">Briefing</span></font></th>

Share this post


Link to post
Share on other sites

FYI, there is a spelling error in line 193 of ops_schedules.tpl.

It is, currently:

Flight <span lang="en-us">Brifing</span></font></th>

It should be:

Flight <span lang="en-us">Briefing</span></font></th>

:wacko: my bad! sorry.

any other problem??

Share this post


Link to post
Share on other sites

No need to apologize.

Nothing else I can see. I haven't looked further into hiding the CH, but will do that after I run some errands.

Putting all the graphics locally, makes modifying the appearance quite easy.

ch3.jpg

  • Like 1

Share this post


Link to post
Share on other sites

:wacko: my bad! sorry.

any other problem??

yes, i have the same problem and error:(

i think that the problem is: flight type:

why? that field is empty

Edited by michael Kraan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×