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


PHP Manufacturer::GetManufacturerByID方法代码示例

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


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

示例1: CDUTemplate

     $man->ManufacturerID = $tmpl->ManufacturerID;
     $man->GetManufacturerByID();
     $tooltip .= __($row["Label"]) . ": [{$man->Name}] {$tmpl->Model}<br>\n";
     break;
 case "ChassisSlots":
     if ($dev->DeviceType == 'Chassis') {
         $tooltip .= __($row["Label"]) . " " . $dev->{$row}["Field"] . "<br>\n";
     }
     break;
 case "Model":
     $template = new CDUTemplate();
     $manufacturer = new Manufacturer();
     $template->TemplateID = $pdu->TemplateID;
     $template->GetTemplate();
     $manufacturer->ManufacturerID = $template->ManufacturerID;
     $manufacturer->GetManufacturerByID();
     $tooltip .= __($row["Label"]) . ": [{$manufacturer->Name}] {$template->Model}<br>\n";
     break;
 case "NumOutlets":
     $template = new CDUTemplate();
     $powerConn = new PowerConnection();
     $template->TemplateID = $pdu->TemplateID;
     $template->GetTemplate();
     $powerConn->PDUID = $pdu->PDUID;
     $connList = $powerConn->GetConnectionsByPDU();
     $tooltip .= __($row["Label"]) . ": " . count($connList) . "/" . ($template->NumOutlets + 1) . "<br>\n";
     break;
 case "Uptime":
     $tooltip .= __($row["Label"]) . ": " . $pdu->GetSmartCDUUptime() . "<br>\n";
     break;
 case "PanelID":
开发者ID:ghasedak,项目名称:openDCIM,代码行数:31,代码来源:ajax_tooltip.php

示例2: function

//
//	URL:	/api/v1/manufacturer
//	Method:	POST
//	Params:	none
//	Returns: true/false on update operation
//
$app->post('/manufacturer/:manufacturerid', function ($manufacturerid) use($app, $person) {
    $man = new Manufacturer();
    $man->ManufacturerID = $manufacturerid;
    $response['error'] = true;
    $response['errorcode'] = 404;
    if (!$person->SiteAdmin) {
        $response['errorcode'] = 403;
        $response['message'] = __("Unauthorized");
    } else {
        if (!$man->GetManufacturerByID()) {
            $response['message'] = __("Manufacturer not found with id: ") . " {$manufacturerid}";
        } else {
            foreach ($app->request->post() as $prop => $val) {
                $man->{$prop} = $val;
            }
            if (!$man->UpdateManufacturer()) {
                $response['message'] = __("Manufacturer update failed");
            } else {
                $response['error'] = false;
                $response['errorcode'] = 200;
            }
        }
    }
    echoResponse(200, $response);
});
开发者ID:mnibbelink,项目名称:openDCIM,代码行数:31,代码来源:index.php

示例3:

}
echo '		</div>
		<div>
			<div><label for="TemplateID">', __("Device Class"), '</label></div>
			<div><select name="TemplateID" id="TemplateID">
				<option value=0>', __("Select a template..."), '</option>';
foreach ($templateList as $tempRow) {
    // $devarray is helping to remove invalid device templates from child devices
    if (in_array($tempRow->DeviceType, array_keys($devarray))) {
        if ($dev->TemplateID == $tempRow->TemplateID) {
            $selected = " selected";
        } else {
            $selected = "";
        }
        $mfg->ManufacturerID = $tempRow->ManufacturerID;
        $mfg->GetManufacturerByID();
        print "\t\t\t\t<option value=\"{$tempRow->TemplateID}\"{$selected}>{$mfg->Name} - {$tempRow->Model}</option>\n";
    }
}
echo '			</select>
			</div>
		</div>
		<div>
		   <div><label for="Height">', $dev->ParentDevice == 0 ? __("Height") : __("Number of slots"), '</label></div>
		   <div><input type="number" class="required,validate[custom[onlyNumberSp]]" name="Height" id="Height" value="', $dev->Height, '"></div>
		</div>
		<div>
		   <div><label for="Position">', __("Position"), '</label></div>
		   <div><input type="number" class="required,validate[custom[onlyNumberSp],min[1],max[', $cab->CabinetHeight, ']]" name="Position" id="Position" value="', $dev->Position, '"></div>
		</div>
		';
开发者ID:spezialist1,项目名称:openDCIM,代码行数:31,代码来源:devices.php

示例4: getDeviceTemplateName

/**
 * Compute the device class of a device
 *
 * @param DeviceTemplate $devTemplates
 * @param Device $device
 * @return (string|string)[] Manufacturer, Model
 */
