var params = new Array(); params['xml'] = "<?php echo $xml_file; ?> "; params['directive'] = "<?php echo $directive_id; ?> "; params['reload'] = true; parent.GB_hide(params); </script><?php exit; } $directive_editor = new Directive_editor($engine_id); $rule = $directive_editor->get_rule($directive_id, $xml_file, $rule_id); $db = new ossim_db(); $conn = $db->connect(); $plugin_list = Plugin::get_list($conn); if ($plugin_list == "") { $plugin_list = array(); } $plugin_names = array(); $plugin_list_order = array(); foreach ($plugin_list as $plugin) { $plugin_names[$plugin->get_id()] = $plugin->get_name(); $plugin_list_order[strtolower($plugin->get_name()) . ";" . $plugin->get_id()] = $plugin; if ($rule->plugin_id == $plugin->get_id()) { $plugin_type = $plugin->get_type(); } }
$attrib = $fields[0]; $rule = $fields[1]; $dir_id = $fields[2]; $file = $fields[3]; ossim_valid($engine_id, OSS_HEX, '\\-', 'illegal:' . _("Engine ID")); ossim_valid($rule, OSS_DIGIT, '\\-', 'illegal:' . _("Rule ID")); ossim_valid($dir_id, OSS_DIGIT, 'illegal:' . _("Directive ID")); ossim_valid($file, OSS_ALPHA, OSS_PUNC, 'illegal:' . _("File")); if (ossim_error()) { die(ossim_error()); } $file = "user.xml"; // Force to user.xml as no other can be written // Get current value $directive_editor = new Directive_editor($engine_id); $rule_aux = $directive_editor->get_rule($dir_id, $file, $rule); $current_value = $rule_aux->{$attrib}; // Timeout if ($attrib == "time_out") { ossim_valid($value, OSS_DIGIT, 'noneNONE', OSS_NULLABLE, 'illegal:' . $attrib); if (preg_match("/^none\$/i", $value)) { $value = ""; } elseif ($value != "" && !preg_match("/^none\$/i", $value) && !preg_match("/^\\d+\$/", $value)) { $another_error = _("Timeout must have a numeric value or None"); } if ($value == "") { $value = "None"; } // Occurrence } elseif ($attrib == "occurrence") { ossim_valid($value, OSS_DIGIT, 'illegal:' . $attrib);