Exemplo n.º 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;
}
Exemplo n.º 2
0
$db = new ossim_db();
$conn = $db->connect();
$type = GET('type') != "" ? GET('type') : POST('type');
$subtype = GET('subtype') != "" ? GET('subtype') : POST('subtype');
$new = $type == "" && $subtype == "" ? 1 : 0;
if (POST('save') == "1") {
    $match = POST('match');
    $list = POST('prelist');
    $query = POST('query');
    // Security OJO
    InventorySearch::insert($conn, $type, $subtype, $match, $list, $query);
}
$matches = InventorySearch::get_matches($conn);
if ($type != "" && $subtype != "") {
    // Security OJO
    $rule = InventorySearch::get_rule($conn, $type, $subtype);
}
?>
<!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"/>
</head>
<body>
<table width="100%">
Exemplo n.º 3
0
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";
	document.getElementById('link'+i).innerHTML = "<a href='' onclick='hide_content(\""+i+"\");return false;'><img src='../pixmaps/minus-small.png' border='0' align='absmiddle'></a>";