#!/usr/local/bin/perl # edit_filter.cgi # Display allowed user filter options require './jabber-lib.pl'; &ui_print_header(undef, $text{'filter_title'}, "", "filter"); $conf = &get_jabber_config(); $session = &find_by_tag("service", "id", "sessions", $conf); $jsm = &find("jsm", $session); $filter = &find("filter", $jsm); print "
\n"; print "\n"; print "\n"; print "
$text{'filter_header'}
\n"; print "\n"; printf "\n", &find_value("max_size", $filter); $allow = &find("allow", $filter); $conds = &find("conditions", $allow); print "\n"; $acts = &find("actions", $allow); print "\n"; print "
$text{'filter_max'}
$text{'filter_conds'} \n"; foreach $c (@filter_conds) { $cx = &find($c, $conds); printf " %s\n", "cond_$c", $cx ? "checked" : "", $c; } print "
$text{'filter_acts'} \n"; foreach $c (@filter_acts) { $cx = &find($c, $acts); printf " %s\n", "act_$c", $cx ? "checked" : "", $c; } print "
\n"; print "
\n"; &ui_print_footer("", $text{'index_return'});