From c85ec3b463150306517de99060e2b4e0e6eba1b1 Mon Sep 17 00:00:00 2001 From: maniacikarus Date: Thu, 14 Jun 2007 20:02:21 +0000 Subject: [PATCH] Nochmal einige CGI Aenderungen git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@630 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 --- html/cgi-bin/index.cgi | 43 +++++++++++++++++----------------- html/cgi-bin/traffics.cgi | 2 +- src/initscripts/init.d/network | 14 +++++------ 3 files changed, 29 insertions(+), 30 deletions(-) diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi index c8b664bea..f53536b09 100644 --- a/html/cgi-bin/index.cgi +++ b/html/cgi-bin/index.cgi @@ -23,7 +23,7 @@ my %modemsettings=(); my %netsettings=(); my %ddnssettings=(); my $warnmessage = ''; -my $refresh = ""; +my $refresh = ""; my $ipaddr=''; &Header::showhttpheaders(); @@ -169,9 +169,10 @@ print <IP $Lang::tr{'status'} $Lang::tr{'internet'}:
- $ipaddr - $connstate + $ipaddr + $connstate END +if ( $netsettings{'RED_TYPE'} ne "STATIC" && $netsettings{'RED_TYPE'} ne "DHCP" ){ print `/usr/local/bin/dialctrl.pl show`; print < @@ -205,11 +206,11 @@ END } else { print "$Lang::tr{'profile has errors'}\n \n"; } - +} my $HOSTNAME = (gethostbyaddr(pack("C4", split(/\./, $ipaddr)), 2))[0]; if ( "$HOSTNAME" ne "" ) { print <Hostname:$HOSTNAME  + Hostname:$HOSTNAME  END } @@ -217,7 +218,7 @@ END my $GATEWAY = `cat /var/ipfire/red/remote-ipaddress`; chomp($GATEWAY); print <Gateway:$GATEWAY  + Gateway:$GATEWAY  END } @@ -227,11 +228,11 @@ END chomp($DNS1); if ( $DNS1 ) { print <DNS-Server:$DNS1 + DNS-Server:$DNS1 END } if ( $DNS2 ) { print <$DNS2 + $DNS2 END } else { print <  @@ -240,8 +241,8 @@ END if ( $netsettings{'GREEN_DEV'} ) { print <$Lang::tr{'lan'}: - $netsettings{'GREEN_ADDRESS'} - + $netsettings{'GREEN_ADDRESS'} + END if ( `cat /var/ipfire/proxy/advanced/settings | grep ^ENABLE=on` ) { print "Proxy an"; @@ -250,8 +251,8 @@ END } if ( $netsettings{'BLUE_DEV'} ) { print <$Lang::tr{'wireless'}:
- $netsettings{'BLUE_ADDRESS'} - + $netsettings{'BLUE_ADDRESS'} + END if ( `cat /var/ipfire/proxy/advanced/settings | grep ^ENABLE_BLUE=on` ) { print "Proxy an"; @@ -260,8 +261,8 @@ END } if ( $netsettings{'ORANGE_DEV'} ) { print <$Lang::tr{'dmz'}:
- $netsettings{'ORANGE_ADDRESS'} - Online + $netsettings{'ORANGE_ADDRESS'} + Online END } if ( `cat /var/ipfire/vpn/settings | grep ^ENABLED=on` || @@ -272,8 +273,8 @@ END &General::readhasharray("${General::swroot}/vpn/config", \%confighash); print <$Lang::tr{'vpn'}:
- $ipsecip - Online + $ipsecip + Online END my $id = 0; my $gif; @@ -281,11 +282,11 @@ END if ($confighash{$key}[0] eq 'on') { $gif = 'on.gif'; } else { $gif = 'off.gif'; } if ($id % 2) { - print "\n"; + print "\n"; } else { - print "\n"; + print "\n"; } - print " $confighash{$key}[1] / " . $Lang::tr{"$confighash{$key}[3]"} . " (" . $Lang::tr{"$confighash{$key}[4]"} . ")"; + print " $confighash{$key}[1] / " . $Lang::tr{"$confighash{$key}[3]"} . " (" . $Lang::tr{"$confighash{$key}[4]"} . ")"; my $active = "
$Lang::tr{'capsclosed'}
"; if ($confighash{$key}[0] eq 'off') { $active = "
$Lang::tr{'capsclosed'}
"; @@ -305,8 +306,8 @@ END my $ovpnip = `cat /var/ipfire/ovpn/settings | grep ^DOVPN_SUBNET= | cut -c 14- | sed -e 's\/\\/255.255.255.0\/\/'`; print <OpenVPN:
- $ovpnip - Online + $ovpnip + Online END } diff --git a/html/cgi-bin/traffics.cgi b/html/cgi-bin/traffics.cgi index 26e4a134b..f3c9d5ab4 100644 --- a/html/cgi-bin/traffics.cgi +++ b/html/cgi-bin/traffics.cgi @@ -334,7 +334,7 @@ $total_orange_out=sprintf("%.2f", ($total_orange_out/1048576)); $total_red_in=sprintf("%.2f", ($total_red_in/1048576)); $total_red_out=sprintf("%.2f", ($total_red_out/1048576)); -if ($lines % 2) {print ""; } +if ($lines % 2) {print ""; } else {print ""; } print <