Jump to content

Schedule Search (Airline, Aircraft, Arrival, Departure)


simpilot

Recommended Posts

I have tried many, many configurations on trying to change it, and also left multiple posts about getting it to work like that. I have even removed the Aircraft search altogether for about 2 months because of the way it looked with what I wanted to achieve, but placed it back. Dave, I hope you can shed some light on this subject, as I am still baffled myself on the calling of the aircraft.

Link to comment
Share on other sites

  • Administrators

You will need to change the functions to look for the aircraft data and search for schedule data in the FrontSchedulesData.class.php file.

  public function findschedules($arricao, $depicao, $airline, $aircraft)   {
    $query = "SELECT phpvms_schedules.*, phpvms_aircraft.fullname AS aircraft, phpvms_aircraft.registration
		    FROM phpvms_schedules, phpvms_aircraft
		    WHERE phpvms_schedules.depicao LIKE '$depicao'
		    AND phpvms_schedules.arricao LIKE '$arricao'
		    AND phpvms_schedules.code LIKE '$airline'
		    AND phpvms_schedules.aircraft LIKE '$aircraft'
		    AND phpvms_aircraft.id LIKE '$aircraft'";
    return DB::get_results($query);
   }


   public function findaircrafttypes() {
    $query = "SELECT DISTINCT fullname
		    FROM phpvms_aircraft";
    return DB::get_results($query);
   }

   public function findaircraft($aircraft) {
    $query = "SELECT id
		    FROM phpvms_aircraft
		    WHERE fullname='$aircraft'";
    return DB::get_results($query);
   }

And on line 33 of airport_search.tpl change it to;

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

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...

(solved)

(i dont now how i can remove this message)

he,

i have a problem with the schedule search system.

example:

Departure Airfield EGLL

Arrival Airfield EHAM

Than give the system all schedules from EGLL and not only EGLL to EHAM.

when i search on airliner than i have the same problem that the system not search on the one airliner but of all my airliners.

o hope that you can help me.

Link to comment
Share on other sites

  • 10 months later...
  • Moderators

Rather than pointing my browser to this schedule search, I want it to come up when my pilots click on View Schedules in the Pilot Center, in that case, where do I put this?

(echo sight url preferred)/index.php/FrontSchedules .

I believe your looking for this...

<a href="<?php echo url('/FrontSchedules');?>">View Flight Schedules</a>

Link to comment
Share on other sites

  • Administrators

Yes, but I need to know where to put it, so that when my pilots click on "View Flight Schedules" from the pilot center, it will go to this schedule system instead of the default.

You need to replace the link in your template that is in place for the default schedules with this one.

Link to comment
Share on other sites

  • 4 months later...
  • 3 months later...
  • 2 weeks later...

Is there a way to get the search form and the schedule results on the same page? I tried

$this->set('allroutes', $routes);
$this->show('airport_search.tpl');
$this->show('schedule_results.tpl');

}

but the form comes up totally empty after the first search is completed.

http://www.spark-jet.../FrontSchedules

I'd love to know as well.

Link to comment
Share on other sites

  • 4 weeks later...

Module creates a schedule search form that includes the ability to choose the airline, aircraft type, arrival field, and departure field. You can choose one or all of the parameters to find what you are looking for in your schedule database.

To install

Download and unzip

Place the files in the proper paths as structured in the download

No new sql tables or anything needed.

Point your browser to mysite/index.php/FrontSchedules and start searching.

Enjoy!

Code hosted on Github - Link In Signature.

hello sir ..

i have this moudle but all pilots can do "add to bid" .

and i don't want becuse i have There are restrictions on ranks .

Example:

Pilot to 50 hours can not fly for heavy aircraft like 747 777 767 ..

but now all pilot can do add to bid .

how i can do they can make the bid only by their rank.

As usual schedule search .

please help me ..

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 months later...

I really like this module. It works out of the box. I have read the posts in the thread, and done other searches in the forums and haven't found the info I seek. Is it possible with this module, or anything else for a pilot, to search for routes by their assigned hub? All pilots are assigned to a hub, but schedules are not in anyway that I see linked to a hub. Some reading of posts in the forums suggest that is correct. There are mods for hub stats, hub transfers and others. So when a pilot is assigned to a hub, and searches either through the pilot center or through a link to this mod, the departure is their assigned hub, and the arrival is those airports from the schedule table. That was the way we originally built our schedules that were a manual process of selection. Can what I want be done or has anyone else done something like that?

Link to comment
Share on other sites

  • 3 weeks later...

I have done some more research on searching by assigned hub. That problem is compounded by not having a column in the schedule table that identifies the depicao as a hub. I also saw this post for a mod, http://forum.phpvms....l__+sort +order but don't think I will do that. What looks to be a better solution is to put the hubs at the top of the depicao & arricao list. So i have re-odered my airport db table to show the hubs first, then all other airports. Yet it doesn't display that when you call the airport_search.tpl. Looking at the FrontSchedulesData.class.php I don't see where it instructs the search to be alphabetic by icao (which I don't want). I want it to display the depicao and arricao as I have them in the db table. Any help would be appreciated.

Not the solution I wanted, but this works for now;

http://forum.phpvms.net/topic/5309-modified-simpilots-frontschedule-search/page__hl__%2Bsort+%2Border

Link to comment
Share on other sites

  • 2 months later...

Hello i am attempting to get your Flight Search module up onto my pilot center using this code:

<?php Template::Show('airport_search.tpl'); ?>

However all i get is this when it comes up:

HZh5YVP.jpg

Is there a fix for this issue? All the field are of 'all' when there is suppose to be data there.

Thanks

Link to comment
Share on other sites

  • Administrators

@toyuko - Using that is just going to load the template with out any data. In your controller for your pilot center add these;

$this->set('airports', OperationsData::GetAllAirports());
$this->set('airlines', OperationsData::getAllAirlines());
$this->set('aircrafts', FrontSchedulesData::findaircrafttypes());
$this->set('countries', FrontSchedulesData::findcountries());

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...