当前位置: 首页>>代码示例>>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;未经允许,请勿转载。