当前位置: 首页>>代码示例>>PHP>>正文


PHP LogActions::LogThis方法代码示例

本文整理汇总了PHP中LogActions::LogThis方法的典型用法代码示例。如果您正苦于以下问题:PHP LogActions::LogThis方法的具体用法?PHP LogActions::LogThis怎么用?PHP LogActions::LogThis使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LogActions的用法示例。


在下文中一共展示了LogActions::LogThis方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Miscellaneous

 function Miscellaneous()
 {
     $this->MakeSafe();
     $tmpDCEventLog = new DCEventLog();
     $tmpDCEventLog->DataCenterID = $this->DataCenterID;
     class_exists('LogActions') ? LogActions::LogThis($this, $tmpDCEventLog) : '';
 }
开发者ID:ThirdMonkey,项目名称:openDCIM-myReports,代码行数:7,代码来源:report_dc_event_logging.php

示例2: CreateDevice

 function CreateDevice()
 {
     global $dbh;
     $this->MakeSafe();
     $this->Label = transform($this->Label);
     $this->SerialNo = transform($this->SerialNo);
     $this->AssetTag = transform($this->AssetTag);
     $sql = "INSERT INTO fac_Device SET Label=\"{$this->Label}\", SerialNo=\"{$this->SerialNo}\", AssetTag=\"{$this->AssetTag}\", \n\t\t\t\t\tPrimaryIP=\"{$this->PrimaryIP}\", SNMPCommunity=\"{$this->SNMPCommunity}\", ESX={$this->ESX}, Owner={$this->Owner}, \n\t\t\t\t\tEscalationTimeID={$this->EscalationTimeID}, EscalationID={$this->EscalationID}, PrimaryContact={$this->PrimaryContact}, \n\t\t\t\t\tCabinet={$this->Cabinet}, Position={$this->Position}, Height={$this->Height}, Ports={$this->Ports}, \n\t\t\t\t\tFirstPortNum={$this->FirstPortNum}, TemplateID={$this->TemplateID}, NominalWatts={$this->NominalWatts}, \n\t\t\t\t\tPowerSupplyCount={$this->PowerSupplyCount}, DeviceType=\"{$this->DeviceType}\", ChassisSlots={$this->ChassisSlots}, \n\t\t\t\t\tRearChassisSlots={$this->RearChassisSlots},ParentDevice={$this->ParentDevice}, \n\t\t\t\t\tMfgDate=\"" . date("Y-m-d", strtotime($this->MfgDate)) . "\", \n\t\t\t\t\tInstallDate=\"" . date("Y-m-d", strtotime($this->InstallDate)) . "\", WarrantyCo=\"{$this->WarrantyCo}\", \n\t\t\t\t\tWarrantyExpire=\"" . date("Y-m-d", strtotime($this->WarrantyExpire)) . "\", Notes=\"{$this->Notes}\", \n\t\t\t\t\tReservation={$this->Reservation}, HalfDepth={$this->HalfDepth}, BackSide={$this->BackSide};";
     if (!$dbh->exec($sql)) {
         $info = $dbh->errorInfo();
         error_log("PDO Error: {$info[2]} SQL={$sql}");
         return false;
     }
     $this->DeviceID = $dbh->lastInsertId();
     class_exists('LogActions') ? LogActions::LogThis($this) : '';
     return $this->DeviceID;
 }
开发者ID:Gusenichka,项目名称:openDCIM,代码行数:17,代码来源:install.php

示例3: RemoveFromTemplatesAndDevices

 function RemoveFromTemplatesAndDevices()
 {
     global $dbh;
     $this->AttributeID = intval($this->AttributeID);
     $sql = "DELETE FROM fac_DeviceTemplateCustomValue WHERE AttributeID={$this->AttributeID};";
     if (!$dbh->query($sql)) {
         $info = $dbh->errorInfo();
         error_log("RemoveDeviceCustomAttribute::PDO Error: {$info[2]} SQL={$sql}");
         return false;
     }
     $sql = "DELETE FROM fac_DeviceCustomValue WHERE AttributeID={$this->AttributeID};";
     if (!$dbh->query($sql)) {
         $info = $dbh->errorInfo();
         error_log("RemoveDeviceCustomAttribute::PDO Error: {$info[2]} SQL={$sql}");
         return false;
     }
     class_exists('LogActions') ? LogActions::LogThis($this) : '';
     return true;
 }
开发者ID:ghasedak,项目名称:openDCIM,代码行数:19,代码来源:assets.inc.php

