Version Description
- Code improvements
Download this release
Release Info
Developer | codepeople |
Plugin | Contact Form Email |
Version | 1.2.95 |
Comparing to | |
See all releases |
Code changes from version 1.2.94 to 1.2.95
- README.txt +6 -3
- classes/cp-base-class.inc.php +24 -0
- cp-feedback.php +3 -3
- cp-main-class.inc.php +60 -59
- cp_admin_int_edition.inc.php +1 -1
- form-to-email.php +1 -1
README.txt
CHANGED
@@ -53,7 +53,7 @@ The **Contact Form to Email** is a powerful and easy WordPress plugin to create
|
|
53 |
|
54 |
There are also commercial versions of the Contact Form to Email with other features not listed here that can be get at https://form2email.dwbooster.com/download
|
55 |
|
56 |
-
Commercial version can be converted in a payment form / booking form with integration with mulitple payment gateways: PayPal Standard, PayPal Pro, Stripe, Authorize.net, Skrill, Mollie / iDeal, TargetPay / iDeal, SagePay, RedSys TPV and Sage Payments.
|
57 |
|
58 |
Commercial version also features a ultra-powerful visual form builder, file upload fields, conditional logic, multi-page forms, WooCommerce integration, Mailchimp integration, Clickatell and Twilio SMS integration, iCal attachments, signature fields to sign with the mouse or directly in the touchscreens, etc...
|
59 |
|
@@ -456,6 +456,9 @@ When you click a field already added into the contact form builder area, you can
|
|
456 |
|
457 |
== Changelog ==
|
458 |
|
|
|
|
|
|
|
459 |
= 1.2.94 =
|
460 |
* Update to reports
|
461 |
|
@@ -1042,5 +1045,5 @@ When you click a field already added into the contact form builder area, you can
|
|
1042 |
|
1043 |
== Upgrade Notice ==
|
1044 |
|
1045 |
-
= 1.2.
|
1046 |
-
*
|
53 |
|
54 |
There are also commercial versions of the Contact Form to Email with other features not listed here that can be get at https://form2email.dwbooster.com/download
|
55 |
|
56 |
+
Commercial version can be converted in a payment form / booking form with integration with mulitple payment gateways: PayPal Standard, PayPal Pro, Stripe, Authorize.net, Skrill, Mollie / iDeal, TargetPay / iDeal, SagePay, RedSys TPV and Sage Payments. Payments are SCA ready (Strong Customer Authentication), compatible with the new Payment services (PSD 2) - Directive (EU).
|
57 |
|
58 |
Commercial version also features a ultra-powerful visual form builder, file upload fields, conditional logic, multi-page forms, WooCommerce integration, Mailchimp integration, Clickatell and Twilio SMS integration, iCal attachments, signature fields to sign with the mouse or directly in the touchscreens, etc...
|
59 |
|
456 |
|
457 |
== Changelog ==
|
458 |
|
459 |
+
= 1.2.95 =
|
460 |
+
* Code improvements
|
461 |
+
|
462 |
= 1.2.94 =
|
463 |
* Update to reports
|
464 |
|
1045 |
|
1046 |
== Upgrade Notice ==
|
1047 |
|
1048 |
+
= 1.2.95 =
|
1049 |
+
* Code improvements
|
classes/cp-base-class.inc.php
CHANGED
@@ -37,11 +37,35 @@ class CP_CFTEMAIL_BaseClass {
|
|
37 |
return '';
|
38 |
}
|
39 |
|
|
|
40 |
function is_administrator()
|
41 |
{
|
42 |
return current_user_can('manage_options');
|
43 |
}
|
44 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
function get_site_url($admin = false)
|
46 |
{
|
47 |
$blog = get_current_blog_id();
|
37 |
return '';
|
38 |
}
|
39 |
|
40 |
+
|
41 |
function is_administrator()
|
42 |
{
|
43 |
return current_user_can('manage_options');
|
44 |
}
|
45 |
|
46 |
+
|
47 |
+
function clean_sanitize ( $str )
|
48 |
+
{
|
49 |
+
if (is_array($str))
|
50 |
+
{
|
51 |
+
for ($iv=0; $iv<count($str); $iv++)
|
52 |
+
$str[$iv] = $this->clean_sanitize($str[$iv]);
|
53 |
+
return $str;
|
54 |
+
}
|
55 |
+
else
|
56 |
+
{
|
57 |
+
if ( is_object( $str ) ) {
|
58 |
+
return '';
|
59 |
+
}
|
60 |
+
$str = (string) $str;
|
61 |
+
$filtered = wp_check_invalid_utf8( $str );
|
62 |
+
while ( preg_match( '/%[a-f0-9]{2}/i', $filtered, $match ) )
|
63 |
+
$filtered = str_replace( $match[0], '', $filtered );
|
64 |
+
return trim($filtered);
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
|
69 |
function get_site_url($admin = false)
|
70 |
{
|
71 |
$blog = get_current_blog_id();
|
cp-feedback.php
CHANGED
@@ -23,9 +23,9 @@ function cpcfte_feedback() {
|
|
23 |
$plugin_version = $plugin_data['Version'];
|
24 |
$time = time() - get_option('installed_contact-form-to-email', '');
|
25 |
$data = array(
|
26 |
-
'answer' => (@$_POST["answer"]),
|
27 |
-
'otherplugin' => (@$_POST["opinfo"]),
|
28 |
-
'otherinfo' => (@$_POST["oinfo"]),
|
29 |
'plugin' => ($plugin_data['Name']),
|
30 |
'pluginv' => ($plugin_version),
|
31 |
'wordpress' => (get_bloginfo( 'version' )),
|
23 |
$plugin_version = $plugin_data['Version'];
|
24 |
$time = time() - get_option('installed_contact-form-to-email', '');
|
25 |
$data = array(
|
26 |
+
'answer' => sanitize_textarea_field(@$_POST["answer"]),
|
27 |
+
'otherplugin' => sanitize_textarea_field(@$_POST["opinfo"]),
|
28 |
+
'otherinfo' => sanitize_textarea_field(@$_POST["oinfo"]),
|
29 |
'plugin' => ($plugin_data['Name']),
|
30 |
'pluginv' => ($plugin_version),
|
31 |
'wordpress' => (get_bloginfo( 'version' )),
|
cp-main-class.inc.php
CHANGED
@@ -365,6 +365,7 @@ class CP_ContactFormToEmail extends CP_CFTEMAIL_BaseClass {
|
|
365 |
$preload_params = array();
|
366 |
if ($prefill)
|
367 |
{
|
|
|
368 |
$event_query = "SELECT * FROM ".$wpdb->prefix.$this->table_messages." WHERE id=".intval($prefill);
|
369 |
$event = $wpdb->get_results( $event_query );
|
370 |
if (count($event))
|
@@ -500,7 +501,7 @@ class CP_ContactFormToEmail extends CP_CFTEMAIL_BaseClass {
|
|
500 |
global $wpdb;
|
501 |
if ($this->get_param("cal") || $this->get_param("cal") == '0' || $this->get_param("pwizard") == '1')
|
502 |
{
|
503 |
-
$this->item = $this->get_param("cal");
|
504 |
if (isset($_GET["edit"]) && $_GET["edit"] == '1')
|
505 |
@include_once dirname( __FILE__ ) . '/cp_admin_int_edition.inc.php';
|
506 |
else if ($this->get_param("list") == '1')
|
@@ -514,7 +515,7 @@ class CP_ContactFormToEmail extends CP_CFTEMAIL_BaseClass {
|
|
514 |
else if ($this->get_param("pwizard") == '1')
|
515 |
{
|
516 |
if ($this->get_param("cal"))
|
517 |
-
$this->item = $this->get_param("cal");
|
518 |
@include_once dirname( __FILE__ ) . '/cp-publish-wizzard.inc.php';
|
519 |
}
|
520 |
else
|
@@ -798,7 +799,7 @@ class CP_ContactFormToEmail extends CP_CFTEMAIL_BaseClass {
|
|
798 |
if (isset($_POST["edititem"]) && $_POST["edititem"])
|
799 |
{
|
800 |
$rows_affected = $wpdb->update( $wpdb->prefix.$this->table_messages, array(
|
801 |
-
'notifyto' => (@$_POST[$to.$sequence]?$_POST[$to.$sequence]:''),
|
802 |
'posted_data' => serialize($params),
|
803 |
'data' =>$buffer_A
|
804 |
),
|
@@ -811,7 +812,7 @@ class CP_ContactFormToEmail extends CP_CFTEMAIL_BaseClass {
|
|
811 |
$rows_affected = $wpdb->insert( $wpdb->prefix.$this->table_messages, array( 'formid' => $this->item,
|
812 |
'time' => current_time('mysql'),
|
813 |
'ipaddr' => ($saveipaddr?$this->getRealUserIP():'-'),
|
814 |
-
'notifyto' => (@$_POST[$to.$sequence]?$_POST[$to.$sequence]:''),
|
815 |
'posted_data' => serialize($params),
|
816 |
'data' =>$buffer_A
|
817 |
) );
|
@@ -1032,61 +1033,61 @@ class CP_ContactFormToEmail extends CP_CFTEMAIL_BaseClass {
|
|
1032 |
|
1033 |
$wpdb->update ( $wpdb->prefix.$this->table_items,
|
1034 |
array(
|
1035 |
-
'form_structure' => $_POST['form_structure'],
|
1036 |
-
|
1037 |
-
'fp_from_email' => $_POST['fp_from_email'],
|
1038 |
-
'fp_destination_emails' => $_POST['fp_destination_emails'],
|
1039 |
-
'fp_subject' => $_POST['fp_subject'],
|
1040 |
-
'fp_inc_additional_info' => $_POST['fp_inc_additional_info'],
|
1041 |
-
'fp_return_page' => $_POST['fp_return_page'],
|
1042 |
-
'fp_message' => $_POST['fp_message'],
|
1043 |
-
'fp_emailformat' => $_POST['fp_emailformat'],
|
1044 |
-
|
1045 |
-
'cu_enable_copy_to_user' => $_POST['cu_enable_copy_to_user'],
|
1046 |
-
'cu_user_email_field' => @$_POST['cu_user_email_field'],
|
1047 |
-
'cu_subject' => $_POST['cu_subject'],
|
1048 |
-
'cu_message' => $_POST['cu_message'],
|
1049 |
-
'cu_emailformat' => $_POST['cu_emailformat'],
|
1050 |
-
'fp_emailfrommethod' => $_POST['fp_emailfrommethod'],
|
1051 |
-
|
1052 |
-
'onsubmitaction' => $_POST['onsubmitaction'],
|
1053 |
-
'fp_return_message' => $_POST['fp_return_message'],
|
1054 |
-
'fp_enableemail' => $_POST['fp_enableemail'],
|
1055 |
-
|
1056 |
-
'vs_text_is_required' => $_POST['vs_text_is_required'],
|
1057 |
-
'vs_text_is_email' => $_POST['vs_text_is_email'],
|
1058 |
-
'vs_text_datemmddyyyy' => $_POST['vs_text_datemmddyyyy'],
|
1059 |
-
'vs_text_dateddmmyyyy' => $_POST['vs_text_dateddmmyyyy'],
|
1060 |
-
'vs_text_number' => $_POST['vs_text_number'],
|
1061 |
-
'vs_text_digits' => $_POST['vs_text_digits'],
|
1062 |
-
'vs_text_max' => $_POST['vs_text_max'],
|
1063 |
-
'vs_text_min' => $_POST['vs_text_min'],
|
1064 |
-
'vs_text_page' => $_POST['vs_text_page'],
|
1065 |
-
'vs_text_of' => $_POST['vs_text_of'],
|
1066 |
-
'vs_text_submitbtn' => $_POST['vs_text_submitbtn'],
|
1067 |
-
'vs_text_previousbtn' => $_POST['vs_text_previousbtn'],
|
1068 |
-
'vs_text_nextbtn' => $_POST['vs_text_nextbtn'],
|
1069 |
-
|
1070 |
-
'rep_enable' => $_POST['rep_enable'],
|
1071 |
-
'rep_days' => $_POST['rep_days'],
|
1072 |
-
'rep_hour' => $_POST['rep_hour'],
|
1073 |
-
'rep_emails' => $_POST['rep_emails'],
|
1074 |
-
'rep_subject' => $_POST['rep_subject'],
|
1075 |
-
'rep_emailformat' => $_POST['rep_emailformat'],
|
1076 |
-
'rep_message' => $_POST['rep_message'],
|
1077 |
-
|
1078 |
-
'cv_enable_captcha' => $_POST['cv_enable_captcha'],
|
1079 |
-
'cv_width' => $_POST['cv_width'],
|
1080 |
-
'cv_height' => $_POST['cv_height'],
|
1081 |
-
'cv_chars' => $_POST['cv_chars'],
|
1082 |
-
'cv_font' => $_POST['cv_font'],
|
1083 |
-
'cv_min_font_size' => $_POST['cv_min_font_size'],
|
1084 |
-
'cv_max_font_size' => $_POST['cv_max_font_size'],
|
1085 |
-
'cv_noise' => $_POST['cv_noise'],
|
1086 |
-
'cv_noise_length' => $_POST['cv_noise_length'],
|
1087 |
-
'cv_background' => str_replace('#','',$_POST['cv_background']),
|
1088 |
-
'cv_border' => str_replace('#','',$_POST['cv_border']),
|
1089 |
-
'cv_text_enter_valid_captcha' => $_POST['cv_text_enter_valid_captcha']
|
1090 |
)
|
1091 |
, array( 'id' => $this->item ));
|
1092 |
|
365 |
$preload_params = array();
|
366 |
if ($prefill)
|
367 |
{
|
368 |
+
$prefill = intval($prefill);
|
369 |
$event_query = "SELECT * FROM ".$wpdb->prefix.$this->table_messages." WHERE id=".intval($prefill);
|
370 |
$event = $wpdb->get_results( $event_query );
|
371 |
if (count($event))
|
501 |
global $wpdb;
|
502 |
if ($this->get_param("cal") || $this->get_param("cal") == '0' || $this->get_param("pwizard") == '1')
|
503 |
{
|
504 |
+
$this->item = intval($this->get_param("cal"));
|
505 |
if (isset($_GET["edit"]) && $_GET["edit"] == '1')
|
506 |
@include_once dirname( __FILE__ ) . '/cp_admin_int_edition.inc.php';
|
507 |
else if ($this->get_param("list") == '1')
|
515 |
else if ($this->get_param("pwizard") == '1')
|
516 |
{
|
517 |
if ($this->get_param("cal"))
|
518 |
+
$this->item = intval($this->get_param("cal"));
|
519 |
@include_once dirname( __FILE__ ) . '/cp-publish-wizzard.inc.php';
|
520 |
}
|
521 |
else
|
799 |
if (isset($_POST["edititem"]) && $_POST["edititem"])
|
800 |
{
|
801 |
$rows_affected = $wpdb->update( $wpdb->prefix.$this->table_messages, array(
|
802 |
+
'notifyto' => sanitize_email(@$_POST[$to.$sequence]?$_POST[$to.$sequence]:''),
|
803 |
'posted_data' => serialize($params),
|
804 |
'data' =>$buffer_A
|
805 |
),
|
812 |
$rows_affected = $wpdb->insert( $wpdb->prefix.$this->table_messages, array( 'formid' => $this->item,
|
813 |
'time' => current_time('mysql'),
|
814 |
'ipaddr' => ($saveipaddr?$this->getRealUserIP():'-'),
|
815 |
+
'notifyto' => sanitize_email(@$_POST[$to.$sequence]?$_POST[$to.$sequence]:''),
|
816 |
'posted_data' => serialize($params),
|
817 |
'data' =>$buffer_A
|
818 |
) );
|
1033 |
|
1034 |
$wpdb->update ( $wpdb->prefix.$this->table_items,
|
1035 |
array(
|
1036 |
+
'form_structure' => $this->clean_sanitize($_POST['form_structure']),
|
1037 |
+
|
1038 |
+
'fp_from_email' => sanitize_text_field($_POST['fp_from_email']),
|
1039 |
+
'fp_destination_emails' => sanitize_text_field($_POST['fp_destination_emails']),
|
1040 |
+
'fp_subject' => sanitize_text_field($_POST['fp_subject']),
|
1041 |
+
'fp_inc_additional_info' => sanitize_text_field($_POST['fp_inc_additional_info']),
|
1042 |
+
'fp_return_page' => sanitize_text_field($_POST['fp_return_page']),
|
1043 |
+
'fp_message' => $this->clean_sanitize($_POST['fp_message']),
|
1044 |
+
'fp_emailformat' => sanitize_text_field($_POST['fp_emailformat']),
|
1045 |
+
|
1046 |
+
'cu_enable_copy_to_user' => sanitize_text_field($_POST['cu_enable_copy_to_user']),
|
1047 |
+
'cu_user_email_field' => sanitize_text_field(@$_POST['cu_user_email_field']),
|
1048 |
+
'cu_subject' => sanitize_text_field($_POST['cu_subject']),
|
1049 |
+
'cu_message' => $this->clean_sanitize($_POST['cu_message']),
|
1050 |
+
'cu_emailformat' => sanitize_text_field($_POST['cu_emailformat']),
|
1051 |
+
'fp_emailfrommethod' => sanitize_text_field($_POST['fp_emailfrommethod']),
|
1052 |
+
|
1053 |
+
'onsubmitaction' => sanitize_text_field($_POST['onsubmitaction']),
|
1054 |
+
'fp_return_message' => ($_POST['fp_return_message']),
|
1055 |
+
'fp_enableemail' => sanitize_text_field($_POST['fp_enableemail']),
|
1056 |
+
|
1057 |
+
'vs_text_is_required' => sanitize_text_field($_POST['vs_text_is_required']),
|
1058 |
+
'vs_text_is_email' => sanitize_text_field($_POST['vs_text_is_email']),
|
1059 |
+
'vs_text_datemmddyyyy' => sanitize_text_field($_POST['vs_text_datemmddyyyy']),
|
1060 |
+
'vs_text_dateddmmyyyy' => sanitize_text_field($_POST['vs_text_dateddmmyyyy']),
|
1061 |
+
'vs_text_number' => sanitize_text_field($_POST['vs_text_number']),
|
1062 |
+
'vs_text_digits' => sanitize_text_field($_POST['vs_text_digits']),
|
1063 |
+
'vs_text_max' => sanitize_text_field($_POST['vs_text_max']),
|
1064 |
+
'vs_text_min' => sanitize_text_field($_POST['vs_text_min']),
|
1065 |
+
'vs_text_page' => sanitize_text_field($_POST['vs_text_page']),
|
1066 |
+
'vs_text_of' => sanitize_text_field($_POST['vs_text_of']),
|
1067 |
+
'vs_text_submitbtn' => sanitize_text_field($_POST['vs_text_submitbtn']),
|
1068 |
+
'vs_text_previousbtn' => sanitize_text_field($_POST['vs_text_previousbtn']),
|
1069 |
+
'vs_text_nextbtn' => sanitize_text_field($_POST['vs_text_nextbtn']),
|
1070 |
+
|
1071 |
+
'rep_enable' => sanitize_text_field($_POST['rep_enable']),
|
1072 |
+
'rep_days' => sanitize_text_field($_POST['rep_days']),
|
1073 |
+
'rep_hour' => sanitize_text_field($_POST['rep_hour']),
|
1074 |
+
'rep_emails' => sanitize_text_field($_POST['rep_emails']),
|
1075 |
+
'rep_subject' => sanitize_text_field($_POST['rep_subject']),
|
1076 |
+
'rep_emailformat' => sanitize_text_field($_POST['rep_emailformat']),
|
1077 |
+
'rep_message' => $this->clean_sanitize($_POST['rep_message']),
|
1078 |
+
|
1079 |
+
'cv_enable_captcha' => sanitize_text_field($_POST['cv_enable_captcha']),
|
1080 |
+
'cv_width' => sanitize_text_field($_POST['cv_width']),
|
1081 |
+
'cv_height' => sanitize_text_field($_POST['cv_height']),
|
1082 |
+
'cv_chars' => sanitize_text_field($_POST['cv_chars']),
|
1083 |
+
'cv_font' => sanitize_text_field($_POST['cv_font']),
|
1084 |
+
'cv_min_font_size' => sanitize_text_field($_POST['cv_min_font_size']),
|
1085 |
+
'cv_max_font_size' => sanitize_text_field($_POST['cv_max_font_size']),
|
1086 |
+
'cv_noise' => sanitize_text_field($_POST['cv_noise']),
|
1087 |
+
'cv_noise_length' => sanitize_text_field($_POST['cv_noise_length']),
|
1088 |
+
'cv_background' => sanitize_text_field(str_replace('#','',$_POST['cv_background'])),
|
1089 |
+
'cv_border' => sanitize_text_field(str_replace('#','',$_POST['cv_border'])),
|
1090 |
+
'cv_text_enter_valid_captcha' => sanitize_text_field($_POST['cv_text_enter_valid_captcha'])
|
1091 |
)
|
1092 |
, array( 'id' => $this->item ));
|
1093 |
|
cp_admin_int_edition.inc.php
CHANGED
@@ -85,7 +85,7 @@ jQuery(function(){
|
|
85 |
|
86 |
<form method="post" action="" name="cpformconf">
|
87 |
<input name="<?php echo $cpid; ?>_post_edition" type="hidden" value="1" />
|
88 |
-
<input name="cfwpp_edit" type="hidden" value="<?php echo esc_attr($_GET["item"]); ?>" />
|
89 |
<input name="rsave" type="hidden" value="<?php echo $nonce; ?>" />
|
90 |
<div id="normal-sortables" class="meta-box-sortables">
|
91 |
|
85 |
|
86 |
<form method="post" action="" name="cpformconf">
|
87 |
<input name="<?php echo $cpid; ?>_post_edition" type="hidden" value="1" />
|
88 |
+
<input name="cfwpp_edit" type="hidden" value="<?php echo esc_attr(sanitize_text_field($_GET["item"])); ?>" />
|
89 |
<input name="rsave" type="hidden" value="<?php echo $nonce; ?>" />
|
90 |
<div id="normal-sortables" class="meta-box-sortables">
|
91 |
|
form-to-email.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Contact Form Email
|
4 |
Plugin URI: https://form2email.dwbooster.com/download
|
5 |
Description: Contact form that sends the data to email and also to a database list and CSV file.
|
6 |
-
Version: 1.2.
|
7 |
Author: CodePeople
|
8 |
Author URI: https://form2email.dwbooster.com
|
9 |
Text Domain: contact-form-to-email
|
3 |
Plugin Name: Contact Form Email
|
4 |
Plugin URI: https://form2email.dwbooster.com/download
|
5 |
Description: Contact form that sends the data to email and also to a database list and CSV file.
|
6 |
+
Version: 1.2.95
|
7 |
Author: CodePeople
|
8 |
Author URI: https://form2email.dwbooster.com
|
9 |
Text Domain: contact-form-to-email
|