Contact Form Email - Version 1.2.41

Version Description

  • New features for deleting messages (GDPR-related improvements)
Download this release

Release Info

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

Code changes from version 1.2.40 to 1.2.41

README.txt CHANGED
@@ -448,6 +448,9 @@ When you click a field already added into the contact form builder area, you can
448
 
449
  == Changelog ==
450
 
 
 
 
451
  = 1.2.40 =
452
  * Fixed captcha reloading issue
453
 
@@ -875,5 +878,5 @@ When you click a field already added into the contact form builder area, you can
875
 
876
  == Upgrade Notice ==
877
 
878
- = 1.2.40 =
879
- * Fixed captcha reloading issue
448
 
449
  == Changelog ==
450
 
451
+ = 1.2.41 =
452
+ * New features for deleting messages (GDPR-related improvements)
453
+
454
  = 1.2.40 =
455
  * Fixed captcha reloading issue
456
 
878
 
879
  == Upgrade Notice ==
880
 
881
+ = 1.2.41 =
882
+ * New features for deleting messages (GDPR-related improvements)
cp-admin-int-message-list.inc.php CHANGED
@@ -7,12 +7,28 @@ if ( !is_admin() )
7
  }
8
 
9
  $this->item = intval($_GET["cal"]);
 
10
 
11
  global $wpdb;
12
 
13
  $message = "";
14
 
15
- if (isset($_GET['ld']) && $_GET['ld'] != '')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  {
17
  $verify_nonce = wp_verify_nonce( $_GET['rsave'], 'cfte_message_actions_plist');
18
  if (!$verify_nonce)
@@ -70,7 +86,7 @@ if ($this->item != 0)
70
 
71
  $current_page = intval($_GET["p"]);
72
  if (!$current_page) $current_page = 1;
73
- $records_per_page = 50;
74
 
75
  $cond = '';
76
  if ($_GET["search"] != '') $cond .= " AND (data like '%".esc_sql($_GET["search"])."%' OR posted_data LIKE '%".esc_sql($_GET["search"])."%')";
@@ -94,6 +110,25 @@ $nonce = wp_create_nonce( 'cfte_message_actions_plist' );
94
  document.location = 'admin.php?page=<?php echo $this->menu_parameter; ?>&rsave=<?php echo $nonce; ?>&cal=<?php echo $this->item; ?>&list=1&ld='+id+'&r='+Math.random();
95
  }
96
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
97
  </script>
98
  <div class="wrap">
99
  <h1><?php echo $this->plugin_name; ?> - Message List</h1>
