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


PHP PilotData::UpdatePilotPay方法代碼示例

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


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

示例1: approve_pirep_post

 /**
  * Approve the PIREP, and then update
  * the pilot's data
  */
 protected function approve_pirep_post()
 {
     $pirepid = $this->post->id;
     if ($pirepid == '') {
         return;
     }
     $pirep_details = PIREPData::GetReportDetails($pirepid);
     # See if it's already been accepted
     if (intval($pirep_details->accepted) == PIREP_ACCEPTED) {
         return;
     }
     # Update pilot stats
     SchedulesData::IncrementFlownCount($pirep_details->code, $pirep_details->flightnum);
     PIREPData::ChangePIREPStatus($pirepid, PIREP_ACCEPTED);
     // 1 is accepted
     PilotData::UpdateFlightData($pirep_details->pilotid, $pirep_details->flighttime, 1);
     PilotData::UpdatePilotPay($pirep_details->pilotid, $pirep_details->flighttime);
     RanksData::CalculateUpdatePilotRank($pirep_details->pilotid);
     PilotData::GenerateSignature($pirep_details->pilotid);
     StatsData::UpdateTotalHours();
     LogData::addLog(Auth::$userinfo->pilotid, 'Approved PIREP #' . $pirepid);
     # Call the event
     CodonEvent::Dispatch('pirep_accepted', 'PIREPAdmin', $pirep_details);
 }
開發者ID:ryanunderwood,項目名稱:phpVMS,代碼行數:28,代碼來源:PIREPAdmin.php

示例2: approveall

 public function approveall()
 {
     echo '<h3>Approve All</h3>';
     $allpireps = PIREPData::findPIREPS(array('p.accepted' => PIREP_PENDING));
     $total = count($allpireps);
     $count = 0;
     foreach ($allpireps as $pirep_details) {
         if ($pirep_details->aircraft == '') {
             continue;
         }
         # Update pilot stats
         SchedulesData::IncrementFlownCount($pirep_details->code, $pirep_details->flightnum);
         PIREPData::ChangePIREPStatus($pirep_details->pirepid, PIREP_ACCEPTED);
         // 1 is accepted
         //PilotData::UpdateFlightData($pirep_details->pilotid, $pirep_details->flighttime, 1);
         PilotData::UpdatePilotStats($pirep_details->pilotid);
         PilotData::UpdatePilotPay($pirep_details->pilotid, $pirep_details->flighttime);
         RanksData::CalculateUpdatePilotRank($pirep_details->pilotid);
         RanksData::CalculatePilotRanks();
         PilotData::GenerateSignature($pirep_details->pilotid);
         StatsData::UpdateTotalHours();
         $count++;
     }
     $skipped = $total - $count;
     echo "{$count} of {$total} were approved ({$skipped} has errors)";
 }
開發者ID:rallin,項目名稱:phpVMS,代碼行數:26,代碼來源:PIREPAdmin.php


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