X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Fxtaccess.cgi;h=3fc21908e6a16ddf63ca2106179f7511020f6e0b;hp=0ba807504e434bccdd8b065cb81e8744818bf1d3;hb=6233483ba7d92b83a80e5a4759f83248198eb2f2;hpb=ac1cfefab236b73ed52909e14f43eaffc8d6914e diff --git a/html/cgi-bin/xtaccess.cgi b/html/cgi-bin/xtaccess.cgi index 0ba807504..3fc21908e 100644 --- a/html/cgi-bin/xtaccess.cgi +++ b/html/cgi-bin/xtaccess.cgi @@ -1,14 +1,23 @@ #!/usr/bin/perl -# -# SmoothWall CGIs -# -# This code is distributed under the terms of the GPL -# -# (c) The SmoothWall Team -# Copyright (c) 2002/04/13 Steve Bootes - Add destination IP support -# -# $Id: xtaccess.cgi,v 1.6.2.15 2005/03/05 08:44:32 eoberlander Exp $ -# +############################################################################### +# # +# 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; @@ -16,7 +25,7 @@ use strict; #use warnings; #use CGI::Carp 'fatalsToBrowser'; -require 'CONFIG_ROOT/general-functions.pl'; +require '/var/ipfire/general-functions.pl'; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; @@ -32,6 +41,11 @@ my $filename = "${General::swroot}/xtaccess/config"; my $aliasfile = "${General::swroot}/ethernet/aliases"; my $changed = 'no'; +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + &Header::showhttpheaders(); $cgiparams{'ENABLED'} = 'off'; @@ -289,9 +303,9 @@ foreach my $line (@current) if($cgiparams{'ACTION'} eq $Lang::tr{'edit'} && $cgiparams{'ID'} eq $id) { print "\n"; } elsif ($id % 2) { - print "\n"; } + print "\n"; } else { - print "\n"; } + print "\n"; } if ($temp[3] 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'}; } if ($temp[1] eq '0.0.0.0/0') {