]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/wireless.cgi
Allow also ip/netmask for blue access.
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / wireless.cgi
index a1ee8445973d52bae6edcecc0671ea484882c793..ecff1796b97967f97c8574d5507f2e52a9e9aac0 100644 (file)
@@ -1,14 +1,23 @@
 #!/usr/bin/perl
-#
-# IPCop CGIs
-#
-# This code is distributed under the terms of the GPL
-#
-# (c) 2003 Alan Hourihane <alanh@fairlite.demon.co.uk>
-# (c) 2005 Eric Oberlander, Robert Kerr - Inline editing & DHCP leases
-#
-# $Id: wireless.cgi,v 1.4.2.15 2005/06/11 12:14:49 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 <http://www.gnu.org/licenses/>.       #
+#                                                                             #
+###############################################################################
 
 use strict;
 use Time::Local;
@@ -17,7 +26,7 @@ use Time::Local;
 #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";
 
@@ -83,7 +92,7 @@ if ($cgiparams{'ACTION'} eq 'add')
        {
                $cgiparams{'SOURCE_IP'} = 'NONE';
        } else {
-               unless(&General::validip($cgiparams{'SOURCE_IP'})) 
+               unless(&General::validipormask($cgiparams{'SOURCE_IP'})) 
                {
                        $errormessage = $Lang::tr{'invalid fixed ip address'}; 
                        goto ADDERROR;
@@ -124,7 +133,7 @@ ADDERROR:
                close(FILE);
                undef %cgiparams;
                &General::log($Lang::tr{'wireless config added'});
-               system('/usr/local/bin/restartwireless');
+               system('/usr/local/bin/wirelessctrl');
        }
 ADDEXIT:
 }
@@ -148,7 +157,7 @@ if ($cgiparams{'ACTION'} eq 'edit')
                }
        }
        &General::log($Lang::tr{'wireless config changed'});
-       system('/usr/local/bin/restartwireless');
+       system('/usr/local/bin/wirelessctrl');
 }
 
 if ($cgiparams{'ACTION'} eq 'remove' || $cgiparams{'ACTION'} eq 'toggle')
@@ -169,7 +178,7 @@ if ($cgiparams{'ACTION'} eq 'remove' || $cgiparams{'ACTION'} eq 'toggle')
        }
        close(FILE);
        &General::log($Lang::tr{'wireless config changed'});
-       system('/usr/local/bin/restartwireless');
+       system('/usr/local/bin/wirelessctrl');
 }
 
 
@@ -225,9 +234,7 @@ print <<END
       <input type='hidden' name='ACTION' value='add' />
       <input type='submit' name='SUBMIT' value='$buttontext' />
     </td>
-    <td width='5%' align='right'>
-    <a href='${General::adminmanualurl}/section-firewall.html#section-blue-access' target='_blank'>
-    <img src='/images/web-support.png' alt='$Lang::tr{'online help en'}' title='$Lang::tr{'online help en'}' /></a></td>
+    <td width='5%' align='right'>&nbsp;</td>
 </tr>
 </table>
 END