mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
Hardcode theme to ipfire
This disables the theme support and makes it impossible to use any other themes than the ipfire default theme. The only intention of this patch is to hardcode the theme to ipfire. To change any cgi we have is an ugly way, but the only way to do this fast. The colour handling needs certainly to be improved as well, but this will and should be done in other patches. Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org> Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
8a65ffe943
commit
8186b37230
@@ -62,14 +62,12 @@ my @GRAPH_ARGS = (
|
|||||||
"--alt-y-grid",
|
"--alt-y-grid",
|
||||||
);
|
);
|
||||||
|
|
||||||
# Read the global settings files to get the current theme and after this load
|
|
||||||
# colors for this theme
|
|
||||||
|
|
||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
my %sensorsettings = ();
|
my %sensorsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
if ( $mainsettings{'RRDLOG'} eq "" ){
|
if ( $mainsettings{'RRDLOG'} eq "" ){
|
||||||
$mainsettings{'RRDLOG'}="/var/log/rrd";
|
$mainsettings{'RRDLOG'}="/var/log/rrd";
|
||||||
|
|||||||
@@ -91,11 +91,10 @@ if ( -d "/var/ipfire/langs/${language}/" ) {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
our $THEME_NAME = $settings{'THEME'};
|
|
||||||
|
|
||||||
require "${swroot}/langs/en.pl";
|
require "${swroot}/langs/en.pl";
|
||||||
require "${swroot}/langs/${language}.pl";
|
require "${swroot}/langs/${language}.pl";
|
||||||
eval `/bin/cat /srv/web/ipfire/html/themes/$THEME_NAME/include/functions.pl`;
|
eval `/bin/cat /srv/web/ipfire/html/themes/ipfire/include/functions.pl`;
|
||||||
|
|
||||||
sub green_used() {
|
sub green_used() {
|
||||||
if ($ethsettings{'GREEN_DEV'} && $ethsettings{'GREEN_DEV'} ne "") {
|
if ($ethsettings{'GREEN_DEV'} && $ethsettings{'GREEN_DEV'} ne "") {
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ my %color = ();
|
|||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
|
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
&Header::showhttpheaders();
|
&Header::showhttpheaders();
|
||||||
&Header::openpage($Lang::tr{'status information'}, 1, '');
|
&Header::openpage($Lang::tr{'status information'}, 1, '');
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ my @backupisos = "";
|
|||||||
$a = new CGI;
|
$a = new CGI;
|
||||||
|
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
$cgiparams{'ACTION'} = '';
|
$cgiparams{'ACTION'} = '';
|
||||||
$cgiparams{'FILE'} = '';
|
$cgiparams{'FILE'} = '';
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ unless (-e $settingsfile) { system("touch $settingsfile"); }
|
|||||||
&Header::getcgihash(\%cgiparams);
|
&Header::getcgihash(\%cgiparams);
|
||||||
|
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
&General::readhash("$settingsfile", \%settings) if(-f $settingsfile);
|
&General::readhash("$settingsfile", \%settings) if(-f $settingsfile);
|
||||||
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ require '/var/ipfire/connscheduler/lib.pl';
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
my $buttontext = $Lang::tr{'add'};
|
my $buttontext = $Lang::tr{'add'};
|
||||||
my $hiddenvalue = 'add';
|
my $hiddenvalue = 'add';
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ undef (@dummy);
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
# Config file for basic configuration.
|
# Config file for basic configuration.
|
||||||
my $settingsfile = "${General::swroot}/ddns/settings";
|
my $settingsfile = "${General::swroot}/ddns/settings";
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ foreach my $itf (@ITFs) {
|
|||||||
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("${General::swroot}/time/settings", \%timesettings);
|
&General::readhash("${General::swroot}/time/settings", \%timesettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
#Get GUI values
|
#Get GUI values
|
||||||
&Header::getcgihash(\%dhcpsettings);
|
&Header::getcgihash(\%dhcpsettings);
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ my $check_servers;
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
&Header::showhttpheaders();
|
&Header::showhttpheaders();
|
||||||
&Header::getcgihash(\%cgiparams);
|
&Header::getcgihash(\%cgiparams);
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ my $changed = 'no';
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
&Header::showhttpheaders();
|
&Header::showhttpheaders();
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ my $checkorange='';
|
|||||||
my @protocols;
|
my @protocols;
|
||||||
&General::readhash("${General::swroot}/firewall/settings", \%fwdfwsettings);
|
&General::readhash("${General::swroot}/firewall/settings", \%fwdfwsettings);
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
&General::readhash($fwoptions, \%optionsfw);
|
&General::readhash($fwoptions, \%optionsfw);
|
||||||
&General::readhash($ifacesettings, \%ifaces);
|
&General::readhash($ifacesettings, \%ifaces);
|
||||||
&General::readhash("$configovpn", \%ovpnsettings);
|
&General::readhash("$configovpn", \%ovpnsettings);
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ unless (-e $configsrvgrp) { system("touch $configsrvgrp"); }
|
|||||||
unless (-e $configlocationgrp) { system("touch $configlocationgrp"); }
|
unless (-e $configlocationgrp) { system("touch $configlocationgrp"); }
|
||||||
|
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
&General::readhash("${General::swroot}/ethernet/settings", \%ownnet);
|
&General::readhash("${General::swroot}/ethernet/settings", \%ownnet);
|
||||||
&General::readhash("$configovpn", \%ovpnsettings);
|
&General::readhash("$configovpn", \%ovpnsettings);
|
||||||
&General::readhasharray("$configipsec", \%ipsecconf);
|
&General::readhasharray("$configipsec", \%ipsecconf);
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ our %netsettings = ();
|
|||||||
our %color = ();
|
our %color = ();
|
||||||
our %mainsettings = ();
|
our %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
# File declarations.
|
# File declarations.
|
||||||
my $settingsfile = "${General::swroot}/guardian/settings";
|
my $settingsfile = "${General::swroot}/guardian/settings";
|
||||||
|
|||||||
@@ -88,7 +88,6 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}")
|
|||||||
$mainsettings{'WINDOWWITHHOSTNAME'} = $cgiparams{'WINDOWWITHHOSTNAME'};
|
$mainsettings{'WINDOWWITHHOSTNAME'} = $cgiparams{'WINDOWWITHHOSTNAME'};
|
||||||
$mainsettings{'PPPUPDOWNBEEP'} = $cgiparams{'PPPUPDOWNBEEP'};
|
$mainsettings{'PPPUPDOWNBEEP'} = $cgiparams{'PPPUPDOWNBEEP'};
|
||||||
$mainsettings{'SPEED'} = $cgiparams{'SPEED'};
|
$mainsettings{'SPEED'} = $cgiparams{'SPEED'};
|
||||||
$mainsettings{'THEME'} = $cgiparams{'theme'};
|
|
||||||
$mainsettings{'REFRESHINDEX'} = $cgiparams{'REFRESHINDEX'};
|
$mainsettings{'REFRESHINDEX'} = $cgiparams{'REFRESHINDEX'};
|
||||||
&General::writehash("${General::swroot}/main/settings", \%mainsettings);
|
&General::writehash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&Lang::reload($cgiparams{'lang'});
|
&Lang::reload($cgiparams{'lang'});
|
||||||
@@ -106,12 +105,6 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'save'}")
|
|||||||
$cgiparams{'PPPUPDOWNBEEP'} = 'on';
|
$cgiparams{'PPPUPDOWNBEEP'} = 'on';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($mainsettings{'THEME'}) {
|
|
||||||
$cgiparams{'THEME'} = $mainsettings{'THEME'};
|
|
||||||
} else {
|
|
||||||
$cgiparams{'THEME'} = 'ipfire';
|
|
||||||
}
|
|
||||||
|
|
||||||
if($mainsettings{'REFRESHINDEX'}) {
|
if($mainsettings{'REFRESHINDEX'}) {
|
||||||
$cgiparams{'REFRESHINDEX'} = $mainsettings{'REFRESHINDEX'};
|
$cgiparams{'REFRESHINDEX'} = $mainsettings{'REFRESHINDEX'};
|
||||||
} else {
|
} else {
|
||||||
@@ -134,7 +127,6 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'restore defaults'}")
|
|||||||
$cgiparams{'PPPUPDOWNBEEP'} = 'on';
|
$cgiparams{'PPPUPDOWNBEEP'} = 'on';
|
||||||
$cgiparams{'REFRESHINDEX'} = 'off';
|
$cgiparams{'REFRESHINDEX'} = 'off';
|
||||||
$cgiparams{'SPEED'} = 'on';
|
$cgiparams{'SPEED'} = 'on';
|
||||||
$cgiparams{'THEME'} = 'ipfire';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$checked{'WINDOWWITHHOSTNAME'}{'off'} = '';
|
$checked{'WINDOWWITHHOSTNAME'}{'off'} = '';
|
||||||
@@ -210,43 +202,6 @@ END
|
|||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
print <<END
|
|
||||||
</select></td></tr>
|
|
||||||
</table>
|
|
||||||
END
|
|
||||||
;
|
|
||||||
&Header::closebox();
|
|
||||||
&Header::openbox('100%','left',$Lang::tr{'theme'});
|
|
||||||
print<<END;
|
|
||||||
<table>
|
|
||||||
<tr>
|
|
||||||
<td> </td>
|
|
||||||
<td><select name='theme'>
|
|
||||||
END
|
|
||||||
;
|
|
||||||
|
|
||||||
my $dir = "/srv/web/ipfire/html/themes";
|
|
||||||
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 =~ /^\./ );
|
|
||||||
push (@files, $file);
|
|
||||||
}
|
|
||||||
closedir (DH);
|
|
||||||
|
|
||||||
foreach $item (sort (@files)) {
|
|
||||||
if ( "$mainsettings{'THEME'}" eq "$item" ) {
|
|
||||||
print "<option value='$item' selected='selected'>$item</option>\n";
|
|
||||||
} else {
|
|
||||||
print "<option value='$item'>$item</option>\n";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
print <<END
|
print <<END
|
||||||
</select></td></tr>
|
</select></td></tr>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ require "${General::swroot}/graphs.pl";
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
my %sensorsettings = ();
|
my %sensorsettings = ();
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ our $datafile = "${General::swroot}/main/hosts"; #(our: used in subroutine)
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
our %settings = ();
|
our %settings = ();
|
||||||
#Settings1
|
#Settings1
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ my %ignored=();
|
|||||||
|
|
||||||
# Read-in main settings, for language, theme and colors.
|
# Read-in main settings, for language, theme and colors.
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
# Get the available network zones, based on the config type of the system and store
|
# Get the available network zones, based on the config type of the system and store
|
||||||
# the list of zones in an array.
|
# the list of zones in an array.
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ $pppsettings{'PROFILENAME'} = 'None';
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
my $connstate = &Header::connectionstatus();
|
my $connstate = &Header::connectionstatus();
|
||||||
|
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ require "${General::swroot}/location-functions.pl";
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
my %cgiparams=();
|
my %cgiparams=();
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ my %cgiparams = ();
|
|||||||
&General::readhash("$settingsfile", \%settings);
|
&General::readhash("$settingsfile", \%settings);
|
||||||
|
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
&Header::showhttpheaders();
|
&Header::showhttpheaders();
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ require "${General::swroot}/header.pl";
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
use POSIX();
|
use POSIX();
|
||||||
|
|
||||||
|
|||||||
@@ -405,7 +405,7 @@ my $color=0;
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
if ($showpie != 2 && $pienumber <= 50 && $pienumber != 0) {
|
if ($showpie != 2 && $pienumber <= 50 && $pienumber != 0) {
|
||||||
my $mygraph = GD::Graph::pie->new(500, 350);
|
my $mygraph = GD::Graph::pie->new(500, 350);
|
||||||
|
|||||||
@@ -378,7 +378,7 @@ my $color=0;
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
if ($showpie != 2 && $pienumber <= 50 && $pienumber != 0) {
|
if ($showpie != 2 && $pienumber <= 50 && $pienumber != 0) {
|
||||||
my $mygraph = GD::Graph::pie->new(500, 350);
|
my $mygraph = GD::Graph::pie->new(500, 350);
|
||||||
|
|||||||
@@ -378,7 +378,7 @@ use GD::Graph::colour qw( :files );
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
if ($showpie != 2 && $pienumber <= 50 && $pienumber != 0) {
|
if ($showpie != 2 && $pienumber <= 50 && $pienumber != 0) {
|
||||||
my $mygraph = GD::Graph::pie->new(500, 350);
|
my $mygraph = GD::Graph::pie->new(500, 350);
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ require "${General::swroot}/header.pl";
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
use POSIX();
|
use POSIX();
|
||||||
|
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ require "${General::swroot}/header.pl";
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
use POSIX();
|
use POSIX();
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ require "${General::swroot}/header.pl";
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
# Path and file of the OVPN connections database.
|
# Path and file of the OVPN connections database.
|
||||||
my $database = "/var/ipfire/ovpn/clients.db";
|
my $database = "/var/ipfire/ovpn/clients.db";
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ my $errormessage = '';
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
my @shortmonths = ( 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug',
|
my @shortmonths = ( 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug',
|
||||||
'Sep', 'Oct', 'Nov', 'Dec' );
|
'Sep', 'Oct', 'Nov', 'Dec' );
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ require "${General::swroot}/header.pl";
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
my $dbdir = "${General::swroot}/urlfilter/blacklists";
|
my $dbdir = "${General::swroot}/urlfilter/blacklists";
|
||||||
my $logdir = "/var/log/squidGuard";
|
my $logdir = "/var/log/squidGuard";
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ my $errormessage='';
|
|||||||
#Read all parameters for site
|
#Read all parameters for site
|
||||||
&Header::getcgihash(\%cgiparams);
|
&Header::getcgihash(\%cgiparams);
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
#Show Headers
|
#Show Headers
|
||||||
&Header::showhttpheaders();
|
&Header::showhttpheaders();
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ my %color = ();
|
|||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
|
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
&Header::showhttpheaders();
|
&Header::showhttpheaders();
|
||||||
&Header::openpage($Lang::tr{'status information'}, 1, '');
|
&Header::openpage($Lang::tr{'status information'}, 1, '');
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ require "${General::swroot}/graphs.pl";
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
#workaround to suppress a warning when a variable is used only once
|
#workaround to suppress a warning when a variable is used only once
|
||||||
my @dummy = ( ${Header::colourred} );
|
my @dummy = ( ${Header::colourred} );
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ require "${General::swroot}/graphs.pl";
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
my @querry = split(/\?/,$ENV{'QUERY_STRING'});
|
my @querry = split(/\?/,$ENV{'QUERY_STRING'});
|
||||||
$querry[0] = '' unless defined $querry[0];
|
$querry[0] = '' unless defined $querry[0];
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ my $errormessage = "";
|
|||||||
my @songs;
|
my @songs;
|
||||||
|
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
&Header::showhttpheaders();
|
&Header::showhttpheaders();
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ my %mainsettings = ();
|
|||||||
my %netsettings=();
|
my %netsettings=();
|
||||||
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
my @graphs=();
|
my @graphs=();
|
||||||
my %dhcpinfo=();
|
my %dhcpinfo=();
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ my %mainsettings = ();
|
|||||||
my %netsettings=();
|
my %netsettings=();
|
||||||
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
my @graphs=();
|
my @graphs=();
|
||||||
my @wireless=();
|
my @wireless=();
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ require "${General::swroot}/graphs.pl";
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
my @pings=();
|
my @pings=();
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ require "${General::swroot}/graphs.pl";
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
my @vpns=();
|
my @vpns=();
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ require "${General::swroot}/graphs.pl";
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
my %vpnsettings = ();
|
my %vpnsettings = ();
|
||||||
&General::readhasharray("${General::swroot}/vpn/config", \%vpnsettings);
|
&General::readhasharray("${General::swroot}/vpn/config", \%vpnsettings);
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ undef (@dummy);
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
###
|
###
|
||||||
### Initialize variables
|
### Initialize variables
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ my %color = ();
|
|||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
|
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
&Header::showhttpheaders();
|
&Header::showhttpheaders();
|
||||||
&Header::getcgihash(\%fwdfwsettings);
|
&Header::getcgihash(\%fwdfwsettings);
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ sub refreshpage{&Header::openbox( 'Waiting', 1, "<meta http-equiv='refresh' cont
|
|||||||
&Header::getcgihash(\%cgiparams);
|
&Header::getcgihash(\%cgiparams);
|
||||||
|
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
&Header::openpage($Lang::tr{'pakfire configuration'}, 1);
|
&Header::openpage($Lang::tr{'pakfire configuration'}, 1);
|
||||||
&Header::openbigbox('100%', 'left', '', $errormessage);
|
&Header::openbigbox('100%', 'left', '', $errormessage);
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ my $kernel=`/bin/uname -r | /usr/bin/tr -d '\012'`;
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
&Header::showhttpheaders();
|
&Header::showhttpheaders();
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ my $https_port='444';
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
my %proxysettings=();
|
my %proxysettings=();
|
||||||
my %netsettings=();
|
my %netsettings=();
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ $qossettings{'RED_DEV'} = `cat /var/ipfire/red/iface`;
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
my @querry = split(/\?/,$ENV{'QUERY_STRING'});
|
my @querry = split(/\?/,$ENV{'QUERY_STRING'});
|
||||||
$querry[0] = '' unless defined $querry[0];
|
$querry[0] = '' unless defined $querry[0];
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ my $errormessage='';
|
|||||||
my $counter = 0;
|
my $counter = 0;
|
||||||
|
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
&Header::showhttpheaders();
|
&Header::showhttpheaders();
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ our $datafile = "${General::swroot}/main/routing"; #(our: used in subroutine)
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
our %settings = ();
|
our %settings = ();
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ my %shares = &config("${General::swroot}/samba/shares");
|
|||||||
|
|
||||||
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
############################################################################################################################
|
############################################################################################################################
|
||||||
#################################### Initialisierung von Samba Variablen fr global Settings ###############################
|
#################################### Initialisierung von Samba Variablen fr global Settings ###############################
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ my %color = ();
|
|||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
my %netsettings=();
|
my %netsettings=();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
||||||
|
|
||||||
#workaround to suppress a warning when a variable is used only once
|
#workaround to suppress a warning when a variable is used only once
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ require "${General::swroot}/graphs.pl";
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
my @querry = split(/\?/,$ENV{'QUERY_STRING'});
|
my @querry = split(/\?/,$ENV{'QUERY_STRING'});
|
||||||
$querry[0] = '' unless defined $querry[0];
|
$querry[0] = '' unless defined $querry[0];
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ our %netsettings = ();
|
|||||||
our %color = ();
|
our %color = ();
|
||||||
our %mainsettings = ();
|
our %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
our %settings = ();
|
our %settings = ();
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ require "${General::swroot}/header.pl";
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
my %cgiparams;
|
my %cgiparams;
|
||||||
my %pppsettings;
|
my %pppsettings;
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ my @metadata=();
|
|||||||
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("${General::swroot}/proxy/settings", \%proxysettings);
|
&General::readhash("${General::swroot}/proxy/settings", \%proxysettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
$xlratorsettings{'ACTION'} = '';
|
$xlratorsettings{'ACTION'} = '';
|
||||||
$xlratorsettings{'ENABLE_LOG'} = 'off';
|
$xlratorsettings{'ENABLE_LOG'} = 'off';
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ my $errormessage = '';
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ my $notice = "";
|
|||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
my %color = ();
|
my %color = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
my %settings = (
|
my %settings = (
|
||||||
"ENABLE_SMT" => "auto",
|
"ENABLE_SMT" => "auto",
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ our $datafile = "/var/ipfire/wakeonlan/clients.conf";
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
my %netsettings = ();
|
my %netsettings = ();
|
||||||
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ our $datafile = "${General::swroot}/ethernet/wireless";
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
our %settings = ();
|
our %settings = ();
|
||||||
our %netsettings = ();
|
our %netsettings = ();
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ my $country = '';
|
|||||||
my $txpower = '';
|
my $txpower = '';
|
||||||
|
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
&General::readhash("/var/ipfire/ethernet/settings", \%netsettings);
|
&General::readhash("/var/ipfire/ethernet/settings", \%netsettings);
|
||||||
|
|
||||||
$wlanapsettings{'APMODE'} = 'on';
|
$wlanapsettings{'APMODE'} = 'on';
|
||||||
|
|||||||
@@ -114,10 +114,6 @@ sub openpage {
|
|||||||
$headline = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}";
|
$headline = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}";
|
||||||
}
|
}
|
||||||
|
|
||||||
my @stylesheets = ("style.css");
|
|
||||||
if ($THEME_NAME eq "ipfire-rounded") {
|
|
||||||
push(@stylesheets, "style-rounded.css");
|
|
||||||
}
|
|
||||||
|
|
||||||
print <<END;
|
print <<END;
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
@@ -137,9 +133,9 @@ print <<END;
|
|||||||
</script>
|
</script>
|
||||||
END
|
END
|
||||||
|
|
||||||
foreach my $stylesheet (@stylesheets) {
|
|
||||||
print "<link href=\"/themes/ipfire/include/css/$stylesheet\" rel=\"stylesheet\" type=\"text/css\" />\n";
|
print "<link href=\"/themes/ipfire/include/css/style.css\" rel=\"stylesheet\" type=\"text/css\" />\n";
|
||||||
}
|
|
||||||
|
|
||||||
if ($settings{'SPEED'} ne 'off') {
|
if ($settings{'SPEED'} ne 'off') {
|
||||||
print <<END
|
print <<END
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ my $path_smartctl = "/usr/sbin/smartctl";
|
|||||||
my %color = ();
|
my %color = ();
|
||||||
my %mainsettings = ();
|
my %mainsettings = ();
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
|
|
||||||
if ( $mainsettings{'RRDLOG'} eq "" ){
|
if ( $mainsettings{'RRDLOG'} eq "" ){
|
||||||
$mainsettings{'RRDLOG'}="/var/log/rrd";
|
$mainsettings{'RRDLOG'}="/var/log/rrd";
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ my $mailfile="${General::swroot}/dma/mail.conf";
|
|||||||
|
|
||||||
&Header::getcgihash(\%cgiparams);
|
&Header::getcgihash(\%cgiparams);
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
&General::readhash("$settingsfile", \%settings) if(-f $settingsfile);
|
&General::readhash("$settingsfile", \%settings) if(-f $settingsfile);
|
||||||
|
|
||||||
if ( -f $mailfile){
|
if ( -f $mailfile){
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ require '/var/ipfire/lang.pl';
|
|||||||
my ( %mainsettings, %color ) = ();
|
my ( %mainsettings, %color ) = ();
|
||||||
|
|
||||||
&General::readhash('/var/ipfire/main/settings', \%mainsettings);
|
&General::readhash('/var/ipfire/main/settings', \%mainsettings);
|
||||||
&General::readhash('/srv/web/ipfire/html/themes/'.$mainsettings{'THEME'}.'/include/colors.txt', \%color);
|
&General::readhash('/srv/web/ipfire/html/themes/ipfire/include/colors.txt', \%color);
|
||||||
|
|
||||||
sub wiograph {
|
sub wiograph {
|
||||||
my $hostid = $_[0];
|
my $hostid = $_[0];
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ my ( %mainsettings, %mailsettings, %wiosettings, %cgiparams, %netsettings, %ipsh
|
|||||||
&General::readhash('/var/ipfire/ethernet/settings', \%netsettings);
|
&General::readhash('/var/ipfire/ethernet/settings', \%netsettings);
|
||||||
&General::readhash('/var/ipfire/dma/mail.conf', \%mailsettings);
|
&General::readhash('/var/ipfire/dma/mail.conf', \%mailsettings);
|
||||||
&General::readhash('/var/ipfire/wio/wio.conf', \%wiosettings);
|
&General::readhash('/var/ipfire/wio/wio.conf', \%wiosettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/ipfire/include/colors.txt", \%color);
|
||||||
&General::readhasharray('/var/ipfire/ovpn/ovpnconfig', \%ovpnconfighash);
|
&General::readhasharray('/var/ipfire/ovpn/ovpnconfig', \%ovpnconfighash);
|
||||||
&General::readhash('/var/ipfire/ovpn/settings', \%ovpnsettings);
|
&General::readhash('/var/ipfire/ovpn/settings', \%ovpnsettings);
|
||||||
&General::readhasharray('/var/ipfire/ovpn/ccd.conf', \%ovpnccdconfhash);
|
&General::readhasharray('/var/ipfire/ovpn/ccd.conf', \%ovpnccdconfhash);
|
||||||
|
|||||||
Reference in New Issue
Block a user