]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/gui.cgi
Don't provide ssh keys in the update to 2.3.
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / gui.cgi
index 7af6f11c1dec28dac2c0ec094c6ac74c205da645..a56a20d2ceb54310871496ed7b7c4de7e5b69d3c 100644 (file)
@@ -1,13 +1,24 @@
 #!/usr/bin/perl
-#
-# IPFire CGIs
-#
-# This code is distributed under the terms of the GPL
-#
-# (c) Bill Ward
-#
-# $Id: gui.cgi,v 1.2.2.17 2005/07/06 09:21:22 franck78 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;
 
@@ -26,6 +37,7 @@ my $errormessage='';
 
 
 $cgiparams{'FX'} = 'off';
+$cgiparams{'SPEED'} = 'off';
 $cgiparams{'WINDOWWITHHOSTNAME'} = 'off';
 $cgiparams{'REFRESHINDEX'} = 'off';
 $cgiparams{'ACTION'} = '';
@@ -77,6 +89,7 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}")
        $mainsettings{'WINDOWWITHHOSTNAME'} = $cgiparams{'WINDOWWITHHOSTNAME'};
        $mainsettings{'PPPUPDOWNBEEP'} = $cgiparams{'PPPUPDOWNBEEP'};
        $mainsettings{'FX'} = $cgiparams{'FX'};
+       $mainsettings{'SPEED'} = $cgiparams{'SPEED'};
        $mainsettings{'THEME'} = $cgiparams{'theme'};
        $mainsettings{'REFRESHINDEX'} = $cgiparams{'REFRESHINDEX'};
        &General::writehash("${General::swroot}/main/settings", \%mainsettings);
@@ -112,6 +125,14 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}")
        } else {
                $cgiparams{'REFRESHINDEX'} = 'off';
        }
+       if($mainsettings{'SPEED'}) {
+               $cgiparams{'SPEED'} = $mainsettings{'SPEED'};
+       } else {
+       # if var is not defined it will be set to on because after installation var
+       # is not set and the speedmeter should be displayed, it can only be deactivated
+       # by manually setting the var to off
+               $cgiparams{'SPEED'} = 'on';
+       }
 }
 
 # Default settings
@@ -121,6 +142,7 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'restore defaults'}")
        $cgiparams{'PPPUPDOWNBEEP'} = 'on';
        $cgiparams{'REFRESHINDEX'} = 'off';
        $cgiparams{'FX'} = 'on';
+       $cgiparams{'SPEED'} = 'on';
        $cgiparams{'THEME'} = 'ipfire';
 }
 
@@ -140,6 +162,10 @@ $checked{'FX'}{'off'} = '';
 $checked{'FX'}{'on'} = '';
 $checked{'FX'}{$cgiparams{'FX'}} = "checked='checked'";
 
+$checked{'SPEED'}{'off'} = '';
+$checked{'SPEED'}{'on'} = '';
+$checked{'SPEED'}{$cgiparams{'SPEED'}} = "checked='checked'";
+
 &Header::openpage($Lang::tr{'gui settings'}, 1, '');
 &Header::openbigbox('100%', 'left', '', $errormessage);
 
@@ -169,6 +195,10 @@ print <<END
     <td><input type='checkbox' name='REFRESHINDEX' $checked{'REFRESHINDEX'}{'on'} /></td>
     <td>$Lang::tr{'refresh index page while connected'}</td>
 </tr>
+<tr>
+    <td><input type='checkbox' name='SPEED' $checked{'SPEED'}{'on'} /></td>
+    <td>$Lang::tr{'show ajax speedmeter in footer'}</td>
+</tr>
 <tr>
     <td>&nbsp;</td>
     <td>$Lang::tr{'languagepurpose'}</td>
@@ -216,6 +246,8 @@ local *DH;
 my ($item, $file);
 my @files;
 
+# Foreach directory create am theme entry to be selected by user
+
 opendir (DH, $dir);
 while ($file = readdir (DH)) {
        next if ( $file =~ /^\./ );