Signed-off-by: Michael Tremer --- html/cgi-bin/samba.cgi | 165 ++++++++++++++++++++++++----------------- 1 file changed, 95 insertions(+), 70 deletions(-) diff --git a/html/cgi-bin/samba.cgi b/html/cgi-bin/samba.cgi index 7d5b4336c..a64fc9177 100644 --- a/html/cgi-bin/samba.cgi +++ b/html/cgi-bin/samba.cgi @@ -608,94 +608,119 @@ END my %shares = config("${General::swroot}/samba/shares"); -print < - - - +print < + + + + END -; -my @Shares = keys(%shares); +my @shares = keys(%shares); my $lines = 0; my $col=""; -foreach my $shareentry (sort @Shares) - { +foreach my $shareentry (sort @shares) { chomp $shareentry; + if ($lines % 2) { - print ""; - $col="bgcolor='$color{'color20'}'"; + $col = "bgcolor='$color{'color20'}'"; } else { - print ""; - $col="bgcolor='$color{'color22'}'"; - } - print <$shareentry - - -END -; - $lines++; + $col = "bgcolor='$color{'color22'}'"; } -print < -
-
$Lang::tr{'manage shares'}
$Lang::tr{'sharename'}$Lang::tr{'options'}
$Lang::tr{'sharename'}
- - - -
- - - -
- - -
- - -
+ print < + $shareentry + +
+ + + +
+ + +
+ + + +
+ + END ; + $lines++; +} -if ($sambasettings{'ACTION'} eq 'shareadd') - { - print < - - - - +print < -
-
$Lang::tr{'add share'}
- + +
+ +
-
+ + +
+
+ + +
+
END -; - } -if ($sambasettings{'ACTION'} eq 'sharechange') - { +if ($sambasettings{'ACTION'} eq 'shareadd') { + print < + +
+ + + + + + + + + + +
$Lang::tr{'add share'}
+ +
+ + +
+
+END +} + +if ($sambasettings{'ACTION'} eq 'sharechange') { my $shareoption = $shares{$sambasettings{'NAME'}}; - print < - - - - -
$Lang::tr{'edit share'}
-
- - -
- -
+ + print < + +
+ + + + + + + + + + + + +
$Lang::tr{'edit share'}
+ +
+ + +
+
END -; - } +} if ($sambasettings{'ACTION'} eq 'smbshareadd') { -- 2.20.1