本文整理汇总了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();
}
}
示例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 {
示例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;
}