Exemple #1
0
    $retrieved_nonce = $_REQUEST['_wpnonce'];
    if (!wp_verify_nonce($retrieved_nonce, 'manage_crf_entries')) {
        die('Failed security check');
    }
    $ids = implode(',', $_POST['selected']);
    $file = $form_fields->crf_create_attachment_zip($_POST['selected']);
    $form_fields->crf_download_file($file);
    //echo $file;
}
$pagenum = isset($_GET['pagenum']) ? absint($_GET['pagenum']) : 1;
$limit = 10;
// number of rows in page
$offset = ($pagenum - 1) * $limit;
$i = $offset;
if ($_REQUEST['form_id'] != "") {
    $attchmentids = $form_fields->crf_get_all_attachments_ids($_REQUEST['form_id']);
    //print_r($attchmentids);die;
    $total = count($attchmentids);
    $num_of_pages = ceil($total / $limit);
    if ($total - $offset <= $limit) {
        $total_records = $total - $offset + $offset;
    } else {
        $total_records = $offset + $limit;
    }
    //echo $total_records;die;
    $max_record = $total_records;
    //echo $max_record;die;
}
//print_r($attchmentids);die;
?>
<form name="field_list" id="field_list" method="post">