$txt_temp .= "<a href=\"javascript:;\" onclick=\"GB_edit('../repository/repository_list.php?keyname=" . urlencode($vulnerability_data->get_ip()) . "&type=host')\" class='blue' target='main'>[" . $linkedocs . "] " . _('Knowledge DB') . "</a>"; } if ($txt_temp != '') { $txt_temp = ' (' . $txt_temp . ')'; } echo "<strong>IP:</strong> " . $vulnerability_data->get_ip() . $txt_temp . "<br>"; echo "<strong>Port:</strong> " . $vulnerability_data->get_port() . "<br/>"; echo "<strong>Scanner ID:</strong> " . $nessus_id . "<br/>"; echo "<strong>Risk:</strong> " . $vulnerability_data->get_risk() . "<br/>"; echo "<strong>Description:</strong> " . Osvdb::sanity($vulnerability_data->get_description()) . "<br/>"; } } elseif ($ref == 'Custom') { $custom_list = $incident->get_custom($conn); echo "<table class='noborder' width='100%' id='custom_table'>"; foreach ($custom_list as $custom) { echo "<tr>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='left noborder' align='middle'><strong>" . $custom[0] . ":</strong></td>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<td class='left'>" . Incident::format_custom_field($custom[3], $id, $custom[1], $custom[2]) . "</td>\n\t\t\t\t\t\t\t\t\t\t\t\t </tr>\n"; } echo "</table>"; } ?> </td> </tr> </table> </td> </tr> </table> </td> <!-- End incident data --> <td valign='top'><?php
$default_value = $custom_values[$field['name']]->get_content(); $type = $custom_values[$field['name']]->get_type(); $id = $custom_values[$field['name']]->get_id(); } else { $default_value = null; } $wf1_types = array('Select box', 'Date', 'Date Range', 'Checkbox', 'Radio button'); if (in_array($field['type'], $wf1_types)) { $class_wf = array('wfl1', 'wfr1'); } else { $class_wf = array('wfl2', 'wfr2'); } echo "<div class='" . $class_wf[0] . "'>"; if (!empty($default_value) && $type == 'File') { echo "<div style='padding-bottom: 3px; text-align: left' id='delfile_" . $params['id'] . "'>"; echo Incident::format_custom_field($id, $incident_id, $default_value, $type); echo "<span style='margin-left: 3px'>\n\t\t\t\t\t\t\t\t<a style='cursor:pointer' onclick=\"delete_file('" . $params['id'] . "')\"><img src='../pixmaps/delete.gif' align='absmiddle' title='" . _("Delete File") . "'/></a>\n\t\t\t\t\t\t\t </span>"; echo "</div>"; echo "<input type='hidden' name='del_" . $params['name'] . "' id='del_" . $params['id'] . "' value='0'/>"; } echo $form_builder->draw_element($field['type'], $default_value); echo "</div>"; $req_f_inherent = array('Check True/False', 'Check Yes/No', 'Asset', 'Slider'); $mandatory = $field['required'] == 1 && !in_array($field['type'], $req_f_inherent) ? "<span>(*)</span>" : ""; echo "<div class='" . $class_wf[1] . "'>" . $mandatory . "</div>"; echo "</td>"; echo "</tr>\n"; $cont++; } } }
} elseif ($ref == 'Vulnerability') { $vulnerability_list = $incident->get_vulnerabilities($conn); foreach ($vulnerability_list as $vulnerability_data) { $nessus_id = $vulnerability_data->get_nessus_id(); $hostname_temp = Asset_host::get_name_by_ip($conn, $vulnerability_data->get_ip()); $hostname_temp = array_shift($hostname_temp); print_incident_fields(_('IP'), $vulnerability_data->get_ip() . $hostname_temp); print_incident_fields(_('Port'), $vulnerability_data->get_port()); print_incident_fields(_('Scanner ID'), $nessus_id); print_incident_fields(_('Risk'), $vulnerability_data->get_risk()); print_incident_fields(_('Description'), nl2br($vulnerability_data->get_description())); } } elseif ($ref == 'Custom') { $custom_list = $incident->get_custom($conn); foreach ($custom_list as $custom) { $c_val = Incident::format_custom_field($custom[3], $id, $custom[1], $custom[2]); print_incident_fields($custom[0], $c_val); } } ?> </td> </tr> </table> </td> </tr> </table> </td> <!-- End incident data --> <td valign='top'><?php Incident::colorize_status($incident->get_status($conn));