if ($status == __("Updated")) { $status = updatecdu($template, $status); $status = updatesensor($template, $status); } if ($status == __("Updated")) { $status = $template->ExportTemplate() ? __("Exported") : __("Error"); } break; default: // do nothing if the value isn't one we expect } } $templateList = $template->GetTemplateList(); $ManufacturerList = $manufacturer->GetManufacturerList(); $ManufacturerListByID = $manufacturer->GetManufacturerList(true); $mtList = MediaTypes::GetMediaTypeList(); $ccList = ColorCoding::GetCodeList(); $dcaList = DeviceCustomAttribute::GetDeviceCustomAttributeList(); $imageselect = '<div id="preview"></div><div id="filelist">'; $path = './pictures'; $dir = scandir($path); foreach ($dir as $i => $f) { if (is_file($path . DIRECTORY_SEPARATOR . $f)) { // Suppress the getimagesize because it will error out on non-image files @($imageinfo = getimagesize($path . DIRECTORY_SEPARATOR . $f)); if (preg_match('/^image/i', $imageinfo['mime'])) { $imageselect .= "<span>{$f}</span>\n"; } } } $imageselect .= "</div>";
} } elseif ($containmentType == 5) { # filter by custom tag $tList = Tags::FindAll(); $body .= "<select name=tagname id=tagname>"; foreach ($tList as $TagID => $Name) { $options[$Name] = $Name; } } # sort and output the options based on the name of the option asort($options); foreach ($options as $key => $val) { $body .= "<option value=" . $key . ">" . $val . "</option>"; } $body .= "</select>" . "<select name=mediaid id=mediaid>" . "<option value=-1>All Media Types</option>" . "<option value=0>Unknown Media Types</option>"; foreach (MediaTypes::GetMediaTypeList() as $mt) { $body .= "<option value=" . $mt->MediaID . ">" . $mt->MediaType . "</option>"; } $body .= "</select>" . "<select name=colortype id=colortype>" . "<option value=0>Try to use colors from the database</option>" . "<option value=1>Randomize colors, per color</option>" . "<option value=2>Randomize colors, per mediatype</option>" . "<option value=3 selected>Randomize colors, per color and mediatype</option>" . "</select>" . "<input type=\"checkbox\" name=edgelabels checked value=true>Label Cables" . "<select name=format id=format onchange='this.form.submit()'>" . "<option value=''>Select format</option>" . "<option value=0>SVG</option>" . "<option value=1>PNG</option>" . "<option value=2>JPG</option>" . "<option value=3>DOT</option>" . "</select>" . "</form>"; } } if (isset($_REQUEST['ajax'])) { echo $body; exit; } } ?> <!doctype html> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=Edge">
$devarray = array('Server' => __("Server"), 'Appliance' => __("Appliance"), 'Storage Array' => __("Storage Array"), 'Switch' => __("Switch"), 'Chassis' => __("Chassis"), 'Patch Panel' => __("Patch Panel"), 'Sensor' => __("Sensor")); } else { $devarray = array('Server' => __("Server"), 'Appliance' => __("Appliance"), 'Storage Array' => __("Storage Array"), 'Switch' => __("Switch"), 'Chassis' => __("Chassis"), 'Patch Panel' => __("Patch Panel"), 'Physical Infrastructure' => __("Physical Infrastructure"), 'CDU' => __("CDU"), 'Sensor' => __("Sensor")); } if ($config->ParameterArray["mDate"] == "now") { if ($dev->MfgDate <= "1970-01-01") { $dev->MfgDate = date("Y-m-d"); } } if ($config->ParameterArray["wDate"] == "now") { if ($dev->WarrantyExpire <= "1970-01-01") { $dev->WarrantyExpire = date("Y-m-d"); } } $portList = DevicePorts::getPortList($dev->DeviceID); $mediaTypes = MediaTypes::GetMediaTypeList(); $colorCodes = ColorCoding::GetCodeList(); $templateList = $templ->GetTemplateList(); $escTimeList = $escTime->GetEscalationTimeList(); $escList = $esc->GetEscalationList(); $deptList = $Dept->GetDepartmentList(); $templ->TemplateID = $dev->TemplateID; $templ->GetTemplateByID(); $title = $dev->Label != '' ? "{$dev->Label} :: {$dev->DeviceID}" : __("openDCIM Device Maintenance"); function buildESXtable($DeviceID) { $ESX = new ESX(); $ESX->DeviceID = $DeviceID; $vmList = $ESX->GetDeviceInventory(); print "\n<div class=\"table border\"><div><div>" . __("VM Name") . "</div><div>" . __("Status") . "</div><div>" . __("Owner") . "</div><div>" . __("Last Updated") . "</div></div>\n"; foreach ($vmList as $vmRow) {
} } exit; } if (isset($_POST['mtused'])) { $count = MediaTypes::TimesUsed($_POST['mtused']); if ($count == 0) { $mt = new MediaTypes(); $mt->MediaID = $_POST['mtused']; $mt->DeleteType(); } echo $count; exit; } if (isset($_POST['mtlist'])) { $codeList = MediaTypes::GetMediaTypeList(); $output = '<option value=""></option>'; foreach ($codeList as $mt) { $output .= "<option value=\"{$mt->MediaID}\">{$mt->MediaType}</option>"; } echo $output; exit; } if (isset($_POST['cclist'])) { $codeList = ColorCoding::GetCodeList(); $output = '<option value=""></option>'; foreach ($codeList as $cc) { $output .= "<option value=\"{$cc->ColorID}\">{$cc->Name}</option>"; } echo $output; exit;