Example #1
0
}
echo "<br/><br/>";
/* display everything else in separated tables */
foreach ($display as $table) {
    $n = null;
    $h = array();
    $index = 0;
    foreach ($inv[$table] as $def) {
        foreach ($def as $k => $v) {
            $h[$k][$index] = $v;
        }
        $index += 1;
    }
    $max = 0;
    $conf["global"]["maxperpage"] = $index;
    $disabled_columns = isExpertMode() ? array() : getInventoryEM($table);
    foreach ($h as $k => $v) {
        if ($k != 'id' && $k != 'timestamp' && !in_array($k, $disabled_columns)) {
            if ($n == null) {
                $n = new ListInfos($h[$k], $k);
            } else {
                $n->addExtraInfo($h[$k], $k);
            }
            if (count($h[$k]) > $max) {
                $max = count($h[$k]);
            }
        }
    }
    if ($max > 0 && $n != null) {
        echo "<h3>{$table} ({$max})</h3>";
        $n->drawTable(0);
Example #2
0
         $index += 1;
     }
     foreach ($machine[1] as $element) {
         $result['Machine'][$index] = $name;
         foreach ($element as $head => $val) {
             if ($head != 'id' && $head != 'timestamp') {
                 $result[$head][$index] = $val;
             }
         }
         $index += 1;
     }
     $params[] = array('hostname'=>$machine[0], 'uuid'=>$machine[2]);
 }
 $n = null;
     
 $disabled_columns = (isExpertMode() ? array() : getInventoryEM($display));
 $disabled_columns[] = 'id';
 $disabled_columns[] = 'timestamp';
 $disabled_columns[] = 'Icon';
 
 /* Delete these both lines because Type and Application columns will be removed from database */
 $disabled_columns[] = 'Type';
 $disabled_columns[] = 'Application';
 
 /*Generate icon => <img src="data:image/jpg;base64,DATA">*/
 if (isset($result['Icon'])) {
     $index = 0;
     foreach ($result['Icon'] as $v) {
         if ($v != '') {
             $result['Icon'][$index] = '<IMG src="data:image/jpeg;base64,'.$v.'">';
         }