示例4: MakeConnection

 function MakeConnection()
 {
     global $dbh;
     $this->MakeSafe();
     $sql = "INSERT INTO fac_PanelSchedule SET PanelID={$this->PanelID}, \n\t\t\tPolePosition={$this->PolePosition}, NumPoles={$this->NumPoles}, \n\t\t\tLabel=\"{$this->Label}\" ON DUPLICATE KEY UPDATE Label=\"{$this->Label}\", \n\t\t\tNumPoles={$this->NumPoles};";
     class_exists('LogActions') ? LogActions::LogThis($this) : '';
     return $dbh->query($sql);
 }
开发者ID:ghasedak,项目名称:openDCIM,代码行数:8,代码来源:power.inc.php

示例5: date

if (isset($_POST['audit'])) {
    $dev->DeviceID = $_POST['audit'];
    $dev->Audit();
    $dev->AuditStamp = date('r', strtotime($dev->AuditStamp));
    header('Content-Type: application/json');
    echo json_encode($dev);
    exit;
}
if (isset($_POST['olog'])) {
    $dev->DeviceID = $_POST['devid'];
    $dev->GetDevice();
    $dev->OMessage = sanitize($_POST['olog']);
    $tmpDev = new Device();
    $tmpDev->DeviceID = $dev->DeviceID;
    $tmpDev->GetDevice();
    $return = class_exists('LogActions') && $tmpDev->Rights == "Write" ? LogActions::LogThis($dev, $tmpDev) : false;
    header('Content-Type: application/json');
    echo json_encode($return);
    exit;
}
// Set all ports to the same Label pattern, media type or color code
if (isset($_POST['setall'])) {
    $portnames = array();
    if (isset($_POST['spn']) && strlen($_POST['spn']) > 0) {
        // Special Condition to load ports from the device template and use those names
        if ($_POST['spn'] == __("From Template") || $_POST['spn'] == __("Invert Port Labels")) {
            $dev->DeviceID = $_POST['devid'];
            $dev->GetDevice();
            if ($_POST['spn'] == __("From Template")) {
                $ports = isset($_POST['power']) ? new TemplatePowerPorts() : new TemplatePorts();
                $ports->TemplateID = $dev->TemplateID;
开发者ID:spezialist1,项目名称:openDCIM,代码行数:31,代码来源:devices.php

示例6: UpdatePeriod

 function UpdatePeriod()
 {
     $this->MakeSafe();
     $oldperiod = new EscalationTimes();
     $oldperiod->EscalationTimeID = $this->EscalationTimeID;
     $oldperiod->GetEscalationTime();
     $sql = "UPDATE fac_EscalationTimes SET TimePeriod=\"{$this->TimePeriod}\" WHERE \n\t\t\tEscalationTimeID={$this->EscalationTimeID};";
     class_exists('LogActions') ? LogActions::LogThis($this, $oldperiod) : '';
     return $this->query($sql);
 }
开发者ID:mnibbelink,项目名称:openDCIM,代码行数:10,代码来源:customers.inc.php

示例7: removePort

 function removePort()
 {
     /*	Remove a single port from a template */
     global $dbh;
     if (!$this->getport()) {
         return false;
     }
     $sql = "DELETE FROM fac_TemplatePowerPorts WHERE TemplateID={$this->TemplateID} AND PortNumber={$this->PortNumber};";
     if (!$dbh->query($sql)) {
         //delete failed, wtf
         return false;
     } else {
         class_exists('LogActions') ? LogActions::LogThis($this) : '';
         return true;
     }
 }
开发者ID:paragm,项目名称:openDCIM,代码行数:16,代码来源:infrastructure.inc.php

示例8: UpdateUser

 function UpdateUser()
 {
     global $dbh;
     $this->MakeSafe();
     $olduser = new User();
     $olduser->UserID = $this->UserID;
     $olduser->GetUserRights();
     /* Update a user record based upon the current object attribute values, with UserID as key. */
     $sql = "UPDATE fac_User SET Name=\"{$this->Name}\", ReadAccess={$this->ReadAccess}, \n\t\t\tAdminOwnDevices={$this->AdminOwnDevices}, WriteAccess={$this->WriteAccess}, \n\t\t\tDeleteAccess={$this->DeleteAccess}, ContactAdmin={$this->ContactAdmin}, \n\t\t\tRackRequest={$this->RackRequest}, RackAdmin={$this->RackAdmin}, \n\t\t\tSiteAdmin={$this->SiteAdmin}, Disabled={$this->Disabled} \n\t\t\tWHERE UserID=\"{$this->UserID}\";";
     $this->MakeDisplay();
     class_exists('LogActions') ? LogActions::LogThis($this, $olduser) : '';
     return $dbh->exec($sql);
 }
开发者ID:paragm,项目名称:openDCIM,代码行数:13,代码来源:installer.userconversion.inc.php


注:本文中的LogActions::LogThis方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。