} } } } elseif (!strlen($cmd['bundle_id']) and !strlen($gid)) { // SINGLE COMMAND case $a_cmd[] = $cmd['title']; $p['cmd_id'] = $cmd['id']; $p['coh_id'] = $coh_id; } else { $a_cmd[] = $cmd['title']; $p['cmd_id'] = $cmd['id']; } if (strlen($uuid) and strlen($cmd['bundle_id']) and !strlen($_GET['bundle_id']) or strlen($gid) and !strlen($_GET['cmd_id'])) { if (!$history) { if (strlen($cmd['bundle_id']) and !strlen($_GET['bundle_id'])) { $status = get_command_on_bundle_status($cmd['bundle_id']); } elseif (strlen($gid)) { $status = get_command_on_group_status($cmd['id']); } } $icons = state_tmpl_macro($status); $icons['play'] == '' ? $a_start[] = $actionempty : ($a_start[] = $actionplay); $icons['stop'] == '' ? $a_stop[] = $actionempty : ($a_stop[] = $actionstop); $icons['pause'] == '' ? $a_pause[] = $actionempty : ($a_pause[] = $actionpause); $a_current[] = ''; } else { if ($coh['current_state'] == 'scheduled' && $cmd['max_connection_attempt'] != $coh['attempts_left']) { $coh['current_state'] = 'rescheduled'; } if (isset($statusTable[$coh['current_state']])) { $a_current[] = $statusTable[$coh['current_state']];
$ret = array_merge($ret, get_command_on_group_by_state($id, $state, $lower, $upper)); } elseif ($kind == 2) { $ret = array_merge($ret, get_command_on_bundle_by_state($id, $state, $lower, $upper)); } } return $ret; } if (strlen($cmd_id)) { $s = get_command_on_group_status($cmd_id); if ($specific_state) { // the export doesnot have the same format $s = get_command_by_state(1, $cmd_id, $state, $s['total']); } $title = get_command_on_host_title($cmd_id); } elseif (strlen($_GET['bundle_id'])) { $s = get_command_on_bundle_status($_GET['bundle_id']); if ($specific_state) { // the export doesnot have the same format $s = get_command_by_state(2, $_GET['bundle_id'], $state, $s['total']); } $bdl = bundle_detail($_GET['bundle_id']); if ($bdl[0] == null) { $title = ''; } else { $title = $bdl[0]['title']; } } ob_end_clean(); $filename = "command_status_"; if (strlen($cmd_id)) { $filename .= "C" . $cmd_id;