Handle hostnames with upper-case letters
[webmin.git] / sarg / edit_report.cgi
1 #!/usr/local/bin/perl
2 # Show options for report style
3
4 require './sarg-lib.pl';
5
6 $conf = &get_config();
7 &ui_print_header(undef, $text{'report_title'}, "");
8 print &ui_form_start("save_report.cgi", "post");
9 print &ui_table_start($text{'report_header'}, "width=100%", 4);
10 $config_prefix = "report_";
11
12 print &config_select($conf, "report_type",
13                      [ [ "topsites", $text{'report_topsites'} ],
14                        [ "sites_users", $text{'report_sites_users'} ],
15                        [ "users_sites", $text{'report_users_sites'} ],
16                        [ "date_time", $text{'report_date_time'} ],
17                        [ "denied", $text{'report_denied'} ],
18                        [ "auth_failures", $text{'report_auth_failures'} ],
19                        [ "site_user_time_date", $text{'report_site_user_time_date'} ] ],
20                      $text{'report_all'}, 3);
21
22 print &ui_table_hr();
23
24 print &config_yesno($conf, "resolve_ip", undef, undef, undef, 3);
25 print &config_yesno($conf, "user_ip", undef, undef, undef, 3);
26
27 print &config_radio($conf, "records_without_userid",
28                     [ [ "ignore", $text{'report_ignore'} ],
29                       [ "ip", $text{'report_ip'} ],
30                       [ "everybody", $text{'report_everybody'} ] ], 3);
31
32 print &ui_table_hr();
33
34 print &config_sortfield($conf, "user_sort_field",
35                         [ "USER", "CONNECT", "BYTES", "TIME" ]);
36 print &config_sortfield($conf, "topuser_sort_field",
37                         [ "SITE", "CONNECT", "BYTES", "TIME" ]);
38 print &config_sortfield($conf, "topsites_sort_order",
39                         [ "CONNECT", "BYTES" ],
40                         [ [ "A", $text{'report_sorta'} ],
41                           [ "D", $text{'report_sortd'} ] ]);
42 print &config_radio($conf, "index_sort_order",
43                     [ [ "A", $text{'report_sorta'} ],
44                       [ "D", $text{'report_sortd'} ] ], 3);
45
46 print &ui_table_hr();
47
48 print &config_opt_textbox($conf, "exclude_users", 40, 3);
49 print &config_opt_textbox($conf, "exclude_hosts", 40, 3);
50 print &config_opt_textbox($conf, "exclude_codes", 40, 3);
51 print &config_opt_textbox($conf, "usertab", 40, 3);
52 print &config_colons($conf, "include_users", ":", $text{'report_nostrings'}, 3);
53 print &config_colons($conf, "exclude_string", ":", $text{'report_allusers'}, 3);
54
55 print &ui_table_hr();
56
57 print &config_yesno($conf, "index", undef, undef,
58                     [ [ "only", $text{'report_only'} ] ], 3);
59 print &config_yesno($conf, "overwrite_report", undef, $text{'report_overno'},
60                     undef, 3);
61
62 print &config_yesno($conf, "use_comma", undef, undef, undef, 3);
63
64 print &config_opt_textbox($conf, "topsites_num", 5, 3);
65
66 print &config_opt_textbox($conf, "topuser_num", 5, 3);
67
68 print &config_opt_textbox($conf, "max_elapsed", 5, 3);
69
70 print &config_yesno($conf, "long_url", undef, undef, undef, 3);
71
72 print &config_radio($conf, "date_time_by",
73                     [ [ "bytes", $text{'report_bytes'} ],
74                       [ "elap", $text{'report_elap'} ] ], 3);
75
76 print &config_radio($conf, "site_user_time_date_type",
77                     [ [ "table", $text{'report_table'} ],
78                       [ "list", $text{'report_list'} ] ], 3);
79
80 print &config_radio($conf, "displayed_values",
81                     [ [ "bytes", $text{'report_bytes2'} ],
82                       [ "abbreviation", $text{'report_abbrev'} ] ], 3);
83
84 print &config_opt_textbox($conf, "user_invalid_char", 10, 3);
85
86 print &ui_table_hr();
87
88 print &config_yesno($conf, "privacy", undef, undef, undef, 3);
89 print &config_opt_textbox($conf, "privacy_string", 25, 3);
90 print &config_opt_textbox($conf, "privacy_string_color", 20, 3);
91
92 print &ui_table_hr();
93
94 print &config_range($conf, "weekdays", 0, 6, 3);
95 print &config_range($conf, "hours", 0, 23, 3);
96
97 print &ui_table_end();
98 print &ui_form_end([ [ 'save', $text{'save'} ] ], "100%");
99 &ui_print_footer("", $text{'index_return'});