$torder = GET('torder') ? 1 : 0; // default order (date DESC) if ($order == "" && !$torder) { $order = "date"; $torder = 1; } ossim_valid($id_document, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("Id_document")); ossim_valid($pag, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("Pag")); ossim_valid($order, OSS_ALPHA, OSS_NULLABLE, 'illegal:' . _("Order")); ossim_valid($torder, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("Torder")); ossim_valid($search_str, OSS_TEXT, OSS_NULLABLE, 'illegal:' . _("Searchstr")); if (ossim_error()) { die(ossim_error()); } if ($search_bylink != "") { list($repository_list, $total) = Repository::get_list_bylink($conn, $from, $maxrows, $search_bylink); } else { list($repository_list, $total) = Repository::get_list($conn, $from, $maxrows, $search_str, $order, $torder); } $total_pages = floor(($total - 1) / $maxrows) + 1; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title> <?php echo gettext("OSSIM Framework"); ?> </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> <meta http-equiv="Pragma" content="no-cache"/> <link rel="stylesheet" type="text/css" href="../style/style.css"/>
echo Incident::get_priority_in_html($priority); ?> </td> <td valign="top"> <?php $has_found_keys = 0; $max_rows = 10; // Must have the same value in ../repository/index.php $keywords = $incident->get_keywords_from_type($conn); if ($keywords != "") { $keywords = preg_replace("/\\s*,\\s*/", " OR ", $keywords); list($aux_list, $has_found_keys) = Repository::get_list($conn, 0, 5, $keywords); } list($linked_list, $has_linked) = Repository::get_list_bylink($conn, 0, 999, $incident->get_id()); $keywords_search = $keywords != "" ? $keywords : $incident->get_title(); if ($has_found_keys > 0) { $has_found = "<a href='../repository/?searchstr=" . urlencode($keywords) . "' style='text-decoration:underline'><strong>{$has_found_keys}</strong></a>"; } else { if ($has_linked) { $has_found = "<a href='../repository/?search_bylink=" . $incident->get_id() . "' style='text-decoration:underline'><strong>{$has_linked}</strong></a>"; } } $has_found = empty($has_found) ? 0 : $has_found; ?> <table width="100%"> <tr><th height="18"><?php echo _("Documents"); ?> </th></tr>
<td valign='top'><?php Incident::colorize_status($incident->get_status($conn)); ?> </td> <td valign='top'><?php echo Incident::get_priority_in_html($priority); ?> </td> <td valign="top"> <?php $has_found_keys = 0; $max_rows = 10; list($linked_list, $has_linked) = Repository::get_list_bylink($conn, 0, -1, $incident->get_id(), "incident"); ?> <table width="100%" style="border:none;background-color:#efefef"> <tr><th height="18"><?php echo _('Documents'); ?> </th></tr> <?php $i = 0; if (count($linked_list) == 0) { echo "<tr><td height='25'>" . _('No linked documents') . "</td></tr>"; } $new_url = Menu::get_menu_url("../repository/repository_newdocument.php", 'configuration', 'threat_intelligence', 'knowledgebase'); foreach ($linked_list as $doc) { $repository_pag = floor($i / $max_rows) + 1; ?>