[!
use strict;
use Proxmox::Utils;
use Proxmox::RuleDB;
use Proxmox::HTMLTable;
use Proxmox::HTMLDropDown;
use Proxmox::Statistic;
use Proxmox::Config::System;
!]
[- Execute ('date_selection.epl'); -]
[-
my $out = "";
my $system_cfg = $fdat{__system_config};
my $advfilter = $system_cfg->get('administration', 'advfilter');
my $stat = Proxmox::Statistic->new ($udat{statistic_from}, $udat{statistic_to}, $advfilter);
my @cellwidth1 = ('450px', '40px', '70px', '40px', '70px');
my @header_sum = (
'1', '450px', __('Domain'),
'1', '40px', '' . __('Count') . '',
'1', '70px', 'MByte',
'1', '40px', '' . __('Virus count') . '',
'1', '70px', '' . __('Spam count') . '',
);
my $table_sum = Proxmox::HTMLTable->new (\@cellwidth1);
$table_sum->add_headline (\@header_sum);
my $rdb = Proxmox::RuleDB->new();
Proxmox::Statistic::update_stats_domainstat_in ($rdb->{dbh}, $fdat{__cinfo});
my $res = $stat->total_domain_stat ($rdb, $fdat{orderby});
$out .="
" . __('Receiver domain overview') . "
"; foreach my $ref (@$res) { next if !$ref->{domain}; next if !$ref->{count_in}; my $spamper = sprintf ("%.1f", $ref->{count_in} ? ($ref->{spam_in}*100.0)/$ref->{count_in} : 0); $table_sum->add_row ('', Proxmox::Utils::email2html ($ref->{domain}, 0), $ref->{count_in}, sprintf ("%.1f", $ref->{bytes_in}), $ref->{virus_in}, "$ref->{spam_in} ($spamper %)"); } $out .= $table_sum->out_table(); print OUT $out; -]