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


PHP OperationsData::GetAircraftInfo方法代碼示例

本文整理匯總了PHP中OperationsData::GetAircraftInfo方法的典型用法代碼示例。如果您正苦於以下問題:PHP OperationsData::GetAircraftInfo方法的具體用法?PHP OperationsData::GetAircraftInfo怎麽用?PHP OperationsData::GetAircraftInfo使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OperationsData的用法示例。


在下文中一共展示了OperationsData::GetAircraftInfo方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: editaircraft

 public function editaircraft()
 {
     $id = $this->get->id;
     $this->set('aircraft', OperationsData::GetAircraftInfo($id));
     $this->set('title', 'Edit Aircraft');
     $this->set('action', 'editaircraft');
     $this->set('allranks', RanksData::getAllRanks());
     $this->render('ops_aircraftform.tpl');
 }
開發者ID:ryanunderwood,項目名稱:phpVMS,代碼行數:9,代碼來源:Operations.php

示例2: getLoadCount

 /**
  * Get the active load count based on the load factor
  *  based on the flight type: P(assenger), C(argo), H(Charter)
  */
 public static function getLoadCount($aircraft_id, $flighttype = 'P')
 {
     $flighttype = strtoupper($flighttype);
     # Calculate our load factor for this flight
     #	Charter flights always will have a 100% capacity
     if ($flighttype == 'H') {
         $load = 100;
     } else {
         # Not a charter
         $loadfactor = intval(Config::Get('LOAD_FACTOR'));
         $load = rand($loadfactor - LOAD_VARIATION, $loadfactor + LOAD_VARIATION);
         # Don't allow a load of more than 95%
         if ($load > 95) {
             $load = 95;
         } elseif ($load <= 0) {
             $load = 92;
         }
         # Use ATA standard of 72%
     }
     /*
      * Get the maximum allowed based on the aircraft flown
      */
     $aircraft = OperationsData::GetAircraftInfo($aircraft_id);
     if (!$aircraft) {
         if ($flighttype == 'C') {
             # Check cargo if cargo flight
             $count = Config::Get('DEFAULT_MAX_CARGO_LOAD');
         } else {
             $count = Config::Get('DEFAULT_MAX_PAX_LOAD');
         }
     } else {
         if ($flighttype == 'C') {
             # Check cargo if cargo flight
             $count = $aircraft->maxcargo;
         } else {
             $count = $aircraft->maxpax;
         }
     }
     $load = $load / 100;
     $currload = ceil($count * $load);
     return $currload;
 }
開發者ID:rallin,項目名稱:phpVMS,代碼行數:46,代碼來源:FinanceData.class.php

示例3: editaircraft

 /**
  * Operations::editaircraft()
  * 
  * @return
  */
 public function editaircraft()
 {
     $this->checkPermission(EDIT_FLEET);
     $id = $this->get->id;
     $this->set('aircraft', OperationsData::GetAircraftInfo($id));
     $this->set('title', 'Edit Aircraft');
     $this->set('action', 'editaircraft');
     $this->set('allranks', RanksData::getAllRanks());
     $this->render('ops_aircraftform.php');
 }
開發者ID:phpmods,項目名稱:phpvms_5.5.x,代碼行數:15,代碼來源:Operations.php


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