3 # Display a list of directories and their client(s)
6 require './exports-lib.pl';
7 &ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, 0,
8 &help_search_link("nfs exports", "man", "howto"));
10 if (!&has_nfs_commands()) {
11 print $text{'index_eprog'},"<p>\n";
12 &ui_print_footer("/", $text{'index'});
16 # Display table of exports and clients
17 @exps = &list_exports();
19 print &ui_form_start("delete_exports.cgi", "post");
20 @dirs = &unique(map { $_->{'dir'} } @exps);
22 # Directory list heading
23 @links = ( &select_all_link("d"),
24 &select_invert_link("d"),
25 "<a href=\"edit_export.cgi?new=1\">$text{'index_add'}</a>" );
26 print &ui_links_row(\@links);
28 print &ui_columns_start([ "",
30 $text{'index_to'} ], 100, 0, \@tds);
32 # Rows for directories and clients
35 push(@cols, &html_escape($d));
37 @cl = grep { $_->{'dir'} eq $d } @exps;
40 $dirs .= " | " if ($ccount++);
41 $dirs .= "<a href='edit_export.cgi?idx=$c->{'index'}'>".
42 &describe_host($c->{'host'})."</a>\n";
43 if (!$c->{'active'}) {
44 $dirs .= "<font color=#ff0000>(".
45 $text{'index_inactive'}.")</font>\n"
49 print &ui_checked_columns_row(\@cols, \@tds, "d", $d);
51 print &ui_columns_end();
52 print &ui_links_row(\@links);
53 print &ui_form_end([ [ "delete", $text{'index_delete'} ],
54 [ "disable", $text{'index_disable'} ],
55 [ "enable", $text{'index_enable'} ] ]);
58 print "<b>$text{'index_none'}</b> <p>\n";
59 print "<a href=\"edit_export.cgi?new=1\">$text{'index_add'}</a> <p>\n";
63 print &ui_buttons_start();
64 print &ui_buttons_row("restart_mountd.cgi", $text{'index_apply'},
65 $text{'index_applymsg'});
66 print &ui_buttons_end();
68 &ui_print_footer("/", $text{'index'});