示例#1
0
    $template->VersionOID = $_REQUEST['versionoid'];
    $template->Multiplier = $_REQUEST['multiplier'];
    $template->OID1 = $_REQUEST['oid1'];
    $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">
示例#2
0
 function updatecdu($template, $status)
 {
     $cdutemplate = new CDUTemplate();
     $cdutemplate->TemplateID = $template->TemplateID;
     $cdutemplate->ManufacturerID = $template->ManufacturerID;
     $cdutemplate->Model = $template->Model;
     $cdutemplate->Managed = isset($_POST['Managed']) ? 1 : 0;
     $cdutemplate->ATS = isset($_POST['ATS']) ? 1 : 0;
     $cdutemplate->VersionOID = $_POST['VersionOID'];
     $cdutemplate->Multiplier = $_POST['Multiplier'];
     $cdutemplate->OID1 = $_POST['OID1'];
     $cdutemplate->OID2 = $_POST['OID2'];
     $cdutemplate->OID3 = $_POST['OID3'];
     $cdutemplate->ATSStatusOID = $_POST['ATSStatusOID'];
     $cdutemplate->ATSDesiredResult = $_POST['ATSDesiredResult'];
     $cdutemplate->ProcessingProfile = $_POST['ProcessingProfile'];
     $cdutemplate->Voltage = $_POST["Voltage"];
     $cdutemplate->Amperage = $_POST["Amperage"];
     $cdutemplate->NumOutlets = $template->PSCount;
     $status = $cdutemplate->UpdateTemplate() ? $status : __('Error updating cdu attributes');
     return $status;
 }
示例#3
0
 } else {
     $t->TemplateID = 0;
     $t->CreateTemplate();
     $updating = false;
 }
 if ($t->DeviceType == "CDU" && is_object(@$t->cdutemplate)) {
     $ct->ManufacturerID = $t->ManufacturerID;
     $ct->Model = $t->Model;
     foreach ($t->cdutemplate as $prop => $val) {
         $ct->{$prop} = $val;
     }
     $ct->TemplateID = $t->TemplateID;
     if (!$updating) {
         $ct->CreateTemplate($t->TemplateID);
     } else {
         $ct->UpdateTemplate();
     }
 }
 if ($t->DeviceType == "Chassis" && is_array(@$tem->slots)) {
     foreach ($tem->slots as $sl) {
         foreach ($sl as $prop => $val) {
             $cs->{$prop} = $val;
         }
         $cs->TemplateID = $t->TemplateID;
         if (!$updating) {
             $cs->CreateSlot();
         } else {
             $cs->UpdateSlot();
         }
     }
 }