$Lang::tr{'updxlrtr update information'} | "; - print "
- | - | $Lang::tr{'updxlrtr filename'} | -$Lang::tr{'updxlrtr filesize'} | -$Lang::tr{'date'} | -- | + | $Lang::tr{'updxlrtr source'} | +$Lang::tr{'updxlrtr filename'} | +$Lang::tr{'updxlrtr filesize'} | +$Lang::tr{'date'} | +$Lang::tr{'updxlrtr progress'} | ||
"; - if ($metadata[2] eq $sfNoSource) - { - print " | \n"; - } - if ($metadata[2] eq $sfOk) - { - print " \n"; - } - if (($metadata[2] eq $sfOutdated) && (!($updatefile =~ /^download\//i))) - { - print " \n"; - } - if (($metadata[2] eq $sfOutdated) && ($updatefile =~ /^download\//i)) - { - print " \n"; - } - if ($metadata[2] eq '') - { - print " \n"; - } + ($uuid,$vendorid,$shortname) = split('/',$updatefile); print "\t\t"; - if ($metadata[1] eq 'Adobe') - { - print " | \n"; - } elsif ($metadata[1] eq 'Microsoft') - { - print " \n"; - } elsif ($metadata[1] eq 'Symantec') + if (&getPID("\\s/usr/bin/wget\\s.*\\s".quotemeta($dlinfo{'SRCURL'})."\$")) { - print " \n"; - } else - { - print " \n"; + print " \n"; + } else { + print " \n"; } - $shortname = $updatefile; - $shortname =~ s/(.*)_[\da-f]*(\.(exe|cab|psf)$)/\1_*\2/i; - $shortname =~ s/^download\///i; + print "\t\t"; + if ($vendorid =~ /^Adobe$/i) + { + print " | \n"; + } elsif ($vendorid =~ /^Microsoft$/i) + { + print " \n"; + } elsif ($vendorid =~ /^Symantec$/i) + { + print " \n"; + } elsif ($vendorid =~ /^Linux$/i) + { + print " \n"; + } elsif ($vendorid =~ /^TrendMicro$/i) + { + print " \n"; + } elsif ($vendorid =~ /^Apple$/i) + { + print " \n"; + } elsif ($vendorid =~ /^Avast$/i) + { + print " \n"; + } else + { + if (-e "/home/httpd/html/images/updbooster/updxl-src-" . $vendorid . ".gif") + { + print " \n"; + } else { + print " \n"; + } + } + + $shortname = substr($updatefile,rindex($updatefile,"/")+1); + $shortname =~ s/(.*)_[\da-f]*(\.(exe|cab|psf)$)/$1_*$2/i; -print <$shortname | $filesize | $filedate | -$lastaccess | -$lastcheck | +
+END
+;
+ my $percent="0%";
+ if ($dlinfo{'REMOTESIZE'} && $size_updatefile)
+ {
+ $percent=int(100 / ($dlinfo{'REMOTESIZE'} / $size_updatefile))."%";
+ }
+ print $percent; &percentbar($percent);
+ print <
|
|
$Lang::tr{'updxlrtr disk usage'} |
$Lang::tr{'updxlrtr cache dir'} | +$Lang::tr{'size'} | +$Lang::tr{'used'} | +$Lang::tr{'free'} | +$Lang::tr{'percentage'} | +[$repository] | +$size | +$used | +$free | +
+END
+;
+&percentbar($percent);
+print <$percent |
+
+ |
$Lang::tr{'updxlrtr summary'} | +||||
$Lang::tr{'updxlrtr total files'}: | +$numfiles | +$Lang::tr{'updxlrtr total cache size'}: | +$filesize | ++ |
$Lang::tr{'updxlrtr efficiency index'}: | +$efficiency | +$Lang::tr{'updxlrtr total data from cache'}: | +$cachedtraffic | ++ |
$Lang::tr{'updxlrtr statistics by source'} | +||||||||||||||||||||||||||
$Lang::tr{'updxlrtr source'} | ++ | $Lang::tr{'updxlrtr files'} | ++ | + | + | + | + | + | + | + | + | + | + | |||||||||||||
Adobe | \n"; + } elsif ($vendorid =~ /^Microsoft$/i) + { + print " \n"; + print "Microsoft | \n"; + } elsif ($vendorid =~ /^Symantec$/i) + { + print " \n"; + print "Symantec | \n"; + } elsif ($vendorid =~ /^Linux$/i) + { + print " \n"; + print "Linux | \n"; + } elsif ($vendorid =~ /^TrendMicro$/i) + { + print " \n"; + print "Trend Micro | \n"; + } elsif ($vendorid =~ /^Apple$/i) + { + print " \n"; + print "Apple | \n"; + } elsif ($vendorid =~ /^Avast$/i) + { + print " \n"; + print "Avast | \n"; + } elsif ($vendorid =~ /^Avira$/i) + { + print " \n"; + print "Avira | \n"; + } elsif ($vendorid =~ /^AVG$/i) + { + print " \n"; + print "AVG | \n"; + } elsif ($vendorid =~ /^Ipfire$/i) + { + print " \n"; + print "IPFire | \n"; + } else + { + if (-e "/srv/web/ipfire/html/images/updbooster/updxl-src-" . $vendorid . ".gif") + { + print " \n"; + } else { + print " \n"; + } + print "" . ucfirst $vendorid . " | \n"; + } + + print ""; + printf "%5d", $vendorstats{$vendorid."_files"}; + print " | \n"; + + unless ($vendorstats{$vendorid."_filesize"}) { $vendorstats{$vendorid."_filesize"} = '0'; } + 1 while $vendorstats{$vendorid."_filesize"} =~ s/^(-?\d+)(\d{3})/$1.$2/; + print ""; + printf "%15s", $vendorstats{$vendorid."_filesize"}; + print " | \n"; + + unless ($vendorstats{$vendorid."_cachehits"}) { $vendorstats{$vendorid."_cachehits"} = '0'; } + 1 while $vendorstats{$vendorid."_cachehits"} =~ s/^(-?\d+)(\d{3})/$1.$2/; + print ""; + printf "%15s", $vendorstats{$vendorid."_cachehits"}; + print " | \n"; + + print ""; + printf "%5d", $vendorstats{$vendorid."_1"}; + print " | \n"; + + print ""; + printf "%5d", $vendorstats{$vendorid."_3"}; + print " | \n"; + + print ""; + printf "%5d", $vendorstats{$vendorid."_2"}; + print " | \n"; + + print ""; + printf "%5d", $vendorstats{$vendorid."_0"}; + print " | \n"; + + print "\n"; + print " |
$Lang::tr{'legend'}: | -- | - | $Lang::tr{'updxlrtr last access'} | -- | - | $Lang::tr{'updxlrtr last checkup'} | -- | - | $Lang::tr{'updxlrtr remove file'} | -- | - | - | ||||||
- | ||||||||||||||||||
$Lang::tr{'status'}: | +$Lang::tr{'legend'}: | - | + | $Lang::tr{'updxlrtr condition ok'} | -- | + | + | $Lang::tr{'updxlrtr condition nosource'} | -- | + | + | $Lang::tr{'updxlrtr condition outdated'} | -- | - | $Lang::tr{'updxlrtr condition download'} | -|||
- | ||||||||||||||||||
$Lang::tr{'updxlrtr source'}: | -- | - | Adobe | -- | - | Microsoft | -- | - | Symantec | -- | - | $Lang::tr{'updxlrtr unknown'} | ++ | + | $Lang::tr{'updxlrtr condition unknown'} | +
$Lang::tr{'updxlrtr disk usage'}: |
$Lang::tr{'updxlrtr disk usage'} |
$Lang::tr{'updxlrtr cache dir'} | $Lang::tr{'size'} | @@ -588,11 +1043,16 @@ while([$repository] | $size | @@ -601,85 +1061,470 @@ END
END
;
- &percentbar($percent);
- print <$percent |
+ |
+ | + | $Lang::tr{'updxlrtr filename'} | +$Lang::tr{'updxlrtr filesize'} | +$Lang::tr{'date'} | ++ | + | + |
"; + if ($status == $sfUnknown) + { + print " | \n"; + } + if ($status == $sfOk) + { + print " \n"; + } + if ($status == $sfNoSource) + { + print " \n"; + } + if (($status == $sfOutdated) && (!($updatefile =~ /^download\//i))) + { + print " \n"; + } + if (($status == $sfOutdated) && ($updatefile =~ /^download\//i)) + { + print " \n"; + } + + print "\t\t"; + if ($vendorid =~ /^Adobe$/i) + { + print " | \n"; + } elsif ($vendorid =~ /^Microsoft$/i) + { + print " \n"; + } elsif ($vendorid =~ /^Symantec$/i) + { + print " \n"; + } elsif ($vendorid =~ /^Linux$/i) + { + print " \n"; + } elsif ($vendorid =~ /^TrendMicro$/i) + { + print " \n"; + } elsif ($vendorid =~ /^Apple$/i) + { + print " \n"; + } elsif ($vendorid =~ /^Avast$/i) + { + print " \n"; + } elsif ($vendorid =~ /^Avira$/i) + { + print " \n"; + } elsif ($vendorid =~ /^AVG$/i) + { + print " \n"; + } elsif ($vendorid =~ /^Ipfire$/i) + { + print " \n"; + } + else { - print $remote "GET http://www.advproxy.net/update-accelerator/version/ipcop/latest HTTP/1.0\n"; - print $remote "User-Agent: Mozilla/4.0 (compatible; IPCop $General::version; $Lang::language; updatexlrator)\n\n"; - while (<$remote>) { push(@response,$_); } - close $remote; - if ($response[0] =~ /^HTTP\/\d+\.\d+\s200\sOK\s*$/) + if (-e "/srv/web/ipfire/html/images/updbooster/updxl-src-" . $vendorid . ".gif") { - system("touch $sysupdflagfile"); - return "$response[$#response]"; + print " \n"; + } else { + print " \n"; } } + + $shortname = substr($updatefile,rindex($updatefile,"/")+1); + $shortname =~ s/(.*)_[\da-f]*(\.(exe|cab|psf)$)/$1_*$2/i; + +print <$filesize | +$filedate | +$lastaccess | +$lastcheck | ++ + | +