#!/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;
$cgiparams{'FX'} = 'off';
+$cgiparams{'SPEED'} = 'off';
$cgiparams{'WINDOWWITHHOSTNAME'} = 'off';
$cgiparams{'REFRESHINDEX'} = 'off';
$cgiparams{'ACTION'} = '';
# Set flag if index page is to refresh whilst ppp is up.
# Default is NO refresh.
if ($cgiparams{'REFRESHINDEX'} ne 'off') {
- system ('/bin/touch', "${General::swroot}/main/refreshindex");
+ system ('/usr/bin/touch', "${General::swroot}/main/refreshindex");
} else {
unlink "${General::swroot}/main/refreshindex";
}
# Beep on ip-up or ip-down. Default is ON.
if ($cgiparams{'PPPUPDOWNBEEP'} ne 'on') {
$cgiparams{'PPPUPDOWNBEEP'} = 'off';
- system ('/bin/touch', "${General::swroot}/ppp/nobeeps");
+ system ('/usr/bin/touch', "${General::swroot}/ppp/nobeeps");
} else {
unlink "${General::swroot}/ppp/nobeeps";
}
$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);
} else {
$cgiparams{'REFRESHINDEX'} = 'off';
}
+ if($mainsettings{'SPEED'}) {
+ $cgiparams{'SPEED'} = $mainsettings{'SPEED'};
+ } else {
+ $cgiparams{'SPEED'} = 'off';
+ }
}
# Default settings
$cgiparams{'PPPUPDOWNBEEP'} = 'on';
$cgiparams{'REFRESHINDEX'} = 'off';
$cgiparams{'FX'} = 'on';
+ $cgiparams{'SPEED'} = 'on';
$cgiparams{'THEME'} = 'ipfire';
}
$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);
<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> </td>
<td>$Lang::tr{'languagepurpose'}</td>