X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Fportfw.cgi;h=5583fb88a555eb4136f6383c99abedbdf606749a;hp=fcd77e5483093935000b067a53bfca0a6366139c;hb=142eea7a3b12f8bf8e8d91d058fc09d03b7fa18e;hpb=78331e301975a38f952ad9311a7ff3201e5a5e2e diff --git a/html/cgi-bin/portfw.cgi b/html/cgi-bin/portfw.cgi index fcd77e5483..5583fb88a5 100644 --- a/html/cgi-bin/portfw.cgi +++ b/html/cgi-bin/portfw.cgi @@ -1,28 +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 source IP support -# -# $Id: portfw.cgi,v 1.5.2.18 2005/05/02 16:19:49 eoberlander Exp $ -# -# -# Darren Critchley February 2003 - I added the multiple external access rules for each port forward -# A couple of things to remember when reading the code -# There are two kinds of records in the config file, those with a number in the first field, and then 0, -# these are port forward rules, these records will have a 0 or 0.0.0.0 in position 9 (ORIG_IP) -# If there is a 0, it means that there are external access rules, otherwise the port is open to ALL. -# The second type of record is a number followed by a number which indicates that it is an external access -# rule. The first number indicates which Portfw rule it belongs to, and the second is just a unique key. -# -# Darren Critchley - March 5, 2003 - if you come along after me and work on this page, please comment your -# work. Put your name, and date and then your comment - it helps the person that comes along after you -# to figure out why and how things have changed, and it is considered good coding practice -# Thanks . . . -# +############################################################################### +# # +# 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; @@ -30,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"; @@ -38,6 +33,11 @@ require "${General::swroot}/header.pl"; my @dummy = ( ${Header::colouryellow} ); undef (@dummy); +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + my %cgiparams=(); my %selected=(); my %checked=(); @@ -714,9 +714,7 @@ if ($cgiparams{'ACTION'} eq $Lang::tr{'edit'}){ } } print < - - $Lang::tr{ +   END @@ -766,10 +764,10 @@ while () print "\n"; } else { if ($id % 2) { - print "\n"; + print "\n"; } else { - print "\n"; + print "\n"; } }