');
$actions .= '

';
$actions .= ('
');
$actions .= '

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