@@ -149,9 +184,15 @@ echo paginate_links( array(
149
  ?>
150
 
151
  <div id="dex_printable_contents">
 
 
 
 
 
152
  <table class="wp-list-table widefat fixed pages" cellspacing="0" width="100%">
153
  <thead>
154
  <tr>
 
155
  <th style="padding-left:7px;font-weight:bold;width:120px;">Date</th>
156
  <th style="padding-left:7px;font-weight:bold;">Email</th>
157
  <th style="padding-left:7px;font-weight:bold;">Message</th>
@@ -161,6 +202,7 @@ echo paginate_links( array(
161
  <tbody id="the-list">
162
  <?php for ($i=($current_page-1)*$records_per_page; $i<$current_page*$records_per_page; $i++) if (isset($events[$i])) { ?>
163
  <tr class='<?php if (!($i%2)) { ?>alternate <?php } ?>author-self status-draft format-default iedit' valign="top">
 
164
  <td><?php echo substr($events[$i]->time,0,16); ?></td>
165
  <td><?php echo htmlentities($events[$i]->notifyto); ?></td>
166
  <td><?php
@@ -180,9 +222,15 @@ echo paginate_links( array(
180
  <?php } ?>
181
  </tbody>
182
  </table>
 
183
  </div>
184
 
185
- <p class="submit"><input type="button" name="pbutton" value="Print" onclick="do_dexapp_print();" /></p>
 
 
 
 
 
186
 
187
  </div>
188
 
7
  }
8
 
9
  $this->item = intval($_GET["cal"]);
10
+ $records_per_page = 50;
11
 
12
  global $wpdb;
13
 
14
  $message = "";
15
 
16
+ if (isset($_GET['delmark']) && $_GET['delmark'] != '')
17
+ {
18
+ for ($i=0; $i<=$records_per_page; $i++)
19
+ if (isset($_GET['c'.$i]) && $_GET['c'.$i] != '')
20
+ $wpdb->query('DELETE FROM `'.$wpdb->prefix.$this->table_messages.'` WHERE id='.intval($_GET['c'.$i]));
21
+ $message = "Marked items deleted";
22
+ }
23
+ else if (isset($_GET['del']) && $_GET['del'] == 'all')
24
+ {
25
+ if (CP_CALENDAR_ID == '' || CP_CALENDAR_ID == '0')
26
+ $wpdb->query('DELETE FROM `'.$wpdb->prefix.$this->table_messages.'`');
27
+ else
28
+ $wpdb->query('DELETE FROM `'.$wpdb->prefix.$this->table_messages.'` WHERE formid='.intval($this->item));
29
+ $message = "All items deleted";
30
+ }
31
+ else if (isset($_GET['ld']) && $_GET['ld'] != '')
32
  {
33
  $verify_nonce = wp_verify_nonce( $_GET['rsave'], 'cfte_message_actions_plist');
34
  if (!$verify_nonce)
86
 
87
  $current_page = intval($_GET["p"]);
88
  if (!$current_page) $current_page = 1;
89
+
90
 
91
  $cond = '';
92
  if ($_GET["search"] != '') $cond .= " AND (data like '%".esc_sql($_GET["search"])."%' OR posted_data LIKE '%".esc_sql($_GET["search"])."%')";
110
  document.location = 'admin.php?page=<?php echo $this->menu_parameter; ?>&rsave=<?php echo $nonce; ?>&cal=<?php echo $this->item; ?>&list=1&ld='+id+'&r='+Math.random();
111
  }
112
  }
113
+ function cp_deletemarked()
114
+ {
115
+ if (confirm('Are you sure that you want to delete the marked items?'))
116
+ document.dex_table_form.submit();
117
+ }
118
+ function cp_deleteall()
119
+ {
120
+ if (confirm('Are you sure that you want to delete ALL bookings for this form?'))
121
+ {
122
+ document.location = 'admin.php?page=<?php echo $this->menu_parameter; ?>&cal=<?php echo intval($_GET["cal"]); ?>&list=1&del=all&r='+Math.random();
123
+ }
124
+ }
125
+ function cp_markall()
126
+ {
127
+ var ischecked = document.getElementById("cpcontrolck").checked;
128
+ <?php for ($i=($current_page-1)*$records_per_page; $i<$current_page*$records_per_page; $i++) if (isset($events[$i])) { ?>
129
+ document.forms.dex_table_form.c<?php echo $i-($current_page-1)*$records_per_page; ?>.checked = ischecked;
130
+ <?php } ?>
131
+ }
132
  </script>
133
  <div class="wrap">
134
  <h1><?php echo $this->plugin_name; ?> - Message List</h1>
184
  ?>
185
 
186
  <div id="dex_printable_contents">
187
+ <form name="dex_table_form" id="dex_table_form" action="admin.php" method="get">
188
+ <input type="hidden" name="page" value="<?php echo $this->menu_parameter; ?>" />
189
+ <input type="hidden" name="cal" value="<?php echo intval($_GET["cal"]); ?>" />
190
+ <input type="hidden" name="list" value="1" />
191
+ <input type="hidden" name="delmark" value="1" />
192
  <table class="wp-list-table widefat fixed pages" cellspacing="0" width="100%">
193
  <thead>
194
  <tr>
195
+ <th width="30" class="cpnopr"><input type="checkbox" name="cpcontrolck" id="cpcontrolck" value="" onclick="cp_markall();"></th>
196
  <th style="padding-left:7px;font-weight:bold;width:120px;">Date</th>
197
  <th style="padding-left:7px;font-weight:bold;">Email</th>
198
  <th style="padding-left:7px;font-weight:bold;">Message</th>
202
  <tbody id="the-list">
203
  <?php for ($i=($current_page-1)*$records_per_page; $i<$current_page*$records_per_page; $i++) if (isset($events[$i])) { ?>
204
  <tr class='<?php if (!($i%2)) { ?>alternate <?php } ?>author-self status-draft format-default iedit' valign="top">
205
+ <td width="1%" class="cpnopr"><input type="checkbox" name="c<?php echo $i-($current_page-1)*$records_per_page; ?>" value="<?php echo $events[$i]->id; ?>" /></td>
206
  <td><?php echo substr($events[$i]->time,0,16); ?></td>
207
  <td><?php echo htmlentities($events[$i]->notifyto); ?></td>
208
  <td><?php
222
  <?php } ?>
223
  </tbody>
224
  </table>
225
+ </form>
226
  </div>
227
 
228
+ <br />
229
+ <input type="button" name="pbutton" value="Print" onclick="do_dexapp_print();" />
230
+ <div style="clear:both"></div>
231
+ <p class="submit" style="float:left;"><input type="button" name="pbutton" value="Delete marked items" onclick="cp_deletemarked();" /> &nbsp; &nbsp; &nbsp; </p>
232
+ <p class="submit" style="float:left;"><input type="button" name="pbutton" value="Delete All Bookings" onclick="cp_deleteall();" /></p>
233
+ <div style="clear:both"></div>
234
 
235
  </div>
236
 
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.40
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.41
7
  Author: CodePeople
8
  Author URI: https://form2email.dwbooster.com
9
  Text Domain: contact-form-to-email