From: Alexander Marx Date: Tue, 7 Jan 2014 09:22:22 +0000 (+0100) Subject: fifteen-theme: made tables in dhcp-server themeable X-Git-Tag: v2.15-beta1~19^2~15^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=52ca3c809334e1ab6bd5a75f2f66d2c49f7e228f;p=ipfire-2.x.git fifteen-theme: made tables in dhcp-server themeable --- diff --git a/config/cfgroot/header.pl b/config/cfgroot/header.pl index bf92507fdf..9473465bac 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/dhcp.cgi b/html/cgi-bin/dhcp.cgi index cde6065f57..9157cac01f 100644 --- a/html/cgi-bin/dhcp.cgi +++ b/html/cgi-bin/dhcp.cgi @@ -864,15 +864,15 @@ END 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 ; @@ -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) {
+