'; if ($_SESSION['userlevel'] >= '7') { $actions .= '
'; } if ($subformat == 'detail') { $actions .= '
'; } $actions .= '
'; $hostname = generate_device_link($device); if (extension_loaded('mbstring')) { $location = mb_substr($device['location'], 0, 32, 'utf8'); } else { $location = substr($device['location'], 0, 32); } if ($subformat == 'detail') { $platform = $device['hardware'] . '
' . $device['features']; $os = $device['os_text'] . '
' . $device['version']; $uptime = formatUptime($device['uptime'], 'short'); $hostname .= '
' . $device['sysName']; if (empty($port_count)) { $port_count = 0; $col_port = ''; } if ($port_count) { $col_port = ' ' . $port_count . '
'; } if ($sensor_count) { $col_port .= ' ' . $sensor_count; } } else { $platform = $device['hardware']; $os = $device['os_text'] . ' ' . $device['version']; $uptime = formatUptime($device['uptime'], 'short'); } $response[] = array( 'extra' => $extra, 'msg' => $msg, 'list_type' => $subformat, 'icon' => $image, 'hostname' => $hostname, 'ports' => $col_port, 'hardware' => $platform, 'os' => $os, 'uptime' => $uptime, 'location' => $location, 'actions' => $actions, ); }//end foreach $output = array( 'current' => $current, 'rowCount' => $rowCount, 'rows' => $response, 'total' => $total, ); echo _json_encode($output);