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


PHP DataCenter::GetDataCenter方法代码示例

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


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

示例1: renderCabinetProps

/**
 * Render cabinet properties into this view.
 *
 * The cabinet properties zone, row, model, maximum weight and installation date
 * are rendered to be for this page. It checks if the user is allowed to see the
 * content of the cabinet and only if the user does the information is provided.
 *
 * @param Cabinet $cab
 * @param CabinetAudit $audit
 * @param string $AuditorName
 */
function renderCabinetProps($cab, $audit, $AuditorName)
{
    $tmpDC = new DataCenter();
    $tmpDC->DataCenterID = $cab->DataCenterID;
    $tmpDC->GetDataCenter();
    $AuditorName = $AuditorName != '' ? "<br>{$AuditorName}" : "";
    $renderedHTML = "\t\t<table id=\"cabprop\">\n\t\t\t<tr><td>" . __("Last Audit") . ":</td><td id=\"lastaudit\">{$audit->AuditStamp}{$AuditorName}</td></tr>\n\t\t\t<tr><td>" . __("Model") . ":</td><td>{$cab->Model}</td></tr>\n\t\t\t<tr><td>" . __("Data Center") . ":</td><td>{$tmpDC->Name}</td></tr>\n\t\t\t<tr><td>" . __("Install Date") . ":</td><td>{$cab->InstallationDate}</td></tr>\n";
    if ($cab->ZoneID) {
        $zone = new Zone();
        $zone->ZoneID = $cab->ZoneID;
        $zone->GetZone();
        $renderedHTML .= "\t\t\t<tr><td>" . __("Zone") . ":</td><td>{$zone->Description}</td></tr>\n";
    }
    if ($cab->CabRowID) {
        $cabrow = new CabRow();
        $cabrow->CabRowID = $cab->CabRowID;
        $cabrow->GetCabRow();
        $renderedHTML .= "\t\t\t<tr><td>" . __("Row") . ":</td><td>{$cabrow->Name}</td></tr>\n";
    }
    $renderedHTML .= "\t\t\t<tr><td>" . __("Tags") . ":</td><td>" . renderTagsToString($cab) . "</td></tr>\n";
    //   This is out of context here and makes the information confusing.
    //    $renderedHTML .= '			<tr><td class="left">' . __('Front Edge') . ':</td>';
    //    $renderedHTML .= "<td class=\"right\">$cab->FrontEdge </td></tr>\n";
    $renderedHTML .= "\t\t</table>\n";
    return $renderedHTML;
}
开发者ID:olivierbeytrison,项目名称:openDCIM,代码行数:37,代码来源:cabnavigator.php

示例2: header

<?php

