diff --git a/html/cgi-bin/aliases.cgi b/html/cgi-bin/aliases.cgi index 8d6b19d4b0..09f6ea370d 100644 --- a/html/cgi-bin/aliases.cgi +++ b/html/cgi-bin/aliases.cgi @@ -241,16 +241,16 @@ my %checked =(); # Checkbox manipulations if ($errormessage) { &Header::openbox('100%', 'left', $Lang::tr{'error messages'}); - print "$errormessage "; + print "$errormessage "; &Header::closebox(); } unless (( $netsettings{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/ ) && ($netsettings{'RED_TYPE'} eq 'STATIC')) { &Header::openbox('100%', 'left', $Lang::tr{'capswarning'}); print < + - +
$Lang::tr{'aliases not active'}$Lang::tr{'aliases not active'}
END @@ -275,23 +275,22 @@ if ($settings{'KEY1'} ne '') { print < - +
- + - + - +
$Lang::tr{'name'}: *$Lang::tr{'name'}: * $Lang::tr{'alias ip'}: $Lang::tr{'alias ip'}:  $Lang::tr{'enabled'} $Lang::tr{'enabled'} 


- +
- - - + +
* $Lang::tr{'this field may be blank'}* $Lang::tr{'this field may be blank'}
@@ -320,11 +319,11 @@ if ($netsettings{'SORT_ALIASES'} eq 'NAMERev') { # &Header::openbox('100%', 'left', $Lang::tr{'current aliases'}); print < + - - - + + + END ; @@ -354,21 +353,19 @@ foreach my $line (@current) { #Colorize each line if ($settings{'KEY1'} eq $key) { - print ""; - $col="bgcolor='${Header::colouryellow}'"; + $col="background-color:${Header::colouryellow};"; } elsif ($key % 2) { - print ""; - $col="bgcolor='${Header::table2colour}'"; + $col="background-color:${Header::table2colour};"; } else { - print ""; - $col="bgcolor='${Header::table1colour}'"; + $col="background-color:${Header::table1colour};"; } + print ""; print <$temp[2] - + + - - - -
$Lang::tr{'name'} $sortarrow1$Lang::tr{'alias ip'} $sortarrow2$Lang::tr{'action'}$Lang::tr{'name'} $sortarrow1$Lang::tr{'alias ip'} $sortarrow2$Lang::tr{'action'}
$temp[0]$temp[2]$temp[0] +
@@ -376,7 +373,7 @@ foreach my $line (@current) {
+
@@ -384,7 +381,7 @@ foreach my $line (@current) {
+
@@ -514,3 +511,4 @@ sub BuildConfiguration { # Restart service associated with this system '/usr/local/bin/setaliases'; } + diff --git a/html/cgi-bin/connections.cgi b/html/cgi-bin/connections.cgi index d566cf7ebb..c7220f62d1 100644 --- a/html/cgi-bin/connections.cgi +++ b/html/cgi-bin/connections.cgi @@ -282,34 +282,34 @@ if (-e "${General::swroot}/ovpn/n2nconf") { # Print legend. print < + - - - - - - - - -
- $Lang::tr{'legend'} : + + $Lang::tr{'legend'} : - $Lang::tr{'lan'} + + $Lang::tr{'lan'} - $Lang::tr{'internet'} + + $Lang::tr{'internet'} - $Lang::tr{'dmz'} + + $Lang::tr{'dmz'} - $Lang::tr{'wireless'} + + $Lang::tr{'wireless'} - IPFire + + IPFire - $Lang::tr{'vpn'} + + $Lang::tr{'vpn'} - $Lang::tr{'OpenVPN'} + + $Lang::tr{'OpenVPN'} - Multicast + + Multicast
@@ -345,60 +345,60 @@ END # Print table header. print < -
- - + + + - - - - - - - + - - - - - @@ -523,17 +523,17 @@ foreach my $line (@conntrack) { my $sip_extra; if ($sip ne $sip_ret) { - $sip_extra = "> "; + $sip_extra = "> "; $sip_extra .= ""; - $sip_extra .= " $sip_ret"; + $sip_extra .= " $sip_ret"; $sip_extra .= ""; } my $dip_extra; if ($dip ne $dip_ret) { - $dip_extra = "> "; + $dip_extra = "> "; $dip_extra .= ""; - $dip_extra .= " $dip_ret"; + $dip_extra .= " $dip_ret"; $dip_extra .= ""; } @@ -545,9 +545,9 @@ foreach my $line (@conntrack) { $sserv_ret = uc(getservbyport($sport_ret, lc($l4proto))); } - $sport_extra = "> "; + $sport_extra = "> "; $sport_extra .= ""; - $sport_extra .= " $sport_ret"; + $sport_extra .= " $sport_ret"; $sport_extra .= ""; } @@ -558,44 +558,44 @@ foreach my $line (@conntrack) { $dserv_ret = uc(getservbyport($dport_ret, lc($l4proto))); } - $dport_extra = "> "; + $dport_extra = "> "; $dport_extra .= ""; - $dport_extra .= " $dport_ret"; + $dport_extra .= " $dport_ret"; $dport_extra .= ""; } print < - - + - - - - - - + + END } diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi index ca98e7211f..f22964b020 100644 --- a/html/cgi-bin/index.cgi +++ b/html/cgi-bin/index.cgi @@ -2,7 +2,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007-2012 IPFire Team # +# Copyright (C) 2007-2014 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -166,18 +166,22 @@ if ( ( $pppsettings{'VALID'} eq 'yes' && $modemsettings{'VALID'} eq 'yes' ) || ( print < -
+ + - - + + +          - - + + - - + + +        - - + + - - + + +      - - + + - - + + + - - + + +
+
$Lang::tr{'protocol'} + $Lang::tr{'source ip and port'} + $Lang::tr{'dest ip and port'} + $Lang::tr{'download'} /
$Lang::tr{'upload'}
+ $Lang::tr{'connection'}
$Lang::tr{'status'}
+ $Lang::tr{'expires'}
($Lang::tr{'seconds'})
$l4proto + $l4proto - $sip + $sip $sip_extra + - $sport + $sport $sport_extra + - $dip + $dip $dip_extra + - $dport + $dport $dport_extra + $bytes_in / $bytes_out $state$ttl$state$ttl
- - - - - - +
$Lang::tr{'network'}$Lang::tr{'ip address'}$Lang::tr{'status'}
$Lang::tr{'internet'}
$ipaddr $connstate
+ + + + + + + + + + END my $HOSTNAME = (gethostbyaddr(pack("C4", split(/\./, $ipaddr)), 2))[0]; if ( "$HOSTNAME" ne "" ) { print < + END } @@ -187,7 +191,7 @@ END chomp($GATEWAY); close TMP; print < + END } @@ -209,99 +213,131 @@ END - - +
$Lang::tr{'network'}$Lang::tr{'ip address'}$Lang::tr{'status'}
$Lang::tr{'internet'}
$ipaddr $connstate
$Lang::tr{'hostname'}:$HOSTNAME
$Lang::tr{'hostname'}:$HOSTNAME$Lang::tr{'gateway'}:$GATEWAY
$Lang::tr{'gateway'}:$GATEWAY
$Lang::tr{'dns servers'}: + $dns_servers_str
END #Dial profiles if ( $netsettings{'RED_TYPE'} ne "STATIC" && $netsettings{'RED_TYPE'} ne "DHCP" ){ -print `/usr/local/bin/dialctrl.pl show`; -print < - + # The dialctrl.pl script outputs html + print `/usr/local/bin/dialctrl.pl show`; + if ( ( $pppsettings{'VALID'} eq 'yes' ) || ( $netsettings{'CONFIG_TYPE'} =~ /^(1|2|3|4)$/ && $netsettings{'RED_TYPE'} =~ /^(DHCP|STATIC)$/ ) ) { + print < +
+ + +
$Lang::tr{'profile'}: - - - - -
- -
-
- -
-
+ + + +
+ + + + + +
+
+ +
+
+
+ +
+
+
END } else { - print "$Lang::tr{'profile has errors'}\n \n"; + print "
$Lang::tr{'profile has errors'}
"; } - print"
"; } - if ( $netsettings{'GREEN_DEV'} ) { + + +print < + + + + + + +END + +if ( $netsettings{'GREEN_DEV'} ) { my $sub=&General::iporsubtocidr($netsettings{'GREEN_NETMASK'}); print < -
$Lang::tr{'network'}$Lang::tr{'ip address'}$Lang::tr{'status'}
- - - - - + + '; + print ''; } - if ( $netsettings{'BLUE_DEV'} ) { +if ( $netsettings{'BLUE_DEV'} ) { my $sub=&General::iporsubtocidr($netsettings{'BLUE_NETMASK'}); print < + + '; + print ''; } - if ( $netsettings{'ORANGE_DEV'} ) { +if ( $netsettings{'ORANGE_DEV'} ) { my $sub=&General::iporsubtocidr($netsettings{'ORANGE_NETMASK'}); print < + + + + END } #check if IPSEC is running if ( $vpnsettings{'ENABLED'} eq 'on' || $vpnsettings{'ENABLED_BLUE'} eq 'on' ) { my $ipsecip = $vpnsettings{'VPN_IP'}; print< + + + + END } @@ -317,14 +353,15 @@ if (($confighash{'ENABLED'} eq "on") || $ovpnip="$ovpnip/$sub"; print < - - + + END } -print"
$Lang::tr{'network'}$Lang::tr{'ip address'}$Lang::tr{'status'}
$Lang::tr{'lan'} - $netsettings{'GREEN_ADDRESS'}/$sub - + + $Lang::tr{'lan'} + $netsettings{'GREEN_ADDRESS'}/$sub END if ( $proxysettings{'ENABLE'} eq 'on' ) { print $Lang::tr{'advproxy on'}; if ( $proxysettings{'TRANSPARENT'} eq 'on' ) { print " (transparent)"; } } else { print $Lang::tr{'advproxy off'}; } + print '
$Lang::tr{'wireless'}
-
$netsettings{'BLUE_ADDRESS'}/$sub - +
+ $Lang::tr{'wireless'} + $netsettings{'BLUE_ADDRESS'}/$sub + END if ( $proxysettings{'ENABLE_BLUE'} eq 'on' ) { print $Lang::tr{'advproxy on'}; if ( $proxysettings{'TRANSPARENT_BLUE'} eq 'on' ) { print " (transparent)"; } } else { print $Lang::tr{'advproxy off'}; } + print '
$Lang::tr{'dmz'}
-
$netsettings{'ORANGE_ADDRESS'}/$sub - Online +
+ $Lang::tr{'dmz'} + $netsettings{'ORANGE_ADDRESS'}/$subOnline
$Lang::tr{'ipsec'}
-
$ipsecip - Online +
+ $Lang::tr{'ipsec'} + $ipsecipOnline
- OpenVPN
+
+ OpenVPN $ovpnip - Online + $ovpnipOnline
"; +print""; &Header::closebox(); #Check if there are any vpns configured (ipsec and openvpn) @@ -348,7 +385,8 @@ foreach my $dkey (sort { ncmp($ovpnconfig{$a}[1],$ovpnconfig{$b}[1])} keys %ovpn if ($showbox){ # Start of Box wich contains all vpn connections &Header::openbox('100%', 'center', $Lang::tr{'vpn'}); -#show ipsec connectiontable + + #show ipsec connectiontable if ( $showipsec ) { my $ipsecip = $vpnsettings{'VPN_IP'}; my @status = `/usr/local/bin/ipsecctrl I`; @@ -358,12 +396,11 @@ if ($showbox){ my $col=""; my $count=0; print < - +
- - - + + + END foreach my $key (sort { uc($vpnconfig{$a}[1]) cmp uc($vpnconfig{$b}[1]) } keys %vpnconfig) { @@ -373,43 +410,43 @@ END $vpnsub=&General::iporsubtocidr($vpnsub); $vpnip="$vpnip/$vpnsub"; if ($count % 2){ - $col="bgcolor='$color{'color22'}'"; + $col = $color{'color22'}; }else{ - $col="bgcolor='$color{'color20'}'"; - } - if ($id % 2) { - print ""; - } else { - print ""; + $col = $color{'color20'}; } - my $active = ""; + print ""; + print ""; + print ""; + + my $activecolor = $Header::colourred; + my $activestatus = $Lang::tr{'capsclosed'}; if ($vpnconfig{$key}[0] eq 'off') { - $active = ""; + $activecolor = $Header::colourblue; + $activestatus = $Lang::tr{'capsclosed'}; } else { foreach my $line (@status) { if (($line =~ /\"$vpnconfig{$key}[1]\".*IPsec SA established/) || ($line =~/$vpnconfig{$key}[1]\{.*INSTALLED/ )){ - $active = ""; + $activecolor = $Header::colourgreen; + $activestatus = $Lang::tr{'capsopen'}; } } } - print "$active"; + print ""; + print ""; } } - print "
$Lang::tr{'ipsec network'}$Lang::tr{'ip address'}$Lang::tr{'status'}$Lang::tr{'ipsec network'}$Lang::tr{'ip address'}$Lang::tr{'status'}
$vpnconfig{$key}[1]$vpnip
$vpnconfig{$key}[1]$vpnip$Lang::tr{'capsclosed'}
$vpnconfig{$key}[1]$vpnip$Lang::tr{'capsclosed'}$Lang::tr{'capsopen'}$activestatus
"; + print ""; } -### -# Check if there is any OpenVPN connection configured. -### - + # Check if there is any OpenVPN connection configured. if ( $showovpn ){ print < - +
+
- - - + + + END # Check if the OpenVPN server for Road Warrior Connections is running and display status information. @@ -436,9 +473,9 @@ END $display = $tustate[1]; } if ($count %2){ - $col="bgcolor='$color{'color22'}'"; + $col = $color{'color22'}; }else{ - $col="bgcolor='$color{'color20'}'"; + $col = $color{'color20'}; } $active='off'; #make cidr from ip @@ -447,16 +484,16 @@ END my $vpnip="$vpnip/$vpnsub"; print < - - - + + + END } } } if ($active ne 'off'){ - print ""; + print ""; } print"
$Lang::tr{'openvpn network'}$Lang::tr{'ip address'}$Lang::tr{'status'}$Lang::tr{'openvpn network'}$Lang::tr{'ip address'}$Lang::tr{'status'}$ovpnconfig{$dkey}[1]$vpnip$display$ovpnconfig{$dkey}[1]$vpnip$display
$Lang::tr{'ovpn no connections'}
$Lang::tr{'ovpn no connections'}
"; } @@ -476,7 +513,7 @@ $free[2] =~ m/(\d+)/; my $used = $1; my $pct = int 100 * ($mem - $used) / $mem; if ($used / $mem > 90) { - $warnmessage .= "
  • $Lang::tr{'high memory usage'}: $pct% !
  • \n"; + $warnmessage .= "
  • $Lang::tr{'high memory usage'}: $pct% !
  • "; } # Diskspace usage warning @@ -491,7 +528,7 @@ foreach my $line (@df) { if ($1<5) { # available:plain value in MB, and not %used as 10% is too much to waste on small disk # and root size should not vary during time - $warnmessage .= "
  • $Lang::tr{'filesystem full'}: $temp[0] $Lang::tr{'free'}=$1M !
  • \n"; + $warnmessage .= "
  • $Lang::tr{'filesystem full'}: $temp[0] $Lang::tr{'free'}=$1M !
  • "; } } else { @@ -500,7 +537,7 @@ foreach my $line (@df) { if ($1>90) { @temp = split(/ /,$line); $temp2=int(100-$1); - $warnmessage .= "
  • $Lang::tr{'filesystem full'}: $temp[0] $Lang::tr{'free'}=$temp2% !
  • \n"; + $warnmessage .= "
  • $Lang::tr{'filesystem full'}: $temp[0] $Lang::tr{'free'}=$temp2% !
  • "; } } } @@ -512,7 +549,7 @@ foreach my $file (@files) { my $disk=`echo $file | cut -d"-" -f2`; chomp ($disk); if (`/bin/grep "SAVE ALL DATA" $file`) { - $warnmessage .= "
  • $Lang::tr{'smartwarn1'} /dev/$disk $Lang::tr{'smartwarn2'} !
  • \n\n"; + $warnmessage .= "
  • $Lang::tr{'smartwarn1'} /dev/$disk $Lang::tr{'smartwarn2'} !
  • "; } } @@ -520,24 +557,25 @@ foreach my $file (@files) { my @files = `mount | grep " reiser4 (" 2>/dev/null`; foreach my $disk (@files) { chomp ($disk); - $warnmessage .= "
  • $disk - $Lang::tr{'deprecated fs warn'}
  • \n\n"; + $warnmessage .= "
  • $disk - $Lang::tr{'deprecated fs warn'}
  • "; } if ($warnmessage) { &Header::openbox('100%','center', ); - print ""; + print "
    "; print ""; - print "
    $Lang::tr{'fwhost hint'}
    $warnmessage
    "; + print "$warnmessage"; + print ""; &Header::closebox(); } -print "
    "; &Pakfire::dblist("upgrade", "notice"); if ( -e "/var/run/need_reboot" ) { - print "

    $Lang::tr{'needreboot'}!"; + print "
    "; + print "

    $Lang::tr{'needreboot'}!"; + print "
    "; } -print "
    "; - &Header::closebigbox(); &Header::closepage(); + diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl index f354a45bfc..86b1b75ba2 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -129,7 +129,7 @@ sub openpage { -