예제 #1
0
function get_rulesconfig()
{
    require_once 'classes/InventorySearch.inc';
    require_once 'ossim_db.inc';
    require_once 'ossim_conf.inc';
    // Database Object
    $db = new ossim_db();
    $conn = $db->connect();
    $db_rules = InventorySearch::get_all($conn);
    foreach ($db_rules as $rule) {
        $type = $rule->get_type();
        $subtype = $rule->get_subtype();
        $rules[$type][$subtype]['list'] = $rule->get_prelist();
        $rules[$type][$subtype]['query'] = $rule->get_query();
        $rules[$type][$subtype]['match'] = $rule->get_match();
    }
    return $rules;
}
예제 #2
0
require_once 'ossim_db.inc';
require_once 'ossim_conf.inc';
// Database Object
$db = new ossim_db();
$conn = $db->connect();
$del_type = GET('del_type');
$del_subtype = GET('del_subtype');
ossim_valid($del_type, OSS_ALPHA, OSS_SPACE, OSS_NULLABLE, 'illegal:' . _("del_type"));
ossim_valid($del_subtype, OSS_ALPHA, OSS_SPACE, OSS_NULLABLE, 'illegal:' . _("del_subtype"));
if (ossim_error()) {
    die(ossim_error());
}
if ($del_type != "" && $del_subtype != "") {
    InventorySearch::delete($conn, $del_type, $del_subtype);
}
$db_rules = InventorySearch::get_all($conn);
$matches = InventorySearch::get_matches($conn);
?>
<!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 $title;
?>
 </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"/>
<script type="text/javascript">
function show_content (i) {
	document.getElementById('content'+i).style.display = "inline";