Beispiel #1
0
    if ($enable_false_negative_management) {
        $data['fn'] = get_item_row($id, "fn");
    }
}
$data['wl'] = get_item_row($id, "wl");
$data['bl'] = get_item_row($id, "bl");
if ($enable_virus_scanning) {
    $data['virus'] = get_item_row($id, "virus");
}
if ($enable_banned_files_checking) {
    $data['banned_file'] = get_item_row($id, "banned_file");
}
if ($enable_bad_header_checking) {
    $data['bad_header'] = get_item_row($id, "bad_header");
}
$data['oversized'] = get_item_row($id, "oversized");
$links = array('suspected_ham' => "ham", 'suspected_spam' => "spam", 'virus' => "virus", 'banned_file' => "attachment", 'bad_header' => "header", 'ham' => false, 'bl' => false, 'fp' => false, 'spam' => false, 'fn' => false, 'wl' => false, 'oversized' => false);
$smarty->assign('links', $links);
$smarty->assign('data', $data);
$smarty->display("stats.tpl");
/*
 * get_item_row(): Produces a row of statistics about mail items
 *                     of the specified type received by the specified
 *                     user, or all users if $user_id == 0.
 */
function get_item_row($user_id, $type)
{
    global $dbh;
    global $lang;
    $bandwidth_cost = get_config_value("bandwidth_cost");
    $items = count_items($user_id, $type);
Beispiel #2
0
/**
 * Row Export
 */
function export_row_items(&$exportPlugin, $page_title, $include_header, $export_columns, $s_item_type, $owner_id)
{
    $iiresults = fetch_export_item_instance_rs($s_item_type, $owner_id);
    if ($iiresults) {
        send_header($exportPlugin, $page_title);
        if ($include_header == 'Y') {
            if (method_exists($exportPlugin, 'prompt_header')) {
                $row = get_header_row('prompt', $export_columns, $s_item_type);
                if (is_not_empty_array($row)) {
                    send_data($exportPlugin->prompt_header($row));
                }
            } else {
                if (method_exists($exportPlugin, 'data_header')) {
                    $row = get_header_row('data', $export_columns, $s_item_type);
                    if (is_not_empty_array($row)) {
                        send_data($exportPlugin->data_header());
                    }
                }
            }
        }
        $item_instance_r2 = NULL;
        while ($item_instance_r = db_fetch_assoc($iiresults)) {
            $row = get_item_row($export_columns, strlen($s_item_type) == 0, $item_instance_r['item_id'], $item_instance_r['instance_no'], $item_instance_r['owner_id'], $item_instance_r['s_item_type'], $item_instance_r['title'], $item_instance_r['borrow_duration'], $item_instance_r['s_status_type'], $item_instance_r['status_comment']);
            if (is_not_empty_array($row)) {
                send_data($exportPlugin->item_row($row));
            }
            $item_instance_r2 = $item_instance_r;
        }
        db_free_result($iiresults);
        if (method_exists($exportPlugin, 'close')) {
            send_data($exportPlugin->close());
        }
        send_footer($exportPlugin);
        return TRUE;
    } else {
        return FALSE;
    }
}