Contact Form Email - Version 1.2.94

Version Description

  • Update to reports
Download this release

Release Info

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

Code changes from version 1.2.93 to 1.2.94

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.93 =
460
  * Fix to database encoding
461
 
@@ -1039,5 +1042,5 @@ When you click a field already added into the contact form builder area, you can
1039
 
1040
  == Upgrade Notice ==
1041
 
1042
- = 1.2.93 =
1043
- * Fix to database encoding
456
 
457
  == Changelog ==
458
 
459
+ = 1.2.94 =
460
+ * Update to reports
461
+
462
  = 1.2.93 =
463
  * Fix to database encoding
464
 
1042
 
1043
  == Upgrade Notice ==
1044
 
1045
+ = 1.2.94 =
1046
+ * Update to reports
cp-admin-int-list.inc.php CHANGED
@@ -253,7 +253,9 @@ $nonce = wp_create_nonce( 'cfte_update_actions_plist' );
253
  <td>
254
  <input style="margin-bottom:3px" class="button" type="button" name="calupdate_<?php echo $item->id; ?>" value="Rename" onclick="cp_updateItem(<?php echo $item->id; ?>);" />
255
  <input style="margin-bottom:3px" class="button-primary button" type="button" name="calmanage_<?php echo $item->id; ?>" value="Edit &amp; Settings" onclick="cp_manageSettings(<?php echo $item->id; ?>);" />
 
256
  <input style="margin-bottom:3px" class="button-primary button" type="button" name="calpublish_<?php echo $item->id; ?>" value="<?php _e('Publish','cpappb'); ?>" onclick="cp_publish(<?php echo $item->id; ?>);" />
 
257
  <input style="margin-bottom:3px" class="button" type="button" name="calmessages_<?php echo $item->id; ?>" value="Messages" onclick="cp_viewMessages(<?php echo $item->id; ?>);" />
258
  <input style="margin-bottom:5px;" class="button" type="button" name="caladdbk_<?php echo $item->id; ?>" value="<?php _e('Add Message','appointment-hour-booking'); ?>" onclick="cp_addbk(<?php echo $item->id; ?>);" />
259
  <input style="margin-bottom:3px" class="button" type="button" name="calreport_<?php echo $item->id; ?>" value="Stats" onclick="cp_viewReport(<?php echo $item->id; ?>);" />
253
  <td>
254
  <input style="margin-bottom:3px" class="button" type="button" name="calupdate_<?php echo $item->id; ?>" value="Rename" onclick="cp_updateItem(<?php echo $item->id; ?>);" />
255
  <input style="margin-bottom:3px" class="button-primary button" type="button" name="calmanage_<?php echo $item->id; ?>" value="Edit &amp; Settings" onclick="cp_manageSettings(<?php echo $item->id; ?>);" />
256
+ <?php if (current_user_can('manage_options')) { ?>
257
  <input style="margin-bottom:3px" class="button-primary button" type="button" name="calpublish_<?php echo $item->id; ?>" value="<?php _e('Publish','cpappb'); ?>" onclick="cp_publish(<?php echo $item->id; ?>);" />
258
+ <?php } ?>
259
  <input style="margin-bottom:3px" class="button" type="button" name="calmessages_<?php echo $item->id; ?>" value="Messages" onclick="cp_viewMessages(<?php echo $item->id; ?>);" />
260
  <input style="margin-bottom:5px;" class="button" type="button" name="caladdbk_<?php echo $item->id; ?>" value="<?php _e('Add Message','appointment-hour-booking'); ?>" onclick="cp_addbk(<?php echo $item->id; ?>);" />
261
  <input style="margin-bottom:3px" class="button" type="button" name="calreport_<?php echo $item->id; ?>" value="Stats" onclick="cp_viewReport(<?php echo $item->id; ?>);" />
cp-admin-int-report.inc.php CHANGED
@@ -20,13 +20,13 @@ $cond = '';
20
  if ($_GET["search"] != '') $cond .= " AND (data like '%".esc_sql($_GET["search"])."%' OR posted_data LIKE '%".esc_sql($_GET["search"])."%')";
21
  if ($_GET["dfrom"] != '')
22
  {
23
- $cond .= " AND (`time` >= '".esc_sql($_GET["dfrom"])."')";
24
- $date_start = strip_tags($_GET["dfrom"]);
25
  }
26
  if ($_GET["dto"] != '')
27
  {
28
- $cond .= " AND (`time` <= '".esc_sql($_GET["dto"])." 23:59:59')";
29
- $date_end = strip_tags($_GET["dto"]);
30
  }
31
  if (isset($_GET["field"])) $_GET["field"] = strip_tags($_GET["field"]);
32
  if ($this->item != 0) $cond .= " AND formid=".intval($this->item);
@@ -91,7 +91,7 @@ else
91
 
92
  ?>
93
 
94
- <h1><?php echo $this->plugin_name; ?> Stats - <?php echo $this->get_option("form_name",""); ?></h1>
95
 
96
 
97
 
@@ -135,7 +135,7 @@ else
135
  <div class="canvas" id="cardiocontainer1" style="margin-left:10px;position:relative;">
136
  <canvas id="cardio1" width="300" height="200" questions='[{"color":"#008ec2","values":[<?php echo $daily_messages; ?>]}]'></canvas>
137
  </div>
138
- <div style="padding-right:5px;padding-left:5px;color:#888888;">* <?php _e('Submissions per day in the selected date range.','cpappb'); ?><br />&nbsp;&nbsp; <?php _e('Days from','cpappb'); ?> <?php echo $date_start; ?> to <?php echo $date_end; ?>.</div>
139
  <div class="clear"></div>
140
  </div>
141
  </div>
@@ -203,7 +203,7 @@ else
203
  ?>
204
  </div>
