From 895a15f2057622103daaaee78cf11813131158cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=B6rn-Ingo=20Weiegert?= <jiweigert@gmail.com>
Date: Mon, 24 Dec 2012 07:20:34 +0100
Subject: [PATCH 2/5] langs: modify de.pl / en.pl

---
 html/cgi-bin/updatexlrator.cgi | 1675 ++++++++++++++++------------------------
 langs/de/cgi-bin/de.pl         |   11 +-
 langs/en/cgi-bin/en.pl         |   10 +-
 3 files changed, 667 insertions(+), 1029 deletions(-)

diff --git a/html/cgi-bin/updatexlrator.cgi b/html/cgi-bin/updatexlrator.cgi
index e3e633c..d83d118 100644
--- a/html/cgi-bin/updatexlrator.cgi
+++ b/html/cgi-bin/updatexlrator.cgi
@@ -27,12 +27,17 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.       #
 #                                                                             #
 ###############################################################################
+#
+# Changelog:
+# 2012-10-27: nightshift - Bugfix regarding showing wrong vendor icon while Download of new Updates
+# 2012-10-27: nightshift - Optimizing logic of check for vendor icons
+#
 
 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;
 
@@ -51,6 +56,8 @@ my %dlinfo=();
 my $id=0;
 my @dfdata=();
 my $dfstr='';
+my $dudata='';
+my $dustr='';
 my @updatelist=();
 my @sources=();
 my $sourceurl='';
@@ -58,6 +65,7 @@ my $vendorid='';
 my $uuid='';
 my $status=0;
 my $updatefile='';
+my $cachefile='';
 my $shortname='';
 my $time='';
 my $filesize=0;
@@ -73,8 +81,12 @@ 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 $hintcolour = '#FFFFCC';
 my $colourgray = '#808080';
 
@@ -84,7 +96,6 @@ my $sfOutdated='2';
 my $sfNoSource='3';
 
 my $not_accessed_last='';
-
 my $errormessage='';
 
 my @repositorylist=();
@@ -111,46 +122,52 @@ $xlratorsettings{'NOT_ACCESSED_LAST'} = 'month1';
 $xlratorsettings{'REMOVE_NOSOURCE'} = 'off';
 $xlratorsettings{'REMOVE_OUTDATED'} = 'off';
 $xlratorsettings{'REMOVE_OBSOLETE'} = 'off';
+$xlratorsettings{'REMOVE_TODELETE'} = 'off';
+$xlratorsettings{'TODELETE'} = 'off';
 
 &Header::getcgihash(\%xlratorsettings);
 
+###2012-11-25: nightshift
+# Initialise vendor image hash
+
+&initvendimg();
+
+####
+
 $xlratorsettings{'EXTENDED_GUI'} = '';
 
 if ($xlratorsettings{'ACTION'} eq "$Lang::tr{'updxlrtr statistics'} >>")
-{
-	$xlratorsettings{'EXTENDED_GUI'} = 'statistics';
-}
+	{ $xlratorsettings{'EXTENDED_GUI'} = 'statistics'; }
 
 if ($xlratorsettings{'ACTION'} eq "$Lang::tr{'updxlrtr maintenance'} >>")
-{
-	$xlratorsettings{'EXTENDED_GUI'} = 'maintenance';
-}
+	{ $xlratorsettings{'EXTENDED_GUI'} = 'maintenance'; }
 
