header("Location: " . redirect()); exit; } $dc = new DataCenter(); $cab = new Cabinet(); $cab->CabinetID = $_REQUEST["cabinetid"]; $cab->GetCabinet(); $dc->DataCenterID = $cab->DataCenterID; $dc->GetDataCenter(); if (isset($_REQUEST["action"]) && $_REQUEST["action"] == "Submit") { $cab->MapX1 = intval($_REQUEST["x1"]); $cab->MapX2 = intval($_REQUEST["x2"]); $cab->MapY1 = intval($_REQUEST["y1"]); $cab->MapY2 = intval($_REQUEST["y2"]); $cab->FrontEdge = $_REQUEST["frontedge"]; $cab->UpdateCabinet(); $url = redirect("cabnavigator.php?cabinetid={$cab->CabinetID}"); header("Location: {$url}"); } $height = 0; $width = 0; if (strlen($dc->DrawingFileName) > 0) { $mapfile = "drawings/{$dc->DrawingFileName}"; if (file_exists($mapfile)) { list($width, $height, $type, $attr) = getimagesize($mapfile); // There is a bug in the excanvas shim that can set the width of the canvas to 10x the width of the image $ie8fix = ' <script type="text/javascript"> function uselessie(){ document.getElementById(\'mapCanvas\').className = "mapCanvasiefix"; }