3 # Display other misc user-level options
5 require './spam-lib.pl';
7 &set_config_file_in(\%in);
8 &can_use_check("user");
9 &ui_print_header($header_subtext, $text{'user_title'}, "");
10 $conf = &get_config();
12 print "$text{'user_desc'}<p>\n";
13 &start_form("save_user.cgi", $text{'user_header'});
16 $dns = lc(&find_value("dns_available", $conf));
17 $dns = "test" if (!$dns && $config{'defaults'});
18 @dnsopts = ( [ 1, $text{'yes'} ],
20 !$config{'defaults'} ? ( [ -1, $text{'default'}.
21 " (".$text{'user_dnstest'}.")" ] ) : ( ),
22 [ 2, $text{'user_dnslist'} ] );
23 print &ui_table_row($text{'user_dns'},
24 &ui_radio("dns", $dns eq 'yes' ? 1 :
27 $dns =~ /^test/ ? 2 : 3, \@dnsopts).
28 &ui_textbox("dnslist", $dns =~ /^test:\s*(.*)/ ? $1 : "", 30));
32 $razor = &find("razor_timeout", $conf);
33 print &ui_table_row($text{'user_razor'},
34 &opt_field("razor_timeout", $razor, 5, 10));
39 $dcc = &find("dcc_path", $conf);
40 print &ui_table_row($text{'user_dcc'},
41 &opt_field("dcc_path", $dcc, 40, $text{'user_inpath'}, 1)." ".
42 &file_chooser_button("dcc_path", 0));
44 # Maximum body size for DCC
45 $bodymax = &find("dcc_body_max", $conf);
46 print &ui_table_row($text{'user_bodymax'},
47 &opt_field("dcc_body_max", $bodymax, 6, 999999));
50 $timeout = &find("dcc_timeout", $conf);
51 print &ui_table_row($text{'user_timeout'},
52 &opt_field("dcc_timeout", $timeout, 5, 10));
55 $fuz1max = &find("dcc_fuz1_max", $conf);
56 print &ui_table_row($text{'user_fuz1max'},
57 &opt_field("dcc_fuz1_max", $fuz1max, 6, 999999));
59 $fuz2max = &find("dcc_fuz2_max", $conf);
60 print &ui_table_row($text{'user_fuz2max'},
61 &opt_field("dcc_fuz2_max", $fuz2max, 6, 999999));
63 if (!&version_atleast(3)) {
65 $dheader = &find("dcc_add_header", $conf);
66 print &ui_table_row($text{'user_dheader'},
67 &yes_no_field("dcc_add_header", $dheader, 0));
73 $pyzor = &find("pyzor_path", $conf);
74 print &ui_table_row($text{'user_pyzor'},
75 &opt_field("pyzor_path", $pyzor, 40, $text{'user_inpath'}, 1)." ".
76 &file_chooser_button("pyzor_path", 0));
78 # Maximum Pyzor body size
79 $pbodymax = &find("pyzor_body_max", $conf);
80 print &ui_table_row($text{'user_pbodymax'},
81 &opt_field("pyzor_body_max", $pbodymax, 6, 999999));
83 # Pyzor command timeout
84 $ptimeout = &find("pyzor_timeout", $conf);
85 print &ui_table_row($text{'user_ptimeout'},
86 &opt_field("pyzor_timeout", $ptimeout, 5, 10));
89 $pheader = &find("pyzor_add_header", $conf);
90 print &ui_table_row($text{'user_pheader'},
91 &yes_no_field("pyzor_add_header", $pheader, 0));
93 &end_form(undef, $text{'save'});
94 &ui_print_footer($redirect_url, $text{'index_return'});