本文整理汇总了PHP中Container::GetContainer方法的典型用法代码示例。如果您正苦于以下问题:PHP Container::GetContainer方法的具体用法?PHP Container::GetContainer怎么用?PHP Container::GetContainer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Container
的用法示例。
在下文中一共展示了Container::GetContainer方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
<?php
require_once "db.inc.php";
require_once "facilities.inc.php";
$subheader = __("Data Center Statistics");
if (!isset($_GET["container"])) {
// No soup for you.
header('Location: ' . redirect());
exit;
}
$c = new Container();
$c->ContainerID = $_GET["container"];
$c->GetContainer();
$cStats = $c->GetContainerStatistics();
?>
<!doctype html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>openDCIM Data Center Information Management</title>
<link rel="stylesheet" href="css/inventory.php" type="text/css">
<link rel="stylesheet" href="css/jquery-ui.css" type="text/css">
<!--[if lte IE 8]>
<link rel="stylesheet" href="css/ie.css" type="text/css">
<script src="scripts/excanvas.js"></script>
<![endif]-->
<script type="text/javascript" src="scripts/jquery.min.js"></script>
<script type="text/javascript" src="scripts/jquery-ui.min.js"></script>
</head>
示例2: isset
# mediaid to filter on. 0 for all.
$mediaID = isset($_REQUEST['mediaid']) ? $_REQUEST['mediaid'] : -1;
$graphname = "Network Map for ";
$graphstr = "";
$devList = array();
# a list of colors recognized by graphviz. not all of them.
$colorList = array("aquamarine", "bisque", "black", "blue", "blueviolet", "brown", "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen", "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", "darkslateblue", "darkslategray", "darkturquoise", "darkviolet", "deeppink", "deepskyblue", "dimgray", "dodgerblue", "fuchsia", "gold", "goldenrod", "gray", "green", "hotpink", "indianred", "indigo", "khaki", "lavender", "lawngreen", "lightblue", "lightcoral", "lightgoldenrod", "lightpink", "lightseagreen", "lightskyblue", "lightslateblue", "lightslategray", "lightsteelblue", "lime", "magenta", "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", "mediumvioletred", "navy", "olive", "orange", "orangered", "orchid", "palegreen", "palevioletred", "peachpuff", "peru", "plum", "purple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", "seagreen", "silver", "skyblue", "slateblue", "springgreen", "steelblue", "tomato", "turquoise", "violet", "violetred", "yellow", "yellowgreen");
# decent default color palette for identifying device types
$safeDeviceColors = array("cadetblue2", "deepskyblue4", "palegreen", "forestgreen", "lightpink", "red", "navajowhite", "darkorange", "plum", "purple", "khaki", "sienna", "black");
$deviceTypes = array('Server', 'Appliance', 'Storage Array', 'Switch', 'Chassis', 'Patch Panel', 'Physical Infrastructure', 'CDU', 'Sensor', 'WiFi AP', 'Router');
# handle the request variables and build the device lists.
if (isset($_REQUEST['containerid'])) {
$containerid = isset($_POST['containerid']) ? $_POST['containerid'] : $_GET['containerid'];
$container = new Container();
$container->ContainerID = $containerid;
$container->GetContainer();
$graphname .= "Container " . $container->Name;
$dcList = $container->GetChildDCList();
foreach ($dcList as $dc) {
$cabinet = new Cabinet();
$cabinet->DataCenterID = $dc->DataCenterID;
foreach ($cabinet->ListCabinetsByDC(false, false) 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();
}
}
示例3: UpdateContainer
function UpdateContainer()
{
$this->MakeSafe();
$oldcontainer = new Container();
$oldcontainer->ContainerID = $this->ContainerID;
$oldcontainer->GetContainer();
$sql = "UPDATE fac_Container SET Name=\"{$this->Name}\", ParentID={$this->ParentID}, \n\t\t\tDrawingFileName=\"{$this->DrawingFileName}\", MapX={$this->MapX}, MapY={$this->MapY} \n\t\t\tWHERE ContainerID={$this->ContainerID};";
if (!$this->query($sql)) {
return false;
} else {
class_exists('LogActions') ? LogActions::LogThis($this, $oldcontainer) : '';
return true;
}
}