-if ($xlratorsettings{'ACTION'} eq $Lang::tr{'updxlrtr purge'})
+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'))
+	if (  ($xlratorsettings{'REMOVE_OBSOLETE'} eq 'on')
+	   || ($xlratorsettings{'REMOVE_NOSOURCE'} eq 'on')
+	   || ($xlratorsettings{'REMOVE_OUTDATED'} eq 'on')
+	   || ($xlratorsettings{'REMOVE_TODELETE'} eq 'on')
+	   )
 	{
 		undef (@sources);
 		undef @repositoryfiles;
 		foreach (<$repository/*>)
 		{
-			if (-d $_)
-			{
-				unless (/^$repository\/download$/) { push(@sources,$_); }
-			}
+			if (-d $_)	{
+					unless (/^$repository\/download$/) { push(@sources,$_); }
+					}
 		}
 
 		foreach (@sources)
 		{
 			@updatelist=<$_/*>;
 			$vendorid = substr($_,rindex($_,"/")+1);
-			foreach(@updatelist)
-			{
+			foreach(@updatelist) {
 				$uuid = substr($_,rindex($_,"/")+1);
-				if (-e "$_/source.url")
-				{
+				if (-e "$_/source.url") {
 					open (FILE,"$_/source.url");
 					$sourceurl=<FILE>;
 					close FILE;
@@ -166,8 +183,7 @@ if ($xlratorsettings{'ACTION'} eq $Lang::tr{'updxlrtr purge'})
 		{
 			($vendorid,$uuid,$updatefile) = split('/');
 
-			if (-e "$repository/$vendorid/$uuid/status")
-			{
+			if (-e "$repository/$vendorid/$uuid/status") {
 				open (FILE,"$repository/$vendorid/$uuid/status");
 				@metadata = <FILE>;
 				close FILE;
@@ -175,8 +191,7 @@ if ($xlratorsettings{'ACTION'} eq $Lang::tr{'updxlrtr purge'})
 				$status = $metadata[-1];
 			}
 
-			if (-e "$repository/$vendorid/$uuid/access.log")
-			{
+			if (-e "$repository/$vendorid/$uuid/access.log") {
 				open (FILE,"$repository/$vendorid/$uuid/access.log");
 				@metadata = <FILE>;
 				close FILE;
@@ -185,49 +200,46 @@ if ($xlratorsettings{'ACTION'} eq $Lang::tr{'updxlrtr purge'})
 			}
 
 			if (($xlratorsettings{'REMOVE_NOSOURCE'} eq 'on') && ($status == $sfNoSource))
-			{
-				if (-e "$repository/$vendorid/$uuid/$updatefile") { system("rm -r $repository/$vendorid/$uuid"); }
-			}
+				{ 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 (-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 (-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"); } }
+			}
+
+			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"); }
+					}
 				}
 			}
 		}
 	}
 }
 
-if ($xlratorsettings{'ACTION'} eq $Lang::tr{'save'})
-{
-	if (!($xlratorsettings{'MAX_DISK_USAGE'} =~ /^\d+$/) || ($xlratorsettings{'MAX_DISK_USAGE'} < 1) || ($xlratorsettings{'MAX_DISK_USAGE'} > 100))
-	{
+if ($xlratorsettings{'ACTION'} eq $Lang::tr{'save'}) {
+	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)))
-	{
+	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;
 	}
@@ -235,85 +247,58 @@ if ($xlratorsettings{'ACTION'} eq $Lang::tr{'save'})
 	&savesettings;
 }
 
-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))
-	{
+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)))
-	{
+	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")))
-	{
+	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'))
-	{
+	if (!($proxysettings{'ENABLE_UPDXLRATOR'} eq 'on')) {
 		$errormessage = $Lang::tr{'updxlrtr not enabled'};
 		goto ERROR;
 	}
 
 	&savesettings;
-
-	system('/usr/local/bin/squidctrl restart >/dev/null 2>&1');
+	system('/usr/local/bin/squidctrl restart > /dev/null 2>&1');
 }
 
-if ($xlratorsettings{'ACTION'} eq $Lang::tr{'updxlrtr remove file'})
-{
-	$xlratorsettings{'EXTENDED_GUI'} = 'maintenance';
-
-	$updatefile = $xlratorsettings{'ID'};
-
-	unless ($updatefile =~ /^download\//)
-	{
-		($vendorid,$uuid,$updatefile) = split('/',$updatefile);
-		if (-e "$repository/$vendorid/$uuid/$updatefile") { system("rm -r $repository/$vendorid/$uuid"); }
-	}
-}
 
-if (($xlratorsettings{'ACTION'} eq $Lang::tr{'updxlrtr cancel download'}) || ($xlratorsettings{'ACTION'} eq $Lang::tr{'updxlrtr remove file'}))
-{
+if ($xlratorsettings{'ACTION'} eq $Lang::tr{'updxlrtr cancel download'}) {
 	$updatefile = $xlratorsettings{'ID'};
-
-	if ($updatefile =~ /^download\//)
-	{
+	if ($updatefile =~ /^download\//) 	{
 		($uuid,$vendorid,$updatefile) = split('/',$updatefile);
-
-		if (-e "$repository/download/$vendorid/$updatefile.info")
-		{
+		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")
-		{
+		if (-e "$repository/download/$vendorid/$updatefile") {
 			system("rm $repository/download/$vendorid/$updatefile");
 		}
 	}
-
 }
 
-$not_accessed_last =  $xlratorsettings{'NOT_ACCESSED_LAST'};
+$not_accessed_last = $xlratorsettings{'NOT_ACCESSED_LAST'};
 undef($xlratorsettings{'NOT_ACCESSED_LAST'});
 
-if (-e "${General::swroot}/updatexlrator/settings")
-{
+if (-e "${General::swroot}/updatexlrator/settings") {
 	&General::readhash("${General::swroot}/updatexlrator/settings", \%xlratorsettings);
 }
 
-if ($xlratorsettings{'NOT_ACCESSED_LAST'} eq '')
-{
+if ($xlratorsettings{'NOT_ACCESSED_LAST'} eq '') {
 	$xlratorsettings{'NOT_ACCESSED_LAST'} = $not_accessed_last;
 }
 
@@ -343,13 +328,16 @@ $checked{'REMOVE_OUTDATED'}{$xlratorsettings{'REMOVE_OUTDATED'}} = "checked='che
 $checked{'REMOVE_OBSOLETE'}{'off'} = '';
 $checked{'REMOVE_OBSOLETE'}{'on'} = '';
 $checked{'REMOVE_OBSOLETE'}{$xlratorsettings{'REMOVE_OBSOLETE'}} = "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'";
 $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'} = '';
@@ -362,102 +350,69 @@ $selected{'NOT_ACCESSED_LAST'}{$xlratorsettings{'NOT_ACCESSED_LAST'}} = "selecte
 # ----------------------------------------------------
 
 &Header::showhttpheaders();
-
-&Header::openpage($Lang::tr{'updxlrtr configuration'}, 1, '');
-
+&Header::openpage($Lang::tr{'updxlrtr configuration'}, 1, '<link rel=\'stylesheet\' type=\'text/css\' href=\'/themes/'.$mainsettings{'THEME'}.'/include/upxlr.css\' />' );
 &Header::openbigbox('100%', 'left', '', $errormessage);
 
 if ($errormessage) {
 	&Header::openbox('100%', 'left', $Lang::tr{'error messages'});
-	print "<font class='base'>$errormessage&nbsp;</font>\n";
+	print "$errormessage&nbsp;\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'}");
+&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'}:&nbsp;<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>&nbsp;</td>
-	<td>&nbsp;</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>&nbsp;</td>
 END
 ;
 
-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>
+<form method='post' action='$ENV{'SCRIPT_NAME'}' enctype='multipart/form-data'>
+<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'} (%):</label>
+<input id='text01' type='text' name='MAX_DISK_USAGE' value='$xlratorsettings{'MAX_DISK_USAGE'}' size='1' />
+</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' class='icoblob'>$Lang::tr{'updxlrtr max download rate'}:</label>
+<input id='text02' type='text' name='MAX_DOWNLOAD_RATE' title='*' 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'}' />
+END
+;
+print"<input type='submit' name='ACTION' value='$Lang::tr{'updxlrtr statistics'}";
+if ($xlratorsettings{'EXTENDED_GUI'} eq 'statistics') { print " &lt;&lt;' />"; } else { print " &gt;&gt;' />\n"; }
+print"<input type='submit' name='ACTION' value='$Lang::tr{'updxlrtr maintenance'}";
+if ($xlratorsettings{'EXTENDED_GUI'} eq 'maintenance') { print " &lt;&lt;' />"; } else { print " &gt;&gt;' />\n"; }
+print <<END
+</fieldset>
+</form>
 END
 ;
-
 &Header::closebox();
 
-print "</form>\n";
-
 # ----------------------------------------------------
 #   List pending downloads - if any
 # ----------------------------------------------------
@@ -473,8 +428,7 @@ if (($xlratorsettings{'EXTENDED_GUI'} ne 'statistics') && ($xlratorsettings{'EXT
 		{
 			my @filelist = <$_/*>;
 			$vendorid = substr($_,rindex($_,"/")+1);
-			foreach(@filelist)
-			{
+			foreach(@filelist) {
 				next if(/\.info$/);
 				$updatefile = substr($_,rindex($_,"/")+1);
 				$updatefile .= ":download/$vendorid/$updatefile";
@@ -487,648 +441,402 @@ if (($xlratorsettings{'EXTENDED_GUI'} ne 'statistics') && ($xlratorsettings{'EXT
 	if (@downloadfiles)
 	{
 		&Header::openbox('100%', 'left', "$Lang::tr{'updxlrtr pending downloads'}");
-
 		print <<END
-<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>
+<table width='100%' id='listuploads'>
+<caption>$Lang::tr{'updxlrtr current downloads'}</caption>
+<thead>
 <tr>
-	<td class='base' align='center'>&nbsp;</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'>&nbsp;</td>
+	<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>&nbsp;</th>
 </tr>
+</thead>
+<tfoot>
+<tr>
+	<td colspan='7' id='legenddownload'>
 END
 ;
-		$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'>&nbsp;";
-		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'}' />&nbsp;</td>\n";
-		} else {
-			print "<img src='/images/updbooster/updxl-led-gray.gif' alt='$Lang::tr{'updxlrtr condition suspended'}' />&nbsp;</td>\n";
+	&printlegenddownload();
+print <<END
+	</td>
+</tr>
+</tfoot>
+<tbody>
+END
+;
+	$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");
 		}
-
-			print "\t\t<td align='center' nowrap='nowrap'>&nbsp;";
-			if ($vendorid =~ /^Adobe$/i)
-			{
-				print "<img src='/images/updbooster/updxl-src-adobe.gif' alt='Adobe'}' />&nbsp;</td>\n";
-			} elsif ($vendorid =~ /^Microsoft$/i)
-			{
-				print "<img src='/images/updbooster/updxl-src-windows.gif' alt='Microsoft'}' />&nbsp;</td>\n";
-			} elsif ($vendorid =~ /^Symantec$/i)
-			{
-				print "<img src='/images/updbooster/updxl-src-symantec.gif' alt='Symantec'}' />&nbsp;</td>\n";
-			} elsif ($vendorid =~ /^Linux$/i)
-			{
-				print "<img src='/images/updbooster/updxl-src-linux.gif' alt='Linux'}' />&nbsp;</td>\n";
-			} elsif ($vendorid =~ /^TrendMicro$/i)
-			{
-				print "<img src='/images/updbooster/updxl-src-trendmicro.gif' alt='Trend Micro'}' />&nbsp;</td>\n";
-			} elsif ($vendorid =~ /^Apple$/i)
-			{
-				print "<img src='/images/updbooster/updxl-src-apple.gif' alt='Apple'}' />&nbsp;</td>\n";
-			} elsif ($vendorid =~ /^Avast$/i)
-			{
-				print "<img src='/images/updbooster/updxl-src-avast.gif' alt='Avast'}' />&nbsp;</td>\n";
-			} else
-			{
-				if (-e "/home/httpd/html/images/updbooster/updxl-src-" . $vendorid . ".gif")
-				{
-					print "<img src='/images/updbooster/updxl-src-" . $vendorid . ".gif' alt='" . ucfirst $vendorid . "' />&nbsp;</td>\n";
-				} else {
-					print "<img src='/images/updbooster/updxl-src-unknown.gif' alt='" . ucfirst $vendorid . "' />&nbsp;</td>\n";
-				}
-			}
-
-			$shortname = substr($updatefile,rindex($updatefile,"/")+1);
-			$shortname =~ s/(.*)_[\da-f]*(\.(exe|cab|psf)$)/$1_*$2/i;
-
-			$filesize = $dlinfo{'REMOTESIZE'};
-			1 while $filesize =~ s/^(-?\d+)(\d{3})/$1.$2/;
-			$dlinfo{'VENDORID'}=ucfirst $vendorid;
-
-			print <<END
-		<td class='base' align='center'>&nbsp;$dlinfo{'VENDORID'}&nbsp;</td>
-		<td class='base' align='left' title='cache:/$updatefile'>$shortname</td>
-		<td class='base' align='right'  nowrap='nowrap'>&nbsp;$filesize&nbsp;</td>
-		<td class='base' align='center' nowrap='nowrap'>&nbsp;$filedate&nbsp;</td>
-		<td class='base' align='center' nowrap='nowrap'>
+		if (-e "$repository/$updatefile.info") {
+			&General::readhash("$repository/$updatefile.info", \%dlinfo);
+		}
+		else { undef(%dlinfo); }
+		print "<tr>\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 = $DAYdt.".".$MONTHdt.".".$YEARdt;
+		($uuid,$vendorid,$shortname) = split('/',$updatefile);
+		if (&getPID("\\s/usr/bin/wget\\s.*\\s".quotemeta($dlinfo{'SRCURL'})."\$"))
+			 { print "\t<td class='ledblue' title='$Lang::tr{'updxlrtr condition download'}'></td>\n"; }
+		else { print "\t<td class='ledgrey' title='$Lang::tr{'updxlrtr condition suspended'}'></td>\n"; }
+		if ($vendimg{$vendorid})
+			 { print "\t<td class='left vendimg' style='background: url(".$vendimg{$vendorid}.") 4px no-repeat;' title='".ucfirst $vendorid."'>".ucfirst $dlinfo{'VENDORID'}."</td>\n"; }
+		else { print "\t<td img class='left vendimg' style='background: url(".$vendimg{'unknown'}.") 4px no-repeat;' title='".ucfirst $vendorid."'>".ucfirst $dlinfo{'VENDORID'}."</td>\n"; }
+		$shortname = substr($updatefile,rindex($updatefile,"/")+1);
+		$shortname =~ s/(.*)_[\da-f]*(\.(exe|cab|psf)$)/$1_*$2/i;
+		$filesize = $dlinfo{'REMOTESIZE'};
+		1 while $filesize =~ s/^(-?\d+)(\d{3})/$1.$2/;
+		$dlinfo{'VENDORID'} = ucfirst $vendorid;
+		print <<END
+	<td title='cache:/$updatefile'>$shortname</td>
+	<td>$filesize</td>
+	<td>$filedate</td>
+	<td>
 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'}' />
+		my $percent = '0%';
+		if ($dlinfo{'REMOTESIZE'} && $size_updatefile)
+			{ $percent = int(100 / ($dlinfo{'REMOTESIZE'} / $size_updatefile)).'%'; }
+		print &percentbar($percent)."</td>";
+print <<END
+	<td align='center'><form method='post' id='frma$id' action='$ENV{'SCRIPT_NAME'}'>
+		<button type='submit' class='btndelete' name='$Lang::tr{'updxlrtr cancel download'}'  title='$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>
+	</form></td>
+</tr>
 END
 ;
-		}
-
-		print "</table>\n<br>\n<table>\n";
-		&printlegenddownload();
-		print "</table>\n";
-
-		&Header::closebox();
+	$id += 1;
+	}
+	print <<END
+	</tbody>
+	</table>
+END
+;
+	&Header::closebox();
 	}
 }
 # =====================================================================================
 #  CACHE STATISTICS
 # =====================================================================================
 
-if ($xlratorsettings{'EXTENDED_GUI'} eq 'statistics')
-{
+if ($xlratorsettings{'EXTENDED_GUI'} eq 'statistics') {
 
 # ----------------------------------------------------
 #    Get statistics
 # ----------------------------------------------------
 
-@sources=();
-foreach (<$repository/*>)
-{
-	if (-d $_)
+	@sources=();
+	foreach (<$repository/*>)
 	{
-		unless ((/^$repository\/download$/) || (/^$repository\/lost\+found$/)) { push(@sources,$_); }
+		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)
+	@vendors=();
+	foreach (@sources)
 	{
-		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";
+		$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;
 			}
-		#
-		# 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/;
+	1 while $filesize =~ s/^(-?\d+)(\d{3})/$1.$2/;
+	1 while $cachedtraffic =~ s/^(-?\d+)(\d{3})/$1.$2/;
 
 # ----------------------------------------------------
 #    Show statistics
 # ----------------------------------------------------
 
-&Header::openbox('100%', 'left', "$Lang::tr{'updxlrtr cache statistics'}");
+	&Header::openbox('100%', 'left', "$Lang::tr{'updxlrtr cache statistics'}");
+	unless ($numfiles) { print "$Lang::tr{'updxlrtr empty repository'}\n<hr />\n"; }
+	&printdiskusage($Lang::tr{'updxlrtr disk usage'},'statdiskusage');
 
-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>
-<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
-;
-
-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
-;
-&percentbar($percent);
-print <<END
-</td>
-<td align='right'>$percent</td>
-</tr>
-</table>
-END
-;
-
-if ($numfiles)
-{
-	print <<END
-<hr size='1'>
-<table width='100%'>
-<tr>
-        <td colspan='5'><b>$Lang::tr{'updxlrtr summary'}</b></td>
-</tr>
+	if ($numfiles) {
+		print <<END
+<hr />
+<br />
+<table width='100%' id='summary'>
+<caption>$Lang::tr{'updxlrtr summary'}</caption>
+<tbody>
 <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>
+	<td>$Lang::tr{'updxlrtr total files'}:</td>
+	<td><span style='color:$colourgray'>$numfiles</span></td>
+	<td>$Lang::tr{'updxlrtr total cache size'}:</td>
+	<td align='right'><span style='color:$colourgray'>$filesize</span></td>
+	<td></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>
+	<td>$Lang::tr{'updxlrtr efficiency index'}:</td>
+	<td><span style='color:$colourgray'>$efficiency</span></td>
+	<td>$Lang::tr{'updxlrtr total data from cache'}:</td>
+	<td align='right'><span style='color:$colourgray'>$cachedtraffic</span></td>
+	<td></td>
 </tr>
+</tbody>
 </table>
-<hr size='1'>
-<table>
+<hr />
+<table width='100%' id='liststatbysrc'>
+<caption>$Lang::tr{'updxlrtr statistics by source'}</caption>
+<colgroup>
+	<col span='2' style='width: 20px'></col>
+	<col></col>
+	<col></col>
+	<col span='4' style='width: 40px'></col>
+</colgroup>
+
+<thead>
 <tr>
-        <td colspan='17'><b>$Lang::tr{'updxlrtr statistics by source'}</b></td>
+	<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 class='ledgreen' title='$Lang::tr{'updxlrtr condition ok'}'></th>
+	<th class='ledyellow' title='$Lang::tr{'updxlrtr condition nosource'}'></th>
+	<th class='ledred' title='$Lang::tr{'updxlrtr condition outdated'}'></th>
+	<th class='ledgrey' title='$Lang::tr{'updxlrtr condition unknown'}'></th>
 </tr>
+</thead>
+<tfoot>
 <tr>
-	<td class='base' colspan='2'><i>$Lang::tr{'updxlrtr source'}</i></td>
-	<td class='base' width='7%'>&nbsp;</td>
-	<td class='base' align='right'><i>$Lang::tr{'updxlrtr files'}</i></td>
-	<td class='base' width='7%'>&nbsp;</td>
-	<td class='base' align='right'><nobr><i>$Lang::tr{'updxlrtr cache size'}</i></nobr></td>
-	<td class='base' width='7%'>&nbsp;</td>
-	<td class='base' align='right'><nobr><i>$Lang::tr{'updxlrtr data from cache'}</i></nobr></td>
-	<td class='base' width='15%'>&nbsp;</td>
-	<td class='base'><img src="/images/updbooster/updxl-led-green.gif" /></td>
-	<td class='base' width='15%'>&nbsp;</td>
-	<td class='base'><img src="/images/updbooster/updxl-led-yellow.gif" /></td>
-	<td class='base' width='15%'>&nbsp;</td>
-	<td class='base'><img src="/images/updbooster/updxl-led-red.gif" /></td>
-	<td class='base' width='15%'>&nbsp;</td>
-	<td class='base'><img src="/images/updbooster/updxl-led-gray.gif" /></td>
-	<td class='base' width='90%'>&nbsp;</td>
+	<td colspan='8' id='legendstatsstatus'>
+END
+;
+	&printlegendstatus();
+	print <<END
+</td>
 </tr>
+</tfoot>
+<tbody>
 END
 ;
 
-$id = 0;
-
-foreach (@vendors)
-{
-	$vendorid = $_;
-
-	unless ($vendorstats{$vendorid . "_files"}) { next; }
-
-	$id++;
-	if ($id % 2) {
-		print "<tr bgcolor=''$color{'color20'}'>\n"; }
-	else {
-		print "<tr bgcolor=''$color{'color22'}'>\n"; }
-
-	print "<td class='base' align='center'><nobr>&nbsp;";
-
-	if ($vendorid =~ /^Adobe$/i)
-	{
-		print "<img src='/images/updbooster/updxl-src-adobe.gif' alt='Adobe'}' />&nbsp;</nobr></td>\n";
-		print "<td class='base'>&nbsp;Adobe&nbsp;</td>\n";
-	} elsif ($vendorid =~ /^Microsoft$/i)
-	{
-		print "<img src='/images/updbooster/updxl-src-windows.gif' alt='Microsoft'}' />&nbsp;</nobr></td>\n";
-		print "<td class='base'>&nbsp;Microsoft&nbsp;</td>\n";
-	} elsif ($vendorid =~ /^Symantec$/i)
-	{
-		print "<img src='/images/updbooster/updxl-src-symantec.gif' alt='Symantec'}' />&nbsp;</nobr></td>\n";
-		print "<td class='base'>&nbsp;Symantec&nbsp;</td>\n";
-	} elsif ($vendorid =~ /^Linux$/i)
-	{
-		print "<img src='/images/updbooster/updxl-src-linux.gif' alt='Linux'}' />&nbsp;</nobr></td>\n";
-		print "<td class='base'>&nbsp;Linux&nbsp;</td>\n";
-	} elsif ($vendorid =~ /^TrendMicro$/i)
-	{
-		print "<img src='/images/updbooster/updxl-src-trendmicro.gif' alt='Trend Micro'}' />&nbsp;</nobr></td>\n";
-		print "<td class='base'>&nbsp;Trend&nbsp;Micro&nbsp;</td>\n";
-	} elsif ($vendorid =~ /^Apple$/i)
-	{
-		print "<img src='/images/updbooster/updxl-src-apple.gif' alt='Apple'}' />&nbsp;</nobr></td>\n";
-		print "<td class='base'>&nbsp;Apple&nbsp;</td>\n";
-	} elsif ($vendorid =~ /^Avast$/i)
-	{
-	 	print "<img src='/images/updbooster/updxl-src-avast.gif' alt='Avast'}' />&nbsp;</nobr></td>\n";
-		print "<td class='base'>&nbsp;Avast&nbsp;</td>\n";
-  } elsif ($vendorid =~ /^Avira$/i)
-	{
-		print "<img src='/images/updbooster/updxl-src-avira.gif' alt='Avira' />&nbsp;</td>\n";
-		print "<td class='base'>&nbsp;Avira&nbsp;</td>\n";
-	} elsif ($vendorid =~ /^AVG$/i)
-	{
-		print "<img src='/images/updbooster/updxl-src-avg.gif' alt='AVG' />&nbsp;</td>\n";
-		print "<td class='base'>&nbsp;AVG&nbsp;</td>\n";
-	} elsif ($vendorid =~ /^Ipfire$/i)
-	{
-		print "<img src='/images/IPFire.png' width='18' height='18' alt='IPFire' />&nbsp;</td>\n";
-		print "<td class='base'>&nbsp;IPFire&nbsp;</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 . "' />&nbsp;</nobr></td>\n";
-		} else {
-			print "<img src='/images/updbooster/updxl-src-unknown.gif' alt='" . ucfirst $vendorid . "' />&nbsp;</nobr></td>\n";
+	foreach (@vendors) {
+		$vendorid = $_;
+		unless ($vendorstats{$vendorid . "_files"}) { next; }
+		print "<tr>\n";
+		if ($vendimg{$vendorid}) {
+			print "\t<td class='left vendimg' style='background: url(".$vendimg{$vendorid}.") 4px no-repeat;' title='".ucfirst $vendorid."'>". ucfirst $vendorid ."</td>\n";
 		}
-		print "<td class='base'>&nbsp;" . ucfirst $vendorid . "&nbsp;</td>\n";
+		else { print "\t<td class='left vendimg' style='background: url(".$vendimg{'unknown'}.") 4px no-repeat;' title='".ucfirst $vendorid."'>". ucfirst $vendorid ."</td>\n"; }
+		print "\t<td>";
+		printf "%5d", $vendorstats{$vendorid."_files"};
+		print "</td>\n";
+		unless ($vendorstats{$vendorid."_filesize"}) { $vendorstats{$vendorid."_filesize"} = '0'; }
+		1 while $vendorstats{$vendorid."_filesize"} =~ s/^(-?\d+)(\d{3})/$1.$2/;
+		print "<td>";
+		printf "%15s", $vendorstats{$vendorid."_filesize"};
+		print "</td>\n";
+		unless ($vendorstats{$vendorid."_cachehits"}) { $vendorstats{$vendorid."_cachehits"} = '0'; }
+		1 while $vendorstats{$vendorid."_cachehits"} =~ s/^(-?\d+)(\d{3})/$1.$2/;
+		print "\t<td>";
+		printf "%15s", $vendorstats{$vendorid."_cachehits"};
+		print "</td>\n";
+		print "\t<td>";
+		printf "%5d", $vendorstats{$vendorid."_1"};
+		print "</td>\n";
+		print "\t<td>";
+		printf "%5d", $vendorstats{$vendorid."_3"};
+		print "</td>\n";
+		print "\t<td>";
+		printf "%5d", $vendorstats{$vendorid."_2"};
+		print "</td>\n";
+		print "\t<td>";
+		printf "%5d", $vendorstats{$vendorid."_0"};
+		print "</td>\n";
+		print "</tr>\n";
 	}
-
-	print "<td class='base' colspan=2 align='right'>";
-	printf "%5d", $vendorstats{$vendorid."_files"};
-	print "&nbsp;</td>\n";
-
-	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 "&nbsp;</td>\n";
-
-	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 "&nbsp;</td>\n";
-
-	print "<td class='base' colspan=2 align='right'>";
-	printf "%5d", $vendorstats{$vendorid."_1"};
-	print "&nbsp;&nbsp;</td>\n";
-
-	print "<td class='base' colspan=2 align='right'>";
-	printf "%5d", $vendorstats{$vendorid."_3"};
-	print "&nbsp;&nbsp;</td>\n";
-
-	print "<td class='base' colspan=2 align='right'>";
-	printf "%5d", $vendorstats{$vendorid."_2"};
-	print "&nbsp;&nbsp;</td>\n";
-
-	print "<td class='base' colspan=2 align='right'>";
-	printf "%5d", $vendorstats{$vendorid."_0"};
-	print "&nbsp;&nbsp;</td>\n";
-
-	print "<td class='base'>&nbsp;</td>\n";
-	print "</tr>\n";
-}
-
-print "</table>\n";
-
-print <<END
-<br>
-<table>
-	<tr>
-		<td class='boldbase'>&nbsp; <b>$Lang::tr{'legend'}:</b></td>
-		<td class='base'>&nbsp;</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'>&nbsp;&nbsp;&nbsp;</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'>&nbsp;&nbsp;&nbsp;</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'>&nbsp;&nbsp;&nbsp;</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'>&nbsp;&nbsp;&nbsp;</td>
-	</tr>
-</table>
-END
-;
-
+	print "</tbody>\n";
+	print "</table>\n";
 }
-
 &Header::closebox();
 
-}
+} # End if statistics
 
 # =====================================================================================
 #  CACHE MAINTENANCE
 # =====================================================================================
 
-if ($xlratorsettings{'EXTENDED_GUI'} eq '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);
+	&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,$_); }
+	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);
+	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
-;
-
-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
-;
-&percentbar($percent);
-print <<END
-</td>
-<td align='right'>$percent</td>
-</tr>
-</table>
-END
-;
 
-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'}' /> &nbsp;$Lang::tr{'updxlrtr all files'}</td>
-	<td class='base' width='25%'>
-		<input type='checkbox' name='REMOVE_OBSOLETE' $checked{'REMOVE_OBSOLETE'}{'on'} />&nbsp;$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'} />&nbsp;$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'} />&nbsp;$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'>
+	@repositoryfiles = sort(@repositoryfiles);
+	unless (@repositoryfiles) { print "$Lang::tr{'updxlrtr empty repository'}\n<hr />\n"; }
+	&printdiskusage ($Lang::tr{'updxlrtr disk usage'}, 'maintenancediskusage');
+	if (@repositoryfiles) {
+		print <<END
+	<hr />
+	<div class='post'>
+	<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_OBSOLETE' $checked{'REMOVE_OBSOLETE'}{'on'} />
+	<label for='check08'>$Lang::tr{'updxlrtr not accessed'}:</label>
+	<select id='select02' 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>
+	</fieldset>
+	<fieldset>
+	<legend>$Lang::tr{'updxlrtr marked as'} ...</legend>
+	<input id='check09' type='checkbox' name='REMOVE_NOSOURCE' $checked{'REMOVE_NOSOURCE'}{'on'} />
+	<label for='check09' class='ledyellow'>$Lang::tr{'updxlrtr condition nosource'}</label>
+	<input id='check10' type='checkbox' name='REMOVE_OUTDATED' $checked{'REMOVE_OUTDATED'}{'on'} />
+	<label for='check10' class='ledred'>$Lang::tr{'updxlrtr condition outdated'}</label>
+	<input id='check11' type='checkbox' name='REMOVE_TODELETE' />
+	<label for='check11' class='icodelete'>$Lang::tr{'updxlrtr remove file'}</label>
+	</fieldset>
+	<fieldset style='border:0'>
+	<input type='submit' name='ACTION' value='$Lang::tr{'updxlrtr purge'}' />
+	</fieldset>
+	<hr />
 END
 ;
-
-	&printcurrentfiles($Lang::tr{'updxlrtr current files'}, @repositoryfiles);
-	print "<br>\n<table>\n";
-	&printlegendicons();
-	&printlegendspacer();
-	&printlegendstatus();
-	&printlegendspacer();
-	&printlegendsource();
-	print "</table>\n";
-}
-
-&Header::closebox();
-
+		&printcurrentfiles($Lang::tr{'updxlrtr current files'}, @repositoryfiles);
+	}
+	print "</form>\n</div>\n";
+	&Header::closebox();
 }
 
 # =====================================================================================
 
 &Header::closebigbox();
-
 &Header::closepage();
 
 # -------------------------------------------------------------------
@@ -1139,24 +847,54 @@ sub printcurrentfiles
 	my @files = @_;
 
 	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>
+<table id='listcurrfiles'>
+<caption>$title</caption>
+<colgroup>
+	<col style='width: 20px'></col>
+	<col style='width: 20px'></col>
+	<col style='width: 0*'></col>
+	<col span='4' style='width: 5%'></col>
+	<col style='width: 20px'></col>
+</colgroup>
+<thead>
+<tr>
+	<th class='left'>$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 class='icoreload' title='$Lang::tr{'updxlrtr last access'}'></th>
+	<th class='icoglobe' title='$Lang::tr{'updxlrtr last checkup'}'></th>
+	<th class='icodelete' title='$Lang::tr{'updxlrtr remove file'}'></th>
+</tr>
+</thead>
+<tfoot>
+<tr>
+	<td colspan='9' id='legendicons'>
+END
+;
+&printlegendicons();
+print <<END
+</td>
+</tr>
+<tr>
+	<td colspan='9' id='legendstatus'>
+END
+;
+&printlegendstatus();
+print <<END
+</td>
+</tr>
 <tr>
-	<td class='base' align='center'>&nbsp;</td>
-	<td class='base' align='center'>&nbsp;</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'>&nbsp;</td>
+	<td colspan='9' id='legendsource'>
+END
+;
+&printlegendsource();
+print <<END
+</td>
 </tr>
+</tfoot>
+<tbody>
 END
 ;
 	$id = 0;
@@ -1169,157 +907,100 @@ END
 			$size_updatefile = (-s "$repository/$updatefile");
 			$mtime = &getmtime("$repository/$updatefile");
 		}
-
-		$id++;
-		if ($id % 2) {
-			print "<tr bgcolor='$Header::table1colour'>\n"; }
-		else {
-			print "<tr bgcolor='$Header::table2colour'>\n"; }
-
+		print "<tr>\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;
-
+		$filedate = $DAYdt.".".$MONTHdt.".".$YEARdt;
 		$lastaccess = "n/a";
 		$lastcheck  = "n/a";
-
 		$status = $sfUnknown;
-
-		unless ($updatefile =~ /^download\//)
-		{
+		unless ($updatefile =~ /^download\//) {
 			($vendorid,$uuid,$shortname) = split('/',$updatefile);
-
-			if (-e "$repository/$vendorid/$uuid/access.log")
-			{
+			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 (($metadata[-1] =~ /^\d+/) && ($metadata[-1] >= 1))
+					{ $lastaccess = $DAYdt.".".$MONTHdt.".".$YEARdt; }
 			}
-			if (-e "$repository/$vendorid/$uuid/checkup.log")
-			{
+			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);
+				$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 (($metadata[-1] =~ /^\d+/) && ($metadata[-1] >= 1))
+					{ $lastcheck = $DAYdt.".".$MONTHdt.".".$YEARdt; }
 			}
-			if (-e "$repository/$vendorid/$uuid/status")
-			{
+			if (-e "$repository/$vendorid/$uuid/status") {
 				open (FILE,"$repository/$vendorid/$uuid/status");
 				@metadata = <FILE>;
 				close(FILE);
 				chomp @metadata;
 				$status = $metadata[-1];
 			}
-		} else {
+		}
+		else {
 			($uuid,$vendorid,$shortname) = split('/',$updatefile);
 			$status = $sfOutdated;
 		}
 
-		print "\t\t<td align='center' nowrap='nowrap'>&nbsp;";
 		if ($status == $sfUnknown)
-		{
-			print "<img src='/images/updbooster/updxl-led-gray.gif' alt='$Lang::tr{'updxlrtr condition unknown'}' />&nbsp;</td>\n";
-		}
-		if ($status == $sfOk)
-		{
-			print "<img src='/images/updbooster/updxl-led-green.gif' alt='$Lang::tr{'updxlrtr condition ok'}' />&nbsp;</td>\n";
-		}
-		if ($status == $sfNoSource)
-		{
-			print "<img src='/images/updbooster/updxl-led-yellow.gif' alt='$Lang::tr{'updxlrtr condition nosource'}' />&nbsp;</td>\n";
-		}
-		if (($status == $sfOutdated) && (!($updatefile =~ /^download\//i)))
-		{
-			print "<img src='/images/updbooster/updxl-led-red.gif' alt='$Lang::tr{'updxlrtr condition outdated'}' />&nbsp;</td>\n";
-		}
-		if (($status == $sfOutdated) && ($updatefile =~ /^download\//i))
-		{
-			print "<img src='/images/updbooster/updxl-led-blue.gif' alt='$Lang::tr{'updxlrtr condition download'}' />&nbsp;</td>\n";
-		}
-
-		print "\t\t<td align='center' nowrap='nowrap'>&nbsp;";
-		if ($vendorid =~ /^Adobe$/i)
-		{
-			print "<img src='/images/updbooster/updxl-src-adobe.gif' alt='Adobe'}' />&nbsp;</td>\n";
-		} elsif ($vendorid =~ /^Microsoft$/i)
-		{
-			print "<img src='/images/updbooster/updxl-src-windows.gif' alt='Microsoft'}' />&nbsp;</td>\n";
-		} elsif ($vendorid =~ /^Symantec$/i)
-		{
-			print "<img src='/images/updbooster/updxl-src-symantec.gif' alt='Symantec'}' />&nbsp;</td>\n";
-		} elsif ($vendorid =~ /^Linux$/i)
-		{
-			print "<img src='/images/updbooster/updxl-src-linux.gif' alt='Linux'}' />&nbsp;</td>\n";
-		} elsif ($vendorid =~ /^TrendMicro$/i)
-		{
-			print "<img src='/images/updbooster/updxl-src-trendmicro.gif' alt='Trend Micro'}' />&nbsp;</td>\n";
-		} elsif ($vendorid =~ /^Apple$/i)
-		{
-			print "<img src='/images/updbooster/updxl-src-apple.gif' alt='Apple'}' />&nbsp;</td>\n";
-		} elsif ($vendorid =~ /^Avast$/i)
-		{
-			print "<img src='/images/updbooster/updxl-src-avast.gif' alt='Avast'}' />&nbsp;</td>\n";
-  	} elsif ($vendorid =~ /^Avira$/i)
-		{
-			print "<img src='/images/updbooster/updxl-src-avira.gif' alt='Avira' />&nbsp;</td>\n";
-		} elsif ($vendorid =~ /^AVG$/i)
-		{
-			print "<img src='/images/updbooster/updxl-src-avg.gif' alt='AVG' />&nbsp;</td>\n";
-		} elsif ($vendorid =~ /^Ipfire$/i)
-		{
-			print "<img src='/images/IPFire.png' width='18' height='18' alt='IPFire' />&nbsp;</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 . "' />&nbsp;</td>\n";
-			} else {
-				print "<img src='/images/updbooster/updxl-src-unknown.gif' alt='" . ucfirst $vendorid . "' />&nbsp;</td>\n";
-			}
+			{ print "\t\t<td><div class='ledgrey' title='$Lang::tr{'updxlrtr condition unknown'}'></div></td>\n"; }
+		elsif ($status == $sfOk)
+			{ print "\t\t<td><div class='ledgreen' title='$Lang::tr{'updxlrtr condition ok'}'></div></td>\n"; }
+		elsif ($status == $sfNoSource)
+			{ print "\t\t<td><div class='ledyellow' title='$Lang::tr{'updxlrtr condition nosource'}'></div></td>\n"; }
+		elsif (($status == $sfOutdated) && (!($updatefile =~ /^download\//i)))
+			{ print "\t\t<td><div class='ledred' title='$Lang::tr{'updxlrtr condition outdated'}'></div></td>\n"; }
+		elsif (($status == $sfOutdated) && ($updatefile =~ /^download\//i))
+			{ print "\t\t<td><div class='ledblue' title='$Lang::tr{'updxlrtr condition download'}'></div></td>\n"; }
+
+#### With Vendorname behind image, nevertheless there is still the title-tag ...
+#		if ($vendimg{$vendorid}) { 
+#			print "\t\t<td class='left vendimg' style='background: url(".$vendimg{$vendorid}.") 4px no-repeat;' title='".ucfirst $vendorid."'>".ucfirst $vendorid."</td>\n"; }
+#		else {
+#			print "\t\t<td class='left vendimg' style='background: url(".$vendimg{unknown}.") 4px no-repeat;' title='".ucfirst $vendorid."'>".ucfirst $vendorid."</td>\n";
+#		}
+####
+
+		if ($vendimg{$vendorid}) {
+			print "\t\t<td class='left vendimg' style='background: url(".$vendimg{$vendorid}.") 4px no-repeat;' title='".ucfirst $vendorid."'></td>\n"; }
+		else {
+			print "\t\t<td class='left vendimg' style='background: url(".$vendimg{unknown}.") 4px no-repeat;' title='".ucfirst $vendorid."'></td>\n";
 		}
 
 		$shortname = substr($updatefile,rindex($updatefile,"/")+1);
 		$shortname =~ s/(.*)_[\da-f]*(\.(exe|cab|psf)$)/$1_*$2/i;
-
-print <<END
-		<td class='base' align='left' title='cache:/$updatefile'><a href="/updatecache/$updatefile">$shortname</a></td>
-		<td class='base' align='right'  nowrap='nowrap'>&nbsp;$filesize&nbsp;</td>
-		<td class='base' align='center' nowrap='nowrap'>&nbsp;$filedate&nbsp;</td>
-		<td class='base' align='center' nowrap='nowrap'>&nbsp;$lastaccess&nbsp;</td>
-		<td class='base' align='center' nowrap='nowrap'>&nbsp;$lastcheck&nbsp;</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>
+		print <<END
+		<td align='left' title='cache:/$updatefile'><a href="/updatecache/$updatefile">$shortname</a></td>
+		<td align='right' >$filesize</td>
+		<td align='center'>$filedate</td>
+		<td align='center'>$lastaccess</td>
+		<td align='center'>$lastcheck</td>
+		<td align='center'><input id='frm$id' type='checkbox' name='TODELETE' value='$updatefile' title='$Lang::tr{'updxlrtr remove file'}' /></td>
 	</tr>
 END
 ;
+	$id += 1;
 	}
-
-	print "</table>\n";
-
+	print <<END
+</tbody>
+</table>
+END
+;
 }
 
 # -------------------------------------------------------------------
@@ -1327,20 +1008,10 @@ END
 sub printlegenddownload
 {
 	print <<END
-	<tr>
-		<td class='boldbase'>&nbsp; <b>$Lang::tr{'legend'}:</b></td>
-		<td class='base'>&nbsp;</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'>&nbsp;</td>
-		<td class='base'>&nbsp;</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'>&nbsp;</td>
-		<td class='base'>&nbsp;</td>
-		<td><img src='/images/delete.gif' alt='$Lang::tr{'updxlrtr cancel download'}' /></td>
-		<td class='base'>$Lang::tr{'updxlrtr cancel download'}</td>
-	</tr>
+	<h4>$Lang::tr{'legend'}:</h4>
+	<span class='ledblue' title='$Lang::tr{'updxlrtr condition download'}'>$Lang::tr{'updxlrtr condition download'}</span>
+	<span class='ledgrey' title='$Lang::tr{'updxlrtr condition suspended'}'>$Lang::tr{'updxlrtr condition suspended'}</span>
+	<span class='icodelete' title='$Lang::tr{'updxlrtr cancel download'}'>$Lang::tr{'updxlrtr cancel download'}</span>
 END
 ;
 }
@@ -1350,24 +1021,10 @@ END
 sub printlegendicons
 {
 	print <<END
-
-
-
-	<tr>
-		<td class='boldbase'>&nbsp; <b>$Lang::tr{'legend'}:</b></td>
-		<td class='base'>&nbsp;</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'>&nbsp;</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'>&nbsp;</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'>&nbsp;</td>
-		<td class='base'>&nbsp;</td>
-		<td class='base'>&nbsp;</td>
-	</tr>
+	<h4>$Lang::tr{'legend'}:</h4>
+	<span class='icoreload' title='$Lang::tr{'updxlrtr last access'}'>$Lang::tr{'updxlrtr last access'}</span>
+	<span class='icoglobe' title='$Lang::tr{'updxlrtr last checkup'}'>$Lang::tr{'updxlrtr last checkup'}</span>
+	<span class='icodelete' title='$Lang::tr{'updxlrtr remove file'}'>$Lang::tr{'updxlrtr remove file'}</span>
 END
 ;
 }
@@ -1377,38 +1034,12 @@ END
 sub printlegendstatus
 {
 	print <<END
-	<tr>
-		<td class='base'>&nbsp; $Lang::tr{'status'}:</td>
-		<td class='base'>&nbsp;</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'>&nbsp;</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'>&nbsp;</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'>&nbsp;</td>
-		<td class='base'>&nbsp;</td>
-
-		<td class='base'>&nbsp;</td>
-	</tr>
-	<tr>
-		<td class='base'>&nbsp;</td>
-		<td class='base'>&nbsp;</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'>&nbsp;</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'>&nbsp;</td>
-		<td class='base'>&nbsp;</td>
-		<td class='base'>&nbsp;</td>
-		<td class='base'>&nbsp;</td>
-		<td class='base'>&nbsp;</td>
-
-		<td class='base'>&nbsp;</td>
-	</tr>
+	<h4>$Lang::tr{'status'}:</h4>
+	<span class='ledgreen' title='$Lang::tr{'updxlrtr condition ok'}'>$Lang::tr{'updxlrtr condition ok'}</span>
+	<span class='ledyellow' title='$Lang::tr{'updxlrtr condition nosource'}'>$Lang::tr{'updxlrtr condition nosource'}</span>
+	<span class='ledred' title='$Lang::tr{'updxlrtr condition outdated'}'>$Lang::tr{'updxlrtr condition outdated'}</span>
+	<span class='ledblue' title='$Lang::tr{'updxlrtr condition download'}'>$Lang::tr{'updxlrtr condition download'}</span>
+	<span class='ledgrey' title='$Lang::tr{'updxlrtr condition unknown'}'>$Lang::tr{'updxlrtr condition unknown'}</span>
 END
 ;
 }
@@ -1417,72 +1048,81 @@ END
 
 sub printlegendsource
 {
-	print <<END
-	<tr>
-
-
-
-		<td class='base'>&nbsp; $Lang::tr{'updxlrtr source'}:</td>
-		<td class='base'>&nbsp;</td>
-		<td align='center'><img src='/images/updbooster/updxl-src-adobe.gif' alt='Adobe' /></td>
-		<td class='base'>Adobe</td>
-		<td class='base'>&nbsp;</td>
-		<td align='center'><img src='/images/updbooster/updxl-src-apple.gif' alt='Apple' /></td>
-		<td class='base'>Apple</td>
-		<td class='base'>&nbsp;</td>
-		<td align='center'><img src='/images/updbooster/updxl-src-avast.gif' alt='Avast' /></td>
-		<td class='base'>Avast</td>
-		<td class='base'>&nbsp;</td>
-		<td align='center'><img src='/images/updbooster/updxl-src-linux.gif' alt='Linux' /></td>
-		<td class='base'>Linux</td>
-	</tr>
-	<tr>
-		<td colspan='13'></td>
-	</tr>
-	<tr>
-		<td class='base'>&nbsp;</td>
-		<td class='base'>&nbsp;</td>
-		<td align='center'><img src='/images/updbooster/updxl-src-windows.gif' alt='Microsoft' /></td>
-		<td class='base'>Microsoft</td>
-		<td class='base'>&nbsp;</td>
-		<td align='center'><img src='/images/updbooster/updxl-src-symantec.gif' alt='Symantec' /></td>
-		<td class='base'>Symantec</td>
-		<td class='base'>&nbsp;</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'>&nbsp;</td>
-		<td align='center'><img src='/images/IPFire.png' width='18' height='18' alt='IPFire' /></td>
-		<td class='base'>IPFire</td>
-	</tr>
-	<tr>
-		<td class='base'>&nbsp;</td>
-		<td class='base'>&nbsp;</td>
-		<td align='center'><img src='/images/updbooster/updxl-src-avira.gif' alt='Avira' /></td>
-		<td class='base'>Avira</td>
-		<td class='base'>&nbsp;</td>
-		<td align='center'><img src='/images/updbooster/updxl-src-avg.gif' alt='AVG' /></td>
-		<td class='base'>AVG</td>
-		<td class='base'>&nbsp;</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'>&nbsp;</td>
-		<td align='center'></td>
-		<td class='base'>&nbsp;</td>
-	</tr>
-
-END
-;
-
+	print "<h4>$Lang::tr{'updxlrtr source'}:</h4>";
+	foreach my $name (sort keys %vendimg) {
+		if ($name =~ /^unknown$/i) {
+			print "<span class='vendimg' style='background: url($vendimg{$name}) no-repeat;' title='". ucfirst $Lang::tr{$name} ."'> ". ucfirst $Lang::tr{$name} ."</span> ";
+		} else {
+			print "<span class='vendimg' style='background: url($vendimg{$name}) no-repeat;' title='". ucfirst $name ."'> ". ucfirst $name ."</span> ";
+		}
+	}
 }
 
 # -------------------------------------------------------------------
+# 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 "updxl: Can't access \"$webhome$webimgdir\". Error was: $!\n";
+	}
+}
+# -------------------------------------------------------------------
+
+sub printdiskusage {
+	my $tabletitle = shift;
+	my $tableid = shift;
 
-sub printlegendspacer
-{
 	print <<END
-	<tr>
-		<td colspan='13'>&nbsp;<br></td>
-	</tr>
+<table id='$tableid'>
+<caption>$tabletitle</caption>
+<thead>
+<tr>
+	<th>$Lang::tr{'updxlrtr cache dir'}</th>
+	<th>$Lang::tr{'size'}</th>
+	<th>$Lang::tr{'used'}</th>
+	<th>$Lang::tr{'free'}</th>
+	<th>$Lang::tr{'percentage'}</th>
+</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 align='right'>$size</td>
+	<td align='right'>$duused</td>
+	<td align='right'>$free</td>
+	<td>
+END
+;
+	&percentbar($percent);
+	print <<END
+</td>
+</tr>
+</tbody>
+</table>
 END
 ;
 }
@@ -1493,29 +1133,25 @@ sub savesettings
 {
 
 	if (($xlratorsettings{'ENABLE_AUTOCHECK'} eq 'on') && ($xlratorsettings{'AUTOCHECK_SCHEDULE'} eq 'daily'))
-	{
-		system('/usr/local/bin/updxlratorctrl cron daily >/dev/null 2>&1');
-	}
+		{ 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');
-	}
+		{ 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');
-	}
+	{ 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_OBSOLETE'};
 	my $nosource = $xlratorsettings{'REMOVE_NOSOURCE'};
 	my $outdated = $xlratorsettings{'REMOVE_OUTDATED'};
+	my $todelete = $xlratorsettings{'REMOVE_TODELETE'};
 	my $gui = $xlratorsettings{'EXTENDED_GUI'};
 
 	delete($xlratorsettings{'REMOVE_OBSOLETE'});
 	delete($xlratorsettings{'REMOVE_NOSOURCE'});
 	delete($xlratorsettings{'REMOVE_OUTDATED'});
-
+	delete($xlratorsettings{'REMOVE_TODELETE'});
+	delete($xlratorsettings{'TODELETE'});
 	delete($xlratorsettings{'EXTENDED_GUI'});
 
 	&General::writehash("${General::swroot}/updatexlrator/settings", \%xlratorsettings);
@@ -1524,36 +1160,29 @@ sub savesettings
 	$xlratorsettings{'REMOVE_OBSOLETE'} = $obsolete;
 	$xlratorsettings{'REMOVE_NOSOURCE'} = $nosource;
 	$xlratorsettings{'REMOVE_OUTDATED'} = $outdated;
+	$xlratorsettings{'REMOVE_TODELETE'} = $todelete;
 	$xlratorsettings{'EXTENDED_GUI'} = $gui;
 }
 
 # -------------------------------------------------------------------
 
-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>
+sub percentbar {
+	my $percent = shift;
+	my $fg = "#a0a0a0";
+	my $bg = "#e2e2e2";
+
+	if ($percent =~ /^(\d+)%$/ ) {
+		print <<END
+	<div style='border: 1px solid $fg; width:100px; height:15px; background-color:$bg; float:left;'>
 END
 ;
-  }
+		if ($percent eq "100%")
+			 { print "\t\t<div style='width:100%; height:13px; background-color:$fg; border: 1px solid $bg; margin: 0 auto 0 0;'></div>" }
+		else
+			 { print "\t\t<div style='width:$percent; height:13px; background-color:$fg; border: 1px solid $bg; margin: 0 auto 0 0;'></div>\n"; }
+		print "</div> $percent";
+	}
+	return;
 }
 
 # -------------------------------------------------------------------
@@ -1561,7 +1190,6 @@ END
 sub getmtime
 {
 	my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,$blocks) = stat($_[0]);
-
 	return $mtime;
 }
 
@@ -1573,10 +1201,7 @@ sub getPID
 	my @psdata=`ps ax --no-heading`;
 
 	foreach (@psdata)
-	{
-		if (/$_[0]/) { ($pid)=/^\s*(\d+)/; }
-	}
-
+		{ if (/$_[0]/) { ($pid)=/^\s*(\d+)/; } }
 	return $pid;
 }
 
diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl
index 05e1d85..7777be5 100644
--- a/langs/de/cgi-bin/de.pl
+++ b/langs/de/cgi-bin/de.pl
@@ -944,6 +944,7 @@
 'hostname not set' => 'Hostname nicht eingegeben.',
 'hosts config added' => 'Hosts-Konfiguration hinzugefügt',
 'hosts config changed' => 'Hosts-Konfiguration geändert',
+'shour' => 'Std.',
 'hour' => 'Stunde',
 'hour-graph' => 'Stunde',
 'hours' => 'Stunden',
@@ -1204,6 +1205,7 @@
 'min delay' => 'Minimale Verzögerung',
 'min size' => 'Min. Objektgröße (kB):',
 'minimal' => 'Minimal',
+'sminute' => 'Min.',
 'minute' => 'Minute',
 'minutes' => 'Minuten',
 'misc-options' => 'Sonstige Optionen',
@@ -1603,7 +1605,9 @@
 'secondary dns' => 'Sekundärer DNS:',
 'secondary ntp server' => 'Sekundärer NTP-Server',
 'secondary wins server address' => 'Sekundäre WINS-Server Adresse',
-'seconds' => 'sek.',
+'ssecond' => 'Sek.',
+'second' => 'Sekunde',
+'seconds' => 'Sekunden',
 'section' => 'Abschnitt',
 'secure shell server' => 'Secure Shell Server',
 'security' => 'Sicherheit',
@@ -1887,7 +1891,7 @@
 'updxlrtr pending downloads' => 'Anstehende Downloads',
 'updxlrtr performance options' => 'Leistungsoptionen',
 'updxlrtr progress' => 'Fortschritt',
-'updxlrtr purge' => 'Entferne',
+'updxlrtr purge' => 'Entfernen',
 'updxlrtr remove file' => 'Entferne vom Cache',
 'updxlrtr save and restart' => 'Speichern und neu starten',
 'updxlrtr source' => 'Quelle',
@@ -1896,6 +1900,7 @@
 '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 (Bytes)',
 'updxlrtr total data from cache' => 'Daten insgesamt vom Cache ausgeliefert (Bytes)',
 'updxlrtr total files' => 'Gesamtanzahl Dateien im Cache',
@@ -1924,6 +1929,8 @@
 'upstream password' => 'Proxy-Passwort:',
 'upstream proxy host:port' => 'Vorgelagerter Proxy (hostname:port)',
 'upstream username' => 'Proxy-Benutzername:',
+'uptime' => 'Betriebszeit',
+'uptime load average' => 'Ø Systemlast',
 'uptime and users' => 'Uptime und Benutzer:',
 'url filter' => 'URL-Filter',
 'urlfilter access' => 'Zugriff',
diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl
index f0fa2c2..2ec5bcb 100644
--- a/langs/en/cgi-bin/en.pl
+++ b/langs/en/cgi-bin/en.pl
@@ -614,7 +614,7 @@
 'day after' => 'Day after',
 'day before' => 'Day before',
 'day-graph' => 'Day',
-'days' => 'days.',
+'days' => 'Days.',
 'dbfile' => 'Dbfile',
 'ddns help dnsmadeeasy' => 'In the field for hostname enter your ID (or a list of IDs seperated by;)',
 'ddns help freedns' => 'In the fied username enter your connect string',
@@ -969,9 +969,10 @@
 'hostname not set' => 'Hostname not set.',
 'hosts config added' => 'Hosts config added',
 'hosts config changed' => 'Hosts config changed',
+'shour' => 'hr.',
 'hour' => 'Hour',
 'hour-graph' => 'Hour',
-'hours' => 'hours',
+'hours' => 'Hours',
 'hours2' => 'Hours',
 'ibod for dual isdn only' => 'iBOD can only be used with Dual ISDN.',
 'icmp selected but no type' => 'ICMP selected for protocol, but no ICMP type specified.',
@@ -1230,6 +1231,7 @@
 'min delay' => 'Minimum delay',
 'min size' => 'Min object size (KB):',
 'minimal' => 'Minimal',
+'sminute' => 'Min.',
 'minute' => 'Minute',
 'minutes' => 'Minutes',
 'misc-options' => 'Miscellaneous options',
@@ -1632,6 +1634,8 @@
 'secondary dns' => 'Secondary DNS:',
 'secondary ntp server' => 'Secondary NTP server',
 'secondary wins server address' => 'Secondary WINS server address',
+'ssecond' => 'Sec.',
+'second' => 'Second',
 'seconds' => 'Secs',
 'section' => 'Section',
 'secure shell server' => 'Secure Shell Server',
@@ -1957,6 +1961,8 @@
 'upstream password' => 'Upstream password:',
 'upstream proxy host:port' => 'Upstream proxy (host:port)',
 'upstream username' => 'Upstream username:',
+'uptime' => 'Uptime',
+'uptime load average' => 'Load average',
 'uptime and users' => 'Uptime and users:',
 'url filter' => 'Content Filter',
 'urlfilter access' => 'Access',
-- 
1.7.9.5

