$dc->DataCenterID = $_POST['dc']; $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;