X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=html%2Fcgi-bin%2Fhosts.cgi;h=bb7df1fffa56203d358ec189688f37d0f84497a2;hb=c5e3d520e92aee074f1713f8ba98ee4296341ad3;hp=531eceed2b5cb5ec72e3aaf0df2f83ed712f589e;hpb=986e08d996eadd906ecbe6c9ac8ad48aa78bd854;p=people%2Fteissler%2Fipfire-2.x.git diff --git a/html/cgi-bin/hosts.cgi b/html/cgi-bin/hosts.cgi index 531eceed2..bb7df1fff 100644 --- a/html/cgi-bin/hosts.cgi +++ b/html/cgi-bin/hosts.cgi @@ -1,15 +1,23 @@ #!/usr/bin/perl -# -# IPFire CGIs -# -# This code is distributed under the terms of the GPL -# -# (c) Alan Hourihane -# -# $Id: hosts.cgi,v 1.4.2.20 2005/11/05 15:46:25 gespinasse Exp $ -# -# Franck -# use dhcp.cgi model to rewrite this code +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# # +# 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 # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### use strict; @@ -29,6 +37,11 @@ undef (@dummy); my $setting = "${General::swroot}/main/settings"; our $datafile = "${General::swroot}/main/hosts"; #(our: used in subroutine) +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + our %settings = (); #Settings1 # removed @@ -251,11 +264,12 @@ print < +

- +
* $Lang::tr{'this field may be blank'}
@@ -270,12 +284,12 @@ END # &Header::openbox('100%', 'left', $Lang::tr{'current hosts'}); print < + - - - - + + + + END ; @@ -283,7 +297,7 @@ END # # Print each line of @current list # - +my $col=""; my $key = 0; foreach my $line (@current) { chomp($line); # remove newline @@ -305,15 +319,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]
@@ -321,7 +337,7 @@ foreach my $line (@current) {
+
@@ -329,7 +345,7 @@ foreach my $line (@current) {
+