Contact Form by WD – responsive drag & drop contact form builder tool - Version 1.7.31

Version Description

Security issue fixed

Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Contact Form by WD – responsive drag & drop contact form builder tool
Version 1.7.31
Comparing to
See all releases

Code changes from version 1.7.30 to 1.7.31

admin/controllers/FMControllerFormMakerEditCSS_fmc.php CHANGED
@@ -69,7 +69,7 @@ class FMControllerFormMakerEditCSS_fmc {
69
 
70
  public function update_db() {
71
  global $wpdb;
72
- $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes( $_POST['current_id'])) : 0);
73
  $title = (isset($_POST['title']) ? esc_html(stripslashes( $_POST['title'])) : '');
74
  $css = (isset($_POST['css']) ? stripslashes(preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $_POST['css'])) : '');
75
  $default = (isset($_POST['default']) ? esc_html(stripslashes( $_POST['default'])) : 0);
69
 
70
  public function update_db() {
71
  global $wpdb;
72
+ $id = (isset($_POST['current_id']) ? (int)esc_html(stripslashes( $_POST['current_id'])) : 0);
73
  $title = (isset($_POST['title']) ? esc_html(stripslashes( $_POST['title'])) : '');
74
  $css = (isset($_POST['css']) ? stripslashes(preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $_POST['css'])) : '');
75
  $default = (isset($_POST['default']) ? esc_html(stripslashes( $_POST['default'])) : 0);
