本文整理汇总了PHP中OperationsData::getAllAirlines方法的典型用法代码示例。如果您正苦于以下问题:PHP OperationsData::getAllAirlines方法的具体用法?PHP OperationsData::getAllAirlines怎么用?PHP OperationsData::getAllAirlines使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OperationsData
的用法示例。
在下文中一共展示了OperationsData::getAllAirlines方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
if (isset($this->post->action)) {
if ($this->post->action == 'findflight') {
$this->findflight();
}
} else {
$this->set('airports', OperationsData::GetAllAirports());
$this->set('airlines', OperationsData::getAllAirlines());
$this->set('aircrafts', FrontSchedulesData::findaircrafttypes());
$this->set('countries', FrontSchedulesData::findcountries());
$this->show('RSL/airport_search.tpl');
}
}
示例2: testPaxCount
/**
* StatsTest::testPaxCount()
*
* @return void
*/
public function testPaxCount()
{
$total = DB::get_row('SELECT SUM(`load`) AS `total`
FROM phpvms_pireps WHERE `flighttype`=\'P\' AND `accepted`=' . PIREP_ACCEPTED);
$this->assertEquals($total->total, StatsData::TotalPaxCarried(), 'StatsData::TotalPaxCarried(NO CODE)');
$airlines = OperationsData::getAllAirlines(true);
foreach ($airlines as $airline) {
$pilotCount = StatsData::TotalPaxCarried($airline->code);
$total = DB::get_row('SELECT SUM(`load`) AS `total`
FROM phpvms_pireps
WHERE accepted =' . PIREP_ACCEPTED . '
AND flighttype = \'P\'
AND code = \'' . $airline->code . '\'');
$this->assertEquals($total->total, $pilotCount, 'StatsData::TotalPaxCarried(' . $airline->code . ')');
}
}
示例3: ShowForm
protected function ShowForm()
{
$field_list = RegistrationData::GetCustomFields();
$this->set('extrafields', $field_list);
$this->set('field_list', $field_list);
$airline_list = OperationsData::getAllAirlines(true);
$this->set('allairlines', $airline_list);
$this->set('airline_list', $airline_list);
$hub_list = OperationsData::getAllHubs();
$this->set('allhubs', $hub_list);
$this->set('hub_list', $hub_list);
$country_list = Countries::getAllCountries();
$this->set('countries', $country_list);
$this->set('country_list', $country_list);
$this->render('registration_mainform.tpl');
}
示例4: index
public function index()
{
$revision = trim(file_get_contents(CORE_PATH . '/version'));
if ($revision != 'simpilot 5.5.2') {
echo '<center>phpVMS Version Installed Is Not Compatible With This Module!</center><br />';
echo '<center>phpVMS Version Installed: ' . $revision . '</center>';
} elseif (isset($this->post->action)) {
if ($this->post->action == 'findflight') {
$this->findflight();
}
} else {
$this->set('airports', OperationsData::GetAllAirports());
$this->set('airlines', OperationsData::getAllAirlines());
$this->set('aircrafts', FBSVData::findaircrafttypes());
$this->set('countries', FBSVData::findcountries());
$this->show('fbsv/airport_search.php');
}
}
示例5: ShowForm
protected function ShowForm()
{
//Google reCaptcha
//updated to Google noCaptcha 1/15
$this->set('sitekey', RECAPTCHA_PUBLIC_KEY);
$this->set('lang', 'en');
$field_list = RegistrationData::GetCustomFields();
$this->set('extrafields', $field_list);
$this->set('field_list', $field_list);
$airline_list = OperationsData::getAllAirlines(true);
$this->set('allairlines', $airline_list);
$this->set('airline_list', $airline_list);
$hub_list = OperationsData::getAllHubs();
$this->set('allhubs', $hub_list);
$this->set('hub_list', $hub_list);
$country_list = Countries::getAllCountries();
$this->set('countries', $country_list);
$this->set('country_list', $country_list);
$this->render('registration_mainform.tpl');
}
示例6: index
public function index()
{
if (!Auth::LoggedIn()) {
$this->set('message', 'You must be logged in to access this feature!');
$this->render('core_error.tpl');
return;
} else {
if (isset($this->post->action)) {
if ($this->post->action == 'search') {
$this->search();
}
} else {
$this->set('airports', OperationsData::GetAllAirports());
$this->set('airlines', OperationsData::getAllAirlines());
$this->set('aircrafts', OperationsData::getAllAircraft('true'));
$this->set('countries', FltbookData::findCountries());
$this->show('Fltbook/search_form');
}
}
}
示例7: getProperFlightNum
/**
* Extract the code and flight number portions from the flight number
* Ensures that the code and number are properly split
*/
public static function getProperFlightNum($flightnum)
{
if ($flightnum == '') {
return false;
}
$ret = array();
$flightnum = strtoupper($flightnum);
$airlines = OperationsData::getAllAirlines(false);
foreach ($airlines as $a) {
$a->code = strtoupper($a->code);
if (strpos($flightnum, $a->code) === false) {
continue;
}
$ret['code'] = $a->code;
$ret['flightnum'] = str_ireplace($a->code, '', $flightnum);
return $ret;
}
# Invalid flight number
$ret['code'] = '';
$ret['flightnum'] = $flightnum;
return $ret;
}
示例8: parsePilotID
/**
* Parse a pilot ID from a passed ID
*
* @param int $pilotid Pass the ID string
* @return int Returns the integer database ID
*
*/
public static function parsePilotID($pilotid)
{
if (!is_numeric($pilotid)) {
$airlines = OperationsData::getAllAirlines();
foreach ($airlines as $a) {
$a->code = strtoupper($a->code);
if (strpos($pilotid, $a->code) === false) {
continue;
}
$pilotid = intval(str_ireplace($a->code, '', $pilotid));
$pilotid = $pilotid - Config::Get('PILOTID_OFFSET');
}
}
return $pilotid;
}
示例9: FilePIREPForm
/**
* PIREPS::FilePIREPForm()
*
* @param string $bidid
* @return
*/
protected function FilePIREPForm($bidid = '')
{
if (!Auth::LoggedIn()) {
$this->set('message', 'You must be logged in to access this feature!');
$this->render('core_error.tpl');
return;
}
$this->set('pilot', Auth::$pilot->firstname . ' ' . Auth::$pilot->lastname);
$this->set('pilotcode', PilotData::GetPilotCode(Auth::$pilot->code, Auth::$pilot->pilotid));
$this->set('pirepfields', PIREPData::GetAllFields());
if ($bidid != '') {
$this->set('bid', SchedulesData::GetBid($bidid));
// get the bid info
}
$airport_list = OperationsData::getAllAirports();
$this->set('allairports', $airport_list);
#deprecated
$this->set('airport_list', $airport_list);
$airline_list = OperationsData::getAllAirlines(true);
$this->set('allairlines', $airline_list);
#deprecated
$this->set('airline_list', $airline_list);
$aircraft_list = OperationsData::getAllAircraft(true);
/* Skip any aircraft which have aircraft that the pilot
is not rated to fly (according to RANK)
This means the aircraft rank level is higher than
what the pilot's ranklevel, so just do "continue"
and move onto the next route in the list
*/
if (Config::Get('RESTRICT_AIRCRAFT_RANKS') === true) {
foreach ($aircraft_list as $index => $aircraft) {
if ($aircraft->ranklevel > Auth::$pilot->ranklevel) {
unset($aircraft_list[$index]);
continue;
}
}
}
$this->set('allaircraft', $aircraft_list);
#deprecated
$this->set('aircraft_list', $aircraft_list);
$this->render('pirep_new.tpl');
}