Jump to content

Schedule Search Filter


Bueno93

Recommended Posts

Good evening again,

as I'm trying to make my site as comfortable as possible I'm planning to add a search filter. Unfortunately I'm having great plans without having the right PHP knowledge (stupid, eh? ;)), so I have to rely on you as far as it is possible.

Well, the search filter should have a few functions. At first you should be able to search with different values.

Starting with entering a departure or a destination ICAO (e.g. EDDL would show all [every day] departures from Dusseldorf, just entering ED would show all departures out of Germany). The same for the destination. These two values combined should show a route between the two ICAOs.

Further on you should be able to restrict the search, as choosing a certain aircraft operating on this route and a restriction on the flightdays, too. All these values should be linked.

Example (1):

Departure: ED

Aircraft: 737-700 selected

Day: Tuesday

-> Should show all flights out of Germany operated by an 737 on Tuesday.

Example (2):

just A320 as aircraft selected

-> Should show EVERY flight operated with an A320.

So, every value should be usable on it's own but also linked with the others.

(As perfection there should be a sort function available for the schedule results. Like departuretime etc.)

At all this is just an idea, for which I didn't find a solution yet. I'm also not sure if it's possible to realise this "dream" with phpVMS, but I would love the one, who could show me.

I hope this request is not too high, but I really need help in such situations.

Have a nice evening

Kind regards from Germany

Link to comment
Share on other sites

Well,

I found the doc refering to the topic, but at all I don't understand how to add the parameters. So, I guess it's all in this:

$params = array(

's.depicao' => array ('KJFK', 'LFPG'),

's.arricao' => array ('KBOS', 'KIAD'),

's.enabled' => 1,

But where exactly do I have to add these lines so that they will work?

Regards

Tim

Link to comment
Share on other sites

  • Administrators

http://docs.phpvms.net/development/searching_schedules_and_pireps

You're msising

$schedules = SchedulesData::findSchedules($params);

Further down where it says

'// You can then do:'

That's ane xample of how to process

or you can do

Template::Set('allroutes', $schedules);

Template::Show('schedule_results.tpl');

which will shwo those schedules in that results template

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