當前位置: 首頁>>代碼示例>>PHP>>正文


PHP OperationsData::getAllAirlines方法代碼示例

本文整理匯總了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');
     }
 }
開發者ID:phpmods,項目名稱:FlightBookingSystem_V1.0,代碼行數:14,代碼來源:FrontSchedules.php

示例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 . ')');
     }
 }
開發者ID:Galihom,項目名稱:phpVMS,代碼行數:21,代碼來源:StatsTest.php

示例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');
 }
開發者ID:Galihom,項目名稱:phpVMS,代碼行數:16,代碼來源:Registration.php

示例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');
     }
 }
開發者ID:parkho,項目名稱:FlightBookingSystem.V1.1,代碼行數:18,代碼來源:FBSV11.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');
 }
開發者ID:phpmods,項目名稱:phpvms_5.5.x,代碼行數:20,代碼來源:Registration.php

示例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');
         }
     }
 }
開發者ID:web541,項目名稱:FltbookSystem,代碼行數:20,代碼來源:Fltbook.php

示例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;
 }
開發者ID:rallin,項目名稱:phpVMS,代碼行數:26,代碼來源:SchedulesData.class.php

示例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;
 }
開發者ID:phpmods,項目名稱:phpvms_5.5.x,代碼行數:22,代碼來源:PilotData.class.php

示例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');
 }
開發者ID:Galihom,項目名稱:phpVMS,代碼行數:48,代碼來源:PIREPS.php


注:本文中的OperationsData::getAllAirlines方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。