From: Alexander Marx Date: Thu, 9 Jan 2014 15:23:39 +0000 (+0100) Subject: Merge branch 'fifteen' of ssh://git.ipfire.org/pub/git/ipfire-2.x into fifteen-layout X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=commitdiff_plain;h=3932f02ba33e0f0b7686db4bd6f4609ae7e3d370;hp=-c Merge branch 'fifteen' of ssh://git.ipfire.org/pub/git/ipfire-2.x into fifteen-layout --- 3932f02ba33e0f0b7686db4bd6f4609ae7e3d370 diff --combined html/cgi-bin/ovpnmain.cgi index bc76c15b3,5dd943f19..7b1654fb9 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@@ -3947,7 -3947,6 +3947,6 @@@ if ($cgiparams{'TYPE'} eq 'net') if ( -e "${General::swroot}/ovpn/ccd/$confighash{$key}[2]"){ unlink "${General::swroot}/ovpn/ccd/$cgiparams{'CERT_NAME'}"; } - $confighash{$key}[2] =~ s/ /_/gi; open ( CCDRWCONF,'>',"${General::swroot}/ovpn/ccd/$confighash{$key}[2]") or die "Unable to create clientconfigfile $!"; print CCDRWCONF "# OpenVPN clientconfig from ccd extension by Copymaster#\n\n"; if($cgiparams{'CHECK1'} eq 'dynamic'){ @@@ -4664,7 -4663,7 +4663,7 @@@ EN -
+

END ; @@@ -4691,7 -4690,7 +4690,7 @@@ } print ""; &Header::closebox(); - &Header::openbox('100%', 'LEFT', "$Lang::tr{'certificate authorities'}:"); + &Header::openbox('100%', 'LEFT', "$Lang::tr{'certificate authorities'}"); print < @@@ -4826,7 -4825,7 +4825,7 @@@ print < - +
$Lang::tr{'ca name'}:


END @@@ -4863,7 -4862,6 +4862,7 @@@ EN ; my $id = 0; my $gif; + my $col1=""; foreach my $key (sort { ncmp ($confighash{$a}[1],$confighash{$b}[1]) } keys %confighash) { if ($confighash{$key}[0] eq 'on') { $gif = 'on.gif'; } else { $gif = 'off.gif'; } if ($id % 2) { @@@ -4887,18 -4885,17 +4886,18 @@@ if ($confighash{$key}[32] eq "" && $confighash{$key}[3] eq 'host' ){$confighash{$key}[32]="dynamic";} print "$confighash{$key}[32]"; print "$confighash{$key}[25]"; - - my $active = "
$Lang::tr{'capsclosed'}
"; + $col1="bgcolor='${Header::colourred}'"; + my $active = "$Lang::tr{'capsclosed'}"; if ($confighash{$key}[0] eq 'off') { - $active = "
$Lang::tr{'capsclosed'}
"; + $col1="bgcolor='${Header::colourblue}'"; + $active = "$Lang::tr{'capsclosed'}"; } else { ### # m.a.d net2net -### - +### + if ($confighash{$key}[3] eq 'net') { if (-e "/var/run/$confighash{$key}[1]n2n.pid") { @@@ -4922,39 -4919,37 +4921,39 @@@ #EXITING -- A graceful exit is in progress. #### - if ( $tustate[1] eq 'CONNECTED') { - $active = "
$Lang::tr{'capsopen'}
"; - } else { - $active = "
$tustate[1]
"; + if ( $tustate[1] eq 'CONNECTED') { + $col1="bgcolor='${Header::colourgreen}'"; + $active = "$Lang::tr{'capsopen'}"; + }else { + $col1="bgcolor='${Header::colourred}'"; + $active = "$tustate[1]"; + } } - } } - } else { - - my $cn; - my @match = (); - foreach my $line (@status) { - chomp($line); - if ( $line =~ /^(.+),(\d+\.\d+\.\d+\.\d+\:\d+),(\d+),(\d+),(.+)/) { - @match = split(m/^(.+),(\d+\.\d+\.\d+\.\d+\:\d+),(\d+),(\d+),(.+)/, $line); - if ($match[1] ne "Common Name") { - $cn = $match[1]; - } - $cn =~ s/[_]/ /g; - if ($cn eq "$confighash{$key}[2]") { - $active = "
$Lang::tr{'capsopen'}
"; - } - } - + }else { + + my $cn; + my @match = (); + foreach my $line (@status) { + chomp($line); + if ( $line =~ /^(.+),(\d+\.\d+\.\d+\.\d+\:\d+),(\d+),(\d+),(.+)/) { + @match = split(m/^(.+),(\d+\.\d+\.\d+\.\d+\:\d+),(\d+),(\d+),(.+)/, $line); + if ($match[1] ne "Common Name") { + $cn = $match[1]; + } + $cn =~ s/[_]/ /g; + if ($cn eq "$confighash{$key}[2]") { + $col1="bgcolor='${Header::colourgreen}'"; + $active = "$Lang::tr{'capsopen'}"; + } + } + } } } -} print <$active + $active
@@@ -5041,7 -5036,7 +5040,7 @@@ EN ?RELOAD $Lang::tr{'dl client arch'} -
+
END ; }