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


PHP Logs::MissingReport方法代碼示例

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


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

示例1: store

 public function store()
 {
     $kit = Kits::findOrFail(Input::get('ID'));
     foreach ($kit->contents as $cont) {
         if ($cont->DamagedLogID == null && Input::has('DamagedMsg_' . $cont->ID)) {
             $cont->DamagedLogID = Logs::DamageReport($kit->KitType, $kit->ID, $cont->ID, base64_decode(Input::get('DamagedMsg_' . $cont->ID)));
         }
         if ($cont->MissingLogID == null && Input::has('MissingMsg_' . $cont->ID)) {
             $cont->MissingLogID = Logs::MissingReport($kit->KitType, $kit->ID, $cont->ID, base64_decode(Input::get('MissingMsg_' . $cont->ID)));
         }
         $cont->save();
     }
     return "OK";
 }
開發者ID:KWinston,項目名稱:EPLProject,代碼行數:14,代碼來源:KitContentsController.php

示例2: store

 public function store()
 {
     $kit = Kits::findOrFail(Input::get('ID'));
     $kit->KitState = 2;
     $kit->save();
     foreach ($kit->contents as $content) {
         if (Input::has('isMissing_' . $content->ID) && Input::get('isMissing_' . $content->ID) == '1' && $content->MissingLogID == null) {
             $message = Input::get('MissingID_' . $content->ID);
             $logID = Logs::MissingReport($kit->KitType, $kit->ID, $content->ID, $message);
             $content->MissingLogID = $logID;
         }
         if (Input::has('isDamaged_' . $content->ID) && Input::get('isDamaged_' . $content->ID) == '1' && $content->DamagedLogID == null) {
             $message = Input::get('DamagedID_' . $content->ID);
             $logID = Logs::DamageReport($kit->KitType, $kit->ID, $content->ID, $message);
             $content->DamagedLogID = $logID;
         }
         $content->save();
     }
     if (Input::has('LogMessage') && strlen(Input::get('LogMessage')) > 0) {
         $message = Input::get('LogMessage');
         $logNote = Logs::Note($kit->KitType, $kit->ID, NULL, $message);
     }
     return Redirect::action('recieve_kit.index');
 }
開發者ID:KWinston,項目名稱:EPLProject,代碼行數:24,代碼來源:ShipKitController.php

示例3: store

 public function store()
 {
     $inp = Input::all();
     // print dd($inp);
     $id = $inp['ID'];
     $kit = Kits::findOrFail($id);
     if (!isset($inp['Available'])) {
         $inp['Available'] = 0;
     }
     $kit->fill($inp);
     $kit->save();
     $res = "OK";
     if (isset($inp["contents"])) {
         foreach ($inp["contents"] as $idx => $item) {
             if ($item["status"] == 1) {
                 if (strlen($item["DamagedLogID"]) == 0) {
                     $item["DamagedLogID"] = null;
                 }
                 if (strlen($item["MissingLogID"]) == 0) {
                     $item["MissingLogID"] = null;
                 }
                 $content = KitContents::create($item);
                 $content->save();
             } else {
                 if ($item["status"] == 3) {
                     $content = KitContents::findOrFail($item["ID"]);
                     $content->fill($item);
                     if (isset($item["Damaged"])) {
                         if ($item["Damaged"] == 0) {
                             $content->DamagedLogID = null;
                         } else {
                             if ($item["DamagedLogID"] == null) {
                                 $content->DamagedLogID = Logs::DamageReport($kit->KitType, $kit->ID, $content->ID, $item["DamagedMessage"]);
                             }
                         }
                     } else {
                         $content->DamagedLogID = null;
                     }
                     if (isset($item["Missing"])) {
                         if ($item["Missing"] == 0) {
                             $content->MissingLogID = null;
                         } else {
                             if ($item["MissingLogID"] == null) {
                                 $content->MissingLogID = Logs::MissingReport($kit->KitType, $kit->ID, $content->ID, $item["missingMessage"]);
                             }
                         }
                     } else {
                         $content->MissingLogID = null;
                     }
                     $content->save();
                 }
             }
             if ($item["status"] == 4 && $item["ID"] != "***NEW***") {
                 // delete the kitContent
                 $content = KitContents::destroy($item["ID"]);
             }
         }
     }
     return $res;
 }
開發者ID:KWinston,項目名稱:EPLProject,代碼行數:60,代碼來源:KitsController.php


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