#!/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{'REBOOTQUESTION'} = 'off';
$cgiparams{'REFRESHINDEX'} = 'off';
$cgiparams{'ACTION'} = '';
&Header::getcgihash(\%cgiparams);
# write cgi vars to the file.
$mainsettings{'LANGUAGE'} = $cgiparams{'lang'};
$mainsettings{'WINDOWWITHHOSTNAME'} = $cgiparams{'WINDOWWITHHOSTNAME'};
+ $mainsettings{'REBOOTQUESTION'} = $cgiparams{'REBOOTQUESTION'};
$mainsettings{'PPPUPDOWNBEEP'} = $cgiparams{'PPPUPDOWNBEEP'};
$mainsettings{'FX'} = $cgiparams{'FX'};
$mainsettings{'SPEED'} = $cgiparams{'SPEED'};
} else {
$cgiparams{'WINDOWWITHHOSTNAME'} = 'off';
}
+
+ if ($mainsettings{'REBOOTQUESTION'}) {
+ $cgiparams{'REBOOTQUESTION'} = $mainsettings{'REBOOTQUESTION'};
+ } else {
+ $cgiparams{'REBOOTQUESTION'} = 'on';
+ }
if ($mainsettings{'PPPUPDOWNBEEP'}) {
$cgiparams{'PPPUPDOWNBEEP'} = $mainsettings{'PPPUPDOWNBEEP'};
if($mainsettings{'SPEED'}) {
$cgiparams{'SPEED'} = $mainsettings{'SPEED'};
} else {
- $cgiparams{'SPEED'} = 'off';
+ # 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';
}
}
if ($cgiparams{'ACTION'} eq "$Lang::tr{'restore defaults'}")
{
$cgiparams{'WINDOWWITHHOSTNAME'} = 'off';
+ $cgiparams{'REBOOTQUESTION'} = 'on';
$cgiparams{'PPPUPDOWNBEEP'} = 'on';
$cgiparams{'REFRESHINDEX'} = 'off';
$cgiparams{'FX'} = 'on';
$checked{'WINDOWWITHHOSTNAME'}{'on'} = '';
$checked{'WINDOWWITHHOSTNAME'}{$cgiparams{'WINDOWWITHHOSTNAME'}} = "checked='checked'";
+$checked{'REBOOTQUESTION'}{'off'} = '';
+$checked{'REBOOTQUESTION'}{'on'} = '';
+$checked{'REBOOTQUESTION'}{$cgiparams{'REBOOTQUESTION'}} = "checked='checked'";
+
$checked{'PPPUPDOWNBEEP'}{'off'} = '';
$checked{'PPPUPDOWNBEEP'}{'on'} = '';
$checked{'PPPUPDOWNBEEP'}{$cgiparams{'PPPUPDOWNBEEP'}} = "checked='checked'";
<td><input type='checkbox' name='WINDOWWITHHOSTNAME' $checked{'WINDOWWITHHOSTNAME'}{'on'} /></td>
<td>$Lang::tr{'display hostname in window title'}</td>
</tr>
+<tr>
+ <td><input type='checkbox' name='REBOOTQUESTION' $checked{'REBOOTQUESTION'}{'on'} /></td>
+ <td>$Lang::tr{'reboot question'}</td>
+</tr>
<tr>
<td><input type='checkbox' name='REFRESHINDEX' $checked{'REFRESHINDEX'}{'on'} /></td>
<td>$Lang::tr{'refresh index page while connected'}</td>
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 =~ /^\./ );