break;
    }
    if ($var_tmp != "") {
        Util::print_succesful(_($var_tmp));
    }
}
$inctype_id = GET('id');
ossim_valid($inctype_id, OSS_ALPHA, OSS_SPACE, OSS_PUNC, 'illegal:' . _("Incident type"));
if (ossim_error()) {
    die(ossim_error());
}
$db = new ossim_db();
$conn = $db->connect();
//
$custom_fields = array();
if ($inctype_list = Incident_type::get_list($conn, "WHERE id = '{$inctype_id}'")) {
    $inctype = $inctype_list[0];
    $custom = preg_match("/custom/", $inctype->get_keywords()) ? 1 : 0;
    $custom_fields = Incident_custom::get_custom_types($conn, $inctype_id);
}
?>



<form method="post" id="crt" action="modifyincidenttype.php">
	
	<div id='info_error' class='ct_error'></div>
	<input type="hidden" id="modify" name="modify" value="modify"/>
	<input type="hidden" name="id" id='id_crt' value="<?php 
echo $inctype->get_id();
?>
Beispiel #2
0
						</td>
					
						<td style="border-width: 0px;">
							<select name="type" onChange="document.forms['filter'].submit()">
								<option value="" <?php 
if (!$type) {
    echo "selected";
}
?>
><?php 
echo gettext("ALL");
?>
</option>
								<?php 
$customs = array();
foreach (Incident_type::get_list($conn) as $itype) {
    $id = $itype->get_id();
    if (preg_match("/custom/", $itype->get_keywords())) {
        $customs[] = $itype->get_id();
    }
    ?>
										<option <?php 
    if ($type == $id) {
        echo "selected";
    }
    ?>
 value="<?php 
    echo $id;
    ?>
"><?php 
    echo $id;
Beispiel #3
0
			});
		});
	
	</script>
	
</head>
<body>

<div class='c_back_button' style='display:block;'>
    <input type='button' class="av_b_back" onclick="document.location.href='../incidents/index.php';return false;"/>
</div>

<?php 
$db = new ossim_db();
$conn = $db->connect();
$inctype_list = Incident_type::get_list($conn, "");
?>

<div id='av_info'>
	<?php 
if (!empty($_GET['msg'])) {
    $var_tmp = "";
    switch ($_GET['msg']) {
        case 1:
            $var_tmp = _("New Custom Ticket successfully created");
            break;
        case 2:
            $var_tmp = _("New Ticket Type successfully created");
            break;
        case 3:
            $var_tmp = _("Ticket Type successfully updated");
Beispiel #4
0
function incident_report()
{
    // First time we visit this page, show by default only Open incidents
    // when GET() returns NULL, means that the param is not set
    if (!GET('status')) {
        $status = 'Open';
    }
    $db = new ossim_db();
    $conn = $db->connect();
    ?>

  <!-- filter -->

  <form name="filter" method="GET" action="<?php 
    echo $_SERVER["SCRIPT_NAME"];
    ?>
">
   <table align="center" width="100%">
    <tr>
      <th colspan="7"><?php 
    echo gettext("Incidents Report Options");
    ?>
</th>
    </tr>
   <table align="center" width="100%">
    <tr>
      <table align="center" valign="center" width="100%">
          <tr>
          <td> <?php 
    echo gettext("Class");
    /* ref */
    ?>
 </td>
          <td> <?php 
    echo gettext("Type");
    /* type */
    ?>
 </td>
          <td> <?php 
    echo gettext("In charge");
    ?>
 </td>
          <td> <?php 
    echo gettext("Title");
    ?>
 </td>
          <td> <?php 
    echo gettext("Date");
    ?>
 </td>
          <td> <?php 
    echo gettext("Status");
    ?>
 </td>
          <td> <?php 
    echo gettext("Priority");
    ?>
 </td>
          <td> <?php 
    echo gettext("Action");
    ?>
 </td>
          </tr>
        <tr>
          <td class="left">
          <table>
            <tr>
                <td class="left">
                    <input type="checkbox" name="Alarm" checked>
                        <?php 
    echo gettext("Alarm");
    ?>
                    </input>
                </td>
            </tr>
            <tr>
                <td class="left">
                    <input type="checkbox" name="Event" checked>
                        <?php 
    echo gettext("Event");
    ?>
                    </input>
                </td>
            </tr>
            <tr>
                <td class="left">
                    <input type="checkbox" name="Metric" checked>
                        <?php 
    echo gettext("Metric");
    ?>
                    </input>
                </td>
            </tr>
            <tr>
                <td class="left">
                    <input type="checkbox" name="Anomaly" checked>
                        <?php 
    echo gettext("Anomaly");
    ?>
                    </input>
                </td>
            </tr>
            <tr>
                <td class="left">
                    <input type="checkbox" name="Vulnerability" checked>
                        <?php 
    echo gettext("Vulnerability");
    ?>
                    </input>
                </td>
            </tr>
           </table>
          </td>
        <td valign="top">
            <select name="Type">
              <option value="ALL">
                <?php 
    echo gettext("ALL");
    ?>
              </option>
              <?php 
    foreach (Incident_type::get_list($conn) as $itype) {
        $id = $itype->get_id();
        ?>
                  <option <?php 
        if ($type == $id) {
            echo "selected";
        }
        ?>
 value="<?php 
        echo $id;
        ?>
">
                    <?php 
        echo $id;
        ?>
                  </option>
              <?php 
    }
    ?>
            </select>
          </td>
          <td valign="top" >
            <input type="text" name="In_Charge" value="<?php 
    echo $in_charge;
    ?>
" /></td>
          <td valign="top" >
            <input type="text" name="Title" value="<?php 
    echo $title;
    ?>
" /></td>
          <td valign="top" >
            <input type="text" size="22" name="Date" value="<?php 
    echo date("F j, Y, g:i a");
    ?>
" /></td>
          <td valign="top" >
            <select name="Status">
              <option value="ALL">
                <?php 
    echo gettext("ALL");
    ?>
              </option>
              <option <?php 
    if ($status == "Open") {
        echo "selected";
    }
    ?>
                value="Open">
                <?php 
    echo gettext("Open");
    ?>
              </option>
              <option <?php 
    if ($status == "Closed") {
        echo "selected";
    }
    ?>
                value="Closed">
                <?php 
    echo gettext("Closed");
    ?>
              </option>
            </select>
          </td>
          <td valign="top" >
            <table>
                <tr>
                    <td class="left">
                        <input type="checkbox" name="High" checked>
                            <?php 
    echo gettext("High");
    ?>
                        </input>
                    </td>
                </tr>
                <tr>
                    <td class="left">
                        <input type="checkbox" name="Medium" checked>
                            <?php 
    echo gettext("Medium");
    ?>
                        </input>
                    </td>
                </tr>
                <tr>
                    <td class="left">
                        <input type="checkbox" name="Low" checked>
                            <?php 
    echo gettext("Low");
    ?>
                        </input>
                    </td>
                </tr>
            </table>
            </td>
          <td valign="top" nowrap >
            <input type="submit" name="submit_incident" value="Generate" class="btn" style="font-size:12px">
          </td>
        </tr>
      </tr>
      </table>
    </td></tr>
  </table>
  </form>
  <br/>
  <!-- end filter -->
<?php 
}