]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - html/cgi-bin/upnp.cgi
cgi-bin: Remove font tags with no effect, and style tags
[people/teissler/ipfire-2.x.git] / html / cgi-bin / upnp.cgi
index 3749ade60182e07b4ac651bfeb28474e1645a3cd..07dfa2677c970e49a9be6ae9ffe5f209fb26616c 100644 (file)
@@ -1,16 +1,28 @@
 #!/usr/bin/perl
-#
-# IPFire CGIs
-#
-# This code is distributed under the terms of the GPL
-#
-# (c) The IPFire Team
-#
+###############################################################################
+#                                                                             #
+# 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 <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
 
 use strict;
 # enable only the following on debugging purpose
-use warnings;
-use CGI::Carp 'fatalsToBrowser';
+#use warnings;
+#use CGI::Carp 'fatalsToBrowser';
 
 require '/var/ipfire/general-functions.pl';
 require "${General::swroot}/lang.pl";
@@ -70,7 +82,7 @@ if ($upnpsettings{'ACTION'} eq $Lang::tr{'save'})
 debug_mode = $upnpsettings{'DEBUGMODE'}
 insert_forward_rules = $upnpsettings{'FORWARDRULES'}
 forward_chain_name = FORWARD
-prerouting_chain_name = PORTFW
+prerouting_chain_name = UPNPFW
 upstream_bitrate = $upnpsettings{'DOWNSTREAM'}
 downstream_bitrate = $upnpsettings{'UPSTREAM'}
 description_document_name = $upnpsettings{'DESCRIPTION'}
@@ -121,7 +133,7 @@ print <<END
 <table width='95%' cellspacing='0'>
 END
 ;
-if ( $message ne "" ) {print "<tr><td colspan='3' align='center'><font color='red'>$message</font>";}
+if ( $message ne "" ) {print "<tr><td colspan='3' style='text-align:center; color:red;'>$message</td></tr>";}
 
 my $lines = 0;
 my $key = '';
@@ -152,7 +164,7 @@ print <<END
 <tr><td align='left'>Upstream in KB:</td><td><input type='text' name='UPSTREAM' value='$upnpsettings{'UPSTREAM'}' size="30" /></td></tr>
 <tr><td align='left' colspan='2'><br /></td></tr>
 <tr><td colspan='2' align='center'>    <input type='hidden' name='ACTION' value=$Lang::tr{'save'} />
-                                                                                                                                               <input type='image' alt=$Lang::tr{'save'} src='/images/floppy.gif' /></td></tr>
+<input type='image' alt='$Lang::tr{'save'}' title='$Lang::tr{'save'}' src='/images/floppy.gif' /></td></tr>
 </table></form>
 END
 ;
@@ -187,9 +199,9 @@ print "</table>";
 ############################################################################################################################
 
 sub isrunning
-       {
+{
        my $cmd = $_[0];
-       my $status = "<td bgcolor='${Header::colourred}' align='center'><font color='white'><b>$Lang::tr{'stopped'}</b></font></td>";
+       my $status = "<td bgcolor='${Header::colourred}' style='text-align:center; color:white;'><b>$Lang::tr{'stopped'}</b></td>";
        my $pid = '';
        my $testcmd = '';
        my $exename;
@@ -207,9 +219,10 @@ sub isrunning
                                {if (/^Name:\W+(.*)/) {$testcmd = $1; }}
                        close FILE;
                        if ($testcmd =~ /$exename/)
-                               {$status = "<td bgcolor='${Header::colourgreen}'><font color='white'><b>$Lang::tr{'running'}</b></font></td>";}
+                               {$status = "<td style='color:white; background-color:${Header::colourgreen};'><b>$Lang::tr{'running'}</b></td>";}
                        }
                }
 
                return $status;
-       }
+}
+