Exemplo n.º 1
0
    $cab->Location = null;
    $cab->ZoneID = isset($_GET['zoneid']) ? intval($_GET['zoneid']) : null;
    $cab->CabRowID = isset($_GET['cabrowid']) ? intval($_GET['cabrowid']) : null;
    $cab->CabinetHeight = null;
    $cab->Model = null;
    $cab->Keylock = null;
    $cab->MaxKW = null;
    $cab->MaxWeight = null;
    $cab->InstallationDate = date('m/d/Y');
}
$deptList = $dept->GetDepartmentList();
$cabList = $cab->ListCabinets();
$sensorList = SensorTemplate::getTemplates();
if ($cab->CabinetID > 0) {
    // Get any tags associated with this device
    $tags = $cab->GetTags();
    if (count($tags > 0)) {
        // We have some tags so build the javascript elements we need to create the tags themselves
        $taginsert = "\t\ttags: {items: " . json_encode($tags) . "},\n";
    }
}
?>
<!doctype html>
<html>
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=Edge">
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  
  <title>Facilities Cabinet Maintenance</title>
  <link rel="stylesheet" href="css/inventory.php" type="text/css">
  <link rel="stylesheet" href="css/jquery-ui.css" type="text/css">
Exemplo n.º 2
0
/**
 * Merge the tags of a Device or Cabinet into one string separated by ', '
 *
 * @param Device|Cabinet $obj
 * @return string
 */
function getTagsString($obj, $emptyVal = null)
{
    $tagNames = $emptyVal;
    $tag_list = $obj->GetTags();
    if (count($tag_list) > 0) {
        $tagNames = implode(', ', $tag_list);
    }
    return $tagNames;
}