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


PHP Audit::Save方法代碼示例

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


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

示例1: addAudit

 public function addAudit($type, $data)
 {
     $audit = new Audit();
     $audit->user = $this->user->id;
     $audit->ip = $_SERVER['REMOTE_ADDR'];
     $audit->time = date("Y-m-d H:i:s");
     $audit->time = gmdate('Y-m-d H:i:s', strtotime($audit->time));
     $audit->type = $type;
     $audit->details = $data;
     $currentEmpId = $this->getCurrentProfileId();
     if (!empty($currentEmpId)) {
         $employee = $this->baseService->getElement('Employee', $this->getCurrentProfileId(), null, true);
         $audit->employee = $employee->first_name . " " . $employee->last_name . " [EmpId = " . $employee->employee_id . "]";
     }
     $ok = $audit->Save();
     if (!$ok) {
         LogManager::getInstance()->info("Error adding audit:" . $audit->ErrorMsg());
     }
 }
開發者ID:ahmedalaahagag,項目名稱:ICEPROHRM,代碼行數:19,代碼來源:AuditActionManager.php

示例2: unset

                     unset($objNewAuditScan);
                 }
             }
         }
     }
 }
 if ($objAuditScanArray) {
     try {
         // Get an instance of the database
         $objDatabase = QApplication::$Database[1];
         // Begin a MySQL Transaction to be either committed or rolled back
         $objDatabase->TransactionBegin();
         $objAudit = new Audit();
         $objAudit->EntityQtypeId = 2;
         // Inventory
         $objAudit->Save();
         foreach ($objAuditScanArray as $objAuditScan) {
             $objAuditScan->AuditId = $objAudit->AuditId;
             $objAuditScan->Save();
         }
         $objDatabase->TransactionCommit();
         $strWarning .= "Your transaction has successfully completed<br /><a href='index.php'>Main Menu</a> | <a href='inventory_menu.php'>Inventory Menu</a><br />";
         //Remove that flag when transaction is compelete or exists some errors
         unset($_SESSION['intUserAccountId']);
         $blnTransactionComplete = true;
     } catch (QExtendedOptimisticLockingException $objExc) {
         // Rollback the database
         $objDatabase->TransactionRollback();
     }
 } else {
     $strWarning = 'No locations have been added. You must click Apply after each location audit.<br />';
開發者ID:proxymoron,項目名稱:tracmor,代碼行數:31,代碼來源:inventory_audit.php


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