require_once "db.inc.php";
require_once "facilities.inc.php";
$subheader = __("Map Selector");
if (!$person->SiteAdmin) {
    // No soup for you.
    header("Location: " . redirect());
    exit;
}
$dc = new DataCenter();
$cab = new Cabinet();
$cab->CabinetID = $_REQUEST["cabinetid"];
$cab->GetCabinet();
$dc->DataCenterID = $cab->DataCenterID;
$dc->GetDataCenter();
if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "Submit") {
    $cab->MapX1 = intval($_REQUEST["x1"]);
    $cab->MapX2 = intval($_REQUEST["x2"]);
    $cab->MapY1 = intval($_REQUEST["y1"]);
    $cab->MapY2 = intval($_REQUEST["y2"]);
    $cab->FrontEdge = $_REQUEST["frontedge"];
    $cab->UpdateCabinet();
    $url = redirect("cabnavigator.php?cabinetid={$cab->CabinetID}");
    header("Location: {$url}");
}
$height = 0;
$width = 0;
if (strlen($dc->DrawingFileName) > 0) {
    $mapfile = "drawings/{$dc->DrawingFileName}";
    if (file_exists($mapfile)) {
开发者ID:paragm,项目名称:openDCIM,代码行数:31,代码来源:mapmaker.php

示例3: Cabinet

		<div>
			<button id="generate" type="submit">' . __("Generate") . '</button>
		</div>
	</div>
</div>		
</form>
</div> <!-- END .center -->
</div> <!-- END .main -->
</div> <!-- END .page -->
</body>
</html>';
} else {
    $cab = new Cabinet();
    $dev = new Device();
    $datacenter->DataCenterID = $_REQUEST["datacenterid"];
    $datacenter->GetDataCenter();
    $cab->DataCenterID = $datacenter->DataCenterID;
    $cabList = $cab->ListCabinetsByDC();
    header('Content-type: text/xml');
    header('Cache-Control: no-store, NO-CACHE');
    header('Content-Disposition: attachment; filename="opendcim.xml"');
    print "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n<datacenter>\n\n\t<ID>{$datacenter->DataCenterID}</ID>\n\t<Name>{$datacenter->Name}</Name>\n\t<Size>{$datacenter->SquareFootage}</Size>\n";
    foreach ($cabList as $cabRow) {
        print "\t<cabinet>\n\t\t<ID>{$cabRow->CabinetID}</ID>\n\t\t<Location>{$cabRow->Location}</Location>\n\t\t<Height>{$cabRow->CabinetHeight}</Height>\n\t\t<FrontEdge>{$cabRow->FrontEdge}</FrontEdge>\n\t\t<MapX1>{$cabRow->MapX1}</MapX1>\n\t\t<MapY1>{$cabRow->MapY1}</MapY1>\n\t\t<MapX2>{$cabRow->MapX2}</MapX2>\n\t\t<MapY2>{$cabRow->MapY2}</MapY2>\n";
        $dev->Cabinet = $cabRow->CabinetID;
        $devList = $dev->ViewDevicesByCabinet();
        $totalWatts = 0;
        foreach ($devList as $devRow) {
            $power = $devRow->GetDeviceTotalPower();
            $totalWatts += $power;
            print "\t\t<Device>\n\t\t\t<ID>{$devRow->DeviceID}</ID>\n\t\t\t<Label>{$devRow->Label}</Label>\n\t\t\t<Position>{$devRow->Position}</Position>\n\t\t\t<Height>{$devRow->Height}</Height>\n\t\t\t<Watts>{$power}</Watts>\n\t\t</Device>\n";
开发者ID:paragm,项目名称:openDCIM,代码行数:31,代码来源:report_xml_CFD.php

示例4: RowToObject

 static function RowToObject($dbRow, $filterrights = true)
 {
     /*
      * Generic function that will take any row returned from the fac_Cabinet
      * table and convert it to an object for use in array or other
      */
     $cab = new Cabinet();
     $cab->CabinetID = $dbRow["CabinetID"];
     $cab->DataCenterID = $dbRow["DataCenterID"];
     $cab->Location = $dbRow["Location"];
     $cab->LocationSortable = $dbRow["LocationSortable"];
     $cab->AssignedTo = $dbRow["AssignedTo"];
     $cab->ZoneID = $dbRow["ZoneID"];
     $cab->CabRowID = $dbRow["CabRowID"];
     $cab->CabinetHeight = $dbRow["CabinetHeight"];
     $cab->Model = $dbRow["Model"];
     $cab->Keylock = $dbRow["Keylock"];
     $cab->MaxKW = $dbRow["MaxKW"];
     $cab->MaxWeight = $dbRow["MaxWeight"];
     $cab->InstallationDate = $dbRow["InstallationDate"];
     $cab->SensorIPAddress = $dbRow["SensorIPAddress"];
     $cab->SensorCommunity = $dbRow["SensorCommunity"];
     $cab->SensorTemplateID = $dbRow["SensorTemplateID"];
     $cab->MapX1 = $dbRow["MapX1"];
     $cab->MapY1 = $dbRow["MapY1"];
     $cab->MapX2 = $dbRow["MapX2"];
     $cab->MapY2 = $dbRow["MapY2"];
     $cab->FrontEdge = $dbRow["FrontEdge"];
     $cab->Notes = $dbRow["Notes"];
     $cab->U1Position = $dbRow["U1Position"];
     if ($filterrights) {
         $cab->FilterRights();
     }
     if ($cab->U1Position == "Default") {
         $dc = new DataCenter();
         $dc->DataCenterID = $cab->DataCenterID;
         $dc->GetDataCenter();
         if ($dc->U1Position == "Default") {
             global $config;
             $cab->U1Position = $config->ParameterArray["U1Position"];
         } else {
             $cab->U1Position = $dc->U1Position;
         }
     }
     return $cab;
 }
开发者ID:ghasedak,项目名称:openDCIM,代码行数:46,代码来源:assets.inc.php

示例5: UpdateDataCenter

 function UpdateDataCenter()
 {
     $this->MakeSafe();
     $sql = "UPDATE fac_DataCenter SET Name=\"{$this->Name}\", \n\t\t\tSquareFootage={$this->SquareFootage}, DeliveryAddress=\"{$this->DeliveryAddress}\", \n\t\t\tAdministrator=\"{$this->Administrator}\", MaxkW={$this->MaxkW}, \n\t\t\tDrawingFileName=\"{$this->DrawingFileName}\", EntryLogging=0,\t\n\t\t\tContainerID={$this->ContainerID},\tMapX={$this->MapX}, MapY={$this->MapY}, \n\t\t\tU1Position=\"{$this->U1Position}\" WHERE DataCenterID={$this->DataCenterID};";
     $this->MakeDisplay();
     $old = new DataCenter();
     $old->DataCenterID = $this->DataCenterID;
     $old->GetDataCenter();
     class_exists('LogActions') ? LogActions::LogThis($this, $old) : '';
     return $this->query($sql);
 }
开发者ID:paragm,项目名称:openDCIM,代码行数:11,代码来源:infrastructure.inc.php


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