From f2fdd0c1e9a3ccf539cd477a6111281eadc200a7 Mon Sep 17 00:00:00 2001 From: maniacikarus Date: Thu, 17 May 2007 16:54:15 +0000 Subject: [PATCH] Quasi fast alle cgis von den fixen header farben befreit git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@560 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 --- html/cgi-bin/connections.cgi | 2 +- html/cgi-bin/connscheduler.cgi | 9 +- html/cgi-bin/ddns.cgi | 9 +- html/cgi-bin/extrahd.cgi | 8 +- html/cgi-bin/hosts.cgi | 9 +- html/cgi-bin/ids.cgi | 9 +- html/cgi-bin/index.cgi | 13 ++- html/cgi-bin/logs.cgi/firewalllog.dat | 9 +- html/cgi-bin/logs.cgi/ids.dat | 9 +- html/cgi-bin/logs.cgi/log.dat | 9 +- html/cgi-bin/logs.cgi/proxylog.dat | 9 +- html/cgi-bin/logs.cgi/urlfilter.dat | 7 +- html/cgi-bin/networks.cgi | 2 +- html/cgi-bin/outgoingfw.cgi | 37 ++++---- html/cgi-bin/ovpnmain.cgi | 21 +++-- html/cgi-bin/portfw.cgi | 9 +- html/cgi-bin/pppsetup.cgi | 19 ++-- html/cgi-bin/proxy.cgi | 2 +- html/cgi-bin/qos.cgi | 43 +++++---- html/cgi-bin/samba.cgi | 57 +++++------- html/cgi-bin/services.cgi | 2 +- html/cgi-bin/system.cgi | 13 ++- html/cgi-bin/traffic.cgi | 13 ++- html/cgi-bin/tripwire.cgi | 100 ++++++++++----------- html/cgi-bin/upnp.cgi | 14 +-- html/cgi-bin/vpnmain.cgi | 23 +++-- html/cgi-bin/wakeonlan.cgi | 9 +- html/cgi-bin/xtaccess.cgi | 9 +- html/html/themes/ipfire/include/colors.txt | 4 +- html/html/themes/maniac/include/colors.txt | 4 +- 30 files changed, 280 insertions(+), 203 deletions(-) diff --git a/html/cgi-bin/connections.cgi b/html/cgi-bin/connections.cgi index aeaf0db6e5..27d0998ca4 100644 --- a/html/cgi-bin/connections.cgi +++ b/html/cgi-bin/connections.cgi @@ -329,7 +329,7 @@ foreach my $line (@active) { $proto - $state + $state $ttl END diff --git a/html/cgi-bin/connscheduler.cgi b/html/cgi-bin/connscheduler.cgi index f661b38391..d37a2b3634 100644 --- a/html/cgi-bin/connscheduler.cgi +++ b/html/cgi-bin/connscheduler.cgi @@ -25,6 +25,11 @@ require "${General::swroot}/header.pl"; require '/var/ipfire/connscheduler/lib.pl'; +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + my $buttontext = $Lang::tr{'add'}; my $hiddenvalue = 'add'; my $day; @@ -408,11 +413,11 @@ for my $id ( 0 .. $#CONNSCHED::config ) } elsif ( $id % 2 ) { - $trcolor = ""; + $trcolor = ""; } else { - $trcolor = ""; + $trcolor = ""; } print <"; } elsif ($key % 2) { - print ""; + print ""; } else { - print ""; + print ""; } #if a field is empty, replace it with a '---' to see colorized info! diff --git a/html/cgi-bin/extrahd.cgi b/html/cgi-bin/extrahd.cgi index 0afe9ef6e6..89f2eea5e6 100644 --- a/html/cgi-bin/extrahd.cgi +++ b/html/cgi-bin/extrahd.cgi @@ -193,16 +193,16 @@ END $size = int($partitionline[1] / 1024); print < - /dev/$partitionline[0] - $Lang::tr{'size'} $size MB - - + diff --git a/html/cgi-bin/hosts.cgi b/html/cgi-bin/hosts.cgi index 531eceed2b..72d66b3598 100644 --- a/html/cgi-bin/hosts.cgi +++ b/html/cgi-bin/hosts.cgi @@ -29,6 +29,11 @@ undef (@dummy); my $setting = "${General::swroot}/main/settings"; our $datafile = "${General::swroot}/main/hosts"; #(our: used in subroutine) +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + our %settings = (); #Settings1 # removed @@ -305,9 +310,9 @@ foreach my $line (@current) { if ($settings{'KEY1'} eq $key) { print ""; } elsif ($key % 2) { - print ""; + print ""; } else { - print ""; + print ""; } print <$temp[1] diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index 6ef9da7d37..c428f4c0c8 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -20,6 +20,11 @@ require '/var/ipfire/general-functions.pl'; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + my %snortsettings=(); my %checked=(); my %selected=(); @@ -326,11 +331,11 @@ print < - \n"; } + print "\n"; } else { - print "\n"; } + print "\n"; } print <$time diff --git a/html/cgi-bin/logs.cgi/ids.dat b/html/cgi-bin/logs.cgi/ids.dat index 23d80424b1..67a2c4052a 100644 --- a/html/cgi-bin/logs.cgi/ids.dat +++ b/html/cgi-bin/logs.cgi/ids.dat @@ -22,6 +22,11 @@ require '/var/ipfire/general-functions.pl'; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + use POSIX(); #workaround to suppress a warning when a variable is used only once @@ -276,9 +281,9 @@ END foreach $_ (@slice) { if ($lines % 2) { - print ""; } + print ""; } else { - print ""; } + print ""; } print "\n"; $lines++; } diff --git a/html/cgi-bin/logs.cgi/proxylog.dat b/html/cgi-bin/logs.cgi/proxylog.dat index b4e622a037..e529be061d 100644 --- a/html/cgi-bin/logs.cgi/proxylog.dat +++ b/html/cgi-bin/logs.cgi/proxylog.dat @@ -32,6 +32,11 @@ my %checked=(); my @log=(); my $errormessage = ''; +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + my @shortmonths = ( 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ); my @longmonths = ( $Lang::tr{'january'}, $Lang::tr{'february'}, $Lang::tr{'march'}, @@ -444,9 +449,9 @@ my $ll = 0; foreach $_ (@log) { if ($ll % 2) { - print "\n"; } + print "\n"; } else { - print "\n"; } + print "\n"; } my ($datetime,$ip,$so,$url) = split; my ($SECdt, $MINdt, $HOURdt, $DAYdt, $MONTHdt, $YEARdt) = localtime($datetime); $SECdt = sprintf ("%.02d",$SECdt); diff --git a/html/cgi-bin/logs.cgi/urlfilter.dat b/html/cgi-bin/logs.cgi/urlfilter.dat index c2be5b0499..7fb2ff9c4f 100644 --- a/html/cgi-bin/logs.cgi/urlfilter.dat +++ b/html/cgi-bin/logs.cgi/urlfilter.dat @@ -21,6 +21,11 @@ require '/var/ipfire/general-functions.pl'; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + my $dbdir = "${General::swroot}/urlfilter/blacklists"; my $logdir = "/var/log/squidGuard"; @@ -331,7 +336,7 @@ if ($lines) if (@loginfo[2] =~ /emergency/) { $attr1 .= ""; $attr2 .= ""; } print "\n"; } else { - if ($lines % 2) { print "\n"; } else { print "\n"; } + if ($lines % 2) { print "\n"; } else { print "\n"; } } if ($cgiparams{'LOGTYPE'} eq 'squidGuard') { print "\n"; diff --git a/html/cgi-bin/networks.cgi b/html/cgi-bin/networks.cgi index 4861dba675..d1a88a17e9 100644 --- a/html/cgi-bin/networks.cgi +++ b/html/cgi-bin/networks.cgi @@ -23,7 +23,7 @@ use strict; -require 'CONFIG_ROOT/general-functions.pl'; +require '/var/ipfire/general-functions.pl'; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; diff --git a/html/cgi-bin/outgoingfw.cgi b/html/cgi-bin/outgoingfw.cgi index f24ce1aa07..e8cef70030 100644 --- a/html/cgi-bin/outgoingfw.cgi +++ b/html/cgi-bin/outgoingfw.cgi @@ -30,7 +30,12 @@ my @p2pline = (); my $configfile = "/var/ipfire/outgoing/rules"; my $p2pfile = "/var/ipfire/outgoing/p2protocols"; -my $servicefile = "/var/ipfire/outgoing/defaultservices" +my $servicefile = "/var/ipfire/outgoing/defaultservices"; + +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); &General::readhash("${General::swroot}/ethernet/settings", \%netsettings); @@ -213,13 +218,13 @@ END print <
$Lang::tr{'network'} - IP - $Lang::tr{'status'} +
$Lang::tr{'network'} + IP + $Lang::tr{'status'}
$Lang::tr{'internet'}:
$ipaddr $connstate @@ -225,7 +230,7 @@ END } else { foreach my $line (@status) { if ($line =~ /\"$confighash{$key}[1]\".*IPsec SA established/) { - $active = "
$Lang::tr{'capsinactive'}
"; + $active = "
$Lang::tr{'capsopen'}
"; } } } diff --git a/html/cgi-bin/logs.cgi/firewalllog.dat b/html/cgi-bin/logs.cgi/firewalllog.dat index dc75afeb1b..d1d49e42d7 100644 --- a/html/cgi-bin/logs.cgi/firewalllog.dat +++ b/html/cgi-bin/logs.cgi/firewalllog.dat @@ -24,6 +24,11 @@ require '/var/ipfire/general-functions.pl'; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + use POSIX(); #workaround to suppress a warning when a variable is used only once @@ -349,9 +354,9 @@ foreach $_ (@log) my @mactemp = split(/:/,$macaddr); $macaddr = "$mactemp[6]:$mactemp[7]:$mactemp[8]:$mactemp[9]:$mactemp[10]:$mactemp[11]"; if ($lines % 2) { - print "
\n"; } + print "
\n"; } else { - print "
\n"; } + print "
\n"; } my ($datetime,$title,$priority,$classification,$srcip,$srcport,$destip,$destport,$sid,$refs) = split(/\|/); print < diff --git a/html/cgi-bin/logs.cgi/log.dat b/html/cgi-bin/logs.cgi/log.dat index d6139580a4..9aa37ed855 100644 --- a/html/cgi-bin/logs.cgi/log.dat +++ b/html/cgi-bin/logs.cgi/log.dat @@ -19,6 +19,11 @@ require '/var/ipfire/general-functions.pl'; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + use POSIX(); #workaround to suppress a warning when a variable is used only once @@ -379,9 +384,9 @@ foreach $_ (@log) if ($lines % 2) { - print "
$time$sec" .&Header::cleanhtml ("$d", 'y') . "
$time   $pid   $attr1@loginfo$attr2
- - + \n"; - } - else { - print "\t\t\t\n"; - } - $id++; - print <\n"; + print <$p2pline[0]:
Protokoll - Netzwerk - Ziel - Anmerkung - Politik - Aktionen +
Protokoll + Netzwerk + Ziel + Anmerkung + Politik + Aktionen END ; foreach $configentry (sort @configs) @@ -240,7 +245,7 @@ END if ($outfwsettings{'STATE'} eq 'ALLOW'){ $outfwsettings{'DISPLAY_STATE'} = "ALLOW"; } if ((($outfwsettings{'POLICY'} eq 'MODE1') && ($outfwsettings{'STATE'} eq 'ALLOW')) || (($outfwsettings{'POLICY'} eq 'MODE2') && ($outfwsettings{'STATE'} eq 'DENY'))){ print < +
$outfwsettings{'PROT'} $outfwsettings{'SNET'} $outfwsettings{'DISPLAY_DIP'}:$outfwsettings{'DISPLAY_DPORT'} @@ -310,7 +315,7 @@ if ($outfwsettings{'POLICY'} eq 'MODE2'){ &Header::openbox('100%', 'center', 'P2P-Block'); print < -
Protokoll +
Protokoll Status END ; @@ -322,14 +327,8 @@ END
END ; - if ($id % 2) { - print "\t\t\t
END @@ -455,7 +454,7 @@ if ($outfwsettings{'POLICY'} eq 'MODE1') my @defservices = ; close FILE; -print ""; +print "
$Lang::tr{'service'}$Lang::tr{'description'}$Lang::tr{'port'}$Lang::tr{'protocol'}$Lang::tr{'source net'}
"; foreach my $serviceline(@defservices) { my @service = split(/,/,$serviceline); diff --git a/html/cgi-bin/ovpnmain.cgi b/html/cgi-bin/ovpnmain.cgi index af2f6e353c..7610414020 100644 --- a/html/cgi-bin/ovpnmain.cgi +++ b/html/cgi-bin/ovpnmain.cgi @@ -30,7 +30,10 @@ require "${General::swroot}/countries.pl"; my @dummy = ( ${Header::colourgreen} ); undef (@dummy); - +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); ### ### Initialize variables @@ -1460,9 +1463,9 @@ END if ($user2 >= 1){ for (my $idx = 1; $idx <= $user2; $idx++){ if ($idx % 2) { - print "\n"; + print "\n"; } else { - print "\n"; + print "\n"; } print ""; print ""; @@ -2875,7 +2878,7 @@ if (-f "${General::swroot}/ovpn/ca/cacert.pem") { $casubject =~ s+/Email+, E+; $casubject =~ s/ ST=/ S=/; print < + @@ -2907,7 +2910,7 @@ if (-f "${General::swroot}/ovpn/certs/servercert.pem") { $hostsubject =~ s+/Email+, E+; $hostsubject =~ s/ ST=/ S=/; print < + @@ -2941,9 +2944,9 @@ if (! -f "${General::swroot}/ovpn/ca/cacert.pem") { if (keys %cahash > 0) { foreach my $key (keys %cahash) { if (($key + 1) % 2) { - print "\n"; + print "\n"; } else { - print "\n"; + print "\n"; } print "\n"; print "\n"; diff --git a/html/cgi-bin/portfw.cgi b/html/cgi-bin/portfw.cgi index 91ccbf5d32..7aaa54dee3 100644 --- a/html/cgi-bin/portfw.cgi +++ b/html/cgi-bin/portfw.cgi @@ -38,6 +38,11 @@ require "${General::swroot}/header.pl"; my @dummy = ( ${Header::colouryellow} ); undef (@dummy); +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + my %cgiparams=(); my %selected=(); my %checked=(); @@ -764,10 +769,10 @@ while () print "\n"; } else { if ($id % 2) { - print "\n"; + print "\n"; } else { - print "\n"; + print "\n"; } } diff --git a/html/cgi-bin/pppsetup.cgi b/html/cgi-bin/pppsetup.cgi index 445097d9aa..e2dd4fc9ee 100644 --- a/html/cgi-bin/pppsetup.cgi +++ b/html/cgi-bin/pppsetup.cgi @@ -29,6 +29,11 @@ my $errormessage = ''; my $maxprofiles = 5; my $kernel=`/bin/uname -r | /usr/bin/tr -d '\012'`; +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + &Header::showhttpheaders(); $pppsettings{'ACTION'} = ''; @@ -647,7 +652,7 @@ print < - + @@ -696,7 +701,7 @@ if ($pppsettings{'TYPE'} eq 'isdn') { print < - + @@ -715,7 +720,7 @@ if ($pppsettings{'TYPE'} eq 'pptp') print < - + @@ -740,7 +745,7 @@ if ($pppsettings{'TYPE'} eq 'pppoe') print < - + @@ -771,7 +776,7 @@ if ($pppsettings{'TYPE'} eq 'fritzdsl') print < - + @@ -820,7 +825,7 @@ END print < - + @@ -851,7 +856,7 @@ print < - + diff --git a/html/cgi-bin/proxy.cgi b/html/cgi-bin/proxy.cgi index b91ec3a90f..e582b4e572 100644 --- a/html/cgi-bin/proxy.cgi +++ b/html/cgi-bin/proxy.cgi @@ -312,7 +312,7 @@ if (($proxysettings{'ACTION'} eq $Lang::tr{'save'}) || ($proxysettings{'ACTION'} $errormessage = $Lang::tr{'invalid input'}; goto ERROR; } - if (!(&General::validproxyport($proxysettings{'PROXY_PORT'}))) + if (!(&General::validport($proxysettings{'PROXY_PORT'}))) { $errormessage = $Lang::tr{'advproxy errmsg invalid proxy port'}; goto ERROR; diff --git a/html/cgi-bin/qos.cgi b/html/cgi-bin/qos.cgi index 3a0c8bfc5f..7cc9959124 100644 --- a/html/cgi-bin/qos.cgi +++ b/html/cgi-bin/qos.cgi @@ -102,6 +102,11 @@ $qossettings{'TOS'} = ''; &General::readhash("${General::swroot}/qos/settings", \%qossettings); &Header::getcgihash(\%qossettings); +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + &Header::openpage('QoS', 1, ''); &Header::openbigbox('100%', 'left', '', $errormessage); @@ -1097,24 +1102,24 @@ sub showclasses { &Header::openbox('100%', 'center', "Klasse: $classline[1]"); print < - - - - - - - - - + + + + + + + +
$Lang::tr{'service'}$Lang::tr{'description'}$Lang::tr{'port'}$Lang::tr{'protocol'}$Lang::tr{'source net'}
$users[$idx-1]{'CommonName'}$users[$idx-1]{'RealAddress'}
$Lang::tr{'root certificate'} $casubject @@ -2892,7 +2895,7 @@ END } else { # display rootcert generation buttons print < +
$Lang::tr{'root certificate'}: $Lang::tr{'not present'}  
$Lang::tr{'host certificate'} $hostsubject @@ -2924,7 +2927,7 @@ END } else { # Nothing print < +
$Lang::tr{'host certificate'}: $Lang::tr{'not present'}  
$cahash{$key}[0]$cahash{$key}[1]


$Lang::tr{'reconnection'}:$Lang::tr{'reconnection'}:
$Lang::tr{'manual'}

$Lang::tr{'isdn settings'}$Lang::tr{'isdn settings'}
$Lang::tr{'use ibod'}

$Lang::tr{'pptp settings'}$Lang::tr{'pptp settings'}
$Lang::tr{'phonebook entry'}

$Lang::tr{'pppoe settings'}$Lang::tr{'pppoe settings'}
PPPoE plugin

$Lang::tr{'adsl settings'}:$Lang::tr{'adsl settings'}:
$Lang::tr{'vpi number'}

$Lang::tr{'authentication'}$Lang::tr{'authentication'}
$Lang::tr{'username'}


DNS:DNS:
$Lang::tr{'automatic'}
$Lang::tr{'interface'} - Klasse - Prioritaet - Garantierte Bandbreite - Maximale Bandbreite - Burst - Ceil Burst - TOS - Aktionen -
$classline[0]$classline[1]$classline[2]$classline[3]$classline[4]$classline[5]$classline[6]$classline[7] +
$Lang::tr{'interface'} + Klasse + Prioritaet + Garantierte Bandbreite + Maximale Bandbreite + Burst + Ceil Burst + TOS + Aktionen +
$classline[0]$classline[1]$classline[2]$classline[3]$classline[4]$classline[5]$classline[6]$classline[7]
@@ -1531,4 +1536,4 @@ sub random_hex_color { my @color; push @color, @hex[rand(@hex)] for 1 .. $size; return join('', '#', @color); -} \ No newline at end of file +} diff --git a/html/cgi-bin/samba.cgi b/html/cgi-bin/samba.cgi index 8426e98d22..9819f85ed9 100644 --- a/html/cgi-bin/samba.cgi +++ b/html/cgi-bin/samba.cgi @@ -20,6 +20,8 @@ my %cgisettings = (); my %checked = (); my %netsettings = (); my %ovpnsettings = (); +my %color = (); +my %mainsettings = (); my $message = ""; my $errormessage = ""; @@ -42,6 +44,8 @@ my %shares = (); &General::readhash("${General::swroot}/ethernet/settings", \%netsettings); &General::readhash("${General::swroot}/ovpn/settings", \%ovpnsettings); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); ############################################################################################################################ ############################################# Samba Dienste fr Statusberprfung ########################################## @@ -156,7 +160,7 @@ if ($sambasettings{'ACTION'} eq 'globalreset') print < - @@ -174,7 +178,7 @@ if ($sambasettings{'ACTION'} eq 'sharesreset') print <
$Lang::tr{'resetglobals'} +
$Lang::tr{'resetglobals'}
$Lang::tr{'yes'}
- @@ -360,7 +364,6 @@ $selected{'SECURITY'}{$sambasettings{'SECURITY'}} = "selected='selected'"; &Header::openbox('100%', 'center', $Lang::tr{'samba'}); print <
$Lang::tr{'resetshares'} +
$Lang::tr{'resetshares'}
$Lang::tr{'yes'}
END @@ -371,7 +374,7 @@ if ( $message ne "" ) } print < +
$Lang::tr{'all services'}
$Lang::tr{'all services'}
END ; @@ -397,7 +400,7 @@ print <
- + @@ -434,7 +437,7 @@ END print < - + - + @@ -480,7 +483,7 @@ if ($sambasettings{'SECURITY'} eq 'user' && $sambasettings{'DOMAINMASTER'} eq 'o { print < - + END @@ -491,7 +494,7 @@ END { print < - + @@ -545,11 +548,10 @@ if ($sambasettings{'SECURITY'} eq 'user') &Header::openbox('100%', 'center', $Lang::tr{'accounting user pdc'}); } print <
$Lang::tr{'basic options'}
$Lang::tr{'basic options'}
$Lang::tr{'workgroup'}
$Lang::tr{'netbios name'}
$Lang::tr{'server string'}
$Lang::tr{'more'}

$Lang::tr{'security options'}
$Lang::tr{'security options'}
$Lang::tr{'security'}$Lang::tr{'unix password sync'}on / off

$Lang::tr{'network options'}
$Lang::tr{'network options'}
$Lang::tr{'os level'}
$Lang::tr{'socket options'}
$Lang::tr{'remote announce'}

$Lang::tr{'pdc options'}
$Lang::tr{'pdc options'}


$Lang::tr{'printing options'}
$Lang::tr{'printing options'}
$Lang::tr{'load printer'}
$Lang::tr{'printing'}
$Lang::tr{'printcap name'}
- + END ; @@ -714,11 +716,10 @@ END my $username = "$sambasettings{'NAME'}"; my $password = 'samba'; print <
$Lang::tr{'accounting'}
$Lang::tr{'accounting'}
$Lang::tr{'username'}$Lang::tr{'password'}
- +
$Lang::tr{'change passwords'}
$Lang::tr{'change passwords'}
$Lang::tr{'username'}
$Lang::tr{'password'}
@@ -738,11 +739,10 @@ END chomp $password; $password=~s/\s//g; print <
- + @@ -761,11 +761,10 @@ END chomp $pcname; $pcname=~s/\s//g; print <
$Lang::tr{'add user'}
$Lang::tr{'add user'}
$Lang::tr{'username'}
$Lang::tr{'password'}
$Lang::tr{'unix group'}
- + @@ -789,10 +788,9 @@ my %shares = config("${General::swroot}/samba/shares"); print <
$Lang::tr{'pc add'}
$Lang::tr{'pc add'}
$Lang::tr{'client'}
$Lang::tr{'unix group'}
$Lang::tr{'unix shell'}
- END ; @@ -858,10 +856,9 @@ END if ($sambasettings{'ACTION'} eq 'shareadd' || $sambasettings{'ACTION'} eq 'optioncaption' ) { print <
$Lang::tr{'manage shares'} +
$Lang::tr{'manage shares'}
$Lang::tr{'sharename'}$Lang::tr{'options'}
- + @@ -880,10 +877,9 @@ if ($sambasettings{'ACTION'} eq 'sharechange' || $sambasettings{'ACTION'} eq 'op { my $shareoption = $shares{$sambasettings{'NAME'}}; print <
$Lang::tr{'add share'}
$Lang::tr{'add share'}
$Lang::tr{'show share options'}
- + @@ -936,10 +932,9 @@ if ( -e "/var/ipfire/cups/enable") my @Printers = keys(%printer); print <
$Lang::tr{'edit share'}
$Lang::tr{'edit share'}
$Lang::tr{'show share options'}
- END ; @@ -985,10 +980,9 @@ END if ($sambasettings{'ACTION'} eq 'printeradd' || $sambasettings{'ACTION'} eq 'printercaption' ) { print <
$Lang::tr{'manage printers'} +
$Lang::tr{'manage printers'}
$Lang::tr{'printername'}$Lang::tr{'options'}
- + @@ -1008,10 +1002,9 @@ if ($sambasettings{'ACTION'} eq 'printerchange' || $sambasettings{'ACTION'} eq ' { my $printeroption = $printer{$sambasettings{'NAME'}}; print <
$Lang::tr{'add printer'}
$Lang::tr{'add printer'}
$Lang::tr{'show share options'}
- + @@ -1056,10 +1049,9 @@ if ($sambasettings{'ACTION'} eq 'smbprinterchange') &Header::openbox('100%', 'center', 'Status'); print <
$Lang::tr{'edit printer'}
$Lang::tr{'edit printer'}
$Lang::tr{'show share options'}
- +
$Lang::tr{'samba status'}
$Lang::tr{'samba status'}
$Status
END @@ -1079,11 +1071,10 @@ $Log=~s/\n/
/g; &Header::openbox('100%', 'center', $Lang::tr{'log'}); print <
- +\n"; } - print "\n"; + print "\n\n"; my $shortname = $servicenames{$key}; my $status = &isrunning($shortname); print "$status\n"; print "\n"; - $lines++; } diff --git a/html/cgi-bin/traffic.cgi b/html/cgi-bin/traffic.cgi index e8337ec222..dae5c96cea 100644 --- a/html/cgi-bin/traffic.cgi +++ b/html/cgi-bin/traffic.cgi @@ -18,6 +18,11 @@ require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl"; require '/var/ipfire/net-traffic/net-traffic-lib.pl'; +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + my %cgiparams; my %pppsettings; my %netsettings; @@ -225,9 +230,9 @@ foreach (@allDays) { $total_red_out += $allDaysBytes{$_}{${Traffic::red_out}}; if ($lines % 2) { - print ""; } + print ""; } else { - print ""; } + print ""; } printf "\n", $allDaysBytes{$_}{'Day'}; printf "\n", ($allDaysBytes{$_}{${Traffic::green_in}}/1048576); @@ -259,8 +264,8 @@ $total_orange_out=sprintf("%.2f", ($total_orange_out/1048576)); $total_red_in=sprintf("%.2f", ($total_red_in/1048576)); $total_red_out=sprintf("%.2f", ($total_red_out/1048576)); -if ($lines % 2) {print ""; } -else {print ""; } +if ($lines % 2) {print ""; } +else {print ""; } print <$Lang::tr{'trafficsum'} diff --git a/html/cgi-bin/tripwire.cgi b/html/cgi-bin/tripwire.cgi index d33fa33add..965ec60cc2 100644 --- a/html/cgi-bin/tripwire.cgi +++ b/html/cgi-bin/tripwire.cgi @@ -25,6 +25,11 @@ my $file = `ls -tr /var/ipfire/tripwire/report/ | tail -1`; my @cronjobs = `ls /etc/fcron.daily/tripwire*`; my $Log =$Lang::tr{'no log selected'}; +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + ############################################################################################################################ ################################################# Tripwire Default Variablen ################################################ @@ -105,7 +110,7 @@ if ($tripwiresettings{'ACTION'} eq 'addcron') print <
$Lang::tr{'log view'}
$Lang::tr{'log view'}

$key
$key
%s%.3f
-
$Lang::tr{'add cron'} +
$Lang::tr{'add cron'}
HHMM

@@ -125,7 +130,7 @@ if ($tripwiresettings{'ACTION'} eq 'globalreset') print < -
$Lang::tr{'resetglobals'} +
$Lang::tr{'resetglobals'}
$Lang::tr{'defaultwarning'}

$Lang::tr{'ok'} @@ -144,7 +149,7 @@ if ($tripwiresettings{'ACTION'} eq 'generatepolicypw') print < - @@ -165,7 +170,7 @@ if ($tripwiresettings{'ACTION'} eq 'policyresetpw') print <
$Lang::tr{'generatepolicy'} +
$Lang::tr{'generatepolicy'}
$Lang::tr{'tripwirewarningpolicy'}

$Lang::tr{'sitekey'}
$Lang::tr{'localkey'}

- @@ -186,7 +191,7 @@ if ($tripwiresettings{'ACTION'} eq 'updatedatabasepw') print <
$Lang::tr{'resetpolicy'} +
$Lang::tr{'resetpolicy'}
$Lang::tr{'tripwirewarningpolicy'}

$Lang::tr{'sitekey'}
$Lang::tr{'localkey'}

-
$Lang::tr{'updatedatabase'} +
$Lang::tr{'updatedatabase'}
$Lang::tr{'tripwirewarningdatabase'}

$Lang::tr{'localkey'}

@@ -205,7 +210,7 @@ if ($tripwiresettings{'ACTION'} eq 'keyreset') print < -
$Lang::tr{'keyreset'} +
$Lang::tr{'keyreset'}
$Lang::tr{'tripwirewarningkeys'}

$Lang::tr{'ok'} @@ -224,7 +229,7 @@ if ($tripwiresettings{'ACTION'} eq 'generatekeys') print < -
$Lang::tr{'generatekeys'} +
$Lang::tr{'generatekeys'}
$Lang::tr{'tripwirewarningkeys'}

$Lang::tr{'ok'} @@ -308,12 +313,11 @@ if ($tripwiresettings{'ACTION'} eq 'deletecron'){system("/usr/local/bin/tripwire &Header::openbox('100%', 'center', 'Tripwire'); print <
- + @@ -357,12 +361,11 @@ END &Header::openbox('100%', 'center', $Lang::tr{'generate tripwire keys and init'}); print <
$Lang::tr{'basic options'}
$Lang::tr{'basic options'}
$Lang::tr{'emailreportlevel'}
$Lang::tr{'reportlevel'}
$Lang::tr{'mailmethod'}
- +
$Lang::tr{'keys'}
$Lang::tr{'keys'}
$Lang::tr{'sitekey'}
$Lang::tr{'localkey'}
@@ -402,7 +405,6 @@ END &Header::openbox('100%', 'center', $Lang::tr{'tripwire functions'}); print <
@@ -446,11 +448,10 @@ END &Header::openbox('100%', 'center', $Lang::tr{'tripwire reports'}); print <
- +\n";} - else - {print "\n"; } - - print " @@ -2663,7 +2668,7 @@ EOF my $casubject = &Header::cleanhtml(getsubjectfromcert ("${General::swroot}/ca/cacert.pem")); print < + @@ -2696,7 +2701,7 @@ END my $hostsubject = &Header::cleanhtml(getsubjectfromcert ("${General::swroot}/certs/hostcert.pem")); print < + @@ -2729,9 +2734,9 @@ END if (keys %cahash > 0) { foreach my $key (keys %cahash) { if ($rowcolor++ % 2) { - print "\n"; + print "\n"; } else { - print "\n"; + print "\n"; } print "\n"; print "\n"; diff --git a/html/cgi-bin/wakeonlan.cgi b/html/cgi-bin/wakeonlan.cgi index da6bfe3bc9..e38ff2825b 100644 --- a/html/cgi-bin/wakeonlan.cgi +++ b/html/cgi-bin/wakeonlan.cgi @@ -37,6 +37,11 @@ my @wol_devices = (); our $datafile = "/var/ipfire/wakeonlan/clients.conf"; &ReadConfig; +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + my %netsettings = (); &General::readhash("${General::swroot}/ethernet/settings", \%netsettings); my %cgiparams = (); @@ -298,11 +303,11 @@ for $i ( 0 .. $#wol_devices ) } elsif ( $i % 2) { - print ""; + print ""; } else { - print ""; + print ""; } print <\n"; } elsif ($id % 2) { - print "\n"; } + print "\n"; } else { - print "\n"; } + print "\n"; } if ($temp[3] eq 'on') { $gif='on.gif'; $toggle='off'; $gdesc=$Lang::tr{'click to disable'};} else { $gif='off.gif'; $toggle='on'; $gdesc=$Lang::tr{'click to enable'}; } if ($temp[1] eq '0.0.0.0/0') { diff --git a/html/html/themes/ipfire/include/colors.txt b/html/html/themes/ipfire/include/colors.txt index bcc0a0c010..547e20a430 100644 --- a/html/html/themes/ipfire/include/colors.txt +++ b/html/html/themes/ipfire/include/colors.txt @@ -17,9 +17,9 @@ color16=#40E0D0 color17=#90EE90 color18=#F4A460 color19=#EAE9EE -color20=#EAE9EE +color20=#E0E0E0 color21=#EAE9EE -color22=#EAE9EE +color22=#F0F0F0 color23=#FF00FF color24=#6464FF color25=#FF6464 diff --git a/html/html/themes/maniac/include/colors.txt b/html/html/themes/maniac/include/colors.txt index 900e210b24..39961e3be0 100644 --- a/html/html/themes/maniac/include/colors.txt +++ b/html/html/themes/maniac/include/colors.txt @@ -17,9 +17,9 @@ color16=#40E0D0 color17=#90EE90 color18=#F4A460 color19=#EAE9EE -color20=#EAE9EE +color20=#1C1C1C color21=#CD6600 -color22=#EAE9EE +color22=#4F4F4F color23=#FF00FF color24=#6464FF color25=#FF6464 -- 2.39.2
$Lang::tr{'log view'}
$Lang::tr{'log view'}

- -END -; -foreach my $cronjob (@cronjobs) {chomp $cronjob;my $time=$cronjob; $time=~s/\/etc\/fcron.daily\/tripwire//g;print"";} -print < -
-

$cronjob at $time daily
- - -
- -
- -
-END -; - -if ($tripwiresettings{'ACTION'} eq 'croncaption') -{ -print < - - - - -
$Lang::tr{'caption'}
$Lang::tr{'add cron'}
$Lang::tr{'delete cron'}
-END -; -} +# +#&Header::openbox('100%', 'center', $Lang::tr{'tripwire cronjob'}); +#print < +# +# +#END +#; +#foreach my $cronjob (@cronjobs) {chomp $cronjob;my $time=$cronjob; $time=~s/\/etc\/fcron.daily\/tripwire//g;print"";} +#print < +#
+#

$cronjob at $time daily
+# +# +#
+# +#
+# +#
+#END +#; + +#if ($tripwiresettings{'ACTION'} eq 'croncaption') +#{ +#print < +# +# +# +# +#
$Lang::tr{'caption'}
$Lang::tr{'add cron'}
$Lang::tr{'delete cron'}
+#END +#; +#} &Header::closebox(); diff --git a/html/cgi-bin/upnp.cgi b/html/cgi-bin/upnp.cgi index eb635bb5bd..b1e7ed2525 100644 --- a/html/cgi-bin/upnp.cgi +++ b/html/cgi-bin/upnp.cgi @@ -24,6 +24,11 @@ my %selected= () ; my %servicenames =('UPnP Daemon' => 'upnpd',); +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + &Header::showhttpheaders(); ############################################################################################################################ ############################################### Setzen von Standartwerten ################################################## @@ -122,12 +127,7 @@ my $lines = 0; my $key = ''; foreach $key (sort keys %servicenames) { - if ($lines % 2) - {print "
$key\n"; + print "
$key\n"; my $shortname = $servicenames{$key}; my $status = &isrunning($shortname); print "$status\n"; @@ -144,7 +144,7 @@ print <
- + diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi index 390a2c6b9f..ba3fe09584 100644 --- a/html/cgi-bin/vpnmain.cgi +++ b/html/cgi-bin/vpnmain.cgi @@ -33,6 +33,11 @@ my %selected=(); my $warnmessage = ''; my $errormessage = ''; +my %color = (); +my %mainsettings = (); +&General::readhash("${General::swroot}/main/settings", \%mainsettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color); + &General::readhash("${General::swroot}/ethernet/settings", \%netsettings); $cgiparams{'ENABLED'} = 'off'; $cgiparams{'EDIT_ADVANCED'} = 'off'; @@ -2506,9 +2511,9 @@ END if ($confighash{$key}[0] eq 'on') { $gif = 'on.gif'; } else { $gif = 'off.gif'; } if ($id % 2) { - print "\n"; + print "\n"; } else { - print "\n"; + print "\n"; } print ""; print ""; @@ -2529,7 +2534,7 @@ END } # move to blueif really down if ($confighash{$key}[0] eq 'off' && $active =~ /${Header::colourred}/ ) { - $active = "
$Lang::tr{'options'}
$Lang::tr{'options'}

UPnP Device Name:

$confighash{$key}[1]" . $Lang::tr{"$confighash{$key}[3]"} . " (" . $Lang::tr{"$confighash{$key}[4]"} . ")
$Lang::tr{'capsinactive'}
"; + $active = "
$Lang::tr{'capsclosed'}
"; } print <$active
$Lang::tr{'root certificate'} $casubject @@ -2684,7 +2689,7 @@ END } else { # display rootcert generation buttons print < +
$Lang::tr{'root certificate'}: $Lang::tr{'not present'}  
$Lang::tr{'host certificate'} $hostsubject @@ -2717,7 +2722,7 @@ END } else { # Nothing print < +
$Lang::tr{'host certificate'}: $Lang::tr{'not present'}  
$cahash{$key}[0]$cahash{$key}[1]