admin_url( 'admin-ajax.php' ) ) ); } /** * Menu item will allow us to load the page to display the table */ public function zt_dcfcf_admin_table_list_page() { add_menu_page( __( 'ASDS CF7', ZT_DCFCF_TEXTDOMAIN ), __( 'ASDS CF7', ZT_DCFCF_TEXTDOMAIN ), 'manage_options' , 'zt-dcfcf-list', array($this, 'zt_dcfcf_table_list_page'), 'dashicons-excerpt-view' ); add_submenu_page('zt-dcfcf-list', 'Settings', 'Settings', 'manage_options' , 'zt-dcfcf-settings', array($this, 'zt_dcfcf_settings') ); } function zt_dcfcf_settings() { require_once 'inc/settings.php'; } /** * Display the list table page * */ public function zt_dcfcf_table_list_page() { $fid = empty($_GET['fid']) ? 0 : (int) $_GET['fid']; $ufid = empty($_GET['ufid']) ? 0 : (int) $_GET['ufid']; $trash = empty($_GET['status']) ? '' : $_GET['status']; if ( !empty($fid) && empty($_GET['ufid']) ) { $this->zt_dcf_form_post_id = (int) $_GET['fid']; $ListTable = new ZT_DCFCF_Main_List_Table(); $ListTable->prepare_items(); ?> views(); ?>

zt_dcf_form_post_id )))); ?>



zt_dcf_form_post_id )))); ?>



get_views(); ?>
extra_tablenavs('top'); ?>
display(); ?>
zt_dcf_form_post_id = esc_sql( $fid ) ; $this->zt_dcf_form_id = esc_sql( $ufid ); $this->form_details_page(); } else { $ListTable = new ZT_DCFCF_Main_List_Table(); $ListTable->prepare_items(); ?>

display(); ?>
prefix.'cf_data_center'; $zt_dcs = $ztdb->prefix.'cf_data_center_settings'; if ( is_numeric($this->zt_dcf_form_post_id) && is_numeric($this->zt_dcf_form_id) ) { $results = $ztdb->get_results( "SELECT * FROM $zt_cfdc WHERE zt_dcf_form_post_id = $this->zt_dcf_form_post_id AND zt_dcf_form_id = $this->zt_dcf_form_id LIMIT 1", OBJECT ); } if ( empty($results) ) { wp_die( $message = 'Not valid contact form' ); } ?>
zt_dcf_form_post_id); ?> Back
zt_dcf_form_post_id ); ?>

zt_dcf_form_post_id ))); ?>

zt_dcf_form_post_id ); ?> zt_dcf_form_data ); $countData = count($form_data); $countValue = 0; foreach ($form_data as $key => $data): if ( is_array($data) ) { $key = ucwords( $key ); $arr_str_data = implode(', ',$data); $arr_str_data = esc_html( $arr_str_data ); echo ''; } else { $key = ucwords( $key ); // wpcf7_ztdcfcf_uploads checked in value if exist then condition true for file type. if (preg_match('/wpcf7_'.ZT_DCFCF_PREFIX.'_uploads/', $data)) { //ger href value form ancher tag $fileDatas = new SimpleXMLElement($data); //get file path $filePath = $fileDatas[0]->attributes()['href']; // Getting the original name $originalName = pathinfo(parse_url($filePath)['path'], PATHINFO_FILENAME); //get extension here $ext = pathinfo( parse_url($filePath, PHP_URL_PATH), PATHINFO_EXTENSION ); echo ''; } else { echo ''; } } //date display in last row if(++$countValue === $countData) { echo ''; } endforeach; $zt_dcf_form_id = $results[0]->zt_dcf_form_id; $ztdb->query( "UPDATE $zt_cfdc SET zt_dcf_form_read = 1 WHERE zt_dcf_form_id = $zt_dcf_form_id" ); ?>
'.$key.' '. nl2br($arr_str_data) .'
'.$key.' '.$originalName.'.'.$ext.'
'.$key.' '.nl2br($data).'
Date '. $results[0]->zt_dcf_form_date .'

zt_dcf_form_post_id ); } function zt_dcfcf_change_status() { ob_clean(); global $wpdb; $ztdb = apply_filters( 'zt_dcfcf_database', $wpdb ); $zt_cfdc = $ztdb->prefix.'cf_data_center'; $zt_dcs = $ztdb->prefix.'cf_data_center_settings'; if(isset($_POST['id']) && isset($_POST['status'])) { $cf_id = (int) esc_sql($_POST['id']); $cf_status = esc_sql($_POST['status']); $zt_dcf_form_read = ($cf_status == 1) ? 0 : 1 ; $response = $ztdb->query( "UPDATE $zt_cfdc SET zt_dcf_form_read = '$zt_dcf_form_read' WHERE zt_dcf_form_id = '$cf_id'" ); echo $response; wp_die(); } } function zt_dcfcf_change_bookmark() { ob_clean(); global $wpdb; $ztdb = apply_filters( 'zt_dcfcf_database', $wpdb ); $zt_cfdc = $ztdb->prefix.'cf_data_center'; $zt_dcs = $ztdb->prefix.'cf_data_center_settings'; if(isset($_POST['id']) && isset($_POST['status'])) { $cf_id = (int) esc_sql($_POST['id']); $cf_status = esc_sql($_POST['status']); $zt_dcf_form_bookmark = ($cf_status == 1) ? 0 : 1 ; $response = $ztdb->query( "UPDATE $zt_cfdc SET zt_dcf_form_bookmark = '$zt_dcf_form_bookmark' WHERE zt_dcf_form_id = '$cf_id'" ); echo $response; wp_die(); } } } add_action( 'plugins_loaded' , function() { ZT_DCFCF()->admin->action = new ZT_DCFCF_Admin_Action; } ); }