/** * Display the Admin page for this Plugin that show the form data saved in the database * @return void */ public function whatsInTheDBPage() { if (isset($_REQUEST['submit_time'])) { $submitTime = htmlspecialchars($_REQUEST['submit_time']); require_once 'ExportEntry.php'; $exp = new ExportEntry(); if (isset($_REQUEST['form_name']) && !empty($_REQUEST['form_name'])) { $form = $_REQUEST['form_name']; } else { global $wpdb; $table = $this->getSubmitsTableName(); $form = $wpdb->get_var($wpdb->prepare("SELECT form_name from {$table} where submit_time = %s LIMIT 1", $submitTime)); } ?> <form action="<?php echo get_admin_url() . 'admin.php?page=' . $this->getDBPageSlug() . "&form_name={$form}"; ?> " method="post"> <input name="form_name" type="hidden" value="<?php echo $form; ?> "/> <input name="<?php echo $submitTime; ?> " type="hidden" value="row"/> <?php wp_nonce_field('delete-from-' . htmlspecialchars($_REQUEST['form_name'])); ?> <button id="delete" name="delete" onclick="this.form.submit();"><?php _e('Delete', 'contact-form-7-to-database-extension'); ?> </button> </form> <?php $exp->export($form, array('submit_time' => $submitTime)); } else { require_once 'CFDBViewWhatsInDB.php'; $view = new CFDBViewWhatsInDB(); $view->display($this); } }
/** * Display the Admin page for this Plugin that show the form data saved in the database * @return void */ public function whatsInTheDBPage() { require_once 'CFDBViewWhatsInDB.php'; $view = new CFDBViewWhatsInDB(); $view->display($this); }
/** * Display the Admin page for this Plugin that show the form data saved in the database * @return void */ public function whatsInTheDBPage() { if (isset($_REQUEST['form_name']) && isset($_REQUEST['submit_time'])) { require_once 'ExportEntry.php'; $exp = new ExportEntry(); $exp->export($_REQUEST['form_name'], array('submit_time' => $_REQUEST['submit_time'])); } else { require_once 'CFDBViewWhatsInDB.php'; $view = new CFDBViewWhatsInDB(); $view->display($this); } }