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


PHP Cabinet::GetCabinetsByRow方法代碼示例

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


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

示例1: foreach

         $device->Cabinet = $cab->CabinetID;
         foreach ($device->ViewDevicesByCabinet(true) as $dev) {
             if (!isset($devList[$dev->DeviceType])) {
                 $devList[$dev->DeviceType] = array();
             }
             $devList[$dev->DeviceType][$dev->DeviceID] = array();
         }
     }
 } elseif (isset($_REQUEST['cabrowid'])) {
     $cabrowid = isset($_POST['cabrowid']) ? $_POST['cabrowid'] : $_GET['cabrowid'];
     $cabrow = new CabRow();
     $cabrow->CabRowID = $cabrowid;
     $cabrow->GetCabRow();
     $cabinet = new Cabinet();
     $cabinet->CabRowID = $cabrow->CabRowID;
     $cabinetList = $cabinet->GetCabinetsByRow();
     if (isset($cabinetList)) {
         $datacenter = new DataCenter();
         $datacenter->DataCenterID = $cabinetList[0]->DataCenterID;
         $datacenter->GetDataCenter();
         $graphname .= "Row " . $cabrow->Name . " in Data Center " . $datacenter->Name;
         foreach ($cabinetList as $cab) {
             $device = new Device();
             $device->Cabinet = $cab->CabinetID;
             foreach ($device->ViewDevicesByCabinet(true) as $dev) {
                 if (!isset($devList[$dev->DeviceType])) {
                     $devList[$dev->DeviceType] = array();
                 }
                 $devList[$dev->DeviceType][$dev->DeviceID] = array();
             }
         }
開發者ID:paragm,項目名稱:openDCIM,代碼行數:31,代碼來源:report_network_map.php

示例2: Cabinet

require_once "facilities.inc.php";
$subheader = __("Data Center Cabinet Inventory");
// Get the list of departments that this user is a member of
$viewList = $person->isMemberOf();
$cab = new Cabinet();
$head = $legend = $zeroheight = $body = $deptcolor = "";
$deptswithcolor = array();
$dev = new Device();
$templ = new DeviceTemplate();
$tempDept = new Department();
$dc = new DataCenter();
$cabrow = new CabRow();
$cabrow->CabRowID = $_REQUEST['row'];
$cabrow->GetCabRow();
$cab->CabRowID = $cabrow->CabRowID;
$cabinets = $cab->GetCabinetsByRow();
$frontedge = $cabrow->GetCabRowFrontEdge();
if (isset($_GET["rear"])) {
    //opposite view
    $cabinets = array_reverse($cabinets);
}
//start loop to parse all cabinets in the row
foreach ($cabinets as $index => $cabinet) {
    $currentHeight = $cabinet->CabinetHeight;
    if ($config->ParameterArray["ReservedColor"] != "#FFFFFF" || $config->ParameterArray["FreeSpaceColor"] != "#FFFFFF") {
        $head .= "\t\t<style type=\"text/css\">\n\t\t\t.reserved{background-color: {$config->ParameterArray['ReservedColor']};}\n\t\t\t.freespace{background-color: {$config->ParameterArray['FreeSpaceColor']};}\n";
    }
    $side = null;
    if ($frontedge == "Top" || $frontedge == "Bottom") {
        $side = $cabinet->FrontEdge == "Left" || $cabinet->FrontEdge == "Right" ? true : null;
    } else {
開發者ID:mnibbelink,項目名稱:openDCIM,代碼行數:31,代碼來源:rowview.php

示例3: DeleteCabRow

 function DeleteCabRow()
 {
     global $dbh;
     $this->MakeSafe();
     //update cabinets in this row
     $cabinet = new Cabinet();
     $cabinet->CabRowID = $this->CabRowID;
     $cabinetList = $cabinet->GetCabinetsByRow();
     foreach ($cabinetList as $cab) {
         $cab->CabRowID = 0;
         $cab->UpdateCabinet();
     }
     //delete cabrow
     $sql = "DELETE FROM fac_CabRow WHERE CabRowID={$this->CabRowID};";
     if (!$this->query($sql)) {
         return false;
     }
     class_exists('LogActions') ? LogActions::LogThis($this) : '';
     return true;
 }
開發者ID:paragm,項目名稱:openDCIM,代碼行數:20,代碼來源:infrastructure.inc.php


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