$template->OID2 = $_REQUEST['oid2']; $template->OID3 = $_REQUEST['oid3']; $template->ATSStatusOID = $_REQUEST['atsstatusoid']; $template->ATSDesiredResult = $_REQUEST['atsdesiredresult']; $template->ProcessingProfile = $_REQUEST['processingprofile']; $template->Voltage = $_REQUEST["voltage"]; $template->Amperage = $_REQUEST["amperage"]; $template->NumOutlets = $_REQUEST["numoutlets"]; if ($_REQUEST['action'] == 'Create') { $template->CreateTemplate(); } else { $status = __("Updated"); $template->UpdateTemplate(); } } $templateList = $template->GetTemplateList(); $ManufacturerList = $manufacturer->GetManufacturerList(); $managed = $template->Managed ? " checked" : ""; $ats = $template->ATS ? " checked" : ""; ?> <!doctype html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=Edge"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="CACHE-CONTROL" content="NO-CACHE"> <meta http-equiv="EXPIRES" content="Mon, 01 Jan 1997 01:00:00 GMT"> <meta http-equiv="PRAGMA" content="NO-CACHE"> <title>openDCIM Cabinet Distribution Unit Templates</title> <link rel="stylesheet" href="css/inventory.php" type="text/css">
<?php require_once "db.inc.php"; require_once "facilities.inc.php"; $subheader = __("Data Center Detail"); if (!$person->SiteAdmin) { // No soup for you. header('Location: ' . redirect()); exit; } $panel = new PowerPanel(); $pdu = new PowerDistribution(); $cab = new Cabinet(); $tmpl = new CDUTemplate(); $tmpList = $tmpl->GetTemplateList(); $script = ""; // AJAX if (isset($_POST['deletepanel'])) { $panel->PanelID = $_POST["PanelID"]; $return = 'no'; if ($panel->getPanel()) { $panel->deletePanel(); $return = 'ok'; } echo $return; exit; } // Set a default panel voltage based upon the configuration screen $panel->PanelVoltage = $config->ParameterArray["DefaultPanelVoltage"]; if (isset($_POST["action"]) && ($_POST["action"] == "Create" || $_POST["action"] == "Update")) { foreach ($panel as $prop => $val) {