Beispiel #1
0
        $parent = $old_rule->rule->parentNode;
        $parent->appendChild($new_rule);
        $directive_editor->save_xml($filepath, $dom, "DOMXML");
    } elseif (GET('mode') == "move") {
        $dom = $directive_editor->get_xml($filepath, "DOMXML");
        $direct = $directive_editor->getDirectiveFromXML($dom, $directive_id);
        $tab_rules = $direct->rules;
        switch (GET('direction')) {
            case 'left':
                $directive_editor->left($dom, $rule, &$tab_rules, $direct);
                break;
            case 'right':
                $directive_editor->right($dom, $rule, &$tab_rules, $direct);
                break;
            case 'up':
                $directive_editor->up($dom, $rule, &$tab_rules, $direct);
                break;
            case 'down':
                $directive_editor->down($dom, $rule, &$tab_rules, $direct);
                break;
        }
        $directive_editor->save_xml($filepath, $dom, "DOMXML");
    }
}
// Get columns
$columns = array("name" => _("Name"), "reliability" => _("Reliability"), "time_out" => _("Timeout"), "occurrence" => _("Occurrence"), "from" => _("From"), "to" => _("To"), "plugin_id" => _("Data Source"), "plugin_sid" => _("Event Type"), "sensor" => _("Sensor"), "protocol" => _("Protocol"), "sticky_different" => _("Sticky Dif"), "username" => _("Username"), "password" => _("Pass"), "userdata1" => _("Userdata1"), "userdata2" => _("Userdata2"), "userdata3" => _("Userdata3"), "userdata4" => _("Userdata4"), "userdata5" => _("Userdata5"), "userdata6" => _("Userdata6"), "userdata7" => _("Userdata7"), "userdata8" => _("Userdata8"), "userdata9" => _("Userdata9"));
$db = new ossim_db();
$conn = $db->connect();
$config = new User_config($conn);
$columns_arr = $config->get(Session::get_session_user(), 'directive_editor_cols', 'php', 'directives');
if (count($columns_arr) < 1) {