<?php /*Controls custom field creation in the dashboard area*/ global $wpdb; $textdomain = 'custom-registration-form-builder-with-submission-manager'; $crf_submissions = $wpdb->prefix . "crf_submissions"; $crf_fields = $wpdb->prefix . "crf_fields"; $crf_forms = $wpdb->prefix . "crf_forms"; $path = plugin_dir_url(__FILE__); $form_fields = new crf_basic_fields(); if (isset($_REQUEST['file'])) { ob_clean(); $file = get_attached_file($_REQUEST['file']); $form_fields->crf_download_file($file); } if (isset($_REQUEST['form_id'])) { $form_id = $_REQUEST['form_id']; } else { $qry = "select id from {$crf_forms} order by id asc limit 1"; $reg = $wpdb->get_var($qry); $form_id = $_REQUEST['form_id'] = $reg; } if (!empty($_POST['selected']) && isset($_POST['download_selected'])) { $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;