Jump to content

Rev 946 - schedules listing cleanup, added weekly schedule filter


Nabeel

Recommended Posts

  • Administrators

Changed Files:

m admin/modules/Operations/Operations.php

m admin/modules/PIREPAdmin/PIREPAdmin.php

m admin/templates/ops_scheduleform.tpl

m admin/templates/pirep_edit.tpl

m core/app.config.php

m core/classes/CodonCache.class.php

m core/common/ACARSData.class.php

m core/common/PIREPData.class.php

m core/common/SchedulesData.class.php

m core/modules/PIREPS/PIREPS.php

m core/modules/Schedules/Schedules.php

m core/templates/schedule_results.tpl

schedules listing cleanup, added weekly schedule filter

View complete changes

Download from here

Link to comment
Share on other sites

Hello Nadeel,

I have one problem. In the last version I had added these lines to Schedules.php by the public function Find Flight.

if($this->post->airlines != ''){

$params = array('s.code' => $this->post->airlines);

}

This because I have more airlines and it worked like a charm. I could search to the schedules by Airliner.

With this update I inserted the same lines again but now it won`t work. I am confussed.

Did I overlook something?

Regards,

Cor

Link to comment
Share on other sites

  • Administrators

Hello Nadeel,

I have one problem. In the last version I had added these lines to Schedules.php by the public function Find Flight.

This because I have more airlines and it worked like a charm. I could search to the schedules by Airliner.

With this update I inserted the same lines again but now it won`t work. I am confussed.

Did I overlook something?

Regards,

Cor

Send me the exact changes you made, I will incorporate them into the main code

Link to comment
Share on other sites

Nabeel,

In the schedules.php I have

public function showSchedules()

{

$depapts = OperationsData::GetAllAirports();

$equip = OperationsData::GetAllAircraftSearchList(true);

$airline = OperationsData::GetAllAirlines();

$this->set('airlines', $airline);

$this->set('depairports', $depapts);

$this->set('equipment', $equip);

$this->render('schedule_searchform.tpl');

# Show the routes. Remote this to not show them.

$this->set('allroutes', SchedulesData::GetSchedules());

$this->render('schedule_list.tpl');

}

public function findFlight()

{

if($this->post->airlines != '')

{

$params = array('s.code' => $this->post->airlines);

}

if($this->post->depicao != '')

{

$params = array('s.depicao' => $this->post->depicao);

}

if($this->post->arricao != '')

{

$params = array('s.arricao' => $this->post->arricao);

}

if($this->post->equipment != '')

{

$params = array('a.name' => $this->post->equipment);

}

if($this->post->distance != '')

{

if($this->post->type == 'greater')

$value = '> ';

else

$value = '< ';

$value .= $this->post->distance;

$params = array('s.distance' => $value);

}

$params['s.enabled'] = 1;

$this->set('allroutes', SchedulesData::findSchedules($params));

$this->render('schedule_results.tpl');

}

and in the schedule_searchform.tpl I added after the find flights by distance

<div id="code">

<p>Select An Airline</p>

<select id="airlines" name="airlines">

<option value="">Select Airline</option>

<?php

if(!$airlines) $airlines = array();

foreach ($airlines as $airline)

{

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

}

?>

</select>

<input type="submit" name="submit" value="Find Flights" />

</div>

Regards,

Cor

P.S. I am working now at the Flightkeeper little problems on the Acarsmap and at this moment I have the Distance and time remaing working.

Still working on the different status of flight.

Link to comment
Share on other sites

×
×
  • Create New...