3 # Display a menu of icons for a per-directory options file
5 require './proftpd-lib.pl';
7 $conf = &get_ftpaccess_config($in{'file'});
8 $desc = "<tt>".&html_escape($in{'file'})."</tt>";
9 &ui_print_header($desc, $text{'ftpindex_title'}, "",
10 undef, undef, undef, undef, "<a href=\"delete_ftpaccess.cgi?file=".
11 &urlize($in{'file'})."\">$text{'ftpindex_delete'}</a>".
12 "<br>".&restart_button());
14 print "<h3>$text{'ftpindex_opts'}</h3>\n";
15 # Add user permissions icon/link
16 $userperms_icon = { "icon" => "images/type_icon_3.gif",
17 "name" => "User Permissions",
18 "link" => "userpermissions_form.cgi?file=$in{'file'}" };
19 # Add 'edit as text' icon/link
20 $ed_icon = { "icon" => "images/edit.gif",
21 "name" => $text{'ftpindex_edit'},
22 "link" => "manual_form.cgi?file=$in{'file'}" };
23 &config_icons("ftpaccess", "edit_ftpaccess.cgi?file=$in{'file'}&", $ed_icon, $userperms_icon);
25 @limit = ( &find_directive_struct("Limit", $conf) );
27 # Limit sub-directives
29 print "<h3>$text{'ftpindex_limit'}</h3>\n";
31 push(@links, "limit_index.cgi?limit=".&indexof($l, @$conf).
33 push(@titles, $l->{'value'});
34 push(@icons, "images/limit.gif");
36 &icons_table(\@links, \@titles, \@icons, 3);
39 print "<form action=create_limit.cgi>\n";
40 print "<input type=hidden name=file value='$in{'file'}'>\n";
41 print "<table border>\n";
42 print "<tr $tb> <td><b>$text{'ftpindex_addlimit'}</b></td> </tr>\n";
43 print "<tr $cb> <td><table>\n";
44 print "<tr> <td><b>$text{'ftpindex_cmds'}</b></td>\n";
45 print "<td><input name=cmd size=20>\n";
46 print "<input type=submit value=\"$text{'create'}\"></td> </tr>\n";
47 print "</table></td></tr></table></form>\n";
49 &ui_print_footer("ftpaccess.cgi", $text{'ftpaccess_return'},
50 "", $text{'index_return'});