diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl index bf92507fd..9473465ba 100644 --- a/config/cfgroot/header.pl +++ b/config/cfgroot/header.pl @@ -367,16 +367,16 @@ sub PrintActualLeases { &openbox('100%', 'left', $tr{'current dynamic leases'}); print < + - - - - - + + + + + END - ; +; open(LEASES,"/var/state/dhcp/dhcpd.leases") or die "Can't open dhcpd.leases"; while ($line = ) { @@ -418,24 +418,27 @@ END close(LEASES); my $id = 0; + my $col=""; foreach my $key (sort leasesort keys %entries) { print "
\n"; my $hostname = &cleanhtml($entries{$key}->{HOSTNAME},"y"); if ($id % 2) { - print "
"; + print ""; + $col="bgcolor='$table1colour'"; } else { - print ""; + print ""; + $col="bgcolor='$table2colour'"; } print <$entries{$key}->{IPADDR} - - - + + + + END - ; +; $id++; } diff --git a/html/cgi-bin/aliases.cgi b/html/cgi-bin/aliases.cgi index 9043962c2..b87afdd93 100644 --- a/html/cgi-bin/aliases.cgi +++ b/html/cgi-bin/aliases.cgi @@ -320,11 +320,11 @@ if ($netsettings{'SORT_ALIASES'} eq 'NAMERev') { # &Header::openbox('100%', 'left', $Lang::tr{'current aliases'}); print < +
$tr{'ip address'}$tr{'mac address'}$tr{'hostname'}$tr{'lease expires'} (local time d/m/y)Add to fix leases$tr{'ip address'}$tr{'mac address'}$tr{'hostname'}$tr{'lease expires'} (local time d/m/y)Add to fix leases
$entries{$key}->{ETHER} $hostname +$entries{$key}->{IPADDR}$entries{$key}->{ETHER} $hostname END - ; +; ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $dst) = localtime ($entries{$key}->{ENDTIME}); $enddate = sprintf ("%02d/%02d/%d %02d:%02d:%02d",$mday,$mon+1,$year+1900,$hour,$min,$sec); @@ -446,10 +449,10 @@ END print "$enddate"; } print < -
+
- - - + + + END ; @@ -336,6 +336,7 @@ END # my $key = 0; +my $col=""; foreach my $line (@current) { chomp($line); my @temp = split(/\,/,$line); @@ -353,18 +354,21 @@ foreach my $line (@current) { #Colorize each line if ($settings{'KEY1'} eq $key) { - print ""; + print ""; + $col="bgcolor='${Header::colouryellow}'"; } elsif ($key % 2) { - print ""; + print ""; + $col="bgcolor='${Header::table2colour}'"; } else { - print ""; + print ""; + $col="bgcolor='${Header::table1colour}'"; } 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] +
@@ -372,7 +376,7 @@ foreach my $line (@current) {
+
@@ -380,7 +384,7 @@ foreach my $line (@current) {
+
diff --git a/html/cgi-bin/connscheduler.cgi b/html/cgi-bin/connscheduler.cgi index b257adb2e..8f13b566a 100644 --- a/html/cgi-bin/connscheduler.cgi +++ b/html/cgi-bin/connscheduler.cgi @@ -399,67 +399,67 @@ END &Header::openbox('100%', 'left', $Lang::tr{'ConnSched scheduled actions'}); print < + - - - - + + + + END ; - +my $col=""; for my $id ( 0 .. $#CONNSCHED::config ) { - my $trcolor; - if ( ($cgiparams{'ACTION'} eq 'edit') && ($id == $cgiparams{'ID'}) ) { - $trcolor = ""; + print ""; + $col="bgcolor='${Header::colouryellow}'"; } elsif ( $id % 2 ) { - $trcolor = ""; + print ""; + $col="bgcolor='$color{'color20'}'"; } else { - $trcolor = ""; + print ""; + $col="bgcolor='$color{'color22'}'"; } print <$CONNSCHED::config[$id]{'TIME'} - - - + + + - - - - -$trcolor - - + + + END ; diff --git a/html/cgi-bin/country.cgi b/html/cgi-bin/country.cgi index 474d60cd0..476a680f4 100644 --- a/html/cgi-bin/country.cgi +++ b/html/cgi-bin/country.cgi @@ -40,14 +40,14 @@ require "${General::swroot}/header.pl"; &Header::openbigbox('100%', 'LEFT'); &Header::openbox('100%', 'LEFT', 'Flags & Country Codes:'); -print "
$Lang::tr{'time'} $Lang::tr{'remark'}$Lang::tr{'action'}$Lang::tr{'time'} $Lang::tr{'remark'}$Lang::tr{'action'}
$Lang::tr{"ConnSched $CONNSCHED::config[$id]{'ACTION'}"} $CONNSCHED::config[$id]{'PROFILENR'}$CONNSCHED::config[$id]{'COMMENT'} +$CONNSCHED::config[$id]{'TIME'}$Lang::tr{"ConnSched $CONNSCHED::config[$id]{'ACTION'}"} $CONNSCHED::config[$id]{'PROFILENR'}$CONNSCHED::config[$id]{'COMMENT'} +
+
+
+
@@ -467,9 +467,9 @@ $trcolor
 $CONNSCHED::config[$id]{'DAYS'}$CONNSCHED::config[$id]{'WEEKDAYS_PR'} 
 $CONNSCHED::config[$id]{'DAYS'}$CONNSCHED::config[$id]{'WEEKDAYS_PR'} 
"; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; +print "
FlagCodeCountry FlagCodeCountry
"; +print ""; +print ""; +print ""; +print ""; +print ""; +print ""; +print ""; @flaglist = <$flagdir/*>; @@ -57,35 +57,36 @@ foreach (@flaglist) { if (!-d) { push(@flaglistfiles,substr($_,rindex($_,"/")+1)); } } - +my $col=""; foreach $flag (@flaglistfiles) { $lines++; - - my $flagcode = uc(substr($flag, 0, 2)); - my $fcode = lc($flagcode); + + my $flagcode = uc(substr($flag, 0, 2)); + my $fcode = lc($flagcode); my $country = Locale::Country::code2country($fcode); - if($fcode eq 'eu') { $country = 'Europe'; } - if($fcode eq 'tp') { $country = 'East Timor'; } - if($fcode eq 'yu') { $country = 'Yugoslavia'; } - if ($lines % 2) { - print ""; - print "\n"; - } - else { + if($fcode eq 'eu') { $country = 'Europe'; } + if($fcode eq 'tp') { $country = 'East Timor'; } + if($fcode eq 'yu') { $country = 'Yugoslavia'; } + if ($lines % 2) { + print ""; + print "\n"; +} +else { $lines2++; if($lines2 % 2) { - print ""; + print ""; + $col="bgcolor='${Header::table2colour}'"; } else { - print ""; + print ""; + $col="bgcolor='${Header::table1colour}'"; + } + print ""; + print ""; + print ""; } - print ""; - print ""; - #print ""; - print ""; - } } diff --git a/html/cgi-bin/ddns.cgi b/html/cgi-bin/ddns.cgi index ae4de6cd5..fc9e15caa 100644 --- a/html/cgi-bin/ddns.cgi +++ b/html/cgi-bin/ddns.cgi @@ -256,7 +256,6 @@ $checked{'SERVICE'}{'selfhost.de'} = ''; $checked{'SERVICE'}{'strato.com'} = ''; $checked{'SERVICE'}{'tzo.com'} = ''; $checked{'SERVICE'}{'zoneedit.com'} = ''; -$checked{'SERVICE'}{'udmedia.de'} = ''; $checked{'SERVICE'}{$settings{'SERVICE'}} = "selected='selected'"; $checked{'BEHINDROUTER'}{'RED_IP'} = ''; @@ -352,7 +351,6 @@ print <selfhost.de - @@ -400,14 +398,14 @@ END # &Header::openbox('100%', 'left', $Lang::tr{'current hosts'}); print < +
FlagCodeCountry FlagCodeCountry
$flagcode"; - print "$flagcode$country
$flagcode"; + print "$flagcode$country
$flagcode"; + print "$flagcode$country $flagcode"; - print "$flagcode$country* $Lang::tr{'hostname'}: *
- - - - - - + + + + + + END ; @@ -430,7 +428,7 @@ foreach my $line (@current) { $descproxy = $Lang::tr{'click to disable'}; } else { $gifproxy = 'off.gif'; - $descproxy = $Lang::tr{'click to enable'}; + $descproxy = $Lang::tr{'click to enable'}; } my $gifwildcard=''; @@ -454,26 +452,30 @@ foreach my $line (@current) { $gif = 'off.gif'; $gdesc = $Lang::tr{'click to enable'}; } - + + my $col=""; #Colorize each line if ($settings{'KEY1'} eq $key) { - print ""; + print ""; + $col="bgcolor='${Header::colouryellow}'"; } elsif ($key % 2) { - print ""; + print ""; + $col="bgcolor='$color{'color20'}'"; } else { - print ""; + print ""; + $col="bgcolor='$color{'color22'}'"; } - + #if a field is empty, replace it with a '---' to see colorized info! $temp[1] = '---' if (!$temp[1]); $temp[2] = '---' if (!$temp[2]); print <$temp[0] - - + + + - - - - -
$Lang::tr{'service'}$Lang::tr{'hostname'}$Lang::tr{'domain'}$Lang::tr{'proxy'}$Lang::tr{'wildcards'}$Lang::tr{'action'}$Lang::tr{'service'}$Lang::tr{'hostname'}$Lang::tr{'domain'}$Lang::tr{'proxy'}$Lang::tr{'wildcards'}$Lang::tr{'action'}
$sync$temp[1]$sync$temp[2]$temp[0]$sync$temp[1]$sync$temp[2] +
@@ -482,7 +484,7 @@ foreach my $line (@current) {
+
@@ -491,7 +493,7 @@ foreach my $line (@current) {
+
@@ -500,7 +502,7 @@ foreach my $line (@current) {
+
@@ -508,7 +510,7 @@ foreach my $line (@current) {
+
diff --git a/html/cgi-bin/dhcp.cgi b/html/cgi-bin/dhcp.cgi index cde6065f5..9157cac01 100644 --- a/html/cgi-bin/dhcp.cgi +++ b/html/cgi-bin/dhcp.cgi @@ -864,15 +864,15 @@ END print < - +
- - - - - - - + + + + + + + END ; @@ -904,6 +904,7 @@ foreach my $line (@current2) { } $key = 0; +my $col=""; foreach my $line (@current2) { my $gif = ''; my $gdesc = ''; @@ -919,11 +920,14 @@ foreach my $line (@current2) { } if ($dhcpsettings{'KEY2'} eq $key) { - print ""; + print ""; + $col="bgcolor='${Header::colouryellow}'"; } elsif ($key % 2) { - print ""; + print ""; + $col="bgcolor='$color{'color20'}'"; } else { - print ""; + print ""; + $col="bgcolor='$color{'color22'}'"; } my $TAG0 = ''; my $TAG1 = ''; @@ -943,14 +947,14 @@ foreach my $line (@current2) { } print <$TAG2$temp[0]$TAG3 - - - - - + + + + + + - - -
$Lang::tr{'mac address'}$Lang::tr{'ip address'}$Lang::tr{'remark'}next-serverfilenameroot path$Lang::tr{'action'}$Lang::tr{'mac address'}$Lang::tr{'ip address'}$Lang::tr{'remark'}next-serverfilenameroot path$Lang::tr{'action'}
$TAG0$temp[1]$TAG1$temp[6] $temp[3] $temp[4] $temp[5] $TAG2$temp[0]$TAG3$TAG0$temp[1]$TAG1$temp[6] $temp[3] $temp[4] $temp[5]  + @@ -958,7 +962,7 @@ foreach my $line (@current2) { +
@@ -966,7 +970,7 @@ foreach my $line (@current2) {
+
diff --git a/html/cgi-bin/dnsforward.cgi b/html/cgi-bin/dnsforward.cgi index 15d430cf1..1439828af 100644 --- a/html/cgi-bin/dnsforward.cgi +++ b/html/cgi-bin/dnsforward.cgi @@ -252,12 +252,12 @@ print "
\n"; # &Header::openbox('100%', 'left', $Lang::tr{'dnsforward entries'}); print < + - - - - + + + + END ; @@ -274,6 +274,7 @@ if($cgiparams{'ACTION'} ne '' or $changed ne 'no') # Re-read entries and highlight selected item for editing. # my $id = 0; +my $col=""; foreach my $line (@current) { $id++; @@ -285,11 +286,14 @@ foreach my $line (@current) my $toggle = ''; if($cgiparams{'ACTION'} eq $Lang::tr{'edit'} && $cgiparams{'ID'} eq $id) { - print "\n"; } + print ""; + $col="bgcolor='${Header::colouryellow}'"; } elsif ($id % 2) { - print "\n"; } + print ""; + $col="bgcolor='$color{'color22'}'"; } else { - print "\n"; } + print ""; + $col="bgcolor='$color{'color20'}'"; } if ($temp[0] eq 'on') { $gif='on.gif'; $toggle='off'; $gdesc=$Lang::tr{'click to disable'};} else { $gif='off.gif'; $toggle='on'; $gdesc=$Lang::tr{'click to enable'}; } @@ -298,10 +302,10 @@ foreach my $line (@current) # Display edit page. # print <$temp[1] - - - + + + - - +
$Lang::tr{'dnsforward zone'}$Lang::tr{'dnsforward forward_server'}$Lang::tr{'remark'}$Lang::tr{'action'}$Lang::tr{'dnsforward zone'}$Lang::tr{'dnsforward forward_server'}$Lang::tr{'remark'}$Lang::tr{'action'}
$temp[2]$temp[3] + $temp[1]$temp[2]$temp[3]
@@ -309,14 +313,14 @@ print <
+
+
diff --git a/html/cgi-bin/firewall.cgi b/html/cgi-bin/firewall.cgi index e7884ca27..c17bfaf8e 100755 --- a/html/cgi-bin/firewall.cgi +++ b/html/cgi-bin/firewall.cgi @@ -2303,7 +2303,7 @@ sub viewtablenew &General::readhasharray("$configccdhost", \%ccdhost); &Header::openbox('100%', 'left', $title); - print ""; + print "
"; if (! -z $config) { my $count=0; diff --git a/html/cgi-bin/fwhosts.cgi b/html/cgi-bin/fwhosts.cgi index ae135ab33..3b46677b8 100755 --- a/html/cgi-bin/fwhosts.cgi +++ b/html/cgi-bin/fwhosts.cgi @@ -1159,7 +1159,7 @@ sub addnet $fwhostsettings{'orgname'}=$fwhostsettings{'HOSTNAME'}; $fwhostsettings{'orgnetremark'}=$fwhostsettings{'NETREMARK'}; print< +
@@ -1168,10 +1168,10 @@ sub addnet END if ($fwhostsettings{'ACTION'} eq 'editnet' || $fwhostsettings{'error'} eq 'on') { - print ""; + print "
$Lang::tr{'name'}:
$Lang::tr{'fwhost netaddress'}:
$Lang::tr{'netmask'}:
"; }else{ - print ""; - } + print ""; + } print "
"; &Header::closebox(); } @@ -1465,26 +1465,30 @@ sub viewtablenet print "
$Lang::tr{'fwhost empty'}"; }else{ print< -
$Lang::tr{'name'}$Lang::tr{'fwhost netaddress'}$Lang::tr{'remark'}$Lang::tr{'used'}
+ END } my $count=0; + my $col=''; foreach my $key (sort {ncmp($a,$b)} keys %customnetwork) { if ($fwhostsettings{'ACTION'} eq 'editnet' && $fwhostsettings{'HOSTNAME'} eq $customnetwork{$key}[0]) { - print" "; + print" "; + $col="bgcolor='${Header::colouryellow}'"; }elsif ($count % 2) { - print" "; + $col="bgcolor='$color{'color20'}'"; + print" ";# bgcolor='$color{'color20'}'>"; }else { - print" "; + $col="bgcolor='$color{'color22'}'"; + print" ";# bgcolor='$color{'color22'}'>"; } my $colnet="$customnetwork{$key}[1]/".&General::subtocidr($customnetwork{$key}[2]); my $netcount=&getnetcount($customnetwork{$key}[0]); - print""; + print""; print< + "; + print""; }else{ - print""; + print""; } $count++; } @@ -1569,23 +1573,30 @@ sub viewtablehost print "
$Lang::tr{'fwhost empty'}"; }else{ print< -
+
$Lang::tr{'name'}$Lang::tr{'fwhost netaddress'}$Lang::tr{'remark'}$Lang::tr{'used'}
$customnetwork{$key}[0]
".&Header::colorize($colnet)."$customnetwork{$key}[3]$netcount x$customnetwork{$key}[0]".&Header::colorize($colnet)."$customnetwork{$key}[3]$netcount x @@ -1494,9 +1498,9 @@ END END if($netcount == '0') { - print"
$Lang::tr{'name'}$Lang::tr{'fwhost ip_mac'}$Lang::tr{'remark'}$Lang::tr{'used'}
+ END } my $count=0; + my $col=''; foreach my $key (sort { ncmp ($customhost{$a}[0],$customhost{$b}[0])} keys %customhost) { if ( ($fwhostsettings{'ACTION'} eq 'edithost' || $fwhostsettings{'error'}) && $fwhostsettings{'HOSTNAME'} eq $customhost{$key}[0]) { - print" "; - }elsif ($count % 2){ print" ";} - else{ print" ";} + print" "; + $col="bgcolor='${Header::colouryellow}'"; + }elsif ($count % 2){ + print" "; + $col="bgcolor='$color{'color20'}'"; + }else{ + $col="bgcolor='$color{'color22'}'"; + print" "; + } my ($ip,$sub)=split(/\//,$customhost{$key}[2]); $customhost{$key}[4]=~s/\s+//g; my $hostcount=0; $hostcount=&gethostcount($customhost{$key}[0]); - print""; + print""; print<
+
"; + print""; }else{ - print""; + print""; } $count++; } @@ -1656,30 +1667,36 @@ sub viewtablegrp print""; } print""; - print"
$Lang::tr{'name'}$Lang::tr{'fwhost ip_mac'}$Lang::tr{'remark'}$Lang::tr{'used'}
$customhost{$key}[0]".&Header::colorize($ip)."$customhost{$key}[3]$hostcount x$customhost{$key}[0]".&Header::colorize($ip)."$customhost{$key}[3]$hostcount x @@ -1595,9 +1606,9 @@ END END if($hostcount == '0') { - print"
"; + print"
Name$Lang::tr{'ip address'}$Lang::tr{'fwhost type'}
"; } - + my $col=''; if ( ($fwhostsettings{'ACTION'} eq 'editgrp' || $fwhostsettings{'update'} ne '') && $fwhostsettings{'grp_name'} eq $customgrp{$key}[0]) { - print" "; + print" "; + $col="bgcolor='${Header::colouryellow}'"; }elsif ($count %2 == 0){ - print""; + print""; + $col="bgcolor='$color{'color22'}'"; }else{ - print""; + print""; + $col="bgcolor='$color{'color20'}'"; } my $ip=&getipforgroup($customgrp{$key}[2],$customgrp{$key}[3]); - if ($ip eq ''){print"";} - print ""; + $col="bgcolor='${Header::colouryellow}'"; + } + print ""; }else{ print "$customgrp{$key}[2]"; } if ($ip eq '' && $customgrp{$key}[2] ne $Lang::tr{'fwhost err emptytable'}){ - print " +
Name$Lang::tr{'ip address'}$Lang::tr{'fwhost type'}
"; + if ($ip eq ''){ + print"
"; if($customgrp{$key}[3] eq 'Standard Network'){ print &get_name($customgrp{$key}[2])."$Lang::tr{'fwhost deleted'}$customgrp{$key}[3]
"; + print "
$Lang::tr{'fwhost deleted'}$customgrp{$key}[3]"; }else{ my ($colip,$colsub) = split("/",$ip); $ip="$colip/".&General::subtocidr($colsub) if ($colsub); - print"".&Header::colorize($ip)."$customgrp{$key}[3]"; + print"".&Header::colorize($ip)."$customgrp{$key}[3]"; } if ($delflag > 1 && $ip ne ''){ print""; @@ -1708,25 +1725,33 @@ sub viewtableservice &General::readhasharray("$fwconfiginp", \%fwinp); &General::readhasharray("$fwconfigout", \%fwout); print< -
$Lang::tr{'fwhost srv_name'}$Lang::tr{'fwhost prot'}$Lang::tr{'fwhost port'}ICMP$Lang::tr{'fwhost used'}
+ END + my $col=''; foreach my $key (sort { ncmp($customservice{$a}[0],$customservice{$b}[0])} keys %customservice) { $count++; if ( ($fwhostsettings{'updatesrv'} eq 'on' || $fwhostsettings{'error'}) && $fwhostsettings{'SRV_NAME'} eq $customservice{$key}[0]) { - print" "; - }elsif ($count % 2){ print" ";}else{ print" ";} + print" "; + $col="bgcolor='${Header::colouryellow}'"; + }elsif ($count % 2){ + print" "; + $col="bgcolor='$color{'color22'}'"; + }else{ + print" "; + $col="bgcolor='$color{'color20'}'"; + } print<$customservice{$key}[0] - + "; + print""; }else{ - print""; + print""; } } print"
$Lang::tr{'fwhost srv_name'}$Lang::tr{'fwhost prot'}$Lang::tr{'fwhost port'}ICMP$Lang::tr{'fwhost used'}
$customservice{$key}[2]$customservice{$key}[1] + $customservice{$key}[0]$customservice{$key}[2]$customservice{$key}[1] END #Neuer count $srvcount=&getsrvcount($customservice{$key}[0]); if($customservice{$key}[3] eq 'All ICMP-Types'){print $Lang::tr{'fwdfw all icmp'};} elsif($customservice{$key}[3] ne 'BLANK'){print $customservice{$key}[3];} print<$srvcount x + $srvcount x @@ -1734,9 +1759,9 @@ END END if ($srvcount eq '0') { - print"
"; @@ -1753,6 +1778,7 @@ sub viewtableservicegrp my $protocol; my $delflag; my $grpcount=0; + my $col=''; if (! -z $configsrvgrp){ &Header::openbox('100%', 'left', $Lang::tr{'fwhost cust srvgrp'}); &General::readhasharray("$configsrvgrp", \%customservicegrp); @@ -1792,14 +1818,17 @@ sub viewtableservicegrp print"
"; } print"
"; - print""; + print"
Name$Lang::tr{'port'}$Lang::tr{'fwhost prot'}
"; } if( $fwhostsettings{'SRVGRP_NAME'} eq $customservicegrp{$key}[0]) { - print" "; + print""; + $col="bgcolor='${Header::colouryellow}'"; }elsif ($count %2 == 0){ - print""; + print""; + $col="bgcolor='$color{'color20'}'"; }else{ - print""; + print""; + $col="bgcolor='$color{'color22'}'"; } #Set fields if we use protocols in servicegroups if ($customservicegrp{$key}[2] ne 'TCP' || $customservicegrp{$key}[2] ne 'UDP' || $customservicegrp{$key}[2] ne 'ICMP'){ @@ -1811,7 +1840,7 @@ sub viewtableservicegrp if ($customservicegrp{$key}[2] eq 'IGMP'){$protocol='IGMP';$customservicegrp{$key}[2]="$Lang::tr{'protocol'} IGMP";} if ($customservicegrp{$key}[2] eq 'IPIP'){$protocol='IPIP';$customservicegrp{$key}[2]="$Lang::tr{'protocol'} IPIP";} if ($customservicegrp{$key}[2] eq 'IPV6'){$protocol='IPV6';$customservicegrp{$key}[2]="$Lang::tr{'protocol'} IPv6 encapsulation";} - print ""; + print ""; foreach my $srv (sort keys %customservice){ if ($customservicegrp{$key}[2] eq $customservice{$srv}[0]){ $protocol=$customservice{$srv}[2]; @@ -1819,7 +1848,7 @@ sub viewtableservicegrp last; } } - print"
Name$Lang::tr{'port'}$Lang::tr{'fwhost prot'}
$customservicegrp{$key}[2]$customservicegrp{$key}[2]$port$protocol
"; + print"
$port$protocol"; if ($delflag gt '1'){ print""; } diff --git a/html/cgi-bin/hosts.cgi b/html/cgi-bin/hosts.cgi index 94a48d326..4eeeaf652 100644 --- a/html/cgi-bin/hosts.cgi +++ b/html/cgi-bin/hosts.cgi @@ -283,12 +283,12 @@ END # &Header::openbox('100%', 'left', $Lang::tr{'current hosts'}); print < + - - - - + + + + END ; @@ -296,7 +296,7 @@ END # # Print each line of @current list # - +my $col=""; my $key = 0; foreach my $line (@current) { chomp($line); # remove newline @@ -318,15 +318,17 @@ foreach my $line (@current) { if ($settings{'KEY1'} eq $key) { print ""; } elsif ($key % 2) { - print ""; + print ""; + $col="bgcolor='$color{'color20'}'"; } else { - print ""; + print ""; + $col="bgcolor='$color{'color22'}'"; } print <$temp[1] - - - + + + - -
$Lang::tr{'host ip'}$Lang::tr{'hostname'}$Lang::tr{'domain name'}$Lang::tr{'action'}$Lang::tr{'host ip'}$Lang::tr{'hostname'}$Lang::tr{'domain name'}$Lang::tr{'action'}
$temp[2]$temp[3] +$temp[1]$temp[2]$temp[3] @@ -334,7 +336,7 @@ foreach my $line (@current) { +
@@ -342,7 +344,7 @@ foreach my $line (@current) {
+
diff --git a/html/cgi-bin/logs.cgi/firewalllog.dat b/html/cgi-bin/logs.cgi/firewalllog.dat index 466a3cec7..f5a4e0f8d 100644 --- a/html/cgi-bin/logs.cgi/firewalllog.dat +++ b/html/cgi-bin/logs.cgi/firewalllog.dat @@ -308,16 +308,16 @@ if ($logsettings{'LOGVIEW_REVERSE'} eq 'on') { @log = reverse @log; } if ($lines != 0) { &oldernewer(); } print < + - - - - - - - - + + + + + + + + END ; @@ -353,26 +353,29 @@ foreach $_ (@log) $dstport = "$dstport($servi)";} my @mactemp = split(/:/,$macaddr); $macaddr = "$mactemp[6]:$mactemp[7]:$mactemp[8]:$mactemp[9]:$mactemp[10]:$mactemp[11]"; + my $col=""; if ($lines % 2) { - print "\n"; } + print ""; + $col="bgcolor='$color{'color20'}'"; } else { - print "\n"; } + print ""; + $col="bgcolor='$color{'color22'}'"; } print <$time - - - - - + + + + + + END ; if ( $fcode ne "" ){ - print "";} + print "";} else { - print "";} + print "";} print <$macaddr + END ; diff --git a/html/cgi-bin/logs.cgi/firewalllogip.dat b/html/cgi-bin/logs.cgi/firewalllogip.dat index 3ec3f6df2..2ae4c0d8b 100644 --- a/html/cgi-bin/logs.cgi/firewalllogip.dat +++ b/html/cgi-bin/logs.cgi/firewalllogip.dat @@ -403,13 +403,13 @@ if ($showpie != 2 && $pienumber <= 50 && $pienumber != 0) { } print < +
$Lang::tr{'time'}$Lang::tr{'chain'}$Lang::tr{'iface'}$Lang::tr{'proto'}$Lang::tr{'source'}
$Lang::tr{'destination'}
$Lang::tr{'src port'}
$Lang::tr{'dst port'}
Flag$Lang::tr{'mac address'}$Lang::tr{'time'}$Lang::tr{'chain'}$Lang::tr{'iface'}$Lang::tr{'proto'}$Lang::tr{'source'}
$Lang::tr{'destination'}
$Lang::tr{'src port'}
$Lang::tr{'dst port'}
Flag$Lang::tr{'mac address'}
$comment$iface$proto$srcaddr
$dstaddr
$srcport
$dstport
$time$comment$iface$proto$srcaddr
$dstaddr
$srcport
$dstport
$ccode$ccode$macaddr
- - - - - + + + + + END ; @@ -419,6 +419,7 @@ my $show=0; my $s; my $percent; +my $col=""; for($s=0;$s<$lines;$s++) { @@ -426,45 +427,45 @@ for($s=0;$s<$lines;$s++) $percent = $value[$s] * 100 / $linesjc; $percent = sprintf("%.f", $percent); $total = $total + $value[$s]; - if ( ($color % 10) == 1 ){print "\n";} - if ( ($color % 10) == 2 ){print "\n";} - if ( ($color % 10) == 3 ){print "\n";} - if ( ($color % 10) == 4 ){print "\n";} - if ( ($color % 10) == 5 ){print "\n";} - if ( ($color % 10) == 6 ){print "\n";} - if ( ($color % 10) == 7 ){print "\n";} - if ( ($color % 10) == 8 ){print "\n";} - if ( ($color % 10) == 9 ){print "\n";} - if ( ($color % 10) == 0 ){print "\n";} + if ( ($color % 10) == 1 ){print ""; $col="BGCOLOR='$color{'color1'}'";} + if ( ($color % 10) == 2 ){print ""; $col="BGCOLOR='$color{'color2'}'";} + if ( ($color % 10) == 3 ){print ""; $col="BGCOLOR='$color{'color3'}'";} + if ( ($color % 10) == 4 ){print ""; $col="BGCOLOR='$color{'color4'}'";} + if ( ($color % 10) == 5 ){print ""; $col="BGCOLOR='$color{'color5'}'";} + if ( ($color % 10) == 6 ){print ""; $col="BGCOLOR='$color{'color6'}'";} + if ( ($color % 10) == 7 ){print ""; $col="BGCOLOR='$color{'color7'}'";} + if ( ($color % 10) == 8 ){print ""; $col="BGCOLOR='$color{'color8'}'";} + if ( ($color % 10) == 9 ){print ""; $col="BGCOLOR='$color{'color9'}'";} + if ( ($color % 10) == 0 ){print ""; $col="BGCOLOR='$color{'color10'}'";} my $gi = Geo::IP::PurePerl->new(); my $ccode = $gi->country_code_by_name($key[$s]); my $fcode = lc($ccode); $color++; - print ""; - print ""; + print ""; + print ""; if ( $fcode ne "" ){ - print "";} + print "";} else { - print "";} - print ""; - print ""; + print "";} + print ""; + print ""; print ""; } if($cgiparams{'otherspie'} == 2 ){} else{ -if ( ($color % 10) == 1 ){print "\n";} -if ( ($color % 10) == 2 ){print "\n";} -if ( ($color % 10) == 3 ){print "\n";} -if ( ($color % 10) == 4 ){print "\n";} -if ( ($color % 10) == 5 ){print "\n";} -if ( ($color % 10) == 6 ){print "\n";} -if ( ($color % 10) == 7 ){print "\n";} -if ( ($color % 10) == 8 ){print "\n";} -if ( ($color % 10) == 9 ){print "\n";} -if ( ($color % 10) == 0 ){print "\n";} +if ( ($color % 10) == 1 ){print ""; $col="BGCOLOR='$color{'color1'}'";} +if ( ($color % 10) == 2 ){print ""; $col="BGCOLOR='$color{'color2'}'";} +if ( ($color % 10) == 3 ){print ""; $col="BGCOLOR='$color{'color3'}'";} +if ( ($color % 10) == 4 ){print ""; $col="BGCOLOR='$color{'color4'}'";} +if ( ($color % 10) == 5 ){print ""; $col="BGCOLOR='$color{'color5'}'";} +if ( ($color % 10) == 6 ){print ""; $col="BGCOLOR='$color{'color6'}'";} +if ( ($color % 10) == 7 ){print ""; $col="BGCOLOR='$color{'color7'}'";} +if ( ($color % 10) == 8 ){print ""; $col="BGCOLOR='$color{'color8'}'";} +if ( ($color % 10) == 9 ){print ""; $col="BGCOLOR='$color{'color9'}'";} +if ( ($color % 10) == 0 ){print ""; $col="BGCOLOR='$color{'color10'}'";} if ( $linesjc ne "0") { @@ -473,11 +474,11 @@ $dif = $linesjc - $total; $percent = $dif * 100 / $linesjc; $percent = sprintf("%.f", $percent); print < - - - - + + + + + END ; diff --git a/html/cgi-bin/logs.cgi/firewalllogport.dat b/html/cgi-bin/logs.cgi/firewalllogport.dat index af9b85288..3f93b1705 100644 --- a/html/cgi-bin/logs.cgi/firewalllogport.dat +++ b/html/cgi-bin/logs.cgi/firewalllogport.dat @@ -406,12 +406,12 @@ if ($showpie != 2 && $pienumber <= 50 && $pienumber != 0) { } print < +
IPFlagCountPercentIPFlagCountPercent
$key[$s]
$key[$s]$ccode$ccode$value[$s]$percent$value[$s]$percent
$Lang::tr{'otherip'}$dif$percent$Lang::tr{'otherip'}$dif$percent
- - - - + + + + END ; @@ -421,43 +421,45 @@ my $show=0; my $s; my $percent; +my $col=""; + for($s=0;$s<$lines;$s++) { $show++; $percent = $value[$s] * 100 / $linesjc; $percent = sprintf("%.f", $percent); $total = $total + $value[$s]; - if ( ($color % 10) == 1 ){print "\n";} - if ( ($color % 10) == 2 ){print "\n";} - if ( ($color % 10) == 3 ){print "\n";} - if ( ($color % 10) == 4 ){print "\n";} - if ( ($color % 10) == 5 ){print "\n";} - if ( ($color % 10) == 6 ){print "\n";} - if ( ($color % 10) == 7 ){print "\n";} - if ( ($color % 10) == 8 ){print "\n";} - if ( ($color % 10) == 9 ){print "\n";} - if ( ($color % 10) == 0 ){print "\n";} + if ( ($color % 10) == 1 ){print ""; $col="BGCOLOR='$color{'color1'}'";} + if ( ($color % 10) == 2 ){print ""; $col="BGCOLOR='$color{'color2'}'";} + if ( ($color % 10) == 3 ){print ""; $col="BGCOLOR='$color{'color3'}'";} + if ( ($color % 10) == 4 ){print ""; $col="BGCOLOR='$color{'color4'}'";} + if ( ($color % 10) == 5 ){print ""; $col="BGCOLOR='$color{'color5'}'";} + if ( ($color % 10) == 6 ){print ""; $col="BGCOLOR='$color{'color6'}'";} + if ( ($color % 10) == 7 ){print ""; $col="BGCOLOR='$color{'color7'}'";} + if ( ($color % 10) == 8 ){print ""; $col="BGCOLOR='$color{'color8'}'";} + if ( ($color % 10) == 9 ){print ""; $col="BGCOLOR='$color{'color9'}'";} + if ( ($color % 10) == 0 ){print ""; $col="BGCOLOR='$color{'color10'}'";} $color++; - print ""; - print ""; - print ""; - print ""; + print ""; + print ""; + print ""; + print ""; print ""; } if($cgiparams{'otherspie'} == 2 ){} else{ -if ( ($color % 10) == 1 ){print "\n";} -if ( ($color % 10) == 2 ){print "\n";} -if ( ($color % 10) == 3 ){print "\n";} -if ( ($color % 10) == 4 ){print "\n";} -if ( ($color % 10) == 5 ){print "\n";} -if ( ($color % 10) == 6 ){print "\n";} -if ( ($color % 10) == 7 ){print "\n";} -if ( ($color % 10) == 8 ){print "\n";} -if ( ($color % 10) == 9 ){print "\n";} -if ( ($color % 10) == 0 ){print "\n";} +if ( ($color % 10) == 1 ){print ""; $col="BGCOLOR='$color{'color1'}'";} +if ( ($color % 10) == 2 ){print ""; $col="BGCOLOR='$color{'color2'}'";} +if ( ($color % 10) == 3 ){print ""; $col="BGCOLOR='$color{'color3'}'";} +if ( ($color % 10) == 4 ){print ""; $col="BGCOLOR='$color{'color4'}'";} +if ( ($color % 10) == 5 ){print ""; $col="BGCOLOR='$color{'color5'}'";} +if ( ($color % 10) == 6 ){print ""; $col="BGCOLOR='$color{'color6'}'";} +if ( ($color % 10) == 7 ){print ""; $col="BGCOLOR='$color{'color7'}'";} +if ( ($color % 10) == 8 ){print ""; $col="BGCOLOR='$color{'color8'}'";} +if ( ($color % 10) == 9 ){print ""; $col="BGCOLOR='$color{'color9'}'";} +if ( ($color % 10) == 0 ){print ""; $col="BGCOLOR='$color{'color10'}'";} if ( $linesjc ne "0") { @@ -466,10 +468,10 @@ $dif = $linesjc - $total; $percent = $dif * 100 / $linesjc; $percent = sprintf("%.f", $percent); print < - - - + + + + END ; diff --git a/html/cgi-bin/logs.cgi/log.dat b/html/cgi-bin/logs.cgi/log.dat index e2d02447d..dacd518a1 100644 --- a/html/cgi-bin/logs.cgi/log.dat +++ b/html/cgi-bin/logs.cgi/log.dat @@ -354,11 +354,11 @@ if ($logsettings{'LOGVIEW_REVERSE'} eq 'on') { @log = reverse @log; } if ($lines != 0) { &oldernewer(); } print < +
PortCountPercentPortCountPercent
$key[$s]$value[$s]$percent
$key[$s]$value[$s]$percent
$Lang::tr{'otherport'}$dif$percent$Lang::tr{'otherport'}$dif$percent
- - - + + + END ; @@ -383,13 +383,15 @@ foreach $_ (@log) $data = substr ($data,80); #permit correct display in table cell $d .= ' ' . substr ($data,0,80); } - + my $col=""; if ($lines % 2) { - print ""; } + print ""; + $col="bgcolor='$color{'color20'}'"; } else { - print ""; } - print "\n"; + print ""; + $col="bgcolor='$color{'color22'}'"; } + print "\n"; $lines++; } #print ''; diff --git a/html/cgi-bin/logs.cgi/proxylog.dat b/html/cgi-bin/logs.cgi/proxylog.dat index da86f8917..a1a05b289 100644 --- a/html/cgi-bin/logs.cgi/proxylog.dat +++ b/html/cgi-bin/logs.cgi/proxylog.dat @@ -437,22 +437,25 @@ if ($logsettings{'LOGVIEW_REVERSE'} eq 'on') { @log = reverse @log; } print "

$Lang::tr{'web hits'} $daystr: $lines

"; if ($lines != 0) { &oldernewer(); } print < +
$Lang::tr{'time'}$Lang::tr{'section'} $Lang::tr{'time'}$Lang::tr{'section'} 
$time$sec" .&Header::cleanhtml ("$d", 'y') . "
$time$sec" .&Header::cleanhtml ("$d", 'y') . "
- - - - + + + + END ; my $ll = 0; +my $col=''; foreach $_ (@log) { if ($ll % 2) { - print "\n"; } + print ""; + $col="bgcolor='$color{'color20'}'"; } else { - print "\n"; } + print ""; + $col="bgcolor='$color{'color22'}'"; } my ($datetime,$ip,$so,$url) = split; my ($SECdt, $MINdt, $HOURdt, $DAYdt, $MONTHdt, $YEARdt) = localtime($datetime); $SECdt = sprintf ("%.02d",$SECdt); @@ -470,10 +473,10 @@ foreach $_ (@log) $DAYdt=''; } print <$DAYdt$HOURdt:$MINdt:$SECdt - - - + + + + END ; diff --git a/html/cgi-bin/logs.cgi/urlfilter.dat b/html/cgi-bin/logs.cgi/urlfilter.dat index 7fb2ff9c4..ce642e1cb 100644 --- a/html/cgi-bin/logs.cgi/urlfilter.dat +++ b/html/cgi-bin/logs.cgi/urlfilter.dat @@ -309,18 +309,19 @@ if ($lines) $lines = 0; - print "
$Lang::tr{'time'}$Lang::tr{'source ip'}$Lang::tr{'advproxy NCSA username'}$Lang::tr{'website'}$Lang::tr{'time'}$Lang::tr{'source ip'}$Lang::tr{'advproxy NCSA username'}$Lang::tr{'website'}
$ip$so$part$DAYdt$HOURdt:$MINdt:$SECdt$ip$so$part
\n"; + print "
"; unless ($cgiparams{'LOGTYPE'} eq 'squidGuard') { print "\n"; - print "\n"; - print "\n"; - print "\n"; - if ($filtersettings{'ENABLE_USERNAME_LOG'} eq 'on') { print "\n"; } - print "\n"; + print "\n"; + print "\n"; + print "\n"; + if ($filtersettings{'ENABLE_USERNAME_LOG'} eq 'on') { print "\n"; } + print "\n"; print "\n"; } + my $col=""; foreach (@slice) { undef $attr1; undef $attr2; @@ -336,17 +337,23 @@ if ($lines) if (@loginfo[2] =~ /emergency/) { $attr1 .= ""; $attr2 .= ""; } print "\n"; } else { - if ($lines % 2) { print "\n"; } else { print "\n"; } + if ($lines % 2) { + print ""; + $col="bgcolor='$color{'color22'}'"; + }else { + print ""; + $col="bgcolor='$color{'color20'}'"; + } } if ($cgiparams{'LOGTYPE'} eq 'squidGuard') { - print "\n"; + print "\n"; } else { - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "\n"; if ($filtersettings{'ENABLE_USERNAME_LOG'} eq 'on') { - print "\n"; + print "\n"; $site = substr($dsturl,0,55); if (length($dsturl) > 55) { $site .= "..."; } } else { @@ -354,7 +361,7 @@ if ($lines) if (length($dsturl) > 69) { $site .= "..."; } } #print "\n"; - print "\n"; + print "\n"; } print "\n"; } diff --git a/html/cgi-bin/p2p-block.cgi b/html/cgi-bin/p2p-block.cgi index 6683ca8b6..5ed587407 100755 --- a/html/cgi-bin/p2p-block.cgi +++ b/html/cgi-bin/p2p-block.cgi @@ -86,17 +86,18 @@ close FILE; &Header::openbox('100%', 'center', $Lang::tr{'p2p block'}); print < - -
$Lang::tr{'urlfilter time'}$Lang::tr{'urlfilter category'}$Lang::tr{'urlfilter client'}$Lang::tr{'urlfilter username'}$Lang::tr{'urlfilter dst'}$Lang::tr{'urlfilter time'}$Lang::tr{'urlfilter category'}$Lang::tr{'urlfilter client'}$Lang::tr{'urlfilter username'}$Lang::tr{'urlfilter dst'}
$time   $pid   $attr1@loginfo$attr2$time   $pid   $attr1@loginfo$attr2$time$category[1]$ip[0]$time$category[1]$ip[0]$loginfo[3]$loginfo[3]$site$site$site
+ + + END - +my $lines=0; +my $col=""; foreach my $p2pentry (sort @p2ps) { my @p2pline = split( /\;/, $p2pentry); if ($p2pline[2] eq 'on') { @@ -104,13 +105,17 @@ foreach my $p2pentry (sort @p2ps) { } else { $gif = "/images/off.gif" } - + if ($lines % 2) { + print ""; + $col="bgcolor='$color{'color20'}'"; } + else { + print ""; + $col="bgcolor='$color{'color22'}'"; } print < - - END +$lines++; } print <
$Lang::tr{'protocol'} - - + + $Lang::tr{'status'} - +
+ $p2pline[0]: +
@@ -119,9 +124,11 @@ foreach my $p2pentry (sort @p2ps) {
diff --git a/html/cgi-bin/routing.cgi b/html/cgi-bin/routing.cgi index 488705fb5..2a5176026 100644 --- a/html/cgi-bin/routing.cgi +++ b/html/cgi-bin/routing.cgi @@ -257,13 +257,13 @@ END &Header::openbox('100%', 'left', $Lang::tr{'routing table'}); print < - + +
- - - - + + + + END ; @@ -273,6 +273,7 @@ END # my $key = 0; +my $col=""; foreach my $line (@current) { chomp($line); # remove newline my @temp=split(/\,/,$line); @@ -294,15 +295,17 @@ foreach my $line (@current) { if ($settings{'KEY1'} eq $key) { print ""; } elsif ($key % 2) { - print ""; + print ""; + $col="bgcolor='$color{'color20'}'"; } else { - print ""; + print ""; + $col="bgcolor='$color{'color22'}'"; } print <$temp[1] - - - + + + - -
$Lang::tr{'host ip'} / $Lang::tr{'network'}$Lang::tr{'gateway'}$Lang::tr{'remark'}$Lang::tr{'action'}$Lang::tr{'host ip'} / $Lang::tr{'network'}$Lang::tr{'gateway'}$Lang::tr{'remark'}$Lang::tr{'action'}
$temp[2]$temp[3] +$temp[1]$temp[2]$temp[3] @@ -310,7 +313,7 @@ foreach my $line (@current) { +
@@ -318,7 +321,7 @@ foreach my $line (@current) {
+
diff --git a/html/cgi-bin/samba.cgi b/html/cgi-bin/samba.cgi index 74f10bd34..d48edf80f 100644 --- a/html/cgi-bin/samba.cgi +++ b/html/cgi-bin/samba.cgi @@ -886,27 +886,33 @@ my %shares = config("${General::swroot}/samba/shares"); print <
- - +
$Lang::tr{'manage shares'} -
$Lang::tr{'sharename'}$Lang::tr{'options'}
+ + END ; my @Shares = keys(%shares); my $lines = 0; - +my $col=""; foreach my $shareentry (sort @Shares) { chomp $shareentry; - if ($lines % 2) {print "";} else {print "";} + if ($lines % 2) { + print ""; + $col="bgcolor='$color{'color20'}'"; + } else { + print ""; + $col="bgcolor='$color{'color22'}'"; + } print <$shareentry - + -
$Lang::tr{'manage shares'}
$Lang::tr{'sharename'}$Lang::tr{'options'}
+ $shareentry
+
diff --git a/html/cgi-bin/services.cgi b/html/cgi-bin/services.cgi index 131cad8f0..2b7ee75a1 100644 --- a/html/cgi-bin/services.cgi +++ b/html/cgi-bin/services.cgi @@ -116,25 +116,33 @@ if ( $querry[0] =~ "processescpu"){ &Header::openbox('100%', 'left', $Lang::tr{'services'}); print < - - +
$Lang::tr{'services'}$Lang::tr{'status'}PID$Lang::tr{'memory'}
+ + + + + + END ; my $key = ''; + my $col=""; foreach $key (sort keys %servicenames){ $lines++; if ($lines % 2){ - print "\n\n"; + print ""; }else{ - print "\n\n"; + print ""; } my $shortname = $servicenames{$key}; - my $status = &isrunning($shortname); + my $status = &isrunning($shortname,$col); print "$status\n"; print "\n"; @@ -152,14 +160,14 @@ END print < -
$Lang::tr{'services'}$Lang::tr{'status'}PID$Lang::tr{'memory'}
"; + $col="bgcolor='$color{'color22'}'"; + print "
"; print $link{$key}; - print "
"; + $col="bgcolor='$color{'color20'}'"; + print "
"; print $link{$key}; - print "
+
- - - - - - + + + + + + END ; @@ -183,16 +191,18 @@ END if ( ($_ ne "alsa") && ($_ ne "mdadm") ) { $lines++; if ($lines % 2){ - print ""; + print ""; + $col="bgcolor='$color{'color22'}'"; }else{ - print ""; + print ""; + $col="bgcolor='$color{'color20'}'"; } - print " "; - my $status = isautorun($_); + print " "; + my $status = isautorun($_,$col); print "$status "; - print ""; - print " "; - my $status = &isrunningaddon($_); + print ""; + print " "; + my $status = &isrunningaddon($_,$col); $status =~ s/\\[[0-1]\;[0-9]+m//g; chomp($status); @@ -219,16 +229,17 @@ END sub isautorun{ my $cmd = $_[0]; - my $status = ""; + my $col = $_[1]; + my $status = ""; my $init = `find /etc/rc.d/rc3.d/S??${cmd} 2>/dev/null`; chomp ($init); if ($init ne ''){ - $status = ""; + $status = ""; } $init = `find /etc/rc.d/rc3.d/off/S??${cmd} 2>/dev/null`; chomp ($init); if ($init ne ''){ - $status = ""; + $status = ""; } return $status; @@ -236,7 +247,8 @@ sub isautorun{ sub isrunning{ my $cmd = $_[0]; - my $status = ""; + my $col = $_[1]; + my $status = ""; my $pid = ''; my $testcmd = ''; my $exename; @@ -267,7 +279,7 @@ sub isrunning{ close(FILE); } if ($testcmd =~ /$exename/){ - $status = ""; + $status = ""; } } return $status; @@ -275,7 +287,8 @@ sub isrunning{ sub isrunningaddon{ my $cmd = $_[0]; - my $status = ""; + my $col = $_[1]; + my $status = ""; my $pid = ''; my $testcmd = ''; my $exename; @@ -293,7 +306,7 @@ sub isrunningaddon{ $testcmd =~ s///gi; my @pid = split(/\s/,$testcmd); - $status .=""; + $status .=""; my $memory = 0; @@ -305,9 +318,9 @@ sub isrunningaddon{ } $memory+=$memory[0]; } - $status .=""; + $status .=""; }else{ - $status = ""; + $status = ""; } return $status; } diff --git a/html/cgi-bin/wakeonlan.cgi b/html/cgi-bin/wakeonlan.cgi index 8ea4ae035..f403ea362 100644 --- a/html/cgi-bin/wakeonlan.cgi +++ b/html/cgi-bin/wakeonlan.cgi @@ -292,16 +292,17 @@ print "\n"; &Header::openbox('100%', 'left', "$Lang::tr{'current devices'}"); print < +
AddonBoot$Lang::tr{'action'}$Lang::tr{'status'}PID$Lang::tr{'memory'}AddonBoot$Lang::tr{'action'}$Lang::tr{'status'}PID$Lang::tr{'memory'}
$_$_$Lang::tr{$Lang::tr{$Lang::tr{$Lang::tr{$Lang::tr{$Lang::tr{$Lang::tr{$Lang::tr{$Lang::tr{'stopped'}$Lang::tr{'stopped'}$Lang::tr{'running'}$pid$memory$Lang::tr{'running'}$pid$memory$Lang::tr{'stopped'}$Lang::tr{'stopped'}$pid[0]$pid[0]$memory KB$memory KB$Lang::tr{'stopped'}$Lang::tr{'stopped'}
- - - - + + + + + END ; - +my $col=""; for $i ( 0 .. $#wol_devices ) { my $wol_mac = $wol_devices[$i]{'MAC'}; @@ -310,22 +311,25 @@ for $i ( 0 .. $#wol_devices ) if ( (($cgiparams{'ACTION'} eq 'edit') || ($cgiparams{'ACTION'} eq 'update')) && ($i == $cgiparams{'ID'}) ) { - print ""; + print ""; + $col="bgcolor='${Header::colouryellow}'"; } elsif ( $i % 2) { - print ""; + print ""; + $col="bgcolor='$color{'color20'}'"; } - else + else { - print ""; + print ""; + $col="bgcolor='$color{'color22'}'"; } print <$wol_mac - - - + + + -
$Lang::tr{'mac address'}$Lang::tr{'interface'}$Lang::tr{'remark'}$Lang::tr{'action'}$Lang::tr{'mac address'}$Lang::tr{'interface'}$Lang::tr{'remark'}$Lang::tr{'action'}
$Lang::tr{"$wol_iface"}$wol_txt +$wol_mac$Lang::tr{"$wol_iface"}$wol_txt END ; if ( (($wol_iface eq 'blue') && ! &haveBlueNet()) @@ -347,14 +351,14 @@ END } print < - +
+
diff --git a/html/cgi-bin/wireless.cgi b/html/cgi-bin/wireless.cgi index ecff1796b..075595880 100644 --- a/html/cgi-bin/wireless.cgi +++ b/html/cgi-bin/wireless.cgi @@ -260,13 +260,13 @@ my @current = ; close (FILE); print < + - - - - - + + + + END ; @@ -333,20 +333,24 @@ foreach my $line (@current) else { $gif = 'off.gif'; $toggle='on'; $gdesc=$Lang::tr{'click to enable'};} my $remark = &Header::cleanhtml($temp[4]); + my $col=""; if ($cgiparams{'ACTION'} eq 'edit' && $cgiparams{'ID'} eq $id) { - print "\n"; + print ""; + $col="bgcolor='${Header::colouryellow}'"; } elsif ($id % 2) { - print "\n"; + print ""; + $col="bgcolor='${Header::table1colour}'"; } else { - print "\n"; + print ""; + $col="bgcolor='${Header::table2colour}'"; } - print "\n"; - print "\n"; - print "\n"; - print "\n"; + print "\n"; + print "\n"; + print "\n"; + print "\n"; print< + - -
$Lang::tr{'hostname'}$Lang::tr{'source ip'}$Lang::tr{'mac address'}$Lang::tr{'remark'}$Lang::tr{'action'}$Lang::tr{'hostname'}$Lang::tr{'source ip'}$Lang::tr{'mac address'} +$Lang::tr{'remark'}$Lang::tr{'action'}
$hname$sourceip$sourcemac$remark$hname$sourceip$sourcemac$remark @@ -355,7 +359,7 @@ print< + @@ -363,7 +367,7 @@ print< + @@ -405,12 +409,13 @@ sub printblueleases &Header::openbox('100%', 'left', "$Lang::tr{'current dhcp leases on blue'}"); print < + - - - - + + + + + END ; @@ -459,18 +464,21 @@ END foreach my $key (sort blueleasesort keys %entries) { my $hostname = &Header::cleanhtml($entries{$key}->{HOSTNAME},"y"); + my $col=""; if ($id % 2) { - print ""; + print ""; + $col="bgcolor='$Header::table2colour'"; } else { - print ""; + print ""; + $col="bgcolor='$Header::table1colour'"; } print <$entries{$key}->{IPADDR} - - - + + +
$Lang::tr{'ip address'}$Lang::tr{'mac address'}$Lang::tr{'hostname'}$Lang::tr{'lease expires'} (local time d/m/y)$Lang::tr{'ip address'}$Lang::tr{'mac address'}$Lang::tr{'hostname'}$Lang::tr{'lease expires'} (local time d/m/y)
$entries{$key}->{ETHER} $hostname +$entries{$key}->{IPADDR}$entries{$key}->{ETHER} $hostname END ; @@ -493,7 +501,7 @@ END } print < + diff --git a/html/html/themes/ipfire/include/css/style.css b/html/html/themes/ipfire/include/css/style.css index 02b3fed3e..80221b736 100644 --- a/html/html/themes/ipfire/include/css/style.css +++ b/html/html/themes/ipfire/include/css/style.css @@ -16,6 +16,56 @@ html { height: 100%; } +/* This decorates all tables with class="table" */ + +table { + *border-collapse: collapse; /* IE7 and lower */ + border-spacing: 0; +} + +.tbl th{ + color: #000000; + font-size: 14px; + border-top: 1px solid grey; + border-bottom: 1px solid grey; + background: #cccccc; +} +.tbl th:first-child{ + border-left: 1px solid grey; + border-top: 1px solid grey; + border-bottom: 1px solid grey; +} +.tbl th:last-child { + border-right: 1px solid grey; + border-top: 1px solid grey; + border-bottom: 1px solid grey; +} +.tbl th:only-child{ + border: 1px solid grey; +} + +.tbl tr td:first-child{ + border-left: 1px solid grey; +} +.tbl tr td:last-child{ + border-right: 1px solid grey; +} +.tbl tr:first-child td:only-child{ + border-top: 1px solid grey; +} +.tbl tr:last-child td:only-child{ + border-bottom: 1px solid grey; +} +.tbl tr:last-child td:first-child{ + border-bottom: 1px solid grey; +} +.tbl tr:last-child td:last-child{ + border-bottom: 1px solid grey; +} +.tbl tr:last-child td{ + border-bottom: 1px solid grey; +} + body { /* SVG as background image (IE9/Chrome/Safari/Opera) */ background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIHZpZXdCb3g9IjAgMCAxIDEiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPgo8bGluZWFyR3JhZGllbnQgaWQ9Imc2ODQiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMTAwJSIgeTE9IjEwMCUiIHgyPSIxMDAlIiB5Mj0iMCUiPgo8c3RvcCBzdG9wLWNvbG9yPSIjMDAwMDAwIiBvZmZzZXQ9IjAiLz48c3RvcCBzdG9wLWNvbG9yPSIjODgwNDAwIiBvZmZzZXQ9IjU3JSIvPgo8L2xpbmVhckdyYWRpZW50Pgo8cmVjdCB4PSIwIiB5PSIwIiB3aWR0aD0iMSIgaGVpZ2h0PSIxIiBmaWxsPSJ1cmwoI2c2ODQpIiAvPgo8L3N2Zz4=); @@ -58,6 +108,7 @@ body { font-family: "trebuchet ms", helvetica, sans-serif; } + h1, h2, h3, h4, h5, h6 { font-size: 20px; font-weight: normal;