コード例 #1
0
ファイル: zone.php プロジェクト: paragm/openDCIM
    header('Location: ' . redirect('zone.php'));
    exit;
}
if (isset($_REQUEST["zoneid"])) {
    $zone->ZoneID = isset($_POST['zoneid']) ? $_POST['zoneid'] : $_GET['zoneid'];
    $zone->GetZone();
    if (isset($_POST["action"]) && ($_POST["action"] == "Create" || $_POST["action"] == "Update")) {
        $zone->Description = $_POST["description"];
        $zone->DataCenterID = $_POST["datacenterid"];
        $zone->MapX1 = $_POST["x1"];
        $zone->MapY1 = $_POST["y1"];
        $zone->MapX2 = $_POST["x2"];
        $zone->MapY2 = $_POST["y2"];
        $zone->MapZoom = $_POST["mapzoom"];
        if ($_POST["action"] == "Create") {
            $zone->CreateZone();
        } else {
            $status = __("Updated");
            $zone->UpdateZone();
        }
    }
    $formpatch = "?zoneid={$zone->ZoneID}";
}
$zone->MapZoom = $zone->ZoneID == 0 ? 100 : $zone->MapZoom;
$dc_zone->DataCenterID = $zone->DataCenterID;
$dc_zone->GetDataCenterbyID();
$zoneList = $zone->GetZoneList();
$height = 0;
$width = 0;
if (strlen($dc_zone->DrawingFileName) > 0) {
    $mapfile = "drawings/{$dc_zone->DrawingFileName}";