JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr#!/usr/bin/perl # index.cgi require './dfs-lib.pl'; &ui_print_header(undef, $text{'index_title'}, "", "intro", 1, 1, 0, &help_search_link("dfstab share", "man")); @shlist = &list_shares(); if (@shlist && $access{'icons'}) { # Display shares as icons print "$text{'index_add'}
\n"; foreach $s (@shlist) { next if ($s->{'type'} ne 'nfs'); push(@icons, "images/share.gif"); push(@titles, $s->{'dir'}); push(@links, "edit_share.cgi?$s->{'index'}"); } &icons_table(\@links, \@titles, \@icons); if (!$access{'view'}) { print "$text{'index_add'}
\n"; } } elsif (@shlist) { # Display shares as table if (!$access{'view'}) { print &ui_form_start("delete_shares.cgi", "post"); print &select_all_link("d"),"\n"; print &select_invert_link("d"),"\n"; print "$text{'index_add'}
\n"; @tds = ( "width=5" ); } print &ui_columns_start([ $access{'view'} ? ( ) : ( "" ), $text{'index_dir'}, $text{'index_clients'} ], 100, 0, \@tds); foreach $s (@shlist) { next if ($s->{'type'} ne 'nfs'); &parse_options($s->{'opts'}); local @cols; if ($access{'view'}) { push(@cols, &html_escape($s->{'dir'})); } elsif (defined($options{'public'})) { push(@cols, "{'index'}\">". &html_escape($s->{'dir'}).""); } else { push(@cols, "{'index'}\">". &html_escape($s->{'dir'}).""); } undef(%clients); foreach (split(/:/, $options{"ro"})) { $clients{$_}++; } foreach (split(/:/, $options{"rw"})) { $clients{$_}++; } foreach (split(/:/, $options{"root"})) { $clients{$_}++; } if (%clients) { $clients = join('  |  ' , sort { $a cmp $b } map { &html_escape($_ =~ /^\@(.*)/ ? "$1.*" : $_) } (keys %clients) ); if (length($clients) > 80) { $clients = substr($clients, 0, 80)."..."; } } else { $clients = $text{'index_everyone'}; } push(@cols, $clients); if ($access{'view'}) { print &ui_columns_row(\@cols, \@tds); } else { print &ui_checked_columns_row(\@cols, \@tds, "d", $s->{'index'}); } } print &ui_columns_end(); if (!$access{'view'}) { print &select_all_link("d"),"\n"; print &select_invert_link("d"),"\n"; print "$text{'index_add'}
\n"; print &ui_form_end([ [ "delete", $text{'index_delete'} ] ]); } } else { print "$text{'index_none'}

\n"; print "$text{'index_add'}

\n"; } if (!$access{'view'}) { print &ui_hr(); print &ui_buttons_start(); print &ui_buttons_row("restart_sharing.cgi", $text{'index_apply'}, $text{'index_applydesc'}); print &ui_buttons_end(); } &ui_print_footer("/", "index");