Version Description
input sanitization
Download this release
Release Info
Developer | arshidkv12 |
Plugin | Contact Form 7 Database Addon – CFDB7 |
Version | 1.2.5.4 |
Comparing to | |
See all releases |
Code changes from version 1.2.5.3 to 1.2.5.4
- contact-form-cfdb-7.php +1 -1
- css/admin-style.css +13 -2
- inc/add-ons.php +6 -2
- inc/admin-form-details.php +2 -2
- inc/admin-mainpage.php +1 -1
- inc/admin-subpage.php +12 -10
- inc/export-csv.php +5 -2
- readme.txt +9 -20
contact-form-cfdb-7.php
CHANGED
@@ -7,7 +7,7 @@ Author: Arshid
|
|
7 |
Author URI: http://ciphercoin.com/
|
8 |
Text Domain: contact-form-cfdb7
|
9 |
Domain Path: /languages/
|
10 |
-
Version: 1.2.5.
|
11 |
*/
|
12 |
|
13 |
function cfdb7_create_table(){
|
7 |
Author URI: http://ciphercoin.com/
|
8 |
Text Domain: contact-form-cfdb7
|
9 |
Domain Path: /languages/
|
10 |
+
Version: 1.2.5.4
|
11 |
*/
|
12 |
|
13 |
function cfdb7_create_table(){
|
css/admin-style.css
CHANGED
@@ -1,14 +1,25 @@
|
|
1 |
.cfdb7 .extension {
|
2 |
-
width:
|
3 |
border: 1px #888 solid;
|
4 |
padding: 7px;
|
5 |
margin: 5px;
|
6 |
float: left;
|
7 |
text-align: center;
|
|
|
8 |
}
|
9 |
.cfdb7 h3{
|
10 |
text-align: center;
|
11 |
}
|
12 |
.cfdb7 .button{
|
13 |
text-align: center;
|
14 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
.cfdb7 .extension {
|
2 |
+
width: 29.7%;
|
3 |
border: 1px #888 solid;
|
4 |
padding: 7px;
|
5 |
margin: 5px;
|
6 |
float: left;
|
7 |
text-align: center;
|
8 |
+
min-height: 330px;
|
9 |
}
|
10 |
.cfdb7 h3{
|
11 |
text-align: center;
|
12 |
}
|
13 |
.cfdb7 .button{
|
14 |
text-align: center;
|
15 |
+
}
|
16 |
+
|
17 |
+
|
18 |
+
|
19 |
+
@media (max-width: 767.98px) {
|
20 |
+
.cfdb7 .extension{
|
21 |
+
width:93%;
|
22 |
+
}
|
23 |
+
}
|
24 |
+
|
25 |
+
|
inc/add-ons.php
CHANGED
@@ -33,7 +33,11 @@ function cfdb7_add_ons_get_feed(){
|
|
33 |
$cache = get_transient( 'cfdb7_add_ons_feed' );
|
34 |
if ( false === $cache ) {
|
35 |
$url = 'https://ciphercoin.com/cfdb7/?feed=true';
|
36 |
-
$feed = wp_remote_get( esc_url_raw( $url ), array(
|
|
|
|
|
|
|
|
|
37 |
if ( ! is_wp_error( $feed ) ) {
|
38 |
if ( isset( $feed['body'] ) && strlen( $feed['body'] ) > 0 ) {
|
39 |
$cache = wp_remote_retrieve_body( $feed );
|
@@ -45,4 +49,4 @@ function cfdb7_add_ons_get_feed(){
|
|
45 |
}
|
46 |
return $cache;
|
47 |
}
|
48 |
-
//delete_transient('cfdb7_add_ons_feed');
|
33 |
$cache = get_transient( 'cfdb7_add_ons_feed' );
|
34 |
if ( false === $cache ) {
|
35 |
$url = 'https://ciphercoin.com/cfdb7/?feed=true';
|
36 |
+
$feed = wp_remote_get( esc_url_raw( $url ), array(
|
37 |
+
'sslverify' => false,
|
38 |
+
'timeout' => 30,
|
39 |
+
) );
|
40 |
+
|
41 |
if ( ! is_wp_error( $feed ) ) {
|
42 |
if ( isset( $feed['body'] ) && strlen( $feed['body'] ) > 0 ) {
|
43 |
$cache = wp_remote_retrieve_body( $feed );
|
49 |
}
|
50 |
return $cache;
|
51 |
}
|
52 |
+
// delete_transient('cfdb7_add_ons_feed');
|
inc/admin-form-details.php
CHANGED
@@ -14,7 +14,7 @@ class CFdb7_Form_Details
|
|
14 |
public function __construct()
|
15 |
{
|
16 |
$this->form_post_id = esc_sql( $_GET['fid'] );
|
17 |
-
$this->form_id
|
18 |
|
19 |
$this->form_details_page();
|
20 |
}
|
@@ -93,7 +93,7 @@ class CFdb7_Form_Details
|
|
93 |
$form_id = $results[0]->form_id;
|
94 |
|
95 |
$cfdb->query( "UPDATE $table_name SET form_value =
|
96 |
-
'$form_data' WHERE form_id = $form_id"
|
97 |
);
|
98 |
?>
|
99 |
</div>
|
14 |
public function __construct()
|
15 |
{
|
16 |
$this->form_post_id = esc_sql( $_GET['fid'] );
|
17 |
+
$this->form_id = esc_sql( $_GET['ufid'] );
|
18 |
|
19 |
$this->form_details_page();
|
20 |
}
|
93 |
$form_id = $results[0]->form_id;
|
94 |
|
95 |
$cfdb->query( "UPDATE $table_name SET form_value =
|
96 |
+
'$form_data' WHERE form_id = '$form_id' LIMIT 1"
|
97 |
);
|
98 |
?>
|
99 |
</div>
|
inc/admin-mainpage.php
CHANGED
@@ -31,7 +31,7 @@ class Cfdb7_Wp_Main_Page
|
|
31 |
|
32 |
add_menu_page( __( 'Contact Forms', 'contact-form-cfdb7' ), __( 'Contact Forms', 'contact-form-cfdb7' ), $cfdb7_cap, 'cfdb7-list.php', array($this, 'list_table_page'), 'dashicons-list-view' );
|
33 |
|
34 |
-
|
35 |
|
36 |
}
|
37 |
/**
|
31 |
|
32 |
add_menu_page( __( 'Contact Forms', 'contact-form-cfdb7' ), __( 'Contact Forms', 'contact-form-cfdb7' ), $cfdb7_cap, 'cfdb7-list.php', array($this, 'list_table_page'), 'dashicons-list-view' );
|
33 |
|
34 |
+
require_once 'add-ons.php';
|
35 |
|
36 |
}
|
37 |
/**
|
inc/admin-subpage.php
CHANGED
@@ -12,7 +12,6 @@ if (!defined( 'ABSPATH')) exit;
|
|
12 |
class Cfdb7_Wp_Sub_Page
|
13 |
{
|
14 |
private $form_post_id;
|
15 |
-
private $search;
|
16 |
|
17 |
/**
|
18 |
* Constructor start subpage
|
@@ -79,8 +78,7 @@ class CFDB7_List_Table extends WP_List_Table
|
|
79 |
{
|
80 |
|
81 |
$this->form_post_id = (int) $_GET['fid'];
|
82 |
-
$search = empty( $_REQUEST['s'] ) ? false : esc_sql( $
|
83 |
-
echo $this->search;
|
84 |
$form_post_id = $this->form_post_id;
|
85 |
|
86 |
global $wpdb;
|
@@ -212,7 +210,7 @@ class CFDB7_List_Table extends WP_List_Table
|
|
212 |
$data = array();
|
213 |
global $wpdb;
|
214 |
$cfdb = apply_filters( 'cfdb7_database', $wpdb );
|
215 |
-
$search = empty( $_REQUEST['s'] ) ? false : esc_sql( $
|
216 |
$table_name = $cfdb->prefix.'db7_forms';
|
217 |
$page = $this->get_pagenum();
|
218 |
$page = $page - 1;
|
@@ -308,8 +306,9 @@ class CFDB7_List_Table extends WP_List_Table
|
|
308 |
$form_ids = esc_sql( $_POST['contact_form'] );
|
309 |
|
310 |
foreach ($form_ids as $form_id):
|
311 |
-
|
312 |
-
$
|
|
|
313 |
$result_value = $results[0]->form_value;
|
314 |
$result_values = unserialize($result_value);
|
315 |
$upload_dir = wp_upload_dir();
|
@@ -335,8 +334,9 @@ class CFDB7_List_Table extends WP_List_Table
|
|
335 |
}else if( 'read' === $action ){
|
336 |
|
337 |
$form_ids = esc_sql( $_POST['contact_form'] );
|
|
|
338 |
foreach ($form_ids as $form_id):
|
339 |
-
|
340 |
$results = $cfdb->get_results( "SELECT * FROM $table_name WHERE form_id = '$form_id' LIMIT 1", OBJECT );
|
341 |
$result_value = $results[0]->form_value;
|
342 |
$result_values = unserialize( $result_value );
|
@@ -352,7 +352,8 @@ class CFDB7_List_Table extends WP_List_Table
|
|
352 |
|
353 |
$form_ids = esc_sql( $_POST['contact_form'] );
|
354 |
foreach ($form_ids as $form_id):
|
355 |
-
|
|
|
356 |
$results = $cfdb->get_results( "SELECT * FROM $table_name WHERE form_id = '$form_id' LIMIT 1", OBJECT );
|
357 |
$result_value = $results[0]->form_value;
|
358 |
$result_values = unserialize( $result_value );
|
@@ -458,9 +459,10 @@ class CFDB7_List_Table extends WP_List_Table
|
|
458 |
submit_button( __( 'Apply', 'contact-form-cfdb7' ), 'action', '', false, array( 'id' => "doaction$two" ) );
|
459 |
echo "\n";
|
460 |
$nonce = wp_create_nonce( 'dnonce' );
|
461 |
-
|
|
|
462 |
_e( 'Export CSV', 'contact-form-cfdb7' );
|
463 |
echo '</a>';
|
464 |
do_action('cfdb7_after_export_button');
|
465 |
}
|
466 |
-
}
|
12 |
class Cfdb7_Wp_Sub_Page
|
13 |
{
|
14 |
private $form_post_id;
|
|
|
15 |
|
16 |
/**
|
17 |
* Constructor start subpage
|
78 |
{
|
79 |
|
80 |
$this->form_post_id = (int) $_GET['fid'];
|
81 |
+
$search = empty( $_REQUEST['s'] ) ? false : esc_sql( $_REQUEST['s'] );
|
|
|
82 |
$form_post_id = $this->form_post_id;
|
83 |
|
84 |
global $wpdb;
|
210 |
$data = array();
|
211 |
global $wpdb;
|
212 |
$cfdb = apply_filters( 'cfdb7_database', $wpdb );
|
213 |
+
$search = empty( $_REQUEST['s'] ) ? false : esc_sql( $_REQUEST['s'] );
|
214 |
$table_name = $cfdb->prefix.'db7_forms';
|
215 |
$page = $this->get_pagenum();
|
216 |
$page = $page - 1;
|
306 |
$form_ids = esc_sql( $_POST['contact_form'] );
|
307 |
|
308 |
foreach ($form_ids as $form_id):
|
309 |
+
|
310 |
+
$form_id = (int) $form_id;
|
311 |
+
$results = $cfdb->get_results( "SELECT * FROM $table_name WHERE form_id = '$form_id' LIMIT 1", OBJECT );
|
312 |
$result_value = $results[0]->form_value;
|
313 |
$result_values = unserialize($result_value);
|
314 |
$upload_dir = wp_upload_dir();
|
334 |
}else if( 'read' === $action ){
|
335 |
|
336 |
$form_ids = esc_sql( $_POST['contact_form'] );
|
337 |
+
|
338 |
foreach ($form_ids as $form_id):
|
339 |
+
|
340 |
$results = $cfdb->get_results( "SELECT * FROM $table_name WHERE form_id = '$form_id' LIMIT 1", OBJECT );
|
341 |
$result_value = $results[0]->form_value;
|
342 |
$result_values = unserialize( $result_value );
|
352 |
|
353 |
$form_ids = esc_sql( $_POST['contact_form'] );
|
354 |
foreach ($form_ids as $form_id):
|
355 |
+
|
356 |
+
$form_id = (int) $form_id;
|
357 |
$results = $cfdb->get_results( "SELECT * FROM $table_name WHERE form_id = '$form_id' LIMIT 1", OBJECT );
|
358 |
$result_value = $results[0]->form_value;
|
359 |
$result_values = unserialize( $result_value );
|
459 |
submit_button( __( 'Apply', 'contact-form-cfdb7' ), 'action', '', false, array( 'id' => "doaction$two" ) );
|
460 |
echo "\n";
|
461 |
$nonce = wp_create_nonce( 'dnonce' );
|
462 |
+
|
463 |
+
echo "<a href='".esc_html($_SERVER['REQUEST_URI'])."&csv=true&nonce=".$nonce."' style='float:right; margin:0;' class='button'>";
|
464 |
_e( 'Export CSV', 'contact-form-cfdb7' );
|
465 |
echo '</a>';
|
466 |
do_action('cfdb7_after_export_button');
|
467 |
}
|
468 |
+
}
|
inc/export-csv.php
CHANGED
@@ -18,14 +18,17 @@ class Export_CSV{
|
|
18 |
header("Expires: Tue, 03 Jul 2001 06:00:00 GMT");
|
19 |
header("Cache-Control: max-age=0, no-cache, must-revalidate, proxy-revalidate");
|
20 |
header("Last-Modified: {$now} GMT");
|
21 |
-
|
22 |
// force download
|
|
|
|
|
|
|
23 |
header("Content-Type: application/force-download");
|
24 |
header("Content-Type: application/octet-stream");
|
25 |
header("Content-Type: application/download");
|
26 |
|
27 |
// disposition / encoding on response body
|
28 |
-
|
29 |
header("Content-Transfer-Encoding: binary");
|
30 |
|
31 |
}
|
18 |
header("Expires: Tue, 03 Jul 2001 06:00:00 GMT");
|
19 |
header("Cache-Control: max-age=0, no-cache, must-revalidate, proxy-revalidate");
|
20 |
header("Last-Modified: {$now} GMT");
|
21 |
+
|
22 |
// force download
|
23 |
+
header("Content-Description: File Transfer");
|
24 |
+
header("Content-Encoding: UTF-8");
|
25 |
+
header("Content-Type: text/csv; charset=UTF-8");
|
26 |
header("Content-Type: application/force-download");
|
27 |
header("Content-Type: application/octet-stream");
|
28 |
header("Content-Type: application/download");
|
29 |
|
30 |
// disposition / encoding on response body
|
31 |
+
header("Content-Disposition: attachment;filename={$filename}");
|
32 |
header("Content-Transfer-Encoding: binary");
|
33 |
|
34 |
}
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=H5F3Z6S3
|
|
4 |
Tags: cf7, contact form 7, contact form 7 db, contact form db, contact form seven, contact form storage, export contact form, save contact form, wpcf7
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 5.6
|
7 |
-
Stable tag: 1.2.5.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
Requires PHP: 5.6
|
@@ -15,7 +15,10 @@ Save and manage Contact Form 7 messages. Never lose important data. It is lightw
|
|
15 |
== Description ==
|
16 |
|
17 |
The "CFDB7" plugin saves contact form 7 submissions to your WordPress database. Export the data to a CSV file.
|
18 |
-
By simply installing the plugin, it will automatically begin to capture form submissions from contact form 7.
|
|
|
|
|
|
|
19 |
|
20 |
= Features of CFDB 7 =
|
21 |
|
@@ -25,7 +28,7 @@ By simply installing the plugin, it will automatically begin to capture form sub
|
|
25 |
* Easy to use and lightweight plugin
|
26 |
* Developer friendly & easy to customize
|
27 |
* Display all created contact form 7 form list.
|
28 |
-
* Export CF7 DB (CF7 Database) data in CSV file
|
29 |
|
30 |
= Pro Addons =
|
31 |
* [CFDB7 DB Switcher](https://ciphercoin.com/downloads/cfdb7-database-switcher/)
|
@@ -57,6 +60,9 @@ Extensions : [Contact form 7 more Add-ons](https://ciphercoin.com/contact-form-7
|
|
57 |
|
58 |
== Changelog ==
|
59 |
|
|
|
|
|
|
|
60 |
= 1.2.5.3 =
|
61 |
Add index.php in cfdb7_uploads
|
62 |
|
@@ -70,23 +76,6 @@ UTF-8 CSV Export Fixed
|
|
70 |
= 1.2.4.10 =
|
71 |
Solved upload file issue
|
72 |
|
73 |
-
= 1.2.4.8 =
|
74 |
-
Removed unwanted data
|
75 |
-
Removed data with key underscore (_)
|
76 |
-
add_filter cfdb7_remove_underscore_data
|
77 |
-
|
78 |
-
= 1.2.4.7 =
|
79 |
-
Action hook name changed to cfdb7_before_save
|
80 |
-
|
81 |
-
= 1.2.4.6 =
|
82 |
-
Optimized csv export memory usage
|
83 |
-
|
84 |
-
= 1.2.4.3 =
|
85 |
-
Responsive issue fixed
|
86 |
-
|
87 |
-
= 1.2.4 =
|
88 |
-
Fixed admin notification bug
|
89 |
-
|
90 |
|
91 |
= 1.0.0 =
|
92 |
First version of plugin.
|
4 |
Tags: cf7, contact form 7, contact form 7 db, contact form db, contact form seven, contact form storage, export contact form, save contact form, wpcf7
|
5 |
Requires at least: 4.8
|
6 |
Tested up to: 5.6
|
7 |
+
Stable tag: 1.2.5.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
Requires PHP: 5.6
|
15 |
== Description ==
|
16 |
|
17 |
The "CFDB7" plugin saves contact form 7 submissions to your WordPress database. Export the data to a CSV file.
|
18 |
+
By simply installing the plugin, it will automatically begin to capture form submissions from contact form 7.
|
19 |
+
|
20 |
+
[CFDB7 vs flamingo](https://wpdebuglog.com/forums/topic/cfdb7-vs-flamingo/)
|
21 |
+
|
22 |
|
23 |
= Features of CFDB 7 =
|
24 |
|
28 |
* Easy to use and lightweight plugin
|
29 |
* Developer friendly & easy to customize
|
30 |
* Display all created contact form 7 form list.
|
31 |
+
* Export CF7 DB (CF7 Database - cf7db) data in CSV file
|
32 |
|
33 |
= Pro Addons =
|
34 |
* [CFDB7 DB Switcher](https://ciphercoin.com/downloads/cfdb7-database-switcher/)
|
60 |
|
61 |
== Changelog ==
|
62 |
|
63 |
+
= 1.2.5.4 =
|
64 |
+
input sanitization
|
65 |
+
|
66 |
= 1.2.5.3 =
|
67 |
Add index.php in cfdb7_uploads
|
68 |
|
76 |
= 1.2.4.10 =
|
77 |
Solved upload file issue
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
= 1.0.0 =
|
81 |
First version of plugin.
|