Beispiel #1
0
}
// Avoid the browser resubmit POST data stuff
if (GET('redirect')) {
    header('Location: ' . $_SERVER['SCRIPT_NAME']);
    exit;
}
$db = new ossim_db();
$conn = $db->connect();
$tag = new Incident_tag($conn);
$parameters = NULL;
$info_error = NULL;
$error = FALSE;
$action = $parameters['action'] = GET('action') ? GET('action') : 'list';
$id = $parameters['id'] = GET('id');
if ($action == 'mod1step' && is_numeric($id)) {
    $f = $tag->get_list("WHERE td.id = {$id}");
    $name = $f[0]['name'];
    $descr = $f[0]['descr'];
} elseif ($action == 'new2step' || $action == 'mod2step') {
    $name = $parameters['name'] = POST('name');
    $descr = $parameters['descr'] = POST('descr');
    $validate = array("id" => array("validation" => "OSS_DIGIT,OSS_NULLABLE", "e_message" => 'illegal:' . _("ID")), "name" => array("validation" => "OSS_LETTER,OSS_PUNC,OSS_DIGIT", "e_message" => 'illegal:' . _("Name")), "descr" => array("validation" => "OSS_TEXT,OSS_NULLABLE", "e_message" => 'illegal:' . _("Description")), "action" => array("validation" => "OSS_TEXT", "e_message" => 'illegal:' . _("Action")));
    foreach ($parameters as $k => $v) {
        eval("ossim_valid(\$v, " . $validate[$k]['validation'] . ", '" . $validate[$k]['e_message'] . "');");
        if (ossim_error()) {
            $info_error[] = ossim_get_error();
            ossim_clean_error();
            $error = TRUE;
        }
    }
    if ($error == FALSE) {
Beispiel #2
0
    echo $submitter;
    ?>
" /></td>
						<td style="border-width: 0px;"><input type="text" name="title" value="<?php 
    echo $title;
    ?>
" /></td>
						<td style="border-width: 0px;"><input type="text" name="attachment" value="<?php 
    echo $attachment;
    ?>
" /></td>
						<td style="border-width: 0px;">
							<select name="tag">
								<option value=""></option>
								<?php 
    foreach ($incident_tag->get_list() as $t) {
        $selected = $tag == $t['id'] ? "selected='selected'" : '';
        ?>
									<option value="<?php 
        echo $t['id'];
        ?>
" <?php 
        echo $selected;
        ?>
><?php 
        echo $t['name'];
        ?>
</option>
									<?php 
    }
    ?>
Beispiel #3
0
*
* On Debian GNU/Linux systems, the complete text of the GNU General
* Public License can be found in `/usr/share/common-licenses/GPL-2'.
*
* Otherwise you can read it here: http://www.gnu.org/licenses/gpl-2.0.txt
*
*/
require_once 'av_init.php';
require_once 'incident_common.php';
Session::logcheck("analysis-menu", "IncidentsIncidents");
//DB connection
$db = new ossim_db();
$conn = $db->connect();
//Tags
$incident_tag = new Incident_tag($conn);
$tag_list = $incident_tag->get_list();
//Load users and entities (Autocomplete)
$autocomplete_keys = array('users', 'entities');
$users_and_entities = Autocomplete::get_autocomplete($conn, $autocomplete_keys);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<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/av_common.css?t=<?php 
echo Util::get_css_id();