$dc->GetDataCenterByID(); $payload = $dc->GetOverview(); } header('Content-Type: application/json'); echo json_encode($payload); exit; } if (!isset($_GET["dc"])) { // No soup for you. header('Location: ' . redirect()); exit; } $dc->DataCenterID = $_GET["dc"]; $dc->GetDataCenterbyID(); $dcStats = $dc->GetDCStatistics(); $rciStats = RCI::GetStatistics("dc", $dc->DataCenterID); function MakeImageMap($dc) { $mapHTML = ""; if (strlen($dc->DrawingFileName) > 0) { $mapfile = "drawings" . DIRECTORY_SEPARATOR . $dc->DrawingFileName; if (file_exists($mapfile)) { list($width, $height, $type, $attr) = getimagesize($mapfile); $mapHTML = "<div class=\"canvas\" style=\"background-image: url('drawings/{$dc->DrawingFileName}')\">\n\t<img src=\"css/blank.gif\" usemap=\"#datacenter\" width=\"{$width}\" height=\"{$height}\" alt=\"clearmap over canvas\">\n\t<map name=\"datacenter\" data-dc={$dc->DataCenterID} data-zoom=1 data-x1=0 data-y1=0>\n\t</map>\n\t<canvas id=\"mapCanvas\" width=\"{$width}\" height=\"{$height}\"></canvas>\n\n</div>\n"; } } return $mapHTML; } $height = 0; $width = 0; $ie8fix = "";
exit; } if (!isset($_GET["zone"])) { // No soup for you. header('Location: ' . redirect()); exit; } $zone->ZoneID = $_GET["zone"]; if (!$zone->GetZone()) { header('Location: ' . redirect()); exit; } $zoneStats = $zone->GetZoneStatistics(); $dc->DataCenterID = $zone->DataCenterID; $dc->GetDataCenterbyID(); $rciStats = RCI::GetStatistics("zone", $zone->ZoneID); function MakeImageMap($dc, $zone) { $zoom = $zone->MapZoom / 100; $mapHTML = ""; if (strlen($dc->DrawingFileName) > 0) { $mapfile = "drawings/" . $dc->DrawingFileName; if (file_exists($mapfile)) { list($width, $height, $type, $attr) = getimagesize($mapfile); $width = ($zone->MapX2 - $zone->MapX1) * $zoom; $height = ($zone->MapY2 - $zone->MapY1) * $zoom; $mapHTML .= "\t<div class=\"canvas\">\n\t\t<canvas id=\"background\" width=\"{$width}\" height=\"{$height}\" data-image=\"{$mapfile}\"></canvas>\n\t\t<img src=\"css/blank.gif\" usemap=\"#datacenter\" width=\"{$width}\" height=\"{$height}\" alt=\"clearmap over canvas\">\n\t\t<map name=\"datacenter\" data-dc={$dc->DataCenterID} data-zoom={$zoom} data-x1={$zone->MapX1} data-y1={$zone->MapY1}>\n\t\t</map>\n\t\t<canvas id=\"mapCanvas\" width=\"{$width}\" height=\"{$height}\"></canvas>\n\t</div>\n"; } } return $mapHTML; }