This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, next has been updated via 31f31c43591c6a4e456c937b2005640abec24a60 (commit) via cfa7eab02f1b43394ad60bf196114e2827cf671b (commit) via 496df9728ea05c266ba72d6db311c92842744e2a (commit) via 2ad1a8bc0cc74ab98f0255657edcc53e54841680 (commit) from 83eb743523eae784bde6cc6b30dbe5d3af428d41 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 31f31c43591c6a4e456c937b2005640abec24a60 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat May 11 11:43:46 2013 +0200
core68: Update rootfiles.
commit cfa7eab02f1b43394ad60bf196114e2827cf671b Author: Michael Tremer michael.tremer@ipfire.org Date: Sat May 11 11:42:03 2013 +0200
Revert "ipsec: Shut up strongswan logging."
This reverts commit 43f4c938c18775afd3ed03295c1dbdbca588d761.
Conflicts: config/rootfiles/oldcore/66/update.sh
commit 496df9728ea05c266ba72d6db311c92842744e2a Author: Michael Tremer michael.tremer@ipfire.org Date: Sat May 11 11:40:00 2013 +0200
Update langs.
commit 2ad1a8bc0cc74ab98f0255657edcc53e54841680 Author: Michael Tremer michael.tremer@ipfire.org Date: Sat May 11 11:39:36 2013 +0200
Revert "Update accelerator changes from Jörn-Ingo Weigert."
This reverts commit 5cf2c339680b6922a08ebf1d44dab5c90ba2d5d4.
Conflicts: html/html/themes/ipfire/include/functions.pl html/html/themes/maniac/include/functions.pl langs/de/cgi-bin/de.pl langs/en/cgi-bin/en.pl
-----------------------------------------------------------------------
Summary of changes: config/rootfiles/core/68/filelists/files | 34 +- config/rootfiles/core/68/update.sh | 3 + doc/language_issues.de | 8 +- doc/language_issues.en | 6 +- doc/language_issues.es | 11 - doc/language_issues.fr | 11 - doc/language_issues.nl | 11 - doc/language_issues.pl | 11 - doc/language_issues.ru | 11 - doc/language_missings | 32 - html/cgi-bin/updatexlrator.cgi | 2425 +++++++++++--------- html/cgi-bin/vpnmain.cgi | 3 - html/html/images/updbooster/updxl-globe.gif | Bin 0 -> 1124 bytes .../led-green.gif => updbooster/updxl-gr.gif} | Bin html/html/images/updbooster/updxl-led-blue.gif | Bin 0 -> 158 bytes html/html/images/updbooster/updxl-led-gray.gif | Bin 0 -> 158 bytes .../updxl-led-green.gif} | Bin .../led-red.gif => updbooster/updxl-led-red.gif} | Bin html/html/images/updbooster/updxl-led-yellow.gif | Bin 0 -> 158 bytes .../led-red.gif => updbooster/updxl-rd.gif} | Bin html/html/images/updbooster/updxl-src-adobe.gif | Bin 1135 -> 1000 bytes .../images/updbooster/updxl-src-ageofconan.gif | Bin 1171 -> 0 bytes html/html/images/updbooster/updxl-src-avira.gif | Bin 1127 -> 1045 bytes html/html/images/updbooster/updxl-src-curse.gif | Bin 1090 -> 0 bytes .../html/images/updbooster/updxl-src-diabloiii.gif | Bin 979 -> 0 bytes .../html/images/updbooster/updxl-src-eveonline.gif | Bin 411 -> 0 bytes html/html/images/updbooster/updxl-src-google.gif | Bin 586 -> 0 bytes html/html/images/updbooster/updxl-src-ipfire.gif | Bin 1036 -> 0 bytes .../html/images/updbooster/updxl-src-kaspersky.gif | Bin 628 -> 996 bytes html/html/images/updbooster/updxl-src-mozilla.gif | Bin 1092 -> 0 bytes html/html/images/updbooster/updxl-src-nvidia.gif | Bin 1000 -> 0 bytes html/html/images/updbooster/updxl-src-opera.gif | Bin 1016 -> 0 bytes html/html/images/updbooster/updxl-src-secunia.gif | Bin 316 -> 0 bytes html/html/images/updbooster/updxl-src-swtor.gif | Bin 1101 -> 0 bytes html/html/images/updbooster/updxl-src-wot.gif | Bin 114 -> 0 bytes html/html/images/updbooster/updxl-src-wow.gif | Bin 1111 -> 0 bytes html/html/images/updbooster/updxl-yl.gif | Bin 0 -> 158 bytes html/html/themes/ipfire/images/updxl-icons.gif | Bin 2358 -> 0 bytes html/html/themes/ipfire/include/functions.pl | 111 +- html/html/themes/ipfire/include/upxlr.css | 384 ---- html/html/themes/maniac/images/Thumbs.db | Bin 0 -> 13312 bytes html/html/themes/maniac/images/updxl-icons.gif | Bin 2358 -> 0 bytes html/html/themes/maniac/include/functions.pl | 206 +- html/html/themes/maniac/include/upxlr.css | 390 ---- langs/de/cgi-bin/de.pl | 21 +- langs/en/cgi-bin/en.pl | 19 +- 46 files changed, 1483 insertions(+), 2214 deletions(-) create mode 100644 html/html/images/updbooster/updxl-globe.gif copy html/html/images/{urlfilter/led-green.gif => updbooster/updxl-gr.gif} (100%) create mode 100644 html/html/images/updbooster/updxl-led-blue.gif create mode 100644 html/html/images/updbooster/updxl-led-gray.gif copy html/html/images/{urlfilter/led-green.gif => updbooster/updxl-led-green.gif} (100%) copy html/html/images/{urlfilter/led-red.gif => updbooster/updxl-led-red.gif} (100%) create mode 100644 html/html/images/updbooster/updxl-led-yellow.gif copy html/html/images/{urlfilter/led-red.gif => updbooster/updxl-rd.gif} (100%) delete mode 100644 html/html/images/updbooster/updxl-src-ageofconan.gif delete mode 100644 html/html/images/updbooster/updxl-src-curse.gif delete mode 100644 html/html/images/updbooster/updxl-src-diabloiii.gif delete mode 100644 html/html/images/updbooster/updxl-src-eveonline.gif delete mode 100644 html/html/images/updbooster/updxl-src-google.gif delete mode 100644 html/html/images/updbooster/updxl-src-ipfire.gif delete mode 100644 html/html/images/updbooster/updxl-src-mozilla.gif delete mode 100644 html/html/images/updbooster/updxl-src-nvidia.gif delete mode 100644 html/html/images/updbooster/updxl-src-opera.gif delete mode 100644 html/html/images/updbooster/updxl-src-secunia.gif delete mode 100644 html/html/images/updbooster/updxl-src-swtor.gif delete mode 100644 html/html/images/updbooster/updxl-src-wot.gif delete mode 100644 html/html/images/updbooster/updxl-src-wow.gif create mode 100644 html/html/images/updbooster/updxl-yl.gif delete mode 100644 html/html/themes/ipfire/images/updxl-icons.gif delete mode 100644 html/html/themes/ipfire/include/upxlr.css create mode 100644 html/html/themes/maniac/images/Thumbs.db delete mode 100644 html/html/themes/maniac/images/updxl-icons.gif delete mode 100644 html/html/themes/maniac/include/upxlr.css
Difference in files: diff --git a/config/rootfiles/core/68/filelists/files b/config/rootfiles/core/68/filelists/files index c96e7cf..15680e6 100644 --- a/config/rootfiles/core/68/filelists/files +++ b/config/rootfiles/core/68/filelists/files @@ -4,39 +4,11 @@ etc/modprobe.d/blacklist srv/web/ipfire/cgi-bin/connections.cgi srv/web/ipfire/cgi-bin/ovpnmain.cgi srv/web/ipfire/cgi-bin/services.cgi -srv/web/ipfire/cgi-bin/updatexlrator.cgi -srv/web/ipfire/html/images/updbooster/updxl-src-adobe.gif -srv/web/ipfire/html/images/updbooster/updxl-src-ageofconan.gif -srv/web/ipfire/html/images/updbooster/updxl-src-apple.gif -srv/web/ipfire/html/images/updbooster/updxl-src-avast.gif -srv/web/ipfire/html/images/updbooster/updxl-src-avg.gif -srv/web/ipfire/html/images/updbooster/updxl-src-avira.gif -srv/web/ipfire/html/images/updbooster/updxl-src-curse.gif -srv/web/ipfire/html/images/updbooster/updxl-src-diabloiii.gif -srv/web/ipfire/html/images/updbooster/updxl-src-eveonline.gif -srv/web/ipfire/html/images/updbooster/updxl-src-google.gif -srv/web/ipfire/html/images/updbooster/updxl-src-ipfire.gif -srv/web/ipfire/html/images/updbooster/updxl-src-kaspersky.gif -srv/web/ipfire/html/images/updbooster/updxl-src-linux.gif -srv/web/ipfire/html/images/updbooster/updxl-src-microsoft.gif -srv/web/ipfire/html/images/updbooster/updxl-src-mozilla.gif -srv/web/ipfire/html/images/updbooster/updxl-src-nvidia.gif -srv/web/ipfire/html/images/updbooster/updxl-src-opera.gif -srv/web/ipfire/html/images/updbooster/updxl-src-secunia.gif -srv/web/ipfire/html/images/updbooster/updxl-src-swtor.gif -srv/web/ipfire/html/images/updbooster/updxl-src-symantec.gif -srv/web/ipfire/html/images/updbooster/updxl-src-trendmicro.gif -srv/web/ipfire/html/images/updbooster/updxl-src-unknown.gif -srv/web/ipfire/html/images/updbooster/updxl-src-windows.gif -srv/web/ipfire/html/images/updbooster/updxl-src-wot.gif -srv/web/ipfire/html/images/updbooster/updxl-src-wow.gif -srv/web/ipfire/html/themes/ipfire/include/style.css -srv/web/ipfire/html/themes/ipfire/include/upxlr.css +srv/web/ipfire/cgi-bin/vpnmain.cgi srv/web/ipfire/html/themes/ipfire/include/functions.pl -srv/web/ipfire/html/themes/ipfire/images/updxl-icons.gif +srv/web/ipfire/html/themes/ipfire/include/style.css +srv/web/ipfire/html/themes/maniac/include/functions.pl srv/web/ipfire/html/themes/maniac/include/style.css -srv/web/ipfire/html/themes/maniac/include/upxlr.css -srv/web/ipfire/html/themes/maniac/images/updxl-icons.gif srv/web/ipfire/html/include/jquery-1.9.1.min.js usr/bin/locale usr/local/bin/consort.sh diff --git a/config/rootfiles/core/68/update.sh b/config/rootfiles/core/68/update.sh index e68229a..5ccf71e 100644 --- a/config/rootfiles/core/68/update.sh +++ b/config/rootfiles/core/68/update.sh @@ -45,6 +45,9 @@ rm -rf /opt/pakfire/db/*/meta-freefont #Extract files extract_files
+# Regenerate ipsec configuration files. +/srv/web/ipfire/cgi-bin/vpnmain.cgi + # #Start services if [ `grep "ENABLED=on" /var/ipfire/vpn/settings` ]; then diff --git a/doc/language_issues.de b/doc/language_issues.de index 9179964..65c0749 100644 --- a/doc/language_issues.de +++ b/doc/language_issues.de @@ -435,8 +435,11 @@ WARNING: translation string unused: updates is old1 WARNING: translation string unused: updates is old2 WARNING: translation string unused: updxlrtr children WARNING: translation string unused: updxlrtr invalid num of children -WARNING: translation string unused: updxlrtr to delete +WARNING: translation string unused: updxlrtr sources +WARNING: translation string unused: updxlrtr standard view WARNING: translation string unused: updxlrtr unknown +WARNING: translation string unused: updxlrtr update information +WARNING: translation string unused: updxlrtr update notification WARNING: translation string unused: upload file WARNING: translation string unused: upload static key WARNING: translation string unused: upload successful @@ -481,7 +484,4 @@ WARNING: untranslated string: route config changed WARNING: untranslated string: routing config added WARNING: untranslated string: routing config changed WARNING: untranslated string: routing table -WARNING: untranslated string: updxlrtr cache overview -WARNING: untranslated string: updxlrtr cache settings -WARNING: untranslated string: updxlrtr configuration WARNING: untranslated string: wlanap country diff --git a/doc/language_issues.en b/doc/language_issues.en index 0b27a19..d05caf4 100644 --- a/doc/language_issues.en +++ b/doc/language_issues.en @@ -466,8 +466,12 @@ WARNING: translation string unused: updates is old1 WARNING: translation string unused: updates is old2 WARNING: translation string unused: updxlrtr children WARNING: translation string unused: updxlrtr invalid num of children -WARNING: translation string unused: updxlrtr to delete +WARNING: translation string unused: updxlrtr sources +WARNING: translation string unused: updxlrtr standard view WARNING: translation string unused: updxlrtr unknown +WARNING: translation string unused: updxlrtr update information +WARNING: translation string unused: updxlrtr update notification +WARNING: translation string unused: updxlrtr used by WARNING: translation string unused: upload fcdsl.o WARNING: translation string unused: upload file WARNING: translation string unused: upload static key diff --git a/doc/language_issues.es b/doc/language_issues.es index 9bdd62f..538f240 100644 --- a/doc/language_issues.es +++ b/doc/language_issues.es @@ -619,17 +619,6 @@ WARNING: untranslated string: routing table WARNING: untranslated string: server restart WARNING: untranslated string: static routes WARNING: untranslated string: system information -WARNING: untranslated string: updxlrtr cache overview -WARNING: untranslated string: updxlrtr cache settings -WARNING: untranslated string: updxlrtr current view -WARNING: untranslated string: updxlrtr no pending downloads attime -WARNING: untranslated string: updxlrtr notice dlrate -WARNING: untranslated string: updxlrtr overview -WARNING: untranslated string: updxlrtr settings -WARNING: untranslated string: updxlrtr sources -WARNING: untranslated string: updxlrtr standard view -WARNING: untranslated string: updxlrtr total used -WARNING: untranslated string: updxlrtr used by WARNING: untranslated string: uptime load average WARNING: untranslated string: visit us at WARNING: untranslated string: vpn keyexchange diff --git a/doc/language_issues.fr b/doc/language_issues.fr index dfb6551..dc14c54 100644 --- a/doc/language_issues.fr +++ b/doc/language_issues.fr @@ -604,17 +604,6 @@ WARNING: untranslated string: server restart WARNING: untranslated string: snort working WARNING: untranslated string: static routes WARNING: untranslated string: system information -WARNING: untranslated string: updxlrtr cache overview -WARNING: untranslated string: updxlrtr cache settings -WARNING: untranslated string: updxlrtr current view -WARNING: untranslated string: updxlrtr no pending downloads attime -WARNING: untranslated string: updxlrtr notice dlrate -WARNING: untranslated string: updxlrtr overview -WARNING: untranslated string: updxlrtr settings -WARNING: untranslated string: updxlrtr sources -WARNING: untranslated string: updxlrtr standard view -WARNING: untranslated string: updxlrtr total used -WARNING: untranslated string: updxlrtr used by WARNING: untranslated string: upload new ruleset WARNING: untranslated string: uptime load average WARNING: untranslated string: urlfilter file ext block diff --git a/doc/language_issues.nl b/doc/language_issues.nl index caf1286..932f272 100644 --- a/doc/language_issues.nl +++ b/doc/language_issues.nl @@ -520,15 +520,4 @@ WARNING: untranslated string: route config changed WARNING: untranslated string: routing config added WARNING: untranslated string: routing config changed WARNING: untranslated string: routing table -WARNING: untranslated string: updxlrtr cache overview -WARNING: untranslated string: updxlrtr cache settings -WARNING: untranslated string: updxlrtr current view -WARNING: untranslated string: updxlrtr no pending downloads attime -WARNING: untranslated string: updxlrtr notice dlrate -WARNING: untranslated string: updxlrtr overview -WARNING: untranslated string: updxlrtr settings -WARNING: untranslated string: updxlrtr sources -WARNING: untranslated string: updxlrtr standard view -WARNING: untranslated string: updxlrtr total used -WARNING: untranslated string: updxlrtr used by WARNING: untranslated string: uptime load average diff --git a/doc/language_issues.pl b/doc/language_issues.pl index 9bdd62f..538f240 100644 --- a/doc/language_issues.pl +++ b/doc/language_issues.pl @@ -619,17 +619,6 @@ WARNING: untranslated string: routing table WARNING: untranslated string: server restart WARNING: untranslated string: static routes WARNING: untranslated string: system information -WARNING: untranslated string: updxlrtr cache overview -WARNING: untranslated string: updxlrtr cache settings -WARNING: untranslated string: updxlrtr current view -WARNING: untranslated string: updxlrtr no pending downloads attime -WARNING: untranslated string: updxlrtr notice dlrate -WARNING: untranslated string: updxlrtr overview -WARNING: untranslated string: updxlrtr settings -WARNING: untranslated string: updxlrtr sources -WARNING: untranslated string: updxlrtr standard view -WARNING: untranslated string: updxlrtr total used -WARNING: untranslated string: updxlrtr used by WARNING: untranslated string: uptime load average WARNING: untranslated string: visit us at WARNING: untranslated string: vpn keyexchange diff --git a/doc/language_issues.ru b/doc/language_issues.ru index 3d9fe2d..3f2ba5c 100644 --- a/doc/language_issues.ru +++ b/doc/language_issues.ru @@ -583,17 +583,6 @@ WARNING: untranslated string: routing config changed WARNING: untranslated string: routing table WARNING: untranslated string: server restart WARNING: untranslated string: static routes -WARNING: untranslated string: updxlrtr cache overview -WARNING: untranslated string: updxlrtr cache settings -WARNING: untranslated string: updxlrtr current view -WARNING: untranslated string: updxlrtr no pending downloads attime -WARNING: untranslated string: updxlrtr notice dlrate -WARNING: untranslated string: updxlrtr overview -WARNING: untranslated string: updxlrtr settings -WARNING: untranslated string: updxlrtr sources -WARNING: untranslated string: updxlrtr standard view -WARNING: untranslated string: updxlrtr total used -WARNING: untranslated string: updxlrtr used by WARNING: untranslated string: uptime load average WARNING: untranslated string: visit us at WARNING: untranslated string: vpn keyexchange diff --git a/doc/language_missings b/doc/language_missings index 6f0f3a6..85e59ab 100644 --- a/doc/language_missings +++ b/doc/language_missings @@ -109,16 +109,8 @@ < snort working < static routes < system information -< updxlrtr current view -< updxlrtr no pending downloads attime -< updxlrtr notice dlrate -< updxlrtr overview -< updxlrtr settings < updxlrtr sources < updxlrtr standard view -< updxlrtr to delete -< updxlrtr total used -< updxlrtr used by < upload new ruleset < uptime < uptime load average @@ -266,16 +258,8 @@ < Set time on boot < static routes < system information -< updxlrtr current view -< updxlrtr no pending downloads attime -< updxlrtr notice dlrate -< updxlrtr overview -< updxlrtr settings < updxlrtr sources < updxlrtr standard view -< updxlrtr to delete -< updxlrtr total used -< updxlrtr used by < uptime < uptime load average < visit us at @@ -375,16 +359,8 @@ < qos enter bandwidths < server restart < static routes -< updxlrtr current view -< updxlrtr no pending downloads attime -< updxlrtr notice dlrate -< updxlrtr overview -< updxlrtr settings < updxlrtr sources < updxlrtr standard view -< updxlrtr to delete -< updxlrtr total used -< updxlrtr used by < uptime < uptime load average < visit us at @@ -489,16 +465,8 @@ < qos enter bandwidths < server restart < static routes -< updxlrtr current view -< updxlrtr no pending downloads attime -< updxlrtr notice dlrate -< updxlrtr overview -< updxlrtr settings < updxlrtr sources < updxlrtr standard view -< updxlrtr to delete -< updxlrtr total used -< updxlrtr used by < uptime < uptime load average < visit us at diff --git a/html/cgi-bin/updatexlrator.cgi b/html/cgi-bin/updatexlrator.cgi index 42362c2..df77a86 100644 --- a/html/cgi-bin/updatexlrator.cgi +++ b/html/cgi-bin/updatexlrator.cgi @@ -36,8 +36,8 @@ use strict;
# enable only the following on debugging purpose -use warnings; # no warnings 'once';# 'redefine', 'uninitialized'; -use CGI::Carp 'fatalsToBrowser'; +#use warnings; no warnings 'once';# 'redefine', 'uninitialized'; +#use CGI::Carp 'fatalsToBrowser';
use IO::Socket;
@@ -45,6 +45,7 @@ require '/var/ipfire/general-functions.pl'; require "${General::swroot}/lang.pl"; require "${General::swroot}/header.pl";
+my %color = (); my %checked=(); my %selected=(); my %netsettings=(); @@ -55,8 +56,6 @@ my %dlinfo=(); my $id=0; my @dfdata=(); my $dfstr=''; -my $dudata=''; -my $dustr=''; my @updatelist=(); my @sources=(); my $sourceurl=''; @@ -64,7 +63,6 @@ my $vendorid=''; my $uuid=''; my $status=0; my $updatefile=''; -my $cachefile=''; my $shortname=''; my $time=''; my $filesize=0; @@ -80,11 +78,11 @@ my $cachehits=0; my $efficiency='0.0'; my @vendors=(); my %vendorstats=(); -my %vendimg = ();
-my $repository = '/var/updatecache/'; -my $webhome = '/srv/web/ipfire/html'; -my $webimgdir = '/images/updbooster'; +my $repository = "/var/updatecache/"; +my $webhome = "/srv/web/ipfire/html"; +my $hintcolour = '#FFFFCC'; +my $colourgray = '#808080';
my $sfUnknown='0'; my $sfOk='1'; @@ -93,7 +91,7 @@ my $sfNoSource='3';
my $not_accessed_last='';
-my @errormessages=(); +my $errormessage='';
my @repositorylist=(); my @repositoryfiles=(); @@ -105,6 +103,7 @@ my @metadata=(); &General::readhash("${General::swroot}/ethernet/settings", %netsettings); &General::readhash("${General::swroot}/main/settings", %mainsettings); &General::readhash("${General::swroot}/proxy/settings", %proxysettings); +&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", %color);
$xlratorsettings{'ACTION'} = ''; $xlratorsettings{'ENABLE_LOG'} = 'off'; @@ -117,1305 +116,1451 @@ $xlratorsettings{'FULL_AUTOSYNC'} = 'off'; $xlratorsettings{'NOT_ACCESSED_LAST'} = 'month1'; $xlratorsettings{'REMOVE_NOSOURCE'} = 'off'; $xlratorsettings{'REMOVE_OUTDATED'} = 'off'; -$xlratorsettings{'REMOVE_UNKNOWN'} = 'off'; -$xlratorsettings{'REMOVE_TODELETE'} = 'off'; -$xlratorsettings{'TODELETE'} = 'off'; -$xlratorsettings{'show'} = ''; +$xlratorsettings{'REMOVE_OBSOLETE'} = 'off';
&Header::getcgihash(%xlratorsettings);
-# ------------------------------------------------------ -# Check if some ACTION is required -# ------------------------------------------------------ +$xlratorsettings{'EXTENDED_GUI'} = ''; + +if ($xlratorsettings{'ACTION'} eq "$Lang::tr{'updxlrtr statistics'} >>") +{ + $xlratorsettings{'EXTENDED_GUI'} = 'statistics'; +} + +if ($xlratorsettings{'ACTION'} eq "$Lang::tr{'updxlrtr maintenance'} >>") +{ + $xlratorsettings{'EXTENDED_GUI'} = 'maintenance'; +} + +if ($xlratorsettings{'ACTION'} eq $Lang::tr{'updxlrtr purge'}) +{ + $xlratorsettings{'EXTENDED_GUI'} = 'maintenance'; + + if (($xlratorsettings{'REMOVE_OBSOLETE'} eq 'on') || ($xlratorsettings{'REMOVE_NOSOURCE'} eq 'on') || ($xlratorsettings{'REMOVE_OUTDATED'} eq 'on')) + { + undef (@sources); + undef @repositoryfiles; + foreach (<$repository/*>) + { + if (-d $_) + { + unless (/^$repository/download$/) { push(@sources,$_); } + } + } + + foreach (@sources) + { + @updatelist=<$_/*>; + $vendorid = substr($_,rindex($_,"/")+1); + foreach(@updatelist) + { + $uuid = substr($_,rindex($_,"/")+1); + if (-e "$_/source.url") + { + open (FILE,"$_/source.url"); + $sourceurl=<FILE>; + close FILE; + chomp($sourceurl); + $updatefile = substr($sourceurl,rindex($sourceurl,'/')+1,length($sourceurl)); + $updatefile = "$vendorid/$uuid/$updatefile"; + push(@repositoryfiles,$updatefile); + } + } + } + + foreach (@repositoryfiles) + { + ($vendorid,$uuid,$updatefile) = split('/'); + + if (-e "$repository/$vendorid/$uuid/status") + { + open (FILE,"$repository/$vendorid/$uuid/status"); + @metadata = <FILE>; + close FILE; + chomp(@metadata); + $status = $metadata[-1]; + } + + if (-e "$repository/$vendorid/$uuid/access.log") + { + open (FILE,"$repository/$vendorid/$uuid/access.log"); + @metadata = <FILE>; + close FILE; + chomp(@metadata); + $lastaccess = $metadata[-1]; + } + + if (($xlratorsettings{'REMOVE_NOSOURCE'} eq 'on') && ($status == $sfNoSource)) + { + if (-e "$repository/$vendorid/$uuid/$updatefile") { system("rm -r $repository/$vendorid/$uuid"); } + } + if (($xlratorsettings{'REMOVE_OUTDATED'} eq 'on') && ($status == $sfOutdated)) + { + if (-e "$repository/$vendorid/$uuid/$updatefile") { system("rm -r $repository/$vendorid/$uuid"); } + } + if ($xlratorsettings{'REMOVE_OBSOLETE'} eq 'on') + { + if (($xlratorsettings{'NOT_ACCESSED_LAST'} eq 'week') && ($lastaccess < (time - 604800))) + { + if (-e "$repository/$vendorid/$uuid/$updatefile") { system("rm -r $repository/$vendorid/$uuid"); } + } + if (($xlratorsettings{'NOT_ACCESSED_LAST'} eq 'month1') && ($lastaccess < (time - 2505600))) + { + if (-e "$repository/$vendorid/$uuid/$updatefile") { system("rm -r $repository/$vendorid/$uuid"); } + } + if (($xlratorsettings{'NOT_ACCESSED_LAST'} eq 'month3') && ($lastaccess < (time - 7516800))) + { + if (-e "$repository/$vendorid/$uuid/$updatefile") { system("rm -r $repository/$vendorid/$uuid"); } + } + if (($xlratorsettings{'NOT_ACCESSED_LAST'} eq 'month6') && ($lastaccess < (time - 15033600))) + { + if (-e "$repository/$vendorid/$uuid/$updatefile") { system("rm -r $repository/$vendorid/$uuid"); } + } + if (($xlratorsettings{'NOT_ACCESSED_LAST'} eq 'year') && ($lastaccess < (time - 31536000))) + { + if (-e "$repository/$vendorid/$uuid/$updatefile") { system("rm -r $repository/$vendorid/$uuid"); } + } + } + } + } +}
if ($xlratorsettings{'ACTION'} eq $Lang::tr{'save'}) - { &chksettings('save',@errormessages); - $xlratorsettings{'show'} = 'settings'; - } -elsif ($xlratorsettings{'ACTION'} eq $Lang::tr{'updxlrtr save and restart'}) - { &chksettings('saverestart',@errormessages); - $xlratorsettings{'show'} = 'settings'; - } -elsif ($xlratorsettings{'ACTION'} eq $Lang::tr{'updxlrtr cancel download'}) - { &canceldownload($xlratorsettings{'ID'}); - $xlratorsettings{'show'} = 'overview'; - } -elsif (($xlratorsettings{'ACTION'} eq $Lang::tr{'updxlrtr purge'}) - && (($xlratorsettings{'REMOVE_UNKNOWN'} eq 'on') - || ($xlratorsettings{'REMOVE_NOSOURCE'} eq 'on') - || ($xlratorsettings{'REMOVE_OUTDATED'} eq 'on') - || ($xlratorsettings{'REMOVE_TODELETE'} eq 'on'))) - { &delolddata(); - $xlratorsettings{'show'} = 'maintenance'; - } +{ + if (!($xlratorsettings{'MAX_DISK_USAGE'} =~ /^\d+$/) || ($xlratorsettings{'MAX_DISK_USAGE'} < 1) || ($xlratorsettings{'MAX_DISK_USAGE'} > 100)) + { + $errormessage = $Lang::tr{'updxlrtr invalid disk usage'}; + goto ERROR; + } + if (($xlratorsettings{'MAX_DOWNLOAD_RATE'} ne '') && ((!($xlratorsettings{'MAX_DOWNLOAD_RATE'} =~ /^\d+$/)) || ($xlratorsettings{'MAX_DOWNLOAD_RATE'} < 1))) + { + $errormessage = $Lang::tr{'updxlrtr invalid download rate'}; + goto ERROR; + }
-# ------------------------------------------------------ -# ACTION Check - End -# ------------------------------------------------------ + &savesettings; +}
-$not_accessed_last = $xlratorsettings{'NOT_ACCESSED_LAST'}; -undef($xlratorsettings{'NOT_ACCESSED_LAST'}); +if ($xlratorsettings{'ACTION'} eq $Lang::tr{'updxlrtr save and restart'}) +{ + if (!($xlratorsettings{'MAX_DISK_USAGE'} =~ /^\d+$/) || ($xlratorsettings{'MAX_DISK_USAGE'} < 1) || ($xlratorsettings{'MAX_DISK_USAGE'} > 100)) + { + $errormessage = $Lang::tr{'updxlrtr invalid disk usage'}; + goto ERROR; + } + if (($xlratorsettings{'MAX_DOWNLOAD_RATE'} ne '') && ((!($xlratorsettings{'MAX_DOWNLOAD_RATE'} =~ /^\d+$/)) || ($xlratorsettings{'MAX_DOWNLOAD_RATE'} < 1))) + { + $errormessage = $Lang::tr{'updxlrtr invalid download rate'}; + goto ERROR; + } + if ((!(-e "${General::swroot}/proxy/enable")) && (!(-e "${General::swroot}/proxy/enable_blue"))) + { + $errormessage = $Lang::tr{'updxlrtr web proxy service required'}; + goto ERROR; + } + if (!($proxysettings{'ENABLE_UPDXLRATOR'} eq 'on')) + { + $errormessage = $Lang::tr{'updxlrtr not enabled'}; + goto ERROR; + } + + &savesettings;
-if (-e "${General::swroot}/updatexlrator/settings") { - &General::readhash("${General::swroot}/updatexlrator/settings", %xlratorsettings); + system('/usr/local/bin/squidctrl restart >/dev/null 2>&1'); }
-if ($xlratorsettings{'NOT_ACCESSED_LAST'} eq '') { $xlratorsettings{'NOT_ACCESSED_LAST'} = $not_accessed_last; } +if ($xlratorsettings{'ACTION'} eq $Lang::tr{'updxlrtr remove file'}) +{ + $xlratorsettings{'EXTENDED_GUI'} = 'maintenance';
-if ($xlratorsettings{'show'} eq 'overview') { $xlratorsettings{'EXTENDED_GUI'} = 'overview'; } -elsif ($xlratorsettings{'show'} eq 'statistics') { $xlratorsettings{'EXTENDED_GUI'} = 'statistics'; } -elsif ($xlratorsettings{'show'} eq 'settings') { $xlratorsettings{'EXTENDED_GUI'} = 'settings'; } -elsif ($xlratorsettings{'show'} eq 'maintenance') { $xlratorsettings{'EXTENDED_GUI'} = 'maintenance'; } -else { $xlratorsettings{'EXTENDED_GUI'} = $xlratorsettings{'VIEW_SETTING'}?$xlratorsettings{'VIEW_SETTING'}:'overview'; } + $updatefile = $xlratorsettings{'ID'};
-&initvendimg; + unless ($updatefile =~ /^download//) + { + ($vendorid,$uuid,$updatefile) = split('/',$updatefile); + if (-e "$repository/$vendorid/$uuid/$updatefile") { system("rm -r $repository/$vendorid/$uuid"); } + } +}
-# ---------------------------------------------------- -# Start Page Output -# ---------------------------------------------------- +if (($xlratorsettings{'ACTION'} eq $Lang::tr{'updxlrtr cancel download'}) || ($xlratorsettings{'ACTION'} eq $Lang::tr{'updxlrtr remove file'})) +{ + $updatefile = $xlratorsettings{'ID'};
-&Header::showhttpheaders(); -&Header::openpage($Lang::tr{'updxlrtr configuration'}, 1, '<link rel='stylesheet' type='text/css' href='/themes/'.$mainsettings{'THEME'}.'/include/upxlr.css' />' ); -&Header::openbigbox('100%', 'left', '', scalar(@errormessages)); + if ($updatefile =~ /^download//) + { + ($uuid,$vendorid,$updatefile) = split('/',$updatefile);
-# ===================================================================================== -# CACHE OVERVIEW -# ===================================================================================== + if (-e "$repository/download/$vendorid/$updatefile.info") + { + &General::readhash("$repository/download/$vendorid/$updatefile.info", %dlinfo);
-if ($xlratorsettings{'EXTENDED_GUI'} eq 'overview') { - &Header::openbox('100%', 'left', $Lang::tr{'updxlrtr cache overview'}); - &printfrmview(); - &printerrormsgs(@errormessages); - &printtbldiskusage ($Lang::tr{'updxlrtr disk usage'},$repository); - &initdownloaddata(@downloadfiles); - &printtbldownloads(@downloadfiles); - &Header::closebox(); - } + $id = &getPID("\s${General::swroot}/updatexlrator/bin/download\s.*\s".quotemeta($dlinfo{'SRCURL'})."\s\d\s\d$"); + if ($id) { system("/bin/kill -9 $id"); } + $id = &getPID("\s/usr/bin/wget\s.*\s".quotemeta($dlinfo{'SRCURL'})."$"); + if ($id) { system("/bin/kill -9 $id"); }
-# ===================================================================================== -# CACHE STATISTICS -# ===================================================================================== + system("rm $repository/download/$vendorid/$updatefile.info"); + }
-if ($xlratorsettings{'EXTENDED_GUI'} eq 'statistics') { - &Header::openbox('100%', 'left', "$Lang::tr{'updxlrtr cache statistics'}"); - &printfrmview(); - &printerrormsgs(@errormessages); - &initcachestats(); - &printcachestatistics(); - &Header::closebox(); - } + if (-e "$repository/download/$vendorid/$updatefile") + { + system("rm $repository/download/$vendorid/$updatefile"); + } + }
-# ===================================================================================== -# CACHE MAINTENANCE -# ===================================================================================== +}
-if ($xlratorsettings{'EXTENDED_GUI'} eq 'maintenance') { - &Header::openbox('100%', 'left', "$Lang::tr{'updxlrtr cache maintenance'}"); - &printfrmview(); - &printerrormsgs(@errormessages); - &initfrmmaintenance(); - &inittblreposdata(); - &printfrmmaintenance('withfiles', @repositoryfiles); - &Header::closebox(); - } +$not_accessed_last = $xlratorsettings{'NOT_ACCESSED_LAST'}; +undef($xlratorsettings{'NOT_ACCESSED_LAST'});
-# ===================================================================================== -# CACHE SETTINGS -# ===================================================================================== +if (-e "${General::swroot}/updatexlrator/settings") +{ + &General::readhash("${General::swroot}/updatexlrator/settings", %xlratorsettings); +}
-if ($xlratorsettings{'EXTENDED_GUI'} eq 'settings') { - &Header::openbox('100%', 'left', $Lang::tr{'updxlrtr cache settings'}); - &printfrmview(); - &printerrormsgs(@errormessages); - &initfrmsettings(); - &printfrmsettings(); - &Header::closebox(); - } +if ($xlratorsettings{'NOT_ACCESSED_LAST'} eq '') +{ + $xlratorsettings{'NOT_ACCESSED_LAST'} = $not_accessed_last; +} + +ERROR: + +$checked{'ENABLE_LOG'}{'off'} = ''; +$checked{'ENABLE_LOG'}{'on'} = ''; +$checked{'ENABLE_LOG'}{$xlratorsettings{'ENABLE_LOG'}} = "checked='checked'"; +$checked{'PASSIVE_MODE'}{'off'} = ''; +$checked{'PASSIVE_MODE'}{'on'} = ''; +$checked{'PASSIVE_MODE'}{$xlratorsettings{'PASSIVE_MODE'}} = "checked='checked'"; +$checked{'LOW_DOWNLOAD_PRIORITY'}{'off'} = ''; +$checked{'LOW_DOWNLOAD_PRIORITY'}{'on'} = ''; +$checked{'LOW_DOWNLOAD_PRIORITY'}{$xlratorsettings{'LOW_DOWNLOAD_PRIORITY'}} = "checked='checked'"; +$checked{'ENABLE_AUTOCHECK'}{'off'} = ''; +$checked{'ENABLE_AUTOCHECK'}{'on'} = ''; +$checked{'ENABLE_AUTOCHECK'}{$xlratorsettings{'ENABLE_AUTOCHECK'}} = "checked='checked'"; +$checked{'FULL_AUTOSYNC'}{'off'} = ''; +$checked{'FULL_AUTOSYNC'}{'on'} = ''; +$checked{'FULL_AUTOSYNC'}{$xlratorsettings{'FULL_AUTOSYNC'}} = "checked='checked'"; +$checked{'REMOVE_NOSOURCE'}{'off'} = ''; +$checked{'REMOVE_NOSOURCE'}{'on'} = ''; +$checked{'REMOVE_NOSOURCE'}{$xlratorsettings{'REMOVE_NOSOURCE'}} = "checked='checked'"; +$checked{'REMOVE_OUTDATED'}{'off'} = ''; +$checked{'REMOVE_OUTDATED'}{'on'} = ''; +$checked{'REMOVE_OUTDATED'}{$xlratorsettings{'REMOVE_OUTDATED'}} = "checked='checked'"; +$checked{'REMOVE_OBSOLETE'}{'off'} = ''; +$checked{'REMOVE_OBSOLETE'}{'on'} = ''; +$checked{'REMOVE_OBSOLETE'}{$xlratorsettings{'REMOVE_OBSOLETE'}} = "checked='checked'"; + + +$selected{'AUTOCHECK_SCHEDULE'}{'daily'} = ''; +$selected{'AUTOCHECK_SCHEDULE'}{'weekly'} = ''; +$selected{'AUTOCHECK_SCHEDULE'}{'monthly'} = ''; +$selected{'AUTOCHECK_SCHEDULE'}{$xlratorsettings{'AUTOCHECK_SCHEDULE'}} = "selected='selected'"; + +$selected{'NOT_ACCESSED_LAST'}{'week'} = ''; +$selected{'NOT_ACCESSED_LAST'}{'month1'} = ''; +$selected{'NOT_ACCESSED_LAST'}{'month3'} = ''; +$selected{'NOT_ACCESSED_LAST'}{'month6'} = ''; +$selected{'NOT_ACCESSED_LAST'}{'year'} = ''; +$selected{'NOT_ACCESSED_LAST'}{$xlratorsettings{'NOT_ACCESSED_LAST'}} = "selected='selected'";
# ---------------------------------------------------- -# End Page Output +# Settings dialog # ---------------------------------------------------- -&Header::closebigbox(); -&Header::closepage();
-# ------------------------------------------------------------------- -# Print Form to switch view -# ------------------------------------------------------------------- +&Header::showhttpheaders();
-sub printfrmview { - print <<END -<form class='frmshow' method='get' action='$ENV{'SCRIPT_NAME'}'> -<fieldset class='noborder'> -<legend><span>$Lang::tr{'updxlrtr current view'}:</span></legend> +&Header::openpage($Lang::tr{'updxlrtr configuration'}, 1, ''); + +&Header::openbigbox('100%', 'left', '', $errormessage); + +if ($errormessage) { + &Header::openbox('100%', 'left', $Lang::tr{'error messages'}); + print "<font class='base'>$errormessage </font>\n"; + &Header::closebox(); +} + +print "<form method='post' action='$ENV{'SCRIPT_NAME'}' enctype='multipart/form-data'>\n"; + +&Header::openbox('100%', 'left', "$Lang::tr{'updxlrtr update accelerator'}"); + +print <<END +<table width='100%'> +<tr> + <td colspan='4'><b>$Lang::tr{'updxlrtr common settings'}</b></td> +</tr> +<tr> + <td class='base' width='25%'>$Lang::tr{'updxlrtr enable log'}:</td> + <td class='base' width='20%'><input type='checkbox' name='ENABLE_LOG' $checked{'ENABLE_LOG'}{'on'} /></td> + <td class='base' width='25%'></td> + <td class='base' width='30%'></td> +</tr> +<tr> + <td class='base'>$Lang::tr{'updxlrtr passive mode'}:</td> + <td class='base'><input type='checkbox' name='PASSIVE_MODE' $checked{'PASSIVE_MODE'}{'on'} /></td> + <td class='base'>$Lang::tr{'updxlrtr max disk usage'}:</td> + <td class='base'><input type='text' name='MAX_DISK_USAGE' value='$xlratorsettings{'MAX_DISK_USAGE'}' size='1' /> %</td> +</tr> +</table> +<hr size='1'> +<table width='100%'> +<tr> + <td colspan='4'><b>$Lang::tr{'updxlrtr performance options'}</b></td> +</tr> +<tr> + <td class='base' width='25%'>$Lang::tr{'updxlrtr low download priority'}:</td> + <td class='base' width='20%'><input type='checkbox' name='LOW_DOWNLOAD_PRIORITY' $checked{'LOW_DOWNLOAD_PRIORITY'}{'on'} /></td> + <td class='base' width='25%'>$Lang::tr{'updxlrtr max download rate'}: <img src='/blob.gif' alt='*' </td> + <td class='base' width='30%'><input type='text' name='MAX_DOWNLOAD_RATE' value='$xlratorsettings{'MAX_DOWNLOAD_RATE'}' size='5' /></td> +</tr> +</table> +<hr size='1'> +<table width='100%'> +<tr> + <td colspan='4'><b>$Lang::tr{'updxlrtr source checkup'}</b></td> +</tr> +<tr> + <td class='base' width='25%'>$Lang::tr{'updxlrtr enable autocheck'}:</td> + <td class='base' width='20%'><input type='checkbox' name='ENABLE_AUTOCHECK' $checked{'ENABLE_AUTOCHECK'}{'on'} /></td> + <td class='base' width='25%'>$Lang::tr{'updxlrtr source checkup schedule'}:</td> + <td class='base' width='30%'> + <select name='AUTOCHECK_SCHEDULE'> + <option value='daily' $selected{'AUTOCHECK_SCHEDULE'}{'daily'}>$Lang::tr{'updxlrtr daily'}</option> + <option value='weekly' $selected{'AUTOCHECK_SCHEDULE'}{'weekly'}>$Lang::tr{'updxlrtr weekly'}</option> + <option value='monthly' $selected{'AUTOCHECK_SCHEDULE'}{'monthly'}>$Lang::tr{'updxlrtr monthly'}</option> + </select> + </td> +</tr> +<tr> + <td class='base'>$Lang::tr{'updxlrtr full autosync'}:</td> + <td class='base'><input type='checkbox' name='FULL_AUTOSYNC' $checked{'FULL_AUTOSYNC'}{'on'} /></td> + <td> </td> + <td> </td> +</tr> +</table> +<hr size='1'> +<table width='100%'> +<tr> + <td align='center' width='20%'><input type='submit' name='ACTION' value='$Lang::tr{'save'}' /></td> + <td align='center' width='20%'><input type='submit' name='ACTION' value='$Lang::tr{'updxlrtr save and restart'}' /></td> + <td> </td> END ; - if ($xlratorsettings{'EXTENDED_GUI'} eq 'overview') - { print "<button id='oview' class='symbols' disabled='disabled'>$Lang::tr{'updxlrtr overview'}</button>\n"; } - else - { print "<button id='oview' class='symbols' type='submit' name='show' value='overview'>$Lang::tr{'updxlrtr overview'}</button>\n"; } - - if ($xlratorsettings{'EXTENDED_GUI'} eq 'statistics') - { print "<button id='stat' class='symbols' disabled='disabled'>$Lang::tr{'updxlrtr statistics'}</button>\n"; } - else - { print "<button id='stat' class='symbols' type='submit' name='show' value='statistics'>$Lang::tr{'updxlrtr statistics'}</button>\n"; } - - if ($xlratorsettings{'EXTENDED_GUI'} eq 'maintenance') - { print "<button id='wrench' class='symbols' disabled='disabled'>$Lang::tr{'updxlrtr maintenance'}</button>\n"; } - else - { print "<button id='wrench' class='symbols' type='submit' name='show' value='maintenance'>$Lang::tr{'updxlrtr maintenance'}</button>\n"; } - - if ($xlratorsettings{'EXTENDED_GUI'} eq 'settings') - { print "<button id='set' class='symbols' disabled='disabled'>$Lang::tr{'updxlrtr settings'}</button>\n"; } - else - { print "<button id='set' class='symbols' type='submit' name='show' value='settings'>$Lang::tr{'updxlrtr settings'}</button>\n"; } - print <<END -</fieldset> -</form> + +print" <td align='center' width='20%'><input type='submit' name='ACTION' value='$Lang::tr{'updxlrtr statistics'}"; +if ($xlratorsettings{'EXTENDED_GUI'} eq 'statistics') { print " <<' "; } else { print " >>' "; } +print "/></td>\n"; + +print" <td align='center' width='20%'><input type='submit' name='ACTION' value='$Lang::tr{'updxlrtr maintenance'}"; +if ($xlratorsettings{'EXTENDED_GUI'} eq 'maintenance') { print " <<' "; } else { print " >>' "; } +print "/></td>\n"; + +print <<END +</tr> +</table> END ; - return; -}
-# ------------------------------------------------------------------- -# Print Error Messages - printerrormsgs(@errormsgs) -# ------------------------------------------------------------------- +&Header::closebox(); + +print "</form>\n"; + +# ---------------------------------------------------- +# List pending downloads - if any +# ---------------------------------------------------- + +if (($xlratorsettings{'EXTENDED_GUI'} ne 'statistics') && ($xlratorsettings{'EXTENDED_GUI'} ne 'maintenance')) +{ + @downloadlist = <$repository/download/*>; + + undef(@downloadfiles); + foreach (@downloadlist) + { + if (-d) + { + my @filelist = <$_/*>; + $vendorid = substr($_,rindex($_,"/")+1); + foreach(@filelist) + { + next if(/.info$/); + $updatefile = substr($_,rindex($_,"/")+1); + $updatefile .= ":download/$vendorid/$updatefile"; + $updatefile = " ".$updatefile; + push(@downloadfiles, $updatefile); + } + } + } + + if (@downloadfiles) + { + &Header::openbox('100%', 'left', "$Lang::tr{'updxlrtr pending downloads'}");
-sub printerrormsgs { - my $errmsgs_ref = shift; - unless (@$errmsgs_ref == 0) { - &Header::openbox('100%', 'left', ''); print <<END - <div id='errors'><strong>$Lang::tr{'error messages'}</strong><br /> +<table> + <tr><td class='boldbase'><b>$Lang::tr{'updxlrtr current downloads'}</b></td></tr> +</table> +<table width='100%'> +<colgroup span='3' width='2%'></colgroup> +<colgroup span='1' width='0*'></colgroup> +<colgroup span='3' width='5%'></colgroup> +<colgroup span='1' width='2%'></colgroup> +<tr> + <td class='base' align='center'> </td> + <td class='base' align='left' colspan='2'><i>$Lang::tr{'updxlrtr source'}</i></td> + <td class='base' align='center'><i>$Lang::tr{'updxlrtr filename'}</i></td> + <td class='base' align='center'><i>$Lang::tr{'updxlrtr filesize'}</i></td> + <td class='base' align='center'><i>$Lang::tr{'date'}</i></td> + <td class='base' align='center'><i>$Lang::tr{'updxlrtr progress'}</i></td> + <td class='base' align='center'> </td> +</tr> END ; - foreach (@$errmsgs_ref) { print "$_<br />"; } - undef(@$errmsgs_ref); - print "\t\t\t</div>\n"; - &Header::closebox(); - } -} + $id = 0; + foreach $updatefile (@downloadfiles) + { + $updatefile =~ s/.*://; + my $size_updatefile = 0; + my $mtime = 0; + if(-e "$repository/$updatefile") { + $size_updatefile = (-s "$repository/$updatefile"); + $mtime = &getmtime("$repository/$updatefile"); + } + if (-e "$repository/$updatefile.info") { + &General::readhash("$repository/$updatefile.info", %dlinfo); + } else { + undef(%dlinfo); + } + + $id++; + if ($id % 2) { + print "<tr bgcolor='$Header::table1colour'>\n"; } + else { + print "<tr bgcolor='$Header::table2colour'>\n"; } + + $filesize = $size_updatefile; + 1 while $filesize =~ s/^(-?\d+)(\d{3})/$1.$2/; + + my ($SECdt,$MINdt,$HOURdt,$DAYdt,$MONTHdt,$YEARdt) = localtime($mtime); + $DAYdt = sprintf ("%.02d",$DAYdt); + $MONTHdt = sprintf ("%.02d",$MONTHdt+1); + $YEARdt = sprintf ("%.04d",$YEARdt+1900); + $filedate = $YEARdt."-".$MONTHdt."-".$DAYdt; + + ($uuid,$vendorid,$shortname) = split('/',$updatefile); + + print "\t\t<td align='center' nowrap='nowrap'> "; + if (&getPID("\s/usr/bin/wget\s.*\s".quotemeta($dlinfo{'SRCURL'})."$")) + { + print "<img src='/images/updbooster/updxl-led-blue.gif' alt='$Lang::tr{'updxlrtr condition download'}' /> </td>\n"; + } else { + print "<img src='/images/updbooster/updxl-led-gray.gif' alt='$Lang::tr{'updxlrtr condition suspended'}' /> </td>\n"; + }
-# ------------------------------------------------------------------- -# Initialize Downloaddata -# ------------------------------------------------------------------- + print "\t\t<td align='center' nowrap='nowrap'> ";
-sub initdownloaddata { - @downloadlist = <$repository/download/*>; - my $updfile; - my $dlfiles_ref = shift; - undef(@$dlfiles_ref); - foreach (@downloadlist) { - if (-d) { - my @filelist = <$_/*>; - $vendorid = substr($_,rindex($_,"/")+1); - foreach(@filelist) { - next if(/.info$/); - $updfile = substr($_,rindex($_,"/")+1); - $updfile .= ":download/$vendorid/$updfile"; - $updfile = " ".$updfile; - push(@$dlfiles_ref, $updfile); - } - } - } -} + if (($vendorid ne '') && (-e "$webhome/images/updbooster/updxl-src-$vendorid.gif")) + { + print "<img src='/images/updbooster/updxl-src-" . $vendorid . ".gif' alt='" . ucfirst $vendorid . "' /> </td>\n"; + } else { + print "<img src='/images/updbooster/updxl-src-unknown.gif' alt='" . ucfirst $vendorid . "' /> </td>\n"; + }
-# ------------------------------------------------------------------- -# Print pending Downloadlist -# ------------------------------------------------------------------- + $shortname = substr($updatefile,rindex($updatefile,"/")+1); + $shortname =~ s/(.*)_[\da-f]*(.(exe|cab|psf)$)/$1_*$2/i;
-sub printtbldownloads { - my $dllist_ref = shift; - print <<END -<table id='listuploads'> -<caption>$Lang::tr{'updxlrtr current downloads'}</caption> -<thead> - <tr> - <th>$Lang::tr{'status'}</th> - <th>$Lang::tr{'updxlrtr source'}</th> - <th>$Lang::tr{'updxlrtr filename'}</th> - <th>$Lang::tr{'updxlrtr filesize'}</th> - <th>$Lang::tr{'date'}</th> - <th>$Lang::tr{'updxlrtr progress'}</th> - <th> </th> - </tr> -</thead> -<tfoot> - <tr> - <td colspan='7' id='legenddownload'> + $filesize = $dlinfo{'REMOTESIZE'}; + 1 while $filesize =~ s/^(-?\d+)(\d{3})/$1.$2/; + $dlinfo{'VENDORID'} = ucfirst $vendorid; + + print <<END + <td class='base' align='center'> $dlinfo{'VENDORID'} </td> + <td class='base' align='left' title='cache:/$updatefile'>$shortname</td> + <td class='base' align='right' nowrap='nowrap'> $filesize </td> + <td class='base' align='center' nowrap='nowrap'> $filedate </td> + <td class='base' align='center' nowrap='nowrap'> END ; - &printlegenddownload(); - print <<END + my $percent="0%"; + if ($dlinfo{'REMOTESIZE'} && $size_updatefile) + { + $percent=int(100 / ($dlinfo{'REMOTESIZE'} / $size_updatefile))."%"; + } + print $percent; &percentbar($percent); + print <<END + </td> + <td align='center'> + <form method='post' name='frma$id' action='$ENV{'SCRIPT_NAME'}'> + <input type='image' name='$Lang::tr{'updxlrtr cancel download'}' src='/images/delete.gif' title='$Lang::tr{'updxlrtr cancel download'}' alt='$Lang::tr{'updxlrtr cancel download'}' /> + <input type='hidden' name='ID' value='$updatefile' /> + <input type='hidden' name='ACTION' value='$Lang::tr{'updxlrtr cancel download'}' /> + </form> </td> </tr> -</tfoot> -<tbody> -END -; - &printtbldldata($dllist_ref); - print <<END -</tbody> -</table> END ; + } + + print "</table>\n<br>\n<table>\n"; + &printlegenddownload(); + print "</table>\n"; + + &Header::closebox(); + } } +# ===================================================================================== +# CACHE STATISTICS +# =====================================================================================
-# ------------------------------------------------------------------- -# Print Download Files - printdlfiles(@dlfiles) -# ------------------------------------------------------------------- +if ($xlratorsettings{'EXTENDED_GUI'} eq 'statistics') +{
-sub printtbldldata { - my $dlfiles_ref = shift; - unless (@$dlfiles_ref) - { print "<tr>\n<th colspan="7">".$Lang::tr{'updxlrtr no pending downloads attime'}."</th>\n</tr>\n"; } - else { - $id = 0; - foreach $updatefile (@$dlfiles_ref) { - print "<tr>\n"; - $updatefile =~ s/.*://; - my $size_updatefile = 0; - my $mtime = 0; - - if(-e "$repository/$updatefile") { - $size_updatefile = (-s "$repository/$updatefile"); - $mtime = &getmtime("$repository/$updatefile"); - } - - if (-e "$repository/$updatefile.info") { &General::readhash("$repository/$updatefile.info", %dlinfo); } - else { undef(%dlinfo); } - - $filesize = $size_updatefile; - 1 while $filesize =~ s/^(-?\d+)(\d{3})/$1.$2/; - my ($SECdt,$MINdt,$HOURdt,$DAYdt,$MONTHdt,$YEARdt) = localtime($mtime); - my $percent = '0'; - $DAYdt = sprintf ("%.02d",$DAYdt); - $MONTHdt = sprintf ("%.02d",$MONTHdt+1); - $YEARdt = sprintf ("%.04d",$YEARdt+1900); - $filedate = $DAYdt.".".$MONTHdt.".".$YEARdt; - ($uuid,$vendorid,$shortname) = split('/',$updatefile); - $shortname = substr($updatefile,rindex($updatefile,"/")+1); - $shortname =~ s/(.*)_([\da-f]{8})*(.(exe|cab|psf|msu)$)/$1_$2*$3/i; - unless (length($shortname) <= 50) { - my $fext = substr($shortname,rindex("$shortname",'.')); - $shortname = substr($shortname,0,44-length($fext)); - $shortname .= "[...] $fext"; - } - $filesize = $dlinfo{'REMOTESIZE'}; - 1 while $filesize =~ s/^(-?\d+)(\d{3})/$1.$2/; - $dlinfo{'VENDORID'} = ucfirst $vendorid; - if ($dlinfo{'REMOTESIZE'} && $size_updatefile) { $percent = int(100 / ($dlinfo{'REMOTESIZE'} / $size_updatefile)); } - - if (&getPID("\s/usr/bin/wget\s.*\s".quotemeta($dlinfo{'SRCURL'})."$")) - { print '<th><span id="ledbl" class="symbols" title="'.$Lang::tr{'updxlrtr condition download'}.""></span></th>\n"; } - else { print '<th><span id="ledgy" class="symbols" title="'.$Lang::tr{'updxlrtr condition suspended'}.""></span></th>\n"; } - - if ($vendimg{$vendorid}) - { print '<th><span id="vd$id" class="vendimg" style="background-image: url('.$vendimg{$vendorid}.');" title="'.ucfirst $vendorid.'">'.ucfirst $dlinfo{'VENDORID'}."</span></th>\n"; } - else { print '<th><span id="vd$id" class="vendimg" style="background-image: url('.$vendimg{'unknown'}.');" title="'.ucfirst $vendorid.'">'.ucfirst $dlinfo{'VENDORID'}."</span></th>\n"; } - print <<END -<td title="cache:/$updatefile">$shortname</td> -<td>$filesize</td> -<td>$filedate</td> -<td> -END -; - &percentbar($percent); - print <<END - </td> - <th> - <form method='post' id='del$id' action='$ENV{'SCRIPT_NAME'}'> - <div> - <button id='del$id' class='symbols' type='submit' title='$Lang::tr{'updxlrtr cancel download'}'></button> - <input type='hidden' name='ID' value='$updatefile' /> - <input type='hidden' name='ACTION' value='$Lang::tr{'updxlrtr cancel download'}' /> - </div> - </form> - </th> - </tr> -END -; - $id += 1; - } - } +# ---------------------------------------------------- +# Get statistics +# ---------------------------------------------------- + +@sources=(); +foreach (<$repository/*>) +{ + if (-d $_) + { + unless ((/^$repository/download$/) || (/^$repository/lost+found$/)) { push(@sources,$_); } + } }
-# ------------------------------------------------------------------- -# Initialize Cachestats -# ------------------------------------------------------------------- +@vendors=(); +foreach (@sources) +{ + $vendorid=substr($_,rindex($_,'/')+1,length($_)); + push(@vendors,$vendorid); + $vendorstats{$vendorid."_filesize"} = 0; + $vendorstats{$vendorid."_requests"} = 0; + $vendorstats{$vendorid."_files"} = 0; + $vendorstats{$vendorid."_cachehits"} = 0; + $vendorstats{$vendorid."_0"} = 0; + $vendorstats{$vendorid."_1"} = 0; + $vendorstats{$vendorid."_2"} = 0; + $vendorstats{$vendorid."_3"} = 0; + @updatelist=<$_/*>; + foreach $data (@updatelist) + { + if (-e "$data/source.url") + { + open (FILE,"$data/source.url"); + $sourceurl=<FILE>; + close FILE; + chomp($sourceurl); + $updatefile = substr($sourceurl,rindex($sourceurl,'/')+1,length($sourceurl)); + + my $size_updatefile = 0; + if(-e "$data/$updatefile") { + $size_updatefile = (-s "$data/$updatefile"); + } + else + { + # DEBUG + #die "file not found: $data/$updatefile\n"; + } + # + # Total file size + # + $filesize += $size_updatefile; + # + # File size for this source + # + $vendorstats{$vendorid."_filesize"} += $size_updatefile; + # + # Number of requests from cache for this source + # + open (FILE,"$data/access.log"); + @requests=<FILE>; + close FILE; + chomp(@requests); + $counts = @requests; + $counts--; + $vendorstats{$vendorid."_requests"} += $counts; + $cachehits += $counts; + # + # Total number of files in cache + # + $numfiles++; + # + # Number of files for this source + # + $vendorstats{$vendorid."_files"}++; + # + # Count cache status occurences + # + open (FILE,"$data/status"); + $_=<FILE>; + close FILE; + chomp; + $vendorstats{$vendorid."_".$_}++; + # + # Calculate cached traffic for this source + # + $vendorstats{$vendorid."_cachehits"} += $counts * $size_updatefile; + # + # Calculate total cached traffic + # + $cachedtraffic += $counts * $size_updatefile;
-sub initcachestats { - @sources=(); - foreach (<$repository/*>) { - if (-d $_) { - unless ((/^$repository/download$/) || (/^$repository/lost+found$/)) { push(@sources,$_); } - } - } - @vendors=(); - foreach (@sources) - { - $vendorid=substr($_,rindex($_,'/')+1,length($_)); - push(@vendors,$vendorid); - $vendorstats{$vendorid."_filesize"} = 0; - $vendorstats{$vendorid."_requests"} = 0; - $vendorstats{$vendorid."_files"} = 0; - $vendorstats{$vendorid."_cachehits"} = 0; - $vendorstats{$vendorid."_0"} = 0; - $vendorstats{$vendorid."_1"} = 0; - $vendorstats{$vendorid."_2"} = 0; - $vendorstats{$vendorid."_3"} = 0; - @updatelist=<$_/*>; - foreach $data (@updatelist) { - if (-e "$data/source.url") { - open (FILE,"$data/source.url"); - $sourceurl=<FILE>; - close FILE; - chomp($sourceurl); - $updatefile = substr($sourceurl,rindex($sourceurl,'/')+1,length($sourceurl)); - my $size_updatefile = 0; - if(-e "$data/$updatefile") { - $size_updatefile = (-s "$data/$updatefile"); - } - else { - # DEBUG - #die "file not found: $data/$updatefile\n"; - } - # - # Total file size - # - $filesize += $size_updatefile; - # - # File size for this source - # - $vendorstats{$vendorid."_filesize"} += $size_updatefile; - # - # Number of requests from cache for this source - # - open (FILE,"$data/access.log"); - @requests=<FILE>; - close FILE; - chomp(@requests); - $counts = @requests; - $counts--; - $vendorstats{$vendorid."_requests"} += $counts; - $cachehits += $counts; - # - # Total number of files in cache - # - $numfiles++; - # - # Number of files for this source - # - $vendorstats{$vendorid."_files"}++; - # - # Count cache status occurences - # - open (FILE,"$data/status"); - $_=<FILE>; - close FILE; - chomp; - $vendorstats{$vendorid."_".$_}++; - # - # Calculate cached traffic for this source - # - $vendorstats{$vendorid."_cachehits"} += $counts * $size_updatefile; - # - # Calculate total cached traffic - # - $cachedtraffic += $counts * $size_updatefile; - } - } - } - if ($numfiles) { $efficiency = sprintf("%.1f", $cachehits / $numfiles); } + } + } }
+if ($numfiles) { $efficiency = sprintf("%.1f", $cachehits / $numfiles); } + +1 while $filesize =~ s/^(-?\d+)(\d{3})/$1.$2/; +1 while $cachedtraffic =~ s/^(-?\d+)(\d{3})/$1.$2/; + # ---------------------------------------------------- -# Print statistics +# Show statistics # ----------------------------------------------------
-sub printcachestatistics { - if ($numfiles) { - $filesize = &format_size($filesize); - $cachedtraffic = &format_size($cachedtraffic); - print <<END -<table id='summary'> -<caption>$Lang::tr{'updxlrtr summary'}</caption> -<tbody> - <tr> - <th>$Lang::tr{'updxlrtr total files'}:</th> - <td>$numfiles</td> - <th>$Lang::tr{'updxlrtr total cache size'}:</th> - <td align='right'>$filesize</td> - </tr> - <tr> - <th>$Lang::tr{'updxlrtr efficiency index'}:</th> - <td>$efficiency</td> - <th>$Lang::tr{'updxlrtr total data from cache'}:</th> - <td>$cachedtraffic</td> - </tr> -</tbody> +&Header::openbox('100%', 'left', "$Lang::tr{'updxlrtr cache statistics'}"); + +unless ($numfiles) { print "<i>$Lang::tr{'updxlrtr empty repository'}</i>\n<hr size='1'>\n"; } + +print <<END +<table> +<tr><td class='boldbase'><b>$Lang::tr{'updxlrtr disk usage'}</b></td></tr> </table> -<hr /> -<table id='liststatbysrc'> -<caption>$Lang::tr{'updxlrtr statistics by source'}</caption> -<colgroup> -<col></col> -<col></col> -<col></col> -<col></col> -<col span='4' style='width: 40px'></col> -</colgroup> -<thead> - <tr> - <th>$Lang::tr{'updxlrtr source'}</th> - <th>$Lang::tr{'updxlrtr files'}</th> - <th>$Lang::tr{'updxlrtr cache size'}</th> - <th>$Lang::tr{'updxlrtr data from cache'}</th> - <th><span id='ledgr' class='symbols' title='$Lang::tr{'updxlrtr condition ok'}'></span></th> - <th><span id='ledye' class='symbols' title='$Lang::tr{'updxlrtr condition nosource'}'></span></th> - <th><span id='ledrd' class='symbols' title='$Lang::tr{'updxlrtr condition outdated'}'></span></th> - <th><span id='ledgy' class='symbols' title='$Lang::tr{'updxlrtr condition unknown'}'></span></th> - </tr> -</thead> -<tfoot> - <tr> - <td colspan='8' id='legendstatus'> +<table cellpadding='3'> +<tr> +<td align='left' class='base'><i>$Lang::tr{'updxlrtr cache dir'}</i></td> +<td align='center' class='base'><i>$Lang::tr{'size'}</i></td> +<td align='center' class='base'><i>$Lang::tr{'used'}</i></td> +<td align='center' class='base'><i>$Lang::tr{'free'}</i></td> +<td align='left' class='base' colspan='2'><i>$Lang::tr{'percentage'}</i></td> +</tr> END ; - &printlegendstatus(); - print <<END - </td> - </tr> -</tfoot> -<tbody> + +open(DF,"/bin/df -h $repository|"); +@dfdata = <DF>; +close DF; +shift(@dfdata); +chomp(@dfdata); +$dfstr = join(' ',@dfdata); +my ($device,$size,$used,$free,$percent,$mount) = split(' ',$dfstr); + +print <<END +<tr> +<td>[$repository]</td> +<td align='right'>$size</td> +<td align='right'>$used</td> +<td align='right'>$free</td> +<td> END ; - &printtblstatdata(@vendors); +&percentbar($percent); +print <<END +</td> +<td align='right'>$percent</td> +</tr> +</table> +END +; + +if ($numfiles) +{ print <<END -</tbody> +<hr size='1'> +<table width='100%'> +<tr> + <td colspan='5'><b>$Lang::tr{'updxlrtr summary'}</b></td> +</tr> +<tr> + <td class='base' width='25%'>$Lang::tr{'updxlrtr total files'}:</td> + <td class='base' width='20%'><font color='$colourgray'>$numfiles</font></td> + <td class='base' width='25%'>$Lang::tr{'updxlrtr total cache size'}:</td> + <td class='base' width='15%' align='right'><font color='$colourgray'>$filesize</font></td> + <td class='base'></td> +</tr> +<tr> + <td class='base'>$Lang::tr{'updxlrtr efficiency index'}:</td> + <td class='base'><font color='$colourgray'>$efficiency</font></td> + <td class='base'>$Lang::tr{'updxlrtr total data from cache'}:</td> + <td class='base' align='right'><font color='$colourgray'>$cachedtraffic</font></td> + <td class='base'></td> +</tr> </table> +<hr size='1'> +<table> +<tr> + <td colspan='17'><b>$Lang::tr{'updxlrtr statistics by source'}</b></td> +</tr> +<tr> + <td class='base' colspan='2'><i>$Lang::tr{'updxlrtr source'}</i></td> + <td class='base' width='7%'> </td> + <td class='base' align='right'><i>$Lang::tr{'updxlrtr files'}</i></td> + <td class='base' width='7%'> </td> + <td class='base' align='right'><nobr><i>$Lang::tr{'updxlrtr cache size'}</i></nobr></td> + <td class='base' width='7%'> </td> + <td class='base' align='right'><nobr><i>$Lang::tr{'updxlrtr data from cache'}</i></nobr></td> + <td class='base' width='15%'> </td> + <td class='base'><img src="/images/updbooster/updxl-led-green.gif" /></td> + <td class='base' width='15%'> </td> + <td class='base'><img src="/images/updbooster/updxl-led-yellow.gif" /></td> + <td class='base' width='15%'> </td> + <td class='base'><img src="/images/updbooster/updxl-led-red.gif" /></td> + <td class='base' width='15%'> </td> + <td class='base'><img src="/images/updbooster/updxl-led-gray.gif" /></td> + <td class='base' width='90%'> </td> +</tr> END ; -}
-sub printtblstatdata { - my $vendlst_ref = shift; - my $vendorid; - $id = 0; - unless (@$vendlst_ref) { print "<tr>\n<th colspan='8'>$Lang::tr{'updxlrtr empty repository'}.</th>\n</tr>\n"; } +$id = 0; + +foreach (@vendors) +{ + $vendorid = $_; + + unless ($vendorstats{$vendorid . "_files"}) { next; } + + $id++; + if ($id % 2) { + print "<tr bgcolor=''$color{'color20'}'>\n"; } else { - foreach (@$vendlst_ref) { - $vendorid = $_; - unless ($vendorstats{$vendorid . "_files"}) { next; } - print "\t<tr>\n"; - if ($vendimg{$vendorid}) - { print "\t\t<th><span id='vd$id' class='vendimg' style='background-image: url($vendimg{$vendorid});' title='".ucfirst $vendorid."'>". ucfirst $vendorid ."</span></th>\n"; } - else { print "\t\t<th><span id='vd$id' class='vendimg' style='background-image: url($vendimg{'unknown'});' title='".ucfirst $vendorid."'>". ucfirst $vendorid ."</span></th>\n"; } - print "\t\t<td>"; - printf "%5d", $vendorstats{$vendorid."_files"}; - print "</td>\n"; - unless ($vendorstats{$vendorid."_filesize"}) { $vendorstats{$vendorid."_filesize"} = '0'; } - print "\t\t<td>"; - print &format_size($vendorstats{$vendorid."_filesize"}); - print "</td>\n"; - unless ($vendorstats{$vendorid."_cachehits"}) { $vendorstats{$vendorid."_cachehits"} = '0'; } - print "\t\t<td>"; - print &format_size($vendorstats{$vendorid."_cachehits"}); - print "</td>\n"; - print "\t\t<td>"; - printf "%5d", $vendorstats{$vendorid."_1"}; - print "</td>\n"; - print "\t\t<td>"; - printf "%5d", $vendorstats{$vendorid."_3"}; - print "</td>\n"; - print "\t\t<td>"; - printf "%5d", $vendorstats{$vendorid."_2"}; - print "</td>\n"; - print "\t\t<td>"; - printf "%5d", $vendorstats{$vendorid."_0"}; - print "</td>\n"; - print "\t</tr>\n"; - $id += 1; + print "<tr bgcolor=''$color{'color22'}'>\n"; } + + print "<td class='base' align='center'><nobr> "; + + if ($vendorid =~ /^Adobe$/i) + { + print "<img src='/images/updbooster/updxl-src-adobe.gif' alt='Adobe'}' /> </nobr></td>\n"; + print "<td class='base'> Adobe </td>\n"; + } elsif ($vendorid =~ /^Microsoft$/i) + { + print "<img src='/images/updbooster/updxl-src-windows.gif' alt='Microsoft'}' /> </nobr></td>\n"; + print "<td class='base'> Microsoft </td>\n"; + } elsif ($vendorid =~ /^Symantec$/i) + { + print "<img src='/images/updbooster/updxl-src-symantec.gif' alt='Symantec'}' /> </nobr></td>\n"; + print "<td class='base'> Symantec </td>\n"; + } elsif ($vendorid =~ /^Linux$/i) + { + print "<img src='/images/updbooster/updxl-src-linux.gif' alt='Linux'}' /> </nobr></td>\n"; + print "<td class='base'> Linux </td>\n"; + } elsif ($vendorid =~ /^TrendMicro$/i) + { + print "<img src='/images/updbooster/updxl-src-trendmicro.gif' alt='Trend Micro'}' /> </nobr></td>\n"; + print "<td class='base'> Trend Micro </td>\n"; + } elsif ($vendorid =~ /^Apple$/i) + { + print "<img src='/images/updbooster/updxl-src-apple.gif' alt='Apple'}' /> </nobr></td>\n"; + print "<td class='base'> Apple </td>\n"; + } elsif ($vendorid =~ /^Avast$/i) + { + print "<img src='/images/updbooster/updxl-src-avast.gif' alt='Avast'}' /> </nobr></td>\n"; + print "<td class='base'> Avast </td>\n"; + } elsif ($vendorid =~ /^Avira$/i) + { + print "<img src='/images/updbooster/updxl-src-avira.gif' alt='Avira' /> </td>\n"; + print "<td class='base'> Avira </td>\n"; + } elsif ($vendorid =~ /^AVG$/i) + { + print "<img src='/images/updbooster/updxl-src-avg.gif' alt='AVG' /> </td>\n"; + print "<td class='base'> AVG </td>\n"; + } elsif ($vendorid =~ /^Ipfire$/i) + { + print "<img src='/images/IPFire.png' width='18' height='18' alt='IPFire' /> </td>\n"; + print "<td class='base'> IPFire </td>\n"; + } else + { + if (-e "/srv/web/ipfire/html/images/updbooster/updxl-src-" . $vendorid . ".gif") + { + print "<img src='/images/updbooster/updxl-src-" . $vendorid . ".gif' alt='" . ucfirst $vendorid . "' /> </nobr></td>\n"; + } else { + print "<img src='/images/updbooster/updxl-src-unknown.gif' alt='" . ucfirst $vendorid . "' /> </nobr></td>\n"; } + print "<td class='base'> " . ucfirst $vendorid . " </td>\n"; } - } -} -# ------------------------------------------------------------------- -# Initialize Repositorydata -# -------------------------------------------------------------------
-sub inittblreposdata { - @sources = <$repository/download/*>; - undef @repositoryfiles; - foreach (@sources) { - if (-d) { - @updatelist = <$_/*>; - $vendorid = substr($_,rindex($_,"/")+1); - foreach(@updatelist) { - next if(/.info$/); - $updatefile = substr($_,rindex($_,"/")+1); - $updatefile .= ":download/$vendorid/$updatefile"; - $updatefile = " ".$updatefile; - push(@repositoryfiles,$updatefile); - } - } - } + print "<td class='base' colspan=2 align='right'>"; + printf "%5d", $vendorstats{$vendorid."_files"}; + print " </td>\n";
- undef (@sources); - foreach (<$repository/*>) { - if (-d $_) { - unless (/^$repository/download$/) { push(@sources,$_); } - } - } + unless ($vendorstats{$vendorid."_filesize"}) { $vendorstats{$vendorid."_filesize"} = '0'; } + 1 while $vendorstats{$vendorid."_filesize"} =~ s/^(-?\d+)(\d{3})/$1.$2/; + print "<td class='base' colspan=2 align='right'>"; + printf "%15s", $vendorstats{$vendorid."_filesize"}; + print " </td>\n";
- foreach (@sources) { - @updatelist=<$_/*>; - $vendorid = substr($_,rindex($_,"/")+1); - foreach(@updatelist) { - $uuid = substr($_,rindex($_,"/")+1); - if (-e "$_/source.url") { - open (FILE,"$_/source.url"); - $sourceurl=<FILE>; - close FILE; - chomp($sourceurl); - $updatefile = substr($sourceurl,rindex($sourceurl,'/')+1,length($sourceurl)); - $_ = $updatefile; tr/[A-Z]/[a-z]/; - $updatefile = "$_:$vendorid/$uuid/$updatefile"; - push(@repositoryfiles,$updatefile); - } - } - } - @repositoryfiles = sort { ($a =~ /.*?:(.*/).*?/)[0] cmp ($b =~ /.*?:(.*/).*?/)[0] } @repositoryfiles; -} + unless ($vendorstats{$vendorid."_cachehits"}) { $vendorstats{$vendorid."_cachehits"} = '0'; } + 1 while $vendorstats{$vendorid."_cachehits"} =~ s/^(-?\d+)(\d{3})/$1.$2/; + print "<td class='base' colspan=2 align='right'>"; + printf "%15s", $vendorstats{$vendorid."_cachehits"}; + print " </td>\n";
-# ------------------------------------------------------------------- -# Initialize Cache-Maintenance Form -# ------------------------------------------------------------------- + print "<td class='base' colspan=2 align='right'>"; + printf "%5d", $vendorstats{$vendorid."_1"}; + print " </td>\n";
-sub initfrmmaintenance { - $selected{'NOT_ACCESSED_LAST'}{'week'} = ''; - $selected{'NOT_ACCESSED_LAST'}{'month1'} = ''; - $selected{'NOT_ACCESSED_LAST'}{'month3'} = ''; - $selected{'NOT_ACCESSED_LAST'}{'month6'} = ''; - $selected{'NOT_ACCESSED_LAST'}{'year'} = ''; - $selected{'NOT_ACCESSED_LAST'}{$xlratorsettings{'NOT_ACCESSED_LAST'}} = "selected='selected'"; - $checked{'REMOVE_NOSOURCE'}{'off'} = ''; - $checked{'REMOVE_NOSOURCE'}{'on'} = ''; - $checked{'REMOVE_NOSOURCE'}{$xlratorsettings{'REMOVE_NOSOURCE'}} = "checked='checked'"; - $checked{'REMOVE_OUTDATED'}{'off'} = ''; - $checked{'REMOVE_OUTDATED'}{'on'} = ''; - $checked{'REMOVE_OUTDATED'}{$xlratorsettings{'REMOVE_OUTDATED'}} = "checked='checked'"; - $checked{'REMOVE_UNKNOWN'}{'off'} = ''; - $checked{'REMOVE_UNKNOWN'}{'on'} = ''; - $checked{'REMOVE_UNKNOWN'}{$xlratorsettings{'REMOVE_UNKNOWN'}} = "checked='checked'"; - $checked{'REMOVE_TODELETE'}{'off'} = ''; - $checked{'REMOVE_TODELETE'}{'on'} = ''; - $checked{'REMOVE_TODELETE'}{$xlratorsettings{'REMOVE_TODELETE'}} = "checked='checked'"; - $checked{'TODELETE'}{'off'} = ''; - $checked{'TODELETE'}{'on'} = ''; - $checked{'TODELETE'}{$xlratorsettings{'TODELETE'}} = "checked='checked'"; + print "<td class='base' colspan=2 align='right'>"; + printf "%5d", $vendorstats{$vendorid."_3"}; + print " </td>\n"; + + print "<td class='base' colspan=2 align='right'>"; + printf "%5d", $vendorstats{$vendorid."_2"}; + print " </td>\n"; + + print "<td class='base' colspan=2 align='right'>"; + printf "%5d", $vendorstats{$vendorid."_0"}; + print " </td>\n"; + + print "<td class='base'> </td>\n"; + print "</tr>\n"; }
-# ------------------------------------------------------------------- -# Print Cache-Maintenance Form - printfrmmaintenance('withfiles', @repositoryfiles) -# ------------------------------------------------------------------- +print "</table>\n";
-sub printfrmmaintenance { - my $param = shift; - my $repos_ref = shift; - my $disabled = ''; - unless (@$repos_ref) { $disabled = "disabled='disabled'"; } - print <<END -<form method='post' action='$ENV{'SCRIPT_NAME'}' enctype='multipart/form-data'> - <fieldset> - <legend>$Lang::tr{'updxlrtr all files'}</legend> - <input id='check08' type='checkbox' name='REMOVE_UNKNOWN' $checked{'REMOVE_UNKNOWN'}{'on'} $disabled/> - <label for='check08'>$Lang::tr{'updxlrtr not accessed'}:</label> - <select id='select02' name='NOT_ACCESSED_LAST' $disabled> - <option value='week' $selected{'NOT_ACCESSED_LAST'}{'week'}>$Lang::tr{'updxlrtr week'}</option> - <option value='month1' $selected{'NOT_ACCESSED_LAST'}{'month1'}>$Lang::tr{'updxlrtr month'}</option> - <option value='month3' $selected{'NOT_ACCESSED_LAST'}{'month3'}>$Lang::tr{'updxlrtr 3 months'}</option> - <option value='month6' $selected{'NOT_ACCESSED_LAST'}{'month6'}>$Lang::tr{'updxlrtr 6 months'}</option> - <option value='year' $selected{'NOT_ACCESSED_LAST'}{'year'}>$Lang::tr{'updxlrtr year'}</option> - </select> - </fieldset> - <fieldset> - <legend>$Lang::tr{'updxlrtr marked as'} ...</legend> - <input id='check09' type='checkbox' name='REMOVE_NOSOURCE' $disabled/> - <label id='lbledye' class='symbols' for='check09'>$Lang::tr{'updxlrtr condition nosource'}</label> - <input id='check10' type='checkbox' name='REMOVE_OUTDATED' $disabled/> - <label id='lbledrd' class='symbols' for='check10'>$Lang::tr{'updxlrtr condition outdated'}</label> - <input id='check11' type='checkbox' name='REMOVE_UNKNOWN' $disabled/> - <label id='lbledgy' class='symbols' for='check11'>$Lang::tr{'updxlrtr condition unknown'}</label> - <input id='check12' type='checkbox' name='REMOVE_TODELETE' $disabled/> - <label id='lbdel' class='symbols' for='check12'>$Lang::tr{'updxlrtr remove file'}</label> - </fieldset> - <fieldset class='noborder'> - <input type='submit' name='ACTION' value='$Lang::tr{'updxlrtr purge'}' $disabled/> - </fieldset> +print <<END +<br> +<table> + <tr> + <td class='boldbase'> <b>$Lang::tr{'legend'}:</b></td> + <td class='base'> </td> + <td align='center'><img src='/images/updbooster/updxl-led-green.gif' alt='$Lang::tr{'updxlrtr condition ok'}' /></td> + <td class='base'>$Lang::tr{'updxlrtr condition ok'}</td> + <td class='base'> </td> + <td align='center'><img src='/images/updbooster/updxl-led-yellow.gif' alt='$Lang::tr{'updxlrtr condition nosource'}' /></td> + <td class='base'>$Lang::tr{'updxlrtr condition nosource'}</td> + <td class='base'> </td> + <td align='center'><img src='/images/updbooster/updxl-led-red.gif' alt='$Lang::tr{'updxlrtr condition outdated'}' /></td> + <td class='base'>$Lang::tr{'updxlrtr condition outdated'}</td> + <td class='base'> </td> + <td align='center'><img src='/images/updbooster/updxl-led-gray.gif' alt='$Lang::tr{'updxlrtr condition unknown'}' /></td> + <td class='base'>$Lang::tr{'updxlrtr condition unknown'}</td> + <td class='base'> </td> + </tr> +</table> END ; - if ($param =~ /withfiles/i) - { &printtblrepository($Lang::tr{'updxlrtr current files'}, $repos_ref); } - print "</form>\n"; + }
-# ------------------------------------------------------------------- -# Print current files in repository - printreposfiles($title, @files) -# ------------------------------------------------------------------- +&Header::closebox();
-sub printtblrepository { - my $title = shift; - my $files = shift; - - print <<END -<hr /> -<table id='listcurrfiles'> -<caption>$title</caption> -<colgroup> -<col></col> -<col></col> -<col style='width: 0*'></col> -<col span='5' style='min-width: 20px'></col> -</colgroup> -<thead> - <tr> - <th>$Lang::tr{'status'}</th> - <th>$Lang::tr{'updxlrtr source'}</th> - <th>$Lang::tr{'updxlrtr filename'}</th> - <th>$Lang::tr{'updxlrtr filesize'}</th> - <th>$Lang::tr{'date'}</th> - <th><span id='rel' class='symbols' title='$Lang::tr{'updxlrtr last access'}'></span></th> - <th><span id='glo' class='symbols' title='$Lang::tr{'updxlrtr last checkup'}'></span></th> - <th><span id='del' class='symbols' title='$Lang::tr{'updxlrtr remove file'}'></span></th> - </tr> -</thead> -<tfoot> - <tr> - <td colspan='9' id='legend'> +} + +# ===================================================================================== +# CACHE MAINTENANCE +# ===================================================================================== + +if ($xlratorsettings{'EXTENDED_GUI'} eq 'maintenance') +{ + + +# ---------------------------------------------------- +# File list dialog +# ---------------------------------------------------- + +&Header::openbox('100%', 'left', "$Lang::tr{'updxlrtr cache maintenance'}"); + +@sources= <$repository/download/*>; + +undef @repositoryfiles; +foreach (@sources) +{ + if (-d) + { + @updatelist = <$_/*>; + $vendorid = substr($_,rindex($_,"/")+1); + foreach(@updatelist) + { + next if(/.info$/); + $updatefile = substr($_,rindex($_,"/")+1); + $updatefile .= ":download/$vendorid/$updatefile"; + $updatefile = " ".$updatefile; + push(@repositoryfiles,$updatefile); + } + } +} + +undef (@sources); +foreach (<$repository/*>) +{ + if (-d $_) +{ + unless (/^$repository/download$/) { push(@sources,$_); } + } +} + +foreach (@sources) +{ + @updatelist=<$_/*>; + $vendorid = substr($_,rindex($_,"/")+1); + foreach(@updatelist) + { + $uuid = substr($_,rindex($_,"/")+1); + if (-e "$_/source.url") + { + open (FILE,"$_/source.url"); + $sourceurl=<FILE>; + close FILE; + chomp($sourceurl); + $updatefile = substr($sourceurl,rindex($sourceurl,'/')+1,length($sourceurl)); + $_ = $updatefile; tr/[A-Z]/[a-z]/; + $updatefile = "$_:$vendorid/$uuid/$updatefile"; + push(@repositoryfiles,$updatefile); + } + } +} + +@repositoryfiles = sort(@repositoryfiles); + +unless (@repositoryfiles) { print "<i>$Lang::tr{'updxlrtr empty repository'}</i>\n<hr size='1'>\n"; } + +print <<END +<table> +<tr><td class='boldbase'><b>$Lang::tr{'updxlrtr disk usage'}</b></td></tr> +</table> +<table cellpadding='3'> +<tr> +<td align='left' class='base'><i>$Lang::tr{'updxlrtr cache dir'}</i></td> +<td align='center' class='base'><i>$Lang::tr{'size'}</i></td> +<td align='center' class='base'><i>$Lang::tr{'used'}</i></td> +<td align='center' class='base'><i>$Lang::tr{'free'}</i></td> +<td align='left' class='base' colspan='2'><i>$Lang::tr{'percentage'}</i></td> +</tr> END ; -&printlegendicons(); -&printlegendstatus(); -&printlegendsource(); + +open(DF,"/bin/df -h $repository|"); +@dfdata = <DF>; +close DF; +shift(@dfdata); +chomp(@dfdata); +$dfstr = join(' ',@dfdata); +my ($device,$size,$used,$free,$percent,$mount) = split(' ',$dfstr); + print <<END - </td> - </tr> -</tfoot> -<tbody> +<tr> +<td>[$repository]</td> +<td align='right'>$size</td> +<td align='right'>$used</td> +<td align='right'>$free</td> +<td> END ; - unless (@$files) { print "\t<tr>\n\t\t<th colspan='8'>$Lang::tr{'updxlrtr empty repository'}.</th>\n\t</tr>\n"; } - else { - $id = 0; - foreach $updatefile (@$files) { - $updatefile =~ s/.*://; - my $size_updatefile = 0; - my $mtime = 0; - if(-e "$repository/$updatefile") { - $size_updatefile = (-s "$repository/$updatefile"); - $mtime = &getmtime("$repository/$updatefile"); - } - print "\t<tr>\n"; - $filesize = &format_size($size_updatefile); - my ($SECdt,$MINdt,$HOURdt,$DAYdt,$MONTHdt,$YEARdt) = localtime($mtime); - $DAYdt = sprintf ("%.02d",$DAYdt); - $MONTHdt = sprintf ("%.02d",$MONTHdt+1); - $YEARdt = sprintf ("%.04d",$YEARdt+1900); - $filedate = $DAYdt.".".$MONTHdt.".".$YEARdt; - $lastaccess = "n/a"; - $lastcheck = "n/a"; - $status = $sfUnknown; - unless ($updatefile =~ /^download//) { - ($vendorid,$uuid,$shortname) = split('/',$updatefile); - if (-e "$repository/$vendorid/$uuid/access.log") { - open (FILE,"$repository/$vendorid/$uuid/access.log"); - @metadata = <FILE>; - close(FILE); - chomp @metadata; - ($SECdt,$MINdt,$HOURdt,$DAYdt,$MONTHdt,$YEARdt) = localtime($metadata[-1]); - $DAYdt = sprintf ("%.02d",$DAYdt); - $MONTHdt = sprintf ("%.02d",$MONTHdt+1); - $YEARdt = sprintf ("%.04d",$YEARdt+1900); - if (($metadata[-1] =~ /^\d+/) && ($metadata[-1] >= 1)) - { $lastaccess = $DAYdt.".".$MONTHdt.".".$YEARdt; } - } - if (-e "$repository/$vendorid/$uuid/checkup.log") { - open (FILE,"$repository/$vendorid/$uuid/checkup.log"); - @metadata = <FILE>; - close(FILE); - chomp @metadata; - ($SECdt,$MINdt,$HOURdt,$DAYdt,$MONTHdt,$YEARdt) = localtime($metadata[-1]); - $DAYdt = sprintf ("%.02d",$DAYdt); - $MONTHdt = sprintf ("%.02d",$MONTHdt+1); - $YEARdt = sprintf ("%.04d",$YEARdt+1900); - if (($metadata[-1] =~ /^\d+/) && ($metadata[-1] >= 1)) - { $lastcheck = $DAYdt.".".$MONTHdt.".".$YEARdt; } - } - if (-e "$repository/$vendorid/$uuid/status") { - open (FILE,"$repository/$vendorid/$uuid/status"); - @metadata = <FILE>; - close(FILE); - chomp @metadata; - $status = $metadata[-1]; - } - } - else { - ($uuid,$vendorid,$shortname) = split('/',$updatefile); - $status = $sfOutdated; - } - - if ($status == $sfUnknown) - { print "\t\t<th><span id='ledgy$id' class='symbols' title='$Lang::tr{'updxlrtr condition unknown'}'> </span></th>\n"; } - elsif ($status == $sfOk) - { print "\t\t<th><span id='ledgr$id' class='symbols' title='$Lang::tr{'updxlrtr condition ok'}'></span> </th>\n"; } - elsif ($status == $sfNoSource) - { print "\t\t<th><span id='ledye$id' class='symbols' title='$Lang::tr{'updxlrtr condition nosource'}'> </span></th>\n"; } - elsif (($status == $sfOutdated) && (!($updatefile =~ /^download//i))) - { print "\t\t<th><span id='ledrd$id' class='symbols' title='$Lang::tr{'updxlrtr condition outdated'}'> </span></th>\n"; } - elsif (($status == $sfOutdated) && ($updatefile =~ /^download//i)) - { print "\t\t<th><span id='ledbl$id' class='symbols' title='$Lang::tr{'updxlrtr condition download'}'> </span></th>\n"; } - if ($vendimg{$vendorid}) { - print "\t\t<th><span class='vendimg' style='background-image: url($vendimg{$vendorid});' title='".ucfirst $vendorid."'> </span></th>\n"; } - else { - print "\t\t<th><span class='vendimg' style='background-image: url($vendimg{unknown});' title='".ucfirst $vendorid."'> </span></th>\n"; - } - $shortname = substr($updatefile,rindex($updatefile,"/")+1); - unless ($vendorid ne 'microsoft') { $shortname =~ s/(.*)_[\da-f]*(.(exe|cab|psf)$)/$1[...] $2/i; } - unless (length($shortname) <= 50) { - my $fext = substr($shortname,rindex("$shortname",'.')); - $shortname = substr($shortname,0,44-length($fext)); - $shortname .= "[...] $fext"; - } - print <<END - <td title='cache:/$updatefile'><a href="/updatecache/$updatefile">$shortname</a></td> - <td>$filesize</td> - <td>$filedate</td> - <td>$lastaccess</td> - <td>$lastcheck</td> - <th><input id='frm$id' type='checkbox' name='TODELETE' value='$updatefile' title='$Lang::tr{'updxlrtr remove file'}' /></th> - </tr> +&percentbar($percent); +print <<END +</td> +<td align='right'>$percent</td> +</tr> +</table> END ; - $id += 1; - } - } - print <<END -</tbody> + +if (@repositoryfiles) +{ + print <<END +<hr size='1'> +<form method='post' action='$ENV{'SCRIPT_NAME'}' enctype='multipart/form-data'> +<table width='100%'> +<tr> + <td class='base' colspan='3'><input type='submit' name='ACTION' value='$Lang::tr{'updxlrtr purge'}' /> $Lang::tr{'updxlrtr all files'}</td> + <td class='base' width='25%'> + <input type='checkbox' name='REMOVE_OBSOLETE' $checked{'REMOVE_OBSOLETE'}{'on'} /> $Lang::tr{'updxlrtr not accessed'} + </td> + <td class='base' colspan='3'> + <select name='NOT_ACCESSED_LAST'> + <option value='week' $selected{'NOT_ACCESSED_LAST'}{'week'}>$Lang::tr{'updxlrtr week'}</option> + <option value='month1' $selected{'NOT_ACCESSED_LAST'}{'month1'}>$Lang::tr{'updxlrtr month'}</option> + <option value='month3' $selected{'NOT_ACCESSED_LAST'}{'month3'}>$Lang::tr{'updxlrtr 3 months'}</option> + <option value='month6' $selected{'NOT_ACCESSED_LAST'}{'month6'}>$Lang::tr{'updxlrtr 6 months'}</option> + <option value='year' $selected{'NOT_ACCESSED_LAST'}{'year'}>$Lang::tr{'updxlrtr year'}</option> + </select> + </td> +</tr> +<tr> +</tr> +<tr> + <td class='base' width='25%'> + <input type='checkbox' name='REMOVE_NOSOURCE' $checked{'REMOVE_NOSOURCE'}{'on'} /> $Lang::tr{'updxlrtr marked as'} + </td> + <td class='base' width='3%'><img src='/images/updbooster/updxl-led-yellow.gif' alt='$Lang::tr{'updxlrtr condition nosource'}' /></td> + <td class='base' width='17%'>[<i>$Lang::tr{'updxlrtr condition nosource'}</i>]</td> + <td class='base' width='25%'> + <input type='checkbox' name='REMOVE_OUTDATED' $checked{'REMOVE_OUTDATED'}{'on'} /> $Lang::tr{'updxlrtr marked as'} + </td> + <td class='base' width='3%'><img src='/images/updbooster/updxl-led-red.gif' alt='$Lang::tr{'updxlrtr condition outdated'}' /></td> + <td class='base' width='27%'>[<i>$Lang::tr{'updxlrtr condition outdated'}</i>]</td> +</tr> </table> </form> +<hr size='1'> END ; + + &printcurrentfiles($Lang::tr{'updxlrtr current files'}, @repositoryfiles); + print "<br>\n<table>\n"; + &printlegendicons(); + &printlegendspacer(); + &printlegendstatus(); + &printlegendspacer(); + &printlegendsource(); + print "</table>\n"; }
-# ------------------------------------------------------------------- -# cancels pending download - need updatefile(-ID) -# ------------------------------------------------------------------- +&Header::closebox();
-sub canceldownload { - $updatefile = shift; - if ($updatefile =~ /^download//) { - ($uuid,$vendorid,$updatefile) = split('/',$updatefile); - if (-e "$repository/download/$vendorid/$updatefile.info") { - &General::readhash("$repository/download/$vendorid/$updatefile.info", %dlinfo); - $id = &getPID("\s${General::swroot}/updatexlrator/bin/download\s.*\s".quotemeta($dlinfo{'SRCURL'})."\s\d\s\d$"); - if ($id) { system("/bin/kill -9 $id"); } - $id = &getPID("\s/usr/bin/wget\s.*\s".quotemeta($dlinfo{'SRCURL'})."$"); - if ($id) { system("/bin/kill -9 $id"); } - system("rm "$repository/download/$vendorid/$updatefile.info""); - } - - if (-e "$repository/download/$vendorid/$updatefile") { - system("rm "$repository/download/$vendorid/$updatefile""); - } - } }
-# ------------------------------------------------------------------- -# Delete old and selected cached files +# ===================================================================================== + +&Header::closebigbox(); + +&Header::closepage(); + # -------------------------------------------------------------------
-sub delolddata { - undef (@sources); - undef @repositoryfiles; - foreach (<$repository/*>) { - if (-d $_) { - unless (/^$repository/download$/) { push(@sources,$_); } - } - } - - foreach (@sources) { - @updatelist=<$_/*>; - $vendorid = substr($_,rindex($_,"/")+1); - foreach(@updatelist) { - $uuid = substr($_,rindex($_,"/")+1); - if (-e "$_/source.url") { - open (FILE,"$_/source.url"); - $sourceurl=<FILE>; - close FILE; - chomp($sourceurl); - $updatefile = substr($sourceurl,rindex($sourceurl,'/')+1,length($sourceurl)); - $updatefile = "$vendorid/$uuid/$updatefile"; - push(@repositoryfiles,$updatefile); - } - } - } - - foreach (@repositoryfiles) { - ($vendorid,$uuid,$updatefile) = split('/'); - if (-e "$repository/$vendorid/$uuid/status") { - open (FILE,"$repository/$vendorid/$uuid/status"); - @metadata = <FILE>; - close FILE; - chomp(@metadata); - $status = $metadata[-1]; - } - - if (-e "$repository/$vendorid/$uuid/access.log") { - open (FILE,"$repository/$vendorid/$uuid/access.log"); - @metadata = <FILE>; - close FILE; - chomp(@metadata); - $lastaccess = $metadata[-1]; - } - - if (($xlratorsettings{'REMOVE_NOSOURCE'} eq 'on') && ($status == $sfNoSource)) { - if (-e "$repository/$vendorid/$uuid/$updatefile") { system("rm -r "$repository/$vendorid/$uuid""); } - } - - if (($xlratorsettings{'REMOVE_OUTDATED'} eq 'on') && ($status == $sfOutdated)) { - if (-e "$repository/$vendorid/$uuid/$updatefile") { system("rm -r "$repository/$vendorid/$uuid""); } - } - - if (($xlratorsettings{'REMOVE_UNKNOWN'} eq 'on') && ($status == $sfUnknown)) { - if (-e "$repository/$vendorid/$uuid/$updatefile") { system("rm -r "$repository/$vendorid/$uuid""); } - } +sub printcurrentfiles +{ + my $title = shift; + my @files = @_;
- if (($xlratorsettings{'NOT_ACCESSED_LAST'} eq 'week') && ($lastaccess < (time - 604800))) { - if (-e "$repository/$vendorid/$uuid/$updatefile") { system("rm -r "$repository/$vendorid/$uuid""); } - } - elsif (($xlratorsettings{'NOT_ACCESSED_LAST'} eq 'month1') && ($lastaccess < (time - 2505600))) { - if (-e "$repository/$vendorid/$uuid/$updatefile") { system("rm -r "$repository/$vendorid/$uuid""); } - } - elsif (($xlratorsettings{'NOT_ACCESSED_LAST'} eq 'month3') && ($lastaccess < (time - 7516800))) { - if (-e "$repository/$vendorid/$uuid/$updatefile") { system("rm -r "$repository/$vendorid/$uuid""); } - } - elsif (($xlratorsettings{'NOT_ACCESSED_LAST'} eq 'month6') && ($lastaccess < (time - 15033600))) { - if (-e "$repository/$vendorid/$uuid/$updatefile") { system("rm -r "$repository/$vendorid/$uuid""); } - } - elsif (($xlratorsettings{'NOT_ACCESSED_LAST'} eq 'year') && ($lastaccess < (time - 31536000))) { - if (-e "$repository/$vendorid/$uuid/$updatefile") { system("rm -r "$repository/$vendorid/$uuid""); } - } + print <<END +<table> +<tr><td class='boldbase'><b>$Lang::tr{'updxlrtr current files'}</b></td></tr> +</table> +<table width='100%'> +<colgroup span='2' width='2%'></colgroup> +<colgroup span='1' width='0*'></colgroup> +<colgroup span='4' width='5%'></colgroup> +<colgroup span='1' width='2%'></colgroup> +<tr> + <td class='base' align='center'> </td> + <td class='base' align='center'> </td> + <td class='base' align='center'><i>$Lang::tr{'updxlrtr filename'}</i></td> + <td class='base' align='center'><i>$Lang::tr{'updxlrtr filesize'}</i></td> + <td class='base' align='center'><i>$Lang::tr{'date'}</i></td> + <td class='base' align='center'><img src='/images/reload.gif' alt='$Lang::tr{'updxlrtr last access'}' /></td> + <td class='base' align='center'><img src='/images/updbooster/updxl-globe.gif' alt='$Lang::tr{'updxlrtr last checkup'}' /></td> + <td class='base' align='center'> </td> +</tr> +END +; + $id = 0; + foreach $updatefile (@files) + { + $updatefile =~ s/.*://; + my $size_updatefile = 0; + my $mtime = 0; + if(-e "$repository/$updatefile") { + $size_updatefile = (-s "$repository/$updatefile"); + $mtime = &getmtime("$repository/$updatefile"); + }
- - if (($xlratorsettings{'REMOVE_TODELETE'} eq 'on') && ($xlratorsettings{'TODELETE'} ne 'off')) { - my @todelete = split(/|/, $xlratorsettings{'TODELETE'}); - foreach (@todelete) { - unless ($_ =~ /^download//) { - ($vendorid,$uuid,$cachefile) = split(///, $_); - if (-e "$repository/$vendorid/$uuid/$cachefile") { system("rm -r "$repository/$vendorid/$uuid""); } - } - } - } - } -} + $id++; + if ($id % 2) { + print "<tr bgcolor='$Header::table1colour'>\n"; } + else { + print "<tr bgcolor='$Header::table2colour'>\n"; } + + $filesize = $size_updatefile; + 1 while $filesize =~ s/^(-?\d+)(\d{3})/$1.$2/; + + my ($SECdt,$MINdt,$HOURdt,$DAYdt,$MONTHdt,$YEARdt) = localtime($mtime); + $DAYdt = sprintf ("%.02d",$DAYdt); + $MONTHdt = sprintf ("%.02d",$MONTHdt+1); + $YEARdt = sprintf ("%.04d",$YEARdt+1900); + $filedate = $YEARdt."-".$MONTHdt."-".$DAYdt; + + $lastaccess = "n/a"; + $lastcheck = "n/a"; + + $status = $sfUnknown; + + unless ($updatefile =~ /^download//) + { + ($vendorid,$uuid,$shortname) = split('/',$updatefile); + + if (-e "$repository/$vendorid/$uuid/access.log") + { + open (FILE,"$repository/$vendorid/$uuid/access.log"); + @metadata = <FILE>; + close(FILE); + chomp @metadata; + + ($SECdt,$MINdt,$HOURdt,$DAYdt,$MONTHdt,$YEARdt) = localtime($metadata[-1]); + $DAYdt = sprintf ("%.02d",$DAYdt); + $MONTHdt = sprintf ("%.02d",$MONTHdt+1); + $YEARdt = sprintf ("%.04d",$YEARdt+1900); + if (($metadata[-1] =~ /^\d+/) && ($metadata[-1] >= 1)) { $lastaccess = $YEARdt."-".$MONTHdt."-".$DAYdt; } + } + if (-e "$repository/$vendorid/$uuid/checkup.log") + { + open (FILE,"$repository/$vendorid/$uuid/checkup.log"); + @metadata = <FILE>; + close(FILE); + chomp @metadata; + + ($SECdt,$MINdt,$HOURdt,$DAYdt,$MONTHdt,$YEARdt) = localtime($metadata[-1]); + $DAYdt = sprintf ("%.02d",$DAYdt); + $MONTHdt = sprintf ("%.02d",$MONTHdt+1); + $YEARdt = sprintf ("%.04d",$YEARdt+1900); + if (($metadata[-1] =~ /^\d+/) && ($metadata[-1] >= 1)) { $lastcheck = $YEARdt."-".$MONTHdt."-".$DAYdt; } + } + if (-e "$repository/$vendorid/$uuid/status") + { + open (FILE,"$repository/$vendorid/$uuid/status"); + @metadata = <FILE>; + close(FILE); + chomp @metadata; + $status = $metadata[-1]; + } + } else { + ($uuid,$vendorid,$shortname) = split('/',$updatefile); + $status = $sfOutdated; + }
+ print "\t\t<td align='center' nowrap='nowrap'> "; + if ($status == $sfUnknown) + { + print "<img src='/images/updbooster/updxl-led-gray.gif' alt='$Lang::tr{'updxlrtr condition unknown'}' /> </td>\n"; + } + if ($status == $sfOk) + { + print "<img src='/images/updbooster/updxl-led-green.gif' alt='$Lang::tr{'updxlrtr condition ok'}' /> </td>\n"; + } + if ($status == $sfNoSource) + { + print "<img src='/images/updbooster/updxl-led-yellow.gif' alt='$Lang::tr{'updxlrtr condition nosource'}' /> </td>\n"; + } + if (($status == $sfOutdated) && (!($updatefile =~ /^download//i))) + { + print "<img src='/images/updbooster/updxl-led-red.gif' alt='$Lang::tr{'updxlrtr condition outdated'}' /> </td>\n"; + } + if (($status == $sfOutdated) && ($updatefile =~ /^download//i)) + { + print "<img src='/images/updbooster/updxl-led-blue.gif' alt='$Lang::tr{'updxlrtr condition download'}' /> </td>\n"; + }
-# ------------------------------------------------------------------- + print "\t\t<td align='center' nowrap='nowrap'> "; + if ($vendorid =~ /^Adobe$/i) + { + print "<img src='/images/updbooster/updxl-src-adobe.gif' alt='Adobe'}' /> </td>\n"; + } elsif ($vendorid =~ /^Microsoft$/i) + { + print "<img src='/images/updbooster/updxl-src-windows.gif' alt='Microsoft'}' /> </td>\n"; + } elsif ($vendorid =~ /^Symantec$/i) + { + print "<img src='/images/updbooster/updxl-src-symantec.gif' alt='Symantec'}' /> </td>\n"; + } elsif ($vendorid =~ /^Linux$/i) + { + print "<img src='/images/updbooster/updxl-src-linux.gif' alt='Linux'}' /> </td>\n"; + } elsif ($vendorid =~ /^TrendMicro$/i) + { + print "<img src='/images/updbooster/updxl-src-trendmicro.gif' alt='Trend Micro'}' /> </td>\n"; + } elsif ($vendorid =~ /^Apple$/i) + { + print "<img src='/images/updbooster/updxl-src-apple.gif' alt='Apple'}' /> </td>\n"; + } elsif ($vendorid =~ /^Avast$/i) + { + print "<img src='/images/updbooster/updxl-src-avast.gif' alt='Avast'}' /> </td>\n"; + } elsif ($vendorid =~ /^Avira$/i) + { + print "<img src='/images/updbooster/updxl-src-avira.gif' alt='Avira' /> </td>\n"; + } elsif ($vendorid =~ /^AVG$/i) + { + print "<img src='/images/updbooster/updxl-src-avg.gif' alt='AVG' /> </td>\n"; + } elsif ($vendorid =~ /^Ipfire$/i) + { + print "<img src='/images/IPFire.png' width='18' height='18' alt='IPFire' /> </td>\n"; + } + else + { + if (-e "/srv/web/ipfire/html/images/updbooster/updxl-src-" . $vendorid . ".gif") + { + print "<img src='/images/updbooster/updxl-src-" . $vendorid . ".gif' alt='" . ucfirst $vendorid . "' /> </td>\n"; + } else { + print "<img src='/images/updbooster/updxl-src-unknown.gif' alt='" . ucfirst $vendorid . "' /> </td>\n"; + } + } + + $shortname = substr($updatefile,rindex($updatefile,"/")+1); + $shortname =~ s/(.*)_[\da-f]*(.(exe|cab|psf)$)/$1_*$2/i;
-sub printlegenddownload { - print <<END -<h5>$Lang::tr{'legend'}:</h5> -<ul> - <li id='liledbl' class='symbols' title='$Lang::tr{'updxlrtr condition download'}'>$Lang::tr{'updxlrtr condition download'}</li> - <li id='liledgy' class='symbols' title='$Lang::tr{'updxlrtr condition suspended'}'>$Lang::tr{'updxlrtr condition suspended'}</li> - <li id='lidel' class='symbols' title='$Lang::tr{'updxlrtr cancel download'}'>$Lang::tr{'updxlrtr cancel download'}</li> -</ul> +print <<END + <td class='base' align='left' title='cache:/$updatefile'><a href="/updatecache/$updatefile">$shortname</a></td> + <td class='base' align='right' nowrap='nowrap'> $filesize </td> + <td class='base' align='center' nowrap='nowrap'> $filedate </td> + <td class='base' align='center' nowrap='nowrap'> $lastaccess </td> + <td class='base' align='center' nowrap='nowrap'> $lastcheck </td> + <td align='center'> + <form method='post' name='frma$id' action='$ENV{'SCRIPT_NAME'}'> + <input type='image' name='$Lang::tr{'updxlrtr remove file'}' src='/images/delete.gif' title='$Lang::tr{'updxlrtr remove file'}' alt='$Lang::tr{'updxlrtr remove file'}' /> + <input type='hidden' name='ID' value='$updatefile' /> + <input type='hidden' name='ACTION' value='$Lang::tr{'updxlrtr remove file'}' /> + </form> + </td> + </tr> END ; + } + + print "</table>\n"; + }
# -------------------------------------------------------------------
-sub printlegendicons { - print <<END -<h5>$Lang::tr{'legend'}:</h5> -<ul> - <li id='lirel' class='symbols' title='$Lang::tr{'updxlrtr last access'}'>$Lang::tr{'updxlrtr last access'}</li> - <li id='liglo' class='symbols' title='$Lang::tr{'updxlrtr last checkup'}'>$Lang::tr{'updxlrtr last checkup'}</li> - <li id='lidel' class='symbols' title='$Lang::tr{'updxlrtr remove file'}'>$Lang::tr{'updxlrtr remove file'}</li> -</ul> +sub printlegenddownload +{ + print <<END + <tr> + <td class='boldbase'> <b>$Lang::tr{'legend'}:</b></td> + <td class='base'> </td> + <td><img src='/images/updbooster/updxl-led-blue.gif' alt='$Lang::tr{'updxlrtr condition download'}' /></td> + <td class='base'>$Lang::tr{'updxlrtr condition download'}</td> + <td class='base'> </td> + <td class='base'> </td> + <td><img src='/images/updbooster/updxl-led-gray.gif' alt='$Lang::tr{'updxlrtr condition suspended'}' /></td> + <td class='base'>$Lang::tr{'updxlrtr condition suspended'}</td> + <td class='base'> </td> + <td class='base'> </td> + <td><img src='/images/delete.gif' alt='$Lang::tr{'updxlrtr cancel download'}' /></td> + <td class='base'>$Lang::tr{'updxlrtr cancel download'}</td> + </tr> END ; }
# -------------------------------------------------------------------
-sub printlegendstatus { - print <<END -<h5>$Lang::tr{'status'}:</h5> -<ul> - <li id='liledgr' class='symbols' title='$Lang::tr{'updxlrtr condition ok'}'>$Lang::tr{'updxlrtr condition ok'}</li> - <li id='liledye' class='symbols' title='$Lang::tr{'updxlrtr condition nosource'}'>$Lang::tr{'updxlrtr condition nosource'}</li> - <li id='liledrd' class='symbols' title='$Lang::tr{'updxlrtr condition outdated'}'>$Lang::tr{'updxlrtr condition outdated'}</li> - <li id='liledbl' class='symbols' title='$Lang::tr{'updxlrtr condition download'}'>$Lang::tr{'updxlrtr condition download'}</li> - <li id='liledgy' class='symbols' title='$Lang::tr{'updxlrtr condition unknown'}'>$Lang::tr{'updxlrtr condition unknown'}</li> -</ul> +sub printlegendicons +{ + print <<END + + + + <tr> + <td class='boldbase'> <b>$Lang::tr{'legend'}:</b></td> + <td class='base'> </td> + <td><img src='/images/reload.gif' alt='$Lang::tr{'updxlrtr last access'}' /></td> + <td class='base'>$Lang::tr{'updxlrtr last access'}</td> + <td class='base'> </td> + <td><img src='/images/updbooster/updxl-globe.gif' alt='$Lang::tr{'updxlrtr last checkup'}' /></td> + <td class='base'>$Lang::tr{'updxlrtr last checkup'}</td> + <td class='base'> </td> + <td><img src='/images/delete.gif' alt='$Lang::tr{'updxlrtr remove file'}' /></td> + <td class='base'>$Lang::tr{'updxlrtr remove file'}</td> + <td class='base'> </td> + <td class='base'> </td> + <td class='base'> </td> + </tr> END ; }
# -------------------------------------------------------------------
-sub printlegendsource { - print <<END -<h5>$Lang::tr{'updxlrtr sources'}:</h5> -<ul> +sub printlegendstatus +{ + print <<END + <tr> + <td class='base'> $Lang::tr{'status'}:</td> + <td class='base'> </td> + <td align='center'><img src='/images/updbooster/updxl-led-green.gif' alt='$Lang::tr{'updxlrtr condition ok'}' /></td> + <td class='base'>$Lang::tr{'updxlrtr condition ok'}</td> + <td class='base'> </td> + <td align='center'><img src='/images/updbooster/updxl-led-yellow.gif' alt='$Lang::tr{'updxlrtr condition nosource'}' /></td> + <td class='base'>$Lang::tr{'updxlrtr condition nosource'}</td> + <td class='base'> </td> + <td align='center'><img src='/images/updbooster/updxl-led-red.gif' alt='$Lang::tr{'updxlrtr condition outdated'}' /></td> + <td class='base'>$Lang::tr{'updxlrtr condition outdated'}</td> + <td class='base'> </td> + <td class='base'> </td> + + <td class='base'> </td> + </tr> + <tr> + <td class='base'> </td> + <td class='base'> </td> + <td align='center'><img src='/images/updbooster/updxl-led-blue.gif' alt='$Lang::tr{'updxlrtr condition download'}' /></td> + <td class='base'>$Lang::tr{'updxlrtr condition download'}</td> + <td class='base'> </td> + <td align='center'><img src='/images/updbooster/updxl-led-gray.gif' alt='$Lang::tr{'updxlrtr condition unknown'}' /></td> + <td class='base'>$Lang::tr{'updxlrtr condition unknown'}</td> + <td class='base'> </td> + <td class='base'> </td> + <td class='base'> </td> + <td class='base'> </td> + <td class='base'> </td> + + <td class='base'> </td> + </tr> END ; - foreach my $name (sort keys %vendimg) { - if ($name =~ /^unknown$/i) { - print "\t<li class='vendimg' style='background-image: url($vendimg{$name})' title='". ucfirst $Lang::tr{$name} ."'>". ucfirst $Lang::tr{$name} ."</li>\n"; - } else { - print "\t<li class='vendimg' style='background-image: url($vendimg{$name})' title='". ucfirst $name ."'>". ucfirst $name ."</li>\n"; - } - } - print "</ul>\n"; }
# ------------------------------------------------------------------- -# 2012-12-18: -# Seaching updbooster-image dir for all available images of format "updxl-src-<vendor>.gif" -# Build a hash in format '<vendor(name)>' -> '/images/updbooster/updxl-src-<vendor>.gif' - -sub initvendimg { - if (opendir(DIR, "$webhome$webimgdir")) { - my @files = grep { /updxl-src-/ } readdir(DIR); - my @vendor = (); - closedir(DIR); - foreach (@files) { - @vendor = split (/[.-]/, $_); - $vendimg{$vendor[2]} = "$webimgdir/$_"; - } - } - else { - die "updxlrtr: Can't access "$webhome$webimgdir". Error was: $!\n"; - } -} -# -------------------------------------------------------------------
-sub printtbldiskusage { - my $tabletitle = shift; - my $repos_ref=shift; - print <<END -<table id='diskusage'> -<caption>$tabletitle</caption> -<thead> +sub printlegendsource +{ + print <<END + <tr> + + + + <td class='base'> $Lang::tr{'updxlrtr source'}:</td> + <td class='base'> </td> + <td align='center'><img src='/images/updbooster/updxl-src-adobe.gif' alt='Adobe' /></td> + <td class='base'>Adobe</td> + <td class='base'> </td> + <td align='center'><img src='/images/updbooster/updxl-src-apple.gif' alt='Apple' /></td> + <td class='base'>Apple</td> + <td class='base'> </td> + <td align='center'><img src='/images/updbooster/updxl-src-avast.gif' alt='Avast' /></td> + <td class='base'>Avast</td> + <td class='base'> </td> + <td align='center'><img src='/images/updbooster/updxl-src-linux.gif' alt='Linux' /></td> + <td class='base'>Linux</td> + </tr> <tr> - <th>$Lang::tr{'updxlrtr cache dir'}</th> - <th>$Lang::tr{'size'}</th> - <th>$Lang::tr{'updxlrtr total used'}</th> - <th>$Lang::tr{'updxlrtr used by'}<br />[$repository]</th> - <th>$Lang::tr{'free'}</th> - <th>$Lang::tr{'percentage'}</th> + <td colspan='13'></td> </tr> -</thead> -END -; - open(DF,"/bin/df -h $repository|"); - @dfdata = <DF>; - $dudata = `/usr/bin/du -hs $repository`; - close DF; - shift(@dfdata); - chomp(@dfdata); - chomp($dudata); - $dfstr = join(' ',@dfdata); - my ($device,$size,$used,$free,$percent,$mount) = split(' ',$dfstr); - my ($duused,$tmp) = split(' ',$dudata); - print <<END -<tbody> <tr> - <td>[$repository]</td> - <td>$size</td> - <td><span id="used">$used</span></td> - <td><span id="duused">$duused</span></td> - <td><span id="free">$free</span></td> - <td> -END -; - &percentbar(&cpof($duused,$size),&cpof($used,$size)); - print <<END - </td> + <td class='base'> </td> + <td class='base'> </td> + <td align='center'><img src='/images/updbooster/updxl-src-windows.gif' alt='Microsoft' /></td> + <td class='base'>Microsoft</td> + <td class='base'> </td> + <td align='center'><img src='/images/updbooster/updxl-src-symantec.gif' alt='Symantec' /></td> + <td class='base'>Symantec</td> + <td class='base'> </td> + <td align='center'><img src='/images/updbooster/updxl-src-trendmicro.gif' alt='Trend Micro' /></td> + <td class='base'>Trend Micro</td> + <td class='base'> </td> + <td align='center'><img src='/images/IPFire.png' width='18' height='18' alt='IPFire' /></td> + <td class='base'>IPFire</td> </tr> -</tbody> -</table> + <tr> + <td class='base'> </td> + <td class='base'> </td> + <td align='center'><img src='/images/updbooster/updxl-src-avira.gif' alt='Avira' /></td> + <td class='base'>Avira</td> + <td class='base'> </td> + <td align='center'><img src='/images/updbooster/updxl-src-avg.gif' alt='AVG' /></td> + <td class='base'>AVG</td> + <td class='base'> </td> + <td align='center'><img src='/images/updbooster/updxl-src-unknown.gif' alt='$Lang::tr{'updxlrtr other'}' /></td> + <td class='base'>$Lang::tr{'updxlrtr other'}</td> + <td class='base'> </td> + <td align='center'></td> + <td class='base'> </td> + </tr> + END ; -}
-# ------------------------------------------------------------------- -# Initialize Cache-Settings Form -# ------------------------------------------------------------------- - -sub initfrmsettings { - $checked{'ENABLE_LOG'}{'off'} = ''; - $checked{'ENABLE_LOG'}{'on'} = ''; - $checked{'ENABLE_LOG'}{$xlratorsettings{'ENABLE_LOG'}} = "checked='checked'"; - $checked{'PASSIVE_MODE'}{'off'} = ''; - $checked{'PASSIVE_MODE'}{'on'} = ''; - $checked{'PASSIVE_MODE'}{$xlratorsettings{'PASSIVE_MODE'}} = "checked='checked'"; - $checked{'LOW_DOWNLOAD_PRIORITY'}{'off'} = ''; - $checked{'LOW_DOWNLOAD_PRIORITY'}{'on'} = ''; - $checked{'LOW_DOWNLOAD_PRIORITY'}{$xlratorsettings{'LOW_DOWNLOAD_PRIORITY'}} = "checked='checked'"; - $checked{'ENABLE_AUTOCHECK'}{'off'} = ''; - $checked{'ENABLE_AUTOCHECK'}{'on'} = ''; - $checked{'ENABLE_AUTOCHECK'}{$xlratorsettings{'ENABLE_AUTOCHECK'}} = "checked='checked'"; - $checked{'FULL_AUTOSYNC'}{'off'} = ''; - $checked{'FULL_AUTOSYNC'}{'on'} = ''; - $checked{'FULL_AUTOSYNC'}{$xlratorsettings{'FULL_AUTOSYNC'}} = "checked='checked'"; - $selected{'VIEW_SETTING'}{'overview'} = ''; - $selected{'VIEW_SETTING'}{'statistics'} = ''; - $selected{'VIEW_SETTING'}{'maintenance'} = ''; - $selected{'VIEW_SETTING'}{'settings'} = ''; - $selected{'VIEW_SETTING'}{$xlratorsettings{'VIEW_SETTING'}} = "checked='checked'"; - $selected{'AUTOCHECK_SCHEDULE'}{'daily'} = ''; - $selected{'AUTOCHECK_SCHEDULE'}{'weekly'} = ''; - $selected{'AUTOCHECK_SCHEDULE'}{'monthly'} = ''; - $selected{'AUTOCHECK_SCHEDULE'}{$xlratorsettings{'AUTOCHECK_SCHEDULE'}} = "selected='selected'"; }
# ------------------------------------------------------------------- -# Print Cache-Settings Form -# -------------------------------------------------------------------
-sub printfrmsettings { - print <<END -<form id='frmsettings' method='post' action='$ENV{'SCRIPT_NAME'}' enctype='multipart/form-data'> - <fieldset> - <legend>$Lang::tr{'updxlrtr standard view'}</legend> - <input id='radio01' type='radio' name='VIEW_SETTING' value='overview' $selected{'VIEW_SETTING'}{'overview'} /> - <label for='radio01'>$Lang::tr{'updxlrtr overview'}</label> - <input id='radio02' type='radio' name='VIEW_SETTING' value='statistics' $selected{'VIEW_SETTING'}{'statistics'} /> - <label for='radio02'>$Lang::tr{'updxlrtr statistics'}</label> - <input id='radio03' type='radio' name='VIEW_SETTING' value='maintenance' $selected{'VIEW_SETTING'}{'maintenance'} /> - <label for='radio03'>$Lang::tr{'updxlrtr maintenance'}</label> - <input id='radio04' type='radio' name='VIEW_SETTING' value='settings' $selected{'VIEW_SETTING'}{'settings'} /> - <label for='radio04'>$Lang::tr{'updxlrtr settings'}</label> - </fieldset> - <fieldset> - <legend>$Lang::tr{'updxlrtr common settings'}</legend> - <input id='check01' type='checkbox' name='ENABLE_LOG' $checked{'ENABLE_LOG'}{'on'} /> - <label for='check01'>$Lang::tr{'updxlrtr enable log'}</label> - <input id='check02' type='checkbox' name='PASSIVE_MODE' $checked{'PASSIVE_MODE'}{'on'} /> - <label for='check02'>$Lang::tr{'updxlrtr passive mode'}</label> - <label for='text01'>$Lang::tr{'updxlrtr max disk usage'} (<output id='duval'>$xlratorsettings{'MAX_DISK_USAGE'}</output>%):</label> - <input id='text01' type='range' name='MAX_DISK_USAGE' min='0' max='100' step='1' onchange='duval.value=value' value='$xlratorsettings{'MAX_DISK_USAGE'}' size='3' maxlength='4'/> - </fieldset> - <fieldset> - <legend>$Lang::tr{'updxlrtr performance options'}</legend> - <input id='check04' type='checkbox' name='LOW_DOWNLOAD_PRIORITY' $checked{'LOW_DOWNLOAD_PRIORITY'}{'on'} /> - <label for='check04'>$Lang::tr{'updxlrtr low download priority'}</label> - <label for='text02' >$Lang::tr{'updxlrtr max download rate'}:</label> - <input id='text02' type='number' name='MAX_DOWNLOAD_RATE' title='$Lang::tr{'updxlrtr notice dlrate'}' min='0' max='1000000' step='16' value='$xlratorsettings{'MAX_DOWNLOAD_RATE'}' size='5' /> - </fieldset> - <fieldset> - <legend>$Lang::tr{'updxlrtr source checkup'}</legend> - <input id='check06' type='checkbox' name='ENABLE_AUTOCHECK' $checked{'ENABLE_AUTOCHECK'}{'on'} /> - <label for='check06'>$Lang::tr{'updxlrtr enable autocheck'}</label> - <label for='select01'>$Lang::tr{'updxlrtr source checkup schedule'}:</label> - <select id='select01' name='AUTOCHECK_SCHEDULE'> - <option value='daily' $selected{'AUTOCHECK_SCHEDULE'}{'daily'}>$Lang::tr{'updxlrtr daily'}</option> - <option value='weekly' $selected{'AUTOCHECK_SCHEDULE'}{'weekly'}>$Lang::tr{'updxlrtr weekly'}</option> - <option value='monthly' $selected{'AUTOCHECK_SCHEDULE'}{'monthly'}>$Lang::tr{'updxlrtr monthly'}</option> - </select> - <br /> - <input id='check07' type='checkbox' name='FULL_AUTOSYNC' $checked{'FULL_AUTOSYNC'}{'on'} /> - <label for='check07'>$Lang::tr{'updxlrtr full autosync'}</label> - </fieldset> - <fieldset style='border:0'> - <input type='submit' name='ACTION' value='$Lang::tr{'save'}' /> - <input type='submit' name='ACTION' value='$Lang::tr{'updxlrtr save and restart'}' /> - </fieldset> -</form> +sub printlegendspacer +{ + print <<END + <tr> + <td colspan='13'> <br></td> + </tr> END ; }
# ------------------------------------------------------------------- -# chksettings([save|restart]) - Check settings and/or restart proxy -# -------------------------------------------------------------------
-sub chksettings { - my $param = shift; - my $error_ref = shift; - if ( $param =~ /save/i ) { - if (!($xlratorsettings{'MAX_DISK_USAGE'} =~ /^\d+$/) - || ($xlratorsettings{'MAX_DISK_USAGE'} < 1) - || ($xlratorsettings{'MAX_DISK_USAGE'} > 100)) { - push(@$error_ref, $Lang::tr{'updxlrtr invalid disk usage'}); - } - if (($xlratorsettings{'MAX_DOWNLOAD_RATE'} ne '') && ((!($xlratorsettings{'MAX_DOWNLOAD_RATE'} =~ /^\d+$/)) - || ($xlratorsettings{'MAX_DOWNLOAD_RATE'} < 1))) { - push(@$error_ref, $Lang::tr{'updxlrtr invalid download rate'}); - } - unless (@$error_ref >= 1) { &savesettings; } - } - if ($param =~ /restart/i ) { - if ((!(-e "${General::swroot}/proxy/enable")) && (!(-e "${General::swroot}/proxy/enable_blue"))) { - push(@$error_ref, $Lang::tr{'updxlrtr web proxy service required'}); - } - if ($proxysettings{'ENABLE_UPDXLRATOR'} ne 'on') { - push(@$error_ref, $Lang::tr{'updxlrtr not enabled'}); - } - unless (@$error_ref >= 1) { system('/usr/local/bin/squidctrl restart > /dev/null 2>&1'); } - } - unless (@$error_ref == 0) { &initfrmsettings; } -} +sub savesettings +{
-# ------------------------------------------------------------------- + if (($xlratorsettings{'ENABLE_AUTOCHECK'} eq 'on') && ($xlratorsettings{'AUTOCHECK_SCHEDULE'} eq 'daily')) + { + system('/usr/local/bin/updxlratorctrl cron daily >/dev/null 2>&1'); + } + if (($xlratorsettings{'ENABLE_AUTOCHECK'} eq 'on') && ($xlratorsettings{'AUTOCHECK_SCHEDULE'} eq 'weekly')) + { + system('/usr/local/bin/updxlratorctrl cron weekly >/dev/null 2>&1'); + } + if (($xlratorsettings{'ENABLE_AUTOCHECK'} eq 'on') && ($xlratorsettings{'AUTOCHECK_SCHEDULE'} eq 'monthly')) + { + system('/usr/local/bin/updxlratorctrl cron monthly >/dev/null 2>&1'); + }
-sub savesettings { - if (($xlratorsettings{'ENABLE_AUTOCHECK'} eq 'on') && ($xlratorsettings{'AUTOCHECK_SCHEDULE'} eq 'daily')) - { system('/usr/local/bin/updxlratorctrl cron daily >/dev/null 2>&1'); } - if (($xlratorsettings{'ENABLE_AUTOCHECK'} eq 'on') && ($xlratorsettings{'AUTOCHECK_SCHEDULE'} eq 'weekly')) - { system('/usr/local/bin/updxlratorctrl cron weekly >/dev/null 2>&1'); } - if (($xlratorsettings{'ENABLE_AUTOCHECK'} eq 'on') && ($xlratorsettings{'AUTOCHECK_SCHEDULE'} eq 'monthly')) - { system('/usr/local/bin/updxlratorctrl cron monthly >/dev/null 2>&1'); } - - # don't save those variable to the settings file, - # but we wan't to have them in the hash again after saving to file - my $obsolete = $xlratorsettings{'REMOVE_UNKNOWN'}; - my $nosource = $xlratorsettings{'REMOVE_NOSOURCE'}; - my $outdated = $xlratorsettings{'REMOVE_OUTDATED'}; - my $todelete = $xlratorsettings{'REMOVE_TODELETE'}; - my $gui = $xlratorsettings{'EXTENDED_GUI'}; - my $show = $xlratorsettings{'show'}; - - delete($xlratorsettings{'REMOVE_UNKNOWN'}); - delete($xlratorsettings{'REMOVE_NOSOURCE'}); - delete($xlratorsettings{'REMOVE_OUTDATED'}); - delete($xlratorsettings{'REMOVE_TODELETE'}); - delete($xlratorsettings{'TODELETE'}); - delete($xlratorsettings{'EXTENDED_GUI'}); - delete($xlratorsettings{'show'}); - - &General::writehash("${General::swroot}/updatexlrator/settings", %xlratorsettings); - - # put temp variables back into the hash - $xlratorsettings{'REMOVE_UNKNOWN'} = $obsolete; - $xlratorsettings{'REMOVE_NOSOURCE'} = $nosource; - $xlratorsettings{'REMOVE_OUTDATED'} = $outdated; - $xlratorsettings{'REMOVE_TODELETE'} = $todelete; - $xlratorsettings{'EXTENDED_GUI'} = $gui; - $xlratorsettings{'show'} = $show; -} + # don't save those variable to the settings file, + # but we wan't to have them in the hash again after saving to file + my $obsolete = $xlratorsettings{'REMOVE_OBSOLETE'}; + my $nosource = $xlratorsettings{'REMOVE_NOSOURCE'}; + my $outdated = $xlratorsettings{'REMOVE_OUTDATED'}; + my $gui = $xlratorsettings{'EXTENDED_GUI'};
+ delete($xlratorsettings{'REMOVE_OBSOLETE'}); + delete($xlratorsettings{'REMOVE_NOSOURCE'}); + delete($xlratorsettings{'REMOVE_OUTDATED'});
-# ------------------------------------------------------------------- -# percentbar(number[, number2, number(n)) - need absolute values -# - print relative bars ([##1][##2(number2-number1)][#n-#2-#1]...) -# ------------------------------------------------------------------- + delete($xlratorsettings{'EXTENDED_GUI'});
-sub percentbar { - $counts = '0'; - my $width = '-0'; # width of value bar - my $widthmax = '-0'; # overall width - my $tmp = ''; - my @tmplst; - my $sf = 1; # scale-factor - print "<div id='pbar'>"; - @_ = sort{ $a <=> $b } @_; - for (@_) { - unless ($widthmax <= 100.0) { next; }; - $width = $_-($widthmax); - $widthmax = $_; - if (($width > 0) && ($width < 1)) { $width=1; } - $tmp .= "<div id='bar$counts' style='width:".(sprintf("%0.2f",$width))*$sf."%'></div>\n"; - $counts = $counts + 1; - } - $widthmax = sprintf("%0d",$widthmax); - if ( $widthmax < 79) { $tmp .= "<span id='percent'>$widthmax%</span>\n"; } - else { $tmp .= "<span id='max'>$widthmax%</span>\n"; } - - print "\t\t$tmp</div>\n"; - return; + &General::writehash("${General::swroot}/updatexlrator/settings", %xlratorsettings); + + # put temp variables back into the hash + $xlratorsettings{'REMOVE_OBSOLETE'} = $obsolete; + $xlratorsettings{'REMOVE_NOSOURCE'} = $nosource; + $xlratorsettings{'REMOVE_OUTDATED'} = $outdated; + $xlratorsettings{'EXTENDED_GUI'} = $gui; }
# ------------------------------------------------------------------- -# Format given filesize in Bits -# into values of more human readable format like kB, MB, GB, etc -# take filesize in Bit, returns formatted string in example "xx.xx kB" -# No roundings are happened, -# so counting with the output may result in wrong values -# -------------------------------------------------------------------
-sub format_size{ - my $fsize = shift; - - if ($fsize > 2**60) # EB: 1024 PB - { return sprintf("%.2f EB", $fsize / 2**40); } - elsif ($fsize > 2**50) # PB: 1024 TB - { return sprintf("%.2f PB", $fsize / 2**40); } - elsif ($fsize > 2**40) # TB: 1024 GB - { return sprintf("%.2f TB", $fsize / 2**40); } - elsif ($fsize > 2**30) # GB: 1024 MB - { return sprintf("%.2f GB", $fsize / 2**30); } - elsif ($fsize > 2**20) # MB: 1024 kB - { return sprintf("%.2f MB", $fsize / 2**20); } - elsif ($fsize > 2**10) # kB: 1024 B - { return sprintf("%.2f KB", $fsize / 2**10); } - else # Bytes - { return "$fsize B"; } +sub percentbar +{ + my $percent = $_[0]; + my $fg = '#a0a0a0'; + my $bg = '#e2e2e2'; + + if ($percent =~ m/^(\d+)%$/ ) + { + print <<END +<table width='100' border='1' cellspacing='0' cellpadding='0' style='border-width:1px;border-style:solid;border-color:$fg;width:100px;height:10px;'> +<tr> +END +; + if ($percent eq "100%") { + print "<td width='100%' bgcolor='$fg' style='background-color:$fg;border-style:solid;border-width:1px;border-color:$bg'>" + } elsif ($percent eq "0%") { + print "<td width='100%' bgcolor='$bg' style='background-color:$bg;border-style:solid;border-width:1px;border-color:$bg'>" + } else { + print "<td width='$percent' bgcolor='$fg' style='background-color:$fg;border-style:solid;border-width:1px;border-color:$bg'></td><td width='" . (100-$1) . "%' bgcolor='$bg' style='background-color:$bg;border-style:solid;border-width:1px;border-color:$bg'>" + } + print <<END +<img src='/images/null.gif' width='1' height='1' alt='' /></td></tr></table> +END +; + } }
# -------------------------------------------------------------------
sub getmtime { - my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat($_[0]); - return $mtime; + my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat($_[0]); + + return $mtime; }
# -------------------------------------------------------------------
sub getPID { - my $pid=''; - my @psdata=`ps ax --no-heading`; + my $pid=''; + my @psdata=`ps ax --no-heading`; + + foreach (@psdata) + { + if (/$_[0]/) { ($pid)=/^\s*(\d+)/; } + }
- foreach (@psdata) - { if (/$_[0]/) { ($pid)=/^\s*(\d+)/; } } - return $pid; + return $pid; }
# ------------------------------------------------------------------- -# Calculating Percentage of 2 Values (for percentbar) -# ------------------------------------------------------------------- - -sub cpof { - my $Value; - my $MValue; - my $result; - my $Vsize; - my $MVsize; - my $corf; - my $callme = "cpof(value[B|K|M|G|T|P|E], maxvalue[B|K|M|G|T|P|E])"; - $Value = shift; - $MValue = shift; - my %cf = ('B'=>0,'K'=>1,'M'=>2,'G'=>3,'T'=>4,'P'=>5,'E'=>6); - unless ('$Value' ne '') { die "updxlrtr sub cpof: value not given: $!\n$callme"; } - unless ('$MValue' ne '') { die "updxlrtr sub cpof: maxvalue not given: $!\n$callme"; } - - unless ($Value =~ /\d+(B|K|M|G|T|P|E)/) { die "updxlrtr: cpof() - value has no size!\nPossible Values: 'number[B|K|M|G|T|P|E]'\n"; } - else { $Vsize = chop $Value; } - unless ($MValue =~ /\d+(B|K|M|G|T|P|E)/) { die "updxlrtr: cpof(): maxvalue has no size!\nPossible Values: 'number[B|K|M|G|T|P|E]'\n"; } - else { $MVsize = chop $MValue; } - - if ('$Vsize' eq '$MVsize') { $result = (100/$MValue)*$Value; } - else { - if ($Value =~ /^0.d+/) { $corf = 1; } - else { $corf = '0'; } - } - my $tmp = (100/($MValue*(2**(10*$cf{$MVsize}))))*($Value*(2**(10*($cf{$Vsize}-$corf)))); - $tmp = sprintf ("%.2f", $tmp); - return $tmp; -} diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi index bda49a3..26f1793 100644 --- a/html/cgi-bin/vpnmain.cgi +++ b/html/cgi-bin/vpnmain.cgi @@ -245,9 +245,6 @@ sub writeipsecfiles { flock CONF, 2; flock SECRETS, 2; print CONF "version 2\n\n"; - print CONF "config setup\n"; - print CONF "\tcharondebug="dmn 0, mgr 0, ike 0, chd 0, job 0, cfg 0, knl 0, net 0, asn 0, enc 0, lib 0, esp 0, tls 0, tnc 0, imc 0, imv 0, pts 0"\n"; - print CONF "\n"; print CONF "conn %default\n"; print CONF "\tkeyingtries=%forever\n"; print CONF "\n"; diff --git a/html/html/images/updbooster/updxl-globe.gif b/html/html/images/updbooster/updxl-globe.gif new file mode 100644 index 0000000..54e49fc Binary files /dev/null and b/html/html/images/updbooster/updxl-globe.gif differ diff --git a/html/html/images/updbooster/updxl-gr.gif b/html/html/images/updbooster/updxl-gr.gif new file mode 100644 index 0000000..f8b8ec0 Binary files /dev/null and b/html/html/images/updbooster/updxl-gr.gif differ diff --git a/html/html/images/updbooster/updxl-led-blue.gif b/html/html/images/updbooster/updxl-led-blue.gif new file mode 100644 index 0000000..80424c9 Binary files /dev/null and b/html/html/images/updbooster/updxl-led-blue.gif differ diff --git a/html/html/images/updbooster/updxl-led-gray.gif b/html/html/images/updbooster/updxl-led-gray.gif new file mode 100644 index 0000000..ccac733 Binary files /dev/null and b/html/html/images/updbooster/updxl-led-gray.gif differ diff --git a/html/html/images/updbooster/updxl-led-green.gif b/html/html/images/updbooster/updxl-led-green.gif new file mode 100644 index 0000000..f8b8ec0 Binary files /dev/null and b/html/html/images/updbooster/updxl-led-green.gif differ diff --git a/html/html/images/updbooster/updxl-led-red.gif b/html/html/images/updbooster/updxl-led-red.gif new file mode 100644 index 0000000..4bce21f Binary files /dev/null and b/html/html/images/updbooster/updxl-led-red.gif differ diff --git a/html/html/images/updbooster/updxl-led-yellow.gif b/html/html/images/updbooster/updxl-led-yellow.gif new file mode 100644 index 0000000..f7e4f9a Binary files /dev/null and b/html/html/images/updbooster/updxl-led-yellow.gif differ diff --git a/html/html/images/updbooster/updxl-rd.gif b/html/html/images/updbooster/updxl-rd.gif new file mode 100644 index 0000000..4bce21f Binary files /dev/null and b/html/html/images/updbooster/updxl-rd.gif differ diff --git a/html/html/images/updbooster/updxl-src-adobe.gif b/html/html/images/updbooster/updxl-src-adobe.gif index 1152105..ebcd551 100644 Binary files a/html/html/images/updbooster/updxl-src-adobe.gif and b/html/html/images/updbooster/updxl-src-adobe.gif differ diff --git a/html/html/images/updbooster/updxl-src-ageofconan.gif b/html/html/images/updbooster/updxl-src-ageofconan.gif deleted file mode 100644 index 99b301a..0000000 Binary files a/html/html/images/updbooster/updxl-src-ageofconan.gif and /dev/null differ diff --git a/html/html/images/updbooster/updxl-src-avira.gif b/html/html/images/updbooster/updxl-src-avira.gif index 86e2bb7..1ed0d81 100644 Binary files a/html/html/images/updbooster/updxl-src-avira.gif and b/html/html/images/updbooster/updxl-src-avira.gif differ diff --git a/html/html/images/updbooster/updxl-src-curse.gif b/html/html/images/updbooster/updxl-src-curse.gif deleted file mode 100644 index 72fab86..0000000 Binary files a/html/html/images/updbooster/updxl-src-curse.gif and /dev/null differ diff --git a/html/html/images/updbooster/updxl-src-diabloiii.gif b/html/html/images/updbooster/updxl-src-diabloiii.gif deleted file mode 100644 index c4f3fdf..0000000 Binary files a/html/html/images/updbooster/updxl-src-diabloiii.gif and /dev/null differ diff --git a/html/html/images/updbooster/updxl-src-eveonline.gif b/html/html/images/updbooster/updxl-src-eveonline.gif deleted file mode 100644 index 12f5ffa..0000000 Binary files a/html/html/images/updbooster/updxl-src-eveonline.gif and /dev/null differ diff --git a/html/html/images/updbooster/updxl-src-google.gif b/html/html/images/updbooster/updxl-src-google.gif deleted file mode 100644 index e62e292..0000000 Binary files a/html/html/images/updbooster/updxl-src-google.gif and /dev/null differ diff --git a/html/html/images/updbooster/updxl-src-ipfire.gif b/html/html/images/updbooster/updxl-src-ipfire.gif deleted file mode 100644 index 2db1276..0000000 Binary files a/html/html/images/updbooster/updxl-src-ipfire.gif and /dev/null differ diff --git a/html/html/images/updbooster/updxl-src-kaspersky.gif b/html/html/images/updbooster/updxl-src-kaspersky.gif index dab09a8..687a6c3 100644 Binary files a/html/html/images/updbooster/updxl-src-kaspersky.gif and b/html/html/images/updbooster/updxl-src-kaspersky.gif differ diff --git a/html/html/images/updbooster/updxl-src-mozilla.gif b/html/html/images/updbooster/updxl-src-mozilla.gif deleted file mode 100644 index 1d1e3d0..0000000 Binary files a/html/html/images/updbooster/updxl-src-mozilla.gif and /dev/null differ diff --git a/html/html/images/updbooster/updxl-src-nvidia.gif b/html/html/images/updbooster/updxl-src-nvidia.gif deleted file mode 100644 index f25c41e..0000000 Binary files a/html/html/images/updbooster/updxl-src-nvidia.gif and /dev/null differ diff --git a/html/html/images/updbooster/updxl-src-opera.gif b/html/html/images/updbooster/updxl-src-opera.gif deleted file mode 100644 index 0cbf9b6..0000000 Binary files a/html/html/images/updbooster/updxl-src-opera.gif and /dev/null differ diff --git a/html/html/images/updbooster/updxl-src-secunia.gif b/html/html/images/updbooster/updxl-src-secunia.gif deleted file mode 100644 index fc980b1..0000000 Binary files a/html/html/images/updbooster/updxl-src-secunia.gif and /dev/null differ diff --git a/html/html/images/updbooster/updxl-src-swtor.gif b/html/html/images/updbooster/updxl-src-swtor.gif deleted file mode 100644 index 13fe222..0000000 Binary files a/html/html/images/updbooster/updxl-src-swtor.gif and /dev/null differ diff --git a/html/html/images/updbooster/updxl-src-wot.gif b/html/html/images/updbooster/updxl-src-wot.gif deleted file mode 100644 index e76f48c..0000000 Binary files a/html/html/images/updbooster/updxl-src-wot.gif and /dev/null differ diff --git a/html/html/images/updbooster/updxl-src-wow.gif b/html/html/images/updbooster/updxl-src-wow.gif deleted file mode 100644 index e64432e..0000000 Binary files a/html/html/images/updbooster/updxl-src-wow.gif and /dev/null differ diff --git a/html/html/images/updbooster/updxl-yl.gif b/html/html/images/updbooster/updxl-yl.gif new file mode 100644 index 0000000..f7e4f9a Binary files /dev/null and b/html/html/images/updbooster/updxl-yl.gif differ diff --git a/html/html/themes/ipfire/images/updxl-icons.gif b/html/html/themes/ipfire/images/updxl-icons.gif deleted file mode 100644 index bae5cb6..0000000 Binary files a/html/html/themes/ipfire/images/updxl-icons.gif and /dev/null differ diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl index 086ff18..c557e8b 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -161,7 +161,6 @@ END print <<END <link rel="shortcut icon" href="/favicon.ico" /> <link rel="stylesheet" type="text/css" href="/themes/ipfire/include/style.css" /> - $extrahead <script language="javascript" type="text/javascript">
function swapVisibility(id) { @@ -224,36 +223,38 @@ END ; } else { - print "</head><body>";} +print "</head><body>";} print <<END <!-- IPFIRE HEADER -->
<div id="header"> - <div id="header_inner" class="fixed"> - <div id="logo"> + + <div id="header_inner" class="fixed"> + + <div id="logo"> END ; -if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') { - print "<h1><span>$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}</span></h1><br />"; -} -else { - print "<h1><span>IPFire</span></h1><br />"; -} -print <<END - <h2>$h2</h2> - </div> + if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') { + print "<h1><span>$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}</span></h1><br />"; + } else { + print "<h1><span>IPFire</span></h1><br />"; + } + print <<END + <h2>$h2</h2> + </div> + END ; -&showmenu(); + &showmenu();
print <<END - </div> + </div> </div>
<div id="main"> - <div id="main_inner" class="fixed"> - <div id="primaryContent_2columns"> - <div id="columnA_2columns"> + <div id="main_inner" class="fixed"> + <div id="primaryContent_2columns"> + <div id="columnA_2columns"> END ; } @@ -279,7 +280,8 @@ sub openpagewithoutmenu { <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> <html xmlns='http://www.w3.org/1999/xhtml'> <head> - <title>$title</title> + <title>$title</title> + $extrahead END ; if ($settings{'FX'} ne 'off') { @@ -292,7 +294,6 @@ END print <<END <link rel="shortcut icon" href="/favicon.ico" /> <link rel="stylesheet" type="text/css" href="/include/style.css" /> - $extrahead <script language="javascript" type="text/javascript">
function swapVisibility(id) { @@ -305,21 +306,26 @@ END } } </script> + </head> <body> <!-- IPFIRE HEADER --> - <div id="header"> - <div id="header_inner" class="fixed"> - <div id="logo"> - <h1><span>IPFire</span></h1> - <h2>$h2</h2> - </div> - </div> - </div> - <div id="main"> - <div id="main_inner" class="fixed"> - <div id="primaryContent_2columns"> - <div id="columnA_2columns"> + +<div id="header"> + + <div id="header_inner" class="fixed"> + + <div id="logo"> + <h1><span>IPFire</span></h1> + <h2>$h2</h2> + </div> + </div> +</div> + +<div id="main"> + <div id="main_inner" class="fixed"> + <div id="primaryContent_2columns"> + <div id="columnA_2columns"> END ; } @@ -334,10 +340,12 @@ sub closepage () { $uptime =~ s/load average/$Lang::tr{'uptime load average'}/; print <<END - </div> - </div> - <div id="secondaryContent_2columns"> - <div id="columnC_2columns"> + </div> + </div> + + <div id="secondaryContent_2columns"> + + <div id="columnC_2columns"> END ; &showsubsection($menu); @@ -353,16 +361,17 @@ END ; if ($settings{'SPEED'} ne 'off') { print <<END - <br /> - <b>$Lang::tr{'bandwidth usage'}:</b> + <br /> + <b>$Lang::tr{'bandwidth usage'}:</b> $Lang::tr{'incoming'}: <span id="rx_kbs"></span> $Lang::tr{'outgoing'}: <span id="tx_kbs"></span> + END ; } print <<END - </div> - </div> - </div> + </div> + </div> +</div> </body> </html> END @@ -379,25 +388,25 @@ sub closebigbox
sub openbox { - $width = $_[0]; - $align = $_[1]; - $caption = $_[2]; + $width = $_[0]; + $align = $_[1]; + $caption = $_[2];
- print <<END + print <<END <!-- openbox --> - <div class="post" style="text-align:$align"> + <div class="post" align="$align"> END ;
- if ($caption) { print "<h3>$caption</h3>\n"; } else { print " "; } + if ($caption) { print "<h3>$caption</h3>\n"; } else { print " "; } }
sub closebox { - print <<END - </div> - <br class="clear" /> - <!-- closebox --> + print <<END + </div> + <br class="clear" /> + <!-- closebox --> END ; } diff --git a/html/html/themes/ipfire/include/upxlr.css b/html/html/themes/ipfire/include/upxlr.css deleted file mode 100644 index e7cc9fd..0000000 --- a/html/html/themes/ipfire/include/upxlr.css +++ /dev/null @@ -1,384 +0,0 @@ -span[id^=ledgr],li#liledgr,label#lbledgr -{ - background-position:0 0; -} - -span[id^=ledbl],li#liledbl,label#lbledbl -{ - background-position:0 -20px; -} - -span[id^=ledye],li#liledye,label#lbledye -{ - background-position:0 -40px; -} - -span[id^=ledrd],li#liledrd,label#lbledrd -{ - background-position:0 -60px; -} - -span[id^=ledgy],li#liledgy,label#lbledgy -{ - background-position:0 -80px; -} - -span#rel,li#lirel -{ - background-position:0 -100px; -} - -span#glo,li#liglo -{ - background-position:0 -120px; -} - -span#del,li#lidel,label#lbdel,button[id^=del] -{ - background-position:0 -140px; -} - -span#blo,li#liblo -{ - background-position:0 -160px; -} - -#stat -{ - background-position:0 -180px; -} - -#wrench -{ - background-position:0 -200px; -} - -#set -{ - background-position:0 -220px; -} - -#oview -{ - background-position:0 -240px; -} - -.symbols -{ - background:transparent url(/themes/ipfire/images/updxl-icons.gif) no-repeat; - height:20px; - width:20px; -} - -.vendimg -{ - background-repeat:no-repeat; - height:18px; - width:18px; -} - -.noborder -{ - border:none; -} - -fieldset -{ - padding: 0 0 .5em; - margin-bottom: .5em; - border: 1px dotted #E1E1E1; - border-top: none; - border-left: none; - border-right: none; -} - -legend -{ - margin-left:0; - padding-left:0; - padding-right:.5em; - font-weight: bolder; -} - -label -{ - cursor:pointer; - padding-right:1em; -} - -label[for^=text],label[for^=select] -{ - padding-right:.2em; -} - -label.symbols -{ - display:inline-block; - min-height:20px; - padding-left:25px; - width:auto; -} - -button[id^=del] -{ - border-style:none; -} - -input:invalid -{ - border:2px solid red; -} - -input#text01 -{ - height:1em; - max-width:120px; -} - -input#text02 -{ - width:7em; -} - -input[type=submit] { - margin-right: 3em; - margin-left: 3em; -} - -output#duval -{ - display:inline-block; - min-width:2em; - text-align:right; -} - -.frmshow -{ - position:absolute; - right:0; - top:0; -} - -.frmshow fieldset -{ - display:inline-block; - position:relative; -} - -.frmshow legend -{ - display:inline-block; -} - -.frmshow legend span -{ - left:-100px; - position:absolute; - top:.2em; -} - -.frmshow button -{ - border:1px solid; - display:inline; - height:22px; - padding-left:25px; - padding-right:5px; - width:auto; - cursor: pointer; -} - -.frmshow button:disabled -{ - border:1px solid #D90000; - color:#D90000; - cursor: default; -} - -span.symbols,span.vendimg -{ - display:inline-block; -} - -caption -{ - margin-top:.5em; - font-weight:bolder; -} - -table -{ - width:100%; -} - -#diskusage td -{ - text-align:center; -} - -#summary -{ - background-color:none!important; -} - -[id^=list] thead tr th -{ - border-bottom:1px dotted #E1E1E1; -} - -th -{ - text-align:center; -} - -td,th -{ - padding:3px; -} - -tbody tr:nth-child(even) -{ - background:#D6D6D6; -} - -tbody tr:nth-child(odd) -{ - background:#F0F0F0; -} - -th span.symbols,th span.vendimg -{ - vertical-align:middle!important; -} - -th span[id^=vd].vendimg -{ - display:block; - padding-left:27px; - text-align:left!important; - width:auto; -} - -tbody tr td -{ - text-align:right; -} - -tfoot tr td -{ - border-top:1px dotted #E1E1E1; -} - -tfoot ul -{ - list-style-type:none; - margin-left:1em; - padding-left:0; -} - -li.symbols -{ - padding-left:23px; -} - -li.vendimg -{ - padding-left:25px; -} - -tfoot ul li -{ - background-repeat:no-repeat; - display:inline; - margin-bottom:.3em; - padding-right:1em; -} - -li.symbols,li.vendimg -{ - display:inline-block; - width:auto; -} - -td[id^=legend] h5 -{ - font-size:.9em; -} - -div#pbar -{ - background-color:#90EE90; - border:1px solid #a0a0a0; - height:15px; - min-width:100px; - padding-right:2px; - position:relative; - text-align:left; - width:auto; -} - -div[id^=bar] -{ - background-color:red; - border:1px solid #e2e2e2; - border-left:none; - border-right:none; - float:left; - height:13px; -} - -div#bar1 -{ - background-color:orange; -} - -div#bar2 -{ - background-color:blue; -} - -div#bar3 -{ - background-color:#FF0; -} - -span#duused -{ - color: red; - font-weight: bolder; -} - -span#free -{ - color: green; - font-weight: bolder; -} - -span#percent -{ - font-weight:bolder; - position:relative; -} - -span#max -{ - position:absolute; - right:2px; -} - -span#used -{ - color: orange; - font-weight: bolder; -} - -hr -{ - margin-bottom:1em; -} - -#errors -{ - color:#CA2F2F; - font-weight:bolder; -} \ No newline at end of file diff --git a/html/html/themes/maniac/images/Thumbs.db b/html/html/themes/maniac/images/Thumbs.db new file mode 100644 index 0000000..37ec790 Binary files /dev/null and b/html/html/themes/maniac/images/Thumbs.db differ diff --git a/html/html/themes/maniac/images/updxl-icons.gif b/html/html/themes/maniac/images/updxl-icons.gif deleted file mode 100644 index bae5cb6..0000000 Binary files a/html/html/themes/maniac/images/updxl-icons.gif and /dev/null differ diff --git a/html/html/themes/maniac/include/functions.pl b/html/html/themes/maniac/include/functions.pl index e072d3b..eea8091 100644 --- a/html/html/themes/maniac/include/functions.pl +++ b/html/html/themes/maniac/include/functions.pl @@ -147,7 +147,8 @@ sub openpage { <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> <html xmlns='http://www.w3.org/1999/xhtml'> <head> - <title>$title</title> + <title>$title</title> + $extrahead END ; if ($settings{'FX'} ne 'off') { @@ -160,84 +161,87 @@ END print <<END <link rel="shortcut icon" href="/favicon.ico" /> <link rel="stylesheet" type="text/css" href="/themes/maniac/include/style.css" /> - $extrahead <script language="javascript" type="text/javascript"> - function swapVisibility(id) { - el = document.getElementById(id); - if(el.style.display != 'block') { - el.style.display = 'block' - } - else { - el.style.display = 'none' - } + + function swapVisibility(id) { + el = document.getElementById(id); + if(el.style.display != 'block') { + el.style.display = 'block' + } + else { + el.style.display = 'none' + } } - </script> + </script> END ; if ($settings{'SPEED'} ne 'off') { print <<END - <script type="text/javascript" src="/include/jquery-1.9.1.min.js"></script> - <script type="text/javascript"> - var t_current; - var t_last; - var rxb_current; - var rxb_last; - var txb_current; - var txb_last; - function refreshInetInfo() { - $.ajax({ - url: '/cgi-bin/speed.cgi', - success: function(xml){ - t_current = new Date(); - var t_diff = t_current - t_last; - t_last = t_current; - - rxb_current = $("rxb",xml).text(); - var rxb_diff = rxb_current - rxb_last; - rxb_last = rxb_current; - - var rx_kbs = rxb_diff/t_diff; - rx_kbs = Math.round(rx_kbs*10)/10; - - txb_current = $("txb",xml).text(); - var txb_diff = txb_current - txb_last; - txb_last = txb_current; - - var tx_kbs = txb_diff/t_diff; - tx_kbs = Math.round(tx_kbs*10)/10; - - $("#rx_kbs").text(rx_kbs + ' kb/s'); - $("#tx_kbs").text(tx_kbs + ' kb/s'); - } + <script type="text/javascript" src="/include/jquery-1.9.1.min.js"></script> + <script type="text/javascript"> + var t_current; + var t_last; + var rxb_current; + var rxb_last; + var txb_current; + var txb_last; + function refreshInetInfo() { + $.ajax({ + url: '/cgi-bin/speed.cgi', + success: function(xml){ + t_current = new Date(); + var t_diff = t_current - t_last; + t_last = t_current; + + rxb_current = $("rxb",xml).text(); + var rxb_diff = rxb_current - rxb_last; + rxb_last = rxb_current; + + var rx_kbs = rxb_diff/t_diff; + rx_kbs = Math.round(rx_kbs*10)/10; + + txb_current = $("txb",xml).text(); + var txb_diff = txb_current - txb_last; + txb_last = txb_current; + + var tx_kbs = txb_diff/t_diff; + tx_kbs = Math.round(tx_kbs*10)/10; + + $("#rx_kbs").text(rx_kbs + ' kb/s'); + $("#tx_kbs").text(tx_kbs + ' kb/s'); + } + }); + window.setTimeout("refreshInetInfo()", 3000); + } + $(document).ready(function(){ + refreshInetInfo(); }); - window.setTimeout("refreshInetInfo()", 3000); - } - $(document).ready(function(){ - refreshInetInfo(); - }); - </script> -</head> -<body> + </script> + </head> + <body> END ; } else { - print "</head>\n<body>";} +print "</head>\n<body>";} print <<END <!-- IPFIRE HEADER --> - <div id="header"> - <div id="header_inner" class="fixed"> - <div id="logo"> + +<div id="header"> + + <div id="header_inner" class="fixed"> + + <div id="logo"> END ; -if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') { - print "<h1><span>$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}</span></h1><br />"; -} else { - print "<h1><span>-= IPFire =-</span></h1><br />"; -} -print <<END - <h2>+ $h2 +</h2> - </div> + if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') { + print "<h1><span>$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}</span></h1><br />"; + } else { + print "<h1><span>-= IPFire =-</span></h1><br />"; + } + print <<END + <h2>+ $h2 +</h2> + </div>
END ; @@ -277,6 +281,7 @@ sub openpagewithoutmenu { <html xmlns='http://www.w3.org/1999/xhtml'> <head> <title>$title</title> + $extrahead END ; if ($settings{'FX'} ne 'off') { @@ -289,34 +294,38 @@ END print <<END <link rel="shortcut icon" href="/favicon.ico" /> <link rel="stylesheet" type="text/css" href="/include/style.css" /> - $extrahead <script language="javascript" type="text/javascript"> - function swapVisibility(id) { - el = document.getElementById(id); - if(el.style.display != 'block') { - el.style.display = 'block' - } - else { - el.style.display = 'none' - } - } + + function swapVisibility(id) { + el = document.getElementById(id); + if(el.style.display != 'block') { + el.style.display = 'block' + } + else { + el.style.display = 'none' + } + } </script>
-</head> -<body> + </head> + <body> <!-- IPFIRE HEADER --> - <div id="header"> - <div id="header_inner" class="fixed"> - <div id="logo"> - <h1><span>-= IPFire =-</span></h1> - <h2>+ $h2 +</h2> - </div> - </div> + +<div id="header"> + + <div id="header_inner" class="fixed"> + + <div id="logo"> + <h1><span>-= IPFire =-</span></h1> + <h2>+ $h2 +</h2> + </div> </div> - <div id="main"> - <div id="main_inner" class="fixed"> - <div id="primaryContent_2columns"> - <div id="columnA_2columns"> +</div> + +<div id="main"> + <div id="main_inner" class="fixed"> + <div id="primaryContent_2columns"> + <div id="columnA_2columns"> END ; } @@ -331,17 +340,18 @@ sub closepage () { $uptime =~ s/load average/$Lang::tr{'uptime load average'}/; print <<END - </div> </div> - <div id="secondaryContent_2columns"> - <div id="columnC_2columns"> + </div> + + <div id="secondaryContent_2columns"> + + <div id="columnC_2columns"> END ; &showsubsection($menu); &showsubsubsection($menu);
print <<END - </div> </div> <br class="clear" /> <div id="footer" class="fixed"> @@ -350,16 +360,17 @@ END ; if ($settings{'SPEED'} ne 'off') { print <<END - <br /> - <b>$Lang::tr{'bandwidth usage'}:</b> + <br /> + <b>$Lang::tr{'bandwidth usage'}:</b> $Lang::tr{'incoming'}: <span id="rx_kbs"></span> $Lang::tr{'outgoing'}: <span id="tx_kbs"></span> + END ; } print <<END - </div> - </div> - </div> + </div> + </div> +</div> </body> </html> END @@ -382,9 +393,10 @@ sub openbox
print <<END <!-- openbox --> - <div class="post" style="text-align:$align"> + <div class="post" align="$align"> END ; + if ($caption) { print "<h3>$caption</h3>\n"; } else { print " "; } }
diff --git a/html/html/themes/maniac/include/upxlr.css b/html/html/themes/maniac/include/upxlr.css deleted file mode 100644 index a2b2c05..0000000 --- a/html/html/themes/maniac/include/upxlr.css +++ /dev/null @@ -1,390 +0,0 @@ -span[id^=ledgr],li#liledgr,label#lbledgr -{ - background-position:0 0; -} - -span[id^=ledbl],li#liledbl,label#lbledbl -{ - background-position:0 -20px; -} - -span[id^=ledye],li#liledye,label#lbledye -{ - background-position:0 -40px; -} - -span[id^=ledrd],li#liledrd,label#lbledrd -{ - background-position:0 -60px; -} - -span[id^=ledgy],li#liledgy,label#lbledgy -{ - background-position:0 -80px; -} - -span#rel,li#lirel -{ - background-position:0 -100px; -} - -span#glo,li#liglo -{ - background-position:0 -120px; -} - -span#del,li#lidel,label#lbdel,button[id^=del] -{ - background-position:0 -140px; -} - -span#blo,li#liblo -{ - background-position:0 -160px; -} - -#stat -{ - background-position:0 -180px; -} - -#wrench -{ - background-position:0 -200px; -} - -#set -{ - background-position:0 -220px; -} - -#oview -{ - background-position:0 -240px; -} - -.symbols -{ - background:transparent url(/themes/maniac/images/updxl-icons.gif) no-repeat; - height:20px; - width:20px; -} - -.vendimg -{ - background-repeat:no-repeat; - height:18px; - width:18px; -} - -.noborder -{ - border:none; -} - -fieldset -{ - padding: 0 0 .5em; - margin-bottom: .5em; - border: 1px dotted #E1E1E1; - border-top: none; - border-left: none; - border-right: none; -} - -legend -{ - margin-left:0; - padding-left:0; - padding-right:.5em; - font-weight: bolder; -} - -label -{ - cursor:pointer; - padding-right:1em; -} - -label[for^=text],label[for^=select] -{ - padding-right:.2em; -} - -label.symbols -{ - display:inline-block; - min-height:20px; - padding-left:25px; - width:auto; -} - -button[id^=del] -{ - border-style:none; -} - -input:invalid -{ - border:2px solid red; -} - -input#text01 -{ - height:1em; - max-width:120px; -} - -input#text02 -{ - width:7em; -} - -input[type=submit] -{ - border:1px solid #2941BC; - margin-right: 3em; - margin-left: 3em; -} - -output#duval -{ - display:inline-block; - min-width:2em; - text-align:right; -} - -.frmshow -{ - position:absolute; - right:0; - top:0; -} - -.frmshow fieldset -{ - display:inline-block; - position:relative; -} - -.frmshow legend -{ - display:inline-block; -} - -.frmshow legend span -{ - left:-100px; - position:absolute; - top:.2em; -} - -.frmshow button -{ - background-color:#CA2F2F; - border:1px solid #2941BC; - color:#000; - display:inline; - height:22px; - padding-left:25px; - padding-right:5px; - width:auto; - cursor: pointer; -} - -.frmshow button:disabled -{ - border:1px solid #fff; - color:#F1F1F1; - cursor: default; -} - -span.symbols,span.vendimg -{ - display:inline-block; -} - -caption -{ - margin-top:.5em; - font-weight:bolder; -} - -table -{ - width:100%; -} - -#diskusage td -{ - text-align:center; -} - -#summary -{ - background-color:none!important; -} - -[id^=list] thead tr th -{ - border-bottom:1px dotted #fff; -} - -th -{ - text-align:center; -} - -td,th -{ - padding:3px; -} - -tbody tr:nth-child(even) -{ - background:#1C1C1C; -} - -tbody tr:nth-child(odd) -{ - background:#4F4F4F; -} - -th span.symbols,th span.vendimg -{ - vertical-align:middle!important; -} - -th span[id^=vd].vendimg -{ - display:block; - padding-left:27px; - text-align:left!important; - width:auto; -} - -tbody tr td -{ - text-align:right; -} - -tfoot tr td -{ - border-top:1px dotted #E1E1E1; -} - -tfoot ul -{ - list-style-type:none; - margin-left:1em; - padding-left:0; -} - -li.symbols -{ - padding-left:23px; -} - -li.vendimg -{ - padding-left:25px; -} - -tfoot ul li -{ - background-repeat:no-repeat; - display:inline; - margin-bottom:.3em; - padding-right:1em; -} - -li.symbols,li.vendimg -{ - display:inline-block; - width:auto; -} - -td[id^=legend] h5 -{ - font-size:.9em; -} - -div#pbar -{ - background-color:#90EE90; - border:1px solid #a0a0a0; - color:#000; - font-weight:bolder; - height:15px; - min-width:100px; - padding-right:2px; - position:relative; - text-align:left; - width:auto; -} - -div[id^=bar] -{ - background-color:red; - border:1px solid #e2e2e2; - border-left:none; - border-right:none; - float:left; - height:13px; -} - -div#bar1 -{ - background-color:orange; -} - -div#bar2 -{ - background-color:blue; -} - -div#bar3 -{ - background-color:#FF0; -} - -span#duused -{ - color: red; - font-weight: bolder; -} - -span#free -{ - color: green; - font-weight: bolder; -} - -span#percent -{ - font-weight:bolder; - position:relative; -} - -span#max -{ - position:absolute; - right:2px; -} - -span#used -{ - color: orange; - font-weight: bolder; -} - -hr -{ - margin-bottom:1em; -} - -#errors -{ - color:#CA2F2F; - font-weight:bolder; -} \ No newline at end of file diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index e513fb5..6275d8a 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -1851,7 +1851,7 @@ 'updxlrtr all files' => 'alle Dateien ...', 'updxlrtr cache dir' => 'Cache-Verzeichnis', 'updxlrtr cache maintenance' => 'Cache-Wartung', -'updxlrtr cache size' => 'Cachegröße', +'updxlrtr cache size' => 'Cachegröße (Bytes)', 'updxlrtr cache statistics' => 'Cache-Statistik', 'updxlrtr cancel download' => 'Download abbrechen', 'updxlrtr children' => 'Anzahl der Accelerator-Prozesse', @@ -1862,11 +1862,11 @@ 'updxlrtr condition outdated' => 'Veraltet', 'updxlrtr condition suspended' => 'Ausgesetzt', 'updxlrtr condition unknown' => 'Unbekannt', +'updxlrtr configuration' => 'Update-Accelerator-Konfiguration', 'updxlrtr current downloads' => 'Dateien beim Download in den lokalen Cache', 'updxlrtr current files' => 'Aktuelle Dateien im lokalen Cache', -'updxlrtr current view' => 'Aktuelle Ansicht', 'updxlrtr daily' => 'täglich', -'updxlrtr data from cache' => 'Daten vom Cache', +'updxlrtr data from cache' => 'Daten vom Cache (Bytes)', 'updxlrtr disk usage' => 'Festplattennutzung', 'updxlrtr efficiency index' => 'Cache-Effizienz-Index', 'updxlrtr empty repository' => 'Der lokale Cache ist leer', @@ -1888,20 +1888,16 @@ 'updxlrtr max download rate' => 'Max. externe Downloadrate (kBit/s)', 'updxlrtr month' => 'einem Monat', 'updxlrtr monthly' => 'monatlich', -'updxlrtr no pending downloads attime' => 'Keine Downloads zur Zeit', 'updxlrtr not accessed' => 'nicht zugegriffen seit', 'updxlrtr not enabled' => 'Der Update-Accelerator ist auf der Web-Proxy-Seite nicht aktiviert', -'updxlrtr notice dlrate' => 'Wert zwischen 0 und 1000000 in 16er Abständen.', 'updxlrtr other' => 'Sonstige', -'updxlrtr overview' => 'Übersicht', 'updxlrtr passive mode' => 'Aktiviere Passiv-Modus', 'updxlrtr pending downloads' => 'Anstehende Downloads', 'updxlrtr performance options' => 'Leistungsoptionen', 'updxlrtr progress' => 'Fortschritt', -'updxlrtr purge' => 'Entfernen', +'updxlrtr purge' => 'Entferne', 'updxlrtr remove file' => 'Entferne vom Cache', 'updxlrtr save and restart' => 'Speichern und neu starten', -'updxlrtr settings' => 'Einstellungen', 'updxlrtr source' => 'Quelle', 'updxlrtr source checkup' => 'Quellenprüfung', 'updxlrtr source checkup schedule' => 'Zeitplanung der Quellenprüfung', @@ -1910,14 +1906,13 @@ 'updxlrtr statistics' => 'Statistik', 'updxlrtr statistics by source' => 'Statistik pro Quelle', 'updxlrtr summary' => 'Zusammenfassung', -'updxlrtr to delete' => 'zum Löschen', -'updxlrtr total cache size' => 'Gesamtgröße des Cache', -'updxlrtr total data from cache' => 'Daten insgesamt vom Cache ausgeliefert', +'updxlrtr total cache size' => 'Gesamtgröße des Cache (Bytes)', +'updxlrtr total data from cache' => 'Daten insgesamt vom Cache ausgeliefert (Bytes)', 'updxlrtr total files' => 'Gesamtanzahl Dateien im Cache', -'updxlrtr total used' => 'Insgesamt belegt', 'updxlrtr unknown' => 'Unbekannt', 'updxlrtr update accelerator' => 'Update-Accelerator', -'updxlrtr used by' => 'Belegt von', +'updxlrtr update information' => 'Eine aktualisierte Version steht zum Download bereit. Besuchen Sie <a href="http://update-accelerator.advproxy.net" target="_blank">http://update-accelerator.advproxy.net</a> für weitere Informationen.', +'updxlrtr update notification' => 'Update-Benachrichtigung!', 'updxlrtr web proxy service required' => 'Der Web-Proxy muss aktiviert sein, um den Update-Accelerator zu verwenden', 'updxlrtr week' => 'einer Woche', 'updxlrtr weekly' => 'wöchentlich', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index e915696..75138f5 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -1883,9 +1883,7 @@ 'updxlrtr all files' => 'all files ...', 'updxlrtr cache dir' => 'Cache directory', 'updxlrtr cache maintenance' => 'Cache maintenance', -'updxlrtr cache overview' => 'Cache overview', -'updxlrtr cache settings' => 'Cache settings', -'updxlrtr cache size' => 'Cache size', +'updxlrtr cache size' => 'Cache size (bytes)', 'updxlrtr cache statistics' => 'Cache statistics', 'updxlrtr cancel download' => 'Cancel download', 'updxlrtr children' => 'Number of accelerator processes', @@ -1899,9 +1897,8 @@ 'updxlrtr configuration' => 'Update accelerator configuration', 'updxlrtr current downloads' => 'Files being downloaded into the local cache', 'updxlrtr current files' => 'Current files in local cache', -'updxlrtr current view' => 'Current view', 'updxlrtr daily' => 'daily', -'updxlrtr data from cache' => 'Data from cache', +'updxlrtr data from cache' => 'Data from cache (bytes)', 'updxlrtr disk usage' => 'Disk usage', 'updxlrtr efficiency index' => 'Cache efficiency index', 'updxlrtr empty repository' => 'Local cache is empty', @@ -1923,12 +1920,9 @@ 'updxlrtr max download rate' => 'Max. external download rate (kBit/s)', 'updxlrtr month' => 'one month', 'updxlrtr monthly' => 'monthly', -'updxlrtr no pending downloads attime' => 'No pending downloads at moment', 'updxlrtr not accessed' => 'not accessed since', 'updxlrtr not enabled' => 'Update Accelerator is not enabled on the web proxy page', -'updxlrtr notice dlrate' => 'Value must between 0 and 1000000 in steps of 16.', 'updxlrtr other' => 'Other', -'updxlrtr overview' => 'Overview', 'updxlrtr passive mode' => 'Enable passive mode', 'updxlrtr pending downloads' => 'Pending downloads', 'updxlrtr performance options' => 'Performance options', @@ -1936,7 +1930,6 @@ 'updxlrtr purge' => 'Purge', 'updxlrtr remove file' => 'Remove from cache', 'updxlrtr save and restart' => 'Save and Restart', -'updxlrtr settings' => 'Settings', 'updxlrtr source' => 'Source', 'updxlrtr source checkup' => 'Source checkup', 'updxlrtr source checkup schedule' => 'Source checkup schedule', @@ -1945,13 +1938,13 @@ 'updxlrtr statistics' => 'Statistics', 'updxlrtr statistics by source' => 'Statistics by source', 'updxlrtr summary' => 'Summary', -'updxlrtr to delete' => 'To delete', -'updxlrtr total cache size' => 'Total cache size', -'updxlrtr total data from cache' => 'Total data delivered from cache', +'updxlrtr total cache size' => 'Total cache size (bytes)', +'updxlrtr total data from cache' => 'Total data delivered from cache (bytes)', 'updxlrtr total files' => 'Total files in cache', -'updxlrtr total used' => 'Total used', 'updxlrtr unknown' => 'Unknown', 'updxlrtr update accelerator' => 'Update Accelerator', +'updxlrtr update information' => 'There is an updated version available for download. Visit <a href="http://update-accelerator.advproxy.net" target="_blank">http://update-accelerator.advproxy.net</a> for more information.', +'updxlrtr update notification' => 'Update notification!', 'updxlrtr used by' => 'Used by', 'updxlrtr web proxy service required' => 'Web proxy service must be enabled to use Update Accelerator', 'updxlrtr week' => 'one week',
hooks/post-receive -- IPFire 2.x development tree