function getDeviceTemplateName($devTemplates, $device)
{
    // Compute the device class of a device
    $retval = array('_NoDevModel', '_NoManufDefined');
    $templID = $device->TemplateID;
    if ($templID != 0) {
        // Data validation error
        if (!isset($devTemplates[$templID])) {
            $devTemplates[$templID] = new DeviceTemplate();
            $devTemplates[$templID]->TemplateID = $templID;
            $devTemplates[$templID]->ManufacturerID = 0;
            $devTemplates[$templID]->Model = __("Template Missing");
        }
        $manufacturer = new Manufacturer();
        $manufacturer->ManufacturerID = $devTemplates[$templID]->ManufacturerID;
        $retcode = $manufacturer->GetManufacturerByID();
        if ($retcode) {
            $manufName = $manufacturer->Name;
        } else {
            $manufName = '_NoManufDefined';
        }
        $retval = array($manufName, $devTemplates[$templID]->Model);
    }
    return $retval;
}
开发者ID:dc-admin,项目名称:openDCIM,代码行数:32,代码来源:report_asset_Excel-new.php

示例5: UpdateManufacturer

 function UpdateManufacturer()
 {
     $this->MakeSafe();
     $sql = "UPDATE fac_Manufacturer SET Name=\"{$this->Name}\", GlobalID={$this->GlobalID}, SubscribeToUpdates={$this->SubscribeToUpdates} WHERE ManufacturerID={$this->ManufacturerID};";
     $old = new Manufacturer();
     $old->ManufacturerID = $this->ManufacturerID;
     $old->GetManufacturerByID();
     $this->MakeDisplay();
     class_exists('LogActions') ? LogActions::LogThis($this, $old) : '';
     return $this->query($sql);
 }
开发者ID:paragm,项目名称:openDCIM,代码行数:11,代码来源:infrastructure.inc.php

示例6: getDeviceTemplateName

/**
 * Compute the device class of a device
 *
 * @param DeviceTemplate $devTemplates
 * @param Device $device
 * @return (string|string)[] Manufacturer, Model
 */
function getDeviceTemplateName($devTemplates, $device)
{
    // Compute the device class of a device
    $retval = array('_NoDevModel', '_NoManufDefined');
    $templID = $device->TemplateID;
    if ($templID != 0) {
        $manufacturer = new Manufacturer();
        $manufacturer->ManufacturerID = $devTemplates[$templID]->ManufacturerID;
        $retcode = $manufacturer->GetManufacturerByID();
        if ($retcode) {
            $manufName = $manufacturer->Name;
        } else {
            $manufName = '_NoManufDefined';
        }
        $retval = array($manufName, $devTemplates[$templID]->Model);
    }
    return $retval;
}
开发者ID:paragm,项目名称:openDCIM,代码行数:25,代码来源:report_asset_Excel-new.php

示例7: CDUTemplate

$ct = new CDUTemplate();
$sen = new SensorTemplate();
$tList = $t->GetTemplateShareList();
$c = curl_init('https://repository.opendcim.org/api/template');
curl_setopt($c, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($c, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)");
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
curl_setopt($c, CURLOPT_COOKIEFILE, "/tmp/repocookies.txt");
curl_setopt($c, CURLOPT_COOKIEJAR, "/tmp/repocookies.txt");
curl_setopt($c, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($c, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($c, CURLOPT_HTTPHEADER, array("UserID: " . $config->ParameterArray["APIUserID"], "APIKey: " . $config->ParameterArray["APIKey"], "Content-Type: application/json"));
foreach ($tList as $temp) {
    if ($temp->ManufacturerID != $m->ManufacturerID) {
        $m->ManufacturerID = $temp->ManufacturerID;
        $m->GetManufacturerByID();
    }
    $temp->ManufacturerID = $m->GlobalID;
    $tp = new TemplatePorts();
    $tp->TemplateID = $temp->TemplateID;
    $tpList = $tp->getPorts();
    // Convert the base template object to an associative array for easier manipulation
    $postData["template"] = json_decode(json_encode($temp), true);
    $postData["templateports"] = array();
    foreach ($tpList as $tport) {
        array_push($postData["templateports"], json_decode(json_encode($tport), true));
    }
    $tpp = new TemplatePowerPorts();
    $tpp->TemplateID = $temp->TemplateID;
    $tppList = $tpp->getPorts();
    $postData["templatepowerports"] = array();
开发者ID:sengkoil,项目名称:openDCIM,代码行数:31,代码来源:repository_sync.php


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