[! use Proxmox::Form; use Proxmox::Utils; use Proxmox::ConfigServer; use Proxmox::Config::System; use Proxmox::RuleDB; use Proxmox::HTMLTable; !] [- my $system_cfg = $fdat{__system_config}; my $rdb = Proxmox::RuleDB->new(); my $dbh = $rdb->{dbh}; my $url = $req_rec->uri; my $out = ""; my $page_size = 1000; my $cpos; my $sth = $dbh->prepare("SELECT COUNT(*) as max FROM CGreylist WHERE passed = 0"); $sth->execute(); my $ref = $sth->fetchrow_hashref(); my $max = $ref->{'max'}; if (!defined ($fdat{cpos})) { $cpos = int (($max - 1)/$page_size) * $page_size; } else { $cpos = $fdat{cpos}; } $sth = $dbh->prepare("SELECT * FROM CGreylist " . "WHERE passed = 0 ORDER BY RCTime LIMIT ? OFFSET ?"); if ($sth->execute($page_size, $cpos) > 0) { $out .= Proxmox::HTMLTable::generate_page_navigator ($url, $max, $page_size, $cpos); $out .= "
" . __('Sender IP') . " | " . __('Arrival Time') . " | " . __('From') . " | " . __('To') . " |
" . $ref->{ipnet} . '.' . $ref->{host} . ' | ' . $rctime . ' | ' . $sender . ' | ' . $ref->{receiver} . " |
" . __("There are no items in this list") . ".
"; } print OUT $out; -]