3 # Display a menu of icons for per-files options
5 require './apache-lib.pl';
7 $access{'global'} || &error($text{'htaccess_ecannot'});
8 &allowed_auth_file($in{'file'}) ||
9 &error($text{'htindex_ecannot'});
10 $conf = &get_htaccess_config($in{'file'});
11 $d = $conf->[$in{'idx'}];
12 $desc = &text('htfile_header', &dir_name($d), "<tt>$in{'file'}</tt>");
13 &ui_print_header($desc, $text{'htfile_title'}, "");
15 $sw_icon = { "icon" => "images/show.gif",
16 "name" => $text{'htfile_show'},
17 "link" => "show.cgi?file=".&urlize($in{'file'})."&idx=$in{'idx'}" };
18 if ($access{'types'} eq '*') {
19 $ed_icon = { "icon" => "images/edit.gif",
20 "name" => $text{'htfile_edit'},
22 "manual_form.cgi?file=".&urlize($in{'file'})."&idx=$in{'idx'}" };
24 &config_icons("directory", "edit_files.cgi?file=".&urlize($in{'file'})."&idx=$in{'idx'}&",
25 $sw_icon, $ed_icon ? ( $ed_icon ) : ( ));
28 print &ui_form_start("change_files.cgi", "post");
29 print &ui_hidden("file", $in{'file'});
30 print &ui_hidden("idx", $in{'idx'});
31 print &ui_table_start($text{'htfile_apply'}, undef, 2);
33 $regexp = $d->{'words'}->[0] eq "~" || $d->{'name'} =~ /Match/;
34 print &ui_table_row($text{'htindex_regexp'},
35 &ui_radio("regexp", $regexp ? 1 : 0,
36 [ [ 0, $text{'htindex_exact'} ],
37 [ 1, $text{'htindex_re'} ] ]));
39 print &ui_table_row($text{'htindex_path'},
41 $d->{'words'}->[0] eq "~" ? $d->{'words'}->[1]
42 : $d->{'words'}->[0], 50));
44 print &ui_table_end();
45 print &ui_form_end([ [ undef, $text{'save'} ],
46 [ 'delete', $text{'delete'} ] ]);
48 &ui_print_footer("htaccess_index.cgi?file=".&urlize($in{'file'}), $text{'htindex_return'});