Contact Form Email - Version 1.2.97

Version Description

  • Compatiblity updates
Download this release

Release Info

Developer codepeople
Plugin Icon 128x128 Contact Form Email
Version 1.2.97
Comparing to
See all releases

Code changes from version 1.2.96 to 1.2.97

README.txt CHANGED
@@ -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.96 =
460
  * Compatible with WordPress 5.3
461
 
@@ -1048,5 +1051,5 @@ When you click a field already added into the contact form builder area, you can
1048
 
1049
  == Upgrade Notice ==
1050
 
1051
- = 1.2.96 =
1052
- * Compatible with WordPress 5.3
456
 
457
  == Changelog ==
458
 
459
+ = 1.2.97 =
460
+ * Compatiblity updates
461
+
462
  = 1.2.96 =
463
  * Compatible with WordPress 5.3
464
 
1051
 
1052
  == Upgrade Notice ==
1053
 
1054
+ = 1.2.97 =
1055
+ * Compatiblity updates
classes/cp-base-class.inc.php CHANGED
@@ -66,6 +66,16 @@ class CP_CFTEMAIL_BaseClass {
66
  }
67
 
68
 
 
 
 
 
 
 
 
 
 
 
69
  function get_site_url($admin = false)
70
  {
71
  $blog = get_current_blog_id();
66
  }
67
 
68
 
69
+ function get_site_url_slash($admin = false)
70
+ {
71
+ $url = $this->get_site_url($admin);
72
+ if (strpos($url,'?') !== false)
73
+ $url .= '&';
74
+ else
75
+ $url .= '/?';
76
+ return $url;
77
+ }
78
+
79
  function get_site_url($admin = false)