205
 
206
- <div style="padding-right:5px;padding-left:5px;margin-bottom:20px;color:#888888;">&nbsp;&nbsp;* <?php _e('Number of times that appears each value. Percent in relation to the total of submissions.','cpappb'); ?><br />&nbsp;&nbsp;&nbsp;&nbsp; <?php _e('Date range from','cpappb'); ?> <?php echo $date_start; ?> <?php _e('to','cpappb'); ?> <?php echo $date_end; ?>.</div>
207
  </div>
208
 
209
  <div style="clear:both"></div>
20
  if ($_GET["search"] != '') $cond .= " AND (data like '%".esc_sql($_GET["search"])."%' OR posted_data LIKE '%".esc_sql($_GET["search"])."%')";
21
  if ($_GET["dfrom"] != '')
22
  {
23
+ $date_start = sanitize_text_field($_GET["dfrom"]);
24
+ $cond .= " AND (`time` >= '".esc_sql($date_start)."')";
25
  }
26
  if ($_GET["dto"] != '')
27
  {
28
+ $date_end = sanitize_text_field($_GET["dto"]);
29
+ $cond .= " AND (`time` <= '".esc_sql($date_end)." 23:59:59')";
30
  }
31
  if (isset($_GET["field"])) $_GET["field"] = strip_tags($_GET["field"]);
32
  if ($this->item != 0) $cond .= " AND formid=".intval($this->item);
91
 
92
  ?>
93
 
94
+ <h1><?php echo $this->plugin_name; ?> Stats - <?php echo esc_html($this->get_option("form_name","")); ?></h1>
95
 
96
 
97
 
135
  <div class="canvas" id="cardiocontainer1" style="margin-left:10px;position:relative;">
136
  <canvas id="cardio1" width="300" height="200" questions='[{"color":"#008ec2","values":[<?php echo $daily_messages; ?>]}]'></canvas>
137
  </div>
138
+ <div style="padding-right:5px;padding-left:5px;color:#888888;">* <?php _e('Submissions per day in the selected date range.','cpappb'); ?><br />&nbsp;&nbsp; <?php _e('Days from','cpappb'); ?> <?php echo esc_html($date_start); ?> to <?php echo esc_html($date_end); ?>.</div>
139
  <div class="clear"></div>
140
  </div>
141
  </div>
203
  ?>
204
  </div>
205
 
206
+ <div style="padding-right:5px;padding-left:5px;margin-bottom:20px;color:#888888;">&nbsp;&nbsp;* <?php _e('Number of times that appears each value. Percent in relation to the total of submissions.','cpappb'); ?><br />&nbsp;&nbsp;&nbsp;&nbsp; <?php _e('Date range from','cpappb'); ?> <?php echo esc_html($date_start); ?> <?php _e('to','cpappb'); ?> <?php echo esc_html($date_end); ?>.</div>
207
  </div>
208
 
209
  <div style="clear:both"></div>
cp-main-class.inc.php CHANGED
@@ -617,7 +617,7 @@ class CP_ContactFormToEmail extends CP_CFTEMAIL_BaseClass {
617
 
618
  if ($this->get_param('cp_contactformtoemail_id')) $this->item = $this->get_param('cp_contactformtoemail_id');
619
 
620
- if ($action == "wizard")
621
  {
622
  $shortcode = '['.$this->shorttag.' id="'.$this->item .'"]';
623
  $this->postURL = $this->publish_on($_POST["whereto"], @$_POST["publishpage"], @$_POST["publishpost"], $shortcode, $_POST["posttitle"]);
617
 
618
  if ($this->get_param('cp_contactformtoemail_id')) $this->item = $this->get_param('cp_contactformtoemail_id');
619
 
620
+ if ($action == "wizard" && current_user_can('manage_options') && wp_verify_nonce( $_POST['anonce'], 'cpappb_actions_pwizard'))
621
  {
622
  $shortcode = '['.$this->shorttag.' id="'.$this->item .'"]';
623
  $this->postURL = $this->publish_on($_POST["whereto"], @$_POST["publishpage"], @$_POST["publishpost"], $shortcode, $_POST["posttitle"]);
cp-publish-wizzard.inc.php CHANGED
@@ -1,4 +1,10 @@
1
- <?php if ( !is_admin() ) {echo 'Direct access not allowed.';exit;} ?>
 
 
 
 
 
 
2
 
3
  <h1>Publish Contact Form to Email</h1>
4
 
@@ -38,7 +44,8 @@
38
 
39
  <form method="post" action="?page=cp_contactformtoemail&pwizard=1" name="regForm" id="regForm">
40
  <input name="cp_contactformtoemail_do_action_loaded" type="hidden" value="wizard" />
41
-
 
42
  <?php
43
 
44
  if ($this->get_param('cp_contactformtoemail_do_action_loaded') == 'wizard') {
1
+ <?php
2
+
3
+ if ( !is_admin() || !current_user_can('manage_options')) {echo 'Direct access not allowed.';exit;}
4
+
5
+ $nonce = wp_create_nonce( 'cpappb_actions_pwizard' );
6
+
7
+ ?>
8
 
9
  <h1>Publish Contact Form to Email</h1>
10
 
44
 
45
  <form method="post" action="?page=cp_contactformtoemail&pwizard=1" name="regForm" id="regForm">
46
  <input name="cp_contactformtoemail_do_action_loaded" type="hidden" value="wizard" />
47
+ <input name="anonce" type="hidden" value="<?php echo $nonce; ?>" />
48
+
49
  <?php
50
 
51
  if ($this->get_param('cp_contactformtoemail_do_action_loaded') == 'wizard') {
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.93
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.94
7
  Author: CodePeople
8
  Author URI: https://form2email.dwbooster.com
9
  Text Domain: contact-form-to-email