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);
9 if (!&has_nfs_commands()) {
10 print "<p>",$text{'index_eprog'},"<p>\n";
11 &ui_print_footer("/", $text{'index'});
15 @exps = &list_exports();
17 @dirs = &unique(map { $_->{'dir'} } @exps);
18 if ($access{'icons'}) {
19 # Display icons for exports
21 @cl = grep { $_->{'dir'} eq $d } @exps;
23 push(@icons, "images/export.gif");
24 local $desc = &describe_host($c->{'host'});
26 push(@titles, $d.'<br>'.$desc);
29 push(@titles, '<font color=#ff0000>'.
30 $d.'<br>'.$desc.'</font>');
33 "edit_export.cgi?idx=$c->{'index'}");
36 &icons_table(\@links, \@titles, \@icons);
39 # Display table of exports and clients
40 print "<table border width=100%>\n";
41 print "<tr $tb> <td><b>$text{'index_dir'}</b></td> ",
42 "<td><b>$text{'index_to'}</b></td> </tr>\n";
44 print "<tr $cb> <td valign=top>$d</td>\n";
46 @cl = grep { $_->{'dir'} eq $d } @exps;
49 print " | " if ($ccount++);
50 print "<a href=\"edit_export.cgi?idx=$c->{'index'}\">",&describe_host($c->{'host'}),"</a>\n";
51 print "<font color=#ff0000>($text{'index_inactive'})","</font>\n" if (!$c->{'active'});
53 print "</td> </tr>\n";
59 print "<b>$text{'index_none'}</b> <p>\n";
61 print "<a href=\"edit_export.cgi?new=1\">$text{'index_add'}</a> <p>\n";
64 print "<table width=100%> <tr>\n";
65 print "<td><form action=restart_mountd.cgi>\n";
66 print "<input type=submit value=\"$text{'index_apply'}\">\n";
67 print "</form></td>\n";
68 print "<td valign=top>$text{'index_applymsg'}</td>\n";
69 print "</tr> <tr> </table>\n";
71 &ui_print_footer("/", $text{'index'});