#!/usr/local/bin/perl # edit_user.cgi # Display other misc user-level options require './spam-lib.pl'; &can_use_check("user"); &ui_print_header(undef, $text{'user_title'}, ""); $conf = &get_config(); print "$text{'user_desc'}

\n"; &start_form("save_user.cgi", $text{'user_header'}); $dns = lc(&find_value("dns_available", $conf)); $dns = "test" if (!$dns && $config{'defaults'}); print " $text{'user_dns'} \n"; printf " %s\n", $dns eq 'yes' ? "checked" : "", $text{'yes'}; printf " %s\n", $dns eq 'no' ? "checked" : "", $text{'no'}; if (!$config{'defaults'}) { printf " %s (%s)\n", !$dns ? "checked" : "", $text{'default'}, $text{'user_dnstest'}; } printf " %s\n", $dns =~ /^test/ ? "checked" : "", $text{'user_dnslist'}; printf " \n", $dns =~ /^test:\s*(.*)/ ? $1 : ""; print "


\n"; print " $text{'user_razor'} \n"; $razor = &find("razor_timeout", $conf); &opt_field("razor_timeout", $razor, 5, 10); print " \n"; print "
\n"; print " $text{'user_dcc'} \n"; $dcc = &find("dcc_path", $conf); &opt_field("dcc_path", $dcc, 40, $text{'user_inpath'}, 1); print &file_chooser_button("dcc_path", 0); print " \n"; print " $text{'user_bodymax'} \n"; $bodymax = &find("dcc_body_max", $conf); &opt_field("dcc_body_max", $bodymax, 6, 999999); print " \n"; print " $text{'user_timeout'} \n"; $timeout = &find("dcc_timeout", $conf); &opt_field("dcc_timeout", $timeout, 5, 10); print " \n"; print " $text{'user_fuz1max'} \n"; $fuz1max = &find("dcc_fuz1_max", $conf); &opt_field("dcc_fuz1_max", $fuz1max, 6, 999999); print " \n"; print " $text{'user_fuz2max'} \n"; $fuz2max = &find("dcc_fuz2_max", $conf); &opt_field("dcc_fuz2_max", $fuz2max, 6, 999999); print " \n"; if (!&version_atleast(3)) { print " $text{'user_dheader'} \n"; $dheader = &find("dcc_add_header", $conf); &yes_no_field("dcc_add_header", $dheader, 0); print " \n"; } print "
\n"; print " $text{'user_pyzor'} \n"; $pyzor = &find("pyzor_path", $conf); &opt_field("pyzor_path", $pyzor, 40, $text{'user_inpath'}, 1); print &file_chooser_button("pyzor_path", 0); print " \n"; print " $text{'user_pbodymax'} \n"; $pbodymax = &find("pyzor_body_max", $conf); &opt_field("pyzor_body_max", $pbodymax, 6, 999999); print " \n"; print " $text{'user_ptimeout'} \n"; $ptimeout = &find("pyzor_timeout", $conf); &opt_field("pyzor_timeout", $ptimeout, 5, 10); print " \n"; print " $text{'user_pheader'} \n"; $pheader = &find("pyzor_add_header", $conf); &yes_no_field("pyzor_add_header", $pheader, 0); print " \n"; &end_form(undef, $text{'save'}); &ui_print_footer("", $text{'index_return'});