80
  {
81
  $blog = get_current_blog_id();
cp-admin-int.inc.php CHANGED
@@ -278,7 +278,7 @@ if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset( $_POST[$this->prefix.'_post_
278
  qs += "&font="+f.cv_font.options[f.cv_font.selectedIndex].value;
279
  qs += "&r="+(randcaptcha++);
280
 
281
- document.getElementById("captchaimg").src= "<?php echo $this->get_site_url(true).'/?'.$this->prefix.'_captcha=captcha&inAdmin=1'; ?>"+qs;
282
  }
283
 
284
  function fte_action_display()
@@ -529,7 +529,7 @@ if ( 'POST' == $_SERVER['REQUEST_METHOD'] && isset( $_POST[$this->prefix.'_post_
529
  <td colspan="2" rowspan="">
530
  Preview:<br />
531
  <br />
532
- <img src="<?php echo $this->get_site_url(true).'/?'.$this->prefix.'_captcha=captcha&inAdmin=1'; ?>" id="captchaimg" alt="security code" border="0" />
533
  </td>
534
  </tr>
535
 
278
  qs += "&font="+f.cv_font.options[f.cv_font.selectedIndex].value;
279
  qs += "&r="+(randcaptcha++);
280
 
281
+ document.getElementById("captchaimg").src= "<?php echo $this->get_site_url_slash(true).$this->prefix.'_captcha=captcha&inAdmin=1'; ?>"+qs;
282
  }
283
 
284
  function fte_action_display()
529
  <td colspan="2" rowspan="">
530
  Preview:<br />
531
  <br />
532
+ <img src="<?php echo $this->get_site_url_slash(true).$this->prefix.'_captcha=captcha&inAdmin=1'; ?>" id="captchaimg" alt="security code" border="0" />
533
  </td>
534
  </tr>
535
 
cp-main-class.inc.php CHANGED
@@ -264,7 +264,7 @@ class CP_ContactFormToEmail extends CP_CFTEMAIL_BaseClass {
264
  document.<?php echo $this->prefix; ?>_pform<?php echo '_'.$this->print_counter; ?>.cp_ref_page.value = document.location;
265
  $dexQuery = jQuery.noConflict();<?php if (!is_admin() && $this->get_option('cv_enable_captcha', CP_CFEMAIL_DEFAULT_cv_enable_captcha) != 'false') { ?>
266
  if (document.<?php echo $this->prefix; ?>_pform<?php echo '_'.$this->print_counter; ?>.hdcaptcha_<?php echo $this->prefix; ?>_post.value == '') { setTimeout( "<?php echo $this->prefix; ?>_cerror<?php echo '_'.$this->print_counter; ?>()", 100); return false; }
267
- var result = $dexQuery.ajax({ type: "GET", url: "<?php echo $this->get_site_url(); ?>/?ps=<?php echo '_'.$this->print_counter; ?>&<?php echo $this->prefix; ?>_pform_process=2&<?php echo $this->prefix; ?>_id=<?php echo $this->item; ?>&inAdmin=1&ps=<?php echo '_'.$this->print_counter; ?>&hdcaptcha_<?php echo $this->prefix; ?>_post="+document.<?php echo $this->prefix; ?>_pform<?php echo '_'.$this->print_counter; ?>.hdcaptcha_<?php echo $this->prefix; ?>_post.value, async: false }).responseText;
268
  if (result.indexOf("captchafailed") != -1) {
269
  $dexQuery("#captchaimg<?php echo '_'.$this->print_counter; ?>").attr('src', $dexQuery("#captchaimg<?php echo '_'.$this->print_counter; ?>").attr('src')+'&'+Math.floor((Math.random() * 99999) + 1));
270
  setTimeout( "<?php echo $this->prefix; ?>_cerror<?php echo '_'.$this->print_counter; ?>()", 100);
264
  document.<?php echo $this->prefix; ?>_pform<?php echo '_'.$this->print_counter; ?>.cp_ref_page.value = document.location;
265
  $dexQuery = jQuery.noConflict();<?php if (!is_admin() && $this->get_option('cv_enable_captcha', CP_CFEMAIL_DEFAULT_cv_enable_captcha) != 'false') { ?>
266
  if (document.<?php echo $this->prefix; ?>_pform<?php echo '_'.$this->print_counter; ?>.hdcaptcha_<?php echo $this->prefix; ?>_post.value == '') { setTimeout( "<?php echo $this->prefix; ?>_cerror<?php echo '_'.$this->print_counter; ?>()", 100); return false; }
267
+ var result = $dexQuery.ajax({ type: "GET", url: "<?php echo $this->get_site_url_slash(); ?>ps=<?php echo '_'.$this->print_counter; ?>&<?php echo $this->prefix; ?>_pform_process=2&<?php echo $this->prefix; ?>_id=<?php echo $this->item; ?>&inAdmin=1&ps=<?php echo '_'.$this->print_counter; ?>&hdcaptcha_<?php echo $this->prefix; ?>_post="+document.<?php echo $this->prefix; ?>_pform<?php echo '_'.$this->print_counter; ?>.hdcaptcha_<?php echo $this->prefix; ?>_post.value, async: false }).responseText;
268
  if (result.indexOf("captchafailed") != -1) {
269
  $dexQuery("#captchaimg<?php echo '_'.$this->print_counter; ?>").attr('src', $dexQuery("#captchaimg<?php echo '_'.$this->print_counter; ?>").attr('src')+'&'+Math.floor((Math.random() * 99999) + 1));
270
  setTimeout( "<?php echo $this->prefix; ?>_cerror<?php echo '_'.$this->print_counter; ?>()", 100);
cp-public-int.inc.php CHANGED
@@ -23,7 +23,7 @@
23
  <div id="cpcaptchalayer<?php echo '_'.$this->print_counter; ?>" class="cpcaptchalayer">
24
  <?php if (!is_admin() && $this->get_option('cv_enable_captcha', CP_CFEMAIL_DEFAULT_cv_enable_captcha) != 'false') { ?>
25
  <?php _e("Security Code",'contact-form-to-email'); ?>:<br />
26
- <img src="<?php echo $this->get_site_url().'/?'.$this->prefix.'_captcha=captcha&ps=_'.$this->print_counter.'&inAdmin=1&width='.$this->get_option('cv_width', CP_CFEMAIL_DEFAULT_cv_width).'&height='.$this->get_option('cv_height', CP_CFEMAIL_DEFAULT_cv_height).'&letter_count='.$this->get_option('cv_chars', CP_CFEMAIL_DEFAULT_cv_chars).'&min_size='.$this->get_option('cv_min_font_size', CP_CFEMAIL_DEFAULT_cv_min_font_size).'&max_size='.$this->get_option('cv_max_font_size', CP_CFEMAIL_DEFAULT_cv_max_font_size).'&noise='.$this->get_option('cv_noise', CP_CFEMAIL_DEFAULT_cv_noise).'&noiselength='.$this->get_option('cv_noise_length', CP_CFEMAIL_DEFAULT_cv_noise_length).'&bcolor='.$this->get_option('cv_background', CP_CFEMAIL_DEFAULT_cv_background).'&border='.$this->get_option('cv_border', CP_CFEMAIL_DEFAULT_cv_border).'&font='.$this->get_option('cv_font', CP_CFEMAIL_DEFAULT_cv_font); ?>" id="captchaimg<?php echo '_'.$this->print_counter; ?>" alt="security code" border="0" class="skip-lazy" />
27
  <br /><?php _e("Please enter the security code",'contact-form-to-email'); ?>:<br />
28
  <div class="dfield"><input type="text" size="20" name="hdcaptcha_<?php echo $this->prefix; ?>_post" id="hdcaptcha_<?php echo $this->prefix; ?>_post<?php echo '_'.$this->print_counter; ?>" value="" />
29
  <div class="cpefb_error message" id="hdcaptcha_error<?php echo '_'.$this->print_counter; ?>" generated="true" style="display:none;position: absolute; left: 0px; top: 25px;"><?php echo esc_attr(__($this->get_option('cv_text_enter_valid_captcha', CP_CFEMAIL_DEFAULT_cv_text_enter_valid_captcha),'contact-form-to-email')); ?></div>
@@ -31,4 +31,12 @@
31
  <?php } ?>
32
  </div>
33
  <div id="cp_subbtn<?php echo '_'.$this->print_counter; ?>" class="cp_subbtn"><?php _e($button_label); ?></div>
34
- </form>
 
 
 
 
 
 
 
 
23
  <div id="cpcaptchalayer<?php echo '_'.$this->print_counter; ?>" class="cpcaptchalayer">
24
  <?php if (!is_admin() && $this->get_option('cv_enable_captcha', CP_CFEMAIL_DEFAULT_cv_enable_captcha) != 'false') { ?>
25
  <?php _e("Security Code",'contact-form-to-email'); ?>:<br />
26
+ <img src="<?php echo $this->get_site_url_slash().$this->prefix.'_captcha=captcha&ps=_'.$this->print_counter.'&inAdmin=1&width='.$this->get_option('cv_width', CP_CFEMAIL_DEFAULT_cv_width).'&height='.$this->get_option('cv_height', CP_CFEMAIL_DEFAULT_cv_height).'&letter_count='.$this->get_option('cv_chars', CP_CFEMAIL_DEFAULT_cv_chars).'&min_size='.$this->get_option('cv_min_font_size', CP_CFEMAIL_DEFAULT_cv_min_font_size).'&max_size='.$this->get_option('cv_max_font_size', CP_CFEMAIL_DEFAULT_cv_max_font_size).'&noise='.$this->get_option('cv_noise', CP_CFEMAIL_DEFAULT_cv_noise).'&noiselength='.$this->get_option('cv_noise_length', CP_CFEMAIL_DEFAULT_cv_noise_length).'&bcolor='.$this->get_option('cv_background', CP_CFEMAIL_DEFAULT_cv_background).'&border='.$this->get_option('cv_border', CP_CFEMAIL_DEFAULT_cv_border).'&font='.$this->get_option('cv_font', CP_CFEMAIL_DEFAULT_cv_font); ?>" id="captchaimg<?php echo '_'.$this->print_counter; ?>" alt="security code" border="0" class="skip-lazy" />
27
  <br /><?php _e("Please enter the security code",'contact-form-to-email'); ?>:<br />
28
  <div class="dfield"><input type="text" size="20" name="hdcaptcha_<?php echo $this->prefix; ?>_post" id="hdcaptcha_<?php echo $this->prefix; ?>_post<?php echo '_'.$this->print_counter; ?>" value="" />
29
  <div class="cpefb_error message" id="hdcaptcha_error<?php echo '_'.$this->print_counter; ?>" generated="true" style="display:none;position: absolute; left: 0px; top: 25px;"><?php echo esc_attr(__($this->get_option('cv_text_enter_valid_captcha', CP_CFEMAIL_DEFAULT_cv_text_enter_valid_captcha),'contact-form-to-email')); ?></div>
31
  <?php } ?>
32
  </div>
33
  <div id="cp_subbtn<?php echo '_'.$this->print_counter; ?>" class="cp_subbtn"><?php _e($button_label); ?></div>
34
+ </form>
35
+ <?php if (defined('APBCT_NAME')) { ?>
36
+ <script>
37
+ setInterval('cfte<?php echo '_'.$this->print_counter; ?>()',2000);
38
+ function cfte<?php echo '_'.$this->print_counter; ?>() {
39
+ document.<?php echo $this->prefix; ?>_pform<?php echo '_'.$this->print_counter; ?>.onsubmit = function(){ return <?php echo $this->prefix; ?>_pform_doValidate<?php echo '_'.$this->print_counter; ?>(this);};
40
+ }
41
+ </script>
42
+ <?php } ?>
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.96
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.97
7
  Author: CodePeople
8
  Author URI: https://form2email.dwbooster.com
9
  Text Domain: contact-form-to-email