admin/controllers/FMControllerFromeditcountryinpopup_fmc.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class FMControllerFromeditcountryinpopup {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ $this->display();
23
+ }
24
+
25
+ public function display() {
26
+ require_once WD_FMC_DIR . "/admin/models/FMModelFromeditcountryinpopup.php";
27
+ $model = new FMModelFromeditcountryinpopup();
28
+
29
+ require_once WD_FMC_DIR . "/admin/views/FMViewFromeditcountryinpopup.php";
30
+ $view = new FMViewFromeditcountryinpopup($model);
31
+ $view->display();
32
+ }
33
+
34
+ ////////////////////////////////////////////////////////////////////////////////////////
35
+ // Getters & Setters //
36
+ ////////////////////////////////////////////////////////////////////////////////////////
37
+ ////////////////////////////////////////////////////////////////////////////////////////
38
+ // Private Methods //
39
+ ////////////////////////////////////////////////////////////////////////////////////////
40
+ ////////////////////////////////////////////////////////////////////////////////////////
41
+ // Listeners //
42
+ ////////////////////////////////////////////////////////////////////////////////////////
43
+ }
admin/controllers/FMControllerManage_fmc.php CHANGED
@@ -20,7 +20,7 @@ class FMControllerManage_fmc {
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
  public function execute() {
22
  $task = WDW_FMC_Library::get('task');
23
- $id = WDW_FMC_Library::get('current_id', 0);
24
  $message = WDW_FMC_Library::get('message');
25
  echo WDW_FMC_Library::message_id($message);
26
  if (method_exists($this, $task)) {
@@ -56,8 +56,7 @@ class FMControllerManage_fmc {
56
 
57
  require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
58
  $view = new FMViewManage_fmc($model);
59
- // $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
60
- $id = WDW_FMC_Library::get('current_id', 0);
61
  $view->edit($id);
62
  }
63
 
@@ -82,17 +81,15 @@ class FMControllerManage_fmc {
82
 
83
  require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
84
  $view = new FMViewManage_fmc($model);
85
- // $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
86
  global $wpdb;
87
- $id = WDW_FMC_Library::get('current_id', $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker"));
88
  $view->form_options_old($id);
89
  }
90
 
91
  public function save_options_old() {
92
  $message = $this->save_db_options_old();
93
- // $this->edit_old();
94
  $page = WDW_FMC_Library::get('page');
95
- $current_id = WDW_FMC_Library::get('current_id', 0);
96
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'edit_old', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
97
  }
98
 
@@ -103,10 +100,8 @@ class FMControllerManage_fmc {
103
 
104
  require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
105
  $view = new FMViewManage_fmc($model);
106
- // $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
107
- // $view->form_options_old($id);
108
  $page = WDW_FMC_Library::get('page');
109
- $current_id = WDW_FMC_Library::get('current_id', 0);
110
  $fieldset_id = WDW_FMC_Library::get('fieldset_id', 'general');
111
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'form_options_old', 'current_id' => $current_id, 'message' => $message, 'fieldset_id' => $fieldset_id), admin_url('admin.php')));
112
  }
@@ -125,10 +120,9 @@ function before_reset() {
125
 
126
  }";
127
  global $wpdb;
128
- // $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes($_POST['current_id'])) : 0);
129
- $id = WDW_FMC_Library::get('current_id', 0);
130
  $mail = (isset($_POST['mail']) ? esc_html(stripslashes($_POST['mail'])) : '');
131
- $theme = (isset($_POST['theme']) ? esc_html(stripslashes($_POST['theme'])) : 1);
132
  $javascript = (isset($_POST['javascript']) ? stripslashes($_POST['javascript']) : $javascript);
133
  $script1 = (isset($_POST['script1']) ? esc_html(stripslashes($_POST['script1'])) : '');
134
  $script2 = (isset($_POST['script2']) ? esc_html(stripslashes($_POST['script2'])) : '');
@@ -198,17 +192,15 @@ function before_reset() {
198
 
199
  require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
200
  $view = new FMViewManage_fmc($model);
201
- // $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
202
  global $wpdb;
203
- $id = WDW_FMC_Library::get('current_id', $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker"));
204
  $view->form_layout($id);
205
  }
206
 
207
  public function save_layout() {
208
  $message = $this->save_db_layout();
209
- // $this->edit();
210
  $page = WDW_FMC_Library::get('page');
211
- $current_id = WDW_FMC_Library::get('current_id', 0);
212
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
213
  }
214
 
@@ -219,17 +211,14 @@ function before_reset() {
219
 
220
  require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
221
  $view = new FMViewManage_fmc($model);
222
- // $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
223
  $page = WDW_FMC_Library::get('page');
224
- $current_id = WDW_FMC_Library::get('current_id', 0);
225
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'form_layout', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
226
- // $view->form_layout($id);
227
  }
228
 
229
  public function save_db_layout() {
230
  global $wpdb;
231
- // $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes($_POST['current_id'])) : 0);
232
- $id = WDW_FMC_Library::get('current_id', 0);
233
  $custom_front = (isset($_POST['custom_front']) ? stripslashes($_POST['custom_front']) : '');
234
  $autogen_layout = (isset($_POST['autogen_layout']) ? 1 : 0);
235
  $save = $wpdb->update($wpdb->prefix . 'formmaker', array(
@@ -253,17 +242,15 @@ function before_reset() {
253
 
254
  require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
255
  $view = new FMViewManage_fmc($model);
256
- // $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
257
  global $wpdb;
258
- $id = WDW_FMC_Library::get('current_id', $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker"));
259
  $view->form_options($id);
260
  }
261
 
262
  public function save_options() {
263
  $message = $this->save_db_options();
264
- // $this->edit();
265
  $page = WDW_FMC_Library::get('page');
266
- $current_id = WDW_FMC_Library::get('current_id', 0);
267
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
268
  }
269
 
@@ -274,10 +261,8 @@ function before_reset() {
274
 
275
  require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
276
  $view = new FMViewManage_fmc($model);
277
- // $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
278
- // $view->form_options($id);
279
  $page = WDW_FMC_Library::get('page');
280
- $current_id = WDW_FMC_Library::get('current_id', 0);
281
  $fieldset_id = WDW_FMC_Library::get('fieldset_id', 'general');
282
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'form_options', 'current_id' => $current_id, 'message' => $message, 'fieldset_id' => $fieldset_id), admin_url('admin.php')));
283
  }
@@ -285,7 +270,8 @@ function before_reset() {
285
  public function remove_query() {
286
  global $wpdb;
287
  $cid = ((isset($_POST['cid']) && $_POST['cid'] != '') ? $_POST['cid'] : NULL);
288
- if (count($cid)) {
 
289
  $cids = implode(',', $cid);
290
  $query = 'DELETE FROM ' . $wpdb->prefix . 'formmaker_query WHERE id IN ( ' . $cids . ' )';
291
  if ($wpdb->query($query)) {
@@ -319,11 +305,10 @@ function before_reset() {
319
 
320
  }";
321
  global $wpdb;
322
- // $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes($_POST['current_id'])) : 0);
323
- $id = WDW_FMC_Library::get('current_id', 0);
324
- $published = (isset($_POST['published']) ? esc_html(stripslashes($_POST['published'])) : 1);
325
- $savedb = (isset($_POST['savedb']) ? esc_html(stripslashes($_POST['savedb'])) : 1);
326
- $theme = ((isset($_POST['theme']) && (esc_html($_POST['theme']) != 0)) ? esc_html(stripslashes($_POST['theme'])) : $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker_themes"));
327
  $requiredmark = (isset($_POST['requiredmark']) ? esc_html(stripslashes($_POST['requiredmark'])) : '*');
328
  $sendemail = (isset($_POST['sendemail']) ? esc_html(stripslashes($_POST['sendemail'])) : 1);
329
  $mail = (isset($_POST['mail']) ? esc_html(stripslashes($_POST['mail'])) : '');
@@ -436,14 +421,12 @@ function before_reset() {
436
 
437
  public function save_as_copy_old() {
438
  $message = $this->save_db_as_copy_old();
439
- // $this->display();
440
  $page = WDW_FMC_Library::get('page');
441
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
442
  }
443
 
444
  public function save_old() {
445
  $message = $this->save_db_old();
446
- // $this->display();
447
  $page = WDW_FMC_Library::get('page');
448
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
449
  }
@@ -451,21 +434,20 @@ function before_reset() {
451
  public function apply_old() {
452
  global $wpdb;
453
  $message = $this->save_db_old();
454
- // $this->edit_old();
455
  $id = (int) $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
456
- $current_id = WDW_FMC_Library::get('current_id', $id);
457
  $page = WDW_FMC_Library::get('page');
458
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'edit_old', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
459
  }
460
 
461
  public function save_db_old() {
462
  global $wpdb;
463
- // $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes($_POST['current_id'])) : 0);
464
- $id = WDW_FMC_Library::get('current_id', 0);
465
  $title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
466
  $form = (isset($_POST['form']) ? stripslashes($_POST['form']) : '');
467
  $form_front = (isset($_POST['form_front']) ? stripslashes($_POST['form_front']) : '');
468
- $counter = (isset($_POST['counter']) ? esc_html(stripslashes($_POST['counter'])) : 0);
469
  $label_order = (isset($_POST['label_order']) ? esc_html(stripslashes($_POST['label_order'])) : '');
470
  $label_order_current = (isset($_POST['label_order_current']) ? esc_html(stripslashes($_POST['label_order_current'])) : '');
471
  $pagination = (isset($_POST['pagination']) ? esc_html(stripslashes($_POST['pagination'])) : '');
@@ -499,8 +481,7 @@ function before_reset() {
499
 
500
  public function save_db_as_copy_old() {
501
  global $wpdb;
502
- // $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes($_POST['current_id'])) : 0);
503
- $id = WDW_FMC_Library::get('current_id', 0);
504
  $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
505
  $title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
506
  $form = (isset($_POST['form']) ? stripslashes($_POST['form']) : '');
@@ -605,7 +586,7 @@ function before_reset() {
605
  '%s',
606
  '%d'
607
  ));
608
- $id = $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
609
  update_option('contact_form_forms', ((get_option('contact_form_forms')) ? (get_option('contact_form_forms')) . ',' . $id : $id));
610
  $wpdb->insert($wpdb->prefix . 'formmaker_views', array(
611
  'form_id' => $id,
@@ -657,8 +638,8 @@ function before_submit() {
657
  // before form reset
658
  function before_reset() {
659
  }";
660
- // $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes($_POST['current_id'])) : 0);
661
- $id = WDW_FMC_Library::get('current_id', 0);
662
  $title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
663
  $form_front = (isset($_POST['form_front']) ? stripslashes($_POST['form_front']) : '');
664
  $sortable = (isset($_POST['sortable']) ? 1 : 0);
@@ -802,7 +783,7 @@ function before_reset() {
802
  '%s',
803
  '%s',
804
  ));
805
- $id = $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
806
  update_option('contact_form_forms', ((get_option('contact_form_forms')) ? (get_option('contact_form_forms')) . ',' . $id : $id));
807
  // $_POST['current_id'] = $id;
808
  $wpdb->insert($wpdb->prefix . 'formmaker_views', array(
@@ -823,8 +804,7 @@ function before_reset() {
823
 
824
  public function save_db_as_copy() {
825
  global $wpdb;
826
- // $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes($_POST['current_id'])) : 0);
827
- $id = WDW_FMC_Library::get('current_id', 0);
828
  $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
829
  $title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
830
  $form_front = (isset($_POST['form_front']) ? stripslashes($_POST['form_front']) : '');
@@ -951,7 +931,7 @@ function before_reset() {
951
  '%s',
952
  '%s',
953
  ));
954
- $id = $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
955
  update_option('contact_form_forms', ((get_option('contact_form_forms')) ? (get_option('contact_form_forms')) . ',' . $id : $id));
956
  $wpdb->insert($wpdb->prefix . 'formmaker_views', array(
957
  'form_id' => $id,
@@ -973,7 +953,7 @@ function before_reset() {
973
  $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id);
974
  if ($wpdb->query($query)) {
975
  $arr = explode(',', get_option('contact_form_forms'));
976
- $arr = array_diff($arr, array($id));
977
  $arr = implode(',', $arr);
978
  update_option('contact_form_forms', $arr);
979
  $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_views WHERE form_id="%d"', $id));
@@ -998,7 +978,7 @@ function before_reset() {
998
  $flag = TRUE;
999
  $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $form_id));
1000
  $arr = explode(',', get_option('contact_form_forms'));
1001
- $arr = array_diff($arr, array($form_id));
1002
  $arr = implode(',', $arr);
1003
  update_option('contact_form_forms', $arr);
1004
  $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_views WHERE form_id="%d"', $form_id));
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
  public function execute() {
22
  $task = WDW_FMC_Library::get('task');
23
+ $id = (int)WDW_FMC_Library::get('current_id', 0);
24
  $message = WDW_FMC_Library::get('message');
25
  echo WDW_FMC_Library::message_id($message);
26
  if (method_exists($this, $task)) {
56
 
57
  require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
58
  $view = new FMViewManage_fmc($model);
59
+ $id = (int)WDW_FMC_Library::get('current_id', 0);
 
60
  $view->edit($id);
61
  }
62
 
81
 
82
  require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
83
  $view = new FMViewManage_fmc($model);
 
84
  global $wpdb;
85
+ $id = (int)WDW_FMC_Library::get('current_id', $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker"));
86
  $view->form_options_old($id);
87
  }
88
 
89
  public function save_options_old() {
90
  $message = $this->save_db_options_old();
 
91
  $page = WDW_FMC_Library::get('page');
92
+ $current_id = (int)WDW_FMC_Library::get('current_id', 0);
93
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'edit_old', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
94
  }
95
 
100
 
101
  require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
102
  $view = new FMViewManage_fmc($model);
 
 
103
  $page = WDW_FMC_Library::get('page');
104
+ $current_id = (int)WDW_FMC_Library::get('current_id', 0);
105
  $fieldset_id = WDW_FMC_Library::get('fieldset_id', 'general');
106
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'form_options_old', 'current_id' => $current_id, 'message' => $message, 'fieldset_id' => $fieldset_id), admin_url('admin.php')));
107
  }
120
 
121
  }";
122
  global $wpdb;
123
+ $id = (int)WDW_FMC_Library::get('current_id', 0);
 
124
  $mail = (isset($_POST['mail']) ? esc_html(stripslashes($_POST['mail'])) : '');
125
+ $theme = (isset($_POST['theme']) ? (int)esc_html(stripslashes($_POST['theme'])) : 1);
126
  $javascript = (isset($_POST['javascript']) ? stripslashes($_POST['javascript']) : $javascript);
127
  $script1 = (isset($_POST['script1']) ? esc_html(stripslashes($_POST['script1'])) : '');
128
  $script2 = (isset($_POST['script2']) ? esc_html(stripslashes($_POST['script2'])) : '');
192
 
193
  require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
194
  $view = new FMViewManage_fmc($model);
 
195
  global $wpdb;
196
+ $id = (int)WDW_FMC_Library::get('current_id', $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker"));
197
  $view->form_layout($id);
198
  }
199
 
200
  public function save_layout() {
201
  $message = $this->save_db_layout();
 
202
  $page = WDW_FMC_Library::get('page');
203
+ $current_id =(int) WDW_FMC_Library::get('current_id', 0);
204
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
205
  }
206
 
211
 
212
  require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
213
  $view = new FMViewManage_fmc($model);
 
214
  $page = WDW_FMC_Library::get('page');
215
+ $current_id = (int)WDW_FMC_Library::get('current_id', 0);
216
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'form_layout', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
 
217
  }
218
 
219
  public function save_db_layout() {
220
  global $wpdb;
221
+ $id = (int)WDW_FMC_Library::get('current_id', 0);
 
222
  $custom_front = (isset($_POST['custom_front']) ? stripslashes($_POST['custom_front']) : '');
223
  $autogen_layout = (isset($_POST['autogen_layout']) ? 1 : 0);
224
  $save = $wpdb->update($wpdb->prefix . 'formmaker', array(
242
 
243
  require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
244
  $view = new FMViewManage_fmc($model);
 
245
  global $wpdb;
246
+ $id = (int)WDW_FMC_Library::get('current_id', $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker"));
247
  $view->form_options($id);
248
  }
249
 
250
  public function save_options() {
251
  $message = $this->save_db_options();
 
252
  $page = WDW_FMC_Library::get('page');
253
+ $current_id = (int)WDW_FMC_Library::get('current_id', 0);
254
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
255
  }
256
 
261
 
262
  require_once WD_FMC_DIR . "/admin/views/FMViewManage_fmc.php";
263
  $view = new FMViewManage_fmc($model);
 
 
264
  $page = WDW_FMC_Library::get('page');
265
+ $current_id = (int)WDW_FMC_Library::get('current_id', 0);
266
  $fieldset_id = WDW_FMC_Library::get('fieldset_id', 'general');
267
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'form_options', 'current_id' => $current_id, 'message' => $message, 'fieldset_id' => $fieldset_id), admin_url('admin.php')));
268
  }
270
  public function remove_query() {
271
  global $wpdb;
272
  $cid = ((isset($_POST['cid']) && $_POST['cid'] != '') ? $_POST['cid'] : NULL);
273
+ if (count($cid)) {
274
+ array_walk($cid, create_function('&$value', '$value = (int)$value;'));
275
  $cids = implode(',', $cid);
276
  $query = 'DELETE FROM ' . $wpdb->prefix . 'formmaker_query WHERE id IN ( ' . $cids . ' )';
277
  if ($wpdb->query($query)) {
305
 
306
  }";
307
  global $wpdb;
308
+ $id = (int)WDW_FMC_Library::get('current_id', 0);
309
+ $published = (int)(isset($_POST['published']) ? esc_html(stripslashes($_POST['published'])) : 1);
310
+ $savedb = (int)(isset($_POST['savedb']) ? esc_html(stripslashes($_POST['savedb'])) : 1);
311
+ $theme = (int)((isset($_POST['theme']) && (esc_html($_POST['theme']) != 0)) ? esc_html(stripslashes($_POST['theme'])) : $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker_themes"));
 
312
  $requiredmark = (isset($_POST['requiredmark']) ? esc_html(stripslashes($_POST['requiredmark'])) : '*');
313
  $sendemail = (isset($_POST['sendemail']) ? esc_html(stripslashes($_POST['sendemail'])) : 1);
314
  $mail = (isset($_POST['mail']) ? esc_html(stripslashes($_POST['mail'])) : '');
421
 
422
  public function save_as_copy_old() {
423
  $message = $this->save_db_as_copy_old();
 
424
  $page = WDW_FMC_Library::get('page');
425
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
426
  }
427
 
428
  public function save_old() {
429
  $message = $this->save_db_old();
 
430
  $page = WDW_FMC_Library::get('page');
431
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
432
  }
434
  public function apply_old() {
435
  global $wpdb;
436
  $message = $this->save_db_old();
437
+
438
  $id = (int) $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
439
+ $current_id = (int)WDW_FMC_Library::get('current_id', $id);
440
  $page = WDW_FMC_Library::get('page');
441
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'edit_old', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
442
  }
443
 
444
  public function save_db_old() {
445
  global $wpdb;
446
+ $id = (int)WDW_FMC_Library::get('current_id', 0);
 
447
  $title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
448
  $form = (isset($_POST['form']) ? stripslashes($_POST['form']) : '');
449
  $form_front = (isset($_POST['form_front']) ? stripslashes($_POST['form_front']) : '');
450
+ $counter = (int)(isset($_POST['counter']) ? esc_html(stripslashes($_POST['counter'])) : 0);
451
  $label_order = (isset($_POST['label_order']) ? esc_html(stripslashes($_POST['label_order'])) : '');
452
  $label_order_current = (isset($_POST['label_order_current']) ? esc_html(stripslashes($_POST['label_order_current'])) : '');
453
  $pagination = (isset($_POST['pagination']) ? esc_html(stripslashes($_POST['pagination'])) : '');
481
 
482
  public function save_db_as_copy_old() {
483
  global $wpdb;
484
+ $id = (int)WDW_FMC_Library::get('current_id', 0);
 
485
  $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
486
  $title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
487
  $form = (isset($_POST['form']) ? stripslashes($_POST['form']) : '');
586
  '%s',
587
  '%d'
588
  ));
589
+ $id = (int)$wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
590
  update_option('contact_form_forms', ((get_option('contact_form_forms')) ? (get_option('contact_form_forms')) . ',' . $id : $id));
591
  $wpdb->insert($wpdb->prefix . 'formmaker_views', array(
592
  'form_id' => $id,
638
  // before form reset
639
  function before_reset() {
640
  }";
641
+
642
+ $id = (int)WDW_FMC_Library::get('current_id', 0);
643
  $title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
644
  $form_front = (isset($_POST['form_front']) ? stripslashes($_POST['form_front']) : '');
645
  $sortable = (isset($_POST['sortable']) ? 1 : 0);
783
  '%s',
784
  '%s',
785
  ));
786
+ $id = (int)$wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
787
  update_option('contact_form_forms', ((get_option('contact_form_forms')) ? (get_option('contact_form_forms')) . ',' . $id : $id));
788
  // $_POST['current_id'] = $id;
789
  $wpdb->insert($wpdb->prefix . 'formmaker_views', array(
804
 
805
  public function save_db_as_copy() {
806
  global $wpdb;
807
+ $id = (int)WDW_FMC_Library::get('current_id', 0);
 
808
  $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
809
  $title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
810
  $form_front = (isset($_POST['form_front']) ? stripslashes($_POST['form_front']) : '');
931
  '%s',
932
  '%s',
933
  ));
934
+ $id = (int)$wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
935
  update_option('contact_form_forms', ((get_option('contact_form_forms')) ? (get_option('contact_form_forms')) . ',' . $id : $id));
936
  $wpdb->insert($wpdb->prefix . 'formmaker_views', array(
937
  'form_id' => $id,
953
  $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id);
954
  if ($wpdb->query($query)) {
955
  $arr = explode(',', get_option('contact_form_forms'));
956
+ $arr = array_diff($arr, array((int)$id));
957
  $arr = implode(',', $arr);
958
  update_option('contact_form_forms', $arr);
959
  $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_views WHERE form_id="%d"', $id));
978
  $flag = TRUE;
979
  $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $form_id));
980
  $arr = explode(',', get_option('contact_form_forms'));
981
+ $arr = array_diff($arr, array((int)$form_id));
982
  $arr = implode(',', $arr);
983
  update_option('contact_form_forms', $arr);
984
  $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_views WHERE form_id="%d"', $form_id));
admin/controllers/FMControllerShow_matrix_fmc.php ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class FMControllerShow_matrix {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ $this->display();
23
+ }
24
+
25
+ public function display() {
26
+ require_once WD_FMC_DIR . "/admin/models/FMModelShow_matrix.php";
27
+ $model = new FMModelShow_matrix();
28
+
29
+ require_once WD_FMC_DIR . "/admin/views/FMViewShow_matrix.php";
30
+ $view = new FMViewShow_matrix($model);
31
+ $view->display();
32
+ }
33
+
34
+ ////////////////////////////////////////////////////////////////////////////////////////
35
+ // Getters & Setters //
36
+ ////////////////////////////////////////////////////////////////////////////////////////
37
+ ////////////////////////////////////////////////////////////////////////////////////////
38
+ // Private Methods //
39
+ ////////////////////////////////////////////////////////////////////////////////////////
40
+ ////////////////////////////////////////////////////////////////////////////////////////
41
+ // Listeners //
42
+ ////////////////////////////////////////////////////////////////////////////////////////
43
+ }
admin/controllers/FMControllerSubmissions_fmc.php CHANGED
@@ -20,8 +20,8 @@ class FMControllerSubmissions_fmc {
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
  public function execute() {
22
  $task = ((isset($_POST['task'])) ? esc_html($_POST['task']) : '');
23
- $id = ((isset($_POST['current_id'])) ? esc_html($_POST['current_id']) : 0);
24
- $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? esc_html($_POST['form_id']) : 0);
25
  if (method_exists($this, $task)) {
26
  check_admin_referer('nonce_fmc', 'nonce_fmc');
27
  $this->$task($id);
@@ -32,7 +32,7 @@ class FMControllerSubmissions_fmc {
32
  }
33
 
34
  public function display($form_id) {
35
- $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? esc_html($_POST['form_id']) : 0);
36
  require_once WD_FMC_DIR . "/admin/models/FMModelSubmissions_fmc.php";
37
  $model = new FMModelSubmissions_fmc();
38
 
@@ -42,7 +42,7 @@ class FMControllerSubmissions_fmc {
42
  }
43
 
44
  public function show_stats() {
45
- $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? esc_html($_POST['form_id']) : 0);
46
  require_once WD_FMC_DIR . "/admin/models/FMModelSubmissions_fmc.php";
47
  $model = new FMModelSubmissions_fmc();
48
 
@@ -58,11 +58,11 @@ class FMControllerSubmissions_fmc {
58
 
59
  require_once WD_FMC_DIR . "/admin/views/FMViewSubmissions_fmc.php";
60
  $view = new FMViewSubmissions_fmc($model);
61
- $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
62
 
63
- $form_id = $wpdb->get_var("SELECT form_id FROM " . $wpdb->prefix . "formmaker_submits WHERE group_id='" . $id . "'");
64
  $form = $wpdb->get_var("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id='" . $form_id . "'");
65
- $theme_id = $form->theme;
66
  $css = $wpdb->get_var("SELECT css FROM " . $wpdb->prefix . "formmaker_themes WHERE id='" . $theme_id . "'");
67
 
68
  if (isset($form->form)) {
@@ -81,7 +81,7 @@ class FMControllerSubmissions_fmc {
81
  }
82
 
83
  public function save() {
84
- $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? esc_html($_POST['form_id']) : 0);
85
  $this->save_db();
86
  $this->display($form_id);
87
  }
@@ -97,7 +97,7 @@ class FMControllerSubmissions_fmc {
97
  $group_id = $id;
98
  $date = esc_html($_POST['date']);
99
  $ip = esc_html($_POST['ip']);
100
- $form_id = $wpdb->get_var("SELECT form_id FROM " . $wpdb->prefix . "formmaker_submits WHERE group_id='" . $id . "'");
101
  $form = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id='" . $form_id . "'");
102
  $label_id = array();
103
  $label_order_original = array();
@@ -667,7 +667,7 @@ class FMControllerSubmissions_fmc {
667
 
668
  public function delete($id) {
669
  global $wpdb;
670
- $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? esc_html($_POST['form_id']) : 0);
671
  $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id="%d"', $id);
672
  if ($wpdb->query($query)) {
673
  echo WDW_FMC_Library::message('Item Succesfully Deleted.', 'updated');
@@ -680,9 +680,10 @@ class FMControllerSubmissions_fmc {
680
 
681
  public function delete_all() {
682
  global $wpdb;
683
- $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? esc_html($_POST['form_id']) : 0);
684
  $cid = ((isset($_POST['post']) && $_POST['post'] != '') ? $_POST['post'] : NULL);
685
- if (count($cid)) {
 
686
  $cids = implode(',', $cid);
687
  $query = 'DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id IN ( ' . $cids . ' )';
688
  if ($wpdb->query($query)) {
@@ -701,9 +702,10 @@ class FMControllerSubmissions_fmc {
701
  public function block_ip() {
702
  global $wpdb;
703
  $flag = FALSE;
704
- $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? esc_html($_POST['form_id']) : 0);
705
  $cid = ((isset($_POST['post']) && $_POST['post'] != '') ? $_POST['post'] : NULL);
706
  if (count($cid)) {
 
707
  $cids = implode(',', $cid);
708
  $query = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id IN ( '. $cids .' )';
709
  $rows = $wpdb->get_results($query);
@@ -734,6 +736,7 @@ class FMControllerSubmissions_fmc {
734
  $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? esc_html($_POST['form_id']) : 0);
735
  $cid = ((isset($_POST['post']) && $_POST['post'] != '') ? $_POST['post'] : NULL);
736
  if (count($cid)) {
 
737
  $cids = implode(',', $cid);
738
  $query = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id IN ( '. $cids .' )';
739
  $rows = $wpdb->get_results($query);
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
  public function execute() {
22
  $task = ((isset($_POST['task'])) ? esc_html($_POST['task']) : '');
23
+ $id = ((isset($_POST['current_id'])) ? (int)esc_html($_POST['current_id']) : 0);
24
+ $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
25
  if (method_exists($this, $task)) {
26
  check_admin_referer('nonce_fmc', 'nonce_fmc');
27
  $this->$task($id);
32
  }
33
 
34
  public function display($form_id) {
35
+ $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
36
  require_once WD_FMC_DIR . "/admin/models/FMModelSubmissions_fmc.php";
37
  $model = new FMModelSubmissions_fmc();
38
 
42
  }
43
 
44
  public function show_stats() {
45
+ $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
46
  require_once WD_FMC_DIR . "/admin/models/FMModelSubmissions_fmc.php";
47
  $model = new FMModelSubmissions_fmc();
48
 
58
 
59
  require_once WD_FMC_DIR . "/admin/views/FMViewSubmissions_fmc.php";
60
  $view = new FMViewSubmissions_fmc($model);
61
+ $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? (int)esc_html($_POST['current_id']) : 0);
62
 
63
+ $form_id = (int)$wpdb->get_var("SELECT form_id FROM " . $wpdb->prefix . "formmaker_submits WHERE group_id='" . $id . "'");
64
  $form = $wpdb->get_var("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id='" . $form_id . "'");
65
+ $theme_id = (int)$form->theme;
66
  $css = $wpdb->get_var("SELECT css FROM " . $wpdb->prefix . "formmaker_themes WHERE id='" . $theme_id . "'");
67
 
68
  if (isset($form->form)) {
81
  }
82
 
83
  public function save() {
84
+ $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
85
  $this->save_db();
86
  $this->display($form_id);
87
  }
97
  $group_id = $id;
98
  $date = esc_html($_POST['date']);
99
  $ip = esc_html($_POST['ip']);
100
+ $form_id = (int)$wpdb->get_var("SELECT form_id FROM " . $wpdb->prefix . "formmaker_submits WHERE group_id='" . $id . "'");
101
  $form = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id='" . $form_id . "'");
102
  $label_id = array();
103
  $label_order_original = array();
667
 
668
  public function delete($id) {
669
  global $wpdb;
670
+ $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
671
  $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id="%d"', $id);
672
  if ($wpdb->query($query)) {
673
  echo WDW_FMC_Library::message('Item Succesfully Deleted.', 'updated');
680
 
681
  public function delete_all() {
682
  global $wpdb;
683
+ $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
684
  $cid = ((isset($_POST['post']) && $_POST['post'] != '') ? $_POST['post'] : NULL);
685
+ if (count($cid)) {
686
+ array_walk($cid, create_function('&$value', '$value = (int)$value;'));
687
  $cids = implode(',', $cid);
688
  $query = 'DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id IN ( ' . $cids . ' )';
689
  if ($wpdb->query($query)) {
702
  public function block_ip() {
703
  global $wpdb;
704
  $flag = FALSE;
705
+ $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
706
  $cid = ((isset($_POST['post']) && $_POST['post'] != '') ? $_POST['post'] : NULL);
707
  if (count($cid)) {
708
+ array_walk($cid, create_function('&$value', '$value = (int)$value;'));
709
  $cids = implode(',', $cid);
710
  $query = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id IN ( '. $cids .' )';
711
  $rows = $wpdb->get_results($query);
736
  $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? esc_html($_POST['form_id']) : 0);
737
  $cid = ((isset($_POST['post']) && $_POST['post'] != '') ? $_POST['post'] : NULL);
738
  if (count($cid)) {
739
+ array_walk($cid, create_function('&$value', '$value = (int)$value;'));
740
  $cids = implode(',', $cid);
741
  $query = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id IN ( '. $cids .' )';
742
  $rows = $wpdb->get_results($query);
admin/controllers/FMControllerThemes_fmc.php CHANGED
@@ -20,7 +20,7 @@ class FMControllerThemes_fmc {
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
  public function execute() {
22
  $task = WDW_FMC_Library::get('task');
23
- $id = WDW_FMC_Library::get('current_id', 0);
24
  $message = WDW_FMC_Library::get('message');
25
  echo WDW_FMC_Library::message_id($message);
26
  if (method_exists($this, $task)) {
@@ -56,14 +56,12 @@ class FMControllerThemes_fmc {
56
 
57
  require_once WD_FMC_DIR . "/admin/views/FMViewThemes_fmc.php";
58
  $view = new FMViewThemes_fmc($model);
59
- // $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
60
- $id = WDW_FMC_Library::get('current_id', 0);
61
  $view->edit($id, FALSE);
62
  }
63
 
64
  public function save() {
65
  $message = $this->save_db();
66
- // $this->display();
67
  $page = WDW_FMC_Library::get('page');
68
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
69
  }
@@ -71,11 +69,8 @@ class FMControllerThemes_fmc {
71
  public function apply() {
72
  $message = $this->save_db();
73
  global $wpdb;
74
- // if (!isset($_POST['current_id']) || (esc_html($_POST['current_id']) == 0) || (esc_html($_POST['current_id']) == '')) {
75
-
76
- // }
77
  $id = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'formmaker_themes');
78
- $current_id = WDW_FMC_Library::get('current_id', $id);
79
  $page = WDW_FMC_Library::get('page');
80
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
81
  // $this->edit();
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
  public function execute() {
22
  $task = WDW_FMC_Library::get('task');
23
+ $id = (int)WDW_FMC_Library::get('current_id', 0);
24
  $message = WDW_FMC_Library::get('message');
25
  echo WDW_FMC_Library::message_id($message);
26
  if (method_exists($this, $task)) {
56
 
57
  require_once WD_FMC_DIR . "/admin/views/FMViewThemes_fmc.php";
58
  $view = new FMViewThemes_fmc($model);
59
+ $id = (int)WDW_FMC_Library::get('current_id', 0);
 
60
  $view->edit($id, FALSE);
61
  }
62
 
63
  public function save() {
64
  $message = $this->save_db();
 
65
  $page = WDW_FMC_Library::get('page');
66
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
67
  }
69
  public function apply() {
70
  $message = $this->save_db();
71
  global $wpdb;
 
 
 
72
  $id = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'formmaker_themes');
73
+ $current_id = (int)WDW_FMC_Library::get('current_id', $id);
74
  $page = WDW_FMC_Library::get('page');
75
  WDW_FMC_Library::spider_redirect(add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
76
  // $this->edit();
admin/models/FMModelBlocked_ips_fmc.php CHANGED
@@ -21,8 +21,11 @@ class FMModelBlocked_ips_fmc {
21
  public function get_rows_data() {
22
  global $wpdb;
23
  $where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE `ip` LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
24
- $asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html($_POST['asc_or_desc']) : 'desc');
25
- $order_by = ' ORDER BY ' . ((isset($_POST['order_by']) && esc_html($_POST['order_by']) != '') ? esc_html($_POST['order_by']) : 'id') . ' ' . $asc_or_desc;
 
 
 
26
  if (isset($_POST['page_number']) && $_POST['page_number']) {
27
  $limit = ((int) $_POST['page_number'] - 1) * 20;
28
  }
21
  public function get_rows_data() {
22
  global $wpdb;
23
  $where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE `ip` LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
24
+ $asc_or_desc = ((isset($_POST['asc_or_desc']) && ($_POST['asc_or_desc'] == 'asc' || $_POST['asc_or_desc'] == 'desc')) ? esc_html($_POST['asc_or_desc']) : 'asc');
25
+ $order_by = ((isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) != '') ? esc_html(stripslashes($_POST['order_by'])) : 'id');
26
+ $order_by_array = array('id', 'ip');
27
+ $order_by = in_array($order_by, $order_by_array) ? $order_by : 'id';
28
+ $order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
29
  if (isset($_POST['page_number']) && $_POST['page_number']) {
30
  $limit = ((int) $_POST['page_number'] - 1) * 20;
31
  }
admin/models/FMModelFromeditcountryinpopup_fmc.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class FMModelFromeditcountryinpopup {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Getters & Setters //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ ////////////////////////////////////////////////////////////////////////////////////////
26
+ // Private Methods //
27
+ ////////////////////////////////////////////////////////////////////////////////////////
28
+ ////////////////////////////////////////////////////////////////////////////////////////
29
+ // Listeners //
30
+ ////////////////////////////////////////////////////////////////////////////////////////
31
+ }
admin/models/FMModelGenerete_csv_fmc.php CHANGED
@@ -23,7 +23,7 @@ class FMModelGenerete_csv_fmc {
23
  $is_paypal_info = FALSE;
24
  global $wpdb;
25
  $params = array();
26
- $form_id = $_REQUEST['form_id'];
27
  $paypal_info_fields = array('currency', 'ord_last_modified', 'status', 'full_name', 'fax', 'mobile_phone', 'email', 'phone', 'address', 'paypal_info', 'ipn', 'tax', 'shipping');
28
 
29
  $paypal_info_labels = array( 'Currency', 'Last modified', 'Status', 'Full Name', 'Fax', 'Mobile phone', 'Email', 'Phone', 'Address', 'Paypal info', 'IPN', 'Tax', 'Shipping');
23
  $is_paypal_info = FALSE;
24
  global $wpdb;
25
  $params = array();
26
+ $form_id = (int)$_REQUEST['form_id'];
27
  $paypal_info_fields = array('currency', 'ord_last_modified', 'status', 'full_name', 'fax', 'mobile_phone', 'email', 'phone', 'address', 'paypal_info', 'ipn', 'tax', 'shipping');
28
 
29
  $paypal_info_labels = array( 'Currency', 'Last modified', 'Status', 'Full Name', 'Fax', 'Mobile phone', 'Email', 'Phone', 'Address', 'Paypal info', 'IPN', 'Tax', 'Shipping');
admin/models/FMModelGenerete_xml_fmc.php CHANGED
@@ -23,7 +23,7 @@ class FMModelGenerete_xml_fmc {
23
  $is_paypal_info = FALSE;
24
  global $wpdb;
25
  $params = array();
26
- $form_id = $_REQUEST['form_id'];
27
  $paypal_info_fields = array('ip', 'ord_date', 'ord_last_modified', 'status', 'full_name', 'fax', 'mobile_phone', 'email', 'phone', 'address', 'paypal_info', 'without_paypal_info', 'ipn', 'checkout_method', 'tax', 'shipping', 'shipping_type', 'read');
28
  $paypal_info_labels = array( 'Currency', 'Last modified', 'Status', 'Full Name', 'Fax', 'Mobile phone', 'Email', 'Phone', 'Address', 'Paypal info', 'IPN', 'Tax', 'Shipping');
29
  $query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker_submits where form_id= %d ORDER BY date ASC", $form_id);
23
  $is_paypal_info = FALSE;
24
  global $wpdb;
25
  $params = array();
26
+ $form_id = (int)$_REQUEST['form_id'];
27
  $paypal_info_fields = array('ip', 'ord_date', 'ord_last_modified', 'status', 'full_name', 'fax', 'mobile_phone', 'email', 'phone', 'address', 'paypal_info', 'without_paypal_info', 'ipn', 'checkout_method', 'tax', 'shipping', 'shipping_type', 'read');
28
  $paypal_info_labels = array( 'Currency', 'Last modified', 'Status', 'Full Name', 'Fax', 'Mobile phone', 'Email', 'Phone', 'Address', 'Paypal info', 'IPN', 'Tax', 'Shipping');
29
  $query = $wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker_submits where form_id= %d ORDER BY date ASC", $form_id);
admin/models/FMModelManage_fmc.php CHANGED
@@ -22,8 +22,11 @@ class FMModelManage_fmc {
22
  global $wpdb;
23
  $where = 'WHERE `id` IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')';
24
  $where .= ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? ' AND title LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
25
- $asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html($_POST['asc_or_desc']) : 'asc');
26
- $order_by = ' ORDER BY ' . ((isset($_POST['order_by']) && esc_html($_POST['order_by']) != '') ? esc_html($_POST['order_by']) : 'id') . ' ' . $asc_or_desc;
 
 
 
27
  if (isset($_POST['page_number']) && $_POST['page_number']) {
28
  $limit = ((int) $_POST['page_number'] - 1) * 20;
29
  }
22
  global $wpdb;
23
  $where = 'WHERE `id` IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')';
24
  $where .= ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? ' AND title LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
25
+ $asc_or_desc = ((isset($_POST['asc_or_desc']) && ($_POST['asc_or_desc'] == 'asc' || $_POST['asc_or_desc'] == 'desc')) ? esc_html($_POST['asc_or_desc']) : 'asc');
26
+ $order_by = ((isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) != '') ? esc_html(stripslashes($_POST['order_by'])) : 'id');
27
+ $order_by_array = array('id', 'title', 'mail');
28
+ $order_by = in_array($order_by, $order_by_array) ? $order_by : 'id';
29
+ $order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
30
  if (isset($_POST['page_number']) && $_POST['page_number']) {
31
  $limit = ((int) $_POST['page_number'] - 1) * 20;
32
  }
admin/models/FMModelShow_matrix_fmc.php ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class FMModelShow_matrix {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Getters & Setters //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ ////////////////////////////////////////////////////////////////////////////////////////
26
+ // Private Methods //
27
+ ////////////////////////////////////////////////////////////////////////////////////////
28
+ ////////////////////////////////////////////////////////////////////////////////////////
29
+ // Listeners //
30
+ ////////////////////////////////////////////////////////////////////////////////////////
31
+ }
admin/models/FMModelSubmissions_fmc.php CHANGED
@@ -67,8 +67,8 @@ class FMModelSubmissions_fmc {
67
  $sorted_label_names_original = array();
68
  $where_labels = array();
69
  $where2 = array();
70
- $order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'group_id');
71
- $asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html(stripslashes($_POST['asc_or_desc'])) : 'desc');
72
  $limit = ((isset($_POST['page_number'])) ? ((int) $_POST['page_number'] - 1) * 20 : 0);
73
  $lists['hide_label_list'] = ((isset($_POST['hide_label_list'])) ? esc_html(stripslashes($_POST['hide_label_list'])) : '');
74
  $lists['startdate'] = ((isset($_POST['startdate'])) ? esc_html(stripslashes($_POST['startdate'])) : '');
67
  $sorted_label_names_original = array();
68
  $where_labels = array();
69
  $where2 = array();
70
+ $order_by = ((isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) != '') ? esc_html(stripslashes($_POST['order_by'])) : 'group_id');
71
+ $asc_or_desc = ((isset($_POST['asc_or_desc']) && ($_POST['asc_or_desc'] == 'asc' || $_POST['asc_or_desc'] == 'desc')) ? esc_html($_POST['asc_or_desc']) : 'asc');
72
  $limit = ((isset($_POST['page_number'])) ? ((int) $_POST['page_number'] - 1) * 20 : 0);
73
  $lists['hide_label_list'] = ((isset($_POST['hide_label_list'])) ? esc_html(stripslashes($_POST['hide_label_list'])) : '');
74
  $lists['startdate'] = ((isset($_POST['startdate'])) ? esc_html(stripslashes($_POST['startdate'])) : '');
admin/models/FMModelThemes_fmc.php CHANGED
@@ -21,8 +21,11 @@ class FMModelThemes_fmc {
21
  public function get_rows_data() {
22
  global $wpdb;
23
  $where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE title LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
24
- $asc_or_desc = ((isset($_POST['asc_or_desc'])) ? esc_html($_POST['asc_or_desc']) : 'asc');
25
- $order_by = ' ORDER BY ' . ((isset($_POST['order_by']) && esc_html($_POST['order_by']) != '') ? esc_html($_POST['order_by']) : 'id') . ' ' . $asc_or_desc;
 
 
 
26
  if (isset($_POST['page_number']) && $_POST['page_number']) {
27
  $limit = ((int) $_POST['page_number'] - 1) * 20;
28
  }
21
  public function get_rows_data() {
22
  global $wpdb;
23
  $where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE title LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
24
+ $asc_or_desc = ((isset($_POST['asc_or_desc']) && ($_POST['asc_or_desc'] == 'asc' || $_POST['asc_or_desc'] == 'desc')) ? esc_html($_POST['asc_or_desc']) : 'asc');
25
+ $order_by = ((isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) != '') ? esc_html(stripslashes($_POST['order_by'])) : 'id');
26
+ $order_by_array = array('id', 'title', 'default');
27
+ $order_by = in_array($order_by, $order_by_array) ? $order_by : 'id';
28
+ $order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
29
  if (isset($_POST['page_number']) && $_POST['page_number']) {
30
  $limit = ((int) $_POST['page_number'] - 1) * 20;
31
  }
admin/views/FMViewFromeditcountryinpopup_fmc.php ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class FMViewFromeditcountryinpopup {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ private $model;
14
+
15
+
16
+ ////////////////////////////////////////////////////////////////////////////////////////
17
+ // Constructor & Destructor //
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ public function __construct($model) {
20
+ $this->model = $model;
21
+ }
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Public Methods //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ public function display() {
26
+ $id = ((isset($_GET['field_id'])) ? esc_html(stripslashes($_GET['field_id'])) : 0);
27
+ wp_print_scripts('jquery');
28
+ wp_print_scripts('jquery-ui-core');
29
+ wp_print_scripts('jquery-ui-widget');
30
+ wp_print_scripts('jquery-ui-mouse');
31
+ wp_print_scripts('jquery-ui-slider');
32
+ wp_print_scripts('jquery-ui-sortable');
33
+ ?>
34
+ <span style="position: absolute; right: 8px;">
35
+ <img title="Add" style="cursor: pointer; vertical-align: middle;" src="<?php echo WD_FMC_URL . '/images/save.png'; ?>" onClick="save_list()" />
36
+ <img title="Cancel" style=" cursor: pointer; vertical-align: middle;" src="<?php echo WD_FMC_URL . '/images/cancel_but.png'; ?>" onClick="window.parent.tb_remove();" />
37
+ </span>
38
+ <button class="button-secondary" onClick="select_all()">Select all</button>
39
+ <button class="button-secondary" onClick="remove_all()">Remove all</button>
40
+ <ul id="countries_list" style="list-style: none; padding: 0px;"></ul>
41
+ <script>
42
+ selec_coutries = [];
43
+ coutries = ["", "Afghanistan", "Albania", "Algeria", "Andorra", "Angola", "Antigua and Barbuda", "Argentina", "Armenia", "Australia", "Austria", "Azerbaijan", "Bahamas", "Bahrain", "Bangladesh", "Barbados", "Belarus", "Belgium", "Belize", "Benin", "Bhutan", "Bolivia", "Bosnia and Herzegovina", "Botswana", "Brazil", "Brunei", "Bulgaria", "Burkina Faso", "Burundi", "Cambodia", "Cameroon", "Canada", "Cape Verde", "Central African Republic", "Chad", "Chile", "China", "Colombi", "Comoros", "Congo (Brazzaville)", "Congo", "Costa Rica", "Cote d'Ivoire", "Croatia", "Cuba", "Cyprus", "Czech Republic", "Denmark", "Djibouti", "Dominica", "Dominican Republic", "East Timor (Timor Timur)", "Ecuador", "Egypt", "El Salvador", "Equatorial Guinea", "Eritrea", "Estonia", "Ethiopia", "Fiji", "Finland", "France", "Gabon", "Gambia, The", "Georgia", "Germany", "Ghana", "Greece", "Grenada", "Guatemala", "Guinea", "Guinea-Bissau", "Guyana", "Haiti", "Honduras", "Hungary", "Iceland", "India", "Indonesia", "Iran", "Iraq", "Ireland", "Israel", "Italy", "Jamaica", "Japan", "Jordan", "Kazakhstan", "Kenya", "Kiribati", "Korea, North", "Korea, South", "Kuwait", "Kyrgyzstan", "Laos", "Latvia", "Lebanon", "Lesotho", "Liberia", "Libya", "Liechtenstein", "Lithuania", "Luxembourg", "Macedonia", "Madagascar", "Malawi", "Malaysia", "Maldives", "Mali", "Malta", "Marshall Islands", "Mauritania", "Mauritius", "Mexico", "Micronesia", "Moldova", "Monaco", "Mongolia", "Morocco", "Mozambique", "Myanmar", "Namibia", "Nauru", "Nepa", "Netherlands", "New Zealand", "Nicaragua", "Niger", "Nigeria", "Norway", "Oman", "Pakistan", "Palau", "Panama", "Papua New Guinea", "Paraguay", "Peru", "Philippines", "Poland", "Portugal", "Qatar", "Romania", "Russia", "Rwanda", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent", "Samoa", "San Marino", "Sao Tome and Principe", "Saudi Arabia", "Senegal", "Serbia and Montenegro", "Seychelles", "Sierra Leone", "Singapore", "Slovakia", "Slovenia", "Solomon Islands", "Somalia", "South Africa", "Spain", "Sri Lanka", "Sudan", "Suriname", "Swaziland", "Sweden", "Switzerland", "Syria", "Taiwan", "Tajikistan", "Tanzania", "Thailand", "Togo", "Tonga", "Trinidad and Tobago", "Tunisia", "Turkey", "Turkmenistan", "Tuvalu", "Uganda", "Ukraine", "United Arab Emirates", "United Kingdom", "United States", "Uruguay", "Uzbekistan", "Vanuatu", "Vatican City", "Venezuela", "Vietnam", "Yemen", "Zambia", "Zimbabwe"];
44
+ select_ = window.parent.document.getElementById('<?php echo $id ?>_elementform_id_temp');
45
+ n = select_.childNodes.length;
46
+ for (i = 0; i < n; i++) {
47
+ selec_coutries.push(select_.childNodes[i].value);
48
+ var ch = document.createElement('input');
49
+ ch.setAttribute("type", "checkbox");
50
+ ch.setAttribute("checked", "checked");
51
+ ch.value = select_.childNodes[i].value;
52
+ ch.id = i + "ch";
53
+ //ch.setAttribute("id",i);
54
+ var p = document.createElement('span');
55
+ p.style.cssText = "color:#000000; font-size: 13px; cursor:move";
56
+ p.innerHTML = select_.childNodes[i].value;
57
+ var li = document.createElement('li');
58
+ li.style.cssText = "margin:3px; vertical-align:middle";
59
+ li.id = i;
60
+ li.appendChild(ch);
61
+ li.appendChild(p);
62
+ document.getElementById('countries_list').appendChild(li);
63
+ }
64
+ cur = i;
65
+ m = coutries.length;
66
+ for (i = 0; i < m; i++) {
67
+ isin = isValueInArray(selec_coutries, coutries[i]);
68
+ if (!isin) {
69
+ var ch = document.createElement('input');
70
+ ch.setAttribute("type", "checkbox");
71
+ ch.value = coutries[i];
72
+ ch.id = cur + "ch";
73
+
74
+ var p = document.createElement('span');
75
+ p.style.cssText = "color:#000000; font-size: 13px; cursor:move";
76
+ p.innerHTML = coutries[i];
77
+ var li = document.createElement('li');
78
+ li.style.cssText = "margin:3px; vertical-align:middle";
79
+ li.id = cur;
80
+ li.appendChild(ch);
81
+ li.appendChild(p);
82
+ document.getElementById('countries_list').appendChild(li);
83
+ cur++;
84
+ }
85
+ }
86
+ jQuery(function () {
87
+ jQuery("#countries_list").sortable();
88
+ jQuery("#countries_list").disableSelection();
89
+ });
90
+
91
+ function isValueInArray(arr, val) {
92
+ inArray = false;
93
+ for (x = 0; x < arr.length; x++) {
94
+ if (val == arr[x]) {
95
+ inArray = true;
96
+ }
97
+ }
98
+ return inArray;
99
+ }
100
+ function save_list() {
101
+ select_.innerHTML = ""
102
+ ul = document.getElementById('countries_list');
103
+ n = ul.childNodes.length;
104
+ for (i = 0; i < n; i++) {
105
+ if (ul.childNodes[i].tagName == "LI") {
106
+ id = ul.childNodes[i].id;
107
+ if (document.getElementById(id + 'ch').checked) {
108
+ var option_ = document.createElement('option');
109
+ option_.setAttribute("value", document.getElementById(id + 'ch').value);
110
+ option_.innerHTML = document.getElementById(id + 'ch').value;
111
+ select_.appendChild(option_);
112
+ }
113
+ }
114
+ }
115
+ window.parent.tb_remove();
116
+ }
117
+ function select_all() {
118
+ for (i = 0; i < 194; i++) {
119
+ document.getElementById(i + 'ch').checked = true;
120
+ }
121
+ }
122
+ function remove_all() {
123
+ for (i = 0; i < 194; i++) {
124
+ document.getElementById(i + 'ch').checked = false;
125
+ }
126
+ }
127
+ </script>
128
+ <?php
129
+ die();
130
+ }
131
+
132
+ ////////////////////////////////////////////////////////////////////////////////////////
133
+ // Getters & Setters //
134
+ ////////////////////////////////////////////////////////////////////////////////////////
135
+ ////////////////////////////////////////////////////////////////////////////////////////
136
+ // Private Methods //
137
+ ////////////////////////////////////////////////////////////////////////////////////////
138
+ ////////////////////////////////////////////////////////////////////////////////////////
139
+ // Listeners //
140
+ ////////////////////////////////////////////////////////////////////////////////////////
141
+ }
admin/views/FMViewShow_matrix_fmc.php ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class FMViewShow_matrix {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ private $model;
14
+
15
+
16
+ ////////////////////////////////////////////////////////////////////////////////////////
17
+ // Constructor & Destructor //
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ public function __construct($model) {
20
+ $this->model = $model;
21
+ }
22
+ ////////////////////////////////////////////////////////////////////////////////////////
23
+ // Public Methods //
24
+ ////////////////////////////////////////////////////////////////////////////////////////
25
+ public function display() {
26
+ $matrix_params = ((isset($_GET['matrix_params'])) ? esc_html(stripslashes($_GET['matrix_params'])) : 0);
27
+ $new_filename = str_replace("***matrix***", '', $matrix_params);
28
+ $new_filename = explode('***', $matrix_params);
29
+ $mat_params = array_slice($new_filename, 0, count($new_filename) - 1);
30
+ $mat_rows = $mat_params[0];
31
+ $mat_columns = $mat_params[$mat_rows + 1];
32
+ ?>
33
+ <table style="margin: 0 auto;">
34
+ <tr>
35
+ <td></td>
36
+ <?php
37
+ for ($k = 1; $k <= $mat_columns; $k++) {
38
+ ?>
39
+ <td style="background-color: #BBBBBB; padding: 5px;"><?php echo $mat_params[$mat_rows + 1 + $k]; ?></td>
40
+ <?php
41
+ }
42
+ ?>
43
+ </tr>
44
+ <?php
45
+ $aaa = Array();
46
+ $var_checkbox = 1;
47
+ for ($k = 1; $k <= $mat_rows; $k++) {
48
+ ?>
49
+ <tr>
50
+ <td style="background-color: #BBBBBB; padding: 5px; "><?php echo $mat_params[$k]; ?></td>
51
+ <?php
52
+ if ($mat_params[$mat_rows + $mat_columns + 2] == "radio") {
53
+ if ($mat_params[$mat_rows + $mat_columns + 2 + $k] == 0) {
54
+ $checked = 0;
55
+ $aaa[1] = "";
56
+ }
57
+ else {
58
+ $aaa = explode("_", $mat_params[$mat_rows + $mat_columns + 2 + $k]);
59
+ }
60
+ for ($l = 1; $l <= $mat_columns; $l++) {
61
+ if ($aaa[1] == $l) {
62
+ $checked = "checked";
63
+ }
64
+ else {
65
+ $checked = "";
66
+ }
67
+ ?>
68
+ <td style="text-align: center;"><input type="radio" <?php echo $checked; ?> disabled /></td>
69
+ <?php
70
+ }
71
+ }
72
+ else {
73
+ if ($mat_params[$mat_rows + $mat_columns + 2] == "checkbox") {
74
+ for ($l = 1; $l <= $mat_columns; $l++) {
75
+ if ($mat_params[$mat_rows+$mat_columns + 2 + $var_checkbox] == "1") {
76
+ $checked = "checked";
77
+ }
78
+ else {
79
+ $checked = "";
80
+ }
81
+ ?>
82
+ <td style="text-align:center"><input type="checkbox" <?php echo $checked; ?> disabled /></td>
83
+ <?php
84
+ $var_checkbox++;
85
+ }
86
+ }
87
+ else {
88
+ if ($mat_params[$mat_rows + $mat_columns + 2] == "text") {
89
+ for ($l = 1; $l <= $mat_columns; $l++) {
90
+ $checked = $mat_params[$mat_rows + $mat_columns + 2 + $var_checkbox];
91
+ ?>
92
+ <td style="text-align:center"><input type="text" value="<?php echo $checked; ?>" disabled /></td>
93
+ <?php
94
+ $var_checkbox++;
95
+ }
96
+ }
97
+ else {
98
+ for ($l = 1; $l <= $mat_columns; $l++) {
99
+ $checked = $mat_params[$mat_rows + $mat_columns + 2 + $var_checkbox];
100
+ ?>
101
+ <td style="text-align: center;"><?php echo $checked; ?></td>
102
+ <?php
103
+ $var_checkbox++;
104
+ }
105
+ }
106
+ }
107
+ }
108
+ ?>
109
+ </tr>
110
+ <?php
111
+ }
112
+ ?>
113
+ </table>
114
+ <?php
115
+ die();
116
+ }
117
+
118
+ ////////////////////////////////////////////////////////////////////////////////////////
119
+ // Getters & Setters //
120
+ ////////////////////////////////////////////////////////////////////////////////////////
121
+ ////////////////////////////////////////////////////////////////////////////////////////
122
+ // Private Methods //
123
+ ////////////////////////////////////////////////////////////////////////////////////////
124
+ ////////////////////////////////////////////////////////////////////////////////////////
125
+ // Listeners //
126
+ ////////////////////////////////////////////////////////////////////////////////////////
127
+ }
contact-form-maker.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Contact Form Maker
4
  * Plugin URI: http://web-dorado.com/products/form-maker-wordpress.html
5
  * Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
6
- * Version: 1.7.30
7
  * Author: WebDorado
8
  * Author URI: http://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -196,7 +196,7 @@ if (class_exists('WP_Widget')) {
196
  // Activate plugin.
197
  function form_maker_activate_cfm() {
198
  $version = get_option("wd_form_maker_version");
199
- $new_version = '1.7.28';
200
  if (!$version) {
201
  add_option("wd_form_maker_version", $new_version, '', 'no');
202
  global $wpdb;
3
  * Plugin Name: Contact Form Maker
4
  * Plugin URI: http://web-dorado.com/products/form-maker-wordpress.html
5
  * Description: This plugin is a modern and advanced tool for easy and fast creating of a WordPress Form. The backend interface is intuitive and user friendly which allows users far from scripting and programming to create WordPress Forms.
6
+ * Version: 1.7.31
7
  * Author: WebDorado
8
  * Author URI: http://web-dorado.com/
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
196
  // Activate plugin.
197
  function form_maker_activate_cfm() {
198
  $version = get_option("wd_form_maker_version");
199
+ $new_version = '1.7.31';
200
  if (!$version) {
201
  add_option("wd_form_maker_version", $new_version, '', 'no');
202
  global $wpdb;
css/form_maker_featured_plugins.css ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #main_featured_plugins_page #featured-plugins-list {
2
+ position:relative;
3
+ margin:0px auto;
4
+ width:90%;
5
+ height:auto;
6
+ display:table;
7
+ list-style:none;
8
+ }
9
+
10
+ #main_featured_plugins_page #featured-plugins-list li {
11
+ display:block;
12
+ height:113px;
13
+ padding:15px 5% 15px 5%;
14
+ margin:0px 0px 12px 0px;
15
+ background:#ededed;
16
+ }
17
+
18
+ #main_featured_plugins_page #featured-plugins-list li .product {
19
+ position:relative;
20
+ float:left;
21
+ width:35%;
22
+ height:113px;
23
+ }
24
+
25
+ #main_featured_plugins_page #featured-plugins-list li .title {
26
+ float:left;
27
+ height:113px;
28
+ width:90%;
29
+ margin:0px 0px 0px 109px;
30
+ background:#cacaca;
31
+ border-top-right-radius:3px;
32
+ border-bottom-right-radius:3px;
33
+ }
34
+
35
+ #main_featured_plugins_page #featured-plugins-list li.photo-gallery .product {background:url("images/photo-gallery.jpg") left center no-repeat;}
36
+ #main_featured_plugins_page #featured-plugins-list li.twitter-widget .product {background:url("images/twitter-widget.jpg") left center no-repeat;}
37
+ #main_featured_plugins_page #featured-plugins-list li.form-maker .product {background:url("images/form.jpg") left center no-repeat;}
38
+ #main_featured_plugins_page #featured-plugins-list li.catalog .product {background:url("images/catalog.jpg") left center no-repeat;}
39
+ #main_featured_plugins_page #featured-plugins-list li.contact-maker .product {background:url("images/contact.maker.jpg") left center no-repeat;}
40
+ #main_featured_plugins_page #featured-plugins-list li.contacts .product {background:url("images/contacts.jpg") left center no-repeat;}
41
+ #main_featured_plugins_page #featured-plugins-list li.facebook .product {background:url("images/facebook.jpg") left center no-repeat;}
42
+ #main_featured_plugins_page #featured-plugins-list li.faq .product {background:url("images/faq.jpg") left center no-repeat;}
43
+ #main_featured_plugins_page #featured-plugins-list li.flash-calendar .product {background:url("images/flash.calendar.jpg") left center no-repeat;}
44
+ #main_featured_plugins_page #featured-plugins-list li.folder-menu .product {background:url("images/folder.menu.jpg") left center no-repeat;}
45
+ #main_featured_plugins_page #featured-plugins-list li.player .product {background:url("images/player.jpg") left center no-repeat;}
46
+ #main_featured_plugins_page #featured-plugins-list li.spider-calendar .product {background:url("images/spider.calendar.jpg") left center no-repeat;}
47
+ #main_featured_plugins_page #featured-plugins-list li.zoom .product {background:url("images/zoom.jpg") left center no-repeat;}
48
+
49
+
50
+ #main_featured_plugins_page #featured-plugins-list li .title .heading {
51
+ display:block;
52
+ position:relative;
53
+ font-size:24px;
54
+ color:#014f73;
55
+ margin:30px 0px -10px 20px;
56
+ }
57
+
58
+ #main_featured_plugins_page #featured-plugins-list li .title p {
59
+ font-size:14px;
60
+ color:#444;
61
+ margin-left:20px;
62
+ }
63
+
64
+ #main_featured_plugins_page #featured-plugins-list li .description {
65
+ float:right;
66
+ width:50%;
67
+ height:113px;
68
+ }
69
+
70
+ #main_featured_plugins_page #featured-plugins-list li .description p {
71
+ text-align:right;
72
+ }
73
+
74
+ #main_featured_plugins_page #featured-plugins-list li .description a.download, #main_featured_plugins_page #featured-plugins-list li .description a.download:link, #main_featured_plugins_page #featured-plugins-list li .description a.download:visited {
75
+ display:block;
76
+ width:106px;
77
+ height:32px;
78
+ text-indent:-9999px;
79
+ background:url(images/download.jpg) left top no-repeat;
80
+ float:right;
81
+ }
css/images/catalog.jpg ADDED
Binary file
css/images/contact.maker.jpg ADDED
Binary file
css/images/contacts.jpg ADDED
Binary file
css/images/download.jpg ADDED
Binary file
css/images/facebook.jpg ADDED
Binary file
css/images/faq.jpg ADDED
Binary file
css/images/flash.calendar.jpg ADDED
Binary file
css/images/folder.menu.jpg ADDED
Binary file
css/images/photo-gallery.jpg ADDED
Binary file
css/images/player.jpg ADDED
Binary file
css/images/spider.calendar.jpg ADDED
Binary file
css/images/twitter-widget.jpg ADDED
Binary file
css/images/zoom.jpg ADDED
Binary file
frontend/models/FMModelForm_maker_fmc.php CHANGED
@@ -65,7 +65,7 @@ class FMModelForm_maker_fmc {
65
  $id = '';
66
  }
67
  if (isset($_POST["counter" . $id])) {
68
- $counter = esc_html($_POST["counter" . $id]);
69
  if (isset($_POST["captcha_input"])) {
70
  $captcha_input = esc_html($_POST["captcha_input"]);
71
  $session_wd_captcha_code = isset($_SESSION[$id . '_wd_captcha_code']) ? $_SESSION[$id . '_wd_captcha_code'] : '-';
65
  $id = '';
66
  }
67
  if (isset($_POST["counter" . $id])) {
68
+ $counter = (int)esc_html($_POST["counter" . $id]);
69
  if (isset($_POST["captcha_input"])) {
70
  $captcha_input = esc_html($_POST["captcha_input"]);
71
  $session_wd_captcha_code = isset($_SESSION[$id . '_wd_captcha_code']) ? $_SESSION[$id . '_wd_captcha_code'] : '-';
readme.txt CHANGED
@@ -1,10 +1,10 @@
1
  === Contact Form Maker ===
2
  Contributors: webdorado
3
  Donate link: http://web-dorado.com/products/wordpress-contact-form-maker-plugin.html
4
- Tags: form, forms, contact form, contact forms, contact form plugin,contact forms plugin, forms plugin, Contact Form Builder, contact form manager, multiple contac forms, custom form, Contact form maker with recaptcha, contact form with google map, feedback form, feedback forms, contact us, admin, captcha, contact, database, email, javascript, jquery, page, plugin, survey, widget, custom form, forms creator, input, validation, send copy
5
  Requires at least: 3.4
6
  Tested up to: 4.2
7
- Stable tag: 1.7.30
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -145,6 +145,8 @@ If you want to update the plugin while preserving your existing contact forms, y
145
  8. Contact Form Maker - Select Columns
146
 
147
  == Changelog ==
 
 
148
  = 1.7.29 =
149
  * Cache issue fixed
150
  = 1.7.28 =
1
  === Contact Form Maker ===
2
  Contributors: webdorado
3
  Donate link: http://web-dorado.com/products/wordpress-contact-form-maker-plugin.html
4
+ Tags: form, forms, contact form, contact forms, contact form plugin, contact forms plugin, forms plugin, Contact Form Builder, contact form manager, multiple contac forms, custom form, Contact form maker with recaptcha, contact form with google map, feedback form, feedback forms, contact us, admin, captcha, contact, database, email, javascript, jquery, page, plugin, survey, widget, custom form, forms creator, input, validation, send copy, survey form, contact form with captcha
5
  Requires at least: 3.4
6
  Tested up to: 4.2
7
+ Stable tag: 1.7.31
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
145
  8. Contact Form Maker - Select Columns
146
 
147
  == Changelog ==
148
+ = 1.7.31 =
149
+ Security issue fixed
150
  = 1.7.29 =
151
  * Cache issue fixed
152
  = 1.7.28 =