Form Maker by WD – user-friendly drag & drop Form Builder plugin - Version 1.12.24

Version Description

  • Improved: Insert placeholder functionality.
  • Fixed: Action after submission text for popup forms.
  • Fixed: Do not allow negative numbers as quantity.
  • Added: Loading for add-ons options.
  • Added: Premium version page new style.
  • Added: Add-ons page new style.
  • Fixed: Submission id bug.
  • Fixed: Security issue reported by Sairam Jetty.
Download this release

Release Info

Developer webdorado
Plugin Icon 128x128 Form Maker by WD – user-friendly drag & drop Form Builder plugin
Version 1.12.24
Comparing to
See all releases

Code changes from version 1.12.22 to 1.12.24

Files changed (87) hide show
  1. admin/controllers/Addons_fm.php +155 -0
  2. admin/controllers/Generete_csv.php +2 -2
  3. admin/controllers/Licensing_fm.php +0 -26
  4. admin/controllers/Manage_fm.php +97 -95
  5. admin/controllers/Pricing_fm.php +54 -0
  6. admin/models/Manage_fm.php +2 -2
  7. admin/models/Uninstall_fm.php +1 -0
  8. admin/views/Addons_fm.php +84 -0
  9. admin/views/FMShortocde.php +8 -6
  10. admin/views/Licensing_fm.php +0 -58
  11. admin/views/Manage_fm.php +253 -330
  12. admin/views/Pricing_fm.php +174 -0
  13. admin/views/Submissions_fm.php +6 -0
  14. admin/views/Themes_fm.php +1 -1
  15. admin/views/Uninstall_fm.php +2 -0
  16. admin/views/view.php +290 -5
  17. assets/add-ons-icon.png +0 -0
  18. assets/calculator.png +0 -0
  19. assets/conditional-emails-update.png +0 -0
  20. assets/dropbox-integration-update.png +0 -0
  21. assets/form-maker.png +0 -0
  22. assets/google_drive_integration.png +0 -0
  23. assets/import_export.png +0 -0
  24. assets/mailchimp.png +0 -0
  25. assets/pdf-integration.png +0 -0
  26. assets/post-generation-update.png +0 -0
  27. assets/pushover.png +0 -0
  28. assets/reg.png +0 -0
  29. assets/save-progress.png +0 -0
  30. assets/stripe-integration-update.png +0 -0
  31. assets/updates_icon.jpg +0 -0
  32. css/form_maker_frontend.css +2 -1
  33. css/form_maker_tables.css +176 -65
  34. css/license.css +0 -158
  35. css/pricing.css +860 -0
  36. css/style.css +1 -1
  37. featured/admin.css +0 -741
  38. featured/featured.php +0 -163
  39. featured/images/Add_Ons.jpg +0 -0
  40. featured/images/calendar.png +0 -0
  41. featured/images/calendar1.png +0 -0
  42. featured/images/calendar_hover.png +0 -0
  43. featured/images/calendar_menu.png +0 -0
  44. featured/images/delete_el.png +0 -0
  45. featured/images/down.png +0 -0
  46. featured/images/downarrow.png +0 -0
  47. featured/images/download.jpg +0 -0
  48. featured/images/download_plugins.png +0 -0
  49. featured/images/form.png +0 -0
  50. featured/images/form_import.png +0 -0
  51. featured/images/index.html +0 -11
  52. featured/images/loadingAnimation.gif +0 -0
  53. featured/images/tb-close.png +0 -0
  54. featured/images/up.png +0 -0
  55. featured/index.html +0 -11
  56. featured/style.css +0 -208
  57. featured/updates.php +0 -158
  58. form-maker.php +28 -212
  59. form_maker_insert.php +11 -5
  60. form_maker_update.php +9 -0
  61. framework/WDW_FM_Library.php +64 -59
  62. frontend/models/form_maker.php +1834 -1964
  63. frontend/views/form_maker.php +57 -102
  64. images/FormMaker.png +0 -0
  65. images/addons/Form 13.svg +17 -0
  66. images/addons/calculator.svg +25 -0
  67. images/addons/conditional_emails.svg +20 -0
  68. images/addons/dropbox_integration.svg +21 -0
  69. images/addons/gdrive_integration.svg +38 -0
  70. images/addons/import_export.svg +24 -0
  71. images/addons/mailchimp.svg +83 -0
  72. images/addons/pdf_integration.svg +44 -0
  73. images/addons/post_generation.svg +36 -0
  74. images/addons/pushover.svg +28 -0
  75. images/addons/registration.svg +29 -0
  76. images/addons/save_progress.svg +19 -0
  77. images/addons/stripe.svg +37 -0
  78. images/support.png +0 -0
  79. images/wd_logo.png +0 -0
  80. js/add_field.js +23 -10
  81. js/form_maker_admin.js +42 -3
  82. js/form_maker_form_options.js +74 -2
  83. js/form_maker_manage.js +5 -29
  84. js/main_div_front_end.js +28 -18
  85. js/shortcode.js +5 -3
  86. js/themes.js +2 -2
  87. readme.txt +13 -3
admin/controllers/Addons_fm.php ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class FMControllerAddons_fm
4
+ */
5
+ class FMControllerAddons_fm {
6
+ /**
7
+ * @var $model
8
+ */
9
+ private $model;
10
+ /**
11
+ * @var $view
12
+ */
13
+ private $view;
14
+ /**
15
+ * @var string $page
16
+ */
17
+ private $page;
18
+
19
+ public function __construct() {
20
+ $this->page = WDW_FM_Library::get('page');
21
+ $this->page_url = add_query_arg( array (
22
+ 'page' => $this->page,
23
+ WDFM()->nonce => wp_create_nonce(WDFM()->nonce),
24
+ ), admin_url('admin.php')
25
+ );
26
+ require_once WDFM()->plugin_dir . "/admin/views/Addons_fm.php";
27
+ $this->view = new FMViewAddons_fm();
28
+ }
29
+
30
+ /**
31
+ * Execute.
32
+ */
33
+ public function execute() {
34
+ $task = WDW_FM_Library::get('task');
35
+ $id = (int) WDW_FM_Library::get('current_id', 0);
36
+ if (method_exists($this, $task)) {
37
+ $this->$task($id);
38
+ }
39
+ else {
40
+ $this->display();
41
+ }
42
+ }
43
+
44
+ /**
45
+ * Display.
46
+ */
47
+ public function display() {
48
+ // Set params for view.
49
+ $params = array();
50
+ $params['page'] = $this->page;
51
+ $params['page_url'] = $this->page_url;
52
+ $params['addons'] = array(
53
+ 'Form Maker Add-ons' => array(
54
+ 'imp_exp' => array(
55
+ 'pro' => false,
56
+ 'dir' => 'form-maker-export-import/fm_exp_imp.php',
57
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/export-import.html',
58
+ 'icon' => WDFM()->plugin_url . '/images/addons/import_export.svg',
59
+ 'name' => __('Import/Export', WDFM()->prefix),
60
+ 'description' => __('Form Maker Export/Import WordPress plugin allows exporting and importing forms with/without submissions.', WDFM()->prefix)
61
+ ),
62
+ 'mailchimp' => array(
63
+ 'pro' => false,
64
+ 'dir' => 'form-maker-mailchimp/fm_mailchimp.php',
65
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/mailchimp.html',
66
+ 'icon' => WDFM()->plugin_url . '/images/addons/mailchimp.svg',
67
+ 'name' => __('MailChimp', WDFM()->prefix),
68
+ 'description' => __('This add-on is an integration of the Form Maker with MailChimp which allows to add contacts to your subscription lists just from submitted forms.', WDFM()->prefix)
69
+ ),
70
+ 'registration' => array(
71
+ 'pro' => false,
72
+ 'dir' => 'form-maker-reg/fm_reg.php',
73
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/registration.html',
74
+ 'icon' => WDFM()->plugin_url . '/images/addons/registration.svg',
75
+ 'name' => __('Registration', WDFM()->prefix),
76
+ 'description' => __('User Registration add-on integrates with Form maker forms allowing users to create accounts at your website.', WDFM()->prefix)
77
+ ),
78
+ 'post_generation' => array(
79
+ 'pro' => false,
80
+ 'dir' => 'form-maker-post-generation/fm_post_generation.php',
81
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/post-generation.html',
82
+ 'icon' => WDFM()->plugin_url . '/images/addons/post_generation.svg',
83
+ 'name' => __('Post Generation', WDFM()->prefix),
84
+ 'description' => 'Post Generation add-on allows creating a post, page or custom post based on the submitted data.',
85
+ ),
86
+ 'conditional_emails' => array(
87
+ 'pro' => false,
88
+ 'dir' => 'form-maker-conditional-emails/fm_conditional_emails.php',
89
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/conditional-emails.html',
90
+ 'icon' => WDFM()->plugin_url . '/images/addons/conditional_emails.svg',
91
+ 'name' => __('Conditional Emails', WDFM()->prefix),
92
+ 'description' => __('Conditional Emails add-on allows to send emails to different recipients depending on the submitted data .', WDFM()->prefix)
93
+ ),
94
+ 'dropbox_integration' => array(
95
+ 'pro' => true,
96
+ 'dir' => 'form-maker-dropbox-integration/fm_dropbox_integration.php',
97
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/dropbox.html',
98
+ 'icon' => WDFM()->plugin_url . '/images/addons/dropbox_integration.svg',
99
+ 'name' => __('Dropbox Integration', WDFM()->prefix),
100
+ 'description' => __('The Form Maker Dropbox Integration addon is extending the Form Maker capabilities allowing to store the form attachments straight to your Dropbox account.', WDFM()->prefix)
101
+ ),
102
+ 'gdrive_integration' => array(
103
+ 'pro' => true,
104
+ 'dir' => 'form-maker-gdrive-integration/fm_gdrive_integration.php',
105
+ 'name' => 'Google Drive Integration',
106
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/google-drive.html',
107
+ 'icon' => WDFM()->plugin_url . '/images/addons/gdrive_integration.svg',
108
+ 'name' => __('Google Drive Integration', WDFM()->prefix),
109
+ 'description' => __('The Google Drive Integration add-on integrates Form Maker with Google Drive and allows you to send the file uploads to the Google Drive', WDFM()->prefix)
110
+ ),
111
+ 'pdf_integration' => array(
112
+ 'pro' => false,
113
+ 'dir' => 'form-maker-pdf-integration/fm_pdf_integration.php',
114
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/pdf.html',
115
+ 'icon' => WDFM()->plugin_url . '/images/addons/pdf_integration.svg',
116
+ 'name' => __('PDF Integration', WDFM()->prefix),
117
+ 'description' => __('The Form Maker PDF Integration add-on allows sending submitted forms in PDF format.', WDFM()->prefix)
118
+ ),
119
+ 'pushover' => array(
120
+ 'pro' => false,
121
+ 'dir' => 'form-maker-pushover/fm_pushover.php',
122
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/pushover.html',
123
+ 'icon' => WDFM()->plugin_url . '/images/addons/pushover.svg',
124
+ 'name' => __('Pushover', WDFM()->prefix),
125
+ 'description' => __('Form Maker Pushover integration allows to receive real-time notifications when a user submits a new form. This means messages can be pushed to Android and Apple devices, as well as desktop notification board.', WDFM()->prefix)
126
+ ),
127
+ 'form-maker-save-progress' => array(
128
+ 'pro' => false,
129
+ 'dir' => 'form-maker-save-progress/fm_save.php',
130
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/save-progress.html',
131
+ 'icon' => WDFM()->plugin_url . '/images/addons/save_progress.svg',
132
+ 'name' => __('Save Progress', WDFM()->prefix),
133
+ 'description' => __('The add-on allows to save filled in forms as draft and continue editing them subsequently.', WDFM()->prefix)
134
+ ),
135
+ 'stripe' => array(
136
+ 'pro' => true,
137
+ 'dir' => 'form-maker-stripe/fm_stripe.php',
138
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html',
139
+ 'icon' => WDFM()->plugin_url . '/images/addons/stripe.svg',
140
+ 'name' => __('Stripe', WDFM()->prefix),
141
+ 'description' => __('Form Maker Stripe Integration Add-on allows to accept direct payments made by Credit Cards. Users will remain on your website during the entire process.', WDFM()->prefix)
142
+ ),
143
+ 'calculator' => array(
144
+ 'pro' => false,
145
+ 'dir' => 'form-maker-calculator/fm_calculator.php',
146
+ 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/calculator.html',
147
+ 'icon' => WDFM()->plugin_url . '/images/addons/calculator.svg',
148
+ 'name' => __('Calculator', WDFM()->prefix),
149
+ 'description' => __('The Form Maker Calculator add-on allows creating forms with dynamically calculated fields.', WDFM()->prefix)
150
+ )
151
+ )
152
+ );
153
+ $this->view->display( $params );
154
+ }
155
+ }
admin/controllers/Generete_csv.php CHANGED
@@ -87,13 +87,13 @@ class FMControllerGenerete_csv {
87
 
88
  if ( $limitstart == 0 ) {
89
  foreach ($sorted_label_names_original as $i => $rec) {
90
- $sorted_label_names_original[$i] = ltrim($rec, '=');
91
  }
92
  fputcsv($output, $sorted_label_names_original, $csv_delimiter);
93
  }
94
  foreach ( $data as $record ) {
95
  foreach ($record as $i => $rec) {
96
- $record[$i] = ltrim($rec, '=');
97
  }
98
  fputcsv($output, $record, $csv_delimiter);
99
  }
87
 
88
  if ( $limitstart == 0 ) {
89
  foreach ($sorted_label_names_original as $i => $rec) {
90
+ $sorted_label_names_original[$i] = ltrim($rec, '=+-@');
91
  }
92
  fputcsv($output, $sorted_label_names_original, $csv_delimiter);
93
  }
94
  foreach ( $data as $record ) {
95
  foreach ($record as $i => $rec) {
96
+ $record[$i] = ltrim($rec, '=+-@');
97
  }
98
  fputcsv($output, $record, $csv_delimiter);
99
  }
admin/controllers/Licensing_fm.php DELETED
@@ -1,26 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class FMControllerLicensing_fm
5
- */
6
- class FMControllerLicensing_fm {
7
- private $view;
8
- public function __construct() {
9
- require_once WDFM()->plugin_dir . "/admin/views/Licensing_fm.php";
10
- $this->view = new FMViewLicensing_fm();
11
- }
12
- public function execute() {
13
- $task = WDW_FM_Library::get('task');
14
- $id = (int) WDW_FM_Library::get('current_id', 0);
15
- if (method_exists($this, $task)) {
16
- $this->$task($id);
17
- }
18
- else {
19
- $this->display();
20
- }
21
- }
22
-
23
- public function display() {
24
- $this->view->display();
25
- }
26
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/controllers/Manage_fm.php CHANGED
@@ -456,120 +456,122 @@ class FMControllerManage_fm {
456
  public function form_options( $id ) {
457
  // Set params for view.
458
  $params = array();
459
- $params['id'] = $id;
460
- $params['page'] = $this->page;
461
- $params['page_url'] = $this->page_url;
462
 
463
- $params['back_url'] = add_query_arg( array (
464
- 'page' => 'manage' . WDFM()->menu_postfix,
465
- 'task' => 'edit',
466
- 'current_id' => $id,
467
-
468
- ), admin_url('admin.php')
469
- );
470
-
471
- $params['fieldset_id'] = WDW_FM_Library::get('fieldset_id', 'general');
472
-
473
- $params['row'] = $this->model->get_row_data($id);
474
- if ( empty($params['row']) ) {
475
- WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $this->page), admin_url('admin.php')));
476
  }
477
-
478
- $params['themes'] = $this->model->get_theme_rows_data();
479
- $params['default_theme'] = $this->model->get_default_theme_id();
480
- $params['queries'] = $this->model->get_queries_rows_data($id);
481
- $params['userGroups'] = get_editable_roles();
482
- $params['page_title'] = '"' . $params['row']->title . '" ' . __('options', WDFM()->prefix);
483
-
484
  $label_id = array();
485
  $label_label = array();
 
486
  $label_type = array();
487
- $label_all = explode('#****#', $params['row']->label_order_current);
488
- $label_all = array_slice($label_all, 0, count($label_all) - 1);
489
  foreach ( $label_all as $key => $label_each ) {
490
- $label_id_each = explode('#**id**#', $label_each);
491
- array_push($label_id, $label_id_each[0]);
492
- $label_order_each = explode('#**label**#', $label_id_each[1]);
493
- array_push($label_label, $label_order_each[0]);
494
- array_push($label_type, $label_order_each[1]);
 
495
  }
496
- $params['fields'] = explode('*:*id*:*type_submitter_mail*:*type*:*', $params['row']->form_fields);
497
- $params['fields_count'] = count($params['fields']);
498
-
499
- // chechk stripe addon is active.
500
- $stripe_addon = array('enable' => 0);
501
- $addon_stripe = $this->get_stripe_addon($id);
502
- if( !empty($addon_stripe['html']) ) {
503
- $stripe_addon = $addon_stripe;
504
- }
505
- $params['stripe_addon'] = $stripe_addon;
506
-
507
- /*
508
- TODO.
509
- Remember. 0 => none, 1 => paypal, 2 => stripe
510
- Change. rename paypal_mode name to payment_method of wp_formmaker table.
511
- */
512
- $paypal_mode = $params['row']->paypal_mode;
513
- $payment_method = 'none';
514
- if($paypal_mode == 1){
515
- $payment_method = 'paypal';
516
- }
517
- if($paypal_mode == 2 && isset($stripe_addon['stripe_enable']) && $stripe_addon['stripe_enable'] == 1 ){
518
- $payment_method = 'stripe';
519
- }
520
-
521
- $params['payment_method'] = $payment_method;
522
- $params['label_label'] = $label_label;
523
- $params['label_type'] = $label_type;
524
- $params['labels_for_submissions'] = $this->model->get_labels($id);
525
- $params['payment_info'] = $this->model->is_paypal($id);
526
 
527
  $labels_id_for_submissions = array();
528
  $label_titles_for_submissions = array();
529
  $labels_type_for_submissions = array();
530
- if ( $params['labels_for_submissions'] ) {
531
  $label_id_for_submissions = array();
532
  $label_order_original_for_submissions = array();
533
  $label_type_for_submissions = array();
534
- if ( strpos($params['row']->label_order, 'type_paypal_') ) {
535
- $params['row']->label_order = $params['row']->label_order . "item_total#**id**#Item Total#**label**#type_paypal_payment_total#****#total#**id**#Total#**label**#type_paypal_payment_total#****#0#**id**#Payment Status#**label**#type_paypal_payment_status#****#";
536
  }
537
- $label_all_for_submissions = explode('#****#', $params['row']->label_order);
538
- $label_all_for_submissions = array_slice($label_all_for_submissions, 0, count($label_all_for_submissions) - 1);
539
  foreach ( $label_all_for_submissions as $key => $label_each ) {
540
- $label_id_each = explode('#**id**#', $label_each);
541
- array_push($label_id_for_submissions, $label_id_each[0]);
542
- $label_order_each = explode('#**label**#', $label_id_each[1]);
543
- array_push($label_order_original_for_submissions, $label_order_each[0]);
544
- array_push($label_type_for_submissions, $label_order_each[1]);
545
  }
546
  foreach ( $label_id_for_submissions as $key => $label ) {
547
- if ( in_array($label, $params['labels_for_submissions']) ) {
548
- array_push($labels_type_for_submissions, $label_type_for_submissions[$key]);
549
- array_push($labels_id_for_submissions, $label);
550
- array_push($label_titles_for_submissions, $label_order_original_for_submissions[$key]);
551
  }
552
  }
553
- $params['labels_id_for_submissions'] = $labels_id_for_submissions;
554
- $params['label_titles_for_submissions'] = $label_titles_for_submissions;
555
  }
556
-
557
  $stats_labels = array();
558
  $stats_labels_ids = array();
559
  foreach ( $labels_type_for_submissions as $key => $label_type_cur ) {
560
  if ( $label_type_cur == "type_checkbox" || $label_type_cur == "type_radio" || $label_type_cur == "type_own_select" || $label_type_cur == "type_country" || $label_type_cur == "type_paypal_select" || $label_type_cur == "type_paypal_radio" || $label_type_cur == "type_paypal_checkbox" || $label_type_cur == "type_paypal_shipping" ) {
561
- $stats_labels_ids[] = $labels_id_for_submissions[$key];
562
- $stats_labels[] = $label_titles_for_submissions[$key];
563
  }
564
  }
565
-
566
- $params['stats_labels_ids'] = $stats_labels_ids;
567
- $params['stats_labels'] = $stats_labels;
568
- $params['mail_ver_id'] = $this->model->get_emailverification_post_id();
569
 
570
- $params['addons'] = $this->get_addon_tabs( array('form_id' => $id) );
 
 
571
 
572
- $this->view->form_options($params);
 
 
573
  }
574
 
575
  /**
@@ -645,9 +647,9 @@ function before_reset() {
645
  if ( $reply_to == "other" ) {
646
  $reply_to = stripslashes(WDW_FM_Library::get('reply_to_other', ''));
647
  }
648
- $script_mail = WDW_FM_Library::get('script_mail', '%all%', FALSE);
649
  if ( $script_mail == '' ) {
650
- $script_mail = '%all%';
651
  }
652
  $mail_from_user = WDW_FM_Library::get('mail_from_user', '');
653
  $mail_from_name_user = WDW_FM_Library::get('mail_from_name_user', '');
@@ -663,9 +665,9 @@ function before_reset() {
663
  $mail_mode_user = WDW_FM_Library::get('mail_mode_user', '');
664
  $mail_attachment = WDW_FM_Library::get('mail_attachment', '');
665
  $mail_attachment_user = WDW_FM_Library::get('mail_attachment_user', '');
666
- $script_mail_user = WDW_FM_Library::get('script_mail_user', '%all%', FALSE);
667
  if ( $script_mail_user == '' ) {
668
- $script_mail_user = '%all%';
669
  }
670
  $submit_text = WDW_FM_Library::get('submit_text', '', FALSE);
671
  $url = WDW_FM_Library::get('url', '');
@@ -1035,7 +1037,7 @@ function before_reset() {
1035
  $id = (int) WDW_FM_Library::get('current_id', 0);
1036
  $title = WDW_FM_Library::get('title', '');
1037
  $theme = (int) WDW_FM_Library::get('theme', 0);
1038
- $theme = ($theme) ? $theme : $this->model->get_default_theme_id();
1039
  $form_front = WDW_FM_Library::get('form_front', '', false);
1040
  $sortable = WDW_FM_Library::get('sortable', 0);
1041
  $counter = WDW_FM_Library::get('counter', 0);
@@ -1082,7 +1084,7 @@ function before_reset() {
1082
  $this->model->insert_data_to_db('formmaker', array(
1083
  'title' => $title,
1084
  'type' => $type,
1085
- 'mail' => '',
1086
  'form_front' => $form_front,
1087
  'theme' => $theme,
1088
  'counter' => $counter,
@@ -1098,8 +1100,8 @@ function before_reset() {
1098
  'url' => '',
1099
  'article_id' => 0,
1100
  'submit_text_type' => 1,
1101
- 'script_mail' => '%all%',
1102
- 'script_mail_user' => '%all%',
1103
  'label_order_current' => $label_order_current,
1104
  'tax' => 0,
1105
  'payment_currency' => '',
@@ -1245,8 +1247,8 @@ function before_reset() {
1245
  'url' => '',
1246
  'article_id' => 0,
1247
  'submit_text_type' => 1,
1248
- 'script_mail' => '%all%',
1249
- 'script_mail_user' => '%all%',
1250
  'label_order_current' => $label_order_current,
1251
  'tax' => 0,
1252
  'payment_currency' => '',
456
  public function form_options( $id ) {
457
  // Set params for view.
458
  $params = array();
459
+ $params[ 'id' ] = $id;
460
+ $params[ 'page' ] = $this->page;
461
+ $params[ 'page_url' ] = $this->page_url;
462
 
463
+ $params[ 'back_url' ] = add_query_arg( array(
464
+ 'page' => 'manage' . WDFM()->menu_postfix,
465
+ 'task' => 'edit',
466
+ 'current_id' => $id,
467
+
468
+ ), admin_url( 'admin.php' )
469
+ );
470
+
471
+ $params[ 'fieldset_id' ] = WDW_FM_Library::get( 'fieldset_id', 'general' );
472
+
473
+ $params[ 'row' ] = $this->model->get_row_data( $id );
474
+ if ( empty( $params[ 'row' ] ) ) {
475
+ WDW_FM_Library::fm_redirect( add_query_arg( array( 'page' => $this->page ), admin_url( 'admin.php' ) ) );
476
  }
477
+
478
+ $params[ 'themes' ] = $this->model->get_theme_rows_data();
479
+ $params[ 'default_theme' ] = $this->model->get_default_theme_id();
480
+ $params[ 'queries' ] = $this->model->get_queries_rows_data( $id );
481
+ $params[ 'userGroups' ] = get_editable_roles();
482
+ $params[ 'page_title' ] = '"' . $params[ 'row' ]->title . '" ' . __( 'options', WDFM()->prefix );
483
+
484
  $label_id = array();
485
  $label_label = array();
486
+ $labelIds = array();
487
  $label_type = array();
488
+ $label_all = explode( '#****#', $params[ 'row' ]->label_order_current );
489
+ $label_all = array_slice( $label_all, 0, count( $label_all ) - 1 );
490
  foreach ( $label_all as $key => $label_each ) {
491
+ $label_id_each = explode( '#**id**#', $label_each );
492
+ $label_order_each = explode( '#**label**#', $label_id_each[ 1 ] );
493
+ $labelIds[ $label_id_each[ 0 ] ] = array( 'type' => $label_order_each[ 1 ], 'name' => $label_order_each[ 0 ] );
494
+ array_push( $label_id, $label_id_each[ 0 ] );
495
+ array_push( $label_label, $label_order_each[ 0 ] );
496
+ array_push( $label_type, $label_order_each[ 1 ] );
497
  }
498
+ $params[ 'fields' ] = explode( '*:*id*:*type_submitter_mail*:*type*:*', $params[ 'row' ]->form_fields );
499
+ $params[ 'fields_count' ] = count( $params[ 'fields' ] );
500
+
501
+ // chechk stripe addon is active.
502
+ $stripe_addon = array( 'enable' => 0 );
503
+ $addon_stripe = $this->get_stripe_addon( $id );
504
+ if ( !empty( $addon_stripe[ 'html' ] ) ) {
505
+ $stripe_addon = $addon_stripe;
506
+ }
507
+ $params[ 'stripe_addon' ] = $stripe_addon;
508
+
509
+ /*
510
+ TODO.
511
+ Remember. 0 => none, 1 => paypal, 2 => stripe
512
+ Change. rename paypal_mode name to payment_method of wp_formmaker table.
513
+ */
514
+ $paypal_mode = $params[ 'row' ]->paypal_mode;
515
+ $payment_method = 'none';
516
+ if ( $paypal_mode == 1 ) {
517
+ $payment_method = 'paypal';
518
+ }
519
+ if ( $paypal_mode == 2 && isset( $stripe_addon[ 'stripe_enable' ] ) && $stripe_addon[ 'stripe_enable' ] == 1 ) {
520
+ $payment_method = 'stripe';
521
+ }
522
+
523
+ $params[ 'payment_method' ] = $payment_method;
524
+ $params[ 'label_label' ] = WDW_FM_Library::create_email_options_placeholders( $labelIds );
525
+ $params[ 'label_type' ] = $label_type;
526
+ $params[ 'labels_for_submissions' ] = $this->model->get_labels( $id );
527
+ $params[ 'payment_info' ] = $this->model->is_paypal( $id );
528
 
529
  $labels_id_for_submissions = array();
530
  $label_titles_for_submissions = array();
531
  $labels_type_for_submissions = array();
532
+ if ( $params[ 'labels_for_submissions' ] ) {
533
  $label_id_for_submissions = array();
534
  $label_order_original_for_submissions = array();
535
  $label_type_for_submissions = array();
536
+ if ( strpos( $params[ 'row' ]->label_order, 'type_paypal_' ) ) {
537
+ $params[ 'row' ]->label_order = $params[ 'row' ]->label_order . "item_total#**id**#Item Total#**label**#type_paypal_payment_total#****#total#**id**#Total#**label**#type_paypal_payment_total#****#0#**id**#Payment Status#**label**#type_paypal_payment_status#****#";
538
  }
539
+ $label_all_for_submissions = explode( '#****#', $params[ 'row' ]->label_order );
540
+ $label_all_for_submissions = array_slice( $label_all_for_submissions, 0, count( $label_all_for_submissions ) - 1 );
541
  foreach ( $label_all_for_submissions as $key => $label_each ) {
542
+ $label_id_each = explode( '#**id**#', $label_each );
543
+ array_push( $label_id_for_submissions, $label_id_each[ 0 ] );
544
+ $label_order_each = explode( '#**label**#', $label_id_each[ 1 ] );
545
+ array_push( $label_order_original_for_submissions, $label_order_each[ 0 ] );
546
+ array_push( $label_type_for_submissions, $label_order_each[ 1 ] );
547
  }
548
  foreach ( $label_id_for_submissions as $key => $label ) {
549
+ if ( in_array( $label, $params[ 'labels_for_submissions' ] ) ) {
550
+ array_push( $labels_type_for_submissions, $label_type_for_submissions[ $key ] );
551
+ array_push( $labels_id_for_submissions, $label );
552
+ array_push( $label_titles_for_submissions, $label_order_original_for_submissions[ $key ] );
553
  }
554
  }
555
+ $params[ 'labels_id_for_submissions' ] = $labels_id_for_submissions;
556
+ $params[ 'label_titles_for_submissions' ] = $label_titles_for_submissions;
557
  }
558
+
559
  $stats_labels = array();
560
  $stats_labels_ids = array();
561
  foreach ( $labels_type_for_submissions as $key => $label_type_cur ) {
562
  if ( $label_type_cur == "type_checkbox" || $label_type_cur == "type_radio" || $label_type_cur == "type_own_select" || $label_type_cur == "type_country" || $label_type_cur == "type_paypal_select" || $label_type_cur == "type_paypal_radio" || $label_type_cur == "type_paypal_checkbox" || $label_type_cur == "type_paypal_shipping" ) {
563
+ $stats_labels_ids[] = $labels_id_for_submissions[ $key ];
564
+ $stats_labels[] = $label_titles_for_submissions[ $key ];
565
  }
566
  }
 
 
 
 
567
 
568
+ $params[ 'stats_labels_ids' ] = $stats_labels_ids;
569
+ $params[ 'stats_labels' ] = $stats_labels;
570
+ $params[ 'mail_ver_id' ] = $this->model->get_emailverification_post_id();
571
 
572
+ $params[ 'addons' ] = $this->get_addon_tabs( array( 'form_id' => $id ) );
573
+
574
+ $this->view->form_options( $params );
575
  }
576
 
577
  /**
647
  if ( $reply_to == "other" ) {
648
  $reply_to = stripslashes(WDW_FM_Library::get('reply_to_other', ''));
649
  }
650
+ $script_mail = WDW_FM_Library::get('script_mail', '{all}', FALSE);
651
  if ( $script_mail == '' ) {
652
+ $script_mail = '{all}';
653
  }
654
  $mail_from_user = WDW_FM_Library::get('mail_from_user', '');
655
  $mail_from_name_user = WDW_FM_Library::get('mail_from_name_user', '');
665
  $mail_mode_user = WDW_FM_Library::get('mail_mode_user', '');
666
  $mail_attachment = WDW_FM_Library::get('mail_attachment', '');
667
  $mail_attachment_user = WDW_FM_Library::get('mail_attachment_user', '');
668
+ $script_mail_user = WDW_FM_Library::get('script_mail_user', '{all}', FALSE);
669
  if ( $script_mail_user == '' ) {
670
+ $script_mail_user = '{all}';
671
  }
672
  $submit_text = WDW_FM_Library::get('submit_text', '', FALSE);
673
  $url = WDW_FM_Library::get('url', '');
1037
  $id = (int) WDW_FM_Library::get('current_id', 0);
1038
  $title = WDW_FM_Library::get('title', '');
1039
  $theme = (int) WDW_FM_Library::get('theme', 0);
1040
+ $theme = ($theme) ? $theme : $this->model->get_default_theme_id();
1041
  $form_front = WDW_FM_Library::get('form_front', '', false);
1042
  $sortable = WDW_FM_Library::get('sortable', 0);
1043
  $counter = WDW_FM_Library::get('counter', 0);
1084
  $this->model->insert_data_to_db('formmaker', array(
1085
  'title' => $title,
1086
  'type' => $type,
1087
+ 'mail' => '{adminemail}',
1088
  'form_front' => $form_front,
1089
  'theme' => $theme,
1090
  'counter' => $counter,
1100
  'url' => '',
1101
  'article_id' => 0,
1102
  'submit_text_type' => 1,
1103
+ 'script_mail' => '{all}',
1104
+ 'script_mail_user' => '{all}',
1105
  'label_order_current' => $label_order_current,
1106
  'tax' => 0,
1107
  'payment_currency' => '',
1247
  'url' => '',
1248
  'article_id' => 0,
1249
  'submit_text_type' => 1,
1250
+ 'script_mail' => '{all}',
1251
+ 'script_mail_user' => '{all}',
1252
  'label_order_current' => $label_order_current,
1253
  'tax' => 0,
1254
  'payment_currency' => '',
admin/controllers/Pricing_fm.php ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class FMControllerPricing_fm
4
+ */
5
+ class FMControllerPricing_fm {
6
+ /**
7
+ * @var $model
8
+ */
9
+ private $model;
10
+ /**
11
+ * @var $view
12
+ */
13
+ private $view;
14
+ /**
15
+ * @var string $page
16
+ */
17
+ private $page;
18
+
19
+ public function __construct() {
20
+ $this->page = WDW_FM_Library::get('page');
21
+ $this->page_url = add_query_arg( array (
22
+ 'page' => $this->page,
23
+ WDFM()->nonce => wp_create_nonce(WDFM()->nonce),
24
+ ), admin_url('admin.php')
25
+ );
26
+ require_once WDFM()->plugin_dir . "/admin/views/Pricing_fm.php";
27
+ $this->view = new FMViewpricing_fm();
28
+ }
29
+
30
+ /**
31
+ * Execute.
32
+ */
33
+ public function execute() {
34
+ $task = WDW_FM_Library::get('task');
35
+ $id = (int) WDW_FM_Library::get('current_id', 0);
36
+ if (method_exists($this, $task)) {
37
+ $this->$task($id);
38
+ }
39
+ else {
40
+ $this->display();
41
+ }
42
+ }
43
+
44
+ /**
45
+ * Display.
46
+ */
47
+ public function display() {
48
+ // Set params for view.
49
+ $params = array();
50
+ $params['page'] = $this->page;
51
+ $params['page_url'] = $this->page_url;
52
+ $this->view->display( $params );
53
+ }
54
+ }
admin/models/Manage_fm.php CHANGED
@@ -121,8 +121,8 @@ class FMModelManage_fm {
121
  $row->submit_text = '';
122
  $row->url = '';
123
  $row->submit_text_type = 1;
124
- $row->script1 = '%all%';
125
- $row->script2 = '%all%';
126
  $row->script_user1 = '';
127
  $row->script_user2 = '';
128
  $row->counter = 2;
121
  $row->submit_text = '';
122
  $row->url = '';
123
  $row->submit_text_type = 1;
124
+ $row->script1 = '{all}';
125
+ $row->script2 = '{all}';
126
  $row->script_user1 = '';
127
  $row->script_user2 = '';
128
  $row->counter = 2;
admin/models/Uninstall_fm.php CHANGED
@@ -51,6 +51,7 @@ class FMModelUninstall_fm {
51
  }
52
  }
53
  $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'formmaker');
 
54
  $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'formmaker_submits');
55
  $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'formmaker_views');
56
  $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'formmaker_themes');
51
  }
52
  }
53
  $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'formmaker');
54
+ $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'formmaker_groups');
55
  $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'formmaker_submits');
56
  $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'formmaker_views');
57
  $wpdb->query('DROP TABLE IF EXISTS ' . $wpdb->prefix . 'formmaker_themes');
admin/views/Addons_fm.php ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class FMViewAddons_fm
5
+ */
6
+ class FMViewAddons_fm extends FMAdminView {
7
+ /**
8
+ * FMViewAddons_fm constructor.
9
+ */
10
+ public function __construct() {
11
+ wp_enqueue_style('fm-style');
12
+ wp_enqueue_style('fm-pricing');
13
+ wp_enqueue_script('fm-admin');
14
+ }
15
+
16
+ public function display( $params = array() ) {
17
+ $page = $params['page'];
18
+ $page_url = $params['page_url'];
19
+ ob_start();
20
+ echo $this->body($params);
21
+ // Pass the content to form.
22
+ $form_attr = array(
23
+ 'id' => WDFM()->prefix . '_addons',
24
+ 'name' => WDFM()->prefix . '_addons',
25
+ 'class' => WDFM()->prefix . '_addons wd-form',
26
+ 'action' => add_query_arg( array('page' => $page, 'task' => 'display'), $page_url),
27
+ );
28
+ echo $this->form(ob_get_clean(), $form_attr);
29
+ }
30
+
31
+ /**
32
+ * Generate page body.
33
+ *
34
+ * @return string Body html.
35
+ */
36
+ public function body( $params = array() ) {
37
+ $addons = $params['addons'];
38
+ echo '<div class="fm-add-ons">';
39
+ if ( $addons ) {
40
+ foreach ($addons as $value) {
41
+ foreach ( $value as $addon ) {
42
+ $activated = false;
43
+ if ( is_plugin_active( $addon['dir'] ) ) {
44
+ $activated = true;
45
+ }
46
+ $premium_version = ( WDFM()->is_free && $addon['pro'] ) ? true : false;
47
+ ?>
48
+ <div class="fm-add-on<?php echo (!$premium_version) ? ' fm-not-premium-version' : ''; echo ( $activated ) ? ' fm-add-on-activated': ''?>">
49
+ <div class="fm-add-on-img">
50
+ <?php if ( $activated ) { ?><a href="<?php echo $addon['url'] ?>" target="_blank"><?php } ?>
51
+ <img src="<?php echo $addon['icon'] ?>" alt="<?php echo $addon['name'] ?>"/>
52
+ <?php if ( $activated ) { ?></a><?php } ?>
53
+ </div>
54
+ <h2 class="fm-add-on-name">
55
+ <?php if ( $activated ) { ?>
56
+ <a href="<?php echo $addon['url'] ?>" target="_blank"><?php echo $addon['name'] ?></a>
57
+ <?php }
58
+ else { echo $addon['name']; } ?>
59
+ </h2>
60
+ <p class="fm-add-on-premium-version">
61
+ <?php echo $premium_version ? __('Compatible with Premium version only', WDFM()->prefix) : '&nbsp;'; ?>
62
+ </p>
63
+ <div class="fm-add-on-desc-more-wrap">
64
+ <div class="fm-add-on-desc">
65
+ <?php echo ( strlen($addon['description']) > 83 ) ? mb_substr($addon['description'], 0, 83, "utf-8") .' ...' : $addon['description']; ?>
66
+ </div>
67
+ <?php if ( strlen($addon['description']) > 83 ) { ?>
68
+ <div class="fm-add-on-desc-more"><?php echo $addon['description']; ?></div>
69
+ <?php } ?>
70
+ </div>
71
+ <?php if ( $activated ) { ?>
72
+ <span class="fm-add-on-buy" target="_blank"><?php _e('Activated', WDFM()->prefix); ?></span>
73
+ <?php } else { ?>
74
+ <a href="<?php echo $addon['url'] ?>" class="fm-add-on-buy" target="_blank"><?php _e('Get this add on', WDFM()->prefix); ?></a>
75
+ <?php } ?>
76
+ <a href="<?php echo $addon['url'] ?>" target="_blank" class="fm-add-on-learn-more"><?php _e('Learn More', WDFM()->prefix); ?></a>
77
+ </div>
78
+ <?php
79
+ }
80
+ }
81
+ }
82
+ echo '</div>';
83
+ }
84
+ }
admin/views/FMShortocde.php CHANGED
@@ -3,7 +3,7 @@
3
  /**
4
  * Class FMViewFMShortocde
5
  */
6
- class FMViewFMShortocde {
7
  /**
8
  * FMViewFMShortocde constructor.
9
  */
@@ -14,12 +14,16 @@ class FMViewFMShortocde {
14
  wp_print_styles('buttons');
15
 
16
  wp_print_styles('fm-tables');
17
- wp_print_scripts('jquery-ui-datepicker');
18
 
19
  if (!WDFM()->is_free) {
 
20
  wp_print_styles('fm-jquery-ui');
21
  wp_print_styles('fm-style');
22
  }
 
 
 
 
23
  }
24
 
25
  /**
@@ -65,13 +69,11 @@ class FMViewFMShortocde {
65
  */
66
  public function submissions( $forms ) {
67
  ?>
68
- <body class="wp-core-ui" data-width="500" data-height="570">
69
  <?php
70
  if ( WDFM()->is_free ) {
 
71
  ?>
72
- <div class="wd-fixed-message">
73
- <?php echo WDW_FM_Library::message_id(0, __('Front end submissions are disabled in free version.', WDFM()->prefix), 'error'); ?>
74
- </div>
75
  <div class="wd-fixed-conteiner"></div>
76
  <?php
77
  }
3
  /**
4
  * Class FMViewFMShortocde
5
  */
6
+ class FMViewFMShortocde extends FMAdminView {
7
  /**
8
  * FMViewFMShortocde constructor.
9
  */
14
  wp_print_styles('buttons');
15
 
16
  wp_print_styles('fm-tables');
 
17
 
18
  if (!WDFM()->is_free) {
19
+ wp_print_scripts('jquery-ui-datepicker');
20
  wp_print_styles('fm-jquery-ui');
21
  wp_print_styles('fm-style');
22
  }
23
+ else {
24
+ wp_print_styles( 'fm-pricing' );
25
+ wp_print_styles( 'fm-roboto' );
26
+ }
27
  }
28
 
29
  /**
69
  */
70
  public function submissions( $forms ) {
71
  ?>
72
+ <body class="wp-core-ui" data-width="520" data-height="570" <?php echo (WDFM()->is_free ? 'style="overflow: hidden;"' : ''); ?>>
73
  <?php
74
  if ( WDFM()->is_free ) {
75
+ echo $this->free_message(__('Front end submissions are available in Premium version', WDFM()->prefix));
76
  ?>
 
 
 
77
  <div class="wd-fixed-conteiner"></div>
78
  <?php
79
  }
admin/views/Licensing_fm.php DELETED
@@ -1,58 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class FMViewLicensing_fm
5
- */
6
- class FMViewLicensing_fm {
7
- /**
8
- * FMViewLicensing_fm constructor.
9
- */
10
- public function __construct() {
11
- wp_enqueue_style('fm-license' . WDFM()->menu_postfix);
12
- wp_enqueue_style('fm-style');
13
- wp_enqueue_style('fm-tables');
14
- wp_enqueue_script('fm-admin');
15
- }
16
-
17
- public function display() {
18
- ?>
19
- <div style="width:99%">
20
- <div id="featurs_tables">
21
- <div id="featurs_table1">
22
- <span>Unlimited Fields</span>
23
- <span>File Upload Field</span>
24
- <span>Google Map</span>
25
- <span>PayPal Integration</span>
26
- <span>Front-End Submissions</span>
27
- </div>
28
- <div id="featurs_table2">
29
- <span>Free</span>
30
- <span class="no"></span>
31
- <span class="no"></span>
32
- <span class="no"></span>
33
- <span class="no"></span>
34
- <span class="no"></span>
35
- </div>
36
- <div id="featurs_table3">
37
- <span>Pro Version</span>
38
- <span class="yes"></span>
39
- <span class="yes"></span>
40
- <span class="yes"></span>
41
- <span class="yes"></span>
42
- <span class="yes"></span>
43
- </div>
44
- </div>
45
- <div style="float: left; clear: both;">
46
- <a href="https://web-dorado.com/files/fromFormMaker.php" class="button-primary" target="_blank">Purchase a
47
- License</a>
48
- <br/><br/>
49
- <p>After purchasing the commercial version follow these steps:</p>
50
- <ol>
51
- <li>Deactivate Form Maker Plugin.</li>
52
- <li>Delete Form Maker Plugin.</li>
53
- <li>Install the downloaded commercial version of the plugin.</li>
54
- </ol>
55
- </div>
56
- <?php
57
- }
58
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/Manage_fm.php CHANGED
@@ -41,7 +41,7 @@ class FMViewManage_fm extends FMAdminView {
41
  *
42
  * @return string Body html.
43
  */
44
- public function body($params) {
45
  $page = $params['page'];
46
  $actions = $params['actions'];
47
  $form_preview_link = $params['form_preview_link'];
@@ -217,6 +217,9 @@ class FMViewManage_fm extends FMAdminView {
217
  }
218
 
219
  public function edit($params) {
 
 
 
220
  wp_enqueue_style('thickbox');
221
  wp_enqueue_style('fm-phone_field_css');
222
  wp_enqueue_style('fm-jquery-ui');
@@ -386,7 +389,8 @@ class FMViewManage_fm extends FMAdminView {
386
  </div>
387
  </div>
388
  <div class="fm-clear"></div>
389
- <?php echo $this->add_fields(); ?>
 
390
  <?php if (!function_exists('the_editor')) { ?>
391
  <iframe id="tinymce" style="display: none;"></iframe>
392
  <?php } ?>
@@ -478,7 +482,7 @@ class FMViewManage_fm extends FMAdminView {
478
  </div>
479
 
480
  <div type="type_text" class="wdform_field">
481
- <div class="add-new-button button-primary" onclick="popup_ready(); Enable(); return false;">
482
  <span class="dashicons dashicons-move"></span>
483
  <?php _e('New Field', WDFM()->prefix); ?>
484
  </div>
@@ -508,7 +512,7 @@ class FMViewManage_fm extends FMAdminView {
508
  <?php
509
  }
510
 
511
- public function add_fields() {
512
  $pro_fields1 = array('file_upload', 'map', 'paypal');
513
  $pro_fields2 = array('file_upload', 'paypal', 'checkbox', 'radio', 'survey', 'time_and_date', 'select');
514
  $fields = array(
@@ -522,8 +526,8 @@ class FMViewManage_fm extends FMAdminView {
522
  array('type' => 'checkbox', 'subtype' => '', 'title' => __('Multiple Choice', WDFM()->prefix)),
523
  array('type' => 'captcha', 'subtype' => 'recaptcha', 'title' => __('Recaptcha', WDFM()->prefix)),
524
  array('type' => 'button', 'subtype' => 'submit_reset', 'title' => __('Submit', WDFM()->prefix)),
525
- array('type' => 'captcha', 'subtype' => 'captcha', 'title' => __('Simple Captcha', WDFM()->prefix)),
526
- ),
527
  __('USER INFO FIELDS', WDFM()->prefix) => array(
528
  array('type' => 'text', 'subtype' => 'name', 'title' => __('Name', WDFM()->prefix)),
529
  array('type' => 'text', 'subtype' => 'submitter_mail', 'title' => __('Email', WDFM()->prefix)),
@@ -577,12 +581,12 @@ class FMViewManage_fm extends FMAdminView {
577
  </div>
578
  <div class="popup-body meta-box-sortables">
579
  <div class="popup-body-col field_types">
580
- <div class="field_types_cont">
581
- <h2 class="hndle field-types-filter_header"><span><?php _e('FIELD TYPES', WDFM()->prefix); ?></span></h2>
582
- <span class="field-types-filter-cont">
583
- <input class="field-types-filter" value="" placeholder="<?php _e('Filter', WDFM()->prefix); ?>" tabindex="-1" type="search" />
584
  </span>
585
- <div class="postbox filtered-fields hide">
586
  <button class="button-link handlediv" type="button" aria-expanded="true">
587
  <span class="screen-reader-text">Toggle panel</span>
588
  <span class="toggle-indicator" aria-hidden="true"></span>
@@ -621,10 +625,30 @@ class FMViewManage_fm extends FMAdminView {
621
  ?>
622
  </div>
623
  </div>
624
- <div class="popup-body-col field_options">
625
- <div id="edit_table"></div>
626
- </div>
627
- <div class="popup-body-col field_preview">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
628
  <div id="add-button-cont" class="add-button-cont">
629
  <button class="button button-primary button-hero wd-add-button" onclick="add(0, false); return false;">
630
  <?php _e('Add', WDFM()->prefix);?>
@@ -633,6 +657,7 @@ class FMViewManage_fm extends FMAdminView {
633
  <div id="show_table">
634
  </div>
635
  </div>
 
636
  </div>
637
  <input type="hidden" id="old" />
638
  <input type="hidden" id="old_selected" />
@@ -659,7 +684,7 @@ class FMViewManage_fm extends FMAdminView {
659
  return ob_get_clean();
660
  }
661
 
662
- public function form_options( $params ) {
663
  wp_enqueue_style('thickbox');
664
  wp_enqueue_style('fm-phone_field_css');
665
  wp_enqueue_style('fm-jquery-ui');
@@ -718,56 +743,57 @@ class FMViewManage_fm extends FMAdminView {
718
  * @return string Body html.
719
  */
720
  private function body_form_options( $params ) {
721
- $id = $params['id'];
722
- $page = $params['page'];
723
- $page_title = $params['page_title'];
724
- $page_url = $params['page_url'];
725
- $back_url = $params['back_url'];
726
- $fieldset_id = $params['fieldset_id'];
727
- $addons = $params['addons'];
728
- $row = $params['row'];
729
- $themes = $params['themes'];
730
- $default_theme = $params['default_theme'];
731
- $queries = $params['queries'];
732
- $userGroups = $params['userGroups'];
733
- $fields = $params['fields'];
734
- $fields_count = $params['fields_count'];
735
- $stripe_addon = $params['stripe_addon'];
736
- $payment_method = $params['payment_method'];
737
- $label_label = $params['label_label'];
738
- $label_type = $params['label_type'];
739
- echo $this->title(array(
740
- 'title' => $page_title,
741
- 'title_class' => 'wd-header',
742
- 'add_new_button' => FALSE,
743
- ));
744
- $buttons = array(
745
- 'save' => array(
746
- 'title' => __('Update', WDFM()->prefix),
747
- 'value' => 'save',
748
- 'onclick' => 'if( ! wd_fm_apply_options(\'apply_form_options\') ){ return false; }',
749
- 'class' => 'button-primary',
750
- ),
751
- 'back' => array(
752
- 'title' => __('Back to Form', WDFM()->prefix),
753
- 'value' => 'back',
754
- 'onclick' => 'window.open(\'' . $back_url . '\', \'_self\'); return false;',
755
- 'class' => 'button',
756
- )
757
- );
758
- echo $this->buttons($buttons);
759
- $label_titles_for_submissions = array();
760
- $labels_id_for_submissions = array();
761
- $payment_info = $params['payment_info'];
762
- $labels_for_submissions = $params['labels_for_submissions'];
763
- if ( $labels_for_submissions ) {
764
- $labels_id_for_submissions = $params['labels_id_for_submissions'];
765
- $label_titles_for_submissions = $params['label_titles_for_submissions'];
766
- }
767
- $stats_labels_ids = $params['stats_labels_ids'];
768
- $stats_labels = $params['stats_labels'];
769
- ?>
770
  <div class="fm-clear"></div>
 
771
  <div class="submenu-box">
772
  <div class="submenu-pad">
773
  <ul id="submenu" class="configuration">
@@ -833,19 +859,17 @@ $stats_labels = $params['stats_labels'];
833
  <select id="theme" name="theme" onChange="set_theme()">
834
  <optgroup label="<?php _e('New Themes', WDFM()->prefix); ?>">
835
  <option value="0" <?php echo $row->theme && $row->theme == 0 ? 'selected' : '' ?> data-version="2"><?php _e('Inherit From Website Theme', WDFM()->prefix); ?></option>
836
- <?php
837
- $optiongroup = TRUE;
838
- foreach ($themes
839
-
840
- as $theme) {
841
- if ($optiongroup && $theme->version == 1) {
842
- $optiongroup = FALSE;
843
- ?>
844
- </optgroup>
845
- <optgroup label="<?php _e('Outdated Themes', WDFM()->prefix); ?>">
846
- <?php } ?>
847
- <option value="<?php echo $theme->id; ?>" <?php echo(($theme->id == $row->theme) ? 'selected' : ''); ?> data-version="<?php echo $theme->version; ?>"><?php echo $theme->title; ?></option>
848
- <?php } ?>
849
  </optgroup>
850
  </select>
851
  <a id="edit_css" class="options-edit-button" onclick="window.open('<?php echo add_query_arg(array(
@@ -875,63 +899,68 @@ $stats_labels = $params['stats_labels'];
875
  <div class="wd-table-col wd-table-col-50 wd-table-col-right">
876
  <div class="wd-box-section">
877
  <div class="wd-box-content">
878
- <span class="wd-group">
879
- <label class="wd-label"><?php _e('Allow User to see submissions', WDFM()->prefix); ?></label>
880
- <?php
881
- $checked_UserGroup = explode(',', $row->user_id_wd);
882
- $i = 0;
883
- foreach ( $userGroups as $val => $uG ) {
 
 
 
 
 
884
  echo "\r\n" . '<input type="checkbox" value="' . $val . '" id="user_' . $i . '" ';
885
  if ( in_array($val, $checked_UserGroup) ) {
886
  echo ' checked="checked"';
887
  }
888
- echo ' onchange="acces_level(' . count($userGroups) . ')" /><label for="user_' . $i . '">' . $uG["name"] . '</label><br>';
889
  $i++;
890
- }
891
- ?>
892
- <input type="checkbox" value="guest" id="user_<?php echo $i; ?>" onchange="acces_level(<?php echo count($userGroups); ?>)"<?php echo(in_array('guest', $checked_UserGroup) ? 'checked="checked"' : '') ?>/><label for="user_<?php echo $i; ?>">Guest</label>
893
- <input type="hidden" name="user_id_wd" value="<?php echo $row->user_id_wd ?>" id="user_id_wd" />
894
- <p class="description"><?php _e('Mark all user roles which will be able to view front-end submissions, when you publish them on a post or page.', WDFM()->prefix); ?></p>
895
- </span>
896
  <?php if ( count($label_titles_for_submissions) ) { ?>
897
- <span class="wd-group">
898
- <label class="wd-label"><?php _e('Fields to hide in frontend submissions', WDFM()->prefix); ?></label>
899
- <ul id="form_fields">
900
- <li>
901
- <input type="checkbox" name="all_fields" id="all_fields" onclick="checkAllByParentId('form_fields'); checked_labels('filed_label')" value="submit_id,<?php echo implode(',', $labels_id_for_submissions) . "," . ($payment_info ? "payment_info" : ""); ?>" />
902
- <label for="all_fields"><?php _e('Select All', WDFM()->prefix); ?></label>
903
- </li>
904
  <?php
905
- echo "<li><input type=\"checkbox\" id=\"submit_id\" name=\"submit_id\" value=\"submit_id\" class=\"filed_label\" onclick=\"checked_labels('filed_label')\"><label for=\"submit_id\">ID</label></li>";
906
  for ( $i = 0, $n = count($label_titles_for_submissions); $i < $n; $i++ ) {
907
  $field_label = $label_titles_for_submissions[$i];
908
- echo "<li><input type=\"checkbox\" id=\"filed_label" . $i . "\" name=\"filed_label" . $i . "\" value=\"" . $labels_id_for_submissions[$i] . "\" class=\"filed_label\" onclick=\"checked_labels('filed_label')\"><label for=\"filed_label" . $i . "\">" . (strlen($field_label) > 80 ? substr($field_label, 0, 80) . '...' : $field_label) . "</label></li>";
909
  }
910
  if ( $payment_info ) {
911
- echo "<li><input type=\"checkbox\" id=\"payment_info\" name=\"payment_info\" value=\"payment_info\" class=\"filed_label\" onclick=\"checked_labels('filed_label')\"><label for=\"payment_info\">Payment Info</label></li>";
912
  }
913
  ?>
914
- </ul>
915
- <input type="hidden" name="frontend_submit_fields" value="<?php echo $row->frontend_submit_fields ?>" id="frontend_submit_fields" />
916
- <p class="description"><?php _e('Select fields of the form and Stats Fields which will not to be displayed within front-end submissions, when you publish them.', WDFM()->prefix); ?></p>
917
- </span>
918
  <?php if ( $stats_labels ) { ?>
919
  <span class="wd-group">
920
- <label class="wd-label"><?php _e('Stats fields:', WDFM()->prefix); ?></label>
921
- <ul id="stats_fields">
922
- <li>
923
- <input type="checkbox" name="all_stats_fields" id="all_stats_fields" onclick="checkAllByParentId('stats_fields'); checked_labels('stats_filed_label');" value="<?php echo implode(',', $stats_labels_ids) . ","; ?>">
924
- <label for="all_stats_fields"><?php _e('Select All', WDFM()->prefix); ?></label>
925
- </li>
926
- <?php
927
- for ( $i = 0, $n = count($stats_labels); $i < $n; $i++ ) {
928
- $field_label = $stats_labels[$i];
929
- echo "<li><input type=\"checkbox\" id=\"stats_filed_label" . $i . "\" name=\"stats_filed_label" . $i . "\" value=\"" . $stats_labels_ids[$i] . "\" class=\"stats_filed_label\" onclick=\"checked_labels('stats_filed_label')\"><label for=\"stats_filed_label" . $i . "\">" . (strlen($field_label) > 80 ? substr($field_label, 0, 80) . '...' : $field_label) . "</label></li>";
930
- }
931
- ?>
932
- </ul>
933
- <input type="hidden" name="frontend_submit_stat_fields" value="<?php echo $row->frontend_submit_stat_fields ?>" id="frontend_submit_stat_fields" />
934
- <p class="description"><?php _e('Select fields of the form and Stats Fields which will not to be displayed within front-end submissions, when you publish them.', WDFM()->prefix); ?></p>
935
  </span>
936
  <?php }
937
  } ?>
@@ -966,11 +995,11 @@ $stats_labels = $params['stats_labels'];
966
  <strong><?php _e('Email to Administrator', WDFM()->prefix); ?></strong>
967
  </div>
968
  <div class="wd-box-content">
969
- <div class="wd-group">
970
  <label class="wd-label" for="mailToAdd"><?php _e('Email to send submissions to', WDFM()->prefix); ?></label>
971
- <input type="text" id="mailToAdd" name="mailToAdd" class="mailToAdd" />
972
  <input type="hidden" id="mail" name="mail" value="<?php echo $row->mail . ($row->mail && (substr($row->mail, -1) != ',') ? ',' : ''); ?>" />
973
- <span class="dashicons dashicons-plus-alt" title="<?php _e('Add more emails', WDFM()->prefix); ?>" onclick="if (fm_check_email('mailToAdd')) {return false;};fm_add_submission_email('mail', 'mailToAdd', 'cfm_mail_div', '<?php echo WDFM()->plugin_url; ?>')"></span>
974
  <div id="cfm_mail_div">
975
  <?php
976
  $mail_array = explode(',', $row->mail);
@@ -987,66 +1016,16 @@ $stats_labels = $params['stats_labels'];
987
  </div>
988
  <p class="description"><?php _e('Specify the email address(es), to which submitted form information will be sent. For multiple email addresses separate with commas.', WDFM()->prefix); ?></p>
989
  </div>
990
- <div class="wd-group">
991
  <label class="wd-label" for="mail_subject"><?php _e('Subject', WDFM()->prefix); ?></label>
992
- <input type="text" id="mail_subject" name="mail_subject" value="<?php echo $row->mail_subject ?>" class="mail_subject" />
993
- <span class="dashicons dashicons-plus-alt" onclick="document.getElementById('mail_subject_labels').style.display='block';"></span>
994
- <?php
995
- $choise = "'mail_subject'";
996
- echo '<div style="position:relative; top:-3px;"><div id="mail_subject_labels" class="email_labels" style="display:none;">';
997
- for ( $i = 0; $i < count($label_label); $i++ ) {
998
- if ( $label_type[$i] == "type_submit_reset" || $label_type[$i] == "type_editor" || $label_type[$i] == "type_map" || $label_type[$i] == "type_mark_map" || $label_type[$i] == "type_captcha" || $label_type[$i] == "type_recaptcha" || $label_type[$i] == "type_button" || $label_type[$i] == "type_file_upload" || $label_type[$i] == "type_send_copy" || $label_type[$i] == "type_matrix" ) {
999
- continue;
1000
- }
1001
- $param = htmlspecialchars(addslashes($label_label[$i]));
1002
- $fld_label = $param;
1003
- if ( strlen($fld_label) > 30 ) {
1004
- $fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
1005
- $fld_label = explode("\n", $fld_label);
1006
- $fld_label = $fld_label[0] . ' ...';
1007
- }
1008
- echo "<a onClick=\"insertAtCursor(" . $choise . ",'" . $param . "'); document.getElementById('mail_subject_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">" . $fld_label . "</a>";
1009
- }
1010
- echo "<a onClick=\"insertAtCursor(" . $choise . ",'subid'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Submission ID</a>";
1011
- echo "<a onClick=\"insertAtCursor(" . $choise . ",'username'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Username</a>";
1012
- echo '</div></div>';
1013
- ?>
1014
- <p class="description"><?php _e('Add a custom subject for the submission email. Click the Plus (+) button to select a form field, the value of which will be set as the subject. In case it’s left blank, Form Title will be set as the subject of submission emails.', WDFM()->prefix); ?></p>
1015
  </div>
1016
  <div class="wd-group">
1017
  <label class="wd-label" for="script_mail"><?php _e('Custom Text in Email For Administrator', WDFM()->prefix); ?></label>
1018
- <div class="fm_textarea-buttons">
1019
- <?php $choise = "'script_mail'"; ?>
1020
- <input class="button" type="button" value="All fields list" onClick="insertAtCursor(<?php echo $choise; ?>, 'all')" />
1021
- <input class="button" type="button" value="Submission ID" onClick="insertAtCursor(<?php echo $choise; ?>,'subid')" />
1022
- <input class="button" type="button" value="Ip" onClick="insertAtCursor(<?php echo $choise; ?>,'ip')" />
1023
- <input class="button" type="button" value="Username" onClick="insertAtCursor(<?php echo $choise; ?>,'username')" />
1024
- <input class="button" type="button" value="User Email" onClick="insertAtCursor(<?php echo $choise; ?>,'useremail')" />
1025
- <?php
1026
- for ( $i = 0; $i < count($label_label); $i++ ) {
1027
- if ( $label_type[$i] == "type_submit_reset" || $label_type[$i] == "type_editor" || $label_type[$i] == "type_map" || $label_type[$i] == "type_mark_map" || $label_type[$i] == "type_captcha" || $label_type[$i] == "type_recaptcha" || $label_type[$i] == "type_button" || $label_type[$i] == "type_send_copy" ) {
1028
- continue;
1029
- }
1030
- $param = htmlspecialchars(addslashes($label_label[$i]));
1031
- $fld_label = $param;
1032
- if ( strlen($fld_label) > 30 ) {
1033
- $fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
1034
- $fld_label = explode("\n", $fld_label);
1035
- $fld_label = $fld_label[0] . ' ...';
1036
- }
1037
- if ( $label_type[$i] == "type_file_upload" ) {
1038
- ?>
1039
- <input class="button" type="button" value="<?php echo $fld_label . '(as image)'; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
1040
- <input class="button" type="button" value="<?php echo $fld_label . '(as link)'; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param . '(link)'; ?>')" />
1041
- <?php
1042
- }
1043
- else {
1044
- ?>
1045
- <input class="button" type="button" value="<?php echo $fld_label; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
1046
- <?php
1047
- }
1048
- }
1049
- ?>
1050
  </div>
1051
  <?php
1052
  if ( user_can_richedit() ) {
@@ -1102,34 +1081,11 @@ $stats_labels = $params['stats_labels'];
1102
  </p>
1103
  <p class="description"><?php _e('Specify the email address from which the administrator will receive the email.', WDFM()->prefix); ?></p>
1104
  </div>
1105
- <div class="wd-group">
1106
  <label class="wd-label" for="from_name"><?php _e('From Name', WDFM()->prefix); ?></label>
1107
- <input type="text" name="from_name" value="<?php echo $row->from_name; ?>" id="from_name" class="from_name" />
1108
- <span class="dashicons dashicons-plus-alt" onclick="document.getElementById('mail_from_labels').style.display='block';"></span>
1109
- <div style="position:relative; top:-1px;">
1110
- <div id="mail_from_labels" class="email_labels" style="display:none;">
1111
- <?php
1112
- $choise = "'from_name'";
1113
- echo "<a onClick=\"insertAtCursor(" . $choise . ",'username'); document.getElementById('mail_from_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Username</a>";
1114
- for ( $i = 0; $i < count($label_label); $i++ ) {
1115
- if ( $label_type[$i] == "type_submit_reset" || $label_type[$i] == "type_editor" || $label_type[$i] == "type_map" || $label_type[$i] == "type_mark_map" || $label_type[$i] == "type_captcha" || $label_type[$i] == "type_recaptcha" || $label_type[$i] == "type_button" || $label_type[$i] == "type_file_upload" || $label_type[$i] == "type_send_copy" || $label_type[$i] == "type_matrix" ) {
1116
- continue;
1117
- }
1118
- $param = htmlspecialchars(addslashes($label_label[$i]));
1119
- $fld_label = $param;
1120
- if ( strlen($fld_label) > 30 ) {
1121
- $fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
1122
- $fld_label = explode("\n", $fld_label);
1123
- $fld_label = $fld_label[0] . ' ...';
1124
- }
1125
- echo "<a onClick=\"insertAtCursor(" . $choise . ",'" . $param . "'); document.getElementById('mail_from_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">" . $fld_label . "</a>";
1126
- }
1127
- echo "<a onClick=\"insertAtCursor(" . $choise . ",'subid'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Submission ID</a>";
1128
- echo "<a onClick=\"insertAtCursor(" . $choise . ",'username'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Username</a>";
1129
- ?>
1130
- </div>
1131
- </div>
1132
- <p class="description"><?php _e('Set the name which is shown as the sender’s name in submission or confirmation emails. Press the Plus (+) button to select a field value.', WDFM()->prefix); ?></p>
1133
  </div>
1134
  <div class="wd-group">
1135
  <label class="wd-label" for="from_name"><?php _e('Reply to (if different from "Email From")', WDFM()->prefix); ?></label>
@@ -1225,69 +1181,16 @@ $stats_labels = $params['stats_labels'];
1225
  ?>
1226
  <p class="description"><?php _e('Use this setting to select the email field of your form, to which the submissions will be sent.', WDFM()->prefix); ?></p>
1227
  </div>
1228
- <div class="wd-group">
1229
  <label class="wd-label" for="mail_subject_user"><?php _e('Subject', WDFM()->prefix); ?></label>
1230
- <input type="text" name="mail_subject_user" value="<?php echo $row->mail_subject_user ?>" id="mail_subject_user" class="mail_subject_user" />
1231
- <span class="dashicons dashicons-plus-alt" onclick="document.getElementById('mail_subject_user_labels').style.display='block';"></span>
1232
- <div style="position:relative; top:-1px;">
1233
- <div id="mail_subject_user_labels" class="email_labels" style="display:none;">
1234
- <?php
1235
- $choise = "'mail_subject_user'";
1236
- for ( $i = 0; $i < count($label_label); $i++ ) {
1237
- if ( $label_type[$i] == "type_submit_reset" || $label_type[$i] == "type_editor" || $label_type[$i] == "type_map" || $label_type[$i] == "type_mark_map" || $label_type[$i] == "type_captcha" || $label_type[$i] == "type_recaptcha" || $label_type[$i] == "type_button" || $label_type[$i] == "type_file_upload" || $label_type[$i] == "type_send_copy" ) {
1238
- continue;
1239
- }
1240
- $param = htmlspecialchars(addslashes($label_label[$i]));
1241
- $fld_label = $param;
1242
- if ( strlen($fld_label) > 30 ) {
1243
- $fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
1244
- $fld_label = explode("\n", $fld_label);
1245
- $fld_label = $fld_label[0] . ' ...';
1246
- }
1247
- echo "<a onClick=\"insertAtCursor(" . $choise . ",'" . $param . "'); document.getElementById('mail_subject_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">" . $fld_label . "</a>";
1248
- }
1249
- echo "<a onClick=\"insertAtCursor(" . $choise . ",'subid'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Submission ID</a>";
1250
- echo "<a onClick=\"insertAtCursor(" . $choise . ",'username'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Username</a>";
1251
- ?>
1252
- </div>
1253
- </div>
1254
- <p class="description"><?php _e('Add a custom subject for the submission email. Click the Plus (+) button to select a form field, the value of which will be set as the subject. In case it’s left blank, Form Title will be set as the subject of submission emails.', WDFM()->prefix); ?></p>
1255
  </div>
1256
  <div class="wd-group">
1257
  <label class="wd-label" for="script_mail_user"><?php _e('Custom Text in Email For User', WDFM()->prefix); ?></label>
1258
- <div class="fm_textarea-buttons">
1259
- <?php $choise = "'script_mail_user'"; ?>
1260
- <input class="button" type="button" value="All fields list" onClick="insertAtCursor(<?php echo $choise; ?>, 'all')" />
1261
- <input class="button" type="button" value="Submission ID" onClick="insertAtCursor(<?php echo $choise; ?>,'subid')" />
1262
- <input class="button" type="button" value="Ip" onClick="insertAtCursor(<?php echo $choise; ?>,'ip')" />
1263
- <input class="button" type="button" value="Username" onClick="insertAtCursor(<?php echo $choise; ?>,'username')" />
1264
- <input class="button" type="button" value="User Email" onClick="insertAtCursor(<?php echo $choise; ?>,'useremail')" />
1265
- <?php
1266
- for ( $i = 0; $i < count($label_label); $i++ ) {
1267
- if ( $label_type[$i] == "type_submit_reset" || $label_type[$i] == "type_editor" || $label_type[$i] == "type_map" || $label_type[$i] == "type_mark_map" || $label_type[$i] == "type_captcha" || $label_type[$i] == "type_recaptcha" || $label_type[$i] == "type_button" || $label_type[$i] == "type_send_copy" ) {
1268
- continue;
1269
- }
1270
- $param = htmlspecialchars(addslashes($label_label[$i]));
1271
- $fld_label = $param;
1272
- if ( strlen($fld_label) > 30 ) {
1273
- $fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
1274
- $fld_label = explode("\n", $fld_label);
1275
- $fld_label = $fld_label[0] . ' ...';
1276
- }
1277
- if ( $label_type[$i] == "type_file_upload" ) {
1278
- ?>
1279
- <input class="button" type="button" value="<?php echo $fld_label . '(as image)'; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
1280
- <input class="button" type="button" value="<?php echo $fld_label . '(as link)'; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param . '(link)'; ?>')" />
1281
- <?php
1282
- }
1283
- else {
1284
- ?>
1285
- <input class="button" type="button" value="<?php echo $fld_label; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
1286
- <?php
1287
- }
1288
- }
1289
- ?>
1290
- <input <?php echo($row->mail_verify == 0 ? 'style="display:none;"' : ''); ?> class="button verification_div" type="button" value="Verification link" onClick="insertAtCursor(<?php echo $choise; ?>,'Verification link')" />
1291
  </div>
1292
  <?php
1293
  if ( user_can_richedit() ) {
@@ -1320,33 +1223,11 @@ $stats_labels = $params['stats_labels'];
1320
  <input type="text" id="mail_from_user" name="mail_from_user" value="<?php echo $row->mail_from_user; ?>" />
1321
  <p class="description"><?php _e('Specify the email address from which the submitter will receive the email.', WDFM()->prefix); ?></p>
1322
  </div>
1323
- <div class="wd-group">
1324
  <label class="wd-label" for="mail_from_name_user"><?php _e('From Name', WDFM()->prefix); ?></label>
1325
- <input type="text" name="mail_from_name_user" value="<?php echo $row->mail_from_name_user; ?>" id="mail_from_name_user" class="mail_from_name_user" />
1326
- <span class="dashicons dashicons-plus-alt" onclick="document.getElementById('mail_from_name_user_labels').style.display='block';"></span>
1327
- <div style="position:relative; top:-1px;">
1328
- <div id="mail_from_name_user_labels" class="email_labels" style="display:none;">
1329
- <?php
1330
- $choise = "'mail_from_name_user'";
1331
- for ( $i = 0; $i < count($label_label); $i++ ) {
1332
- if ( $label_type[$i] == "type_submit_reset" || $label_type[$i] == "type_editor" || $label_type[$i] == "type_map" || $label_type[$i] == "type_mark_map" || $label_type[$i] == "type_captcha" || $label_type[$i] == "type_recaptcha" || $label_type[$i] == "type_button" || $label_type[$i] == "type_file_upload" || $label_type[$i] == "type_send_copy" ) {
1333
- continue;
1334
- }
1335
- $param = htmlspecialchars(addslashes($label_label[$i]));
1336
- $fld_label = $param;
1337
- if ( strlen($fld_label) > 30 ) {
1338
- $fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
1339
- $fld_label = explode("\n", $fld_label);
1340
- $fld_label = $fld_label[0] . ' ...';
1341
- }
1342
- echo "<a onClick=\"insertAtCursor(" . $choise . ",'" . $param . "'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">" . $fld_label . "</a>";
1343
- }
1344
- echo "<a onClick=\"insertAtCursor(" . $choise . ",'subid'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Submission ID</a>";
1345
- echo "<a onClick=\"insertAtCursor(" . $choise . ",'username'); document.getElementById('mail_from_name_user_labels').style.display='none';\" style=\"display:block; text-decoration:none;\">Username</a>";
1346
- ?>
1347
- </div>
1348
- </div>
1349
- <p class="description"><?php _e('Set the name which is shown as the sender’s name in submission or confirmation emails. Press the Plus (+) button to select a field value.', WDFM()->prefix); ?></p>
1350
  </div>
1351
  <div class="wd-group">
1352
  <label class="wd-label" for="reply_to_user"><?php _e('Reply to (if different from "Email From")', WDFM()->prefix); ?></label>
@@ -1462,31 +1343,9 @@ $stats_labels = $params['stats_labels'];
1462
  </div>
1463
  <div id="custom_text" <?php echo(($row->submit_text_type != 3) ? 'style="display: none;"' : ''); ?>>
1464
  <label class="wd-label"><?php _e('Text', WDFM()->prefix); ?></label>
1465
- <div class="fm_textarea-buttons">
1466
- <?php $choise = "'submit_text'"; ?>
1467
- <input class="button" type="button" value="Submission ID" onClick="insertAtCursor(<?php echo $choise; ?>,'subid')" />
1468
- <input class="button" type="button" value="Ip" onClick="insertAtCursor(<?php echo $choise; ?>,'ip')" />
1469
- <input class="button" type="button" value="User Id" onClick="insertAtCursor(<?php echo $choise; ?>, 'userid')" />
1470
- <input class="button" type="button" value="Username" onClick="insertAtCursor(<?php echo $choise; ?>,'username')" />
1471
- <input class="button" type="button" value="User Email" onClick="insertAtCursor(<?php echo $choise; ?>,'useremail')" />
1472
- <?php
1473
- for ( $i = 0; $i < count($label_label); $i++ ) {
1474
- if ( $label_type[$i] == "type_submit_reset" || $label_type[$i] == "type_editor" || $label_type[$i] == "type_map" || $label_type[$i] == "type_mark_map" || $label_type[$i] == "type_captcha" || $label_type[$i] == "type_recaptcha" || $label_type[$i] == "type_button" || $label_type[$i] == "type_send_copy" || $label_type[$i] == "type_file_upload" ) {
1475
- continue;
1476
- }
1477
- $param = htmlspecialchars(addslashes($label_label[$i]));
1478
- $fld_label = $param;
1479
- if ( strlen($fld_label) > 30 ) {
1480
- $fld_label = wordwrap(htmlspecialchars(addslashes($label_label[$i])), 30);
1481
- $fld_label = explode("\n", $fld_label);
1482
- $fld_label = $fld_label[0] . ' ...';
1483
- }
1484
- ?>
1485
- <input class="button" type="button" value="<?php echo $fld_label; ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
1486
- <?php
1487
- }
1488
- ?>
1489
- </div>
1490
  <?php
1491
  if ( user_can_richedit() ) {
1492
  wp_editor($row->submit_text, 'submit_text', array(
@@ -1515,7 +1374,6 @@ $stats_labels = $params['stats_labels'];
1515
  </div>
1516
  </div>
1517
  </div>
1518
-
1519
  <div id="payment_fieldset" class="adminform fm_fieldset_deactive">
1520
  <div class="wd-table">
1521
  <div class="wd-table-col-70">
@@ -1531,9 +1389,14 @@ $stats_labels = $params['stats_labels'];
1531
  <label for="paypal_mode2"><?php _e('Stripe', WDFM()->prefix); ?></label>
1532
  </div>
1533
  <div class="fm_payment_option">
1534
- <div class="wd-group">
 
 
 
 
 
1535
  <label class="wd-label" for="payment_currency"><?php _e('Payment Currency', WDFM()->prefix); ?></label>
1536
- <select id="payment_currency" name="payment_currency">
1537
  <option value="USD" <?php echo(($row->payment_currency == 'USD') ? 'selected' : ''); ?>>$ &#8226; U.S. Dollar</option>
1538
  <option value="EUR" <?php echo(($row->payment_currency == 'EUR') ? 'selected' : ''); ?>>&#8364; &#8226; Euro</option>
1539
  <option value="GBP" <?php echo(($row->payment_currency == 'GBP') ? 'selected' : ''); ?>>&#163; &#8226; Pound Sterling</option>
@@ -1560,32 +1423,41 @@ $stats_labels = $params['stats_labels'];
1560
  </select>
1561
  <p class="description"><?php _e('Choose the currency to be used for the payments made through your form.', WDFM()->prefix); ?></p>
1562
  </div>
1563
- <div class="wd-group">
1564
  <label class="wd-label" for="tax"><?php _e('Tax', WDFM()->prefix); ?> (%)</label>
1565
- <input type="text" name="tax" id="tax" value="<?php echo $row->tax; ?>" class="text_area" onKeyPress="return check_isnum_point(event)">
1566
  <p class="description"><?php _e('Specify the percentage of the tax. It will be calculated from the total payment amount of your form.', WDFM()->prefix); ?></p>
1567
  </div>
1568
- <div class="wd-group">
1569
  <label class="wd-label"><?php _e('Checkout Mode', WDFM()->prefix); ?></label>
1570
- <input type="radio" name="checkout_mode" <?php echo $row->checkout_mode == 1 ? 'checked="checked"' : '' ?> id="checkout_mode-1" class="wd-radio" value="1">
1571
  <label class="wd-label-radio" for="checkout_mode-1"><?php _e('Production', WDFM()->prefix); ?></label>
1572
- <input type="radio" name="checkout_mode" <?php echo $row->checkout_mode == 0 ? 'checked="checked"' : '' ?> id="checkout_mode-0" class="wd-radio" value="0">
1573
  <label class="wd-label-radio" for="checkout_mode-0"><?php _e('Testmode', WDFM()->prefix); ?></label>
1574
  </div>
1575
- <div class="wd-group">
1576
  <label class="wd-label" for="paypal_email"><?php _e('Paypal email', WDFM()->prefix); ?></label>
1577
- <input type="text" name="paypal_email" id="paypal_email" value="<?php echo $row->paypal_email; ?>" class="text_area">
1578
  <p class="description"><?php _e('Provide the email address of a valid PayPal account. It will receive the payments made through your form.', WDFM()->prefix); ?></p>
1579
  </div>
1580
  </div>
1581
  <div class="fm_payment_option_stripe">
1582
  <?php
1583
  if ( $stripe_addon['enable'] && !empty($stripe_addon['html']) ) {
1584
- echo $stripe_addon['html'];
 
 
 
 
 
1585
  }
1586
  else {
1587
- $stripe_add_on_link = '<a href="https://web-dorado.com/products/wordpress-form/add-ons/stripe.html" target="_blank">' . __('Form Maker Stripe Integration', WDFM()->prefix) . '</a>';
1588
- echo '<div class="error inline"><p>' . sprintf(__("Please install %s add-on to use this feature.", WDFM()->prefix), $stripe_add_on_link) . '</p></div>';
 
 
 
 
1589
  }
1590
  ?>
1591
  </div>
@@ -2016,6 +1888,58 @@ $stats_labels = $params['stats_labels'];
2016
  </script>
2017
  <?php
2018
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2019
 
2020
  /**
2021
  * Form layout.
@@ -2146,7 +2070,6 @@ $stats_labels = $params['stats_labels'];
2146
  $page = $params['page'];
2147
  $page_url = $params['page_url'];
2148
 
2149
-
2150
  if($fieldset_id != "embedded") $row->type = $fieldset_id;
2151
 
2152
  ob_start();
41
  *
42
  * @return string Body html.
43
  */
44
+ public function body( $params ) {
45
  $page = $params['page'];
46
  $actions = $params['actions'];
47
  $form_preview_link = $params['form_preview_link'];
217
  }
218
 
219
  public function edit($params) {
220
+ // TODO: Change this function to standard.
221
+ echo $this->topbar();
222
+
223
  wp_enqueue_style('thickbox');
224
  wp_enqueue_style('fm-phone_field_css');
225
  wp_enqueue_style('fm-jquery-ui');
389
  </div>
390
  </div>
391
  <div class="fm-clear"></div>
392
+ <?php echo $this->add_fields($params); ?>
393
+ <?php echo $this->limitation_alert(); ?>
394
  <?php if (!function_exists('the_editor')) { ?>
395
  <iframe id="tinymce" style="display: none;"></iframe>
396
  <?php } ?>
482
  </div>
483
 
484
  <div type="type_text" class="wdform_field">
485
+ <div class="add-new-button button-primary" onclick="if (fm_check_something_really_important()) return; popup_ready(); Enable(); return false;">
486
  <span class="dashicons dashicons-move"></span>
487
  <?php _e('New Field', WDFM()->prefix); ?>
488
  </div>
512
  <?php
513
  }
514
 
515
+ public function add_fields($params) {
516
  $pro_fields1 = array('file_upload', 'map', 'paypal');
517
  $pro_fields2 = array('file_upload', 'paypal', 'checkbox', 'radio', 'survey', 'time_and_date', 'select');
518
  $fields = array(
526
  array('type' => 'checkbox', 'subtype' => '', 'title' => __('Multiple Choice', WDFM()->prefix)),
527
  array('type' => 'captcha', 'subtype' => 'recaptcha', 'title' => __('Recaptcha', WDFM()->prefix)),
528
  array('type' => 'button', 'subtype' => 'submit_reset', 'title' => __('Submit', WDFM()->prefix)),
529
+ array('type' => 'captcha', 'subtype' => 'captcha', 'title' => __('Simple Captcha', WDFM()->prefix)),
530
+ ),
531
  __('USER INFO FIELDS', WDFM()->prefix) => array(
532
  array('type' => 'text', 'subtype' => 'name', 'title' => __('Name', WDFM()->prefix)),
533
  array('type' => 'text', 'subtype' => 'submitter_mail', 'title' => __('Email', WDFM()->prefix)),
581
  </div>
582
  <div class="popup-body meta-box-sortables">
583
  <div class="popup-body-col field_types">
584
+ <div class="field_types_cont">
585
+ <h2 class="hndle field-types-filter_header"><span><?php _e('FIELD TYPES', WDFM()->prefix); ?></span></h2>
586
+ <span class="field-types-filter-cont">
587
+ <input class="field-types-filter" value="" placeholder="<?php _e('Filter', WDFM()->prefix); ?>" tabindex="-1" type="search" />
588
  </span>
589
+ <div class="postbox filtered-fields hide">
590
  <button class="button-link handlediv" type="button" aria-expanded="true">
591
  <span class="screen-reader-text">Toggle panel</span>
592
  <span class="toggle-indicator" aria-hidden="true"></span>
625
  ?>
626
  </div>
627
  </div>
628
+ <div id="field_container">
629
+ <?php
630
+ if (WDFM()->is_free) {
631
+ echo $this->free_message(__('This field type is available in Premium version', WDFM()->prefix), '', '', 'premium_message');
632
+ }
633
+ $stripe_addon = $params['stripe_addon'];
634
+ if ( $stripe_addon['enable'] ) {
635
+ if (WDFM()->is_free) {
636
+ echo $this->free_message(__('STRIPE add-on compatible with Premium version only', WDFM()->prefix), '', '', 'stripe_message');
637
+ }
638
+ }
639
+ else {
640
+ if (WDFM()->is_free) {
641
+ echo $this->promo_box(__('This feature is available only in the Premium version', WDFM()->prefix), __('Requires STRIPE add-on.', WDFM()->prefix), 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html', 'stripe_message');
642
+ }
643
+ else {
644
+ echo $this->free_message(__('This feature requires STRIPE add-on', WDFM()->prefix), 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html', __( 'Buy', WDFM()->prefix ), 'stripe_message');
645
+ }
646
+ }
647
+ ?>
648
+ <div class="popup-body-col field_options">
649
+ <div id="edit_table"></div>
650
+ </div>
651
+ <div class="popup-body-col field_preview">
652
  <div id="add-button-cont" class="add-button-cont">
653
  <button class="button button-primary button-hero wd-add-button" onclick="add(0, false); return false;">
654
  <?php _e('Add', WDFM()->prefix);?>
657
  <div id="show_table">
658
  </div>
659
  </div>
660
+ </div>
661
  </div>
662
  <input type="hidden" id="old" />
663
  <input type="hidden" id="old_selected" />
684
  return ob_get_clean();
685
  }
686
 
687
+ public function form_options( $params ) {
688
  wp_enqueue_style('thickbox');
689
  wp_enqueue_style('fm-phone_field_css');
690
  wp_enqueue_style('fm-jquery-ui');
743
  * @return string Body html.
744
  */
745
  private function body_form_options( $params ) {
746
+ $id = $params['id'];
747
+ $page = $params['page'];
748
+ $page_title = $params['page_title'];
749
+ $page_url = $params['page_url'];
750
+ $back_url = $params['back_url'];
751
+ $fieldset_id = $params['fieldset_id'];
752
+ $addons = $params['addons'];
753
+ $row = $params['row'];
754
+ $themes = $params['themes'];
755
+ $default_theme = $params['default_theme'];
756
+ $queries = $params['queries'];
757
+ $userGroups = $params['userGroups'];
758
+ $fields = $params['fields'];
759
+ $fields_count = $params['fields_count'];
760
+ $stripe_addon = $params['stripe_addon'];
761
+ $payment_method = $params['payment_method'];
762
+ $label_label = $params['label_label'];
763
+ $label_type = $params['label_type'];
764
+ echo $this->title(array(
765
+ 'title' => $page_title,
766
+ 'title_class' => 'wd-header',
767
+ 'add_new_button' => FALSE,
768
+ ));
769
+ $buttons = array(
770
+ 'save' => array(
771
+ 'title' => __('Update', WDFM()->prefix),
772
+ 'value' => 'save',
773
+ 'onclick' => 'if( ! wd_fm_apply_options(\'apply_form_options\') ){ return false; }',
774
+ 'class' => 'button-primary',
775
+ ),
776
+ 'back' => array(
777
+ 'title' => __('Back to Form', WDFM()->prefix),
778
+ 'value' => 'back',
779
+ 'onclick' => 'window.open(\'' . $back_url . '\', \'_self\'); return false;',
780
+ 'class' => 'button',
781
+ )
782
+ );
783
+ echo $this->buttons($buttons);
784
+ $label_titles_for_submissions = array();
785
+ $labels_id_for_submissions = array();
786
+ $payment_info = $params['payment_info'];
787
+ $labels_for_submissions = $params['labels_for_submissions'];
788
+ if ( $labels_for_submissions ) {
789
+ $labels_id_for_submissions = $params['labels_id_for_submissions'];
790
+ $label_titles_for_submissions = $params['label_titles_for_submissions'];
791
+ }
792
+ $stats_labels_ids = $params['stats_labels_ids'];
793
+ $stats_labels = $params['stats_labels'];
794
+ ?>
795
  <div class="fm-clear"></div>
796
+ <?php echo $this->placeholders_popup($params[ 'label_label' ]); ?>
797
  <div class="submenu-box">
798
  <div class="submenu-pad">
799
  <ul id="submenu" class="configuration">
859
  <select id="theme" name="theme" onChange="set_theme()">
860
  <optgroup label="<?php _e('New Themes', WDFM()->prefix); ?>">
861
  <option value="0" <?php echo $row->theme && $row->theme == 0 ? 'selected' : '' ?> data-version="2"><?php _e('Inherit From Website Theme', WDFM()->prefix); ?></option>
862
+ <?php
863
+ $optiongroup = TRUE;
864
+ foreach ($themes as $theme) {
865
+ if ($optiongroup && $theme->version == 1) {
866
+ $optiongroup = FALSE;
867
+ ?>
868
+ </optgroup>
869
+ <optgroup label="<?php _e('Outdated Themes', WDFM()->prefix); ?>">
870
+ <?php } ?>
871
+ <option value="<?php echo $theme->id; ?>" <?php echo(($theme->id == $row->theme) ? 'selected' : ''); ?> data-version="<?php echo $theme->version; ?>"><?php echo $theme->title; ?></option>
872
+ <?php } ?>
 
 
873
  </optgroup>
874
  </select>
875
  <a id="edit_css" class="options-edit-button" onclick="window.open('<?php echo add_query_arg(array(
899
  <div class="wd-table-col wd-table-col-50 wd-table-col-right">
900
  <div class="wd-box-section">
901
  <div class="wd-box-content">
902
+ <?php
903
+ if (WDFM()->is_free) {
904
+ echo $this->free_message(__('This functionality is available in Premium version', WDFM()->prefix));
905
+ }
906
+ ?>
907
+ <span class="wd-group <?php if(WDFM()->is_free) { echo 'fm-free-option'; } ?>">
908
+ <label class="wd-label"><?php _e('Allow User to see submissions', WDFM()->prefix); ?></label>
909
+ <?php
910
+ $checked_UserGroup = explode(',', $row->user_id_wd);
911
+ $i = 0;
912
+ foreach ( $userGroups as $val => $uG ) {
913
  echo "\r\n" . '<input type="checkbox" value="' . $val . '" id="user_' . $i . '" ';
914
  if ( in_array($val, $checked_UserGroup) ) {
915
  echo ' checked="checked"';
916
  }
917
+ echo ' onchange="acces_level(' . count($userGroups) . ')" ' . disabled(WDFM()->is_free, true, false) . ' /><label for="user_' . $i . '">' . $uG["name"] . '</label><br>';
918
  $i++;
919
+ }
920
+ ?>
921
+ <input type="checkbox" value="guest" id="user_<?php echo $i; ?>" onchange="acces_level(<?php echo count($userGroups); ?>)"<?php echo(in_array('guest', $checked_UserGroup) ? 'checked="checked"' : '') ?> <?php disabled(WDFM()->is_free, true) ?> /><label for="user_<?php echo $i; ?>">Guest</label>
922
+ <input type="hidden" name="user_id_wd" value="<?php echo $row->user_id_wd ?>" id="user_id_wd" />
923
+ <p class="description"><?php _e('Mark all user roles which will be able to view front-end submissions, when you publish them on a post or page.', WDFM()->prefix); ?></p>
924
+ </span>
925
  <?php if ( count($label_titles_for_submissions) ) { ?>
926
+ <span class="wd-group <?php if(WDFM()->is_free) { echo 'fm-free-option'; } ?>">
927
+ <label class="wd-label"><?php _e('Fields to hide in frontend submissions', WDFM()->prefix); ?></label>
928
+ <ul id="form_fields">
929
+ <li>
930
+ <input type="checkbox" name="all_fields" id="all_fields" onclick="checkAllByParentId('form_fields'); checked_labels('filed_label')" value="submit_id,<?php echo implode(',', $labels_id_for_submissions) . "," . ($payment_info ? "payment_info" : ""); ?>" <?php disabled(WDFM()->is_free, true) ?> />
931
+ <label for="all_fields"><?php _e('Select All', WDFM()->prefix); ?></label>
932
+ </li>
933
  <?php
934
+ echo "<li><input type=\"checkbox\" id=\"submit_id\" name=\"submit_id\" value=\"submit_id\" class=\"filed_label\" onclick=\"checked_labels('filed_label')\" " . disabled(WDFM()->is_free, true, false) . " /><label for=\"submit_id\">ID</label></li>";
935
  for ( $i = 0, $n = count($label_titles_for_submissions); $i < $n; $i++ ) {
936
  $field_label = $label_titles_for_submissions[$i];
937
+ echo "<li><input type=\"checkbox\" id=\"filed_label" . $i . "\" name=\"filed_label" . $i . "\" value=\"" . $labels_id_for_submissions[$i] . "\" class=\"filed_label\" onclick=\"checked_labels('filed_label')\" " . disabled(WDFM()->is_free, true, false) . " /><label for=\"filed_label" . $i . "\">" . (strlen($field_label) > 80 ? substr($field_label, 0, 80) . '...' : $field_label) . "</label></li>";
938
  }
939
  if ( $payment_info ) {
940
+ echo "<li><input type=\"checkbox\" id=\"payment_info\" name=\"payment_info\" value=\"payment_info\" class=\"filed_label\" onclick=\"checked_labels('filed_label')\" " . disabled(WDFM()->is_free, true, false) . " /><label for=\"payment_info\">Payment Info</label></li>";
941
  }
942
  ?>
943
+ </ul>
944
+ <input type="hidden" name="frontend_submit_fields" value="<?php echo $row->frontend_submit_fields ?>" id="frontend_submit_fields" />
945
+ <p class="description"><?php _e('Select fields of the form and Stats Fields which will not to be displayed within front-end submissions, when you publish them.', WDFM()->prefix); ?></p>
946
+ </span>
947
  <?php if ( $stats_labels ) { ?>
948
  <span class="wd-group">
949
+ <label class="wd-label"><?php _e('Stats fields:', WDFM()->prefix); ?></label>
950
+ <ul id="stats_fields">
951
+ <li>
952
+ <input type="checkbox" name="all_stats_fields" id="all_stats_fields" onclick="checkAllByParentId('stats_fields'); checked_labels('stats_filed_label');" value="<?php echo implode(',', $stats_labels_ids) . ","; ?>" <?php disabled(WDFM()->is_free, true) ?> />
953
+ <label for="all_stats_fields"><?php _e('Select All', WDFM()->prefix); ?></label>
954
+ </li>
955
+ <?php
956
+ for ( $i = 0, $n = count($stats_labels); $i < $n; $i++ ) {
957
+ $field_label = $stats_labels[$i];
958
+ echo "<li><input type=\"checkbox\" id=\"stats_filed_label" . $i . "\" name=\"stats_filed_label" . $i . "\" value=\"" . $stats_labels_ids[$i] . "\" class=\"stats_filed_label\" onclick=\"checked_labels('stats_filed_label')\" " . disabled(WDFM()->is_free, true, false) . " /><label for=\"stats_filed_label" . $i . "\">" . (strlen($field_label) > 80 ? substr($field_label, 0, 80) . '...' : $field_label) . "</label></li>";
959
+ }
960
+ ?>
961
+ </ul>
962
+ <input type="hidden" name="frontend_submit_stat_fields" value="<?php echo $row->frontend_submit_stat_fields ?>" id="frontend_submit_stat_fields" />
963
+ <p class="description"><?php _e('Select fields of the form and Stats Fields which will not to be displayed within front-end submissions, when you publish them.', WDFM()->prefix); ?></p>
964
  </span>
965
  <?php }
966
  } ?>
995
  <strong><?php _e('Email to Administrator', WDFM()->prefix); ?></strong>
996
  </div>
997
  <div class="wd-box-content">
998
+ <div class="wd-group wd-has-placeholder">
999
  <label class="wd-label" for="mailToAdd"><?php _e('Email to send submissions to', WDFM()->prefix); ?></label>
1000
+ <input type="text" id="mailToAdd" name="mailToAdd" />
1001
  <input type="hidden" id="mail" name="mail" value="<?php echo $row->mail . ($row->mail && (substr($row->mail, -1) != ',') ? ',' : ''); ?>" />
1002
+ <span class="dashicons dashicons-list-view" data-id="mailToAdd"></span>
1003
  <div id="cfm_mail_div">
1004
  <?php
1005
  $mail_array = explode(',', $row->mail);
1016
  </div>
1017
  <p class="description"><?php _e('Specify the email address(es), to which submitted form information will be sent. For multiple email addresses separate with commas.', WDFM()->prefix); ?></p>
1018
  </div>
1019
+ <div class="wd-group wd-has-placeholder">
1020
  <label class="wd-label" for="mail_subject"><?php _e('Subject', WDFM()->prefix); ?></label>
1021
+ <input type="text" id="mail_subject" name="mail_subject" value="<?php echo !empty($row->mail_subject) ? $row->mail_subject : '{formtitle}'; ?>" />
1022
+ <span class="dashicons dashicons-list-view" data-id="mail_subject"></span>
1023
+ <p class="description"><?php _e('Add a custom subject or search for a form field for the submission email. In case it’s left blank, Form Title will be set as the subject of submission emails.', WDFM()->prefix); ?></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1024
  </div>
1025
  <div class="wd-group">
1026
  <label class="wd-label" for="script_mail"><?php _e('Custom Text in Email For Administrator', WDFM()->prefix); ?></label>
1027
+ <div class="wd-editor-placeholder">
1028
+ <span class="dashicons dashicons-list-view" data-id="script_mail"></span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1029
  </div>
1030
  <?php
1031
  if ( user_can_richedit() ) {
1081
  </p>
1082
  <p class="description"><?php _e('Specify the email address from which the administrator will receive the email.', WDFM()->prefix); ?></p>
1083
  </div>
1084
+ <div class="wd-group wd-has-placeholder">
1085
  <label class="wd-label" for="from_name"><?php _e('From Name', WDFM()->prefix); ?></label>
1086
+ <input type="text" name="from_name" value="<?php echo $row->from_name; ?>" id="from_name" />
1087
+ <span class="dashicons dashicons-list-view" data-id="from_name"></span>
1088
+ <p class="description"><?php _e('Set the name or search for a form field which is shown as the sender’s name in submission or confirmation emails.', WDFM()->prefix); ?></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1089
  </div>
1090
  <div class="wd-group">
1091
  <label class="wd-label" for="from_name"><?php _e('Reply to (if different from "Email From")', WDFM()->prefix); ?></label>
1181
  ?>
1182
  <p class="description"><?php _e('Use this setting to select the email field of your form, to which the submissions will be sent.', WDFM()->prefix); ?></p>
1183
  </div>
1184
+ <div class="wd-group wd-has-placeholder">
1185
  <label class="wd-label" for="mail_subject_user"><?php _e('Subject', WDFM()->prefix); ?></label>
1186
+ <input type="text" name="mail_subject_user" value="<?php echo !empty($row->mail_subject_user) ? $row->mail_subject_user : '{formtitle}' ?>" id="mail_subject_user" class="mail_subject_user" />
1187
+ <span class="dashicons dashicons-list-view" data-id="mail_subject_user"></span>
1188
+ <p class="description"><?php _e('Add a custom subject or search for a form field for the submission email. In case it’s left blank, Form Title will be set as the subject of submission emails.', WDFM()->prefix); ?></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1189
  </div>
1190
  <div class="wd-group">
1191
  <label class="wd-label" for="script_mail_user"><?php _e('Custom Text in Email For User', WDFM()->prefix); ?></label>
1192
+ <div class="wd-editor-placeholder">
1193
+ <span class="dashicons dashicons-list-view" data-id="script_mail_user"></span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1194
  </div>
1195
  <?php
1196
  if ( user_can_richedit() ) {
1223
  <input type="text" id="mail_from_user" name="mail_from_user" value="<?php echo $row->mail_from_user; ?>" />
1224
  <p class="description"><?php _e('Specify the email address from which the submitter will receive the email.', WDFM()->prefix); ?></p>
1225
  </div>
1226
+ <div class="wd-group wd-has-placeholder">
1227
  <label class="wd-label" for="mail_from_name_user"><?php _e('From Name', WDFM()->prefix); ?></label>
1228
+ <input type="text" name="mail_from_name_user" value="<?php echo $row->mail_from_name_user; ?>" id="mail_from_name_user" />
1229
+ <span class="dashicons dashicons-list-view" data-id="mail_from_name_user"></span>
1230
+ <p class="description"><?php _e('Set the name or search for a form field which is shown as the sender’s name in submission or confirmation emails.', WDFM()->prefix); ?></p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1231
  </div>
1232
  <div class="wd-group">
1233
  <label class="wd-label" for="reply_to_user"><?php _e('Reply to (if different from "Email From")', WDFM()->prefix); ?></label>
1343
  </div>
1344
  <div id="custom_text" <?php echo(($row->submit_text_type != 3) ? 'style="display: none;"' : ''); ?>>
1345
  <label class="wd-label"><?php _e('Text', WDFM()->prefix); ?></label>
1346
+ <div class="wd-editor-placeholder">
1347
+ <span class="dashicons dashicons-list-view" data-id="submit_text"></span>
1348
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1349
  <?php
1350
  if ( user_can_richedit() ) {
1351
  wp_editor($row->submit_text, 'submit_text', array(
1374
  </div>
1375
  </div>
1376
  </div>
 
1377
  <div id="payment_fieldset" class="adminform fm_fieldset_deactive">
1378
  <div class="wd-table">
1379
  <div class="wd-table-col-70">
1389
  <label for="paypal_mode2"><?php _e('Stripe', WDFM()->prefix); ?></label>
1390
  </div>
1391
  <div class="fm_payment_option">
1392
+ <?php
1393
+ if (WDFM()->is_free) {
1394
+ echo $this->free_message(__('PAYPAL is available in Premium version', WDFM()->prefix));
1395
+ }
1396
+ ?>
1397
+ <div class="wd-group <?php if(WDFM()->is_free) { echo 'fm-free-option'; } ?>">
1398
  <label class="wd-label" for="payment_currency"><?php _e('Payment Currency', WDFM()->prefix); ?></label>
1399
+ <select id="payment_currency" name="payment_currency" <?php disabled(WDFM()->is_free, true) ?>>
1400
  <option value="USD" <?php echo(($row->payment_currency == 'USD') ? 'selected' : ''); ?>>$ &#8226; U.S. Dollar</option>
1401
  <option value="EUR" <?php echo(($row->payment_currency == 'EUR') ? 'selected' : ''); ?>>&#8364; &#8226; Euro</option>
1402
  <option value="GBP" <?php echo(($row->payment_currency == 'GBP') ? 'selected' : ''); ?>>&#163; &#8226; Pound Sterling</option>
1423
  </select>
1424
  <p class="description"><?php _e('Choose the currency to be used for the payments made through your form.', WDFM()->prefix); ?></p>
1425
  </div>
1426
+ <div class="wd-group <?php if(WDFM()->is_free) { echo 'fm-free-option'; } ?>">
1427
  <label class="wd-label" for="tax"><?php _e('Tax', WDFM()->prefix); ?> (%)</label>
1428
+ <input type="text" name="tax" id="tax" value="<?php echo $row->tax; ?>" class="text_area" onKeyPress="return check_isnum_point(event)" <?php disabled(WDFM()->is_free, true) ?> />
1429
  <p class="description"><?php _e('Specify the percentage of the tax. It will be calculated from the total payment amount of your form.', WDFM()->prefix); ?></p>
1430
  </div>
1431
+ <div class="wd-group <?php if(WDFM()->is_free) { echo 'fm-free-option'; } ?>">
1432
  <label class="wd-label"><?php _e('Checkout Mode', WDFM()->prefix); ?></label>
1433
+ <input type="radio" name="checkout_mode" <?php echo $row->checkout_mode == 1 ? 'checked="checked"' : '' ?> id="checkout_mode-1" class="wd-radio" value="1" <?php disabled(WDFM()->is_free, true) ?> />
1434
  <label class="wd-label-radio" for="checkout_mode-1"><?php _e('Production', WDFM()->prefix); ?></label>
1435
+ <input type="radio" name="checkout_mode" <?php echo $row->checkout_mode == 0 ? 'checked="checked"' : '' ?> id="checkout_mode-0" class="wd-radio" value="0" <?php disabled(WDFM()->is_free, true) ?> />
1436
  <label class="wd-label-radio" for="checkout_mode-0"><?php _e('Testmode', WDFM()->prefix); ?></label>
1437
  </div>
1438
+ <div class="wd-group <?php if(WDFM()->is_free) { echo 'fm-free-option'; } ?>">
1439
  <label class="wd-label" for="paypal_email"><?php _e('Paypal email', WDFM()->prefix); ?></label>
1440
+ <input type="text" name="paypal_email" id="paypal_email" value="<?php echo $row->paypal_email; ?>" class="text_area" <?php disabled(WDFM()->is_free, true) ?> />
1441
  <p class="description"><?php _e('Provide the email address of a valid PayPal account. It will receive the payments made through your form.', WDFM()->prefix); ?></p>
1442
  </div>
1443
  </div>
1444
  <div class="fm_payment_option_stripe">
1445
  <?php
1446
  if ( $stripe_addon['enable'] && !empty($stripe_addon['html']) ) {
1447
+ if (WDFM()->is_free) {
1448
+ echo $this->free_message(__('STRIPE add-on compatible with Premium version only', WDFM()->prefix));
1449
+ }
1450
+ else {
1451
+ echo $stripe_addon[ 'html' ];
1452
+ }
1453
  }
1454
  else {
1455
+ if (WDFM()->is_free) {
1456
+ echo $this->promo_box(__('This feature is available only in the Premium version', WDFM()->prefix), __('Requires STRIPE add-on.', WDFM()->prefix), 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html');
1457
+ }
1458
+ else {
1459
+ echo $this->free_message(__('This feature requires STRIPE add-on', WDFM()->prefix), 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html', __( 'Buy', WDFM()->prefix ));
1460
+ }
1461
  }
1462
  ?>
1463
  </div>
1888
  </script>
1889
  <?php
1890
  }
1891
+
1892
+ public function placeholders_popup($placeholders) {
1893
+ ob_start();
1894
+ ?>
1895
+ <div id="placeholders_overlay"></div>
1896
+ <div class="placeholder-popup js">
1897
+ <div class="placeholder-body meta-box-sortables">
1898
+ <div class="placeholder-body-col placeholders">
1899
+ <div class="placeholders_cont">
1900
+ <p class="description"><?php _e('Select a field, the value of which will be used as the placeholder.', WDFM()->prefix); ?></p>
1901
+ <span class="placeholders-filter-cont">
1902
+ <input class="placeholders-filter" value="" placeholder="<?php _e('Filter', WDFM()->prefix); ?>" tabindex="-1" type="search" />
1903
+ </span>
1904
+ <div class="postbox filtered-placeholders hide">
1905
+ <h2 class="hndle readonly">
1906
+ <span><?php _e('Filtered placeholders', WDFM()->prefix); ?></span>
1907
+ </h2>
1908
+ <div class="inside"></div>
1909
+ </div>
1910
+ <?php
1911
+ foreach ($placeholders as $section => $field) {
1912
+ ?>
1913
+ <div class="postbox<?php echo $section != __('Misc', WDFM()->prefix) ? " closed" : ""; ?>">
1914
+ <button class="button-link handlediv" type="button" aria-expanded="true">
1915
+ <span class="screen-reader-text"><?php echo __('Toggle panel:', WDFM()->prefix) , $section; ?></span>
1916
+ <span class="toggle-indicator" aria-hidden="false"></span>
1917
+ </button>
1918
+ <h2 class="hndle">
1919
+ <span><?php echo $section; ?></span>
1920
+ </h2>
1921
+ <div class="inside">
1922
+ <?php
1923
+ foreach ($field as $button) {
1924
+ ?>
1925
+ <button class="wd-button button-secondary" onclick="wd_insert_placeholder(jQuery('.placeholders-active .dashicons-list-view').data('id'), '<?php echo $button['value']; ?>'); return false;" data-type="">
1926
+ <?php echo $button['title']; ?>
1927
+ </button>
1928
+ <?php
1929
+ }
1930
+ ?>
1931
+ </div>
1932
+ </div>
1933
+ <?php
1934
+ }
1935
+ ?>
1936
+ </div>
1937
+ </div>
1938
+ </div>
1939
+ </div>
1940
+ <?php
1941
+ return ob_get_clean();
1942
+ }
1943
 
1944
  /**
1945
  * Form layout.
2070
  $page = $params['page'];
2071
  $page_url = $params['page_url'];
2072
 
 
2073
  if($fieldset_id != "embedded") $row->type = $fieldset_id;
2074
 
2075
  ob_start();
admin/views/Pricing_fm.php ADDED
@@ -0,0 +1,174 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class FMViewPricing_fm
5
+ */
6
+ class FMViewPricing_fm extends FMAdminView {
7
+ /**
8
+ * FMViewpricing_fm constructor.
9
+ */
10
+ public function __construct() {
11
+ wp_enqueue_style('fm-style');
12
+ wp_enqueue_style('fm-pricing');
13
+ wp_enqueue_script('fm-admin');
14
+ }
15
+
16
+ public function display( $params = array() ) {
17
+ $page = $params['page'];
18
+ $page_url = $params['page_url'];
19
+ ob_start();
20
+ echo $this->body($params);
21
+ // Pass the content to form.
22
+ $form_attr = array(
23
+ 'id' => WDFM()->prefix . '_pricing',
24
+ 'name' => WDFM()->prefix . '_pricing',
25
+ 'class' => WDFM()->prefix . '_pricing wd-form',
26
+ 'action' => add_query_arg( array('page' => $page, 'task' => 'display'), $page_url),
27
+ );
28
+ echo $this->form(ob_get_clean(), $form_attr);
29
+ }
30
+
31
+ /**
32
+ * Generate page body.
33
+ *
34
+ * @return string Body html.
35
+ */
36
+ public function body( $params = array() ) {
37
+ ?>
38
+ <div class="fm-pricestable-container">
39
+ <div class="fm-pricestable">
40
+ <div class="ptFree">
41
+ <span class="price product_info"><span>$</span>30</span>
42
+ <p><?php _e('Personal', WDFM()->prefix); ?></p>
43
+ <span class="supp">
44
+ <strong><?php _e('6 Months', WDFM()->prefix); ?></strong>
45
+ <span class="desc_span"><?php _e('You’ll have access to new releases during this period and update plugin to include new features without additional charges.', WDFM()->prefix); ?></span><br>
46
+ <?php _e('Access to Updates', WDFM()->prefix); ?>
47
+ </span>
48
+ <span class="supp">
49
+ <strong><?php _e('6 Months', WDFM()->prefix); ?></strong>
50
+ <span class="desc_span"><?php _e('Get quick answers to all product related questions from our support team.', WDFM()->prefix); ?></span><br>
51
+ <?php _e('Premium Support', WDFM()->prefix); ?>
52
+ </span>
53
+ <span class="supp product_info">
54
+ <strong><?php _e('1 Domain', WDFM()->prefix); ?></strong><br>
55
+ <?php _e('Support', WDFM()->prefix); ?>
56
+ </span>
57
+ <ul class="circles">
58
+ <li><div></div></li>
59
+ <li><div></div></li>
60
+ <li><div></div></li>
61
+ </ul>
62
+ <span class="supp product_info"><?php _e('Unlimited Forms/Fields', WDFM()->prefix); ?></span>
63
+ <span class="supp product_info"><?php _e('40+ Field Types', WDFM()->prefix); ?></span>
64
+ <span class="supp product_info"><?php _e('Multi-Page Forms', WDFM()->prefix); ?></span>
65
+ <span class="supp product_info"><?php _e('Paypal Integration', WDFM()->prefix); ?></span>
66
+ <span class="supp product_info"><?php _e('File Upload field', WDFM()->prefix); ?></span>
67
+ <span class="supp product_info"><?php _e('Fully Customizable Themes', WDFM()->prefix); ?></span>
68
+ <span>
69
+ <a href="https://web-dorado.com/index.php?option=com_wdsubscriptions&view=checkoutpage&tmpl=component&id=69&offerId=117" target="_blank"><?php _e('Buy now', WDFM()->prefix); ?></a>
70
+ </span>
71
+ </div>
72
+ <div class="ptPersonal">
73
+ <span class="price product_info"><span>$</span>45</span>
74
+ <p><?php _e('Business', WDFM()->prefix); ?></p>
75
+ <span class="supp">
76
+ <strong><?php _e('1 Year', WDFM()->prefix); ?></strong>
77
+ <span class="desc_span"><?php _e('You’ll have access to new releases during this period and update plugin to include new features without additional charges.', WDFM()->prefix); ?></span><br>
78
+ <?php _e('Access to Updates', WDFM()->prefix); ?>
79
+ </span>
80
+ <span class="supp">
81
+ <strong><?php _e('1 Year', WDFM()->prefix); ?></strong>
82
+ <span class="desc_span"><?php _e('Get quick answers to all product related questions from our support team.', WDFM()->prefix); ?></span><br>
83
+ <?php _e('Premium Support', WDFM()->prefix); ?>
84
+ </span>
85
+ <span class="supp product_info">
86
+ <strong><?php _e('3 Domains', WDFM()->prefix); ?></strong><br>
87
+ <?php _e('Support', WDFM()->prefix); ?>
88
+ </span>
89
+ <ul class="circles">
90
+ <li><div></div></li>
91
+ <li><div></div></li>
92
+ <li><div></div></li>
93
+ </ul>
94
+ <span class="supp product_info"><?php _e('Unlimited Forms/Fields', WDFM()->prefix); ?></span>
95
+ <span class="supp product_info"><?php _e('40+ Field Types', WDFM()->prefix); ?></span>
96
+ <span class="supp product_info"><?php _e('Multi-Page Forms', WDFM()->prefix); ?></span>
97
+ <span class="supp product_info"><?php _e('Paypal Integration', WDFM()->prefix); ?></span>
98
+ <span class="supp product_info"><?php _e('File Upload field', WDFM()->prefix); ?></span>
99
+ <span class="supp product_info"><?php _e('Fully Customizable Themes', WDFM()->prefix); ?></span>
100
+ <span>
101
+ <a href="https://web-dorado.com/index.php?option=com_wdsubscriptions&view=checkoutpage&tmpl=component&id=70&offerId=117" target="_blank"><?php _e('Buy now', WDFM()->prefix); ?></a>
102
+ </span>
103
+ </div>
104
+ <div class="ptBusiness">
105
+ <span class="price product_info"><span>$</span>60</span>
106
+ <p><?php _e('Developer', WDFM()->prefix); ?></p>
107
+ <span class="supp">
108
+ <strong><?php _e('1 Year', WDFM()->prefix); ?></strong>
109
+ <span class="desc_span"><?php _e('You’ll have access to new releases during this period and update plugin to include new features without additional charges.', WDFM()->prefix); ?></span><br>
110
+ <?php _e('Access to Updates', WDFM()->prefix); ?>
111
+ </span>
112
+ <span class="supp"><strong><?php _e('1 Year', WDFM()->prefix); ?></strong>
113
+ <span class="desc_span"><?php _e('Get quick answers to all product related questions from our support team.', WDFM()->prefix); ?></span><br>
114
+ <?php _e('Premium Support', WDFM()->prefix); ?>
115
+ </span>
116
+ <span class="supp product_info">
117
+ <strong><?php _e('Unlimited Domains', WDFM()->prefix); ?></strong><br>
118
+ <?php _e('Support', WDFM()->prefix); ?>
119
+ </span>
120
+ <ul class="circles">
121
+ <li><div></div></li>
122
+ <li><div></div></li>
123
+ <li><div></div></li>
124
+ </ul>
125
+ <span class="supp product_info"><?php _e('Unlimited Forms/Fields', WDFM()->prefix); ?></span>
126
+ <span class="supp product_info"><?php _e('40+ Field Types', WDFM()->prefix); ?></span>
127
+ <span class="supp product_info"><?php _e('Multi-Page Forms', WDFM()->prefix); ?></span>
128
+ <span class="supp product_info"><?php _e('Paypal Integration', WDFM()->prefix); ?></span>
129
+ <span class="supp product_info"><?php _e('File Upload field', WDFM()->prefix); ?></span>
130
+ <span class="supp product_info"><?php _e('Fully Customizable Themes', WDFM()->prefix); ?></span>
131
+ <span>
132
+ <a href="https://web-dorado.com/index.php?option=com_wdsubscriptions&view=checkoutpage&tmpl=component&id=71&offerId=117" target="_blank"><?php _e('Buy now', WDFM()->prefix); ?></a>
133
+ </span>
134
+ </div>
135
+ <div class="ptDeveloper">
136
+ <span class="special_offer"><?php _e('Special offer', WDFM()->prefix); ?></span>
137
+ <span class="price product_info"><span>$</span>99</span>
138
+ <p class="save_money"><span><?php _e('Save', WDFM()->prefix); ?> $735</span></p>
139
+ <p><?php _e('Form Maker Premium', WDFM()->prefix); ?></p>
140
+ <span class="supp">
141
+ <strong><?php _e('+12 Add-ons', WDFM()->prefix); ?></strong>
142
+ <span class="desc_span"><?php _e('Tune up Form Maker with powerful add-ons: PDF Integration, Mailchimp, Export/Import, Conditional Emails, Registration,etc.', WDFM()->prefix); ?></span>
143
+ </span>
144
+ <span class="supp product_info">
145
+ <strong><?php _e('+ All Our 50 WordPress Premium Plugins', WDFM()->prefix); ?></strong>
146
+ </span>
147
+ <span class="supp product_info"><?php _e('Photo Gallery, Slider, Event Calendar &amp; etc.', WDFM()->prefix); ?></span>
148
+ <ul class="circles">
149
+ <li><div></div></li>
150
+ <li><div></div></li>
151
+ <li><div></div></li>
152
+ </ul>
153
+ <span class="supp">
154
+ <?php _e('6 Months Access to Updates', WDFM()->prefix); ?>
155
+ <span class="desc_span"><?php _e('You’ll have access to new releases during this period and update plugins to include new features without additional charges.', WDFM()->prefix); ?></span>
156
+ </span>
157
+ <span class="supp"><?php _e('6 Months Premium Support', WDFM()->prefix); ?>
158
+ <span class="desc_span"><?php _e('Get quick answers to all product related questions from our support team.', WDFM()->prefix); ?></span>
159
+ </span>
160
+ <span class="supp product_info"><?php _e('Unlimited Domains Support', WDFM()->prefix); ?></span>
161
+ <span>
162
+ <a href="https://web-dorado.com/index.php?option=com_wdsubscriptions&task=buy&id=117&from_id=71&wd_button_clicks=insert_into" target="_blank"><?php _e('Buy now', WDFM()->prefix); ?></a>
163
+ </span>
164
+ </div>
165
+ </div>
166
+ <div class="fm-prices-more">
167
+ <div>
168
+ <?php _e('Learn more about Form Maker plugin.', WDFM()->prefix); ?> <a href="https://web-dorado.com/products/wordpress-form.html" target="_blank"><?php _e('Learn More', WDFM()->prefix); ?></a>
169
+ </div>
170
+ </div>
171
+ </div>
172
+ <?php
173
+ }
174
+ }
admin/views/Submissions_fm.php CHANGED
@@ -40,6 +40,9 @@ class FMViewSubmissions_fm extends FMAdminView {
40
  * @param $params
41
  */
42
  public function forms( $params ) {
 
 
 
43
  $id = $params['id'];
44
  $page = $params['page'];
45
  $page_title = $params['page_title'];
@@ -1065,6 +1068,9 @@ class FMViewSubmissions_fm extends FMAdminView {
1065
  }
1066
 
1067
  public function edit( $params ) {
 
 
 
1068
  $form = $params['form'];
1069
  $current_id = $params['current_id'];
1070
  $rows = $params['rows'];
40
  * @param $params
41
  */
42
  public function forms( $params ) {
43
+ // TODO: Change this function to standard.
44
+ echo $this->topbar();
45
+
46
  $id = $params['id'];
47
  $page = $params['page'];
48
  $page_title = $params['page_title'];
1068
  }
1069
 
1070
  public function edit( $params ) {
1071
+ // TODO: Change this function to standard.
1072
+ echo $this->topbar();
1073
+
1074
  $form = $params['form'];
1075
  $current_id = $params['current_id'];
1076
  $rows = $params['rows'];
admin/views/Themes_fm.php CHANGED
@@ -142,7 +142,7 @@ class FMViewThemes_fm extends FMAdminView {
142
  'save' => array(
143
  'title' => __('Save', WDFM()->prefix),
144
  'value' => 'save',
145
- 'onclick' => 'if (fm_check_required(\'title\', \'' . __('Title', WDFM()->prefix) . '\') || !submitbutton(' . $params['row']->version . ')) {return false;}; fm_set_input_value(\'task\', \'apply\');',
146
  'class' => 'button-primary',
147
  ),
148
  );
142
  'save' => array(
143
  'title' => __('Save', WDFM()->prefix),
144
  'value' => 'save',
145
+ 'onclick' => 'if (fm_check_required(\'title\', \'' . __('Title', WDFM()->prefix) . '\') || !fm_theme_submit_button(\'' . WDFM()->prefix . '_themes\', ' . $params['row']->version . ')) {return false;}; fm_set_input_value(\'task\', \'apply\');',
146
  'class' => 'button-primary',
147
  ),
148
  );
admin/views/Uninstall_fm.php CHANGED
@@ -58,6 +58,7 @@ class FMViewUninstall_fm {
58
  <li><?php echo $prefix; ?>formmaker</li>
59
  <li><?php echo $prefix; ?>formmaker_backup</li>
60
  <li><?php echo $prefix; ?>formmaker_blocked</li>
 
61
  <li><?php echo $prefix; ?>formmaker_submits</li>
62
  <li><?php echo $prefix; ?>formmaker_views</li>
63
  <li><?php echo $prefix; ?>formmaker_themes</li>
@@ -112,6 +113,7 @@ class FMViewUninstall_fm {
112
  <p><?php echo $prefix; ?>formmaker_backup,</p>
113
  <p><?php echo $prefix; ?>formmaker_blocked,</p>
114
  <p><?php echo $prefix; ?>formmaker_sessions,</p>
 
115
  <p><?php echo $prefix; ?>formmaker_submits,</p>
116
  <p><?php echo $prefix; ?>formmaker_themes,</p>
117
  <p><?php echo $prefix; ?>formmaker_views,</p>
58
  <li><?php echo $prefix; ?>formmaker</li>
59
  <li><?php echo $prefix; ?>formmaker_backup</li>
60
  <li><?php echo $prefix; ?>formmaker_blocked</li>
61
+ <li><?php echo $prefix; ?>formmaker_groups</li>
62
  <li><?php echo $prefix; ?>formmaker_submits</li>
63
  <li><?php echo $prefix; ?>formmaker_views</li>
64
  <li><?php echo $prefix; ?>formmaker_themes</li>
113
  <p><?php echo $prefix; ?>formmaker_backup,</p>
114
  <p><?php echo $prefix; ?>formmaker_blocked,</p>
115
  <p><?php echo $prefix; ?>formmaker_sessions,</p>
116
+ <p><?php echo $prefix; ?>formmaker_groups,</p>
117
  <p><?php echo $prefix; ?>formmaker_submits,</p>
118
  <p><?php echo $prefix; ?>formmaker_themes,</p>
119
  <p><?php echo $prefix; ?>formmaker_views,</p>
admin/views/view.php CHANGED
@@ -5,6 +5,9 @@ defined('ABSPATH') || die('Access Denied');
5
  * Admin view class.
6
  */
7
  class FMAdminView {
 
 
 
8
  /**
9
  * Generate form.
10
  *
@@ -14,6 +17,7 @@ class FMAdminView {
14
  * @return string Form html.
15
  */
16
  protected function form($content = '', $attr = array()) {
 
17
  ob_start();
18
  // Form.
19
  $action = isset($attr['action']) ? esc_attr($attr['action']) : '';
@@ -23,7 +27,8 @@ class FMAdminView {
23
  $class = isset($attr['class']) ? esc_attr($attr['class']) : WDFM()->prefix . '_form';
24
  $style = isset($attr['style']) ? esc_attr($attr['style']) : '';
25
  $current_id = isset($attr['current_id']) ? esc_attr($attr['current_id']) : '';
26
- ?><div class="wrap">
 
27
  <?php
28
  // Generate message container by message id or directly by message.
29
  $message_id = WDW_FM_Library::get('message', 0);
@@ -56,7 +61,7 @@ class FMAdminView {
56
  *
57
  * @return string Title html.
58
  */
59
- protected function title($params) {
60
  $title = !empty($params['title']) ? $params['title'] : '';
61
  $title_class = !empty($params['title_class']) ? $params['title_class'] : '';
62
  $title_name = !empty($params['title_name']) ? $params['title_name'] : '';
@@ -64,13 +69,12 @@ class FMAdminView {
64
  $title_value = !empty($params['title_value']) ? $params['title_value'] : '';
65
  $add_new_button = !empty($params['add_new_button']) ? $params['add_new_button'] : '';
66
 
67
- $attributes = '';
68
  if ( !empty($add_new_button) && is_array($add_new_button) ) {
69
  foreach ( $add_new_button as $key => $val ) {
70
  $attributes .= $key . '="' . $val . '"';
71
  }
72
  }
73
-
74
  ob_start();
75
  ?><div class="wd-page-title <?php echo $title_class; ?>">
76
  <h1 class="wp-heading-inline"><?php echo $title; ?>
@@ -104,7 +108,7 @@ class FMAdminView {
104
  *
105
  * @return array Buttons html.
106
  */
107
- protected function buttons($buttons = array(), $single = FALSE, $parent = array()) {
108
  ob_start();
109
  if ( !$single ) {
110
  $parent_id = isset($parent['id']) ? esc_attr($parent['id']) : '';
@@ -281,4 +285,285 @@ class FMAdminView {
281
  do_action('fm_popup_import_content');
282
  }
283
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
284
  }
5
  * Admin view class.
6
  */
7
  class FMAdminView {
8
+
9
+ private $premium_link = 'https://web-dorado.com/products/wordpress-form.html';
10
+
11
  /**
12
  * Generate form.
13
  *
17
  * @return string Form html.
18
  */
19
  protected function form($content = '', $attr = array()) {
20
+ echo $this->topbar();
21
  ob_start();
22
  // Form.
23
  $action = isset($attr['action']) ? esc_attr($attr['action']) : '';
27
  $class = isset($attr['class']) ? esc_attr($attr['class']) : WDFM()->prefix . '_form';
28
  $style = isset($attr['style']) ? esc_attr($attr['style']) : '';
29
  $current_id = isset($attr['current_id']) ? esc_attr($attr['current_id']) : '';
30
+ ?>
31
+ <div class="wrap">
32
  <?php
33
  // Generate message container by message id or directly by message.
34
  $message_id = WDW_FM_Library::get('message', 0);
61
  *
62
  * @return string Title html.
63
  */
64
+ protected function title( $params = array() ) {
65
  $title = !empty($params['title']) ? $params['title'] : '';
66
  $title_class = !empty($params['title_class']) ? $params['title_class'] : '';
67
  $title_name = !empty($params['title_name']) ? $params['title_name'] : '';
69
  $title_value = !empty($params['title_value']) ? $params['title_value'] : '';
70
  $add_new_button = !empty($params['add_new_button']) ? $params['add_new_button'] : '';
71
 
72
+ $attributes = '';
73
  if ( !empty($add_new_button) && is_array($add_new_button) ) {
74
  foreach ( $add_new_button as $key => $val ) {
75
  $attributes .= $key . '="' . $val . '"';
76
  }
77
  }
 
78
  ob_start();
79
  ?><div class="wd-page-title <?php echo $title_class; ?>">
80
  <h1 class="wp-heading-inline"><?php echo $title; ?>
108
  *
109
  * @return array Buttons html.
110
  */
111
+ protected function buttons( $buttons = array(), $single = FALSE, $parent = array() ) {
112
  ob_start();
113
  if ( !$single ) {
114
  $parent_id = isset($parent['id']) ? esc_attr($parent['id']) : '';
285
  do_action('fm_popup_import_content');
286
  }
287
  }
288
+
289
+ /**
290
+ * Generate top bar.
291
+ *
292
+ * @return string Top bar html.
293
+ */
294
+ protected function topbar() {
295
+ $page = isset($_GET['page']) ? esc_html($_GET['page']) : '';
296
+ $page = str_replace(WDFM()->menu_postfix, '', $page);
297
+ $task = isset($_REQUEST['task']) ? esc_html($_REQUEST['task']) : '';
298
+ $user_guide_link = 'https://web-dorado.com/wordpress-form-maker/';
299
+ $show_content = true;
300
+ $show_guide_link = true;
301
+ $show_head = false;
302
+ switch ($page) {
303
+ case 'blocked_ips': {
304
+ $user_guide_link .= 'submissions.html';
305
+ break;
306
+ }
307
+ case 'options': {
308
+ $user_guide_link .= 'themes-and-options.html';
309
+ break;
310
+ }
311
+ case 'pricing': {
312
+ $show_content = false;
313
+ $show_guide_link = false;
314
+ $show_head = true;
315
+ $user_guide_link .= '';
316
+ break;
317
+ }
318
+ case 'manage': {
319
+ switch ( $task ) {
320
+ case 'add':
321
+ case 'edit':
322
+ case 'edit_old': {
323
+ $user_guide_link .= 'form-fields/basic-fields.html';
324
+ break;
325
+ }
326
+ case 'form_options':
327
+ case 'form_options_old': {
328
+ $user_guide_link .= 'form-options/general-options.html';
329
+ break;
330
+ }
331
+ case 'display_options': {
332
+ $user_guide_link .= 'display-options-publishing/configuring-display-options.html';
333
+ break;
334
+ }
335
+ default: {
336
+ $user_guide_link .= 'creating-form.html';
337
+ $show_content = false;
338
+ $show_head = true;
339
+ }
340
+ }
341
+ break;
342
+ }
343
+ case 'submissions': {
344
+ $user_guide_link .= 'submissions.html';
345
+ break;
346
+ }
347
+ case 'themes': {
348
+ $user_guide_link .= 'themes-and-options.html';
349
+ break;
350
+ }
351
+ case 'addons': {
352
+ $show_content = false;
353
+ $show_head = true;
354
+ $user_guide_link .= '';
355
+ break;
356
+ }
357
+ default: {
358
+ return '';
359
+ }
360
+ }
361
+ $show_content = $show_content && WDFM()->is_free;
362
+ $support_forum_link = 'https://wordpress.org/support/plugin/form-maker';
363
+ $premium_link = $this->premium_link;
364
+ wp_enqueue_style('fm-roboto');
365
+ wp_enqueue_style('fm-pricing');
366
+ ob_start();
367
+ ?>
368
+ <div class="wrap">
369
+ <h1 class="fm-head-notice">&nbsp;</h1>
370
+ <div class="fm-topbar-container">
371
+ <?php
372
+ if ($show_content) {
373
+ ?>
374
+ <div class="fm-topbar fm-topbar-content">
375
+ <div class="fm-topbar-content-container">
376
+ <div class="fm-topbar-content-title">
377
+ <?php _e('Form Maker Premium', WDFM()->prefix); ?>
378
+ </div>
379
+ <div class="fm-topbar-content-body">
380
+ <?php _e('Add unlimited fields, create multi-page forms with fully customizable themes and much more.', WDFM()->prefix); ?>
381
+ </div>
382
+ </div>
383
+ <div class="fm-topbar-content-button-container">
384
+ <a href="<?php echo $premium_link; ?>" target="_blank" class="fm-topbar-upgrade-button"><?php _e( 'Upgrade', WDFM()->prefix ); ?></a>
385
+ </div>
386
+ </div>
387
+ <?php
388
+ }
389
+ ?>
390
+ <div class="fm-topbar fm-topbar-links">
391
+ <div class="fm-topbar-links-container">
392
+ <?php if ( $show_guide_link ) { ?>
393
+ <a href="<?php echo $user_guide_link; ?>" target="_blank">
394
+ <div class="fm-topbar-links-item">
395
+ <?php _e('User guide', WDFM()->prefix); ?>
396
+ </div>
397
+ </a>
398
+ <?php
399
+ }
400
+ if (WDFM()->is_free) {
401
+ if ( $show_guide_link ) {
402
+ ?>
403
+ <span class="fm-topbar-separator"></span>
404
+ <?php } ?>
405
+ <a href="<?php echo $support_forum_link; ?>" target="_blank">
406
+ <div class="fm-topbar-links-item">
407
+ <?php _e('Support Forum', WDFM()->prefix); ?>
408
+ </div>
409
+ </a>
410
+ <?php
411
+ }
412
+ ?>
413
+ </div>
414
+ </div>
415
+ </div>
416
+ <?php if ( $show_head ) {
417
+ $menus = array(
418
+ 'manage' => array(
419
+ 'href' => add_query_arg( array('page' => 'manage' . WDFM()->menu_postfix ), admin_url('admin.php')),
420
+ 'name' => __('Forms', WDFM()->prefix)
421
+ ),
422
+ 'addons' => array(
423
+ 'href' => add_query_arg( array('page' => 'addons' . WDFM()->menu_postfix ), admin_url('admin.php')),
424
+ 'name' => __('Add-ons', WDFM()->prefix)
425
+ ),
426
+ 'pricing' => array(
427
+ 'href' => add_query_arg( array('page' => 'pricing' . WDFM()->menu_postfix ), admin_url('admin.php')),
428
+ 'name' => __('Premium Version', WDFM()->prefix) .' <span class="fm-upgrade">' . __('Upgrade', WDFM()->prefix) . '</span>'
429
+ ),
430
+ );
431
+ ?>
432
+ <style>#wpbody-content>div:not(.wrap), .wrap .notice:not(#wd_bp_notice_cont) { display: none; }</style>
433
+ <div class="fm-head">
434
+ <div><img src="<?php echo WDFM()->plugin_url . '/images/FormMaker.png'; ?>"></div>
435
+ <ul class="fm-breadcrumbs">
436
+ <?php
437
+ foreach ( $menus as $key => $item ) {
438
+ ?>
439
+ <li class="fm-breadcrumb-item">
440
+ <a class="fm-breadcrumb-item-link<?php echo ( $key == $page ) ? ' fm-breadcrumb-item-link-active' : ''; ?>" href="<?php echo $item['href']; ?>"><?php echo $item['name']; ?></a>
441
+ </li>
442
+ <?php
443
+ }
444
+ ?>
445
+ </ul>
446
+ </div>
447
+ <?php } ?>
448
+ </div>
449
+ <?php
450
+ return ob_get_clean();
451
+ }
452
+
453
+ /**
454
+ * @param $message
455
+ * @param string $premium_link
456
+ * @param string $premium_link_text
457
+ * @return string
458
+ */
459
+ protected function free_message($message, $premium_link = '', $premium_link_text = '', $id = '') {
460
+ $upgrade = false;
461
+ if ('' == $premium_link) {
462
+ $premium_link = $this->premium_link;
463
+ }
464
+ if ('' == $premium_link_text) {
465
+ $premium_link_text = __( 'Upgrade', WDFM()->prefix );
466
+ $upgrade = true;
467
+ }
468
+ ob_start();
469
+ ?>
470
+ <div class="fm-free-message" <?php if ($id) { echo 'id="' . $id . '"'; } ?>>
471
+ <div class="fm-free-message-body">
472
+ <?php echo $message; ?>
473
+ </div>
474
+ <div class="fm-free-message-button-container">
475
+ <a href="<?php echo $premium_link; ?>" target="_blank" class="fm-free-message-upgrade-button <?php if(!$upgrade) {echo 'fm-free-message-promo-button'; } ?>"><?php echo $premium_link_text; ?></a>
476
+ </div>
477
+ </div>
478
+ <?php
479
+ return ob_get_clean();
480
+ }
481
+
482
+ /**
483
+ * Generate stripe promo box.
484
+ *
485
+ * @param $message
486
+ * @param $addon_message
487
+ * @param $addon_link
488
+ *
489
+ * @return string Stripe promo box html.
490
+ */
491
+ protected function promo_box($message, $addon_message, $addon_link, $id = '') {
492
+ $premium_link = $this->premium_link;
493
+ ob_start();
494
+ ?>
495
+ <div class="fm-free-message fm-promo-message" <?php if ($id) { echo 'id="' . $id . '"'; } ?>>
496
+ <div class="fm-free-message-body">
497
+ <?php echo $message; ?>
498
+ </div>
499
+ <div class="fm-free-message-button-container">
500
+ <a href="<?php echo $premium_link; ?>" target="_blank" class="fm-free-message-upgrade-button"><?php _e( 'Upgrade', WDFM()->prefix ); ?></a>
501
+ </div>
502
+ <div class="fm-free-message-body fm-free-message-huge">
503
+ &
504
+ </div>
505
+ <div class="fm-free-message-body">
506
+ <?php echo $addon_message; ?>
507
+ </div>
508
+ <div class="fm-free-message-button-container">
509
+ <a href="<?php echo $addon_link; ?>" target="_blank" class="fm-free-message-upgrade-button fm-free-message-promo-button"><?php _e( 'Buy', WDFM()->prefix ); ?></a>
510
+ </div>
511
+ </div>
512
+ <?php
513
+ return ob_get_clean();
514
+ }
515
+
516
+ /**
517
+ * Generate limitation aler.
518
+ *
519
+ * @return string Limitation alert html.
520
+ */
521
+ protected function limitation_alert() {
522
+ $premium_link = $this->premium_link;
523
+ ob_start();
524
+ ?>
525
+ <div class="fm-limitation-alert-container fm-hidden">
526
+ <div class="fm-limitation-alert-overlay"></div>
527
+ <div class="fm-limitation-alert">
528
+ <span class="dashicons dashicons-no-alt"></span>
529
+ <div class="fm-limitation-alert-header">
530
+ <?php _e('The free version is limited up to 7 fields.', WDFM()->prefix); ?>
531
+ </div>
532
+ <div class="fm-limitation-alert-header">
533
+ <?php _e('Upgrade to Premium version to add unlimited fields.', WDFM()->prefix); ?>
534
+ </div>
535
+ <div class="fm-limitation-alert-body">
536
+ <div class="fm-limitation-alert-header">
537
+ <?php _e('Premium Plan also includes:', WDFM()->prefix); ?>
538
+ </div>
539
+ <ul>
540
+ <li><?php _e('Payment integration fields', WDFM()->prefix); ?></li>
541
+ <li><?php _e('File upload field', WDFM()->prefix); ?></li>
542
+ <li><?php _e('Google Maps API Integration', WDFM()->prefix); ?></li>
543
+ <li><?php _e('Front-end Submissions', WDFM()->prefix); ?></li>
544
+ </ul>
545
+ </div>
546
+ <div class="fm-free-message-button-container">
547
+ <a href="<?php echo $premium_link; ?>" target="_blank" class="fm-free-message-upgrade-button"><?php _e( 'Upgrade', WDFM()->prefix ); ?></a>
548
+ </div>
549
+ </div>
550
+ </div>
551
+ <script>
552
+ function fm_limitation_alert(show) {
553
+ if (show) {
554
+ jQuery('.fm-limitation-alert-container').removeClass('fm-hidden');
555
+ }
556
+ else {
557
+ jQuery('.fm-limitation-alert-container').addClass('fm-hidden');
558
+ }
559
+ }
560
+ jQuery(document).ready(function() {
561
+ jQuery('.fm-limitation-alert-overlay, .fm-limitation-alert .dashicons-no-alt').on('click', function() {
562
+ fm_limitation_alert(false);
563
+ });
564
+ });
565
+ </script>
566
+ <?php
567
+ return ob_get_clean();
568
+ }
569
  }
assets/add-ons-icon.png DELETED
Binary file
assets/calculator.png DELETED
Binary file
assets/conditional-emails-update.png DELETED
Binary file
assets/dropbox-integration-update.png DELETED
Binary file
assets/form-maker.png DELETED
Binary file
assets/google_drive_integration.png DELETED
Binary file
assets/import_export.png DELETED
Binary file
assets/mailchimp.png DELETED
Binary file
assets/pdf-integration.png DELETED
Binary file
assets/post-generation-update.png DELETED
Binary file
assets/pushover.png DELETED
Binary file
assets/reg.png DELETED
Binary file
assets/save-progress.png DELETED
Binary file
assets/stripe-integration-update.png DELETED
Binary file
assets/updates_icon.jpg DELETED
Binary file
css/form_maker_frontend.css CHANGED
@@ -147,6 +147,7 @@ div[type="type_captcha"] .wdform-element-section * {
147
  color: #FF0000;
148
  font-size: 13px;
149
  width: 100%;
 
150
  }
151
 
152
  .fm-form-container .fm-form div[type="type_phone_new"] input[type="text"]{
@@ -434,7 +435,7 @@ div[type="type_file_upload"] .wdform-element-section {
434
  }
435
 
436
  .fm-form .paypal-property .wdform-quantity {
437
- width: 35px;
438
  }
439
 
440
  .fm-form .paypal-property select {
147
  color: #FF0000;
148
  font-size: 13px;
149
  width: 100%;
150
+ padding-left: 10px;
151
  }
152
 
153
  .fm-form-container .fm-form div[type="type_phone_new"] input[type="text"]{
435
  }
436
 
437
  .fm-form .paypal-property .wdform-quantity {
438
+ width: 55px;
439
  }
440
 
441
  .fm-form .paypal-property select {
css/form_maker_tables.css CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  .wd-button .field-type-button:before {
2
  float: left;
3
  font-family: "Dashicons";
@@ -168,6 +172,7 @@
168
  }
169
 
170
  .field_types_cont h2.hndle,
 
171
  .field_options h2.hndle {
172
  background-color: #F1F1F1;
173
  }
@@ -176,7 +181,8 @@
176
  border: 1px solid #eee;
177
  }
178
 
179
- .field-types-filter{
 
180
  webkit-box-shadow: 0 1px 4px rgba(0,0,0,.07)!important;
181
  box-shadow: 0 1px 4px rgba(0,0,0,.07)!important;
182
  }
@@ -341,7 +347,8 @@
341
  text-shadow: 0 -1px 1px #cccccc, 1px 0 1px #cccccc, 0 1px 1px #cccccc, -1px 0 1px #cccccc;
342
  }
343
 
344
- .field_types .postbox h2.hndle {
 
345
  font-size: 14px;
346
  padding: 8px 12px;
347
  margin: 0;
@@ -360,11 +367,13 @@
360
  cursor: pointer;
361
  }
362
 
363
- .field_types .postbox {
 
364
  margin-bottom: 0;
365
  }
366
 
367
- .field_types .postbox button.wd-button {
 
368
  margin: 5px 0px;
369
  white-space: normal;
370
  width: 48%;
@@ -375,7 +384,8 @@
375
  height: auto;
376
  }
377
 
378
- .add-popup .field-types-filter {
 
379
  line-height: 25px;
380
  margin: 15px;
381
  width: calc(100% - 45px);
@@ -383,13 +393,15 @@
383
  background-color: #f5f5f5;
384
  }
385
 
386
- .add-popup .field-types-filter-cont {
 
387
  position: relative;
388
  height: 25px;
389
  width: 100%;
390
  }
391
 
392
- .add-popup .field-types-filter-cont:before {
 
393
  font-family: "Dashicons";
394
  content: "\f179";
395
  font-size: 25px;
@@ -776,19 +788,22 @@ div.error_fm {
776
  }
777
 
778
  @media screen and (max-width: 360px) {
779
- .field_types .postbox button.wd-button {
 
780
  width: 100%;
781
  }
782
  }
783
 
784
  @media screen and (min-width: 360px) and (max-width: 600px) {
785
- .field_types .postbox button.wd-button {
 
786
  width: 48%;
787
  }
788
  }
789
 
790
  @media screen and (min-width: 600px) and (max-width: 1050px) {
791
- .field_types .postbox button.wd-button {
 
792
  width: 32%;
793
  }
794
  }
@@ -2277,89 +2292,89 @@ button:focus {
2277
  top: 36px;
2278
  right: 20px;
2279
  }
 
2280
  .fm_form_options #form_javascript {
2281
- min-height:400px;
2282
  }
 
2283
  .fm_form_options .CodeMirror {
2284
- border: 1px solid #ccc;
2285
- font-size: 12px;
2286
- margin-bottom: 6px;
2287
- background: white;
2288
  }
 
2289
  .fm_form_options .fm_condition {
2290
  padding: 20px 0;
2291
  display: table;
2292
  border-bottom: 1px solid #00A0D2;
2293
  width: 100%;
2294
  }
 
2295
  .fm_form_options .fm_condition input,
2296
  .fm_form_options .fm_condition select {
2297
- display:inline-block;
2298
- width:100%;
2299
- max-width:300px;
2300
- margin-bottom:5px;
2301
  }
2302
 
2303
  .fm_form_options .fm_condition .fm_condition_show_hide {
2304
- width:100%;
2305
- max-width:65px;
2306
- }
2307
- .fm_form_options .fm_condition .fm_condition_fields {
2308
-
2309
  }
2310
- .fm_form_options .fm_condition .fm_condition_all_any {
2311
 
2312
- max-width:55px;
2313
- }
2314
- .fm_form_options .fm_condition .fm_condition_is_select {
2315
- max-width:94px;
2316
- }
2317
- .fm_form_options .fm_condition .fm_condition_field_labels {
2318
-
2319
- }
2320
- .fm_form_options .fm_condition .fm_condition_field_select_value {
2321
-
2322
  }
2323
- .fm_form_options .fm_condition .fm_condition_field_input_value {
2324
-
 
2325
  }
2326
 
2327
  .fm_form_options .dashicons {
2328
- vertical-align: middle;
2329
- font-size: 20px;
2330
  cursor: pointer;
2331
  }
2332
  .fm_form_options .dashicons-trash, .fm_form_options .dashicons-no-alt { color: #aa0000; }
2333
  .fm_form_options .dashicons-trash:hover, .fm_form_options .dashicons-no-alt:hover { color: #dc3232; }
2334
  .fm_form_options .dashicons-plus-alt { color: #0073aa; }
2335
  .fm_form_options .dashicons-plus-alt:hover { color: #00a0d2; }
2336
- .fm_form_options #emailTab_fieldset .mailToAdd,
2337
- .fm_form_options #emailTab_fieldset .mail_subject,
2338
- .fm_form_options #emailTab_fieldset .from_name,
2339
- .fm_form_options #emailTab_fieldset .mail_subject_user,
2340
- .fm_form_options #emailTab_fieldset .mail_from_name_user {
2341
- width:95%;
2342
- display:inline-block;
2343
  }
2344
- .fm_form_options #emailTab_fieldset .mail_name {
2345
- width:92%;
2346
- display:inline-block;
 
2347
  }
2348
- .fm_form_options #emailTab_fieldset .fm_textarea-buttons {
2349
- margin-bottom:10px;
 
2350
  }
2351
- .fm_form_options #emailTab_fieldset .fm_textarea-buttons .button {
2352
- margin-bottom:5px;
 
 
 
 
 
 
 
 
2353
  }
 
2354
  .fm_advanced_layout .autogen_layout_label {
2355
  display: inline-block;
2356
  font-weight: 500;
2357
  padding-top: 5px;
2358
  }
2359
 
2360
- .fm_advanced_layout .fm_auto_format_button {
2361
- width:100%;
2362
- text-align:center;
2363
  }
2364
 
2365
  .form_maker_themes .dashicons {
@@ -2406,6 +2421,7 @@ button:focus {
2406
  background-position-y: 50% !important;
2407
  background-size: 12px !important;
2408
  }
 
2409
  .fm-description {
2410
  font-size: 12px;
2411
  margin-left: 20px;
@@ -2462,21 +2478,116 @@ button:focus {
2462
  }
2463
 
2464
  .fm_tooltip {
2465
- display:none;
2466
- position:absolute;
2467
- border:1px solid #333;
2468
- background-color:#161616;
2469
- border-radius:5px;
2470
- padding:10px;
2471
- color:#fff;
2472
- font-size:12px;
2473
  max-width: 250px;
2474
  min-width: 100px;
2475
  word-break: break-all;
2476
  }
2477
 
2478
  .form_maker_submissions td,
2479
- .form_maker_submissions th{
2480
  max-width: 200px;
2481
  word-break: break-all;
2482
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #fm_admin_container {
2
+ display: inline-block;
3
+ width: 100%;
4
+ }
5
  .wd-button .field-type-button:before {
6
  float: left;
7
  font-family: "Dashicons";
172
  }
173
 
174
  .field_types_cont h2.hndle,
175
+ .placeholders_cont h2.hndle,
176
  .field_options h2.hndle {
177
  background-color: #F1F1F1;
178
  }
181
  border: 1px solid #eee;
182
  }
183
 
184
+ .field-types-filter,
185
+ .placeholders-filter {
186
  webkit-box-shadow: 0 1px 4px rgba(0,0,0,.07)!important;
187
  box-shadow: 0 1px 4px rgba(0,0,0,.07)!important;
188
  }
347
  text-shadow: 0 -1px 1px #cccccc, 1px 0 1px #cccccc, 0 1px 1px #cccccc, -1px 0 1px #cccccc;
348
  }
349
 
350
+ .field_types .postbox h2.hndle,
351
+ .placeholders .postbox h2.hndle {
352
  font-size: 14px;
353
  padding: 8px 12px;
354
  margin: 0;
367
  cursor: pointer;
368
  }
369
 
370
+ .field_types .postbox,
371
+ .placeholders .postbox {
372
  margin-bottom: 0;
373
  }
374
 
375
+ .field_types .postbox button.wd-button,
376
+ .placeholders .postbox button.wd-button {
377
  margin: 5px 0px;
378
  white-space: normal;
379
  width: 48%;
384
  height: auto;
385
  }
386
 
387
+ .add-popup .field-types-filter,
388
+ .placeholder-popup .placeholders-filter {
389
  line-height: 25px;
390
  margin: 15px;
391
  width: calc(100% - 45px);
393
  background-color: #f5f5f5;
394
  }
395
 
396
+ .add-popup .field-types-filter-cont,
397
+ .placeholder-popup .placeholders-filter-cont {
398
  position: relative;
399
  height: 25px;
400
  width: 100%;
401
  }
402
 
403
+ .add-popup .field-types-filter-cont:before,
404
+ .placeholder-popup .placeholders-filter-cont:before {
405
  font-family: "Dashicons";
406
  content: "\f179";
407
  font-size: 25px;
788
  }
789
 
790
  @media screen and (max-width: 360px) {
791
+ .field_types .postbox button.wd-button,
792
+ .placeholders .postbox button.wd-button {
793
  width: 100%;
794
  }
795
  }
796
 
797
  @media screen and (min-width: 360px) and (max-width: 600px) {
798
+ .field_types .postbox button.wd-button,
799
+ .placeholders .postbox button.wd-button {
800
  width: 48%;
801
  }
802
  }
803
 
804
  @media screen and (min-width: 600px) and (max-width: 1050px) {
805
+ .field_types .postbox button.wd-button,
806
+ .placeholders .postbox button.wd-button {
807
  width: 32%;
808
  }
809
  }
2292
  top: 36px;
2293
  right: 20px;
2294
  }
2295
+
2296
  .fm_form_options #form_javascript {
2297
+ min-height: 400px;
2298
  }
2299
+
2300
  .fm_form_options .CodeMirror {
2301
+ border: 1px solid #CCC;
2302
+ font-size: 12px;
2303
+ margin-bottom: 6px;
2304
+ background: white;
2305
  }
2306
+
2307
  .fm_form_options .fm_condition {
2308
  padding: 20px 0;
2309
  display: table;
2310
  border-bottom: 1px solid #00A0D2;
2311
  width: 100%;
2312
  }
2313
+
2314
  .fm_form_options .fm_condition input,
2315
  .fm_form_options .fm_condition select {
2316
+ display: inline-block;
2317
+ width: 100%;
2318
+ max-width: 300px;
2319
+ margin-bottom: 5px;
2320
  }
2321
 
2322
  .fm_form_options .fm_condition .fm_condition_show_hide {
2323
+ width: 100%;
2324
+ max-width: 65px;
 
 
 
2325
  }
 
2326
 
2327
+ .fm_form_options .fm_condition .fm_condition_all_any {
2328
+ max-width: 55px;
 
 
 
 
 
 
 
 
2329
  }
2330
+
2331
+ .fm_form_options .fm_condition .fm_condition_is_select {
2332
+ max-width: 94px;
2333
  }
2334
 
2335
  .fm_form_options .dashicons {
2336
+ vertical-align: middle;
2337
+ font-size: 20px;
2338
  cursor: pointer;
2339
  }
2340
  .fm_form_options .dashicons-trash, .fm_form_options .dashicons-no-alt { color: #aa0000; }
2341
  .fm_form_options .dashicons-trash:hover, .fm_form_options .dashicons-no-alt:hover { color: #dc3232; }
2342
  .fm_form_options .dashicons-plus-alt { color: #0073aa; }
2343
  .fm_form_options .dashicons-plus-alt:hover { color: #00a0d2; }
2344
+
2345
+ .wd-has-placeholder {
2346
+ position: relative;
 
 
 
 
2347
  }
2348
+
2349
+ .wd-editor-placeholder {
2350
+ padding-right: 5px;
2351
+ text-align: right;
2352
  }
2353
+
2354
+ .wd-has-placeholder input[type="text"] {
2355
+ padding-right: 35px;
2356
  }
2357
+
2358
+ .wd-has-placeholder .dashicons.dashicons-list-view {
2359
+ top: 37px;
2360
+ right: 5px;
2361
+ position: absolute;
2362
+ }
2363
+
2364
+ .fm_form_options #emailTab_fieldset .mail_name {
2365
+ width: 92%;
2366
+ display: inline-block;
2367
  }
2368
+
2369
  .fm_advanced_layout .autogen_layout_label {
2370
  display: inline-block;
2371
  font-weight: 500;
2372
  padding-top: 5px;
2373
  }
2374
 
2375
+ .fm_advanced_layout .fm_auto_format_button {
2376
+ width: 100%;
2377
+ text-align: center;
2378
  }
2379
 
2380
  .form_maker_themes .dashicons {
2421
  background-position-y: 50% !important;
2422
  background-size: 12px !important;
2423
  }
2424
+
2425
  .fm-description {
2426
  font-size: 12px;
2427
  margin-left: 20px;
2478
  }
2479
 
2480
  .fm_tooltip {
2481
+ display: none;
2482
+ position: absolute;
2483
+ border: 1px solid #333;
2484
+ background-color: #161616;
2485
+ border-radius: 5px;
2486
+ padding: 10px;
2487
+ color: #FFF;
2488
+ font-size: 12px;
2489
  max-width: 250px;
2490
  min-width: 100px;
2491
  word-break: break-all;
2492
  }
2493
 
2494
  .form_maker_submissions td,
2495
+ .form_maker_submissions th {
2496
  max-width: 200px;
2497
  word-break: break-all;
2498
  }
2499
+
2500
+ .placeholder-popup {
2501
+ background: transparent;
2502
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.7);
2503
+ overflow: hidden;
2504
+ display: none;
2505
+ position: relative;
2506
+ margin-top: 10px;
2507
+ left: 0;
2508
+ top: 0;
2509
+ z-index: 100050;
2510
+ width: 100%;
2511
+ height: 435px;
2512
+ }
2513
+ .placeholder-body {
2514
+ background-color: #f5f5f5;
2515
+ box-sizing: border-box;
2516
+ -moz-box-sizing: border-box;
2517
+ -webkit-box-sizing: border-box;
2518
+ font-family: Segoe UI;
2519
+ padding: 10px;
2520
+ margin: 0;
2521
+ width: 100%;
2522
+ height: 100%;
2523
+ }
2524
+ .placeholder-body-col {
2525
+ height: 100%;
2526
+ width: 100%;
2527
+ display: inline-block;
2528
+ vertical-align: top;
2529
+ overflow: auto;
2530
+ margin-right: 10px;
2531
+ box-sizing: border-box;
2532
+ -moz-box-sizing: border-box;
2533
+ -webkit-box-sizing: border-box;
2534
+ }
2535
+ .placeholders_cont {
2536
+ background-color: #ffffff;
2537
+ }
2538
+ .placeholders_cont p.description {
2539
+ padding: 5px 10px 0px 20px;
2540
+ }
2541
+ #placeholders_overlay {
2542
+ display: none;
2543
+ position: fixed;
2544
+ top: 0;
2545
+ right: 0;
2546
+ bottom: 0;
2547
+ left: 0;
2548
+ background-color: rgba(0,0,0,.5);
2549
+ z-index: 100049;
2550
+ }
2551
+ .placeholders-active #placeholders_overlay {
2552
+ display: block;
2553
+ }
2554
+ .placeholders-active>input,
2555
+ .placeholders-active textarea,
2556
+ .placeholders-active .wp-editor-wrap,
2557
+ .placeholders-active>span.dashicons-list-view {
2558
+ position: relative;
2559
+ z-index: 100050;
2560
+ }
2561
+
2562
+ #field_container {
2563
+ display: inline-block;
2564
+ width: calc(60% + 16px);
2565
+ height: 100%;
2566
+ }
2567
+ #field_container.field_container_full {
2568
+ width: 100%;
2569
+ }
2570
+ #field_container .popup-body-col {
2571
+ width: calc(50% - 7px);
2572
+ }
2573
+ #field_container .popup-body-col:last-child {
2574
+ margin-right: 0;
2575
+ }
2576
+ #field_container .fm-free-message {
2577
+ margin-bottom: 7px;
2578
+ }
2579
+ #field_container.field_container_full .field_options {
2580
+ width: calc(70% - 7px);
2581
+ }
2582
+ #field_container.field_container_full .field_preview {
2583
+ width: calc(30% - 7px);
2584
+ }
2585
+ @media screen and (max-width: 1050px) {
2586
+ #field_container,
2587
+ #field_container .popup-body-col {
2588
+ width: 100%;
2589
+ }
2590
+ }
2591
+ .fm-opacity-40 {
2592
+ opacity: 0.4;
2593
+ }
css/license.css DELETED
@@ -1,158 +0,0 @@
1
- div#featurs_tables * {
2
- box-sizing: content-box;
3
- }
4
- div#featurs_tables {
5
- display: inline-block;
6
- font-size: 13px;
7
- padding-top: 95px;
8
- text-align: left;
9
- float: left;
10
- }
11
-
12
- div#featurs_tables div {
13
- vertical-align: top;
14
- }
15
-
16
- div#featurs_table1 {
17
- background-color: rgb(254, 254, 254);
18
- display: inline-block;
19
- position: relative;
20
- vertical-align: top;
21
- width: 330px;
22
- height: 191px;
23
- z-index: 10;
24
- }
25
-
26
- div#featurs_table1 span::after {
27
- content: "";
28
- display: inline-block;
29
- float: right;
30
- height: 37px;
31
- position: relative;
32
- right: -21px;
33
- top: -8px;
34
- width: 26px;
35
- }
36
-
37
- div#featurs_table1 span {
38
- border-left: 1px solid #e5e5e5;
39
- border-right: 1px solid #e5e5e5;
40
- border-top: 1px solid #e5e5e5;
41
- color: #545454;
42
- display: block;
43
- height: 21px;
44
- padding: 8px;
45
- text-align: left;
46
- }
47
-
48
- div#featurs_table1 span:last-child,
49
- div#featurs_table2 span:last-child,
50
- div#featurs_table3 span:last-child {
51
- border-bottom: 1px solid #e5e5e5;
52
- }
53
-
54
- div#featurs_table2 {
55
- background-color: rgba(255, 255, 255, 0.9);
56
- display: inline-block;
57
- position: relative;
58
- top: -72px;
59
- width: 180px;
60
- }
61
-
62
- div#featurs_table2 span:first-child,
63
- div#featurs_table3 span:first-child {
64
- color: #000;
65
- font-size: 22px;
66
- font-weight: bold;
67
- padding-bottom: 14px;
68
- padding-top: 2px;
69
- border-top: 1px solid #e5e5e5;
70
- border-left: 1px solid #e5e5e5;
71
- border-right: 1px solid #e5e5e5;
72
- height: 39px;
73
- padding-top: 18px;
74
- }
75
-
76
- div#featurs_table2 span:first-child {
77
- border-left: 1px solid #e5e5e5 !important;
78
- }
79
-
80
- div#featurs_table2 span {
81
- border-left: none !important;
82
- }
83
-
84
- div#featurs_table2 span,
85
- div#featurs_table3 span {
86
- border-top: 1px solid #e5e5e5;
87
- border-right: 1px solid #e5e5e5;
88
- border-left: 1px solid #e5e5e5;
89
- color: #545454;
90
- display: block;
91
- height: 21px;
92
- padding: 8px;
93
- text-align: center;
94
- }
95
-
96
- .download a {
97
- background-color: #fff;
98
- border: 6px solid #dddddd;
99
- border-radius: 50%;
100
- box-shadow: 0 0 0 7px #eeeeee;
101
- color: #21439c;
102
- cursor: pointer;
103
- display: inline-block;
104
- font-size: 14px;
105
- font-style: italic;
106
- font-weight: bold;
107
- margin-top: -4px;
108
- outline: 0 none;
109
- padding: 32px 9px 32px 2px;
110
- text-align: center;
111
- text-decoration: none;
112
- transition-duration: 0.6s;
113
- transition-property: border-color;
114
- transition-timing-function: linear;
115
- width: 72px;
116
- }
117
-
118
- div#featurs_table3 {
119
- background-color: rgba(255, 255, 255, 0.6);
120
- display: inline-block;
121
- position: relative;
122
- top: -72px;
123
- width: 180px;
124
- }
125
-
126
- div#featurs_table2 span.yes,
127
- div#featurs_table3 span.yes {
128
- background-image: url("../images/lic_plus.png");
129
- background-position: center center;
130
- background-repeat: no-repeat;
131
- }
132
-
133
- span.no {
134
- background-image: url("../images/lic_minus.png");
135
- background-position: center center;
136
- background-repeat: no-repeat;
137
- }
138
-
139
- .download input[type="submit"]:hover,
140
- .download a:hover {
141
- border-color: #F4762A;
142
- }
143
-
144
- #featurs_tables span.download {
145
- height: 40px !important;
146
- border-bottom: 1px solid #e5e5e5 !important;
147
- border-left: 1px solid #e5e5e5 !important;
148
- }
149
-
150
- .price_big {
151
- color: #F47629;
152
- font-size: 22px;
153
- }
154
-
155
- .price {
156
- display: block;
157
- color: #F47629;
158
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
css/pricing.css ADDED
@@ -0,0 +1,860 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ .fm-head-notice { display:none; }
2
+ .fm-pricestable-container {
3
+ display: flex;
4
+ flex-direction: column;
5
+ max-width: 1150px;
6
+ width: 100%;
7
+ margin: 0 auto;
8
+ }
9
+
10
+ .fm-pricestable {
11
+ display: flex;
12
+ flex-wrap: wrap;
13
+ justify-content: center;
14
+ margin-top: 20px;
15
+ margin-bottom: 10px;
16
+ font-family: Roboto;
17
+ text-align: left;
18
+ overflow:hidden;
19
+ }
20
+
21
+ .fm-pricestable>div {
22
+ display: inline-block;
23
+ margin-right: 15px;
24
+ margin-top: 20px;
25
+ padding-bottom: 20px;
26
+ width: 23%;
27
+ background: #fff;
28
+ vertical-align: top;
29
+ border: 0.5px solid rgba(208, 208, 208, 0.5)
30
+ }
31
+
32
+ .fm-pricestable>div:hover {
33
+ box-shadow: -1px 1px 6px 0 rgba(52, 52, 52, 0.16);
34
+ border: 0.5px solid rgba(204, 201, 201, 0.1)
35
+ }
36
+
37
+ .fm-pricestable>div:last-child {
38
+ margin-right: 0px
39
+ }
40
+
41
+ .fm-pricestable>div>p {
42
+ text-transform: uppercase;
43
+ background-color: #192D3B;
44
+ text-align: center;
45
+ font-weight: bold;
46
+ font-size: 20px;
47
+ padding: 6px 0;
48
+ height: 46px;
49
+ color: #fff
50
+ }
51
+
52
+ .fm-pricestable>div>p::first-line {
53
+ font-size: 15px;
54
+ font-weight: normal
55
+ }
56
+
57
+ .fm-pricestable>div>span {
58
+ border: 1px solid #B7B7B7;
59
+ text-transform: uppercase;
60
+ text-align: center;
61
+ border-top: none;
62
+ font-size: 15px;
63
+ display: block;
64
+ color: #808081;
65
+ height: 20px;
66
+ padding: 6px
67
+ }
68
+
69
+ .fm-pricestable>div:first-child>span {
70
+ text-transform: none;
71
+ text-align: left
72
+ }
73
+
74
+ .fm-pricestable>div:first-child p {
75
+ font-size: 17px
76
+ }
77
+
78
+ .fm-pricestable>div.plantype span:last-child,
79
+ .fm-pricestable>div.ptFree span:last-child,
80
+ .fm-pricestable>div.ptPersonal span:last-child,
81
+ .fm-pricestable>div.ptBusiness span:last-child,
82
+ .fm-pricestable>div.ptDeveloper span:last-child {
83
+ border: none;
84
+ padding: 0;
85
+ height: auto;
86
+ text-transform: none
87
+ }
88
+
89
+ .fm-pricestable>div.plantype span:last-child>a,
90
+ .fm-pricestable>div.ptFree span:last-child>a,
91
+ .fm-pricestable>div.ptPersonal span:last-child>a,
92
+ .fm-pricestable>div.ptBusiness span:last-child>a,
93
+ .fm-pricestable>div.ptDeveloper span:last-child>a {
94
+ color: #FFF;
95
+ display: table;
96
+ padding: 4px 3%;
97
+ margin: 8px auto 5px auto;
98
+ font-size: 17px;
99
+ position: relative;
100
+ text-align: center;
101
+ line-height: normal;
102
+ border-radius: 40px;
103
+ text-decoration: none;
104
+ background-color: #F47629;
105
+ text-transform: uppercase;
106
+ width: 65%;
107
+ border-bottom: 3px solid #D2631E
108
+ }
109
+
110
+ .fm-pricestable>div.plantype span:last-child>a:hover,
111
+ .fm-pricestable>div.ptFree span:last-child>a:hover,
112
+ .fm-pricestable>div.ptPersonal span:last-child>a:hover,
113
+ .fm-pricestable>div.ptBusiness span:last-child>a:hover,
114
+ .fm-pricestable>div.ptDeveloper span:last-child>a:hover {
115
+ background-color: #F68946;
116
+ border-bottom: 1px solid #D2631E;
117
+ margin: 10px auto 3px auto
118
+ }
119
+ .fm-pricestable>div:not(:last-child) {
120
+ margin-right: 7px;
121
+ width: 225px;
122
+ box-sizing: border-box;
123
+ }
124
+
125
+ .fm-pricestable>div.ptDeveloper {
126
+ margin-right: 0px;
127
+ width: 446px;
128
+ box-sizing: border-box;
129
+ max-width: 40%
130
+ }
131
+
132
+ .fm-pricestable>div>p {
133
+ padding: 6px 0 6px 0
134
+ }
135
+
136
+ .fm-pricestable>div .price+p,
137
+ .fm-pricestable>div .save_money+p {
138
+ display: table;
139
+ width: 100%;
140
+ height: inherit;
141
+ background: transparent;
142
+ font-size: 22px;
143
+ font-weight: 300;
144
+ line-height: 1.14;
145
+ color: #000;
146
+ text-transform: inherit
147
+ }
148
+ .fm-pricestable>div .price+p,
149
+ .fm-pricestable>div .special_offer {
150
+ text-transform: uppercase;
151
+ }
152
+ .fm-pricestable>div>span.price {
153
+ font-size: 77px !important;
154
+ line-height: 90px !important;
155
+ height: 60px !important;
156
+ color: #134d68 !important;
157
+ font-weight: 600 !important;
158
+ padding: 17px 0 29px 0 !important
159
+ }
160
+
161
+ .fm-pricestable>div.ptDeveloper>span.price {
162
+ padding: 5px 0 0px 0 !important
163
+ }
164
+
165
+ .fm-pricestable>div .save_money {
166
+ font-style: normal;
167
+ font-stretch: normal;
168
+ text-align: center;
169
+ margin: 25px 0 20px 0
170
+ }
171
+
172
+ .fm-pricestable>div .save_money span {
173
+ font-size: 14px;
174
+ font-weight: 500;
175
+ border-radius: 100px;
176
+ color: #fff;
177
+ background-color: #22a044;
178
+ padding: 5.5px 20px !important
179
+ }
180
+
181
+ .fm-pricestable>div .price span {
182
+ font-size: 33px;
183
+ position: relative;
184
+ top: -41px !important;
185
+ left: 0px !important;
186
+ font-weight: 300
187
+ }
188
+
189
+ .fm-pricestable>div>span {
190
+ height: inherit;
191
+ border: none;
192
+ box-sizing: unset !important;
193
+ padding: 4px 0 5px 0 !important;
194
+ text-align: center !important;
195
+ font-size: 14px !important;
196
+ line-height: 16px !important;
197
+ text-transform: none;
198
+ font-weight: 300;
199
+ color: #000;
200
+ }
201
+
202
+ .fm-pricestable>div>span:not(.product_info) {
203
+ cursor: pointer
204
+ }
205
+
206
+ .fm-pricestable>div>span:not(.product_info):hover {
207
+ font-weight: 400
208
+ }
209
+
210
+ .fm-pricestable>div>span.special_offer {
211
+ font-size: 26px !important;
212
+ font-weight: normal;
213
+ font-style: normal;
214
+ font-stretch: normal;
215
+ line-height: 1.15 !important;
216
+ color: #134d68 !important;
217
+ padding: 33px 0 0px 0 !important
218
+ }
219
+
220
+ .fm-pricestable>div>span.supp strong {
221
+ color: #e0702b
222
+ }
223
+
224
+ .fm-pricestable>div.ptDeveloper>span.supp strong {
225
+ font-size: 20px
226
+ }
227
+
228
+ .fm-pricestable>div.ptDeveloper>span.supp {
229
+ padding: 7.5px 0 !important;
230
+ font-size: 16px !important
231
+ }
232
+
233
+ .fm-pricestable>div.ptFree span:last-child>a,
234
+ .fm-pricestable>div.ptPersonal span:last-child>a,
235
+ .fm-pricestable>div.ptBusiness span:last-child>a,
236
+ .fm-pricestable>div.ptDeveloper span:last-child>a {
237
+ max-width: 183px;
238
+ height: 13px;
239
+ border-radius: 80px;
240
+ background-color: #1a6588;
241
+ font-weight: 300;
242
+ cursor: pointer;
243
+ padding: 12px 0 !important;
244
+ line-height: 15px;
245
+ font-size: 15px !important;
246
+ border: 0;
247
+ margin: 20px auto 0px auto !important;
248
+ width: 100%
249
+ }
250
+
251
+ .fm-pricestable>div.ptDeveloper span:last-child>a {
252
+ margin: 20px auto 0 auto !important;
253
+ max-width: 273px;
254
+ width: 100%
255
+ }
256
+
257
+ .fm-pricestable>div.ptFree span:last-child>a:hover,
258
+ .fm-pricestable>div.ptPersonal span:last-child>a:hover,
259
+ .fm-pricestable>div.ptBusiness span:last-child>a:hover,
260
+ .fm-pricestable>div.ptDeveloper span:last-child>a:hover,
261
+ .joomla_free_downloads #open_links:hover,
262
+ .joomla_free_downloads #open_links.active {
263
+ background-color: rgba(19, 77, 104, 0.6);
264
+ border-bottom: 0px solid;
265
+ margin: 20px auto 34.2px auto
266
+ }
267
+
268
+ .fm-pricestable>div span.no:before {
269
+ font-size: 35px;
270
+ line-height: 21px
271
+ }
272
+
273
+ .fm-pricestable>div>span .desc_span {
274
+ opacity: 0;
275
+ transition: opacity 0.5s linear;
276
+ position: absolute;
277
+ width: 250px;
278
+ padding: 10px 10px !important;
279
+ background: rgba(19, 77, 104, 0.8901960784313725);
280
+ color: #fff;
281
+ z-index: 1;
282
+ left: 88%;
283
+ top: -50%;
284
+ line-height: 20px;
285
+ font-size: 14px;
286
+ visibility: hidden;
287
+ border-radius: 5px
288
+ }
289
+
290
+ .fm-pricestable>div>span {
291
+ position: relative
292
+ }
293
+
294
+ .fm-pricestable>div>span:hover .desc_span {
295
+ opacity: 1;
296
+ visibility: visible
297
+ }
298
+
299
+ .fm-pricestable>div.ptDeveloper>span .desc_span {
300
+ left: -29%
301
+ }
302
+
303
+ .fm-pricestable>div .circles {
304
+ text-align: center;
305
+ padding: 11px 0 4px 0
306
+ }
307
+
308
+ .fm-pricestable>div .circles li {
309
+ display: inline-block;
310
+ list-style: none
311
+ }
312
+
313
+ .fm-pricestable>div .circles li div {
314
+ width: 4px;
315
+ height: 4px;
316
+ background: rgba(19, 77, 104, 0.52);
317
+ -moz-border-radius: 50%;
318
+ -webkit-border-radius: 50%;
319
+ border-radius: 50%
320
+ }
321
+
322
+ .fm-pricestable>div.ptDeveloper>span.supp_dev {
323
+ padding: 3px 0 4px 0!important
324
+ }
325
+ @media (max-width:1024px) {
326
+ .fm-pricestable>div>span.price {
327
+ font-size: 77px !important;
328
+ line-height: 90px !important;
329
+ height: 60px !important;
330
+ color: #134d68 !important;
331
+ font-weight: 600 !important;
332
+ padding: 20px 0 31px 0 !important
333
+ }
334
+ .fm-pricestable>div.ptDeveloper span:last-child>a {
335
+ margin: 35px auto 34.2px auto !important
336
+ }
337
+ .fm-pricestable>div .ptDeveloper .price {
338
+ padding: 5px 0 0px 0 !important
339
+ }
340
+ }
341
+
342
+ @media (max-width:1355px) {
343
+ .fm-pricestable .ptFree,
344
+ .fm-pricestable .ptPersonal,
345
+ .fm-pricestable .ptBusiness {
346
+ width: 100% !important;
347
+ max-width: 32.8% !important;
348
+ }
349
+ .fm-pricestable .ptBusiness {
350
+ margin-right:0px !important;
351
+ }
352
+ .fm-pricestable>div.ptDeveloper {
353
+ width: 500px;
354
+ max-width: 60%;
355
+ }
356
+ }
357
+
358
+ @media (max-width:1094px) {
359
+ .fm-pricestable .ptFree,
360
+ .fm-pricestable .ptPersonal,
361
+ .fm-pricestable .ptBusiness {
362
+ width: 100% !important;
363
+ max-width: 32.5% !important;
364
+ }
365
+ .fm-pricestable .ptBusiness {
366
+ margin-right:0px !important;
367
+ }
368
+ .fm-pricestable>div.ptDeveloper {
369
+ width: 500px;
370
+ max-width: 60%;
371
+ }
372
+ }
373
+
374
+ @media (max-width:768px) {
375
+ .fm-pricestable {
376
+ text-align: center;
377
+ margin-top: 20px
378
+ }
379
+ .fm-pricestable .ptFree,
380
+ .fm-pricestable .ptPersonal,
381
+ .fm-pricestable .ptBusiness,
382
+ .fm-pricestable .ptDeveloper {
383
+ max-width: 100% !important;
384
+ min-width: 321px !important;
385
+ width: 100% !important;
386
+ margin-right: 0 !important;
387
+ font-size: inherit !important;
388
+ }
389
+ .fm-pricestable>div.ptBusiness span:last-child>a {
390
+ max-width: 183px !important
391
+ }
392
+ .fm-pricestable>div .ptBusiness,
393
+ .fm-pricestable>div .ptDeveloper,
394
+ .fm-pricestable>div .hidePrice {
395
+ display: inline-block !important
396
+ }
397
+
398
+ .fm-pricestable>div.ptFree span:last-child>a,
399
+ .fm-pricestable>div.ptPersonal span:last-child>a,
400
+ .fm-pricestable>div.ptBusiness span:last-child>a,
401
+ .fm-pricestable>div.ptDeveloper span:last-child>a {
402
+ /*padding: 4% 11% !important;*/
403
+ font-size: inherit !important
404
+ }
405
+ .fm-pricestable>div.ptDeveloper span:last-child>a {
406
+ margin: 45px auto 34.2px auto !important;
407
+ padding: 12px 0 !important
408
+ }
409
+ }
410
+
411
+ @media (max-width:400px) {
412
+ .fm-pricestable>div.ptDeveloper>span.supp strong {
413
+ line-height: 21px
414
+ }
415
+ .fm-pricestable>div.ptDeveloper>span.supp {
416
+ font-size: 15px !important
417
+ }
418
+ }
419
+ .fm-prices-more {
420
+ display: flex;
421
+ flex-wrap: wrap;
422
+ justify-content: center;
423
+ }
424
+ .fm-prices-more div {
425
+ width: 100%;
426
+ background: #fff;
427
+ padding: 15px;
428
+ text-align:center;
429
+ border: 0.5px solid rgba(208, 208, 208, 0.4);
430
+ border-radius: 7px;
431
+ }
432
+ .fm-prices-more a {
433
+ text-decoration:none;
434
+ }
435
+
436
+ /* Top bar start */
437
+ .fm-topbar-container {
438
+ display: flex;
439
+ flex-direction: row;
440
+ justify-content: flex-end;
441
+ margin: 20px 0 20px 0;
442
+ font-family: Roboto;
443
+ }
444
+ .fm-topbar-container * {
445
+ box-sizing: border-box;
446
+ }
447
+ .fm-topbar {
448
+ background-color: #FFFFFF;
449
+ border: 1px solid #D0D0D080;
450
+ border-radius: 7px;
451
+ color: #000000;
452
+ padding: 5px;
453
+ }
454
+ .fm-topbar-content {
455
+ display: flex;
456
+ justify-content: space-between;
457
+ flex: auto;
458
+ margin: 0 2px 0 0;
459
+ padding: 10px 15px;
460
+ height: 60px;
461
+ }
462
+ .fm-topbar-links {
463
+ color: #000000;
464
+ display: flex;
465
+ flex-direction: column;
466
+ justify-content: space-around;
467
+ font-size: 18px;
468
+ font-weight: 300;
469
+ margin: 0 0 0 2px;
470
+ height: 60px;
471
+ }
472
+ .fm-topbar-links-container {
473
+ display: flex;
474
+ justify-content: space-around;
475
+ height: 80%;
476
+ }
477
+ .fm-topbar-links-item {
478
+ display: flex;
479
+ flex: 1;
480
+ align-self: center;
481
+ justify-content: center;
482
+ width: 170px;
483
+ line-height: 50px;
484
+ }
485
+ .fm-topbar-links * {
486
+ font-size: 18px;
487
+ }
488
+ .fm-topbar-links a,
489
+ .fm-topbar-links a:focus {
490
+ align-self: center;
491
+ box-shadow: none;
492
+ color: #000000;
493
+ text-decoration: none;
494
+ }
495
+ .fm-topbar-links a:hover {
496
+ opacity: 0.5;
497
+ text-decoration: none;
498
+ }
499
+ .fm-topbar-separator {
500
+ background-color: #C2C2C280;
501
+ width: 1px;
502
+ height: 100%;
503
+ }
504
+ .fm-topbar-content-title {
505
+ color: #0C4D68;
506
+ font-size: 16px;
507
+ font-weight: 700;
508
+ line-height: 22px;
509
+ text-transform: uppercase;
510
+ }
511
+ .fm-topbar-content-body {
512
+ font-size: 15px;
513
+ font-weight: 300;
514
+ line-height: 20px;
515
+ }
516
+ .fm-topbar-content-container {
517
+ display: flex;
518
+ flex-direction: column;
519
+ }
520
+ .fm-topbar-content-button-container,
521
+ .fm-free-message-button-container {
522
+ align-self: center;
523
+ }
524
+ .fm-topbar-upgrade-button,
525
+ .fm-topbar-upgrade-button:focus {
526
+ background-color: #29B311;
527
+ border-radius: 20px;
528
+ box-shadow: none;
529
+ color: #FFFFFF;
530
+ font-size: 14px;
531
+ padding: 5px 44px;
532
+ text-decoration: none;
533
+ text-transform: uppercase;
534
+ }
535
+ .fm-topbar-upgrade-button:hover {
536
+ text-decoration: none;
537
+ color: #FFFFFFCC;
538
+ }
539
+ @media screen and (max-width: 1366px) {
540
+ .fm-topbar-links {
541
+ font-size: 15px;
542
+ }
543
+ .fm-topbar-content-title {
544
+ font-size: 15px;
545
+ }
546
+ .fm-topbar-content-body {
547
+ font-size: 13px;
548
+ }
549
+ }
550
+ @media screen and (max-width: 1285px) {
551
+ .fm-topbar-container {
552
+ flex-direction: column;
553
+ }
554
+ .fm-topbar-links,
555
+ .fm-topbar-content {
556
+ margin: 0 0 10px 0;
557
+ width: 100%;
558
+ }
559
+ .fm-topbar-content {
560
+ flex-direction: column;
561
+ height: auto;
562
+ }
563
+ .fm-topbar-content-container,
564
+ .fm-topbar-content-container * {
565
+ align-self: center;
566
+ padding-bottom: 4px;
567
+ }
568
+ }
569
+ /* Top bar end */
570
+
571
+ /* Free message start */
572
+ .fm-free-option {
573
+ opacity: 0.7;
574
+ }
575
+ .fm-free-message {
576
+ background-color: #FFFFFF;
577
+ border: 1px solid #D0D0D080;
578
+ display: flex;
579
+ color: #000000;
580
+ font-family: Roboto;
581
+ justify-content: space-between;
582
+ padding: 8px 20px;
583
+ }
584
+ .fm-free-message-body {
585
+ color: #444444;
586
+ font-size: 14px;
587
+ font-weight: 500;
588
+ line-height: 30px;
589
+ }
590
+ .fm-free-message-upgrade-button,
591
+ .fm-free-message-upgrade-button:focus {
592
+ background-color: #29B311;
593
+ border-radius: 20px;
594
+ box-shadow: none;
595
+ color: #FFFFFF;
596
+ font-size: 12px;
597
+ padding: 3px 25px;
598
+ text-decoration: none;
599
+ text-transform: uppercase;
600
+ }
601
+ .fm-free-message-upgrade-button:hover {
602
+ text-decoration: none;
603
+ color: #FFFFFFCC;
604
+ }
605
+ .fm-free-message-promo-button,
606
+ .fm-free-message-promo-button:focus {
607
+ background-color: #0C4D68;
608
+ padding: 3px 40px;
609
+ }
610
+ .fm-promo-message {
611
+ align-items: center;
612
+ display: flex;
613
+ flex-direction: column;
614
+ padding: 8px 20px;
615
+ }
616
+ .fm-free-message-huge {
617
+ font-size: 30px;
618
+ line-height: 39px;
619
+ margin: 10px 0 0 0;
620
+ }
621
+ /* Free message end */
622
+
623
+ /* Head start */
624
+ .fm-head {
625
+ margin-top: 15px;
626
+ text-align: center;
627
+ }
628
+ .fm-head .fm-breadcrumbs { }
629
+ .fm-head .fm-breadcrumbs li {
630
+ display: inline-block;
631
+ margin: 0 10px 0 0;
632
+ padding-top: 10px;
633
+ vertical-align: baseline;
634
+ }
635
+ .fm-head .fm-breadcrumbs li:last-child {
636
+ margin-right:0px;
637
+ }
638
+ .fm-head .fm-breadcrumbs .fm-breadcrumb-item .fm-breadcrumb-item-link {
639
+ text-decoration:none;
640
+ font-family: Roboto;
641
+ font-weight:500;
642
+ font-size:18px;
643
+ color:#32373c;
644
+ }
645
+ .fm-head .fm-breadcrumbs .fm-breadcrumb-item .fm-breadcrumb-item-link-active {
646
+ color: #0073aa;
647
+ }
648
+
649
+ .fm-head .fm-breadcrumbs .fm-breadcrumb-item .fm-upgrade {
650
+ position:relative;
651
+ top: 0.5px;
652
+ display: inline-block;
653
+ margin-left: 10px;
654
+ padding: 1px 22px;
655
+ background-color: #29B311;
656
+ text-transform: uppercase;
657
+ border-radius: 10px;
658
+ font-weight: 700;
659
+ font-size: 12px;
660
+ color: #fff;
661
+ }
662
+ /* Head end */
663
+
664
+ /* Limitations alert start */
665
+ .fm-limitation-alert-container {
666
+ display: flex;
667
+ align-items: center;
668
+ position: fixed;
669
+ top: 0;
670
+ bottom: 0;
671
+ left: 0;
672
+ right: 0;
673
+ width: 100%;
674
+ height: 100%;
675
+ z-index: 100050;
676
+ }
677
+ .fm-limitation-alert-overlay {
678
+ background-color: #ffffffcc;
679
+ position: absolute;
680
+ top: 0;
681
+ bottom: 0;
682
+ left: 0;
683
+ right: 0;
684
+ width: 100%;
685
+ height: 100%;
686
+ }
687
+ .fm-limitation-alert {
688
+ background-color: #FFFFFF;
689
+ box-shadow: #0000001a 0 0 10px;
690
+ display: flex;
691
+ flex-direction: column;
692
+ color: #000000;
693
+ font-family: Roboto;
694
+ justify-content: space-between;
695
+ margin: 0 auto;
696
+ padding: 30px 20px;
697
+ position: relative;
698
+ max-width: 430px;
699
+ max-height: 311px;
700
+ width: 100%;
701
+ height: 100%;
702
+ text-align: center;
703
+ }
704
+ .fm-limitation-alert span.dashicons-no-alt {
705
+ cursor: pointer;
706
+ position: absolute;
707
+ top: 10px;
708
+ right: 10px;
709
+ color: #000000;
710
+ font-size: 20px;
711
+ opacity: 0.3;
712
+ }
713
+ .fm-hidden {
714
+ display: none;
715
+ }
716
+ .fm-limitation-alert-header {
717
+ color: #32373C;
718
+ font-size: 16px;
719
+ font-weight: 500;
720
+ line-height: 21px;
721
+ }
722
+ .fm-limitation-alert-body {
723
+ margin-top: 20px;
724
+ }
725
+ .fm-limitation-alert-body ul {
726
+ display: inline-block;
727
+ list-style: disc;
728
+ text-align: left;
729
+ }
730
+ .fm-limitation-alert-body ul li {
731
+ font-size: 16px;
732
+ font-weight: 700;
733
+ line-height: 26px;
734
+ }
735
+ /* Limitations alert end */
736
+ /* Add-ons start */
737
+ .fm-add-ons {
738
+ display: flex;
739
+ flex-wrap: wrap;
740
+ justify-content: center;
741
+ margin-top: 20px;
742
+ margin-bottom: 10px;
743
+ font-family: Roboto;
744
+ }
745
+ .fm-add-ons .fm-add-on {
746
+ max-width:300px;
747
+ max-height: 300px;
748
+ width:100%;
749
+ height:100%;
750
+ margin-right:10px;
751
+ margin-bottom:10px;
752
+ padding: 20px 20px 15px;
753
+ transition-delay: 0s;
754
+ transition-duration: 0s;
755
+ transition-property: all;
756
+ transition-timing-function: ease;
757
+ background-color: #fff;
758
+ border-radius:1px;
759
+ text-align: center;
760
+ font-family:Roboto;
761
+ font-weight: 300;
762
+ font-size:16px;
763
+ color: rgb(50, 58, 69);
764
+ }
765
+ .fm-add-ons .fm-add-on:hover {
766
+ box-shadow: 1px 1px 6px rgba(52, 52, 52, 0.16);
767
+ }
768
+ .fm-add-ons .fm-add-on .fm-add-on-img {
769
+ width:72px;
770
+ height:72px;
771
+ margin:0 auto;
772
+ }
773
+ .fm-add-ons .fm-add-on a {
774
+ text-decoration:none;
775
+ }
776
+ .fm-add-ons .fm-add-on .fm-add-on-name {
777
+ margin:15px 0px;
778
+ }
779
+ .fm-add-ons .fm-add-on .fm-add-on-name,
780
+ .fm-add-ons .fm-add-on .fm-add-on-name a {
781
+ font-family:Roboto;
782
+ font-weight: 400;
783
+ font-size:20px;
784
+ color: #0C4D68;
785
+ }
786
+ .fm-add-ons .fm-add-on .fm-add-on-premium-version {
787
+ margin: 4px 0;
788
+ height: 16px;
789
+ line-height:16px;
790
+ font-weight:400;
791
+ font-size:14px;
792
+ color:rgb(41, 179, 17);
793
+ }
794
+ .fm-add-ons .fm-add-on .fm-add-on-desc {
795
+ max-height: 65px;
796
+ height:100%;
797
+ line-height:20px;
798
+ font-size:16px;
799
+ }
800
+
801
+ .fm-add-ons .fm-add-on .fm-add-on-desc-more-wrap {
802
+ position: relative;
803
+ }
804
+ .fm-add-ons .fm-add-on .fm-add-on-desc-more {
805
+ position: absolute;
806
+ z-index: 1;
807
+ left: 0;
808
+ bottom: 65px;
809
+ opacity: 0;
810
+ visibility: hidden;
811
+ transition: opacity 0.4s linear;
812
+ padding: 10px 10px;
813
+ background-color: rgb(50, 55, 60);
814
+ border-radius: 6px;
815
+ line-height: 20px;
816
+ font-weight:400;
817
+ font-size: 14px;
818
+ color: #fff;
819
+ }
820
+ .fm-add-ons .fm-add-on .fm-add-on-desc:hover + .fm-add-on-desc-more {
821
+ opacity: 1;
822
+ visibility: visible;
823
+ }
824
+ .fm-add-ons .fm-add-on .fm-add-on-buy {
825
+ width: 155px;
826
+ height: 30px;
827
+ display:block;
828
+ margin: 10px auto;
829
+ padding-top: 7px;
830
+ background-color: rgb(12, 77, 104);
831
+ border: 0.7px solid rgb(12, 77, 104);
832
+ border-radius: 15px;
833
+ line-height:16px;
834
+ font-family: Roboto;
835
+ font-weight: 400;
836
+ font-size: 13px;
837
+ color: #fff;
838
+ }
839
+
840
+ .fm-add-ons .fm-add-on .fm-add-on-buy:hover {
841
+ background-color: rgba(12, 77, 104, 0.8);
842
+ }
843
+
844
+ .fm-add-ons .fm-add-on.fm-add-on-activated .fm-add-on-buy {
845
+ text-transform:uppercase;
846
+ background-color: #fff;
847
+ font-size:13px;
848
+ color:rgb(12, 77, 104);
849
+ }
850
+ .fm-add-ons .fm-add-on .fm-add-on-learn-more {
851
+ line-height:16px;
852
+ font-family: Roboto;
853
+ font-weight: 300;
854
+ font-size: 14px;
855
+ color: rgb(0,115,170);
856
+ }
857
+ .fm-add-ons .fm-add-on .fm-add-on-learn-more:hover {
858
+ color: rgba(0, 115, 170, 0.8);
859
+ }
860
+ /* Add-ons end */
css/style.css CHANGED
@@ -1445,4 +1445,4 @@ li.pp_selected > span {
1445
  }
1446
  .form_view_show {
1447
  display:block;
1448
- }
1445
  }
1446
  .form_view_show {
1447
  display:block;
1448
+ }
featured/admin.css DELETED
@@ -1,741 +0,0 @@
1
- /**
2
- * Admin CSS file
3
- */
4
- #fm-tabs > div{
5
- display:none;
6
- }
7
- #fm-settings{
8
- background: #ffffff;
9
- padding: 15px;
10
- }
11
- .fm-meta-control {
12
- margin-bottom: 15px;
13
- }
14
-
15
- .fm-meta-control label {
16
- display: block;
17
- font-weight: bold;
18
- }
19
-
20
- #fm-admin-promo {
21
- background-color: #fcf8e3;
22
- border: 1px solid #faebbe;
23
- color: #8a6d3b;
24
- padding: 15px;
25
- }
26
-
27
- #fm_event_meta .inside code {
28
- word-break: break-all;
29
- }
30
-
31
- .border{
32
- border: 1px solid red;
33
- }
34
-
35
- /*Spider events*/
36
- .fm_repeat_type_list{
37
- float: left;
38
- width: 30%;
39
- }
40
- .fm_repeat_advanced{
41
- float: left;
42
- width: 68%;
43
- }
44
- #fm_choose_day_container div label{
45
- width: 120px;
46
- display: inline-block;
47
- }
48
- #fm_choose_day_container div label:after{
49
- clear: both;
50
- }
51
- #fm_choose_day_container div label input{
52
- float: right;
53
- margin: 1px;
54
- }
55
- .fm_icon{
56
- max-width: 64px;
57
- max-height: 64px;
58
- }
59
-
60
- .fm-modal .fm-calendar-event,
61
- .fm-events .fm-calendar-event{
62
- width:47%;
63
- display: inline-block;
64
- margin:0 20px 10px 0;
65
- }
66
-
67
- .fm-events .fm-calendar-event{
68
- width:42%;
69
- }
70
- .fm-modal .fm-calendar-event span:first-child,
71
- .fm-events .fm-calendar-event span:first-child{
72
- border: 1px solid #C8C8C8;
73
- display: inline-block;
74
- width: 89%;
75
- box-sizing: border-box;
76
- padding: 2px 2px 2px 7px;
77
- color: #7C7C7C;
78
- white-space: nowrap;
79
- text-overflow: ellipsis;
80
- overflow: hidden;
81
- float: left;
82
- }
83
-
84
- .fm-events .fm-calendar-event span:first-child{
85
- width: 81%;
86
- }
87
- .fm-modal .fm-calendar-event:nth-child(even){
88
- margin-right:0;
89
- }
90
-
91
- .fm-events .fm-calendar-event:after{
92
- clear: both;
93
- }
94
-
95
- .fm-modal .fm-calendar-event .fm-calendar-event-add,
96
- .fm-events .fm-calendar-event-delete{
97
- display: inline-block;
98
- text-align: center;
99
- float: left;
100
- vertical-align: middle;
101
- border-radius: 2px;
102
- height: 24px;
103
- width: 24px;
104
- color: #FFFFff;
105
- background-color: #0074A2;
106
- cursor: pointer;
107
- font-size: 19px;
108
- }
109
-
110
-
111
- .fm-events .fm-calendar-event-edit{
112
-
113
- }
114
- .fm-events .fm-calendar-event-edit a{
115
- font-size: 0;
116
- display: inline-block;
117
- float: left;
118
- margin: 0 1px;
119
- border-radius: 2px;
120
- height: 24px;
121
- width: 24px;
122
- background: url("../images/edit_icon.png") no-repeat center center;
123
- }
124
- .fm-events .fm-calendar-event-delete{
125
- line-height: 20px;
126
- }
127
-
128
- .fm-calendar-event-add {
129
- cursor: pointer;
130
- }
131
-
132
- .fm-modal {
133
- position: fixed;
134
- font-family: Arial, Helvetica, sans-serif;
135
- overflow-y: scroll;
136
- top: 0;
137
- right: 0;
138
- bottom: 0;
139
- left: 0;
140
- background: rgba(0, 0, 0, 0.8);
141
- z-index: 99999;
142
- opacity:0;
143
- -webkit-transition: opacity 400ms ease-in;
144
- -moz-transition: opacity 400ms ease-in;
145
- transition: opacity 400ms ease-in;
146
- pointer-events: none;
147
- }
148
- .fm-modal:target {
149
- opacity:1;
150
- pointer-events: auto;
151
- }
152
- .fm-modal > div.fm-excluded-events {
153
- width: 500px !important;
154
- position: relative;
155
- margin: 10% auto;
156
- padding: 0px 20px 16px 20px !important;
157
- border-radius: 1px;
158
- background: #fff;
159
- }
160
- .fm-modal > div.fm-preview {
161
- position: relative;
162
- margin: 5%;
163
- padding: 5px 20px 13px 20px;
164
- border-radius: 1px;
165
- background: #fff;
166
- min-width:600px;
167
- }
168
-
169
- .fm-close {
170
- background: url(../images/close.png);
171
- display: inline-block;
172
- position: absolute;
173
- right: 0px;
174
- height: 29px;
175
- top: 0px;
176
- width: 29px;
177
- text-decoration: none;
178
- z-index: 4;
179
- }
180
-
181
- .fm-excluded-events h2{
182
- margin: 15px 0;
183
- padding-bottom: 15px !important;
184
- border-bottom: 1px solid #B2B2B2;
185
- }
186
-
187
- .wd_stay_active {
188
- background: none repeat scroll 0% 0% green !important;
189
- box-shadow: 0px 1px 3px 0px #178FE5 inset !important;
190
- color: #FFF !important;
191
- font-weight: 700 !important;
192
- }
193
- #fm_event_pickup_date, #fm_event_pickup_time {
194
- height: 27px;
195
- border: 1px solid #A1A1A1;
196
- border-radius: 0;
197
- font-size: 13px;
198
- color: #444444;
199
- padding: 0 5px 0 27px;
200
- margin-top: 1px;
201
- }
202
-
203
- #fm_event_pickup_date {
204
- background:url(../images/admin_day.jpg) no-repeat left;
205
- margin: 1px 8px;
206
- }
207
- #fm_event_pickup_time {
208
- background:url(../images/admin_time.jpg) no-repeat left;
209
- }
210
-
211
- /*TABS*/
212
- #fm-tabs, #fm-tabs div{
213
- background: none #ffffff;
214
- border: 0;
215
- }
216
- .fm-tabs{
217
- list-style-type: none;
218
- }
219
- .fm-tabs li,
220
- #fm-settings-content .nav-tab-wrapper a{
221
- display: inline-block;
222
- border: 1px solid #A5A5A5;
223
- }
224
- .fm-tabs li a,
225
- #fm-settings-content .nav-tab-wrapper a{
226
- display: table-cell;
227
- text-align: center;
228
- width: 100px;
229
- height: 30px;
230
- vertical-align: middle;
231
- text-decoration:none;
232
- color:#5E5E5E;
233
- font-size: 16px;
234
- }
235
-
236
- #fm-settings-content .nav-tab-wrapper a{
237
- background: #ffffff;
238
- height: 21px;
239
- margin-right: 4px;
240
- display: inline-block;
241
- font-weight: normal;
242
- padding-top: 2px;
243
- }
244
-
245
- .fm-tabs li a:focus{
246
- box-shadow:none;
247
- }
248
- .fm-tabs li:hover a,.fm-tabs li.ui-state-active a,
249
- #fm-settings-content .nav-tab-wrapper a:hover,#fm-settings-content .nav-tab-wrapper a.nav-tab-active{
250
- color:#ffffff;
251
- background: #0074A2;
252
- }
253
-
254
- #fm-settings-content .nav-tab-wrapper {
255
- border-bottom:0;
256
- padding-left: 0;
257
- }
258
-
259
- .fm-tabs li:hover,.fm-tabs li.ui-state-active,
260
- #fm-settings-content .nav-tab-wrapper a.nav-tab-active{
261
- border: 1px solid transparent;
262
- }
263
-
264
- .fm-tab-inner{
265
- padding: 15px;
266
- }
267
-
268
- /*Preview */
269
- .ui-selecting { background: #FECA40 !important; }
270
- .ui-selected { background: #F39814 !important;}
271
-
272
- .event_cal_add {
273
- width: 350px;
274
- height: 130px;
275
- padding: 40px 20px 0;
276
- border: 1px solid #cccccc;
277
- position: absolute;
278
- z-index: 9999;
279
- background: #ffffff;
280
- }
281
- .event_cal_add .close{
282
- display: block;
283
- line-height: 18px;
284
- width: 20px;
285
- font-size: 8pt;
286
- margin-top: 1px;
287
- margin-right: 1px;
288
- position: absolute;
289
- font-family: tahoma;
290
- text-align: center;
291
- top: 0;
292
- right: 0;
293
- cursor: pointer;
294
- background-size: contain;
295
- height: 20px;
296
- }
297
-
298
- .event_cal_add .add_event_to_cal{
299
- display: block;
300
- cursor: pointer;
301
- padding-bottom: 10px;
302
- margin: 25px 0 0 0;
303
- width: 78px;
304
- text-align: center;
305
- line-height: 30px;
306
- height: 20px;
307
- background: #e3e3e3;
308
- border: 1px solid #eeeeee;
309
- }
310
- .event_cal_add .fm_notification{
311
- display: block;
312
- height: 20px;
313
- margin: 25px 0 0 0;
314
- }
315
- span.fm_error{
316
- color: #bc0b0b;
317
- display: block;
318
- padding-left: 36px;
319
- height: 20px;
320
-
321
- }
322
- #fm_calendar_meta h3.hndle{
323
- color:#0074A2;
324
- text-transform:uppercase;
325
- font-size: 17px;
326
- }
327
- #fm-settings a.button{
328
- border: 1px solid #A1A1A1;
329
- padding: 0px 15px;
330
- box-shadow: none;
331
- border-radius: 0;
332
- color: #000;
333
- font-weight: bold;
334
- }
335
- #fm-settings a.button:hover{
336
- border: 1px solid transparent;
337
- color: #fff;
338
- background: #0074A2;
339
- }
340
- #fm-settings input[type="text"],
341
- #fm-settings select,
342
- #fm_theme_meta input[type="text"]:not(#fm_event_location),
343
- #fm_calendar_meta input[type="text"]:not(.fm-search),
344
- #fm_calendar_meta select,
345
- #fm_event_meta input[type="text"]:not(#fm_event_date_from):not(#fm_event_date_to):not(#fm_event_location),
346
- #fm_event_meta select,
347
- #fm_event_meta #fm_event_year_month,
348
- #fm-settings .form-field input, #fm-settings input.regular-text{
349
- width:250px;
350
- border: 1px solid #A1A1A1;
351
- }
352
- #fm_event_date_from,#fm_event_date_to{
353
- border: 1px solid #A1A1A1;
354
- }
355
-
356
- #fm-settings input[type="checkbox"],
357
- #fm_event_meta input[type="checkbox"],
358
- #fm-settings input[type="radio"]{
359
- position: absolute;
360
- z-index: -1;
361
- margin: 0 !important;
362
- width: 5px !important;
363
- height: 5px !important;
364
- min-width: 5px !important;
365
- }
366
-
367
-
368
- #fm-settings .checkbox-div,
369
- #fm_event_meta .checkbox-div{
370
- width: 13px;
371
- height: 12px;
372
- background: #FDFDFD;
373
- border: 1px solid #CBCBCB;
374
- border-radius: 0px;
375
- position: relative;
376
- display: inline-block;
377
- top: 2px;
378
- margin-right: 7px;
379
- margin-left: 15px;
380
- box-sizing: content-box;
381
- -webkit-box-sizing: content-box;
382
- -moz-box-sizing: content-box;
383
- }
384
- #fm-settings .checkbox-div:first-child{
385
- margin-left: 0px;
386
- }
387
-
388
- #fm-settings .checkbox-div input[type="checkbox"]:checked + label ,
389
- #fm_event_meta .checkbox-div input[type="checkbox"]:checked + label ,
390
- #fm-settings .checkbox-div input[type="radio"]:checked + label {
391
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
392
- filter: alpha(opacity=100);
393
- opacity: 1;
394
- background: #CBCBCB;
395
- position: absolute;
396
- top: 2px;
397
- }
398
-
399
- #fm-settings input[type="submit"] {
400
- background: #0074A2;
401
- color: #ffffff;
402
- font-weight: bold;
403
- font-size: 15px;
404
- border: 0;
405
- border-radius: 0;
406
- padding: 5px 25px;
407
- height: auto;
408
- }
409
-
410
-
411
- #fm_event_meta .checkbox-div label,
412
- #fm-settings .checkbox-div label {
413
- cursor: pointer;
414
- -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
415
- filter: alpha(opacity=0);
416
- opacity: 0;
417
- content: "";
418
- position: absolute;
419
- width: 9px;
420
- height: 8px;
421
- background: #CBCBCB;
422
- border-radius: 0px;
423
- top: 2px;
424
- left: 2px;
425
- }
426
-
427
- #fm_calendar_meta .add_event_plus{
428
- display:inline-block;
429
- width:18px;
430
- height:18px;
431
- border-radius:100%;
432
- background:#0074A2;
433
- color:#ffffff;
434
- text-shadow:1px -1px 2px #005C82;
435
- margin-left:8px;
436
- text-align:center;
437
- font-weight: bold;
438
- font-size: 15px;
439
- line-height: 17px;
440
- }
441
- #fm_calendar_meta .fm-calendar-event-add a:focus{
442
- box-shadow:none;
443
- }
444
- #fm_event_meta .repeat_format{
445
- width: 90px;
446
- display: inline-block;
447
- }
448
- #fm_event_meta .repeat_format_monthly{
449
- width: 66px;
450
- display: inline-block;
451
- }
452
- #fm_event_meta #fm_event_year_month{
453
- margin: 10px 0 0 95px;
454
- }
455
- #fm_event_meta #fm_choose_day_container{
456
- margin-top: 10px;
457
- }
458
- #fm_event_meta #fm_choose_day_container .checkbox-div{
459
- margin-left: 0px;
460
- }
461
- #fm_event_meta .fm_repeat_advanced input[type="text"],
462
- #fm_event_meta .fm_repeat_advanced select{
463
- width: auto;
464
- }
465
-
466
- #fm_event_meta #fm_monthly,
467
- #fm_event_meta .fm_event_repeat_event_div{
468
- margin:10px 0;
469
- }
470
-
471
- #fm_event_meta .select_to_enable_disable{
472
- width:122px !important;
473
- }
474
-
475
- #fm_theme_meta label{
476
- display:inline-block;
477
- width:290px;
478
- font-weight: normal;
479
- font-size: 15px;
480
- }
481
-
482
- #fm_theme_meta .fm-tab-inner > div{
483
- margin:20px 0;
484
- }
485
- #fm_theme_meta .fm-tab-inner > div:first-child{
486
- margin-top:0;
487
- }
488
- #fm_theme_meta .with_fm_color:after,
489
- #fm-settings-content .fm-addons_updates:after,
490
- #fm-settings-content .main-plugin:after,
491
- #fm-settings-content:after{
492
- content:'';
493
- display:table;
494
- clear:both;
495
- }
496
- #fm_theme_meta .with_fm_color label{
497
- float: left;
498
- margin-top: 5px;
499
- width: 293px;
500
- }
501
- #fm_theme_meta .with_fm_color > div{
502
- float: left;
503
- }
504
- .fm-import-settings form{
505
- float:left;
506
- width:45%;
507
- }
508
- .fm-import-settings input[type=file]{
509
- margin: 10px 0;
510
- }
511
- .fm-import-settings .fm-calendar-event-import{
512
- font-size: 15px;
513
- }
514
-
515
- #fm-settings-content #add_on_title{
516
- margin-bottom:20px;
517
- }
518
-
519
- #fm-settings-content .fm_coming_soon {
520
- position: absolute;
521
- top: 44px;
522
- left: 0;
523
- }
524
- #fm-settings-content .fm-add-on a{
525
- text-decoration: none;
526
- }
527
- #fm-settings-content .fm-add-on h2{
528
- color: #229DBF;
529
- font-size: 16px;
530
- margin-bottom: 9px;
531
- padding: 0 0 7px;
532
- line-height: 1.2;
533
- }
534
- #fm-settings-content .fm-addon-descr{
535
- font-size: 13px;
536
- line-height: 18px;
537
- height: 100%;
538
- width: 53%;
539
- opacity: 0;
540
- position: absolute;
541
- top: 0;
542
- left: 0;
543
- padding: 8px 10px 10px;
544
- background: #23282D;
545
- color: #D1DDE0;
546
- -webkit-backface-visibility: hidden;
547
- -moz-backface-visibility: hidden;
548
- backface-visibility: hidden;
549
- -webkit-transform-origin: 0 0;
550
- -moz-transform-origin: 0 0;
551
- transform-origin: 0 0;
552
- -webkit-transform: rotateY(-90deg);
553
- -moz-transform: rotateY(-90deg);
554
- transform: rotateY(-90deg);
555
- -webkit-transition: -webkit-transform 0.4s, opacity 0.1s 0.3s;
556
- -moz-transition: -moz-transform 0.4s, opacity 0.1s 0.3s;
557
- transition: transform 0.4s, opacity 0.1s 0.3s;
558
- box-sizing: border-box;
559
- -webkit-box-sizing: border-box;
560
- -moz-box-sizing: border-box;
561
- }
562
- .grid figcaption {
563
- position: absolute;
564
- top: 0;
565
- left: 0;
566
- padding: 20px;
567
- background: #2c3f52;
568
- color: #ed4e6e;
569
- }
570
- #fm-settings-content .fm-addon,
571
- #fm-settings-content .fm-addon-price{
572
- display: inline-block;
573
- margin-top: 15px;
574
- font-size: 15px;
575
- border: 1px solid #DCDCDC;
576
- font-weight: bold;
577
- }
578
- #fm-settings-content .fm-addon{
579
- background: #FFFFFF url(../images/Add_Ons.jpg) no-repeat 6px center;
580
- color: #66686B;
581
- padding: 9px 12px 9px 45px;
582
- width: 100%;
583
- box-sizing: border-box;
584
- -webkit-box-sizing: border-box;
585
- -moz-box-sizing: border-box;
586
- text-transform: uppercase;
587
- }
588
- #fm-settings-content .fm-addon-price{
589
- background: #FFFFFF;
590
- color: #229CBF;
591
- padding: 9px 12px;
592
- }
593
- #fm-settings-content .fm-add-on:hover .fm-addon-price,
594
- #fm-settings-content .fm-addon-price:hover{
595
- background: #229CBF;
596
- color: #DDECF1;
597
- }
598
- #fm-settings-content .fm-add-on:hover .fm-addon,
599
- #fm-settings-content .fm-addon.activated,
600
- #fm-settings-content .fm-addon:hover{
601
- background: #23282D url(../images/Add_Ons_hover.jpg) no-repeat 6px center;
602
- color: #DDDEDE;
603
- }
604
- #fm-settings-content .fm-addon span{
605
- border-left: 1px solid #A7A9AB;
606
- padding: 4px 10px 4px 10px;
607
- }
608
- #fm-settings-content .fm-addon-descr span{
609
- padding: 5px 0 5px 10px;
610
- border-left: 1px solid #93CEE0;
611
- }
612
- #fm-settings-content a:focus{
613
- outline:none;
614
- box-shadow:none;
615
- }
616
- #fm-settings-content .fm-add-on{
617
- width:310px;
618
- float:left;
619
- margin-right:40px;
620
- margin-bottom:57px;
621
- -webkit-perspective: 1700px;
622
- -moz-perspective: 1700px;
623
- perspective: 1700px;
624
- -webkit-perspective-origin: 0 50%;
625
- -moz-perspective-origin: 0 50%;
626
- perspective-origin: 0 50%;
627
- position: relative;
628
- }
629
- #fm-settings-content .main-plugin .fm-add-on{
630
- float: left;
631
- margin-right: 25px;
632
- height: auto;
633
- }
634
- #fm-settings-content .fm-figure{
635
- -webkit-transform-style: preserve-3d;
636
- -moz-transform-style: preserve-3d;
637
- transform-style: preserve-3d;
638
- position: relative;
639
- width:100%;
640
- height: 232px;
641
- margin: 0;
642
- }
643
- #fm-settings-content .fm-figure-img{
644
- overflow: hidden;
645
- }
646
- #fm-settings-content .fm-figure-img img{
647
- -webkit-transition: -webkit-transform 0.4s;
648
- -moz-transition: -moz-transform 0.4s;
649
- transition: transform 0.4s;
650
- }
651
- #fm-settings-content .fm-figure:hover img,
652
- #fm-settings-content .fm-figure.activated img {
653
- -webkit-transform: translateX(25%);
654
- -moz-transform: translateX(25%);
655
- -ms-transform: translateX(25%);
656
- transform: translateX(25%);
657
- }
658
- #fm-settings-content .fm-figure:hover figcaption,
659
- #fm-settings-content .fm-figure.activated figcaption {
660
- opacity: 1;
661
- -webkit-transform: rotateY(0deg);
662
- -moz-transform: rotateY(0deg);
663
- transform: rotateY(0deg);
664
- -webkit-transition: -webkit-transform 0.4s, opacity 0.1s;
665
- -moz-transition: -moz-transform 0.4s, opacity 0.1s;
666
- transition: transform 0.4s, opacity 0.1s;
667
- }
668
- #fm-settings-content .fm-addon-subtitle {
669
- font-size: 25px;
670
- border-bottom: 1px solid #C1C4C7;
671
- padding-bottom: 23px;
672
- }
673
- #fm-settings-content .main-plugin .main-plugin-img {
674
- float: left;
675
- margin-right: 2%;
676
- width: 26%;
677
- }
678
- #fm-settings-content .main-plugin .main-plugin-img img{
679
- max-width:100%;
680
- }
681
- #fm-settings-content .main-plugin .main-plugin-info {
682
- float: left;
683
- }
684
- #fm-settings-content .main-plugin {
685
- margin-bottom: 25px;
686
- }
687
- #fm-settings-content .main-plugin_desc-cont p,
688
- #fm-settings-content .main-plugin_desc-cont {
689
- font-size: 14px;
690
- }
691
- #fm-settings-content .main-plugin-desc-info p{
692
- margin: 2px 0 13px;
693
- }
694
- #fm-settings-content .fm-addons_updates .main-plugin-desc-info p{
695
- margin: 2px 0 4px;
696
- }
697
- #fm-settings-content .main-plugin-desc {
698
- margin-bottom: 12px;
699
- }
700
- #fm-settings-content .main-plugin-info h2 {
701
- padding: 0;
702
- line-height: 1;
703
- margin-bottom: 14px;
704
- }
705
- #fm-settings-content .main-plugin-info h2 a {
706
- color: #323A45;
707
- text-decoration: none;
708
- font-weight: bold;
709
- }
710
- #fm-settings-content .main-plugin-desc-info {
711
- border-bottom: 1px solid #C0C4C7;
712
- width: 71%;
713
- }
714
- #fm-settings-content .fm-addons_updates .main-plugin-desc-info {
715
- border-bottom: 0;
716
- width: 100%;
717
- }
718
- #fm-settings-content .update-info {
719
- background:url(../assets/updates_icon.jpg) no-repeat;
720
- padding-left:25px;
721
- color: #bc0b0b;
722
- }
723
- #fm-settings-content .fm-addons_updates .fm-figure {
724
- margin-bottom: 10px;
725
- }
726
- #fm-settings-content .fm-addons_updates .fm-addon-descr-update {
727
- border-top: 1px solid #898989;
728
- padding-top: 6px;
729
- }
730
- #fm-settings-content .fm-addons_updates h2{
731
- color: #323A45;
732
- text-decoration: none;
733
- font-weight: bold;
734
- border-bottom: 0;
735
- padding-bottom: 0;
736
- margin-bottom: 0;
737
- }
738
-
739
- .fm_more_updates {
740
- display: none;
741
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
featured/featured.php DELETED
@@ -1,163 +0,0 @@
1
- <?php
2
- function fm_extensions_page($current_plugin = '') {
3
- wp_enqueue_style('fm-featured');
4
- wp_enqueue_style('fm-featured-admin');
5
- $addons = array(
6
- 'Form Maker Add-ons' => array(
7
- 'imp_exp' => array(
8
- 'name' => 'Import/Export',
9
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/export-import.html',
10
- 'description' => 'Form Maker Export/Import WordPress plugin allows exporting and importing forms with/without submissions.',
11
- 'icon' => '',
12
- 'image' => plugins_url( '../assets/import_export.png', __FILE__ ),
13
- 'file_dir' => 'form-maker-export-import/fm_exp_imp.php'
14
- ),
15
- 'mailchimp' => array(
16
- 'name' => 'MailChimp',
17
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/mailchimp.html',
18
- 'description' => 'This add-on is an integration of the Form Maker with MailChimp which allows to add contacts to your subscription lists just from submitted forms.',
19
- 'icon' => '',
20
- 'image' => plugins_url( '../assets/mailchimp.png', __FILE__ ),
21
- 'file_dir' => 'form-maker-mailchimp/fm_mailchimp.php'
22
- ),
23
- 'reg' => array(
24
- 'name' => 'Registration',
25
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/registration.html',
26
- 'description' => 'User Registration add-on integrates with Form maker forms allowing users to create accounts at your website.',
27
- 'icon' => '',
28
- 'image' => plugins_url( '../assets/reg.png', __FILE__ ),
29
- 'file_dir' => 'form-maker-reg/fm_reg.php'
30
- ),
31
- 'post_generation' => array(
32
- 'name' => 'Post Generation',
33
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/post-generation.html',
34
- 'description' => 'Post Generation add-on allows creating a post, page or custom post based on the submitted data.',
35
- 'icon' => '',
36
- 'image' => plugins_url( '../assets/post-generation-update.png', __FILE__ ),
37
- 'file_dir' => 'form-maker-post-generation/fm_post_generation.php'
38
- ),
39
- 'conditional_emails' => array(
40
- 'name' => 'Conditional Emails',
41
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/conditional-emails.html',
42
- 'description' => 'Conditional Emails add-on allows to send emails to different recipients depending on the submitted data .',
43
- 'icon' => '',
44
- 'image' => plugins_url( '../assets/conditional-emails-update.png', __FILE__ ),
45
- 'file_dir' => 'form-maker-conditional-emails/fm_conditional_emails.php'
46
- ),
47
- 'dropbox_integration' => array(
48
- 'name' => 'Dropbox Integration',
49
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/dropbox.html',
50
- 'description' => 'The Form Maker Dropbox Integration addon is extending the Form Maker capabilities allowing to store the form attachments straight to your Dropbox account.',
51
- 'icon' => '',
52
- 'image' => plugins_url( '../assets/dropbox-integration-update.png', __FILE__ ),
53
- 'file_dir' => 'form-maker-dropbox-integration/fm_dropbox_integration.php'
54
- ),
55
- 'gdrive_integration' => array(
56
- 'name' => 'Google Drive Integration',
57
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/google-drive.html',
58
- 'description' => 'The Google Drive Integration add-on integrates Form Maker with Google Drive and allows you to send the file uploads to the Google Drive',
59
- 'icon' => '',
60
- 'image' => plugins_url( '../assets/google_drive_integration.png', __FILE__ ),
61
- 'file_dir' => 'form-maker-gdrive-integration/fm_gdrive_integration.php'
62
- ),
63
- 'pdf_integration' => array(
64
- 'name' => 'PDF Integration',
65
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/pdf.html',
66
- 'description' => 'The Form Maker PDF Integration add-on allows sending submitted forms in PDF format.',
67
- 'icon' => '',
68
- 'image' => plugins_url( '../assets/pdf-integration.png', __FILE__ ),
69
- 'file_dir' => 'form-maker-pdf-integration/fm_pdf_integration.php'
70
- ),
71
- 'pushover' => array(
72
- 'name' => 'Pushover',
73
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/pushover.html',
74
- 'description' => 'Form Maker Pushover integration allows to receive real-time notifications when a user submits a new form. This means messages can be pushed to Android and Apple devices, as well as desktop notification board.',
75
- 'icon' => '',
76
- 'image' => plugins_url( '../assets/pushover.png', __FILE__ ),
77
- 'file_dir' => 'form-maker-pushover/fm_pushover.php'
78
- ),
79
- 'form-maker-save-progress' => array(
80
- 'name' => 'Save Progress',
81
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/save-progress.html',
82
- 'description' => 'The add-on allows to save filled in forms as draft and continue editing them subsequently.',
83
- 'icon' => '',
84
- 'image' => plugins_url( '../assets/save-progress.png', __FILE__ ),
85
- 'file_dir' => 'form-maker-save-progress/fm_save.php'
86
- ),
87
- 'stripe' => array(
88
- 'name' => 'Stripe',
89
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/stripe.html',
90
- 'description' => 'Form Maker Stripe Integration Add-on allows to accept direct payments made by Credit Cards. Users will remain on your website during the entire process.',
91
- 'icon' => '',
92
- 'image' => plugins_url( '../assets/stripe-integration-update.png', __FILE__ ),
93
- 'file_dir' => 'form-maker-stripe/fm_stripe.php'
94
- ),
95
- 'calculator' => array(
96
- 'name' => 'Calculator',
97
- 'url' => 'https://web-dorado.com/products/wordpress-form/add-ons/calculator.html',
98
- 'description' => 'The Form Maker Calculator add-on allows creating forms with dynamically calculated fields.',
99
- 'icon' => '',
100
- 'image' => plugins_url( '../assets/calculator.png', __FILE__ ),
101
- 'file_dir' => 'form-maker-calculator/fm_calculator.php'
102
- )
103
- )
104
- );
105
- ?>
106
- <div class="wrap">
107
- <?php settings_errors(); ?>
108
- <div id="fm-settings">
109
- <div id="fm-settings-content" >
110
- <h2 id="add_on_title"><?php echo esc_html(get_admin_page_title()); ?></h2>
111
- <?php
112
- if($addons){
113
- foreach ($addons as $name => $cat) {
114
- foreach ( $cat as $addon ) {
115
- $activated = '';
116
- if ( is_plugin_active( $addon['file_dir'] ) ) {
117
- $activated = 'activated';
118
- }
119
- ?>
120
- <div class="fm-add-on">
121
- <h2><?php echo $addon['name'] ?></h2>
122
- <figure class="fm-figure <?php echo $activated; ?>">
123
- <div class="fm-figure-img">
124
- <a href="<?php echo $addon['url'] ?>" target="_blank">
125
- <?php if ( $addon['image'] ) { ?>
126
- <img src="<?php echo $addon['image'] ?>"/>
127
- <?php } ?>
128
- </a>
129
- </div>
130
- <figcaption class="fm-addon-descr fm-figcaption">
131
- <?php if ( $addon['icon'] ) { ?>
132
- <img src="<?php echo $addon['icon'] ?>"/>
133
- <?php } ?>
134
- <?php echo $addon['description'] ?>
135
- </figcaption>
136
- </figure>
137
- <?php
138
- if ( $addon['url'] !== '#' ) {
139
- if ( !empty($activated) ) {
140
- ?>
141
- <span class="fm-addon activated"><span><?php _e('Add on activated', WDFM()->prefix); ?></span></span>
142
- <?php }
143
- else { ?>
144
- <a href="<?php echo $addon['url'] ?>" target="_blank" class="fm-addon"><span><?php _e('Get this add on', WDFM()->prefix); ?></span></a>
145
- <?php }
146
- } else { ?>
147
- <div class="fm_coming_soon">
148
- <img src="<?php echo plugins_url( '../../assets/coming_soon.png', __FILE__ ); ?>"/>
149
- </div>
150
- <?php } ?>
151
- </div>
152
- <?php
153
- }
154
- }
155
- }
156
- ?>
157
- </div>
158
- <!-- #fm-settings-content -->
159
- </div>
160
- <!-- #fm-settings -->
161
- </div><!-- .wrap -->
162
- <?php
163
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
featured/images/Add_Ons.jpg DELETED
Binary file
featured/images/calendar.png DELETED
Binary file
featured/images/calendar1.png DELETED
Binary file
featured/images/calendar_hover.png DELETED
Binary file
featured/images/calendar_menu.png DELETED
Binary file
featured/images/delete_el.png DELETED
Binary file
featured/images/down.png DELETED
Binary file
featured/images/downarrow.png DELETED
Binary file
featured/images/download.jpg DELETED
Binary file
featured/images/download_plugins.png DELETED
Binary file
featured/images/form.png DELETED
Binary file
featured/images/form_import.png DELETED
Binary file
featured/images/index.html DELETED
@@ -1,11 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>403 Forbidden</title>
5
- </head>
6
- <body>
7
-
8
- <p>Directory access is forbidden.</p>
9
-
10
- </body>
11
- </html>
 
 
 
 
 
 
 
 
 
 
 
featured/images/loadingAnimation.gif DELETED
Binary file
featured/images/tb-close.png DELETED
Binary file
featured/images/up.png DELETED
Binary file
featured/index.html DELETED
@@ -1,11 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>403 Forbidden</title>
5
- </head>
6
- <body>
7
-
8
- <p>Directory access is forbidden.</p>
9
-
10
- </body>
11
- </html>
 
 
 
 
 
 
 
 
 
 
 
featured/style.css DELETED
@@ -1,208 +0,0 @@
1
- @import url(http://fonts.googleapis.com/css?family=Oswald);
2
-
3
- #main_featured_plugins_page {
4
- font-family: Oswald;
5
- width: 90%;
6
- margin: 15px auto 0px auto;
7
- }
8
-
9
- #main_featured_plugins_page h3 {
10
- border-bottom: 2px solid #CECECE;
11
- color: rgb(111, 111, 111);
12
- font-family: Segoe UI;
13
- font-size: 18pt;
14
- margin: 0px auto 15px auto;
15
- padding: 20px 0;
16
- }
17
-
18
- #main_featured_plugins_page #featured-plugins-list {
19
- position:relative;
20
- margin:0px auto;
21
- height:auto;
22
- display:table;
23
- list-style:none;
24
- text-align: center;
25
- width: 100%;
26
- }
27
-
28
- #main_featured_plugins_page #featured-plugins-list li {
29
- display: inline-table;
30
- width: 200px;
31
- margin: 20px 10px 0px 10px;
32
- background: #FFFFFF;
33
- border-right: 3px solid #E5E5E5;
34
- height: 335px;
35
- border-bottom: 3px solid #E5E5E5;
36
- position: relative;
37
- }
38
-
39
- #main_featured_plugins_page #featured-plugins-list li .product {
40
- position:relative;
41
- height:113px;
42
- background-color: transparent !important;
43
- background-position-x: 50% !important;
44
- margin: 7px;
45
- border-radius: 3px;
46
- background-size: 115px !important;
47
- }
48
-
49
- #main_featured_plugins_page #featured-plugins-list li .title {
50
- width: 90%;
51
- text-align: center;
52
- margin: 0 auto;
53
- }
54
- #main_featured_plugins_page #featured-plugins-list li.ecommerce-wd .product {background:url("images/ecommerce.png") center center no-repeat;}
55
- #main_featured_plugins_page #featured-plugins-list li.form-maker .product {background:url("images/form.png") center center no-repeat;}
56
- #main_featured_plugins_page #featured-plugins-list li.catalog .product {background:url("images/catalog.png") center center no-repeat;}
57
- #main_featured_plugins_page #featured-plugins-list li.contact-maker .product {background:url("images/contact.maker.png") center center no-repeat;}
58
- #main_featured_plugins_page #featured-plugins-list li.contacts .product {background:url("images/contacts.png") center center no-repeat;}
59
- #main_featured_plugins_page #featured-plugins-list li.facebook .product {background:url("images/facebook.png") center center no-repeat;}
60
- #main_featured_plugins_page #featured-plugins-list li.facebook-feed .product {background:url("images/facebook-feed.png") center center no-repeat;}
61
- #main_featured_plugins_page #featured-plugins-list li.faq .product {background:url("images/faq.png") center center no-repeat;}
62
- #main_featured_plugins_page #featured-plugins-list li.flash-calendar .product {background:url("images/flash.calendar.png") center center no-repeat;}
63
- #main_featured_plugins_page #featured-plugins-list li.player .product {background:url("images/player.png") center center no-repeat; }
64
- #main_featured_plugins_page #featured-plugins-list li.spider-calendar .product {background:url("images/spider.calendar.png") center center no-repeat;}
65
- #main_featured_plugins_page #featured-plugins-list li.contact_form_bulder .product {background:url("images/contact.builder.png") center center no-repeat;}
66
- #main_featured_plugins_page #featured-plugins-list li.random_post .product {background:url("images/random.post.png") center center no-repeat;}
67
- #main_featured_plugins_page #featured-plugins-list li.slider_wd .product {background:url("images/slider.png") center center no-repeat;}
68
- #main_featured_plugins_page #featured-plugins-list li.folder_menu .product {background:url("images/folder.menu.png") center center no-repeat;}
69
- #main_featured_plugins_page #featured-plugins-list li.zoom .product {background:url("images/zoom.png") center center no-repeat;}
70
- #main_featured_plugins_page #featured-plugins-list li.fm-import .product {background:url("images/fm-import.png") center center no-repeat;}
71
- #main_featured_plugins_page #featured-plugins-list li.photo-gallery .product {background:url("images/photo-gallery.png") center center no-repeat;}
72
- #main_featured_plugins_page #featured-plugins-list li.twitter-widget .product {background:url("images/twittertools.png") center center no-repeat;}
73
- #main_featured_plugins_page #featured-plugins-list li.events-wd .product {background:url("images/events-wd.png") center center no-repeat;}
74
- #main_featured_plugins_page #featured-plugins-list li.faq_wd .product {background:url("images/faq_wd.png") center center no-repeat;}
75
- #main_featured_plugins_page #featured-plugins-list li.instagram_feed .product {background:url("images/instagram_feed.png") center center no-repeat;}
76
- #main_featured_plugins_page #featured-plugins-list li.post-slider .product {background:url("images/post-slider.png") center center no-repeat;}
77
- #main_featured_plugins_page #featured-plugins-list li.google-maps .product {background:url("images/google-maps.png") center center no-repeat;}
78
-
79
- #main_featured_plugins_page #featured-plugins-list li .title .heading {
80
- display: block;
81
- position: relative;
82
- font-size: 17px;
83
- color: #767676;
84
- margin: 13px 0px 13px 0px;
85
- text-transform: uppercase;
86
- }
87
-
88
- #main_featured_plugins_page #featured-plugins-list li .title p {
89
- font-size:14px;
90
- color:#444;
91
- margin-left:20px;
92
- }
93
-
94
- #main_featured_plugins_page #featured-plugins-list li .description {
95
- height: 127px;
96
- width: 90%;
97
- margin: 0 auto;
98
- }
99
-
100
- #main_featured_plugins_page #featured-plugins-list li .description p {
101
- text-align: center;
102
- width: 100%;
103
- color: #9A9A9A;
104
- font-family: Segoe UI Light;
105
- }
106
-
107
- #featured-plugins-list li a.download {
108
- display: block;
109
- border-top: 1px solid #CACACA;
110
- outline: none;
111
- width: 90%;
112
- margin: 0 auto;
113
- font-size: 14px;
114
- line-height: 40px;
115
- text-decoration: none;
116
- font-weight: bolder;
117
- text-align: center;
118
- color: #134D68;
119
- position: absolute;
120
- text-transform: uppercase;
121
- bottom: 0;
122
- left: 10px;
123
- font-family: Segoe UI Black;
124
- text-shadow: 1px 0;
125
- }
126
-
127
- #featured-plugins-list li a.download:hover {
128
- color: #F47629;
129
- }
130
-
131
- .featured_header{
132
- background: #11465F;
133
- border-right: 3px solid #E5E5E5;
134
- border-bottom: 3px solid #E5E5E5;
135
- position: relative;
136
- padding: 20px 0;
137
- }
138
-
139
- .featured_header .old_price {
140
- color: rgba(180, 180, 180, 0.3);
141
- text-decoration: line-through;
142
- font-family: Oswald;
143
- }
144
-
145
- .featured_header h1.get_plugins {
146
- color: #FFFFFF;
147
- height: 85px;
148
- margin: 0;
149
- background-size: 85% 100%;
150
- background-position: center;
151
- line-height: 60px;
152
- }
153
-
154
- .featured_header .try-now{
155
- text-align: center;
156
- }
157
-
158
- .featured_header .try-now span {
159
- display: inline-block;
160
- padding: 7px 16px;
161
- background: #F47629;
162
- border-radius: 10px;
163
- color: #ffffff;
164
- font-size: 23px;
165
- }
166
-
167
- .featured_header h1 {
168
- font-size: 50px;
169
- text-align: center;
170
- color: #FFFFFF;
171
- letter-spacing: 3px;
172
- text-transform: uppercase;
173
- }
174
-
175
- .featured_header a {
176
- text-decoration: none;
177
- }
178
-
179
- .featured_header .old-price {
180
- color: #889CA8;
181
- text-decoration: line-through;
182
- }
183
-
184
- @media screen and (max-width: 1105px) {
185
- .featured_header h1 {
186
- font-size: 37px;
187
- line-height: 0;
188
- }
189
- }
190
-
191
- @media screen and (max-width: 835px) {
192
- .get_plugins span {
193
- display: none;
194
- }
195
- }
196
-
197
- @media screen and (max-width: 700px) {
198
- .featured_header h1 {
199
- line-height: 40px;
200
- }
201
- }
202
-
203
- @media screen and (max-width: 435px) {
204
- .featured_header h1 {
205
- font-size: 20px;
206
- line-height: 25px;
207
- }
208
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
featured/updates.php DELETED
@@ -1,158 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Admin page
5
- */
6
-
7
- // Exit if accessed directly.
8
- if ( ! defined( 'ABSPATH' ) ) {
9
- exit;
10
- }
11
-
12
- $upd = FM_Admin::get_instance();
13
- $upd->check_for_update();
14
- $fm_plugins=$upd->fm_plugins;
15
- $updates=$upd->updates;
16
- wp_enqueue_style('fm-featured-admin');
17
- ?>
18
-
19
- <div class="wrap">
20
- <?php settings_errors(); ?>
21
- <div id="fm-settings">
22
- <div id="fm-settings-content">
23
- <h2 id="add_on_title"><?php echo esc_html( get_admin_page_title() ); ?></h2>
24
-
25
-
26
- <div class="main-plugin_desc-cont">
27
- You can download the latest version of your plugins from your <a href="https://web-dorado.com/subscriptions.html" target="_blank"> Web-Dorado.com</a> account.
28
- After deactivate and
29
- delete the current version.
30
- Install the downloaded latest version of the plugin.
31
- </div>
32
-
33
- <br/>
34
- <br/>
35
-
36
- <?php
37
- if ( $fm_plugins ) {
38
- $update = 0;
39
- if ( isset( $fm_plugins[31] ) ) {
40
-
41
- $project = $fm_plugins[31];
42
- unset( $fm_plugins[31] );
43
- if ( isset( $updates[31] ) ) {
44
- $update = 1;
45
- }
46
- ?>
47
- <div class="main-plugin">
48
- <div class="fm-add-on">
49
- <?php if ( $project['fm_data']['image'] ) { ?>
50
- <div class="fm-figure-img">
51
- <a href="https://web-dorado.com/subscriptions.html" target="_blank">
52
- <img src="<?php echo $project['fm_data']['image'] ?>"/>
53
- </a>
54
- </div>
55
- <?php } ?>
56
-
57
- </div>
58
- <div class="main-plugin-info">
59
- <h2>
60
- <a href="https://web-dorado.com/subscriptions.html" target="_blank"><?php echo $project['Title'] ?></a>
61
- </h2>
62
- <div class="main-plugin_desc-cont">
63
- <div class="main-plugin-desc"><?php echo $project['fm_data']['description'] ?></div>
64
- <div class="main-plugin-desc main-plugin-desc-info">
65
- <p><a href="https://web-dorado.com/subscriptions.html" target="_blank">Version <?php echo $project['Version']?></a></p>
66
- </div>
67
-
68
- <?php if ( isset( $updates[31][0] ) ) { ?>
69
- <span class="update-info">There is a new <?php echo $updates[31][0]['version']; ?> version available.</span>
70
- <p><span>What's new:</span></p>
71
- <div class="fm_last_update"><?php echo $updates[31][0]['version'] ?>
72
- - <?php echo str_replace('important', '', $updates[31][0]['note']); ?></div>
73
- <?php unset( $updates[31][0] ); ?>
74
- <?php if ( count( $updates[31] ) > 0 ) { ?>
75
-
76
- <div class="fm_more_updates">
77
- <?php foreach ( $updates[31] as $update ) {
78
- ?>
79
- <div class="fm_update"><?php echo $update['version'] ?>
80
- - <?php echo str_replace('important', '', $update['note']) ?></div>
81
- <?php
82
- }
83
- ?>
84
- </div>
85
- <a href="#" class="fm_show_more_updates">More updates</a>
86
- <?php
87
- }
88
- } ?>
89
-
90
-
91
-
92
-
93
-
94
- </div>
95
- </div>
96
- </div>
97
- <?php
98
- }?>
99
- <div class="fm-addons_updates">
100
- <?php
101
- foreach ( $fm_plugins as $id => $project ) {
102
- ?>
103
- <div class="fm-add-on">
104
- <figure class="fm-figure">
105
- <div class="fm-figure-img">
106
- <a href="https://web-dorado.com/subscriptions.html" target="_blank">
107
- <?php if ( $project['fm_data']['image'] ) { ?>
108
- <img src="<?php echo $project['fm_data']['image'] ?>"/>
109
- <?php } ?>
110
- </a>
111
- </div>
112
- <figcaption class="fm-addon-descr fm-figcaption">
113
- <?php if ( isset( $updates[ $id ][0] ) ) { ?>
114
- <p>What's new:</p>
115
- <?php echo $updates[ $id ][0]['note']; ?>
116
- <?php } else { ?><?php echo $project['Title'] ?> is up to date
117
- <?php } ?>
118
- </figcaption>
119
- </figure>
120
- <h2><?php echo $project['Title'] ?></h2>
121
- <div class="main-plugin-desc-info">
122
- <p><a href="https://web-dorado.com/subscriptions.html"
123
- target="_blank"><?php echo $project['Version'] ?></a> | Web-Dorado</p>
124
- </div>
125
- <?php if ( isset( $updates[ $id ] ) && $updates[ $id ][0]['version'] != $project['Version']){ ?>
126
- <div class="fm-addon-descr-update">
127
- <span
128
- class="update-info">There is a new <?php echo $updates[ $id ][0]['version'] ?>
129
- version available.</span><br/>
130
- </div>
131
- <?php } ?>
132
- </div>
133
-
134
- <?php
135
- }?>
136
- </div>
137
- <?php
138
- }
139
- ?>
140
-
141
- </div>
142
- <!-- #fm-settings-content -->
143
- </div>
144
- <!-- #fm-settings -->
145
- </div><!-- .wrap -->
146
-
147
- <script>
148
- jQuery('.fm_show_more_updates').on("click", function(){
149
- if( jQuery('.fm_more_updates').is(':visible') == false) {
150
- jQuery(this).text('Show less');
151
- }else{
152
- jQuery(this).text('More updates');
153
- }
154
- jQuery('.fm_more_updates').slideToggle();
155
- return false;
156
- });
157
-
158
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
form-maker.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Form Maker
4
  * Plugin URI: https://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.12.22
7
  * Author: WebDorado Form Builder Team
8
  * Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
@@ -94,8 +94,8 @@ final class WDFM {
94
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
95
  $this->front_urls = $this->get_front_urls();
96
  $this->main_file = plugin_basename(__FILE__);
97
- $this->plugin_version = '1.12.22';
98
- $this->db_version = '2.12.22';
99
  $this->menu_slug = 'manage_fm';
100
  $this->prefix = 'form_maker';
101
  $this->css_prefix = 'fm_';
@@ -186,7 +186,6 @@ final class WDFM {
186
  && (!isset($_GET['page']) || $_GET['page'] != 'uninstall' . $this->menu_postfix) ) {
187
  add_action('admin_init', array($this, 'form_maker_activate'));
188
  }
189
- add_action('admin_notices', array($this, 'fm_topic'), 11);
190
 
191
  // Register scripts/styles.
192
  add_action('wp_enqueue_scripts', array($this, 'register_frontend_scripts'));
@@ -246,12 +245,12 @@ final class WDFM {
246
 
247
  add_submenu_page(null, __('Blocked IPs', $this->prefix), __('Blocked IPs', $this->prefix), 'manage_options', 'blocked_ips' . $this->menu_postfix, array($this, 'form_maker'));
248
  add_submenu_page($parent_slug, __('Themes', $this->prefix), __('Themes', $this->prefix), 'manage_options', 'themes' . $this->menu_postfix, array($this, 'form_maker'));
249
- add_submenu_page($parent_slug, __('Options', $this->prefix), __('Options', $this->prefix), 'manage_options', 'options' . $this->menu_postfix, array($this, 'form_maker'));
250
- if ($this->is_free) {
251
- add_submenu_page($parent_slug, __('Pro Version', $this->prefix), __('Pro Version', $this->prefix), 'manage_options', 'licensing' . $this->menu_postfix, array($this, 'form_maker'));
252
  }
253
  add_submenu_page(null, __('Uninstall', $this->prefix), __('Uninstall', $this->prefix), 'manage_options', 'uninstall' . $this->menu_postfix, array($this, 'form_maker'));
254
- add_submenu_page($parent_slug, __('Add-ons', $this->prefix), __('Add-ons', $this->prefix), 'manage_options', 'extensions' . $this->menu_postfix, array($this , 'fm_extensions'));
255
  }
256
 
257
  /**
@@ -272,7 +271,12 @@ final class WDFM {
272
  */
273
  private function set_front_upload_url() {
274
  $wp_upload_dir = wp_upload_dir();
275
- $upload_url = str_replace(get_option('siteurl'), get_option('home'), $wp_upload_dir['baseurl']);
 
 
 
 
 
276
 
277
  return $upload_url;
278
  }
@@ -329,12 +333,12 @@ final class WDFM {
329
  die('Access Denied');
330
  }
331
  $page = WDW_FM_Library::get('page');
332
- if (($page != '') && (($page == 'manage' . $this->menu_postfix) || ($page == 'options' . $this->menu_postfix) || ($page == 'submissions' . $this->menu_postfix) || ($page == 'blocked_ips' . $this->menu_postfix) || ($page == 'themes' . $this->menu_postfix) || ($page == 'uninstall' . $this->menu_postfix) || ($page == 'extensions' . $this->menu_postfix) || ($this->is_free && $page == 'licensing' . $this->menu_postfix))) {
333
  $page = ucfirst(substr($page, 0, strlen($page) - strlen($this->menu_postfix)));
334
  // This ugly span is here to hide admin output while css files are not loaded. Temporary.
335
  // todo: Remove span somehow.
336
  echo '<div id="fm_loading"></div>';
337
- echo '<span id="fm_admin_container" class="fm-form-container" style="display: none;">';
338
  require_once ($this->plugin_dir . '/admin/controllers/' . $page . '_fm.php');
339
  $controller_class = 'FMController' . $page . $this->menu_postfix;
340
  $controller = new $controller_class();
@@ -343,22 +347,6 @@ final class WDFM {
343
  }
344
  }
345
 
346
- /**
347
- * Output for Add-on pages.
348
- */
349
- public function fm_extensions() {
350
- if ( function_exists('current_user_can') ) {
351
- if ( !current_user_can('manage_options') ) {
352
- die('Access Denied');
353
- }
354
- }
355
- else {
356
- die('Access Denied');
357
- }
358
- require_once($this->plugin_dir . '/featured/featured.php');
359
- fm_extensions_page('form-maker');
360
- }
361
-
362
  /**
363
  * Register widgets.
364
  */
@@ -381,13 +369,12 @@ final class WDFM {
381
  wp_register_style('fm-layout', $this->plugin_url . '/css/form_maker_layout.css', array(), $this->plugin_version);
382
  wp_register_style('fm-bootstrap', $this->plugin_url . '/css/fm-bootstrap.css', array(), $this->plugin_version);
383
  wp_register_style('fm-colorpicker', $this->plugin_url . '/css/spectrum.css', array(), $this->plugin_version);
 
 
 
384
  if (!$this->is_free) {
385
  wp_register_style('jquery.fancybox', $this->plugin_url . '/js/fancybox/jquery.fancybox.css', array(), '2.1.5');
386
  }
387
- // Add-ons page
388
- wp_register_style('fm-featured', $this->plugin_url . '/featured/style.css', array(), $this->plugin_version);
389
- wp_register_style('fm-featured-admin', $this->plugin_url . '/featured/admin.css', array(), $this->plugin_version);
390
-
391
  // Admin scripts.
392
  $fm_settings = get_option('fm_settings');
393
  $google_map_key = !empty($fm_settings['map_key']) ? '&key=' . $fm_settings['map_key'] : '';
@@ -414,10 +401,6 @@ final class WDFM {
414
  'add' => __('Add', $this->prefix),
415
  'add_field' => __('Add Field', $this->prefix),
416
  'edit_field' => __('Edit Field', $this->prefix),
417
- 'disabled1' => __('This field type is disabled in free version.', $this->prefix),
418
- 'disabled2' => __('Please upgrade to Paid version.', $this->prefix),
419
- 'stripe1' => __('Please install ', $this->prefix),
420
- 'stripe2' => __(' add-on to use this feature.', $this->prefix),
421
  'stripe3' => __('To use this feature, please go to Form Options > Payment Options and select "Stripe" as the Payment Method.', $this->prefix),
422
  'sunday' => __('Sunday', $this->prefix),
423
  'monday' => __('Monday', $this->prefix),
@@ -482,7 +465,6 @@ final class WDFM {
482
 
483
  wp_register_script('fm-colorpicker', $this->plugin_url . '/js/spectrum.js', array(), $this->plugin_version);
484
 
485
- wp_register_script('fm-admin', $this->plugin_url . '/js/form_maker_admin.js', array(), $this->plugin_version);
486
  wp_register_script('fm-themes', $this->plugin_url . '/js/themes.js', array(), $this->plugin_version);
487
 
488
  wp_register_script('fm-submissions', $this->plugin_url . '/js/form_maker_submissions.js', array(), $this->plugin_version);
@@ -492,6 +474,7 @@ final class WDFM {
492
  'countries' => WDW_FM_Library::get_countries(),
493
  'delete_confirmation' => __('Do you want to delete selected items?', $this->prefix),
494
  'select_at_least_one_item' => __('You must select at least one item.', $this->prefix),
 
495
  ));
496
  if (!$this->is_free) {
497
  wp_register_script('jquery.fancybox.pack', $this->plugin_url . '/js/fancybox/jquery.fancybox.pack.js', array(), '2.1.5');
@@ -506,8 +489,8 @@ final class WDFM {
506
  "email" => $admin_data->data->user_email,
507
  "plugin_wd_url" => "https://web-dorado.com/products/wordpress-form.html",
508
  ));
509
- wp_register_style('fm-license' . $this->menu_postfix, $this->plugin_url . '/css/license.css', array(), $this->plugin_version);
510
  }
 
511
  }
512
 
513
  /**
@@ -530,6 +513,9 @@ final class WDFM {
530
  'insert_form' => __('You must select a form', $this->prefix),
531
  'update' => __('Update', $this->prefix),
532
  ));
 
 
 
533
  }
534
 
535
  /**
@@ -745,7 +731,7 @@ final class WDFM {
745
  * Frontend scripts/styles.
746
  */
747
  public function register_frontend_scripts() {
748
- $front_plugin_url = $this->front_urls['plugin_url'];
749
  wp_register_style('fm-jquery-ui', $front_plugin_url . '/css/jquery-ui.custom.css', array(), $this->plugin_version);
750
 
751
  $fm_settings = get_option('fm_settings');
@@ -798,6 +784,7 @@ final class WDFM {
798
  * Frontend ajax scripts.
799
  */
800
  public function register_frontend_ajax_scripts() {
 
801
  $fm_settings = get_option('fm_settings');
802
  $google_map_key = !empty($fm_settings['map_key']) ? '&key=' . $fm_settings['map_key'] : '';
803
  wp_register_script('google-maps', 'https://maps.google.com/maps/api/js?v=3.exp' . $google_map_key);
@@ -876,178 +863,6 @@ final class WDFM {
876
  }
877
  }
878
 
879
- /**
880
- * Form maker topics at page top.
881
- */
882
- public function fm_topic() {
883
- $page = isset($_GET['page']) ? $_GET['page'] : '';
884
- $page = str_replace($this->menu_postfix, '', $page);
885
- $task = isset($_REQUEST['task']) ? $_REQUEST['task'] : '';
886
- $user_guide_link = 'https://web-dorado.com/wordpress-form-maker/';
887
- $support_forum_link = 'https://wordpress.org/support/plugin/form-maker';
888
- $pro_icon = $this->plugin_url . '/images/wd_logo.png';
889
- $pro_link = 'https://web-dorado.com/files/fromFormMaker.php';
890
- $support_icon = $this->plugin_url . '/images/support.png';
891
- $prefix = $this->prefix;
892
- switch ($page) {
893
- case 'blocked_ips': {
894
- $help_text = __('block IPs', $this->prefix);
895
- $user_guide_link .= 'blocking-ips.html';
896
- break;
897
- }
898
- case 'options': {
899
- $help_text = __('edit form settings', $this->prefix);
900
- $user_guide_link .= 'themes-and-options.html';
901
- break;
902
- }
903
- case 'licensing': {
904
- $help_text = '';
905
- $user_guide_link .= '';
906
- break;
907
- }
908
- case 'manage': {
909
- switch ($task) {
910
- case 'edit':
911
- case 'edit_old': {
912
- $help_text = __('add fields to your form', $this->prefix);
913
- $user_guide_link .= 'form-fields/basic-fields.html';
914
- break;
915
- }
916
- case 'form_options':
917
- case 'form_options_old': {
918
- $help_text = __('edit form options', $this->prefix);
919
- $user_guide_link .= 'form-options/general-options.html';
920
- break;
921
- }
922
- case 'display_options': {
923
- $help_text = __('edit display options', $this->prefix);
924
- $user_guide_link .= 'display-options-publishing/configuring-display-options.html';
925
- break;
926
- }
927
- default: {
928
- $help_text = __('create, edit forms', $this->prefix);
929
- $user_guide_link .= 'creating-form.html';
930
- }
931
- }
932
- break;
933
- }
934
- case 'submissions': {
935
- $help_text = __('view and manage form submissions', $this->prefix);
936
- $user_guide_link .= 'submissions.html';
937
- break;
938
- }
939
- case 'themes': {
940
- $help_text = __('create, edit form themes', $this->prefix);
941
- $user_guide_link .= 'themes-and-options.html';
942
- break;
943
- }
944
- default: {
945
- return '';
946
- }
947
- }
948
- ob_start();
949
- ?>
950
- <style>
951
- .wd_topic {
952
- background-color: #ffffff;
953
- border: none;
954
- box-sizing: border-box;
955
- clear: both;
956
- color: #6e7990;
957
- font-size: 14px;
958
- font-weight: bold;
959
- line-height: 44px;
960
- margin: 0;
961
- padding: 0 0 0 15px;
962
- vertical-align: middle;
963
- width: 98%;
964
- }
965
- .wd_topic .wd_help_topic {
966
- float: left;
967
- }
968
- .wd_topic .wd_help_topic a {
969
- color: #0073aa;
970
- }
971
- .wd_topic .wd_help_topic a:hover {
972
- color: #00A0D2;
973
- }
974
- .wd_topic .wd_support {
975
- float: right;
976
- margin: 0 10px;
977
- }
978
- .wd_topic .wd_support img {
979
- vertical-align: middle;
980
- }
981
- .wd_topic .wd_support a {
982
- text-decoration: none;
983
- color: #6E7990;
984
- }
985
- .wd_topic .wd_pro {
986
- float: right;
987
- padding: 0;
988
- }
989
- .wd_topic .wd_pro a {
990
- border: none;
991
- box-shadow: none !important;
992
- text-decoration: none;
993
- }
994
- .wd_topic .wd_pro img {
995
- border: none;
996
- display: inline-block;
997
- vertical-align: middle;
998
- }
999
- .wd_topic .wd_pro a,
1000
- .wd_topic .wd_pro a:active,
1001
- .wd_topic .wd_pro a:visited,
1002
- .wd_topic .wd_pro a:hover {
1003
- background-color: #D8D8D8;
1004
- color: #175c8b;
1005
- display: inline-block;
1006
- font-size: 11px;
1007
- font-weight: bold;
1008
- padding: 0 10px;
1009
- vertical-align: middle;
1010
- }
1011
- </style>
1012
- <div class="update-nag wd_topic">
1013
- <?php
1014
- if ($help_text) {
1015
- ?>
1016
- <span class="wd_help_topic">
1017
- <?php echo sprintf(__('This section allows you to %s.', $prefix), $help_text); ?>
1018
- <a target="_blank" href="<?php echo $user_guide_link; ?>">
1019
- <?php _e('Read More in User Manual', $prefix); ?>
1020
- </a>
1021
- </span>
1022
- <?php
1023
- }
1024
- if ($this->is_free) {
1025
- $text = strtoupper(__('Upgrade to paid version', $prefix));
1026
- ?>
1027
- <div class="wd_pro">
1028
- <a target="_blank" href="<?php echo $pro_link; ?>">
1029
- <img alt="web-dorado.com" title="<?php echo $text; ?>" src="<?php echo $pro_icon; ?>" />
1030
- <span><?php echo $text; ?></span>
1031
- </a>
1032
- </div>
1033
- <?php
1034
- }
1035
- if ($this->is_free) {
1036
- ?>
1037
- <span class="wd_support">
1038
- <a target="_blank" href="<?php echo $support_forum_link; ?>">
1039
- <img src="<?php echo $support_icon; ?>" />
1040
- <?php _e('Support Forum', $prefix); ?>
1041
- </a>
1042
- </span>
1043
- <?php
1044
- }
1045
- ?>
1046
- </div>
1047
- <?php
1048
- echo ob_get_clean();
1049
- }
1050
-
1051
  /**
1052
  * Form maker overview.
1053
  */
@@ -1172,7 +987,7 @@ final class WDFM {
1172
  <?php
1173
  $url = add_query_arg(array('action' => 'FMShortocde' . $this->plugin_postfix, 'task' => 'submissions', 'TB_iframe' => '1'), admin_url('admin-ajax.php'));
1174
  ?>
1175
- <a onclick="tb_click.call(this); fm_set_shortcode_popup_dimensions(500, 570); return false;" href="<?php echo $url; ?>" class="button" title="<?php _e('Insert submissions', $this->prefix); ?>">
1176
  <span class="wp-media-buttons-icon" style="background: url('<?php echo $this->plugin_url; ?>/images/fm-media-submissions-button.png') no-repeat scroll left top rgba(0, 0, 0, 0);"></span>
1177
  <?php _e('Add Submissions', $this->prefix); ?>
1178
  </a>
@@ -1188,6 +1003,7 @@ final class WDFM {
1188
  *
1189
  */
1190
  function fm_check_addons_compatibility() {
 
1191
  $add_ons = array(
1192
  'form-maker-export-import' => array('version' => '2.0.7', 'file' => 'fm_exp_imp.php'),
1193
  'form-maker-save-progress' => array('version' => '1.0.1', 'file' => 'fm_save.php'),
@@ -1198,7 +1014,7 @@ final class WDFM {
1198
  'form-maker-post-generation' => array('version' => '1.0.2', 'file' => 'fm_post_generation.php'),
1199
  'form-maker-dropbox-integration' => array('version' => '1.1.1', 'file' => 'fm_dropbox_integration.php'),
1200
  'form-maker-gdrive-integration' => array('version' => '1.0.0', 'file' => 'fm_gdrive_integration.php'),
1201
- 'form-maker-pdf-integration' => array('version' => '1.0.3', 'file' => 'fm_pdf_integration.php'),
1202
  'form-maker-stripe' => array('version' => '1.0.1', 'file' => 'fm_stripe.php'),
1203
  'form-maker-calculator' => array('version' => '1.0.3', 'file' => 'fm_calculator.php'),
1204
  );
3
  * Plugin Name: Form Maker
4
  * Plugin URI: https://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.12.24
7
  * Author: WebDorado Form Builder Team
8
  * Author URI: https://web-dorado.com/wordpress-plugins-bundle.html
9
  * License: GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
94
  $this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
95
  $this->front_urls = $this->get_front_urls();
96
  $this->main_file = plugin_basename(__FILE__);
97
+ $this->plugin_version = '1.12.24';
98
+ $this->db_version = '2.12.24';
99
  $this->menu_slug = 'manage_fm';
100
  $this->prefix = 'form_maker';
101
  $this->css_prefix = 'fm_';
186
  && (!isset($_GET['page']) || $_GET['page'] != 'uninstall' . $this->menu_postfix) ) {
187
  add_action('admin_init', array($this, 'form_maker_activate'));
188
  }
 
189
 
190
  // Register scripts/styles.
191
  add_action('wp_enqueue_scripts', array($this, 'register_frontend_scripts'));
245
 
246
  add_submenu_page(null, __('Blocked IPs', $this->prefix), __('Blocked IPs', $this->prefix), 'manage_options', 'blocked_ips' . $this->menu_postfix, array($this, 'form_maker'));
247
  add_submenu_page($parent_slug, __('Themes', $this->prefix), __('Themes', $this->prefix), 'manage_options', 'themes' . $this->menu_postfix, array($this, 'form_maker'));
248
+ add_submenu_page($parent_slug, __('Options', $this->prefix), __('Options', $this->prefix), 'manage_options', 'options' . $this->menu_postfix, array($this, 'form_maker'));
249
+ if ( $this->is_free ) {
250
+ add_submenu_page($parent_slug, __('Premium Version', $this->prefix), __('Premium Version', $this->prefix), 'manage_options', 'pricing' . $this->menu_postfix, array($this, 'form_maker'));
251
  }
252
  add_submenu_page(null, __('Uninstall', $this->prefix), __('Uninstall', $this->prefix), 'manage_options', 'uninstall' . $this->menu_postfix, array($this, 'form_maker'));
253
+ add_submenu_page($parent_slug, __('Add-ons', $this->prefix), __('Add-ons', $this->prefix), 'manage_options', 'addons' . $this->menu_postfix, array($this , 'form_maker'));
254
  }
255
 
256
  /**
271
  */
272
  private function set_front_upload_url() {
273
  $wp_upload_dir = wp_upload_dir();
274
+ $upload_url = $wp_upload_dir['baseurl'];
275
+ $http = 'http://';
276
+ $https = 'https://';
277
+ if ( $_SERVER['SERVER_PORT'] == 443 || strpos(get_option('home'), $https) > -1 ) {
278
+ $upload_url = str_replace($http, $https, $wp_upload_dir['baseurl']);
279
+ }
280
 
281
  return $upload_url;
282
  }
333
  die('Access Denied');
334
  }
335
  $page = WDW_FM_Library::get('page');
336
+ if (($page != '') && (($page == 'manage' . $this->menu_postfix) || ($page == 'options' . $this->menu_postfix) || ($page == 'submissions' . $this->menu_postfix) || ($page == 'blocked_ips' . $this->menu_postfix) || ($page == 'themes' . $this->menu_postfix) || ($page == 'uninstall' . $this->menu_postfix) || ($page == 'addons' . $this->menu_postfix) || ($this->is_free && $page == 'pricing' . $this->menu_postfix))) {
337
  $page = ucfirst(substr($page, 0, strlen($page) - strlen($this->menu_postfix)));
338
  // This ugly span is here to hide admin output while css files are not loaded. Temporary.
339
  // todo: Remove span somehow.
340
  echo '<div id="fm_loading"></div>';
341
+ echo '<span id="fm_admin_container" class="fm-form-container hidden">';
342
  require_once ($this->plugin_dir . '/admin/controllers/' . $page . '_fm.php');
343
  $controller_class = 'FMController' . $page . $this->menu_postfix;
344
  $controller = new $controller_class();
347
  }
348
  }
349
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
350
  /**
351
  * Register widgets.
352
  */
369
  wp_register_style('fm-layout', $this->plugin_url . '/css/form_maker_layout.css', array(), $this->plugin_version);
370
  wp_register_style('fm-bootstrap', $this->plugin_url . '/css/fm-bootstrap.css', array(), $this->plugin_version);
371
  wp_register_style('fm-colorpicker', $this->plugin_url . '/css/spectrum.css', array(), $this->plugin_version);
372
+ // Roboto font for top bar.
373
+ wp_register_style('fm-roboto', 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700');
374
+
375
  if (!$this->is_free) {
376
  wp_register_style('jquery.fancybox', $this->plugin_url . '/js/fancybox/jquery.fancybox.css', array(), '2.1.5');
377
  }
 
 
 
 
378
  // Admin scripts.
379
  $fm_settings = get_option('fm_settings');
380
  $google_map_key = !empty($fm_settings['map_key']) ? '&key=' . $fm_settings['map_key'] : '';
401
  'add' => __('Add', $this->prefix),
402
  'add_field' => __('Add Field', $this->prefix),
403
  'edit_field' => __('Edit Field', $this->prefix),
 
 
 
 
404
  'stripe3' => __('To use this feature, please go to Form Options > Payment Options and select "Stripe" as the Payment Method.', $this->prefix),
405
  'sunday' => __('Sunday', $this->prefix),
406
  'monday' => __('Monday', $this->prefix),
465
 
466
  wp_register_script('fm-colorpicker', $this->plugin_url . '/js/spectrum.js', array(), $this->plugin_version);
467
 
 
468
  wp_register_script('fm-themes', $this->plugin_url . '/js/themes.js', array(), $this->plugin_version);
469
 
470
  wp_register_script('fm-submissions', $this->plugin_url . '/js/form_maker_submissions.js', array(), $this->plugin_version);
474
  'countries' => WDW_FM_Library::get_countries(),
475
  'delete_confirmation' => __('Do you want to delete selected items?', $this->prefix),
476
  'select_at_least_one_item' => __('You must select at least one item.', $this->prefix),
477
+ 'add_placeholder' => __('Add placeholder', $this->prefix),
478
  ));
479
  if (!$this->is_free) {
480
  wp_register_script('jquery.fancybox.pack', $this->plugin_url . '/js/fancybox/jquery.fancybox.pack.js', array(), '2.1.5');
489
  "email" => $admin_data->data->user_email,
490
  "plugin_wd_url" => "https://web-dorado.com/products/wordpress-form.html",
491
  ));
 
492
  }
493
+ wp_register_style('fm-pricing', $this->plugin_url . '/css/pricing.css', array(), $this->plugin_version);
494
  }
495
 
496
  /**
513
  'insert_form' => __('You must select a form', $this->prefix),
514
  'update' => __('Update', $this->prefix),
515
  ));
516
+ wp_register_style('fm-pricing', $this->plugin_url . '/css/pricing.css', array(), $this->plugin_version);
517
+ // Roboto font for submissions shortcode.
518
+ wp_register_style('fm-roboto', 'https://fonts.googleapis.com/css?family=Roboto:300,400,500,700');
519
  }
520
 
521
  /**
731
  * Frontend scripts/styles.
732
  */
733
  public function register_frontend_scripts() {
734
+ $front_plugin_url = $this->front_urls['plugin_url'];
735
  wp_register_style('fm-jquery-ui', $front_plugin_url . '/css/jquery-ui.custom.css', array(), $this->plugin_version);
736
 
737
  $fm_settings = get_option('fm_settings');
784
  * Frontend ajax scripts.
785
  */
786
  public function register_frontend_ajax_scripts() {
787
+ $front_plugin_url = $this->front_urls['plugin_url'];
788
  $fm_settings = get_option('fm_settings');
789
  $google_map_key = !empty($fm_settings['map_key']) ? '&key=' . $fm_settings['map_key'] : '';
790
  wp_register_script('google-maps', 'https://maps.google.com/maps/api/js?v=3.exp' . $google_map_key);
863
  }
864
  }
865
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
866
  /**
867
  * Form maker overview.
868
  */
987
  <?php
988
  $url = add_query_arg(array('action' => 'FMShortocde' . $this->plugin_postfix, 'task' => 'submissions', 'TB_iframe' => '1'), admin_url('admin-ajax.php'));
989
  ?>
990
+ <a onclick="tb_click.call(this); fm_set_shortcode_popup_dimensions(520, 570); return false;" href="<?php echo $url; ?>" class="button" title="<?php _e('Insert submissions', $this->prefix); ?>">
991
  <span class="wp-media-buttons-icon" style="background: url('<?php echo $this->plugin_url; ?>/images/fm-media-submissions-button.png') no-repeat scroll left top rgba(0, 0, 0, 0);"></span>
992
  <?php _e('Add Submissions', $this->prefix); ?>
993
  </a>
1003
  *
1004
  */
1005
  function fm_check_addons_compatibility() {
1006
+ // Last version not supported.
1007
  $add_ons = array(
1008
  'form-maker-export-import' => array('version' => '2.0.7', 'file' => 'fm_exp_imp.php'),
1009
  'form-maker-save-progress' => array('version' => '1.0.1', 'file' => 'fm_save.php'),
1014
  'form-maker-post-generation' => array('version' => '1.0.2', 'file' => 'fm_post_generation.php'),
1015
  'form-maker-dropbox-integration' => array('version' => '1.1.1', 'file' => 'fm_dropbox_integration.php'),
1016
  'form-maker-gdrive-integration' => array('version' => '1.0.0', 'file' => 'fm_gdrive_integration.php'),
1017
+ 'form-maker-pdf-integration' => array('version' => '1.1.3', 'file' => 'fm_pdf_integration.php'),
1018
  'form-maker-stripe' => array('version' => '1.0.1', 'file' => 'fm_stripe.php'),
1019
  'form-maker-calculator' => array('version' => '1.0.3', 'file' => 'fm_calculator.php'),
1020
  );
form_maker_insert.php CHANGED
@@ -109,6 +109,12 @@ class WDFMInsert {
109
  ) " . $charset_collate . ";";
110
  $wpdb->query($formmaker_display_options);
111
 
 
 
 
 
 
 
112
  $formmaker_submits = "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "formmaker_submits` (
113
  `id` int(11) NOT NULL AUTO_INCREMENT,
114
  `form_id` int(11) NOT NULL,
@@ -283,16 +289,16 @@ class WDFMInsert {
283
  $form_maker_row = $wpdb->get_var('SELECT * FROM ' . $wpdb->prefix . 'formmaker' . (!WDFM()->is_free ? '' : ' WHERE id' . (WDFM()->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')'));
284
  if ( !$form_maker_row ) {
285
  $insert_form_id = array();
286
- $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `jsversion`) VALUES (NULL, 'Contact Us', 'embedded', '', '<div class=\"wdform-page-and-images\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"false\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - Name%</div><div wdid=\"3\" class=\"wdform_row\">%3 - Email%</div><div wdid=\"4\" class=\"wdform_row\">%4 - Subject%</div><div wdid=\"5\" class=\"wdform_row\">%5 - Message%</div><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', '1', '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}', '', '', '1', '%all%', '%all%', '6', '1', '2#**id**#Name#**label**#type_text#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Subject#**label**#type_text#****#5#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#2_elementform_id_temp#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '2#**id**#Name#**label**#type_text#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Subject#**label**#type_text#****#5#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', '0', 'testmode', '', '', '0', '2*:*id*:*type_text*:*type*:*Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*3*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*4*:*id*:*type_text*:*type*:*Subject*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*5*:*id*:*type_textarea*:*type*:*Message*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', '1', '1', '*', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '0', '1', 'Contact Us', 'You may contact us by filling in this form any time you need professional support or have any questions. You can also fill in the form to leave your comments or feedback.', '', 'none', '0', '0');");
287
  $insert_form_id[] = $wpdb->insert_id;
288
- $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `jsversion`) VALUES (NULL, 'Client List Form', 'embedded', '', '<div class=\"wdform-page-and-images\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"false\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - First Name%</div><div wdid=\"3\" class=\"wdform_row\">%3 - Last Name%</div><div wdid=\"4\" class=\"wdform_row\">%4 - Email%</div><div wdid=\"5\" class=\"wdform_row\">%5 - Phone%</div><div wdid=\"6\" class=\"wdform_row\">%6 - Website%</div><div wdid=\"7\" class=\"wdform_row\">%7 - Address%</div><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', '1', '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}', '', '', '1', '%all%', '%all%', '13', '1', '2#**id**#First Name#**label**#type_text#****#3#**id**#Last Name#**label**#type_text#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#Phone#**label**#type_text#****#6#**id**#Website#**label**#type_text#****#7#**id**#Street Address#**label**#type_address#****#8#**id**#Street Address Line 2#**label**#type_address#****#9#**id**#City#**label**#type_address#****#10#**id**#State / Province / Region#**label**#type_address#****#11#**id**#Postal / Zip Code#**label**#type_address#****#12#**id**#Country#**label**#type_address#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#7_street1form_id_temp#**id**#type_submit_reset_1#**label**#type_submit_reset#****#7_street2form_id_temp#**id**##**label**##****#7_cityform_id_temp#**id**#undefined#**label**#undefined#****#7_stateform_id_temp#**id**#undefined#**label**#undefined#****#7_postalform_id_temp#**id**#undefined#**label**#undefined#****#7_countryform_id_temp#**id**#undefined#**label**#undefined#****#', '2#**id**#First Name#**label**#type_text#****#3#**id**#Last Name#**label**#type_text#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#Phone#**label**#type_text#****#6#**id**#Website#**label**#type_text#****#7#**id**#Street Address#**label**#type_address#****#8#**id**#Street Address Line 2#**label**#type_address#****#9#**id**#City#**label**#type_address#****#10#**id**#State / Province / Region#**label**#type_address#****#11#**id**#Postal / Zip Code#**label**#type_address#****#12#**id**#Country#**label**#type_address#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', '0', 'testmode', '', '', '0', '2*:*id*:*type_text*:*type*:*First Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*3*:*id*:*type_text*:*type*:*Last Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*4*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*5*:*id*:*type_text*:*type*:*Phone*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*6*:*id*:*type_text*:*type*:*Website*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:*http://example.com*:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*7*:*id*:*type_address*:*type*:*Address*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Street Address***Street Address Line 2***City***State / Province / Region***Postal / Zip Code***Country*:*w_mini_labels*:*no***no***no***no***no***no***no*:*w_disabled_fields*:*no*:*w_required*:*wdform_address*:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', '1', '1', '*', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '0', '1', '', '', '', 'none', '0', '0');");
289
  $insert_form_id[] = $wpdb->insert_id;
290
  if ( WDFM()->is_free != 2 ) {
291
- $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `jsversion`) VALUES (NULL, 'Feedback Form', 'embedded', '', '<div class=\"wdform-page-and-images\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"false\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"3\" class=\"wdform_row\">%3 - Name%</div><div wdid=\"4\" class=\"wdform_row\">%4 - Email%</div><div wdid=\"5\" class=\"wdform_row\" style=\"position: relative; left: 0px; top: 0px;\">%5 - CMS%</div><div wdid=\"6\" class=\"wdform_row\">%6 - Extension%</div><div wdid=\"7\" class=\"wdform_row\">%7 - Plugin%</div><div wdid=\"2\" class=\"wdform_row\" style=\"position: relative; left: 0px; top: 0px;\">%2 - Subject%</div><div wdid=\"8\" class=\"wdform_row\">%8 - Message%</div><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', '3', '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}', '', '', '1', '%all%', '%all%', '9', '1', '3#**id**#Name#**label**#type_name#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#CMS#**label**#type_radio#****#6#**id**#Extension#**label**#type_own_select#****#7#**id**#Plugin#**label**#type_own_select#****#2#**id**#Subject#**label**#type_text#****#8#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#2_elementform_id_temp#**id**#Text#**label**#type_text#****#', '3#**id**#Name#**label**#type_name#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#CMS#**label**#type_radio#****#6#**id**#Extension#**label**#type_own_select#****#7#**id**#Plugin#**label**#type_own_select#****#2#**id**#Subject#**label**#type_text#****#8#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', '0', '0', '', 'USD', '0', '3*:*id*:*type_name*:*type*:*Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:***********:*w_first_val*:*First***Last*******:*w_title*:*Title*********Middle*:*w_mini_labels*:**:*w_size*:*normal*:*w_name_format*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no***no*:*w_name_fields*:*no*:*w_autofill*:**:*new_field*:*4*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*5*:*id*:*type_radio*:*type*:*CMS*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*hor*:*w_flow*:*Joomla!***Wordpress*:*w_choices*:*false***false*:*w_choices_checked*:*1*:*w_rowcol*:*yes*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Joomla!***Wordpress*:*w_choices_value*:*****:*w_choices_params*:**:*w_class*:**:*new_field*:*6*:*id*:*type_own_select*:*type*:*Extension*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Select extension***Form Maker***Gallery WD***Spider Calendar*:*w_choices*:*true***false***false***false*:*w_choices_checked*:*true***false***false***false*:*w_choices_disabled*:*yes*:*w_required*:*no*:*w_value_disabled*:****Form Maker***Gallery WD***Spider Calendar*:*w_choices_value*:***********:*w_choices_params*:*wdform_select*:*w_class*:**:*new_field*:*7*:*id*:*type_own_select*:*type*:*Plugin*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Select plugin***Form Maker***Photo Gallery***Ecommerce WD*:*w_choices*:*true***false***false***false*:*w_choices_checked*:*true***false***false***false*:*w_choices_disabled*:*yes*:*w_required*:*no*:*w_value_disabled*:****Form Maker***Photo Gallery***Ecommerce WD*:*w_choices_value*:***********:*w_choices_params*:*wdform_select*:*w_class*:**:*new_field*:*2*:*id*:*type_text*:*type*:*Subject*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*8*:*id*:*type_textarea*:*type*:*Message*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*true*:*w_act*:**:*new_field*:*', '1', '1', '*', '', '', '', '', '1', '', '', '', '', '1*:*show_hide*:*6*:*field_label*:*and*:*all_any*:*5***==***Joomla!*:*next_condition*:**:*new_condition*:*1*:*show_hide*:*7*:*field_label*:*and*:*all_any*:*5***==***Wordpress*:*next_condition*:**:*new_condition*:*', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '110', '1', 'Feedback Form', 'You may contact us by filling in this form any time you need professional support or have any questions. You can also fill in the form to leave your comments or feedback.', '" . WDFM()->plugin_url . "/images/demo/2.png', 'flash', '0', '0');");
292
  $insert_form_id[] = $wpdb->insert_id;
293
- $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `jsversion`) VALUES (NULL, 'Business Demographic Survey', 'embedded', '', '<div class=\"wdform-page-and-images\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"false\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - What is your employment status?%</div><div wdid=\"3\" class=\"wdform_row\">%3 - What is your level of education?%</div><div wdid=\"4\" class=\"wdform_row\">%4 - In which industry do you work?%</div><div wdid=\"6\" class=\"wdform_row\">%6 - What is the annual revenue of your company?%</div><div wdid=\"5\" class=\"wdform_row\">%5 - Enter characters for verification.%</div><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', '4', '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}', '', '', '1', '%all%', '%all%', '7', '1', '2#**id**#What is your employment status?#**label**#type_radio#****#3#**id**#What is your level of education?#**label**#type_radio#****#4#**id**#In which industry do you work?#**label**#type_own_select#****#6#**id**#What is the annual revenue of your company?#**label**#type_radio#****#5#**id**#Enter characters for verification.#**label**#type_captcha#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#6_elementform_id_temp0#**id**#What is your employment status?#**label**#type_radio#****#6_elementform_id_temp1#**id**#What is your level of education?#**label**#type_radio#****#6_elementform_id_temp2#**id**#In which industry do you work?#**label**#type_own_select#****#6_elementform_id_temp3#**id**#Enter characters for verification.#**label**#type_captcha#****#6_elementform_id_temp4#**id**#type_submit_reset_1#**label**#type_submit_reset#****#6_elementform_id_temp5#**id**#type_submit_reset_1#**label**#type_submit_reset#****#6_elementform_id_temp6#**id**##**label**##****#6_elementform_id_temp7#**id**#undefined#**label**#undefined#****#6_elementform_id_temp8#**id**#undefined#**label**#undefined#****#6_elementform_id_temp9#**id**#undefined#**label**#undefined#****#6_elementform_id_temp10#**id**#undefined#**label**#undefined#****#6_elementform_id_temp11#**id**#undefined#**label**#undefined#****#6_elementform_id_temp12#**id**#undefined#**label**#undefined#****#6_elementform_id_temp13#**id**#undefined#**label**#undefined#****#6_elementform_id_temp14#**id**#undefined#**label**#undefined#****#6_elementform_id_temp15#**id**#undefined#**label**#undefined#****#6_elementform_id_temp16#**id**#undefined#**label**#undefined#****#6_elementform_id_temp17#**id**#undefined#**label**#undefined#****#6_elementform_id_temp18#**id**#undefined#**label**#undefined#****#6_elementform_id_temp19#**id**#undefined#**label**#undefined#****#6_elementform_id_temp20#**id**#undefined#**label**#undefined#****#6_elementform_id_temp21#**id**#undefined#**label**#undefined#****#6_elementform_id_temp22#**id**#undefined#**label**#undefined#****#6_elementform_id_temp23#**id**#undefined#**label**#undefined#****#6_elementform_id_temp24#**id**#undefined#**label**#undefined#****#6_elementform_id_temp25#**id**#undefined#**label**#undefined#****#6_elementform_id_temp26#**id**#undefined#**label**#undefined#****#6_elementform_id_temp27#**id**#undefined#**label**#undefined#****#6_elementform_id_temp28#**id**#undefined#**label**#undefined#****#6_elementform_id_temp29#**id**#undefined#**label**#undefined#****#6_elementform_id_temp30#**id**#undefined#**label**#undefined#****#6_elementform_id_temp31#**id**#undefined#**label**#undefined#****#6_elementform_id_temp32#**id**#undefined#**label**#undefined#****#6_elementform_id_temp33#**id**#undefined#**label**#undefined#****#6_elementform_id_temp34#**id**#undefined#**label**#undefined#****#6_elementform_id_temp35#**id**#undefined#**label**#undefined#****#6_elementform_id_temp36#**id**#undefined#**label**#undefined#****#6_elementform_id_temp37#**id**#undefined#**label**#undefined#****#6_elementform_id_temp38#**id**#undefined#**label**#undefined#****#6_elementform_id_temp39#**id**#undefined#**label**#undefined#****#6_elementform_id_temp40#**id**#undefined#**label**#undefined#****#6_elementform_id_temp41#**id**#undefined#**label**#undefined#****#6_elementform_id_temp42#**id**#undefined#**label**#undefined#****#6_elementform_id_temp43#**id**#undefined#**label**#undefined#****#6_elementform_id_temp44#**id**#undefined#**label**#undefined#****#6_elementform_id_temp45#**id**#undefined#**label**#undefined#****#6_elementform_id_temp46#**id**#undefined#**label**#undefined#****#6_elementform_id_temp47#**id**#undefined#**label**#undefined#****#6_elementform_id_temp48#**id**#undefined#**label**#undefined#****#6_elementform_id_temp49#**id**#undefined#**label**#undefined#****#', '2#**id**#What is your employment status?#**label**#type_radio#****#3#**id**#What is your level of education?#**label**#type_radio#****#4#**id**#In which industry do you work?#**label**#type_own_select#****#6#**id**#What is the annual revenue of your company?#**label**#type_radio#****#5#**id**#Enter characters for verification.#**label**#type_captcha#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', '0', 'testmode', '', '', '0', '2*:*id*:*type_radio*:*type*:*What is your employment status?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Employed full time***Trade or Vocational degree***Not employed, but looking for work***Not employed and not looking for work***Retired***Student***Homemaker***Prefer not to answer*:*w_choices*:*false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Employed full time***Trade or Vocational degree***Not employed, but looking for work***Not employed and not looking for work***Retired***Student***Homemaker***Prefer not to answer*:*w_choices_value*:***********************:*w_choices_params*:**:*w_class*:**:*new_field*:*3*:*id*:*type_radio*:*type*:*What is your level of education?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Some high school***High school graduate or equivalent***Trade or Vocational Degree***Some college***Associate degree***Bachelor\'s degree***Graduate or Professional degree***Prefer not to answer*:*w_choices*:*false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Some high school***High school graduate or equivalent***Trade or Vocational Degree***Some college***Associate degree***Bachelor\'s degree***Graduate or Professional degree***Prefer not to answer*:*w_choices_value*:***********************:*w_choices_params*:**:*w_class*:**:*new_field*:*4*:*id*:*type_own_select*:*type*:*In which industry do you work?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Select industry***Agriculture***Engineering***Information Technologies***Media***Local Business*:*w_choices*:*true***false***false***false***false***false*:*w_choices_checked*:*true***false***false***false***false***false*:*w_choices_disabled*:*no*:*w_required*:*no*:*w_value_disabled*:****Agriculture***Engineering***Information Technologies***Media***Local Business*:*w_choices_value*:*****************:*w_choices_params*:*wdform_select*:*w_class*:**:*new_field*:*6*:*id*:*type_radio*:*type*:*What is the annual revenue of your company?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Under $10,000***$10,001 to $50,000***$50,001 to $100,000***$100,001 to $500,000***$500,001 to $1 Million***$1 Million to $10 Million***$10 Million to $50 Million***$50 Million to $100 Million***Over $100 Million*:*w_choices*:*false***false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Under $10,000***$10,001 to $50,000***$50,001 to $100,000***$100,001 to $500,000***$500,001 to $1 Million***$1 Million to $10 Million***$10 Million to $50 Million***$50 Million to $100 Million***Over $100 Million*:*w_choices_value*:**************************:*w_choices_params*:**:*w_class*:**:*new_field*:*5*:*id*:*type_captcha*:*type*:*Enter characters for verification.*:*w_field_label*:**:*w_field_label_size*:*left*:*w_field_label_pos*:*yes*:*w_hide_label*:*6*:*w_digit*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', '1', '1', '*', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '0', '1', 'Business Demographic Survey', 'Thank you for joining our business demographic survey. Please give us your feedback by filling in the information bellow.', '', 'none', '1', '0');");
294
  $insert_form_id[] = $wpdb->insert_id;
295
- $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `jsversion`) VALUES (NULL, 'Cupcake Order Form', 'embedded', '', '<div class=\"wdform-page-and-images\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"false\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - Name%</div><div wdid=\"3\" class=\"wdform_row\">%3 - Email%</div><div wdid=\"4\" class=\"wdform_row\">%4 - Date%</div><div wdid=\"5\" class=\"wdform_row\">%5 - Cupcakes Flavors (1 doz. minimum)%</div><div wdid=\"6\" class=\"wdform_row\">%6 - Quantity%</div><div wdid=\"7\" class=\"wdform_row\">%7 - Details (if any)%</div><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', '6', '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}', '', '', '1', '%all%', '%all%', '8', '1', '2#**id**#Name#**label**#type_name#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Date#**label**#type_date_new#****#5#**id**#Cupcakes Flavors (1 doz. minimum)#**label**#type_radio#****#6#**id**#Quantity#**label**#type_spinner#****#7#**id**#Details (if any)#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp0#**id**#Name#**label**#type_name#****#5_elementform_id_temp1#**id**#Email#**label**#type_submitter_mail#****#5_elementform_id_temp2#**id**#Date#**label**#type_date_new#****#5_elementform_id_temp3#**id**#Name:* Email:* Date* Cupcakes Flavors (1 doz. minimum)#**label**#type_radio#****#5_elementform_id_temp4#**id**#Quantity#**label**#type_spinner#****#5_elementform_id_temp5#**id**#Details (if any)#**label**#type_textarea#****#5_elementform_id_temp6#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp7#**id**#Name#**label**#type_name#****#5_elementform_id_temp8#**id**#Email#**label**#type_submitter_mail#****#5_elementform_id_temp9#**id**#Date#**label**#type_date_new#****#5_elementform_id_temp10#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp11#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp12#**id**#undefined#**label**#undefined#****#5_elementform_id_temp13#**id**#undefined#**label**#undefined#****#5_elementform_id_temp14#**id**#undefined#**label**#undefined#****#5_elementform_id_temp15#**id**#undefined#**label**#undefined#****#5_elementform_id_temp16#**id**#undefined#**label**#undefined#****#5_elementform_id_temp17#**id**#undefined#**label**#undefined#****#5_elementform_id_temp18#**id**#undefined#**label**#undefined#****#5_elementform_id_temp19#**id**#undefined#**label**#undefined#****#5_elementform_id_temp20#**id**#undefined#**label**#undefined#****#5_elementform_id_temp21#**id**#undefined#**label**#undefined#****#5_elementform_id_temp22#**id**#undefined#**label**#undefined#****#5_elementform_id_temp23#**id**#undefined#**label**#undefined#****#5_elementform_id_temp24#**id**#undefined#**label**#undefined#****#5_elementform_id_temp25#**id**#undefined#**label**#undefined#****#5_elementform_id_temp26#**id**#undefined#**label**#undefined#****#5_elementform_id_temp27#**id**#undefined#**label**#undefined#****#5_elementform_id_temp28#**id**#undefined#**label**#undefined#****#5_elementform_id_temp29#**id**#undefined#**label**#undefined#****#5_elementform_id_temp30#**id**#undefined#**label**#undefined#****#5_elementform_id_temp31#**id**#undefined#**label**#undefined#****#5_elementform_id_temp32#**id**#undefined#**label**#undefined#****#5_elementform_id_temp33#**id**#undefined#**label**#undefined#****#5_elementform_id_temp34#**id**#undefined#**label**#undefined#****#5_elementform_id_temp35#**id**#undefined#**label**#undefined#****#5_elementform_id_temp36#**id**#undefined#**label**#undefined#****#5_elementform_id_temp37#**id**#undefined#**label**#undefined#****#5_elementform_id_temp38#**id**#undefined#**label**#undefined#****#5_elementform_id_temp39#**id**#undefined#**label**#undefined#****#5_elementform_id_temp40#**id**#undefined#**label**#undefined#****#5_elementform_id_temp41#**id**#undefined#**label**#undefined#****#5_elementform_id_temp42#**id**#undefined#**label**#undefined#****#5_elementform_id_temp43#**id**#undefined#**label**#undefined#****#5_elementform_id_temp44#**id**#undefined#**label**#undefined#****#5_elementform_id_temp45#**id**#undefined#**label**#undefined#****#5_elementform_id_temp46#**id**#undefined#**label**#undefined#****#5_elementform_id_temp47#**id**#undefined#**label**#undefined#****#5_elementform_id_temp48#**id**#undefined#**label**#undefined#****#5_elementform_id_temp49#**id**#undefined#**label**#undefined#****#', '2#**id**#Name#**label**#type_name#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Date#**label**#type_date_new#****#5#**id**#Cupcakes Flavors (1 doz. minimum)#**label**#type_radio#****#6#**id**#Quantity#**label**#type_spinner#****#7#**id**#Details (if any)#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', '0', 'testmode', '', '', '0', '2*:*id*:*type_name*:*type*:*Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:***********:*w_first_val*:***********:*w_title*:*Title*********Middle*:*w_mini_labels*:**:*w_size*:*normal*:*w_name_format*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no***no*:*w_name_fields*:*no*:*w_autofill*:**:*new_field*:*3*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*4*:*id*:*type_date_new*:*type*:*Date*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_date*:*yes*:*w_required*:*yes*:*w_show_image*:**:*w_class*:*mm/dd/yy*:*w_format*:*0*:*w_start_day*:**:*w_default_date*:**:*w_min_date*:**:*w_max_date*:**:*w_invalid_dates*:*yes***yes***yes***yes***yes***yes***yes*:*w_show_days*:*yes*:*w_hide_time*:*...*:*w_but_val*:*no*:*w_disable_past_days*:**:*new_field*:*5*:*id*:*type_radio*:*type*:*Cupcakes Flavors (1 doz. minimum)*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Red Velvet***Vanilla***Chocolate***Guinness***Coconut***Lemon***Chocolate Mint*:*w_choices*:*false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Red Velvet***Vanilla***Chocolate***Guinness***Coconut***Lemon***Chocolate Mint*:*w_choices_value*:********************:*w_choices_params*:**:*w_class*:**:*new_field*:*6*:*id*:*type_spinner*:*type*:*Quantity*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:*60*:*w_field_width*:**:*w_field_min_value*:**:*w_field_max_value*:*1*:*w_field_step*:*null*:*w_field_value*:*no*:*w_required*:**:*w_class*:**:*new_field*:*7*:*id*:*type_textarea*:*type*:*Details (if any)*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', '1', '1', '*', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '0', '1', 'Cupcake Order Form', '', '', 'none', '1', '0');");
296
  $insert_form_id[] = $wpdb->insert_id;
297
  }
298
  else {
109
  ) " . $charset_collate . ";";
110
  $wpdb->query($formmaker_display_options);
111
 
112
+ $formmaker_groups = "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "formmaker_groups` (
113
+ `id` int(11) NOT NULL AUTO_INCREMENT,
114
+ PRIMARY KEY (`id`)
115
+ ) " . $charset_collate . ";";
116
+ $wpdb->query($formmaker_groups);
117
+
118
  $formmaker_submits = "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "formmaker_submits` (
119
  `id` int(11) NOT NULL AUTO_INCREMENT,
120
  `form_id` int(11) NOT NULL,
289
  $form_maker_row = $wpdb->get_var('SELECT * FROM ' . $wpdb->prefix . 'formmaker' . (!WDFM()->is_free ? '' : ' WHERE id' . (WDFM()->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')'));
290
  if ( !$form_maker_row ) {
291
  $insert_form_id = array();
292
+ $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `jsversion`) VALUES (NULL, 'Contact Us', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"false\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - Name%</div><div wdid=\"3\" class=\"wdform_row\">%3 - Email%</div><div wdid=\"4\" class=\"wdform_row\">%4 - Subject%</div><div wdid=\"5\" class=\"wdform_row\">%5 - Message%</div><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', '1', '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}', '', '', '1', '{all}', '{all}', '6', '1', '2#**id**#Name#**label**#type_text#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Subject#**label**#type_text#****#5#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#2_elementform_id_temp#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '2#**id**#Name#**label**#type_text#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Subject#**label**#type_text#****#5#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', '0', 'testmode', '', '', '0', '2*:*id*:*type_text*:*type*:*Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*3*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*4*:*id*:*type_text*:*type*:*Subject*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*5*:*id*:*type_textarea*:*type*:*Message*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', '1', '1', '*', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '0', '1', 'Contact Us', 'You may contact us by filling in this form any time you need professional support or have any questions. You can also fill in the form to leave your comments or feedback.', '', 'none', '0', '0');");
293
  $insert_form_id[] = $wpdb->insert_id;
294
+ $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `jsversion`) VALUES (NULL, 'Client List Form', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"false\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - First Name%</div><div wdid=\"3\" class=\"wdform_row\">%3 - Last Name%</div><div wdid=\"4\" class=\"wdform_row\">%4 - Email%</div><div wdid=\"5\" class=\"wdform_row\">%5 - Phone%</div><div wdid=\"6\" class=\"wdform_row\">%6 - Website%</div><div wdid=\"7\" class=\"wdform_row\">%7 - Address%</div><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', '1', '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}', '', '', '1', '{all}', '{all}', '13', '1', '2#**id**#First Name#**label**#type_text#****#3#**id**#Last Name#**label**#type_text#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#Phone#**label**#type_text#****#6#**id**#Website#**label**#type_text#****#7#**id**#Street Address#**label**#type_address#****#8#**id**#Street Address Line 2#**label**#type_address#****#9#**id**#City#**label**#type_address#****#10#**id**#State / Province / Region#**label**#type_address#****#11#**id**#Postal / Zip Code#**label**#type_address#****#12#**id**#Country#**label**#type_address#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#7_street1form_id_temp#**id**#type_submit_reset_1#**label**#type_submit_reset#****#7_street2form_id_temp#**id**##**label**##****#7_cityform_id_temp#**id**#undefined#**label**#undefined#****#7_stateform_id_temp#**id**#undefined#**label**#undefined#****#7_postalform_id_temp#**id**#undefined#**label**#undefined#****#7_countryform_id_temp#**id**#undefined#**label**#undefined#****#', '2#**id**#First Name#**label**#type_text#****#3#**id**#Last Name#**label**#type_text#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#Phone#**label**#type_text#****#6#**id**#Website#**label**#type_text#****#7#**id**#Street Address#**label**#type_address#****#8#**id**#Street Address Line 2#**label**#type_address#****#9#**id**#City#**label**#type_address#****#10#**id**#State / Province / Region#**label**#type_address#****#11#**id**#Postal / Zip Code#**label**#type_address#****#12#**id**#Country#**label**#type_address#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', '0', 'testmode', '', '', '0', '2*:*id*:*type_text*:*type*:*First Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*3*:*id*:*type_text*:*type*:*Last Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*4*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*5*:*id*:*type_text*:*type*:*Phone*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*6*:*id*:*type_text*:*type*:*Website*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:*http://example.com*:*w_title*:*no*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*7*:*id*:*type_address*:*type*:*Address*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Street Address***Street Address Line 2***City***State / Province / Region***Postal / Zip Code***Country*:*w_mini_labels*:*no***no***no***no***no***no***no*:*w_disabled_fields*:*no*:*w_required*:*wdform_address*:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', '1', '1', '*', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '0', '1', '', '', '', 'none', '0', '0');");
295
  $insert_form_id[] = $wpdb->insert_id;
296
  if ( WDFM()->is_free != 2 ) {
297
+ $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `jsversion`) VALUES (NULL, 'Feedback Form', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"false\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"3\" class=\"wdform_row\">%3 - Name%</div><div wdid=\"4\" class=\"wdform_row\">%4 - Email%</div><div wdid=\"5\" class=\"wdform_row\" style=\"position: relative; left: 0px; top: 0px;\">%5 - CMS%</div><div wdid=\"6\" class=\"wdform_row\">%6 - Extension%</div><div wdid=\"7\" class=\"wdform_row\">%7 - Plugin%</div><div wdid=\"2\" class=\"wdform_row\" style=\"position: relative; left: 0px; top: 0px;\">%2 - Subject%</div><div wdid=\"8\" class=\"wdform_row\">%8 - Message%</div><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', '3', '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}', '', '', '1', '{all}', '{all}', '9', '1', '3#**id**#Name#**label**#type_name#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#CMS#**label**#type_radio#****#6#**id**#Extension#**label**#type_own_select#****#7#**id**#Plugin#**label**#type_own_select#****#2#**id**#Subject#**label**#type_text#****#8#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#2_elementform_id_temp#**id**#Text#**label**#type_text#****#', '3#**id**#Name#**label**#type_name#****#4#**id**#Email#**label**#type_submitter_mail#****#5#**id**#CMS#**label**#type_radio#****#6#**id**#Extension#**label**#type_own_select#****#7#**id**#Plugin#**label**#type_own_select#****#2#**id**#Subject#**label**#type_text#****#8#**id**#Message#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', '0', '0', '', 'USD', '0', '3*:*id*:*type_name*:*type*:*Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:***********:*w_first_val*:*First***Last*******:*w_title*:*Title*********Middle*:*w_mini_labels*:**:*w_size*:*normal*:*w_name_format*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no***no*:*w_name_fields*:*no*:*w_autofill*:**:*new_field*:*4*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*5*:*id*:*type_radio*:*type*:*CMS*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*hor*:*w_flow*:*Joomla!***Wordpress*:*w_choices*:*false***false*:*w_choices_checked*:*1*:*w_rowcol*:*yes*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Joomla!***Wordpress*:*w_choices_value*:*****:*w_choices_params*:**:*w_class*:**:*new_field*:*6*:*id*:*type_own_select*:*type*:*Extension*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Select extension***Form Maker***Gallery WD***Spider Calendar*:*w_choices*:*true***false***false***false*:*w_choices_checked*:*true***false***false***false*:*w_choices_disabled*:*yes*:*w_required*:*no*:*w_value_disabled*:****Form Maker***Gallery WD***Spider Calendar*:*w_choices_value*:***********:*w_choices_params*:*wdform_select*:*w_class*:**:*new_field*:*7*:*id*:*type_own_select*:*type*:*Plugin*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Select plugin***Form Maker***Photo Gallery***Ecommerce WD*:*w_choices*:*true***false***false***false*:*w_choices_checked*:*true***false***false***false*:*w_choices_disabled*:*yes*:*w_required*:*no*:*w_value_disabled*:****Form Maker***Photo Gallery***Ecommerce WD*:*w_choices_value*:***********:*w_choices_params*:*wdform_select*:*w_class*:**:*new_field*:*2*:*id*:*type_text*:*type*:*Subject*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_regExp_status*:**:*w_regExp_value*:**:*w_regExp_common*:**:*w_regExp_arg*:*Incorrect Value*:*w_regExp_alert*:*no*:*w_unique*:*no*:*w_readonly*:**:*new_field*:*8*:*id*:*type_textarea*:*type*:*Message*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*true*:*w_act*:**:*new_field*:*', '1', '1', '*', '', '', '', '', '1', '', '', '', '', '1*:*show_hide*:*6*:*field_label*:*and*:*all_any*:*5***==***Joomla!*:*next_condition*:**:*new_condition*:*1*:*show_hide*:*7*:*field_label*:*and*:*all_any*:*5***==***Wordpress*:*next_condition*:**:*new_condition*:*', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '110', '1', 'Feedback Form', 'You may contact us by filling in this form any time you need professional support or have any questions. You can also fill in the form to leave your comments or feedback.', '" . WDFM()->plugin_url . "/images/demo/2.png', 'flash', '0', '0');");
298
  $insert_form_id[] = $wpdb->insert_id;
299
+ $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `jsversion`) VALUES (NULL, 'Business Demographic Survey', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"false\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - What is your employment status?%</div><div wdid=\"3\" class=\"wdform_row\">%3 - What is your level of education?%</div><div wdid=\"4\" class=\"wdform_row\">%4 - In which industry do you work?%</div><div wdid=\"6\" class=\"wdform_row\">%6 - What is the annual revenue of your company?%</div><div wdid=\"5\" class=\"wdform_row\">%5 - Enter characters for verification.%</div><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', '4', '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}', '', '', '1', '{all}', '{all}', '7', '1', '2#**id**#What is your employment status?#**label**#type_radio#****#3#**id**#What is your level of education?#**label**#type_radio#****#4#**id**#In which industry do you work?#**label**#type_own_select#****#6#**id**#What is the annual revenue of your company?#**label**#type_radio#****#5#**id**#Enter characters for verification.#**label**#type_captcha#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#6_elementform_id_temp0#**id**#What is your employment status?#**label**#type_radio#****#6_elementform_id_temp1#**id**#What is your level of education?#**label**#type_radio#****#6_elementform_id_temp2#**id**#In which industry do you work?#**label**#type_own_select#****#6_elementform_id_temp3#**id**#Enter characters for verification.#**label**#type_captcha#****#6_elementform_id_temp4#**id**#type_submit_reset_1#**label**#type_submit_reset#****#6_elementform_id_temp5#**id**#type_submit_reset_1#**label**#type_submit_reset#****#6_elementform_id_temp6#**id**##**label**##****#6_elementform_id_temp7#**id**#undefined#**label**#undefined#****#6_elementform_id_temp8#**id**#undefined#**label**#undefined#****#6_elementform_id_temp9#**id**#undefined#**label**#undefined#****#6_elementform_id_temp10#**id**#undefined#**label**#undefined#****#6_elementform_id_temp11#**id**#undefined#**label**#undefined#****#6_elementform_id_temp12#**id**#undefined#**label**#undefined#****#6_elementform_id_temp13#**id**#undefined#**label**#undefined#****#6_elementform_id_temp14#**id**#undefined#**label**#undefined#****#6_elementform_id_temp15#**id**#undefined#**label**#undefined#****#6_elementform_id_temp16#**id**#undefined#**label**#undefined#****#6_elementform_id_temp17#**id**#undefined#**label**#undefined#****#6_elementform_id_temp18#**id**#undefined#**label**#undefined#****#6_elementform_id_temp19#**id**#undefined#**label**#undefined#****#6_elementform_id_temp20#**id**#undefined#**label**#undefined#****#6_elementform_id_temp21#**id**#undefined#**label**#undefined#****#6_elementform_id_temp22#**id**#undefined#**label**#undefined#****#6_elementform_id_temp23#**id**#undefined#**label**#undefined#****#6_elementform_id_temp24#**id**#undefined#**label**#undefined#****#6_elementform_id_temp25#**id**#undefined#**label**#undefined#****#6_elementform_id_temp26#**id**#undefined#**label**#undefined#****#6_elementform_id_temp27#**id**#undefined#**label**#undefined#****#6_elementform_id_temp28#**id**#undefined#**label**#undefined#****#6_elementform_id_temp29#**id**#undefined#**label**#undefined#****#6_elementform_id_temp30#**id**#undefined#**label**#undefined#****#6_elementform_id_temp31#**id**#undefined#**label**#undefined#****#6_elementform_id_temp32#**id**#undefined#**label**#undefined#****#6_elementform_id_temp33#**id**#undefined#**label**#undefined#****#6_elementform_id_temp34#**id**#undefined#**label**#undefined#****#6_elementform_id_temp35#**id**#undefined#**label**#undefined#****#6_elementform_id_temp36#**id**#undefined#**label**#undefined#****#6_elementform_id_temp37#**id**#undefined#**label**#undefined#****#6_elementform_id_temp38#**id**#undefined#**label**#undefined#****#6_elementform_id_temp39#**id**#undefined#**label**#undefined#****#6_elementform_id_temp40#**id**#undefined#**label**#undefined#****#6_elementform_id_temp41#**id**#undefined#**label**#undefined#****#6_elementform_id_temp42#**id**#undefined#**label**#undefined#****#6_elementform_id_temp43#**id**#undefined#**label**#undefined#****#6_elementform_id_temp44#**id**#undefined#**label**#undefined#****#6_elementform_id_temp45#**id**#undefined#**label**#undefined#****#6_elementform_id_temp46#**id**#undefined#**label**#undefined#****#6_elementform_id_temp47#**id**#undefined#**label**#undefined#****#6_elementform_id_temp48#**id**#undefined#**label**#undefined#****#6_elementform_id_temp49#**id**#undefined#**label**#undefined#****#', '2#**id**#What is your employment status?#**label**#type_radio#****#3#**id**#What is your level of education?#**label**#type_radio#****#4#**id**#In which industry do you work?#**label**#type_own_select#****#6#**id**#What is the annual revenue of your company?#**label**#type_radio#****#5#**id**#Enter characters for verification.#**label**#type_captcha#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', '0', 'testmode', '', '', '0', '2*:*id*:*type_radio*:*type*:*What is your employment status?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Employed full time***Trade or Vocational degree***Not employed, but looking for work***Not employed and not looking for work***Retired***Student***Homemaker***Prefer not to answer*:*w_choices*:*false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Employed full time***Trade or Vocational degree***Not employed, but looking for work***Not employed and not looking for work***Retired***Student***Homemaker***Prefer not to answer*:*w_choices_value*:***********************:*w_choices_params*:**:*w_class*:**:*new_field*:*3*:*id*:*type_radio*:*type*:*What is your level of education?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Some high school***High school graduate or equivalent***Trade or Vocational Degree***Some college***Associate degree***Bachelor\'s degree***Graduate or Professional degree***Prefer not to answer*:*w_choices*:*false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Some high school***High school graduate or equivalent***Trade or Vocational Degree***Some college***Associate degree***Bachelor\'s degree***Graduate or Professional degree***Prefer not to answer*:*w_choices_value*:***********************:*w_choices_params*:**:*w_class*:**:*new_field*:*4*:*id*:*type_own_select*:*type*:*In which industry do you work?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:*Select industry***Agriculture***Engineering***Information Technologies***Media***Local Business*:*w_choices*:*true***false***false***false***false***false*:*w_choices_checked*:*true***false***false***false***false***false*:*w_choices_disabled*:*no*:*w_required*:*no*:*w_value_disabled*:****Agriculture***Engineering***Information Technologies***Media***Local Business*:*w_choices_value*:*****************:*w_choices_params*:*wdform_select*:*w_class*:**:*new_field*:*6*:*id*:*type_radio*:*type*:*What is the annual revenue of your company?*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Under $10,000***$10,001 to $50,000***$50,001 to $100,000***$100,001 to $500,000***$500,001 to $1 Million***$1 Million to $10 Million***$10 Million to $50 Million***$50 Million to $100 Million***Over $100 Million*:*w_choices*:*false***false***false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Under $10,000***$10,001 to $50,000***$50,001 to $100,000***$100,001 to $500,000***$500,001 to $1 Million***$1 Million to $10 Million***$10 Million to $50 Million***$50 Million to $100 Million***Over $100 Million*:*w_choices_value*:**************************:*w_choices_params*:**:*w_class*:**:*new_field*:*5*:*id*:*type_captcha*:*type*:*Enter characters for verification.*:*w_field_label*:**:*w_field_label_size*:*left*:*w_field_label_pos*:*yes*:*w_hide_label*:*6*:*w_digit*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', '1', '1', '*', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '0', '1', 'Business Demographic Survey', 'Thank you for joining our business demographic survey. Please give us your feedback by filling in the information bellow.', '', 'none', '1', '0');");
300
  $insert_form_id[] = $wpdb->insert_id;
301
+ $wpdb->query("INSERT INTO `" . $wpdb->prefix . "formmaker` (`id`, `title`, `type`, `mail`, `form_front`, `theme`, `javascript`, `submit_text`, `url`, `submit_text_type`, `script_mail`, `script_mail_user`, `counter`, `published`, `label_order`, `label_order_current`, `article_id`, `pagination`, `show_title`, `show_numbers`, `public_key`, `private_key`, `recaptcha_theme`, `paypal_mode`, `checkout_mode`, `paypal_email`, `payment_currency`, `tax`, `form_fields`, `savedb`, `sendemail`, `requiredmark`, `from_mail`, `from_name`, `reply_to`, `send_to`, `autogen_layout`, `custom_front`, `mail_from_user`, `mail_from_name_user`, `reply_to_user`, `condition`, `mail_cc`, `mail_cc_user`, `mail_bcc`, `mail_bcc_user`, `mail_subject`, `mail_subject_user`, `mail_mode`, `mail_mode_user`, `mail_attachment`, `mail_attachment_user`, `user_id_wd`, `sortable`, `frontend_submit_fields`, `frontend_submit_stat_fields`, `mail_emptyfields`, `mail_verify`, `mail_verify_expiretime`, `mail_verification_post_id`, `save_uploads`, `header_title`, `header_description`, `header_image_url`, `header_image_animation`, `header_hide_image`, `jsversion`) VALUES (NULL, 'Cupcake Order Form', 'embedded', '{adminemail}', '<div class=\"wdform-page-and-images\"><div id=\"form_id_tempform_view1\" class=\"wdform_page\" page_title=\"Untitled page\" next_title=\"Next\" next_type=\"text\" next_class=\"wdform-page-button\" next_checkable=\"false\" previous_title=\"Previous\" previous_type=\"text\" previous_class=\"wdform-page-button\" previous_checkable=\"false\"><div class=\"wdform_section\"><div class=\"wdform_column\"><div wdid=\"2\" class=\"wdform_row\">%2 - Name%</div><div wdid=\"3\" class=\"wdform_row\">%3 - Email%</div><div wdid=\"4\" class=\"wdform_row\">%4 - Date%</div><div wdid=\"5\" class=\"wdform_row\">%5 - Cupcakes Flavors (1 doz. minimum)%</div><div wdid=\"6\" class=\"wdform_row\">%6 - Quantity%</div><div wdid=\"7\" class=\"wdform_row\">%7 - Details (if any)%</div><div wdid=\"1\" class=\"wdform_row\">%1 - type_submit_reset_1%</div></div></div><div valign=\"top\" class=\"wdform_footer wd-width-100\"><div class=\"wd-width-100\"><div class=\"wd-width-100 wd-table\" style=\"padding-top:10px;\"><div class=\"wd-table-group\"><div id=\"form_id_temppage_nav1\" class=\"wd-table-row\"></div></div></div></div></div></div></div>', '6', '// Occurs before the form is loaded\r\nfunction before_load() { \r\n} \r\n// Occurs just before submitting the form\r\nfunction before_submit() {\r\n // IMPORTANT! If you want to interrupt (stop) the submitting of the form, this function should return true. You don\'t need to return any value if you don\'t want to stop the submission.\r\n} \r\n// Occurs just before resetting the form\r\nfunction before_reset() { \r\n}', '', '', '1', '{all}', '{all}', '8', '1', '2#**id**#Name#**label**#type_name#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Date#**label**#type_date_new#****#5#**id**#Cupcakes Flavors (1 doz. minimum)#**label**#type_radio#****#6#**id**#Quantity#**label**#type_spinner#****#7#**id**#Details (if any)#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp0#**id**#Name#**label**#type_name#****#5_elementform_id_temp1#**id**#Email#**label**#type_submitter_mail#****#5_elementform_id_temp2#**id**#Date#**label**#type_date_new#****#5_elementform_id_temp3#**id**#Name:* Email:* Date* Cupcakes Flavors (1 doz. minimum)#**label**#type_radio#****#5_elementform_id_temp4#**id**#Quantity#**label**#type_spinner#****#5_elementform_id_temp5#**id**#Details (if any)#**label**#type_textarea#****#5_elementform_id_temp6#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp7#**id**#Name#**label**#type_name#****#5_elementform_id_temp8#**id**#Email#**label**#type_submitter_mail#****#5_elementform_id_temp9#**id**#Date#**label**#type_date_new#****#5_elementform_id_temp10#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp11#**id**#type_submit_reset_1#**label**#type_submit_reset#****#5_elementform_id_temp12#**id**#undefined#**label**#undefined#****#5_elementform_id_temp13#**id**#undefined#**label**#undefined#****#5_elementform_id_temp14#**id**#undefined#**label**#undefined#****#5_elementform_id_temp15#**id**#undefined#**label**#undefined#****#5_elementform_id_temp16#**id**#undefined#**label**#undefined#****#5_elementform_id_temp17#**id**#undefined#**label**#undefined#****#5_elementform_id_temp18#**id**#undefined#**label**#undefined#****#5_elementform_id_temp19#**id**#undefined#**label**#undefined#****#5_elementform_id_temp20#**id**#undefined#**label**#undefined#****#5_elementform_id_temp21#**id**#undefined#**label**#undefined#****#5_elementform_id_temp22#**id**#undefined#**label**#undefined#****#5_elementform_id_temp23#**id**#undefined#**label**#undefined#****#5_elementform_id_temp24#**id**#undefined#**label**#undefined#****#5_elementform_id_temp25#**id**#undefined#**label**#undefined#****#5_elementform_id_temp26#**id**#undefined#**label**#undefined#****#5_elementform_id_temp27#**id**#undefined#**label**#undefined#****#5_elementform_id_temp28#**id**#undefined#**label**#undefined#****#5_elementform_id_temp29#**id**#undefined#**label**#undefined#****#5_elementform_id_temp30#**id**#undefined#**label**#undefined#****#5_elementform_id_temp31#**id**#undefined#**label**#undefined#****#5_elementform_id_temp32#**id**#undefined#**label**#undefined#****#5_elementform_id_temp33#**id**#undefined#**label**#undefined#****#5_elementform_id_temp34#**id**#undefined#**label**#undefined#****#5_elementform_id_temp35#**id**#undefined#**label**#undefined#****#5_elementform_id_temp36#**id**#undefined#**label**#undefined#****#5_elementform_id_temp37#**id**#undefined#**label**#undefined#****#5_elementform_id_temp38#**id**#undefined#**label**#undefined#****#5_elementform_id_temp39#**id**#undefined#**label**#undefined#****#5_elementform_id_temp40#**id**#undefined#**label**#undefined#****#5_elementform_id_temp41#**id**#undefined#**label**#undefined#****#5_elementform_id_temp42#**id**#undefined#**label**#undefined#****#5_elementform_id_temp43#**id**#undefined#**label**#undefined#****#5_elementform_id_temp44#**id**#undefined#**label**#undefined#****#5_elementform_id_temp45#**id**#undefined#**label**#undefined#****#5_elementform_id_temp46#**id**#undefined#**label**#undefined#****#5_elementform_id_temp47#**id**#undefined#**label**#undefined#****#5_elementform_id_temp48#**id**#undefined#**label**#undefined#****#5_elementform_id_temp49#**id**#undefined#**label**#undefined#****#', '2#**id**#Name#**label**#type_name#****#3#**id**#Email#**label**#type_submitter_mail#****#4#**id**#Date#**label**#type_date_new#****#5#**id**#Cupcakes Flavors (1 doz. minimum)#**label**#type_radio#****#6#**id**#Quantity#**label**#type_spinner#****#7#**id**#Details (if any)#**label**#type_textarea#****#1#**id**#type_submit_reset_1#**label**#type_submit_reset#****#', '0', 'none', '', '1', '', '', '', '0', 'testmode', '', '', '0', '2*:*id*:*type_name*:*type*:*Name*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:***********:*w_first_val*:***********:*w_title*:*Title*********Middle*:*w_mini_labels*:**:*w_size*:*normal*:*w_name_format*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no***no*:*w_name_fields*:*no*:*w_autofill*:**:*new_field*:*3*:*id*:*type_submitter_mail*:*type*:*Email*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_first_val*:**:*w_title*:*yes*:*w_required*:*no*:*w_unique*:**:*w_class*:*no*:*w_verification*:*Email confirmation*:*w_verification_label*:**:*w_verification_placeholder*:*no*:*w_autofill*:**:*new_field*:*4*:*id*:*type_date_new*:*type*:*Date*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size*:**:*w_date*:*yes*:*w_required*:*yes*:*w_show_image*:**:*w_class*:*mm/dd/yy*:*w_format*:*0*:*w_start_day*:**:*w_default_date*:**:*w_min_date*:**:*w_max_date*:**:*w_invalid_dates*:*yes***yes***yes***yes***yes***yes***yes*:*w_show_days*:*yes*:*w_hide_time*:*...*:*w_but_val*:*no*:*w_disable_past_days*:**:*new_field*:*5*:*id*:*type_radio*:*type*:*Cupcakes Flavors (1 doz. minimum)*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*right*:*w_field_option_pos*:*no*:*w_hide_label*:*ver*:*w_flow*:*Red Velvet***Vanilla***Chocolate***Guinness***Coconut***Lemon***Chocolate Mint*:*w_choices*:*false***false***false***false***false***false***false*:*w_choices_checked*:*1*:*w_rowcol*:*no*:*w_required*:*no*:*w_randomize*:*no*:*w_allow_other*:*0*:*w_allow_other_num*:*no*:*w_value_disabled*:*Red Velvet***Vanilla***Chocolate***Guinness***Coconut***Lemon***Chocolate Mint*:*w_choices_value*:********************:*w_choices_params*:**:*w_class*:**:*new_field*:*6*:*id*:*type_spinner*:*type*:*Quantity*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:*60*:*w_field_width*:**:*w_field_min_value*:**:*w_field_max_value*:*1*:*w_field_step*:*null*:*w_field_value*:*no*:*w_required*:**:*w_class*:**:*new_field*:*7*:*id*:*type_textarea*:*type*:*Details (if any)*:*w_field_label*:**:*w_field_label_size*:*top*:*w_field_label_pos*:*no*:*w_hide_label*:**:*w_size_w*:*100*:*w_size_h*:**:*w_first_val*:**:*w_title*:*no*:*w_required*:*no*:*w_unique*:**:*w_class*:**:*new_field*:*1*:*id*:*type_submit_reset*:*type*:*type_submit_reset_1*:*w_field_label*:*Submit*:*w_submit_title*:*Reset*:*w_reset_title*:**:*w_class*:*false*:*w_act*:**:*new_field*:*', '1', '1', '*', '', '', '', '', '1', '', '', '', '', '', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '0', '1', 'Cupcake Order Form', '', '', 'none', '1', '0');");
302
  $insert_form_id[] = $wpdb->insert_id;
303
  }
304
  else {
form_maker_update.php CHANGED
@@ -245,6 +245,15 @@ class WDFMUpdate {
245
  $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker_backup` CHANGE `label_order` `label_order` longtext NOT NULL");
246
  $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker_backup` CHANGE `label_order_current` `label_order_current` longtext NOT NULL");
247
  }
 
 
 
 
 
 
 
 
 
248
  return;
249
  }
250
  }
245
  $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker_backup` CHANGE `label_order` `label_order` longtext NOT NULL");
246
  $wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker_backup` CHANGE `label_order_current` `label_order_current` longtext NOT NULL");
247
  }
248
+ if (version_compare($version, '1.12.22') == -1) {
249
+ $group_id = $wpdb->get_var( 'SELECT MAX( group_id ) FROM ' . $wpdb->prefix . 'formmaker_submits' );
250
+ $group_id++;
251
+ $formmaker_groups = "CREATE TABLE IF NOT EXISTS `" . $wpdb->prefix . "formmaker_groups` (
252
+ `id` int(11) NOT NULL AUTO_INCREMENT,
253
+ PRIMARY KEY (`id`)
254
+ ) DEFAULT CHARSET=utf8 AUTO_INCREMENT=" . $group_id;
255
+ $wpdb->query($formmaker_groups);
256
+ }
257
  return;
258
  }
259
  }
framework/WDW_FM_Library.php CHANGED
@@ -859,7 +859,7 @@ class WDW_FM_Library {
859
  if ( strstr($str, '"') ) {
860
  $str = '"' . str_replace('"', '""', $str) . '"';
861
  }
862
- $str = ltrim($str, '=');
863
  }
864
 
865
  /**
@@ -939,63 +939,11 @@ class WDW_FM_Library {
939
  $row->javascript = str_replace('function before_load()', 'function before_load' . $form_id . '()', $row->javascript);
940
  $row->javascript = str_replace('function before_submit()', 'function before_submit' . $form_id . '()', $row->javascript);
941
  $check_js = '';
942
- $onsubmit_js = '';
943
  $onload_js = '';
944
- $currency_code = array(
945
- 'USD',
946
- 'EUR',
947
- 'GBP',
948
- 'JPY',
949
- 'CAD',
950
- 'MXN',
951
- 'HKD',
952
- 'HUF',
953
- 'NOK',
954
- 'NZD',
955
- 'SGD',
956
- 'SEK',
957
- 'PLN',
958
- 'AUD',
959
- 'DKK',
960
- 'CHF',
961
- 'CZK',
962
- 'ILS',
963
- 'BRL',
964
- 'TWD',
965
- 'MYR',
966
- 'PHP',
967
- 'THB',
968
- );
969
- $currency_sign = array(
970
- '$',
971
- '&#8364;',
972
- '&#163;',
973
- '&#165;',
974
- 'C$',
975
- 'Mex$',
976
- 'HK$',
977
- 'Ft',
978
- 'kr',
979
- 'NZ$',
980
- 'S$',
981
- 'kr',
982
- 'zl',
983
- 'A$',
984
- 'kr',
985
- 'CHF',
986
- 'Kc',
987
- '&#8362;',
988
- 'R$',
989
- 'NT$',
990
- 'RM',
991
- '&#8369;',
992
- '&#xe3f;',
993
- );
994
  if ( $row->payment_currency ) {
995
- $form_currency = $currency_sign[array_search($row->payment_currency, $currency_code)];
996
- }
997
- else {
998
- $form_currency = '';
999
  }
1000
  $form_paypal_tax = $row->tax;
1001
  $stripe_enable = 0;
@@ -3666,7 +3614,7 @@ class WDW_FM_Library {
3666
  $onload_js .= '
3667
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '")[0].spin = null;
3668
  spinner = jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner();
3669
- if ("' . $param['w_field_value'] . '" == "null") { spinner.spinner("value", ""); }
3670
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ min: "' . $param['w_field_min_value'] . '"});
3671
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ max: "' . $param['w_field_max_value'] . '"});
3672
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ step: "' . $param['w_field_step'] . '"});';
@@ -3761,10 +3709,10 @@ class WDW_FM_Library {
3761
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '0")[0].spin = null;
3762
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '1")[0].spin = null;
3763
  spinner0 = jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '0").spinner();
3764
- if ("' . $param['w_field_value1'] . '" == "null") { spinner0.spinner("value", ""); }
3765
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ step: ' . $param['w_field_range_step'] . '});
3766
  spinner1 = jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '1").spinner();
3767
- if ("' . $param['w_field_value2'] . '" == "null") { spinner1.spinner("value", ""); }
3768
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ step: ' . $param['w_field_range_step'] . '});';
3769
  if ( $required ) {
3770
  array_push($req_fields, $id1);
@@ -4699,6 +4647,7 @@ class WDW_FM_Library {
4699
 
4700
  return $sent;
4701
  }
 
4702
  public static $email_content_type;
4703
  public static $email_charset;
4704
  public static $email_from;
@@ -4706,9 +4655,11 @@ class WDW_FM_Library {
4706
  public static function mail_content_type() {
4707
  return self::$email_content_type;
4708
  }
 
4709
  public static function mail_charset() {
4710
  return self::$email_charset;
4711
  }
 
4712
  public static function mail_from() {
4713
  return self::$email_from;
4714
  }
@@ -5042,6 +4993,60 @@ class WDW_FM_Library {
5042
  public static function decodeQuotedPrintable( $string ) {
5043
  return quoted_printable_decode($string);
5044
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5045
  }
5046
 
5047
  /*
859
  if ( strstr($str, '"') ) {
860
  $str = '"' . str_replace('"', '""', $str) . '"';
861
  }
862
+ $str = ltrim($str, '=+-@');
863
  }
864
 
865
  /**
939
  $row->javascript = str_replace('function before_load()', 'function before_load' . $form_id . '()', $row->javascript);
940
  $row->javascript = str_replace('function before_submit()', 'function before_submit' . $form_id . '()', $row->javascript);
941
  $check_js = '';
 
942
  $onload_js = '';
943
+ $onsubmit_js = '';
944
+ $form_currency = '';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
945
  if ( $row->payment_currency ) {
946
+ $form_currency = self::replace_currency_code( $row->payment_currency );
 
 
 
947
  }
948
  $form_paypal_tax = $row->tax;
949
  $stripe_enable = 0;
3614
  $onload_js .= '
3615
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '")[0].spin = null;
3616
  spinner = jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner();
3617
+ if ("' . $param['w_field_value'] . '" == "null" && jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").val() == "") { spinner.spinner("value", ""); }
3618
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ min: "' . $param['w_field_min_value'] . '"});
3619
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ max: "' . $param['w_field_max_value'] . '"});
3620
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ step: "' . $param['w_field_step'] . '"});';
3709
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '0")[0].spin = null;
3710
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '1")[0].spin = null;
3711
  spinner0 = jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '0").spinner();
3712
+ if ("' . $param['w_field_value1'] . '" == "null" && jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '0").val() == "") { spinner0.spinner("value", ""); }
3713
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ step: ' . $param['w_field_range_step'] . '});
3714
  spinner1 = jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '1").spinner();
3715
+ if ("' . $param['w_field_value2'] . '" == "null" && jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '1").val() == "") { spinner1.spinner("value", ""); }
3716
  jQuery("#form' . $form_id . ' #wdform_' . $id1 . '_element' . $form_id . '").spinner({ step: ' . $param['w_field_range_step'] . '});';
3717
  if ( $required ) {
3718
  array_push($req_fields, $id1);
4647
 
4648
  return $sent;
4649
  }
4650
+
4651
  public static $email_content_type;
4652
  public static $email_charset;
4653
  public static $email_from;
4655
  public static function mail_content_type() {
4656
  return self::$email_content_type;
4657
  }
4658
+
4659
  public static function mail_charset() {
4660
  return self::$email_charset;
4661
  }
4662
+
4663
  public static function mail_from() {
4664
  return self::$email_from;
4665
  }
4993
  public static function decodeQuotedPrintable( $string ) {
4994
  return quoted_printable_decode($string);
4995
  }
4996
+
4997
+ /**
4998
+ * Replace currencycode.
4999
+ *
5000
+ * @param string $key
5001
+ *
5002
+ * @return string
5003
+ */
5004
+ public static function replace_currency_code( $key ) {
5005
+ $currency_code = array('USD', 'EUR', 'GBP', 'JPY', 'CAD', 'MXN', 'HKD', 'HUF', 'NOK', 'NZD', 'SGD', 'SEK', 'PLN', 'AUD', 'DKK', 'CHF', 'CZK', 'ILS', 'BRL', 'TWD', 'MYR', 'PHP', 'THB' );
5006
+ $currency_sign = array('$', '&#8364;', '&#163;', '&#165;', 'C$', 'Mex$', 'HK$', 'Ft', 'kr', 'NZ$', 'S$', 'kr', 'zl', 'A$', 'kr', 'CHF', 'Kc', '&#8362;', 'R$', 'NT$', 'RM', '&#8369;', '&#xe3f;' );
5007
+ $currency = $currency_sign[array_search($key, $currency_code)];
5008
+
5009
+ return $currency;
5010
+ }
5011
+
5012
+ /**
5013
+ * Create Email options placeholders.
5014
+ *
5015
+ * @param array $labels
5016
+ * @return array $data
5017
+ */
5018
+ public static function create_email_options_placeholders( $labels = array() ) {
5019
+ $data = array();
5020
+ $form_inputs = array();
5021
+ $continue_types = array('type_submit_reset', 'type_editor', 'type_map', 'type_mark_map', 'type_captcha', 'type_recaptcha', 'type_button', 'type_send_copy');
5022
+ $inputs = array(
5023
+ array('value' => 'all', 'title' => __('All fields list', WDFM()->prefix)),
5024
+ );
5025
+ if ( !empty($labels) ) {
5026
+ foreach($labels as $key => $label) {
5027
+ if ( in_array($label['type'], $continue_types) ) {
5028
+ continue;
5029
+ }
5030
+ if ( $label['type'] == "type_file_upload" ) {
5031
+ $key = $key . '(link)';
5032
+ }
5033
+ $form_inputs[] = array('value' => $key, 'title' => $label['name'] );
5034
+ }
5035
+ }
5036
+ $data[__('Form fields', WDFM()->prefix)] = array_merge($inputs, $form_inputs);
5037
+ $data[__('Misc', WDFM()->prefix)] = array(
5038
+ array('value' => 'formtitle', 'title' => __('Form Title', WDFM()->prefix)),
5039
+ array('value' => 'subid', 'title' => __('Submission ID', WDFM()->prefix)),
5040
+ array('value' => 'ip', 'title' => __('IP', WDFM()->prefix)),
5041
+ array('value' => 'adminemail', 'title' => __('Admin Email', WDFM()->prefix)),
5042
+ array('value' => 'useremail', 'title' => __('User Email', WDFM()->prefix)),
5043
+ array('value' => 'username', 'title' => __('User Name', WDFM()->prefix)),
5044
+ array('value' => 'pageurl', 'title' => __('Page Url', WDFM()->prefix)),
5045
+ array('value' => 'verificationlink', 'title' => __('Verification Link', WDFM()->prefix)),
5046
+ );
5047
+ $data[__('Misc', WDFM()->prefix)] = apply_filters('fm_placeholders_misc', $data[__('Misc', WDFM()->prefix)]);
5048
+ return $data;
5049
+ }
5050
  }
5051
 
5052
  /*
frontend/models/form_maker.php CHANGED
@@ -5,83 +5,83 @@
5
  */
6
  class FMModelForm_maker {
7
 
8
- public $fm_css_content;
 
 
 
9
  /**
10
- * @param $id
11
  * @param string $type
12
  *
13
  * @return array
14
  */
15
  public function showform( $id, $type = 'embedded' ) {
16
  global $wpdb;
17
- $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"' . (!WDFM()->is_free ? '' : ' AND id' . (WDFM()->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')'), $id));
18
 
19
  if ( !$row ) {
20
- echo WDW_FM_Library::message(__('Something went wrong when trying to display this form.', WDFM()->prefix), 'fm-notice-error');
21
  return FALSE;
22
  }
23
 
24
  if ( $row->type != $type ) {
25
- echo WDW_FM_Library::message(__('The form you are trying to view does not have Embedded display type.', WDFM()->prefix), 'fm-notice-error');
26
  return FALSE;
27
  }
28
 
29
- $form_preview = (WDW_FM_Library::get('wdform_id', '') == $id) ? TRUE : FALSE;
30
  if ( !$form_preview && !$row->published ) {
31
  // If the form has been unpublished.
32
- echo WDW_FM_Library::message(__('The form you are trying to view has been unpublished.', WDFM()->prefix), 'fm-notice-error');
33
  return FALSE;
34
  }
35
- $theme_id = WDW_FM_Library::get('test_theme', '');
36
 
37
  if ( $theme_id == '' ) {
38
  $theme_id = $row->theme;
39
  }
40
- $form_theme = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $theme_id));
41
  if ( !$form_theme ) {
42
- $form_theme = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'formmaker_themes');
43
  if ( !$form_theme ) {
44
  return FALSE;
45
  }
46
  }
47
- $params_decoded = json_decode(html_entity_decode($form_theme->css), TRUE);
48
  if ( $params_decoded != NULL ) {
49
  $old = $form_theme->version == 1;
50
  $form_theme = $params_decoded;
51
- }
52
- else {
53
  $old = true;
54
  $form_theme = array( "CUPCSS" => $form_theme->css );
55
  }
56
- $cssver = isset($form_theme['version']) ? $form_theme['version'] : 1;
57
- $this->create_css($theme_id, $form_theme, $old);
58
- $front_urls = WDFM()->front_urls;
59
  $wp_upload_dir = wp_upload_dir();
60
- $frontend_dir ='/form-maker-frontend/';
61
- $fm_style_dir = $wp_upload_dir['basedir'] . $frontend_dir . 'css/fm-style-' . $theme_id . '.css';
62
- $fm_style_url = $front_urls['upload_url'] . $frontend_dir . 'css/fm-style-' . $theme_id . '.css';
63
- if ( !file_exists($fm_style_dir) ) {
64
- if ( function_exists('wp_add_inline_style') ) {
65
- wp_add_inline_style('fm-frontend', $this->fm_css_content);
66
- }
67
- else {
68
  echo '<style>' . $this->fm_css_content . '</style>';
69
  }
70
- }
71
- else {
72
- wp_register_style('fm-style-' . $theme_id, $fm_style_url, array(), $cssver);
73
- wp_enqueue_style('fm-style-' . $theme_id);
74
  }
75
 
76
  $label_id = array();
77
  $label_type = array();
78
- $label_all = explode('#****#', $row->label_order);
79
- $label_all = array_slice($label_all, 0, count($label_all) - 1);
80
  foreach ( $label_all as $key => $label_each ) {
81
- $label_id_each = explode('#**id**#', $label_each);
82
- array_push($label_id, $label_id_each[0]);
83
- $label_order_each = explode('#**label**#', $label_id_each[1]);
84
- array_push($label_type, $label_order_each[1]);
85
  }
86
 
87
  return array(
@@ -98,7 +98,7 @@ class FMModelForm_maker {
98
  * @param $key
99
  */
100
  public static function set_empty_values_transparent( &$value, $key ) {
101
- if ( strpos($key, 'Color') > -1 ) {
102
  /*
103
  * New themes colorpicker conflict with others.
104
  * Remove comments if no '#' is beeing saved with colors.
@@ -121,16 +121,16 @@ class FMModelForm_maker {
121
  public function create_css( $theme_id, $form_theme, $old = TRUE, $force_rewrite = FALSE ) {
122
  $wp_upload_dir = wp_upload_dir();
123
  $frontend_dir = '/form-maker-frontend/';
124
- if ( !is_dir($wp_upload_dir['basedir'] . $frontend_dir) ) {
125
- mkdir($wp_upload_dir['basedir'] . $frontend_dir);
126
- file_put_contents($wp_upload_dir['basedir'] . $frontend_dir . 'index.html', WDW_FM_Library::forbidden_template());
127
  }
128
- if ( !is_dir($wp_upload_dir['basedir'] . $frontend_dir . 'css') ) {
129
- mkdir($wp_upload_dir['basedir'] . $frontend_dir . 'css');
130
- file_put_contents($wp_upload_dir['basedir'] . $frontend_dir . 'css/index.html', WDW_FM_Library::forbidden_template());
131
  }
132
- $frontend_css = $wp_upload_dir['basedir'] . $frontend_dir . 'css/fm-style-' . $theme_id . '.css';
133
- if ( $theme_id && !$force_rewrite && file_exists($frontend_css) ) {
134
  return;
135
  }
136
  $prefixes = array(
@@ -159,449 +159,437 @@ class FMModelForm_maker {
159
  $border_types = array( 'top', 'left', 'right', 'bottom' );
160
  $borders = array();
161
  foreach ( $prefixes as $prefix ) {
162
- $borders[$prefix] = array();
163
  foreach ( $border_types as $border_type ) {
164
- if ( isset($form_theme[$prefix . 'Border' . ucfirst($border_type)]) ) {
165
- array_push($borders[$prefix], $form_theme[$prefix . 'Border' . ucfirst($border_type)]);
166
  }
167
  }
168
  }
169
  clearstatcache();
170
  $css_content = '';
171
  if ( !$old ) {
172
- $css_content = '.fm-form-container.fm-theme' . $theme_id . ' {'.
173
- ( !empty($form_theme['AGPWidth']) ? 'width:' . $form_theme['AGPWidth'] . '%;' : '' ).
174
- '}';
175
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form {'.
176
- ( !empty($form_theme['AGPMargin']) ? 'margin:'. $form_theme['AGPMargin'] .';' : '' ).
177
- ( !empty($form_theme['AGPPadding']) ? 'padding:'. $form_theme['AGPPadding'] .' !important;' : '' ).
178
- ( (isset($form_theme['AGPBorderRadius']) && $form_theme['AGPBorderRadius'] !== '') ? 'border-radius:'. $form_theme['AGPBorderRadius'] .'px;' : '' ).
179
- ( !empty($form_theme['AGPBoxShadow']) ? 'box-shadow:'. $form_theme['AGPBoxShadow'] .';' : '' ).
180
  '}';
181
- if ( !empty($borders['AGP']) ) {
182
- foreach ( $borders['AGP'] as $border ) {
183
- if ( !empty($form_theme['AGPBorderType']) && ( $form_theme['AGPBorderType'] == 'inherit' || $form_theme['AGPBorderType'] == 'initial' ) ) {
184
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form {'.
185
- 'border-' . $border . ': ' . $form_theme['AGPBorderType'] .' !important;'.
186
  '}';
187
  break;
188
- }
189
- else {
190
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form {'.
191
- ( (isset($form_theme['AGPBorderWidth']) && $form_theme['AGPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['AGPBorderWidth'] . 'px !important;' : '').
192
- ( !empty($form_theme['AGPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['AGPBorderType'] . ' !important;' : '').
193
- ( !empty($form_theme['AGPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['AGPBorderColor'] . ' !important;' : '').
194
  '}';
195
  }
196
  }
197
  }
198
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .fm-header-bg {'.
199
- 'display:'. ( (!empty($form_theme['HPAlign']) && ($form_theme['HPAlign'] == 'left' || $form_theme['HPAlign'] == 'right')) ? 'table-cell;' : 'block;').
200
- ( !empty($form_theme['HPWidth']) ? 'width:' . $form_theme['HPWidth'] . '%;' : '').
201
- ( !empty($form_theme['HPBGColor']) ? 'background-color:' . $form_theme['HPBGColor'] . ';' : '').
202
  // 'vertical-align: top;'.
203
  '}';
204
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .fm-header {'.
205
- ( !empty($form_theme['HPWidth']) ? 'width:' . $form_theme['HPWidth'] . '%;' : '').
206
- ( !empty($form_theme['HPMargin']) ? 'margin:' . $form_theme['HPMargin'] .';': '').
207
- ( !empty($form_theme['HPPadding']) ? 'padding:' . $form_theme['HPPadding'] .'!important;' : '').
208
- ( (isset($form_theme['HPBorderRadius']) && $form_theme['HPBorderRadius'] !== '') ? 'border-radius:' . $form_theme['HPBorderRadius'] .'px;' : '').
209
- ( !empty($form_theme['HPTextAlign']) ? 'text-align:' . $form_theme['HPTextAlign'] .';' : '').
210
  '}';
211
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .image_left_right.fm-header {'.
212
  'padding: 0 !important;' .
213
  '}';
214
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .image_left_right > div {'.
215
- ( !empty($form_theme['HPPadding']) ? 'padding:' . $form_theme['HPPadding'] . '!important;' : '').
216
  '}';
217
- if ( !empty($borders['HP']) ) {
218
- foreach ( $borders['HP'] as $border ) {
219
- if ( !empty($form_theme['HPBorderType']) && ( $form_theme['HPBorderType'] == 'inherit' || $form_theme['HPBorderType'] == 'initial') ) {
220
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .fm-header {'.
221
- 'border-' . $border . ':' . $form_theme['HPBorderType'] . ' !important;'.
222
  '}';
223
  break;
224
- }
225
- else {
226
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .fm-header {'.
227
- ( (isset($form_theme['HPBorderWidth']) && $form_theme['HPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['HPBorderWidth'] . 'px !important;' : '').
228
- ( !empty($form_theme['HPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['HPBorderType'] . ' !important;' : '').
229
- ( !empty($form_theme['HPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['HPBorderColor'] . ' !important;' : '').
230
  '}';
231
  }
232
  }
233
  }
234
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form.header_left_right .wdform-page-and-images {'.
235
- ( !empty($form_theme['GPWidth']) ? 'width:' . $form_theme['GPWidth'] . '%;' : '').
236
  '}';
237
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form.header_left_right .fm-header {'.
238
- ( !empty($form_theme['HPWidth']) ? 'width:' . $form_theme['HPWidth'] . '%;' : '').
239
  '}';
240
- $css_content .= '.fm-topbar .fm-form-container.fm-theme' . $theme_id . ' .fm-form .fm-header {'.
241
- ( !empty($form_theme['HTPWidth']) ? 'width:' . $form_theme['HTPWidth'] . '% !important;' : '').
242
  '}';
243
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .fm-header-title {'.
244
- ( !empty($form_theme['HTPFontSize']) ? 'font-size:' . $form_theme['HTPFontSize'] . 'px;' : '').
245
- ( !empty($form_theme['HTPColor']) ? 'color:' . $form_theme['HTPColor'] . ';' : '').
246
  '}';
247
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .fm-header-description {'.
248
- ( !empty($form_theme['HDPFontSize']) ? 'font-size:' . $form_theme['HDPFontSize'] . 'px;' : '').
249
- ( !empty($form_theme['HDPColor']) ? 'color:' . $form_theme['HDPColor'] . ';' : '').
250
  '}';
251
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-scrollbox {'.
252
- ( !empty($form_theme['AGPSPWidth']) ? 'width:' . $form_theme['AGPSPWidth'] . '%;' : '').
253
  '}';
254
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-minimize-text div {'.
255
- ( !empty($form_theme['MBPPadding']) ? 'padding:' . $form_theme['MBPPadding'] . ';' : '').
256
- ( !empty($form_theme['MBPMargin']) ? 'margin:' . $form_theme['MBPMargin'] . ';' : '').
257
- ( !empty($form_theme['MBPTextAlign']) ? 'text-align:' . $form_theme['MBPTextAlign'] . ';' : '').
258
- ( !empty($form_theme['MBPFontSize']) ? 'font-size:' . $form_theme['MBPFontSize'] . 'px;' : '').
259
- ( !empty($form_theme['MBPFontWeight']) ? 'font-weight:' . $form_theme['MBPFontWeight'] . ';' : '').
260
- ( (isset($form_theme['MBPBorderRadius']) && $form_theme['MBPBorderRadius'] !== '') ? 'border-radius:' . $form_theme['MBPBorderRadius'] . 'px;' : '').
261
  '}';
262
- if ( !empty($borders['MBP']) ) {
263
- foreach ( $borders['MBP'] as $border ) {
264
- if ( !empty($form_theme['MBPBorderType']) && ($form_theme['MBPBorderType'] == 'inherit' || $form_theme['MBPBorderType'] == 'initial') ) {
265
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-minimize-text div {'.
266
- 'border-' . $border . ':' . $form_theme['MBPBorderType'] . ' !important;'.
267
  '}';
268
  break;
269
- }
270
- else {
271
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-minimize-text div {'.
272
- ( (isset($form_theme['MBPBorderWidth']) && $form_theme['MBPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['MBPBorderWidth'] . 'px !important;' : '').
273
- ( !empty($form_theme['MBPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['MBPBorderType'] . ' !important;' : '').
274
- ( !empty($form_theme['MBPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['MBPBorderColor'] . ' !important;' : '').
275
  '}';
276
  }
277
  }
278
  }
279
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-minimize-text div:hover {'.
280
- ( !empty($form_theme['MBHPBGColor']) ? 'background-color:' . $form_theme['MBHPBGColor'] . ';' : '').
281
- ( !empty($form_theme['MBHPColor']) ? 'color:' . $form_theme['MBHPColor'] . ';' : '').
282
  '}';
283
- if ( $borders['MBHP'] ) {
284
- foreach ( $borders['MBHP'] as $border ) {
285
- if ( !empty($form_theme['MBHPBorderType']) && ($form_theme['MBHPBorderType'] == 'inherit' || $form_theme['MBHPBorderType'] == 'initial') ) {
286
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-minimize-text div:hover {'.
287
- 'border-' . $border . ':' . $form_theme['MBHPBorderType'] . ' !important;'.
288
  ';';
289
  break;
290
- }
291
- else {
292
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-minimize-text div:hover { '.
293
- ( (isset($form_theme['MBHPBorderWidth']) && $form_theme['MBHPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['MBHPBorderWidth'] . 'px !important;' : '').
294
- ( !empty($form_theme['MBHPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['MBHPBorderType'] . ' !important;' : '').
295
- ( !empty($form_theme['MBHPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['MBHPBorderColor'] . ' !important;' : '').
296
  '}';
297
  }
298
  }
299
  }
300
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform-page-and-images {'.
301
- ( !empty($form_theme['GPWidth']) ? 'width:' . $form_theme['GPWidth'] . '%;' : '').
302
- ( !empty($form_theme['GPMargin']) ? 'margin:' . $form_theme['GPMargin'] . ';' : '').
303
- ( !empty($form_theme['GPPadding']) ? 'padding:' . $form_theme['GPPadding'] . ';' : '').
304
- ( (isset($form_theme['GPBorderRadius']) && $form_theme['GPBorderRadius'] !== '') ? 'border-radius:' . $form_theme['GPBorderRadius'] . 'px;' : '').
305
- ( !empty($form_theme['GPFontWeight']) ? 'font-weight:' . $form_theme['GPFontWeight'] . ';' : '').
306
- ( !empty($form_theme['GPFontSize']) ? 'font-size:' . $form_theme['GPFontSize'] . 'px;' : '').
307
- ( !empty($form_theme['GPColor']) ? 'color:' . $form_theme['GPColor'] . ';' : '').
308
  '}';
309
- $css_content .= '.fm-topbar .fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform-page-and-images {'.
310
- ( !empty($form_theme['GTPWidth']) ? 'width:' . $form_theme['GTPWidth'] . '% !important;' : '').
311
  '}';
312
- if ( $borders['GP'] ) {
313
- foreach ( $borders['GP'] as $border ) {
314
- if ( !empty($form_theme['GPBorderType']) && ( $form_theme['GPBorderType'] == 'inherit' || $form_theme['GPBorderType'] == 'initial' ) ) {
315
  $css_content .= '
316
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform-page-and-images,
317
- .fm-form-container.fm-theme' . $theme_id . ' .fm-minimize-text {'.
318
- 'border-' . $border .':' . $form_theme['GPBorderType'] . ' !important;'.
319
  '}';
320
  break;
321
- }
322
- else {
323
  $css_content .= '
324
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform-page-and-images,
325
- .fm-form-container.fm-theme' . $theme_id . ' .fm-minimize-text {'.
326
- ( (isset($form_theme['GPBorderWidth']) && $form_theme['GPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['GPBorderWidth'] . 'px !important;' : '').
327
- ( !empty($form_theme['GPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['GPBorderType'] . ' !important;' : '').
328
- ( !empty($form_theme['GPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['GPBorderColor'] . ' !important;' : '').
329
  '}';
330
  }
331
  }
332
  }
333
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .mini_label {'.
334
- ( !empty($form_theme['GPMLMargin']) ? 'margin:' . $form_theme['GPMLMargin'] . ';' : '').
335
- ( !empty($form_theme['GPMLPadding']) ? 'padding:' . $form_theme['GPMLPadding'] . ' !important;' : '').
336
- ( !empty($form_theme['GPMLFontWeight']) ? 'font-weight:' . $form_theme['GPMLFontWeight'] . ';' : '').
337
- ( !empty($form_theme['GPMLFontSize']) ? 'font-size:' . $form_theme['GPMLFontSize'] . 'px !important;' : '').
338
- ( !empty($form_theme['GPMLColor']) ? 'color:' . $form_theme['GPMLColor'] . ';' : '').
339
  '}';
340
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform-page-and-images label {'.
341
- ( !empty($form_theme['GPFontSize']) ? 'font-size:' . $form_theme['GPFontSize'] . 'px;' : '').
342
- ( !empty($form_theme['GPColor']) ? 'color:' . $form_theme['GPColor'] . ';' : '').
343
  '}';
344
- if ( !empty($form_theme['GPAlign']) && $form_theme['GPAlign'] == 'center' ) {
345
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform-page-and-images {'.
346
- 'margin:0 auto;'.
347
  '}';
348
- }
349
- else {
350
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform-page-and-images {'.
351
- ( !empty($form_theme['GPAlign']) ? 'float:' . $form_theme['GPAlign'] . ';' : '').
352
  '}';
353
  }
354
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform_section {'.
355
- ( !empty($form_theme['SEPMargin']) ? 'margin:' . $form_theme['SEPMargin'] . ';' : '').
356
- ( !empty($form_theme['SEPPadding']) ? 'padding:' . $form_theme['SEPPadding'] . ';' : '').
357
- 'background: transparent;'.
358
  '}';
359
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . '.fm-form .wdform_column {'.
360
- ( !empty($form_theme['COPMargin']) ? 'margin:' . $form_theme['COPMargin'] . ';' : '').
361
- ( !empty($form_theme['COPPadding']) ? 'padding:' . $form_theme['COPPadding'] . ';' : '').
362
  '}';
363
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-slider {'.
364
- ( !empty($form_theme['IPBGColor']) ? 'background:' . $form_theme['IPBGColor'] . ' !important;' : '').
365
  '}';
366
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-scrollbox .fm-scrollbox-form {'.
367
- ( !empty($form_theme['AGPMargin']) ? 'margin:' . $form_theme['AGPMargin'] . ';' : '').
368
  '}';
369
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-popover .fm-popover-content {'.
370
- ( !empty($form_theme['AGPMargin']) ? 'margin:' . $form_theme['AGPMargin'] . ';' : '').
371
- ( !empty($form_theme['AGPWidth']) ? 'width:' . $form_theme['AGPWidth'] . '%;' : '').
372
  '}';
373
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages.wdform_page_navigation {'.
374
- ( !empty($form_theme['AGPMargin']) ? 'margin:' . $form_theme['AGPMargin'] . '%;' : '').
375
  '}';
376
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform_footer {'.
377
- ( !empty($form_theme['FPWidth']) ? 'width:' . $form_theme['FPWidth'] . '%;' : '').
378
- ( !empty($form_theme['FPMargin']) ? 'margin:' . $form_theme['FPMargin'] . ';' : '').
379
- ( !empty($form_theme['FPPadding']) ? 'padding:' . $form_theme['FPPadding'] . ';' : '').
380
- ( !empty($form_theme['GPFontWeight']) ? 'font-weight:' . $form_theme['GPFontWeight'] . ';' : '').
381
- ( !empty($form_theme['GPFontSize']) ? 'font-size:' . $form_theme['GPFontSize'] . 'px;' : '').
382
- ( !empty($form_theme['GPColor']) ? 'color:' . $form_theme['GPColor'] . ';' : '').
383
  '}';
384
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_active {'.
385
- ( !empty($form_theme['PSAPMargin']) ? 'margin:' . $form_theme['PSAPMargin'] . ';' : '').
386
- ( !empty($form_theme['PSAPPadding']) ? 'padding:' . $form_theme['PSAPPadding'] . ';' : '').
387
- ( !empty($form_theme['PSAPWidth']) ? 'width:' . $form_theme['PSAPWidth'] . 'px;' : '').
388
- ( !empty($form_theme['PSAPHeight']) ? 'height:' . $form_theme['PSAPHeight'] . 'px;' : '').
389
- ( !empty($form_theme['PSAPBGColor']) ? 'background-color:' . $form_theme['PSAPBGColor'] . ';' : '').
390
- ( !empty($form_theme['PSAPFontSize']) ? 'font-size:' . $form_theme['PSAPFontSize'] . 'px;' : '').
391
- ( !empty($form_theme['PSAPFontWeight']) ? 'font-weight:' . $form_theme['PSAPFontWeight'] . ';' : '').
392
- ( !empty($form_theme['PSAPColor']) ? 'color:' . $form_theme['PSAPColor'] . ';' : '').
393
- ( !empty($form_theme['PSAPLineHeight']) ? 'line-height:' . $form_theme['PSAPLineHeight'] . 'px;' : '').
394
- ( (isset($form_theme['PSAPBorderRadius']) && $form_theme['PSAPBorderRadius'] !== '') ? 'border-radius:' . $form_theme['PSAPBorderRadius'] . 'px;' : '').
395
  '}';
396
- if ( $borders['PSAP'] ) {
397
- foreach ( $borders['PSAP'] as $border ) {
398
- if ( !empty($form_theme['PSAPBorderType']) && ($form_theme['PSAPBorderType'] == 'inherit' || $form_theme['PSAPBorderType'] == 'initial') ) {
399
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_active {'.
400
- 'border:' . $form_theme['PSAPBorderType'] . ' !important;'.
401
  '}';
402
  break;
403
- }
404
- else {
405
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_active {'.
406
- ( (isset($form_theme['PSAPBorderWidth']) && $form_theme['PSAPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['PSAPBorderWidth'] . 'px !important;' : '').
407
- ( !empty($form_theme['PSAPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['PSAPBorderType'] . ' !important;' : '').
408
- ( !empty($form_theme['PSAPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['PSAPBorderColor'] . ' !important;' : '').
409
  '}';
410
  }
411
  }
412
  }
413
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_deactive {'.
414
- ( !empty($form_theme['PSDPBGColor']) ? 'background-color:' . $form_theme['PSDPBGColor'] . ';' : '').
415
- ( !empty($form_theme['PSAPWidth']) ? 'width:' . $form_theme['PSAPWidth'] . 'px;' : '').
416
- ( !empty($form_theme['PSDPHeight']) ? 'height:' . $form_theme['PSDPHeight'] . 'px;' : '').
417
- ( !empty($form_theme['PSDPMargin']) ? 'margin:' . $form_theme['PSDPMargin'] . ';' : '').
418
- ( !empty($form_theme['PSDPPadding']) ? 'padding:' . $form_theme['PSDPPadding'] . ';' : '').
419
- ( !empty($form_theme['PSDPLineHeight']) ? 'line-height:' . $form_theme['PSDPLineHeight'] . 'px;' : '').
420
- ( (isset($form_theme['PSAPBorderRadius']) && $form_theme['PSAPBorderRadius'] !== '') ? 'border-radius:' . $form_theme['PSAPBorderRadius'] . 'px;' : '').
421
- ( !empty($form_theme['PSDPFontWeight']) ? 'font-weight:' . $form_theme['PSDPFontWeight'] . ';' : '').
422
- ( !empty($form_theme['PSDPFontSize']) ? 'font-size:' . $form_theme['PSDPFontSize'] . 'px;' : '').
423
- ( !empty($form_theme['PSDPColor']) ? 'color:' . $form_theme['PSDPColor'] . ';' : '').
424
  '}';
425
- if ( $borders['PSDP'] ) {
426
- foreach ( $borders['PSDP'] as $border ) {
427
- if ( !empty($form_theme['PSDPBorderType']) && ( $form_theme['PSDPBorderType'] == 'inherit' || $form_theme['PSDPBorderType'] == 'initial') ) {
428
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_deactive {'.
429
- 'border:' . $form_theme['PSDPBorderType'] . ' !important;'.
430
  '}';
431
  break;
432
- }
433
- else {
434
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_deactive {'.
435
- ( (isset($form_theme['PSDPBorderWidth']) && $form_theme['PSDPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['PSDPBorderWidth'] . 'px !important;' : '').
436
- ( !empty($form_theme['PSDPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['PSDPBorderType'] . ' !important;' : '').
437
- ( !empty($form_theme['PSDPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['PSDPBorderColor'] . ' !important;' : '').
438
  '}';
439
  }
440
  }
441
  }
442
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_percentage_active {'.
443
- ( !empty($form_theme['PSAPWidth']) ? 'width:' . $form_theme['PSAPWidth'] . 'px;' : '').
444
- ( !empty($form_theme['PSAPHeight']) ? 'height:' . $form_theme['PSAPHeight'] . 'px;' : '').
445
- ( !empty($form_theme['PSAPMargin']) ? 'margin:' . $form_theme['PSAPMargin'] . ';' : '').
446
- ( !empty($form_theme['PSAPPadding']) ? 'padding:' . $form_theme['PSAPPadding'] . ';' : '').
447
- ( !empty($form_theme['PSAPBGColor']) ? 'background-color:' . $form_theme['PSAPBGColor'] . ';' : '').
448
- ( !empty($form_theme['PSAPFontWeight']) ? 'font-weight:' . $form_theme['PSAPFontWeight'] . ';' : '').
449
- ( !empty($form_theme['PSAPFontSize']) ? 'font-size:' . $form_theme['PSAPFontSize'] . 'px;' : '').
450
- ( !empty($form_theme['PSAPColor']) ? 'color:' . $form_theme['PSAPColor'] . ';' : '').
451
- ( !empty($form_theme['PSAPLineHeight']) ? 'line-height:' . $form_theme['PSAPLineHeight'] . 'px;' : '').
452
- ( (isset($form_theme['PSAPBorderRadius']) && $form_theme['PSAPBorderRadius'] !== '') ? 'border-radius:' . $form_theme['PSAPBorderRadius'] . 'px;' : '').
453
  '}';
454
- if ( $borders['PSAP'] ) {
455
- foreach ( $borders['PSAP'] as $border ) {
456
- if ( !empty($form_theme['PSAPBorderType']) && ($form_theme['PSAPBorderType'] == 'inherit' || $form_theme['PSAPBorderType'] == 'initial') ) {
457
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_percentage_active {'.
458
- 'border:' . $form_theme['PSAPBorderType'] . ' !important;'.
459
  '}';
460
  break;
461
- }
462
- else {
463
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_percentage_active {'.
464
- ( (isset($form_theme['PSAPBorderWidth']) && $form_theme['PSAPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['PSAPBorderWidth'] . 'px !important;' : '').
465
- ( !empty($form_theme['PSAPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['PSAPBorderType'] . ' !important;' : '').
466
- ( !empty($form_theme['PSAPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['PSAPBorderColor'] . ' !important;' : '').
467
  '}';
468
  }
469
  }
470
  }
471
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_percentage_deactive {'.
472
- ( !empty($form_theme['PPAPWidth']) ? 'width:' . $form_theme['PPAPWidth'] . ';' : '').
473
- ( !empty($form_theme['PSDPHeight']) ? 'height:' . $form_theme['PSDPHeight'] . 'px;' : '').
474
- ( !empty($form_theme['PSDPMargin']) ? 'margin:' . $form_theme['PSDPMargin'] . ';' : '').
475
- ( !empty($form_theme['PSDPPadding']) ? 'padding:' . $form_theme['PSDPPadding'] . ';' : '').
476
- ( !empty($form_theme['PSDPBGColor']) ? 'background-color:' . $form_theme['PSDPBGColor'] . ';' : '').
477
- ( !empty($form_theme['PSDPFontWeight']) ? 'font-weight:' . $form_theme['PSDPFontWeight'] . ';' : '').
478
- ( !empty($form_theme['PSDPFontSize']) ? 'font-size:' . $form_theme['PSDPFontSize'] . 'px;' : '').
479
- ( !empty($form_theme['PSDPColor']) ? 'color:' . $form_theme['PSDPColor'] . ';' : '').
480
- ( !empty($form_theme['PSDPLineHeight']) ? 'line-height:' . $form_theme['PSDPLineHeight'] . 'px;' : '').
481
- ( (isset($form_theme['PSDPBorderRadius']) && $form_theme['PSDPBorderRadius'] !== '') ? 'border-radius:' . $form_theme['PSDPBorderRadius'] . 'px;' : '').
482
  '}';
483
- if ( $borders['PSDP'] ) {
484
- foreach ( $borders['PSDP'] as $border ) {
485
- if ( !empty($form_theme['PSDPBorderType']) && ($form_theme['PSDPBorderType'] == 'inherit' || $form_theme['PSDPBorderType'] == 'initial') ) {
486
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_percentage_deactive {'.
487
- 'border:' . $form_theme['PSDPBorderType'] . ' !important;'.
488
  '}';
489
  break;
490
- }
491
- else {
492
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_percentage_deactive {'.
493
- ( (isset($form_theme['PSDPBorderWidth']) && $form_theme['PSDPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['PSDPBorderWidth'] . 'px !important;' : '').
494
- ( !empty($form_theme['PSDPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['PSDPBorderType'] . ' !important;' : '').
495
- ( !empty($form_theme['PSDPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['PSDPBorderColor'] . ' !important;' : '').
496
  '}';
497
  }
498
  }
499
  }
500
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-action-buttons {'.
501
- ( !empty($form_theme['CBPFontWeight']) ? 'font-weight:' . $form_theme['CBPFontWeight'] . ';' : '').
502
- ( !empty($form_theme['CBPFontSize']) ? 'font-size:' . $form_theme['CBPFontSize'] . 'px;' : '').
503
- ( !empty($form_theme['CBPColor']) ? 'color:' . $form_theme['CBPColor'] . ';' : '').
504
  '}';
505
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .closing-form,
506
- .fm-form-container.fm-theme' . $theme_id . ' .minimize-form {'.
507
- ( !empty($form_theme['CBPMargin']) ? 'margin:' . $form_theme['CBPMargin'] . ';' : '').
508
- ( !empty($form_theme['CBPPadding']) ? 'padding:' . $form_theme['CBPPadding'] . ';' : '').
509
- ( !empty($form_theme['CBPPosition']) ? 'position:' . $form_theme['CBPPosition'] . ';' : '').
510
- ( !empty($form_theme['CBPBGColor']) ? 'background-color:' . $form_theme['CBPBGColor'] . ';' : '').
511
- ( (isset($form_theme['CBPBorderRadius']) && $form_theme['CBPBorderRadius'] !== '') ? 'border-radius:' . $form_theme['CBPBorderRadius'] . 'px;' : '').
512
  '}';
513
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .closing-form {'.
514
- ( !empty($form_theme['CBPTop']) ? 'top:' . $form_theme['CBPTop'] . ';' : '').
515
- ( !empty($form_theme['CBPRight']) ? 'right:' . $form_theme['CBPRight'] . ';' : '').
516
- ( !empty($form_theme['CBPBottom']) ? 'bottom:' . $form_theme['CBPBottom'] . ';' : '').
517
- ( !empty($form_theme['CBPLeft']) ? 'left:' . $form_theme['CBPLeft'] . ';' : '').
518
  '}';
519
- $for_mini = !empty($form_theme['CBPLeft']) ? 'left' : 'right';
520
- $cbp_for_mini = ($form_theme['CBP' . ucfirst($for_mini)]) ? $form_theme['CBP' . ucfirst($for_mini)] : 0;
521
- $cbpfontsize = !empty($form_theme['CBPFontSize']) ? (int) $form_theme['CBPFontSize'] : 0;
522
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .minimize-form {'.
523
- ( !empty($form_theme['CBPTop']) ? 'top:' . $form_theme['CBPTop'] . ';' : '').
524
- ( !empty($form_theme['CBPBottom']) ? 'bottom:' . $form_theme['CBPBottom'] . ';' : '').
525
- $for_mini . ': ' . (2 * (int)$cbp_for_mini + $cbpfontsize + 3) . 'px;'.
526
  '}';
527
- if ( $borders['CBP'] ) {
528
- foreach ( $borders['CBP'] as $border ) {
529
- if ( !empty($form_theme['CBPBorderType']) && ($form_theme['CBPBorderType'] == 'inherit' || $form_theme['CBPBorderType'] == 'initial') ) {
530
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .closing-form,
531
- .fm-form-container.fm-theme' . $theme_id . ' .minimize-form {'.
532
- 'border-' . $border . ':' . $form_theme['CBPBorderType'] . ' !important;'.
533
  '}';
534
  break;
535
- }
536
- else {
537
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .closing-form,
538
- .fm-form-container.fm-theme' . $theme_id . ' .minimize-form {'.
539
- ( (isset($form_theme['CBPBorderWidth']) && $form_theme['CBPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['CBPBorderWidth'] . 'px !important;' : '').
540
- ( !empty($form_theme['CBPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['CBPBorderType'] . ' !important;' : '').
541
- ( !empty($form_theme['CBPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['CBPBorderColor'] . ' !important;' : '').
542
  '}';
543
  }
544
  }
545
  }
546
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .closing-form:hover,
547
- .fm-form-container.fm-theme' . $theme_id . ' .minimize-form:hover {'.
548
- ( !empty($form_theme['CBHPBGColor']) ? 'background:' . $form_theme['CBHPBGColor'] . ';' : '').
549
- ( !empty($form_theme['CBHPColor']) ? 'color:' . $form_theme['CBHPColor'] . ';' : '').
550
- 'border:none;'.
551
  '}';
552
- if ( $borders['CBHP'] ) {
553
- foreach ( $borders['CBHP'] as $border ) {
554
- if ( !empty($form_theme['CBHPBorderType']) && ( $form_theme['CBHPBorderType'] == 'inherit' || $form_theme['CBHPBorderType'] == 'initial') ) {
555
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .closing-form:hover,
556
- .fm-form-container.fm-theme' . $theme_id . ' .minimize-form:hover {'.
557
- 'border-' . $border .':' . $form_theme['CBHPBorderType'] . ' !important;'.
558
  '}';
559
  break;
560
- }
561
- else {
562
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .closing-form:hover,
563
- .fm-form-container.fm-theme' . $theme_id . ' .minimize-form:hover {'.
564
- ( (isset($form_theme['CBHPBorderWidth']) && $form_theme['CBHPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['CBHPBorderWidth'] . 'px !important;' : '').
565
- ( !empty($form_theme['CBHPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['CBHPBorderType'] . ' !important;' : '').
566
- ( !empty($form_theme['CBHPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['CBHPBorderColor'] . ' !important;' : '').
567
  '}';
568
  }
569
  }
570
  }
571
- $user_agent = $_SERVER['HTTP_USER_AGENT'];
572
- if ( stripos($user_agent, 'Safari') !== FALSE && stripos($user_agent, 'Chrome') === FALSE ) {
573
  $css_content .= '.fm-popover-container:before {
574
  position:absolute;
575
  }';
576
  }
577
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform-required {'.
578
- ( !empty($form_theme['OPRColor']) ? 'color:' . $form_theme['OPRColor'] . ';' : '').
579
  '}';
580
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form input(not:active) {'.
581
- ( !empty($form_theme['OPFontStyle']) ? 'font-style:' . $form_theme['OPFontStyle'] . ';' : '').
582
- ( !empty($form_theme['OPDeInputColor']) ? 'color:' . $form_theme['OPDeInputColor'] . ' !important;' : '').
583
  '}';
584
 
585
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .file-picker {'.
586
- ( !empty($form_theme['OPFBgUrl']) ? 'display: inline-block; width: 22px; height: 22px; background: url("' . WDFM()->plugin_url . '/' . $form_theme['OPFBgUrl'] . '");' : '').
587
- ( !empty($form_theme['OPFBGRepeat']) ? 'background-repeat:' . $form_theme['OPFBGRepeat'] . ';' : '').
588
- ( !empty($form_theme['OPFPos1']) ? 'background-position-x:' . $form_theme['OPFPos1'] . ';' : '').
589
- ( !empty($form_theme['OPFPos2']) ? 'background-position-y:' . $form_theme['OPFPos2'] . ';' : '').
590
  '}';
591
- if (empty($form_theme['OPFBgUrl'])) {
592
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .file-upload-status {' .
593
  'display: none;' .
594
  '}';
595
  }
596
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .file-upload input {' .
597
- ( !empty($form_theme['OPFBgUrl']) ? 'position: absolute; visibility: hidden;' : 'border: none;') .
598
  '}';
599
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form {'.
600
- ( !empty($form_theme['GPBGColor']) ? 'background:' . $form_theme['GPBGColor'] . ';' : '').
601
- ( !empty($form_theme['GPFontFamily']) ? 'font-family:' . $form_theme['GPFontFamily'] . ';' : '').
602
  '}';
603
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform_section {'.
604
- ( (!empty($form_theme['GPBGColor']) && !empty($form_theme['SEPBGColor']) && $form_theme['GPBGColor'] != $form_theme['SEPBGColor']) ? 'background:' . $form_theme['SEPBGColor'] . ';' : '').
605
  '}';
606
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type="text"],
607
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-corner-all,
@@ -613,8 +601,8 @@ class FMModelForm_maker {
613
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-spinner-input,
614
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form select,
615
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .captcha_img,
616
- .fm-form-container.fm-theme' . $theme_id . ' .fm-form .arithmetic_captcha_img {'.
617
- ( !empty($form_theme['IPHeight']) ? 'height:' . $form_theme['IPHeight'] . 'px;' : '').
618
  '}';
619
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type="text"],
620
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-corner-all:not(.ui-spinner):not(.ui-slider-horizontal),
@@ -625,8 +613,8 @@ class FMModelForm_maker {
625
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form textarea,
626
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-spinner-input,
627
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .file-upload-status,
628
- .fm-form-container.fm-theme' . $theme_id . ' .fm-form select {'.
629
- ( !empty($form_theme['IPPadding']) ? 'padding:' . $form_theme['IPPadding'] . ';' : '').
630
  '}';
631
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type="text"],
632
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-corner-all,
@@ -637,18 +625,18 @@ class FMModelForm_maker {
637
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form textarea,
638
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-spinner-input,
639
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .file-upload-status,
640
- .fm-form-container.fm-theme' . $theme_id . ' .fm-form select {'.
641
- ( !empty($form_theme['IPMargin']) ? 'margin:' . $form_theme['IPMargin'] . ';' : '').
642
- ( !empty($form_theme['IPBGColor']) ? 'background-color:' . $form_theme['IPBGColor'] . ';' : '').
643
- ( !empty($form_theme['IPFontWeight']) ? 'font-weight:' . $form_theme['IPFontWeight'] . ';' : '').
644
- ( !empty($form_theme['IPFontSize']) ? 'font-size:' . $form_theme['IPFontSize'] . 'px;' : '').
645
- ( !empty($form_theme['IPColor']) ? 'color:' . $form_theme['IPColor'] . ';' : '').
646
- ( (isset($form_theme['IPBorderRadius']) && $form_theme['IPBorderRadius'] !== '') ? 'border-radius:' . $form_theme['IPBorderRadius'] . 'px !important;' : '').
647
- ( !empty($form_theme['IPBoxShadow']) ? 'box-shadow:' . $form_theme['IPBoxShadow'] . ';' : '').
648
  '}';
649
- if ( $borders['IP'] ) {
650
- foreach ( $borders['IP'] as $border ) {
651
- if ( !empty($form_theme['IPBorderType']) && ($form_theme['IPBorderType'] == 'inherit' || $form_theme['IPBorderType'] == 'initial') ) {
652
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type="text"]:not(.ui-spinner-input),
653
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type="number"]:not(.ui-spinner-input),
654
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type=password],
@@ -658,17 +646,16 @@ class FMModelForm_maker {
658
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-spinner,
659
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-slider,
660
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-slider-handle,
661
- .fm-form-container.fm-theme' . $theme_id . ' .fm-form select {'.
662
- 'border-' . $border . '-style:' . $form_theme['IPBorderType'] . ' !important;'.
663
  '}';
664
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-spinner-button {'.
665
- 'border-left-style:' . $form_theme['IPBorderType'] . ' !important;'.
666
  '}';
667
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-slider-range {'.
668
  '}';
669
  break;
670
- }
671
- else {
672
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type="text"]:not(.ui-spinner-input),
673
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type="number"]:not(.ui-spinner-input),
674
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type=password],
@@ -678,337 +665,327 @@ class FMModelForm_maker {
678
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-spinner,
679
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-slider,
680
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-slider-handle,
681
- .fm-form-container.fm-theme' . $theme_id . ' .fm-form select {'.
682
- ( (isset($form_theme['IPBorderWidth']) && $form_theme['IPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['IPBorderWidth'] . 'px !important;' : '').
683
- ( !empty($form_theme['IPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['IPBorderType'] . ' !important;' : '').
684
- ( !empty($form_theme['IPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['IPBorderColor'] . ' !important;' : '').
685
  '}';
686
  if ( $border == 'left' ) {
687
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-spinner-button {'.
688
- ( (isset($form_theme['IPBorderWidth']) && $form_theme['IPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['IPBorderWidth'] . 'px !important;' : '').
689
- ( !empty($form_theme['IPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['IPBorderType'] . ' !important;' : '').
690
- ( !empty($form_theme['IPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['IPBorderColor'] . ' !important;' : '').
691
  '}';
692
  }
693
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-slider-range {'.
694
- ( !empty($form_theme['IPBorderColor']) ? 'background:' . $form_theme['IPBorderColor'] . ' !important;' : '').
695
  '}';
696
  }
697
  }
698
  }
699
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form select {'.
700
- ( !empty($form_theme['IPBGColor']) ? 'background-color:' . $form_theme['IPBGColor'] . ';' : '').
701
- ( !empty($form_theme['SBPBackground']) ? 'background-image: url("' . WDFM()->plugin_url . '/' . $form_theme['SBPBackground'] . '");' : '').
702
- ( !empty($form_theme['SBPBGRepeat']) ? 'background-repeat:' . $form_theme['SBPBGRepeat'] . ';' : '').
703
- ( !empty($form_theme['SBPBackground']) ? 'background-position-x: calc(100% - 8px);' : '').
704
- ( !empty($form_theme['SBPBackground']) ? 'background-position-y: 50%;' : '').
705
- ( !empty($form_theme['SBPBackground']) ? 'background-size: 12px;' : '').
706
- ( !empty($form_theme['SBPAppearance']) ? 'appearance:' . $form_theme['SBPAppearance'] . ';' : '').
707
- ( !empty($form_theme['SBPAppearance']) ? '-moz-appearance:' . $form_theme['SBPAppearance'] . ';' : '').
708
- ( !empty($form_theme['SBPAppearance']) ? '-webkit-appearance:' . $form_theme['SBPAppearance'] . ';' : '').
709
  '}';
710
- $css_content .= '.rtl .fm-form-container.fm-theme' . $theme_id . ' .fm-form select {'.
711
- ( !empty($form_theme['SBPBackground']) ? 'background-position-x: 8px;' : '').
712
  '}';
713
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .radio-div label span {'.
714
- ( !empty($form_theme['SCPWidth']) ? 'width:' . $form_theme['SCPWidth'] . 'px;' : '').
715
- ( !empty($form_theme['SCPHeight']) ? 'height:' . $form_theme['SCPHeight'] . 'px;' : '').
716
- ( !empty($form_theme['SCPMargin']) ? 'margin:' . $form_theme['SCPMargin'] . ';' : '').
717
- ( !empty($form_theme['SCPBGColor']) ? 'background-color:' . $form_theme['SCPBGColor'] . ';' : '').
718
- ( !empty($form_theme['SCPBoxShadow']) ? 'box-shadow:' . $form_theme['SCPBoxShadow'] . ';' : '').
719
- ( (isset($form_theme['SCPBorderRadius']) && $form_theme['SCPBorderRadius'] !== '') ? 'border-radius:' . $form_theme['SCPBorderRadius'] . 'px;' : '').
720
- ( !empty($form_theme['SCPWidth']) ? 'min-width:' . $form_theme['SCPWidth'] . 'px;' : '').
721
  '}';
722
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .radio-div input[type="radio"]:checked + label span:after {'.
723
- ( !empty($form_theme['SCCPWidth']) ? 'content:""; display: block;' : '').
724
- ( !empty($form_theme['SCCPWidth']) ? 'width:' . $form_theme['SCCPWidth'] . 'px;' : '').
725
- ( !empty($form_theme['SCCPHeight']) ? 'height:' . $form_theme['SCCPHeight'] . 'px;' : '').
726
- ( !empty($form_theme['SCCPMargin']) ? 'margin:' . $form_theme['SCCPMargin'] . 'px;' : '').
727
- ( !empty($form_theme['SCCPBGColor']) ? 'background-color:' . $form_theme['SCCPBGColor'] . ';' : '').
728
- ( (isset($form_theme['SCCPBorderRadius']) && $form_theme['SCCPBorderRadius'] !== '') ? 'border-radius:' . $form_theme['SCCPBorderRadius'] . 'px;' : '').
729
  '}';
730
- if ( !empty($borders['SCP']) ) {
731
- foreach ( $borders['SCP'] as $border ) {
732
- if ( !empty($form_theme['SCPBorderType']) && ($form_theme['SCPBorderType'] == 'inherit' || $form_theme['SCPBorderType'] == 'initial') ) {
733
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .radio-div label span {'.
734
- 'border-' . $border . '-style:' . $form_theme['SCPBorderType'] . ' !important;'.
735
  '}';
736
  break;
737
- }
738
- else {
739
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .radio-div label span {'.
740
- ( (isset($form_theme['SCPBorderWidth']) && $form_theme['SCPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['SCPBorderWidth'] . 'px !important;' : '').
741
- ( !empty($form_theme['SCPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['SCPBorderType'] . ' !important;' : '').
742
- ( !empty($form_theme['SCPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['SCPBorderColor'] . ' !important;' : '').
743
  '}';
744
  }
745
  }
746
  }
747
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .checkbox-div label span {'.
748
- ( !empty($form_theme['MCPWidth']) ? 'width:' . $form_theme['MCPWidth'] . 'px;' : '').
749
- ( !empty($form_theme['MCPHeight']) ? 'height:' . $form_theme['MCPHeight'] . 'px;' : '').
750
- ( !empty($form_theme['MCPMargin']) ? 'margin:' . $form_theme['MCPMargin'] . ';' : '').
751
- ( !empty($form_theme['MCPBGColor']) ? 'background-color:' . $form_theme['MCPBGColor'] . ';' : '').
752
- ( !empty($form_theme['MCPBoxShadow']) ? 'box-shadow:' . $form_theme['MCPBoxShadow'] . ';' : '').
753
- ( (isset($form_theme['MCPBorderRadius']) && $form_theme['MCPBorderRadius'] !== '') ? 'border-radius:' . $form_theme['MCPBorderRadius'] . 'px;' : '').
754
- ( !empty($form_theme['MCPWidth']) ? 'min-width:' . $form_theme['MCPWidth'] . 'px;' : '').
755
  '}';
756
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .checkbox-div input[type="checkbox"]:checked + label span:after {'.
757
- ( (!empty($form_theme['MCCPBackground']) || !empty($form_theme['MCCPBGColor'])) ? 'content:""; display: block;' : '').
758
- ( !empty($form_theme['MCCPWidth']) ? 'width:' . $form_theme['MCCPWidth'] . 'px;' : '').
759
- ( !empty($form_theme['MCCPHeight']) ? 'height:' . $form_theme['MCCPHeight'] . 'px;' : '').
760
- ( !empty($form_theme['MCPMargin']) ? 'margin:' . $form_theme['MCCPMargin'] . 'px;' : '').
761
- ( !empty($form_theme['MCCPBGColor']) ? 'background-color:' . $form_theme['MCCPBGColor'] . ';' : '').
762
- ( !empty($form_theme['MCCPBackground']) ? 'background-image: url("' . WDFM()->plugin_url . '/' . $form_theme['MCCPBackground'] .'");' : '').
763
- ( !empty($form_theme['MCCPBGRepeat']) ? 'background-repeat:' . $form_theme['MCCPBGRepeat'] . ';' : '').
764
- ( !empty($form_theme['MCCPBGPos1']) ? 'background-position-x:' . $form_theme['MCCPBGPos1'] . ';' : '').
765
- ( !empty($form_theme['MCCPBGPos2']) ? 'background-position-y:' . $form_theme['MCCPBGPos2'] . ';' : '').
766
- ( (isset($form_theme['MCCPBorderRadius']) && $form_theme['MCCPBorderRadius'] !== '') ? 'border-radius:' . $form_theme['MCCPBorderRadius'] . 'px;' : '').
767
  '}';
768
- if ( !empty($borders['MCP']) ) {
769
- foreach ( $borders['MCP'] as $border ) {
770
- if ( !empty($form_theme['MCPBorderType']) && ($form_theme['MCPBorderType'] == 'inherit' || $form_theme['MCPBorderType'] == 'initial') ) {
771
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .checkbox-div label span {'.
772
- 'border-' . $border . '-style:' . $form_theme['MCPBorderType'] . ' !important;'.
773
  '}';
774
  break;
775
- }
776
- else {
777
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .checkbox-div label span {'.
778
- ( (isset($form_theme['MCPBorderWidth']) && $form_theme['MCPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['MCPBorderWidth'] . 'px !important;' : '').
779
- ( !empty($form_theme['MCPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['MCPBorderType'] . ' !important;' : '').
780
- ( !empty($form_theme['MCPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['MCPBorderColor'] . ' !important;' : '').
781
  '}';
782
  }
783
  }
784
  }
785
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .button-submit,
786
  .fm-form-container.fm-theme' . $theme_id . ' .button-reset {' .
787
- ( !empty($form_theme['SPBGColor']) ? 'background-image: none; text-transform: none;' : '') .
788
  '}';
789
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-submit {'.
790
- ( !empty($form_theme['SPWidth']) ? 'width:' . $form_theme['SPWidth'] . 'px !important;' : '').
791
- ( !empty($form_theme['SPHeight']) ? 'height:' . $form_theme['SPHeight'] . 'px !important;' : '').
792
- ( !empty($form_theme['SPMargin']) ? 'margin:' . $form_theme['SPMargin'] . ' !important;' : '').
793
- ( !empty($form_theme['SPPadding']) ? 'padding:' . $form_theme['SPPadding'] . ' !important;' : '').
794
- ( !empty($form_theme['SPBGColor']) ? 'background-color:' . $form_theme['SPBGColor'] . ' !important;' : '').
795
- ( !empty($form_theme['SPBGColor']) ? 'background-image: none; border: none;' : '').
796
- ( !empty($form_theme['SPFontWeight']) ? 'font-weight:' . $form_theme['SPFontWeight'] . ' !important;' : '').
797
- ( !empty($form_theme['SPFontSize']) ? 'font-size:' . $form_theme['SPFontSize'] . 'px !important;' : '').
798
- ( !empty($form_theme['SPColor']) ? 'color:' . $form_theme['SPColor'] . ' !important;' : '').
799
- ( !empty($form_theme['SPBoxShadow']) ? 'box-shadow:' . $form_theme['SPBoxShadow'] . ' !important;' : '').
800
- ( (isset($form_theme['SPBorderRadius']) && $form_theme['SPBorderRadius'] !== '') ? 'border-radius:' . $form_theme['SPBorderRadius'] . 'px !important;' : '').
801
  '}';
802
- if ( !empty($borders['SP']) ) {
803
- foreach ( $borders['SP'] as $border ) {
804
- if ( !empty($form_theme['SPBorderType']) && ($form_theme['SPBorderType'] == 'inherit' || $form_theme['SPBorderType'] == 'initial') ) {
805
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-submit {'.
806
- 'border-' . $border . '-style:' . $form_theme['SPBorderType'] . ' !important;'.
807
  '}';
808
  break;
809
- }
810
- else {
811
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-submit {'.
812
- ( (isset($form_theme['SPBorderWidth']) && $form_theme['SPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['SPBorderWidth'] . 'px !important;' : '').
813
- ( !empty($form_theme['SPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['SPBorderType'] . ' !important;' : '').
814
- ( !empty($form_theme['SPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['SPBorderColor'] . ' !important;' : '').
815
  '}';
816
  }
817
  }
818
  }
819
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-submit:hover {'.
820
- ( !empty($form_theme['SHPBGColor']) ? 'background-color:' . $form_theme['SHPBGColor'] . ' !important;' : '').
821
- ( !empty($form_theme['SHPColor']) ? 'color:' . $form_theme['SHPColor'] . ' !important;' : '').
822
  '}';
823
- if ( !empty($borders['SHP']) ) {
824
- foreach ( $borders['SHP'] as $border ) {
825
- if ( !empty($form_theme['SHPBorderType']) && ($form_theme['SHPBorderType'] == 'inherit' || $form_theme['SHPBorderType'] == 'initial') ) {
826
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-submit:hover {'.
827
- 'border-' . $border . '-style:' . $form_theme['SHPBorderType'] . ' !important;'.
828
  '}';
829
  break;
830
- }
831
- else {
832
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-submit:hover {'.
833
- ( (isset($form_theme['SHPBorderWidth']) && $form_theme['SHPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['SHPBorderWidth'] . 'px !important;' : '').
834
- ( !empty($form_theme['SHPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['SHPBorderType'] . ' !important;' : '').
835
- ( !empty($form_theme['SHPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['SHPBorderColor'] . ' !important;' : '').
836
  '}';
837
  }
838
  }
839
  }
840
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-reset,
841
- .fm-form-container.fm-theme' . $theme_id . ' .fm-form button { '.
842
- ( !empty($form_theme['BPWidth']) ? 'width:' . $form_theme['BPWidth'] . 'px !important;' : '').
843
- ( !empty($form_theme['BPHeight']) ? 'height:' . $form_theme['BPHeight'] . 'px !important;' : '').
844
- ( !empty($form_theme['BPMargin']) ? 'margin:' . $form_theme['BPMargin'] . ' !important;' : '').
845
- ( !empty($form_theme['BPPadding']) ? 'padding:' . $form_theme['BPPadding'] . ' !important;' : '').
846
- ( !empty($form_theme['BPBGColor']) ? 'background-color:' . $form_theme['BPBGColor'] . ' !important;' : '').
847
- ( !empty($form_theme['BPBGColor']) ? 'background-image: none;' : '').
848
- ( !empty($form_theme['BPFontWeight']) ? 'font-weight:' . $form_theme['BPFontWeight'] . ' !important;' : '').
849
- ( !empty($form_theme['BPFontSize']) ? 'font-size:' . $form_theme['BPFontSize'] . 'px !important;' : '').
850
- ( !empty($form_theme['BPColor']) ? 'color:' . $form_theme['BPColor'] . ' !important;' : '').
851
- ( (isset($form_theme['BPBorderRadius']) && $form_theme['BPBorderRadius'] !== '') ? 'border-radius:' . $form_theme['BPBorderRadius'] . 'px;' : '').
852
- ( !empty($form_theme['BPBoxShadow']) ? 'box-shadow:' . $form_theme['BPBoxShadow'] . ' !important;' : '').
853
  '}';
854
- if ( !empty($borders['BP']) ) {
855
- foreach ( $borders['BP'] as $border ) {
856
- if ( !empty($form_theme['BPBorderType']) && ($form_theme['BPBorderType'] == 'inherit' || $form_theme['BPBorderType'] == 'initial') ) {
857
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-reset,
858
- .fm-form-container.fm-theme' . $theme_id . ' .fm-form button {'.
859
- 'border-' . $border . '-style:' . $form_theme['BPBorderType'] . ' !important;'.
860
  '}';
861
  break;
862
- }
863
- else {
864
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-reset,
865
- .fm-form-container.fm-theme' . $theme_id . ' .fm-form button {'.
866
- ( (isset($form_theme['BPBorderWidth']) && $form_theme['BPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['BPBorderWidth'] . 'px !important;' : '').
867
- ( !empty($form_theme['BPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['BPBorderType'] . ' !important;' : '').
868
- ( !empty($form_theme['BPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['BPBorderColor'] . ' !important;' : '').
869
  '}';
870
  }
871
  }
872
  }
873
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-reset:hover,
874
- .fm-form-container.fm-theme' . $theme_id . ' .fm-form button:hover {'.
875
- ( !empty($form_theme['BHPBGColor']) ? 'background-color:' . $form_theme['BHPBGColor'] . ' !important;' : '').
876
- ( !empty($form_theme['BHPColor']) ? 'color:' . $form_theme['BHPColor'] . ' !important;' : '').
877
  '}';
878
- if ( !empty($borders['BHP']) ) {
879
- foreach ( $borders['BHP'] as $border ) {
880
- if ( !empty($form_theme['BHPBorderType']) && ($form_theme['BHPBorderType'] == 'inherit' || $form_theme['BHPBorderType'] == 'initial') ) {
881
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-reset:hover,
882
- .fm-form-container.fm-theme' . $theme_id . ' .fm-form button:hover {'.
883
- 'border-' . $border . '-style:' . $form_theme['BHPBorderType'] . ' !important;'.
884
  '}';
885
  break;
886
- }
887
- else {
888
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-reset:hover,
889
- .fm-form-container.fm-theme' . $theme_id . ' .fm-form button:hover {'.
890
- ( (isset($form_theme['BHPBorderWidth']) && $form_theme['BHPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['BHPBorderWidth'] . 'px !important;' : '').
891
- ( !empty($form_theme['BHPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['BHPBorderType'] . ' !important;' : '').
892
- ( !empty($form_theme['BHPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['BHPBorderColor'] . ' !important;' : '').
893
  '}';
894
  }
895
  }
896
  }
897
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .next-page div.wdform-page-button {'.
898
- ( !empty($form_theme['NBPWidth']) ? 'width:' . $form_theme['NBPWidth'] . 'px !important;' : '').
899
- ( !empty($form_theme['NBPHeight']) ? 'height:' . $form_theme['NBPHeight'] . 'px !important;' : '').
900
- ( !empty($form_theme['NBPMargin']) ? 'margin:' . $form_theme['NBPMargin'] . ' !important;' : '').
901
- ( !empty($form_theme['NBPPadding']) ? 'padding:' . $form_theme['NBPPadding'] . ' !important;' : '').
902
- ( !empty($form_theme['NBPBGColor']) ? 'background-color:' . $form_theme['NBPBGColor'] . ' !important;' : '').
903
- ( !empty($form_theme['BPFontWeight']) ? 'font-weight:' . $form_theme['BPFontWeight'] . ' !important;' : '').
904
- ( !empty($form_theme['BPFontSize']) ? 'font-size:' . $form_theme['BPFontSize'] . 'px !important;' : '').
905
- ( !empty($form_theme['NBPColor']) ? 'color:' . $form_theme['NBPColor'] . ' !important;' : '').
906
- ( (isset($form_theme['NBPBorderRadius']) && $form_theme['NBPBorderRadius'] !== '') ? 'border-radius:' . $form_theme['NBPBorderRadius'] . 'px;' : '').
907
- ( !empty($form_theme['NBPBoxShadow']) ? 'box-shadow:' . $form_theme['NBPBoxShadow'] . ' !important;' : '').
908
  '}';
909
- if ( !empty($borders['NBP']) ) {
910
- foreach ( $borders['NBP'] as $border ) {
911
- if ( !empty($form_theme['NBPBorderType']) && ($form_theme['NBPBorderType'] == 'inherit' || $form_theme['NBPBorderType'] == 'initial') ) {
912
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .next-page div.wdform-page-button {'.
913
- 'border-' . $border . '-style:' . $form_theme['NBPBorderType'] . ' !important;'.
914
  '}';
915
  break;
916
- }
917
- else {
918
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .next-page div.wdform-page-button {'.
919
- ( (isset($form_theme['NBPBorderWidth']) && $form_theme['NBPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['NBPBorderWidth'] . 'px !important;' : '').
920
- ( !empty($form_theme['NBPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['NBPBorderType'] . ' !important;' : '').
921
- ( !empty($form_theme['NBPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['NBPBorderColor'] . ' !important;' : '').
922
  '}';
923
  }
924
  }
925
  }
926
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .next-page div.wdform-page-button:hover {'.
927
- ( !empty($form_theme['NBHPBGColor']) ? 'background-color:' . $form_theme['NBHPBGColor'] . ' !important;' : '').
928
- ( !empty($form_theme['NBHPColor']) ? 'color:' . $form_theme['NBHPColor'] . ' !important;' : '').
929
  '}';
930
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-minimize-text div {'.
931
- ( !empty($form_theme['MBPBGColor']) ? 'background-color:' . $form_theme['MBPBGColor'] . ' !important;' : '').
932
- ( !empty($form_theme['MBPColor']) ? 'color:' . $form_theme['MBPColor'] . ' !important;' : '').
933
  '}';
934
- if ( !empty($borders['NBHP']) ) {
935
- foreach ( $borders['NBHP'] as $border ) {
936
- if ( !empty($form_theme['NBHPBorderType']) && ($form_theme['NBHPBorderType'] == 'inherit' || $form_theme['NBHPBorderType'] == 'initial') ) {
937
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .next-page div.wdform-page-button:hover {'.
938
- 'border-' . $border . '-style:' . $form_theme['NBHPBorderType'] . ' !important;'.
939
  '}';
940
  break;
941
- }
942
- else {
943
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .next-page div.wdform-page-button:hover {'.
944
- ( (isset($form_theme['NBHPBorderWidth']) && $form_theme['NBHPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['NBHPBorderWidth'] . 'px !important;' : '').
945
- ( !empty($form_theme['NBHPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['NBHPBorderType'] . ' !important;' : '').
946
- ( !empty($form_theme['NBHPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['NBHPBorderColor'] . ' !important;' : '').
947
  '}';
948
  }
949
  }
950
  }
951
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .previous-page div.wdform-page-button {'.
952
- ( !empty($form_theme['PBPWidth']) ? 'width:' . $form_theme['PBPWidth'] . 'px !important;' : '').
953
- ( !empty($form_theme['PBPHeight']) ? 'height:' . $form_theme['PBPHeight'] . 'px !important;' : '').
954
- ( !empty($form_theme['PBPMargin']) ? 'margin:' . $form_theme['PBPMargin'] . ' !important;' : '').
955
- ( !empty($form_theme['PBPPadding']) ? 'padding:' . $form_theme['PBPPadding'] . ' !important;' : '').
956
- ( !empty($form_theme['PBPBGColor']) ? 'background-color:' . $form_theme['PBPBGColor'] . ' !important;' : '').
957
- ( !empty($form_theme['BPFontWeight']) ? 'font-weight:' . $form_theme['BPFontWeight'] . ' !important;' : '').
958
- ( !empty($form_theme['BPFontSize']) ? 'font-size:' . $form_theme['BPFontSize'] . 'px !important;' : '').
959
- ( !empty($form_theme['PBPColor']) ? 'color:' . $form_theme['PBPColor'] . ' !important;' : '').
960
- ( (isset($form_theme['PBPBorderRadius']) && $form_theme['PBPBorderRadius'] !== '') ? 'border-radius:' . $form_theme['PBPBorderRadius'] . 'px;' : '').
961
- ( !empty($form_theme['PBPBoxShadow']) ? 'box-shadow:' . $form_theme['PBPBoxShadow'] . ' !important;' : '').
962
  '}';
963
- if ( !empty($borders['PBP']) ) {
964
- foreach ( $borders['PBP'] as $border ) {
965
- if ( !empty($form_theme['PBPBorderType']) && ($form_theme['PBPBorderType'] == 'inherit' || $form_theme['PBPBorderType'] == 'initial') ) {
966
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .previous-page div.wdform-page-button {'.
967
- 'border-' . $border . '-style:' . $form_theme['PBPBorderType'] . ' !important;'.
968
  '}';
969
  break;
970
- }
971
- else {
972
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .previous-page div.wdform-page-button {'.
973
- ( (isset($form_theme['PBPBorderWidth']) && $form_theme['PBPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['PBPBorderWidth'] . 'px !important;' : '').
974
- ( !empty($form_theme['PBPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['PBPBorderType'] . ' !important;' : '').
975
- ( !empty($form_theme['PBPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['PBPBorderColor'] . ' !important;' : '').
976
  '}';
977
  }
978
  }
979
  }
980
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .previous-page div.wdform-page-button:hover {'.
981
- ( !empty($form_theme['PBHPBGColor']) ? 'background-color:' . $form_theme['PBHPBGColor'] . ' !important;' : '').
982
- ( !empty($form_theme['PBHPColor']) ? 'color:' . $form_theme['PBHPColor'] . ' !important;' : '').
983
  '}';
984
- if ( !empty($borders['PBHP']) ) {
985
- foreach ( $borders['PBHP'] as $border ) {
986
- if ( !empty($form_theme['PBHPBorderType']) && ($form_theme['PBHPBorderType'] == 'inherit' || $form_theme['PBHPBorderType'] == 'initial') ) {
987
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .previous-page div.wdform-page-button:hover {'.
988
- 'border-' . $border . '-style:' . $form_theme['PBHPBorderType'] . ' !important;'.
989
  '}';
990
  break;
991
- }
992
- else {
993
- $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .previous-page div.wdform-page-button:hover {'.
994
- ( (isset($form_theme['PBHPBorderWidth']) && $form_theme['PBHPBorderWidth'] !== '') ? 'border-' . $border . ':' . $form_theme['PBHPBorderWidth'] . 'px !important;' : '').
995
- ( !empty($form_theme['PBHPBorderType']) ? 'border-' . $border . '-style:' . $form_theme['PBHPBorderType'] . ' !important;' : '').
996
- ( !empty($form_theme['PBHPBorderColor']) ? 'border-' . $border . '-color:' . $form_theme['PBHPBorderColor'] . ' !important;' : '').
997
  '}';
998
  }
999
  }
1000
  }
1001
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type="radio"] {' .
1002
- ( !empty($form_theme['SCCPWidth']) ? 'display: none;' : '') .
1003
  '}
1004
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type="checkbox"] {' .
1005
- ( !empty($form_theme['MCCPBackground']) || !empty($form_theme['MCCPBGColor']) ? 'display: none;' : '') .
1006
  '}';
1007
  }
1008
- if ( !empty($form_theme['CUPCSS']) ) {
1009
  $pattern = '/\/\/(.+)(\r\n|\r|\n)/';
1010
- $form_theme_css = $form_theme['CUPCSS'];
1011
- if ( strpos($form_theme_css, ':checked + label') !== FALSE ) {
1012
  $form_theme_css .= '
1013
  .checkbox-div label span {
1014
  border: 1px solid #868686 !important;
@@ -1056,28 +1033,27 @@ class FMModelForm_maker {
1056
  line-height: 13px;
1057
  }';
1058
  }
1059
- $form_theme_css = explode('{', $form_theme_css);
1060
- $count_after_explod_theme = count($form_theme_css);
1061
  for ( $i = 0; $i < $count_after_explod_theme; $i++ ) {
1062
- $body_or_classes[$i] = explode('}', $form_theme_css[$i]);
1063
  }
1064
  for ( $i = 0; $i < $count_after_explod_theme; $i++ ) {
1065
  if ( $i == 0 ) {
1066
- $body_or_classes[$i][0] = '.fm-form-container.fm-theme' . $theme_id . ' .fm-form' . ' ' . str_replace(',', ', .fm-form-container.fm-theme' . $theme_id . ' .fm-form', $body_or_classes[$i][0]);
1067
- }
1068
- else {
1069
- $body_or_classes[$i][1] = '.fm-form-container.fm-theme' . $theme_id . ' .fm-form' . ' ' . str_replace(',', ', .fm-form-container.fm-theme' . $theme_id . ' .fm-form', $body_or_classes[$i][1]);
1070
  }
1071
  }
1072
  for ( $i = 0; $i < $count_after_explod_theme; $i++ ) {
1073
- $body_or_classes_implode[$i] = implode('}', $body_or_classes[$i]);
1074
  }
1075
- $theme = implode('{', $body_or_classes_implode);
1076
- $theme = preg_replace($pattern, ' ', $theme);
1077
- $css_content .= str_replace('[SITE_ROOT]', WDFM()->plugin_url, $theme);
1078
  }
1079
  $this->fm_css_content = $css_content;
1080
- file_put_contents($frontend_css, $css_content);
1081
  }
1082
 
1083
  /**
@@ -1087,134 +1063,141 @@ class FMModelForm_maker {
1087
  * @return array|mixed
1088
  */
1089
  public function savedata( $form, $id ) {
1090
- $fm_settings = get_option('fm_settings');
1091
  $all_files = array();
1092
  $correct = FALSE;
1093
  $id_for_old = $id;
1094
  if ( !$form->form_front ) {
1095
  $id = '';
1096
  }
1097
- if ( isset($_POST["counter" . $id]) ) {
1098
- $counter = esc_html($_POST["counter" . $id]);
1099
- if ( (isset($_POST["save_or_submit" . $id]) && $_POST["save_or_submit" . $id] != 'save') ) {
1100
- if ( isset($_POST["captcha_input"]) ) {
1101
- $captcha_input = esc_html($_POST["captcha_input"]);
1102
- $session_wd_captcha_code = isset($_SESSION[$id . '_wd_captcha_code']) ? $_SESSION[$id . '_wd_captcha_code'] : '-';
1103
- if ( md5($captcha_input) == $session_wd_captcha_code ) {
1104
  $correct = TRUE;
1105
- }
1106
- else {
1107
- $_SESSION['massage_after_submit' . $id] = addslashes(addslashes(__('Error, incorrect Security code.', WDFM()->prefix)));
1108
- $_SESSION['message_captcha'] = $_SESSION['massage_after_submit' . $id];
1109
- $_SESSION['error_or_no' . $id] = 1;
1110
- }
1111
- }
1112
- elseif ( isset($_POST["arithmetic_captcha_input"]) ) {
1113
- $arithmetic_captcha_input = esc_html($_POST["arithmetic_captcha_input"]);
1114
- $session_wd_arithmetic_captcha_code = isset($_SESSION[$id . '_wd_arithmetic_captcha_code']) ? $_SESSION[$id . '_wd_arithmetic_captcha_code'] : '-';
1115
- if ( md5($arithmetic_captcha_input) == $session_wd_arithmetic_captcha_code ) {
1116
  $correct = TRUE;
1117
- }
1118
- else {
1119
- $_SESSION['massage_after_submit' . $id] = addslashes(addslashes(__('Error, incorrect Security code.', WDFM()->prefix)));
1120
- $_SESSION['message_captcha'] = $_SESSION['massage_after_submit' . $id];
1121
- $_SESSION['error_or_no' . $id] = 1;
1122
- }
1123
- }
1124
- elseif ( isset($_POST["g-recaptcha-response"]) ) {
1125
- $privatekey = isset($fm_settings['private_key']) ? $fm_settings['private_key'] : '';
1126
- $captcha = $_POST['g-recaptcha-response'];
1127
  $url = 'https://www.google.com/recaptcha/api/siteverify';
1128
  $data = array(
1129
  'secret' => $privatekey,
1130
  'response' => $captcha,
1131
- 'remoteip' => $_SERVER['REMOTE_ADDR'],
1132
  );
1133
- $response = wp_remote_post( $url, array('body' => $data) );
1134
- if (!is_wp_error($response)) {
1135
- $jsonResponse = json_decode(wp_remote_retrieve_body($response), true);
1136
- if ($jsonResponse['success'] == "true") {
1137
  $correct = TRUE;
1138
- }
1139
- else {
1140
- if (isset($jsonResponse['error-codes'])) {
1141
- foreach ($jsonResponse['error-codes'] as $errorcode) {
1142
- switch ($errorcode) {
1143
  case 'missing-input-secret' :
1144
  case 'invalid-input-secret' : {
1145
- $_SESSION['massage_after_submit' . $id] = addslashes(addslashes(__('Error, incorrect secret code.', WDFM()->prefix)));
1146
  break;
1147
  }
1148
  case 'missing-input-response' :
1149
  case 'invalid-input-response' :
1150
  case 'bad-request' :
1151
  default: {
1152
- $_SESSION['massage_after_submit' . $id] = addslashes(addslashes(__('Verification failed.', WDFM()->prefix)));
1153
  break;
1154
  }
1155
  }
1156
  }
 
 
1157
  }
1158
- else {
1159
- $_SESSION['massage_after_submit' . $id] = addslashes(addslashes(__('Verification failed.', WDFM()->prefix)));
1160
- }
1161
- $_SESSION['message_captcha'] = $_SESSION['massage_after_submit' . $id];
1162
- $_SESSION['error_or_no' . $id] = 1;
1163
  $correct = FALSE;
1164
  }
1165
- }
1166
- else {
1167
- $_SESSION['massage_after_submit' . $id] = addslashes(addslashes(__('Verification failed.', WDFM()->prefix)));
1168
- $_SESSION['message_captcha'] = $_SESSION['massage_after_submit' . $id];
1169
- $_SESSION['error_or_no' . $id] = 1;
1170
  $correct = FALSE;
1171
  }
1172
- }
1173
- else {
1174
- if ( preg_match('(type_arithmetic_captcha|type_captcha|type_recaptcha)', $form->label_order_current) === 1 ) {
1175
- $_SESSION['massage_after_submit' . $id] = addslashes(addslashes(__('Error, incorrect Security code.', WDFM()->prefix)));
1176
- $_SESSION['message_captcha'] = $_SESSION['massage_after_submit' . $id];
1177
- $_SESSION['error_or_no' . $id] = 1;
1178
  $correct = FALSE;
1179
- }
1180
- else {
1181
  $correct = TRUE;
1182
  }
1183
  }
1184
- }
1185
- else {
1186
  $correct = TRUE;
1187
  }
1188
  if ( $correct ) {
1189
- $ip = $_SERVER['REMOTE_ADDR'];
1190
  global $wpdb;
1191
- $blocked_ip = $wpdb->get_var($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE ip="%s"', $ip));
1192
  if ( $blocked_ip ) {
1193
- $_SESSION['massage_after_submit' . $id] = addslashes(__('Your ip is blacklisted. Please contact the website administrator.', WDFM()->prefix));
1194
- wp_redirect($_SERVER["REQUEST_URI"]);//to be checked
1195
  exit;
1196
  }
1197
- if ( isset($_POST["save_or_submit" . $id]) && $_POST["save_or_submit" . $id] == 'save' ) {
1198
- if (WDFM()->is_free != 2) {
1199
- do_action('WD_FM_SAVE_PROG_save_progress_init', array('id' => $id, 'addon_task' => 'save_progress'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1200
  }
1201
  return $all_files;
1202
  }
1203
  else {
1204
- $result_temp = $this->save_db($counter, $id_for_old);
1205
- $all_files = $result_temp[0];
1206
- if ( is_numeric($all_files) ) {
1207
- $this->remove($all_files, $id_for_old);
1208
- $_SESSION['massage_after_submit' . $id] = $result_temp[1];
1209
- $_SESSION['error_or_no' . $id] = 1;
1210
  }
1211
  else {
1212
- if (WDFM()->is_free != 2) {
1213
- do_action('WD_FM_SAVE_PROG_save_progress_init', array('id' => $id, 'addon_task' => 'clear_data'));
1214
- }
1215
- if ( isset($counter) ) {
1216
- $this->gen_mail($counter, $all_files, $id_for_old, $result_temp[1]);
1217
  }
 
1218
  }
1219
  }
1220
  }
@@ -1236,20 +1219,20 @@ class FMModelForm_maker {
1236
  global $wpdb;
1237
  $query = "SELECT `" . $label_column . "` FROM " . $table . $where . " ORDER BY " . $order_by;
1238
  if ( $db_info ) {
1239
- $temp = explode('@@@wdfhostwdf@@@', $db_info);
1240
- $host = $temp[0];
1241
- $temp = explode('@@@wdfportwdf@@@', $temp[1]);
1242
- $temp = explode('@@@wdfusernamewdf@@@', $temp[1]);
1243
- $username = $temp[0];
1244
- $temp = explode('@@@wdfpasswordwdf@@@', $temp[1]);
1245
- $password = $temp[0];
1246
- $temp = explode('@@@wdfdatabasewdf@@@', $temp[1]);
1247
- $database = $temp[0];
1248
- $wpdb_temp = new wpdb($username, $password, $database, $host);
1249
- $choices_labels = $wpdb_temp->get_results($query, ARRAY_N);
1250
- }
1251
- else {
1252
- $choices_labels = $wpdb->get_results($query, ARRAY_N);
1253
  }
1254
 
1255
  return $choices_labels;
@@ -1268,137 +1251,86 @@ class FMModelForm_maker {
1268
  global $wpdb;
1269
  $query = "SELECT `" . $value_column . "` FROM " . $table . $where . " ORDER BY " . $order_by;
1270
  if ( $db_info ) {
1271
- $temp = explode('@@@wdfhostwdf@@@', $db_info);
1272
- $host = $temp[0];
1273
- $temp = explode('@@@wdfportwdf@@@', $temp[1]);
1274
- $temp = explode('@@@wdfusernamewdf@@@', $temp[1]);
1275
- $username = $temp[0];
1276
- $temp = explode('@@@wdfpasswordwdf@@@', $temp[1]);
1277
- $password = $temp[0];
1278
- $temp = explode('@@@wdfdatabasewdf@@@', $temp[1]);
1279
- $database = $temp[0];
1280
- $wpdb_temp = new wpdb($username, $password, $database, $host);
1281
- $choices_values = $wpdb_temp->get_results($query, ARRAY_N);
1282
- }
1283
- else {
1284
- $choices_values = $wpdb->get_results($query, ARRAY_N);
1285
  }
1286
 
1287
  return $choices_values;
1288
  }
1289
 
1290
  /**
1291
- * @param $counter
1292
  * @param $id
1293
  *
1294
- * @return array
1295
  */
1296
- public function save_db( $counter, $id ) {
1297
  global $wpdb;
1298
- $frontend_parmas = array();
1299
- $frontend_parmas['form_id'] = $id;
 
1300
  $current_user = wp_get_current_user();
1301
  if ( $current_user->ID != 0 ) {
1302
  $wp_userid = $current_user->ID;
1303
  $wp_username = $current_user->display_name;
1304
  $wp_useremail = $current_user->user_email;
1305
  }
1306
- else {
1307
- $wp_userid = '';
1308
- $wp_username = '';
1309
- $wp_useremail = '';
1310
- }
1311
- $ip = $_SERVER['REMOTE_ADDR'];
1312
  $chgnac = TRUE;
1313
- $all_files = array();
1314
  $paypal = array();
 
 
1315
  $paypal['item_name'] = array();
1316
  $paypal['quantity'] = array();
1317
  $paypal['amount'] = array();
1318
- $is_amount = FALSE;
1319
  $paypal['on_os'] = array();
 
1320
  $total = 0;
1321
  $form_currency = '$';
1322
- $currency_code = array(
1323
- 'USD',
1324
- 'EUR',
1325
- 'GBP',
1326
- 'JPY',
1327
- 'CAD',
1328
- 'MXN',
1329
- 'HKD',
1330
- 'HUF',
1331
- 'NOK',
1332
- 'NZD',
1333
- 'SGD',
1334
- 'SEK',
1335
- 'PLN',
1336
- 'AUD',
1337
- 'DKK',
1338
- 'CHF',
1339
- 'CZK',
1340
- 'ILS',
1341
- 'BRL',
1342
- 'TWD',
1343
- 'MYR',
1344
- 'PHP',
1345
- 'THB',
1346
- );
1347
- $currency_sign = array(
1348
- '$',
1349
- '&#8364;',
1350
- '&#163;',
1351
- '&#165;',
1352
- 'C$',
1353
- 'Mex$',
1354
- 'HK$',
1355
- 'Ft',
1356
- 'kr',
1357
- 'NZ$',
1358
- 'S$',
1359
- 'kr',
1360
- 'zl',
1361
- 'A$',
1362
- 'kr',
1363
- 'CHF',
1364
- 'Kc',
1365
- '&#8362;',
1366
- 'R$',
1367
- 'NT$',
1368
- 'RM',
1369
- '&#8369;',
1370
- '&#xe3f;',
1371
- );
1372
- $form = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id= %d", $id));
1373
- if ( !$form->form_front ) {
1374
  $id = '';
1375
  }
1376
  if ( $form->payment_currency ) {
1377
- $form_currency = $currency_sign[array_search($form->payment_currency, $currency_code)];
1378
  }
1379
  $label_id = array();
1380
  $label_label = array();
1381
  $label_type = array();
1382
- $disabled_fields = explode(',', (isset($_REQUEST["disabled_fields" . $id]) ? $_REQUEST["disabled_fields" . $id] : ""));
1383
- $disabled_fields = array_slice($disabled_fields, 0, count($disabled_fields) - 1);
1384
- $label_all = explode('#****#', $form->label_order_current);
1385
- $label_all = array_slice($label_all, 0, count($label_all) - 1);
1386
  foreach ( $label_all as $key => $label_each ) {
1387
- $label_id_each = explode('#**id**#', $label_each);
1388
- array_push($label_id, $label_id_each[0]);
1389
- $label_order_each = explode('#**label**#', $label_id_each[1]);
1390
- array_push($label_label, $label_order_each[0]);
1391
- array_push($label_type, $label_order_each[1]);
1392
  }
1393
- $max = $wpdb->get_var("SELECT MAX( group_id ) FROM " . $wpdb->prefix . "formmaker_submits");
1394
  $fvals = array();
1395
  foreach ( $label_type as $key => $type ) {
1396
  $value = '';
1397
  if ( $type == "type_submit_reset" or $type == "type_map" or $type == "type_editor" or $type == "type_captcha" or $type == "type_arithmetic_captcha" or $type == "type_recaptcha" or $type == "type_button" or $type == "type_paypal_total" or $type == "type_send_copy" ) {
1398
  continue;
1399
  }
1400
- $i = $label_id[$key];
1401
- if ( !in_array($i, $disabled_fields) ) {
1402
  switch ( $type ) {
1403
  case 'type_text':
1404
  case 'type_password':
@@ -1407,152 +1339,145 @@ class FMModelForm_maker {
1407
  case "type_country":
1408
  case "type_number":
1409
  case "type_phone_new": {
1410
- $value = isset($_POST['wdform_' . $i . "_element" . $id]) ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : "";
1411
  break;
1412
  }
1413
  case "type_date": {
1414
- $value = isset($_POST['wdform_' . $i . "_element" . $id]) ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : "";
1415
- $date_format = isset($_POST['wdform_' . $i . "_date_format" . $id]) ? esc_html($_POST['wdform_' . $i . "_date_format" . $id]) : "";
1416
  if ( $value ) {
1417
- if ( !$this->fm_validateDate($value, $date_format) ) {
1418
- echo "<script> alert('" . addslashes(__("This is not a valid date format.", 'form_maker')) . "');</script>";
1419
-
1420
- return array( $max + 1 );
1421
  }
1422
  }
1423
  break;
1424
  }
1425
  case "type_date_new": {
1426
- $value = isset($_POST['wdform_' . $i . "_element" . $id]) ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : "";
1427
  break;
1428
  }
1429
  case "type_date_range": {
1430
- $value = (isset($_POST['wdform_' . $i . "_element" . $id . "0"]) ? esc_html($_POST['wdform_' . $i . "_element" . $id . "0"]) : "") . ' - ' . (isset($_POST['wdform_' . $i . "_element" . $id . "1"]) ? esc_html($_POST['wdform_' . $i . "_element" . $id . "1"]) : "");
1431
  break;
1432
  }
1433
  case 'type_textarea': {
1434
- $value = isset($_POST['wdform_' . $i . "_element" . $id]) ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : "";
1435
  break;
1436
  }
1437
  case "type_wdeditor": {
1438
- $value = isset($_POST['wdform_' . $i . '_wd_editor' . $id]) ? esc_html($_POST['wdform_' . $i . '_wd_editor' . $id]) : "";
1439
  break;
1440
  }
1441
  case "type_mark_map": {
1442
- $value = (isset($_POST['wdform_' . $i . "_long" . $id]) ? esc_html($_POST['wdform_' . $i . "_long" . $id]) : "") . '***map***' . (isset($_POST['wdform_' . $i . "_lat" . $id]) ? esc_html($_POST['wdform_' . $i . "_lat" . $id]) : "");
1443
  break;
1444
  }
1445
  case "type_date_fields": {
1446
- $value = (isset($_POST['wdform_' . $i . "_day" . $id]) ? esc_html($_POST['wdform_' . $i . "_day" . $id]) : "") . '-' . (isset($_POST['wdform_' . $i . "_month" . $id]) ? esc_html($_POST['wdform_' . $i . "_month" . $id]) : "") . '-' . (isset($_POST['wdform_' . $i . "_year" . $id]) ? esc_html($_POST['wdform_' . $i . "_year" . $id]) : "");
1447
  break;
1448
  }
1449
  case "type_time": {
1450
- $ss = isset($_POST['wdform_' . $i . "_ss" . $id]) ? esc_html($_POST['wdform_' . $i . "_ss" . $id]) : NULL;
1451
- if ( isset($ss) ) {
1452
- $value = (isset($_POST['wdform_' . $i . "_hh" . $id]) ? esc_html($_POST['wdform_' . $i . "_hh" . $id]) : "") . ':' . (isset($_POST['wdform_' . $i . "_mm" . $id]) ? esc_html($_POST['wdform_' . $i . "_mm" . $id]) : "") . ':' . (isset($_POST['wdform_' . $i . "_ss" . $id]) ? esc_html($_POST['wdform_' . $i . "_ss" . $id]) : "");
1453
- }
1454
- else {
1455
- $value = (isset($_POST['wdform_' . $i . "_hh" . $id]) ? esc_html($_POST['wdform_' . $i . "_hh" . $id]) : "") . ':' . (isset($_POST['wdform_' . $i . "_mm" . $id]) ? esc_html($_POST['wdform_' . $i . "_mm" . $id]) : "");
1456
- }
1457
- $am_pm = isset($_POST['wdform_' . $i . "_am_pm" . $id]) ? esc_html($_POST['wdform_' . $i . "_am_pm" . $id]) : NULL;
1458
- if ( isset($am_pm) ) {
1459
  $value = $value . ' ' . $am_pm;
1460
  }
1461
  break;
1462
  }
1463
  case "type_phone": {
1464
- $value = (isset($_POST['wdform_' . $i . "_element_first" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_first" . $id]) : "") . ' ' . (isset($_POST['wdform_' . $i . "_element_last" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_last" . $id]) : "");
1465
  break;
1466
  }
1467
  case "type_name": {
1468
- $element_title = isset($_POST['wdform_' . $i . "_element_title" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_title" . $id]) : NULL;
1469
- $element_middle = isset($_POST['wdform_' . $i . "_element_middle" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_middle" . $id]) : NULL;
1470
- if ( isset($element_title) || isset($element_middle) ) {
1471
- $value = (isset($_POST['wdform_' . $i . "_element_title" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_title" . $id]) : "") . '@@@' . (isset($_POST['wdform_' . $i . "_element_first" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_first" . $id]) : "") . '@@@' . (isset($_POST['wdform_' . $i . "_element_last" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_last" . $id]) : "") . '@@@' . (isset($_POST['wdform_' . $i . "_element_middle" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_middle" . $id]) : "");
1472
- }
1473
- else {
1474
- $value = (isset($_POST['wdform_' . $i . "_element_first" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_first" . $id]) : "") . '@@@' . (isset($_POST['wdform_' . $i . "_element_last" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_last" . $id]) : "");
1475
  }
1476
  break;
1477
  }
1478
  case "type_file_upload": {
1479
  if ( WDFM()->is_demo ) {
1480
  $value = '';
1481
- }
1482
- else {
1483
- if ( isset($_POST['wdform_' . $i . "_file_url" . $id . '_save']) ) {
1484
- $file_url = isset($_POST['wdform_' . $i . "_file_url" . $id . '_save']) ? stripslashes($_POST['wdform_' . $i . "_file_url" . $id . '_save']) : NULL;
1485
- if ( isset($file_url) ) {
1486
- $all_files = isset($_POST['wdform_' . $i . "_all_files" . $id . '_save']) ? json_decode(stripslashes($_POST['wdform_' . $i . "_all_files" . $id . '_save']), TRUE) : array();
1487
  $value = $file_url;
1488
  }
1489
- }
1490
- else {
1491
  $upload_dir = wp_upload_dir();
1492
- $files = isset($_FILES['wdform_' . $i . '_file' . $id]) ? $_FILES['wdform_' . $i . '_file' . $id] : NULL;
1493
- foreach ( $files['name'] as $file_key => $file_name ) {
 
1494
  if ( $file_name ) {
1495
  $untilupload = $form->form_fields;
1496
- $untilupload = substr($untilupload, strpos($untilupload, $i . '*:*id*:*type_file_upload'), -1);
1497
- $untilupload = substr($untilupload, 0, strpos($untilupload, '*:*new_field*:'));
1498
- $untilupload = explode('*:*w_field_label_pos*:*', $untilupload);
1499
- $untilupload = $untilupload[1];
1500
- $untilupload = explode('*:*w_destination*:*', $untilupload);
1501
- $destination = explode('*:*w_hide_label*:*', $untilupload[0]);
1502
- $destination = $destination[1];
1503
- $destination = str_replace($upload_dir['baseurl'], '', $destination);
1504
- $destination = ltrim($destination, '/');
1505
- $destination = rtrim($destination, '/');
1506
- $untilupload = $untilupload[1];
1507
- $untilupload = explode('*:*w_extension*:*', $untilupload);
1508
- $extension = $untilupload[0];
1509
- $untilupload = $untilupload[1];
1510
- $untilupload = explode('*:*w_max_size*:*', $untilupload);
1511
- $max_size = $untilupload[0];
1512
- $untilupload = $untilupload[1];
1513
- $fileName = $files['name'][$file_key];
1514
- $fileSize = $files['size'][$file_key];
1515
  if ( $fileSize > $max_size * 1024 ) {
1516
- return array(
1517
- $max + 1,
1518
- addslashes(__('The file exceeds the allowed size of', 'form_maker')) . $max_size . ' KB',
1519
- );
1520
  }
1521
- $uploadedFileNameParts = explode('.', $fileName);
1522
- $uploadedFileExtension = array_pop($uploadedFileNameParts);
1523
- $to = strlen($fileName) - strlen($uploadedFileExtension) - 1;
1524
- $fileNameFree = substr($fileName, 0, $to);
1525
- $invalidFileExts = explode(',', $extension);
1526
  $extOk = FALSE;
1527
  foreach ( $invalidFileExts as $key => $valuee ) {
1528
- if ( is_numeric(strpos(strtolower($valuee), strtolower($uploadedFileExtension))) ) {
1529
  $extOk = TRUE;
1530
  }
1531
  }
1532
  if ( $extOk == FALSE ) {
1533
- return array( $max + 1, addslashes(__('Can not upload this type of file', 'form_maker')) );
1534
  }
1535
- $fileTemp = $files['tmp_name'][$file_key];
1536
  $p = 1;
1537
- if ( !file_exists($upload_dir['basedir'] . '/' . $destination) ) {
1538
- $array_dir = explode('/', $destination);
1539
- if ( !empty($array_dir) ) {
1540
- $dirTmp = $upload_dir['basedir'] . '/';
1541
  foreach ( $array_dir as $dir ) {
1542
- if ( !empty($dir) ) {
1543
  $dirTmp .= $dir . '/';
1544
- if ( !is_dir($dirTmp) ) {
1545
- mkdir($dirTmp, 0777);
1546
  }
1547
  }
1548
  }
1549
  }
1550
  }
1551
- if ( file_exists($upload_dir['basedir'] . '/' . $destination . "/" . $fileName) ) {
1552
  $fileName1 = $fileName;
1553
- while ( file_exists($upload_dir['basedir'] . '/' . $destination . "/" . $fileName1) ) {
1554
- $to = strlen($file_name) - strlen($uploadedFileExtension) - 1;
1555
- $fileName1 = substr($fileName, 0, $to) . '(' . $p . ').' . $uploadedFileExtension;
1556
  // $file['name'] = $fileName;
1557
  $p++;
1558
  }
@@ -1561,174 +1486,168 @@ class FMModelForm_maker {
1561
  // for dropbox & google drive integration addons
1562
  $check_both = 0;
1563
  if ( $form->save_uploads == 0 ) {
1564
- if ( defined('WD_FM_DBOX_INT') && is_plugin_active(constant('WD_FM_DBOX_INT')) ) {
1565
- $enable = $wpdb->get_var("SELECT enable FROM " . $wpdb->prefix . "formmaker_dbox_int WHERE form_id=" . $form->id);
1566
  if ( $enable == 1 ) {
1567
- $selectable_upload = $wpdb->get_var("SELECT selectable_upload FROM " . $wpdb->prefix . "formmaker_dbox_int WHERE form_id=" . $form->id);
1568
- if ( (int) $selectable_upload == 1 ) {
1569
- $temp_dir_dbox = explode('\\', $fileTemp);
1570
- $temp_dir_dbox = implode('%%', $temp_dir_dbox);
1571
  $value .= $temp_dir_dbox . '*@@url@@*' . $fileName;
1572
- }
1573
- else {
1574
- $dbox_folder_name = preg_replace('/[^A-Z|a-z|0-9|\-|\\|\/]/', '', $form->title);
1575
- $dlink_dbox = '<a href="' . add_query_arg(array(
1576
- 'action' => 'WD_FM_DBOX_INT',
1577
- 'addon_task' => 'upload_dbox_file',
1578
- 'form_id' => $form->id,
1579
- ), admin_url('admin-ajax.php')) . '&dbox_file_name=' . $fileName . '&dbox_folder_name=/' . $dbox_folder_name . '" >' . $fileName . '</a>';
1580
  $value .= $dlink_dbox;
1581
  }
1582
- $files['tmp_name'][$file_key] = $fileTemp;
1583
  $temp_file = array(
1584
- "name" => $files['name'][$file_key],
1585
- "type" => $files['type'][$file_key],
1586
- "tmp_name" => $files['tmp_name'][$file_key],
1587
  'field_key' => $i,
1588
  );
1589
- }
1590
- else {
1591
  $check_both++;
1592
  }
1593
- }
1594
- else {
1595
  $check_both++;
1596
  }
1597
- if ( defined('WD_FM_GDRIVE_INT') && is_plugin_active(constant('WD_FM_GDRIVE_INT')) ) {
1598
- $enable = $wpdb->get_var("SELECT enable FROM " . $wpdb->prefix . "formmaker_gdrive_int WHERE form_id=" . $form->id);
1599
  if ( $enable == 1 ) {
1600
- $selectable_upload = $wpdb->get_var("SELECT selectable_upload FROM " . $wpdb->prefix . "formmaker_gdrive_int WHERE form_id=" . $form->id);
1601
- if ( (int) $selectable_upload == 1 ) {
1602
- $temp_dir_dbox = explode('\\', $fileTemp);
1603
- $temp_dir_dbox = implode('%%', $temp_dir_dbox);
1604
- $value .= 'wdCloudAddon' . $temp_dir_dbox . '*@@url@@*' . $fileName . '*@@url@@*' . $files['type'][$file_key];
1605
- }
1606
- else {
1607
- $dlink_dbox = '<a target="_blank" href="' . add_query_arg(array(
1608
- 'action' => 'WD_FM_GDRIVE_INT',
1609
- 'addon_task' => 'create_drive_link',
1610
- 'id' => $form->id,
1611
- ), admin_url('admin-ajax.php')) . '&gdrive_file_name=' . $fileName . '&gdrive_folder_name=' . $form->title . '" >' . $fileName . '</a>';
1612
  $value .= $dlink_dbox;
1613
  }
1614
- $files['tmp_name'][$file_key] = $fileTemp;
1615
  $temp_file = array(
1616
- "name" => $files['name'][$file_key],
1617
- "type" => $files['type'][$file_key],
1618
- "tmp_name" => $files['tmp_name'][$file_key],
1619
  'field_key' => $i,
1620
  );
1621
- }
1622
- else {
1623
  $check_both++;
1624
  }
1625
- }
1626
- else {
1627
  $check_both++;
1628
  }
1629
  }
1630
  //
1631
  if ( $check_both != 0 ) {
1632
  $value .= '';
1633
- $files['tmp_name'][$file_key] = $fileTemp;
1634
  $temp_file = array(
1635
- "name" => $files['name'][$file_key],
1636
- "type" => $files['type'][$file_key],
1637
- "tmp_name" => $files['tmp_name'][$file_key],
1638
  'field_key' => $i,
1639
  );
1640
  }
1641
  if ( $form->save_uploads == 1 ) {
1642
- if ( !move_uploaded_file($fileTemp, $upload_dir['basedir'] . '/' . $destination . '/' . $fileName) ) {
1643
- return array( $max + 1, addslashes(__('Error, file cannot be moved.', 'form_maker')) );
1644
  }
1645
- $value .= $upload_dir['baseurl'] . '/' . $destination . '/' . $fileName . '*@@url@@*';
1646
- $files['tmp_name'][$file_key] = '/' . $destination . '/' . $fileName;
1647
  $temp_file = array(
1648
- "name" => $files['name'][$file_key],
1649
- "type" => $files['type'][$file_key],
1650
- "tmp_name" => $files['tmp_name'][$file_key],
1651
  'field_key' => $i,
1652
  );
1653
  }
1654
- array_push($all_files, $temp_file);
1655
  }
1656
  }
 
1657
  }
1658
  }
1659
  break;
1660
  }
1661
  case 'type_address': {
1662
  $value = '*#*#*#';
1663
- $element = isset($_POST['wdform_' . $i . "_street1" . $id]) ? esc_html($_POST['wdform_' . $i . "_street1" . $id]) : NULL;
1664
- if ( isset($element) ) {
1665
  $value = $element;
1666
  break;
1667
  }
1668
- $element = isset($_POST['wdform_' . $i . "_street2" . $id]) ? esc_html($_POST['wdform_' . $i . "_street2" . $id]) : NULL;
1669
- if ( isset($element) ) {
1670
  $value = $element;
1671
  break;
1672
  }
1673
- $element = isset($_POST['wdform_' . $i . "_city" . $id]) ? esc_html($_POST['wdform_' . $i . "_city" . $id]) : NULL;
1674
- if ( isset($element) ) {
1675
  $value = $element;
1676
  break;
1677
  }
1678
- $element = isset($_POST['wdform_' . $i . "_state" . $id]) ? esc_html($_POST['wdform_' . $i . "_state" . $id]) : NULL;
1679
- if ( isset($element) ) {
1680
  $value = $element;
1681
  break;
1682
  }
1683
- $element = isset($_POST['wdform_' . $i . "_postal" . $id]) ? esc_html($_POST['wdform_' . $i . "_postal" . $id]) : NULL;
1684
- if ( isset($element) ) {
1685
  $value = $element;
1686
  break;
1687
  }
1688
- $element = isset($_POST['wdform_' . $i . "_country" . $id]) ? esc_html($_POST['wdform_' . $i . "_country" . $id]) : NULL;
1689
- if ( isset($element) ) {
1690
  $value = $element;
1691
  break;
1692
  }
1693
  break;
1694
  }
1695
  case "type_hidden": {
1696
- $value = isset($_POST[$label_label[$key]]) ? esc_html($_POST[$label_label[$key]]) : "";
1697
  break;
1698
  }
1699
  case "type_radio": {
1700
- $element = isset($_POST['wdform_' . $i . "_other_input" . $id]) ? esc_html($_POST['wdform_' . $i . "_other_input" . $id]) : NULL;
1701
- if ( isset($element) ) {
1702
  $value = $element;
1703
  break;
1704
  }
1705
- $value = isset($_POST['wdform_' . $i . "_element" . $id]) ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : "";
1706
  break;
1707
  }
1708
  case "type_checkbox": {
1709
  $start = -1;
1710
  $value = '';
1711
  for ( $j = 0; $j < 100; $j++ ) {
1712
- $element = isset($_POST['wdform_' . $i . "_element" . $id . $j]) ? esc_html($_POST['wdform_' . $i . "_element" . $id . $j]) : NULL;
1713
- if ( isset($element) ) {
1714
  $start = $j;
1715
  break;
1716
  }
1717
  }
1718
  $other_element_id = -1;
1719
- $is_other = isset($_POST['wdform_' . $i . "_allow_other" . $id]) ? esc_html($_POST['wdform_' . $i . "_allow_other" . $id]) : "";
1720
  if ( $is_other == "yes" ) {
1721
- $other_element_id = isset($_POST['wdform_' . $i . "_allow_other_num" . $id]) ? esc_html($_POST['wdform_' . $i . "_allow_other_num" . $id]) : "";
1722
  }
1723
  if ( $start != -1 ) {
1724
  for ( $j = $start; $j < 100; $j++ ) {
1725
- $element = isset($_POST['wdform_' . $i . "_element" . $id . $j]) ? esc_html($_POST['wdform_' . $i . "_element" . $id . $j]) : NULL;
1726
- if ( isset($element) ) {
1727
  if ( $j == $other_element_id ) {
1728
- $value = $value . (isset($_POST['wdform_' . $i . "_other_input" . $id]) ? esc_html($_POST['wdform_' . $i . "_other_input" . $id]) : "") . '***br***';
1729
- }
1730
- else {
1731
- $value = $value . (isset($_POST['wdform_' . $i . "_element" . $id . $j]) ? esc_html($_POST['wdform_' . $i . "_element" . $id . $j]) : "") . '***br***';
1732
  }
1733
  }
1734
  }
@@ -1736,248 +1655,241 @@ class FMModelForm_maker {
1736
  break;
1737
  }
1738
  case "type_paypal_price": {
1739
- $value = isset($_POST['wdform_' . $i . "_element_dollars" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_dollars" . $id]) : 0;
1740
- $value = (int) preg_replace('/\D/', '', $value);
1741
- if ( isset($_POST['wdform_' . $i . "_element_cents" . $id]) ) {
1742
- $value = $value . '.' . (preg_replace('/\D/', '', esc_html($_POST['wdform_' . $i . "_element_cents" . $id])));
1743
  }
1744
- $total += (float) ($value);
1745
  $paypal_option = array();
1746
  if ( $value != 0 ) {
1747
- $quantity = (isset($_POST['wdform_' . $i . "_element_quantity" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) : 1);
1748
- array_push($paypal['item_name'], $label_label[$key]);
1749
- array_push($paypal['quantity'], $quantity);
1750
- array_push($paypal['amount'], $value);
1751
  $is_amount = TRUE;
1752
- array_push($paypal['on_os'], $paypal_option);
1753
  }
1754
  $value = $value . $form_currency;
1755
  break;
1756
  }
1757
  case "type_paypal_price_new": {
1758
- $value = isset($_POST['wdform_' . $i . "_element" . $id]) && $_POST['wdform_' . $i . "_element" . $id] ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : 0;
1759
- $total += (float) ($value);
1760
  $paypal_option = array();
1761
  if ( $value != 0 ) {
1762
- $quantity = (isset($_POST['wdform_' . $i . "_element_quantity" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) : 1);
1763
- array_push($paypal['item_name'], $label_label[$key]);
1764
- array_push($paypal['quantity'], $quantity);
1765
- array_push($paypal['amount'], $value);
1766
  $is_amount = TRUE;
1767
- array_push($paypal['on_os'], $paypal_option);
1768
  }
1769
  $value = $form_currency . $value;
1770
  break;
1771
  }
1772
  case "type_paypal_select": {
1773
- if ( isset($_POST['wdform_' . $i . "_element" . $id]) && $_POST['wdform_' . $i . "_element" . $id] != '' ) {
1774
- $value = esc_html($_POST['wdform_' . $i . "_element_label" . $id]) . ' : ' . $form_currency . (isset($_POST['wdform_' . $i . "_element" . $id]) ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : "");
1775
- }
1776
- else {
1777
- $value = '';
1778
- }
1779
- $quantity = (isset($_POST['wdform_' . $i . "_element_quantity" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) : 1);
1780
- $total += (float) (isset($_POST['wdform_' . $i . "_element" . $id]) ? $_POST['wdform_' . $i . "_element" . $id] : 0) * $quantity;
1781
- array_push($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST['wdform_' . $i . "_element_label" . $id]) ? $_POST['wdform_' . $i . "_element_label" . $id] : ""));
1782
- array_push($paypal['quantity'], $quantity);
1783
- array_push($paypal['amount'], (isset($_POST['wdform_' . $i . "_element" . $id]) ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : ""));
1784
- if ( isset($_POST['wdform_' . $i . "_element" . $id]) && $_POST['wdform_' . $i . "_element" . $id] != 0 ) {
1785
  $is_amount = TRUE;
1786
  }
1787
- $element_quantity = isset($_POST['wdform_' . $i . "_element_quantity" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) : NULL;
1788
- if ( isset($element_quantity) && $value != '' ) {
1789
- $value .= '***br***' . (isset($_POST['wdform_' . $i . "_element_quantity_label" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_quantity_label" . $id]) : "") . ': ' . esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) . '***quantity***';
1790
  }
1791
  $paypal_option = array();
1792
- $paypal_option['on'] = array();
1793
- $paypal_option['os'] = array();
1794
  for ( $k = 0; $k < 50; $k++ ) {
1795
- $temp_val = isset($_POST['wdform_' . $i . "_property" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_property" . $id . $k]) : NULL;
1796
- if ( isset($temp_val) && $value != '' ) {
1797
- array_push($paypal_option['on'], (isset($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) : ""));
1798
- array_push($paypal_option['os'], (isset($_POST['wdform_' . $i . "_property" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_property" . $id . $k]) : ""));
1799
- $value .= '***br***' . (isset($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) : "") . ': ' . (isset($_POST['wdform_' . $i . "_property" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_property" . $id . $k]) : "") . '***property***';
1800
  }
1801
  }
1802
- array_push($paypal['on_os'], $paypal_option);
1803
  break;
1804
  }
1805
  case "type_paypal_radio": {
1806
- $element = isset($_POST['wdform_' . $i . "_element" . $id]) && $_POST['wdform_' . $i . "_element" . $id] ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : '';
 
1807
  if ( $element ) {
1808
- $value = (isset($_POST['wdform_' . $i . "_element_label" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_label" . $id]) : '') . ' : ' . $form_currency . $element;
1809
- }
1810
- else {
1811
- $value = '';
1812
- }
1813
- $quantity = (isset($_POST['wdform_' . $i . "_element_quantity" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) : 1);
1814
- $total += (float) (isset($_POST['wdform_' . $i . "_element" . $id]) ? $_POST['wdform_' . $i . "_element" . $id] : 0) * $quantity;
1815
- array_push($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST['wdform_' . $i . "_element_label" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_label" . $id]) : ""));
1816
- array_push($paypal['quantity'], $quantity);
1817
- array_push($paypal['amount'], (isset($_POST['wdform_' . $i . "_element" . $id]) ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : 0));
1818
- if ( isset($_POST['wdform_' . $i . "_element" . $id]) && $_POST['wdform_' . $i . "_element" . $id] != 0 ) {
1819
  $is_amount = TRUE;
1820
  }
1821
- $element_quantity = isset($_POST['wdform_' . $i . "_element_quantity" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) : NULL;
1822
- if ( isset($element_quantity) && $value != '' ) {
1823
- $value .= '***br***' . (isset($_POST['wdform_' . $i . "_element_quantity_label" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_quantity_label" . $id]) : "") . ': ' . esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) . '***quantity***';
1824
  }
1825
  $paypal_option = array();
1826
- $paypal_option['on'] = array();
1827
- $paypal_option['os'] = array();
1828
  for ( $k = 0; $k < 50; $k++ ) {
1829
- $temp_val = isset($_POST['wdform_' . $i . "_property" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_property" . $id . $k]) : NULL;
1830
- if ( isset($temp_val) && $value != '' ) {
1831
- array_push($paypal_option['on'], (isset($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) : ""));
1832
- array_push($paypal_option['os'], esc_html($_POST['wdform_' . $i . "_property" . $id . $k]));
1833
- $value .= '***br***' . (isset($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) : "") . ': ' . esc_html($_POST['wdform_' . $i . "_property" . $id . $k]) . '***property***';
1834
  }
1835
  }
1836
- array_push($paypal['on_os'], $paypal_option);
1837
  break;
1838
  }
1839
  case "type_paypal_shipping": {
1840
- $element = isset($_POST['wdform_' . $i . "_element" . $id]) && $_POST['wdform_' . $i . "_element" . $id] ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : '';
1841
  if ( $element ) {
1842
- $value = (isset($_POST['wdform_' . $i . "_element_label" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_label" . $id]) : '') . ' : ' . $form_currency . $element;
1843
- }
1844
- else {
1845
  $value = '';
1846
  }
1847
- $paypal['shipping'] = isset($_POST['wdform_' . $i . "_element" . $id]) ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : "";
1848
  break;
1849
  }
1850
  case "type_paypal_checkbox": {
1851
  $start = -1;
1852
  $value = '';
1853
  for ( $j = 0; $j < 100; $j++ ) {
1854
- $element = isset($_POST['wdform_' . $i . "_element" . $id . $j]) ? esc_html($_POST['wdform_' . $i . "_element" . $id . $j]) : NULL;
1855
- if ( isset($element) ) {
1856
  $start = $j;
1857
  break;
1858
  }
1859
  }
1860
  $other_element_id = -1;
1861
- $is_other = isset($_POST['wdform_' . $i . "_allow_other" . $id]) ? esc_html($_POST['wdform_' . $i . "_allow_other" . $id]) : "";
1862
  if ( $is_other == "yes" ) {
1863
- $other_element_id = isset($_POST['wdform_' . $i . "_allow_other_num" . $id]) ? esc_html($_POST['wdform_' . $i . "_allow_other_num" . $id]) : "";
1864
  }
1865
  if ( $start != -1 ) {
1866
  for ( $j = $start; $j < 100; $j++ ) {
1867
- $element = isset($_POST['wdform_' . $i . "_element" . $id . $j]) ? esc_html($_POST['wdform_' . $i . "_element" . $id . $j]) : NULL;
1868
- if ( isset($element) ) {
1869
  if ( $j == $other_element_id ) {
1870
- $value = $value . (isset($_POST['wdform_' . $i . "_other_input" . $id]) ? esc_html($_POST['wdform_' . $i . "_other_input" . $id]) : "") . '***br***';
1871
- }
1872
- else {
1873
- $element = (isset($_POST['wdform_' . $i . "_element" . $id . $j]) && $_POST['wdform_' . $i . "_element" . $id . $j] ? esc_html($_POST['wdform_' . $i . "_element" . $id . $j]) : 0);
1874
- $value = $value . (isset($_POST['wdform_' . $i . "_element" . $id . $j . "_label"]) ? esc_html($_POST['wdform_' . $i . "_element" . $id . $j . "_label"]) : "") . ' - ' . $form_currency . $element . '***br***';
1875
- $quantity = ((isset($_POST['wdform_' . $i . "_element_quantity" . $id]) && ($_POST['wdform_' . $i . "_element_quantity" . $id] >= 1)) ? esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) : 1);
1876
- $total += (float) (isset($_POST['wdform_' . $i . "_element" . $id . $j]) ? $_POST['wdform_' . $i . "_element" . $id . $j] : 0) * (float) ($quantity);
1877
- array_push($paypal['item_name'], $label_label[$key] . ' ' . (isset($_POST['wdform_' . $i . "_element" . $id . $j . "_label"]) ? esc_html($_POST['wdform_' . $i . "_element" . $id . $j . "_label"]) : ""));
1878
- array_push($paypal['quantity'], $quantity);
1879
- array_push($paypal['amount'], (isset($_POST['wdform_' . $i . "_element" . $id . $j]) ? ($_POST['wdform_' . $i . "_element" . $id . $j] == '' ? '0' : esc_html($_POST['wdform_' . $i . "_element" . $id . $j])) : ""));
1880
- if ( isset($_POST['wdform_' . $i . "_element" . $id . $j]) && $_POST['wdform_' . $i . "_element" . $id . $j] != 0 ) {
1881
  $is_amount = TRUE;
1882
  }
1883
  $paypal_option = array();
1884
- $paypal_option['on'] = array();
1885
- $paypal_option['os'] = array();
1886
  for ( $k = 0; $k < 50; $k++ ) {
1887
- $temp_val = isset($_POST['wdform_' . $i . "_property" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_property" . $id . $k]) : NULL;
1888
- if ( isset($temp_val) ) {
1889
- array_push($paypal_option['on'], isset($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) : "");
1890
- array_push($paypal_option['os'], esc_html($_POST['wdform_' . $i . "_property" . $id . $k]));
1891
  }
1892
  }
1893
- array_push($paypal['on_os'], $paypal_option);
1894
  }
1895
  }
1896
  }
1897
- $element_quantity = isset($_POST['wdform_' . $i . "_element_quantity" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) : NULL;
1898
- if ( isset($element_quantity) ) {
1899
- $value .= (isset($_POST['wdform_' . $i . "_element_quantity_label" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_quantity_label" . $id]) : "") . ': ' . esc_html($_POST['wdform_' . $i . "_element_quantity" . $id]) . '***quantity***';
1900
  }
1901
  for ( $k = 0; $k < 50; $k++ ) {
1902
- $temp_val = isset($_POST['wdform_' . $i . "_property" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_property" . $id . $k]) : NULL;
1903
- if ( isset($temp_val) ) {
1904
- $value .= '***br***' . (isset($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) : "") . ': ' . $_POST['wdform_' . $i . "_property" . $id . $k] . '***property***';
1905
  }
1906
  }
1907
  }
1908
  break;
1909
  }
1910
  case "type_star_rating": {
1911
- if ( isset($_POST['wdform_' . $i . "_selected_star_amount" . $id]) && $_POST['wdform_' . $i . "_selected_star_amount" . $id] == "" ) {
1912
  $selected_star_amount = 0;
 
 
1913
  }
1914
- else {
1915
- $selected_star_amount = isset($_POST['wdform_' . $i . "_selected_star_amount" . $id]) ? $_POST['wdform_' . $i . "_selected_star_amount" . $id] : 0;
1916
- }
1917
- $value = $selected_star_amount . '/' . (isset($_POST['wdform_' . $i . "_star_amount" . $id]) ? esc_html($_POST['wdform_' . $i . "_star_amount" . $id]) : "");
1918
  break;
1919
  }
1920
  case "type_scale_rating": {
1921
- $value = (isset($_POST['wdform_' . $i . "_scale_radio" . $id]) ? esc_html($_POST['wdform_' . $i . "_scale_radio" . $id]) : 0) . '/' . (isset($_POST['wdform_' . $i . "_scale_amount" . $id]) ? esc_html($_POST['wdform_' . $i . "_scale_amount" . $id]) : "");
1922
  break;
1923
  }
1924
  case "type_spinner": {
1925
- $value = isset($_POST['wdform_' . $i . "_element" . $id]) ? esc_html($_POST['wdform_' . $i . "_element" . $id]) : "";
1926
  break;
1927
  }
1928
  case "type_slider": {
1929
- $value = isset($_POST['wdform_' . $i . "_slider_value" . $id]) ? esc_html($_POST['wdform_' . $i . "_slider_value" . $id]) : "";
1930
  break;
1931
  }
1932
  case "type_range": {
1933
- $value = (isset($_POST['wdform_' . $i . "_element" . $id . '0']) ? esc_html($_POST['wdform_' . $i . "_element" . $id . '0']) : "") . '-' . (isset($_POST['wdform_' . $i . "_element" . $id . '1']) ? esc_html($_POST['wdform_' . $i . "_element" . $id . '1']) : "");
1934
  break;
1935
  }
1936
  case "type_grading": {
1937
  $value = "";
1938
- $items = explode(":", isset($_POST['wdform_' . $i . "_hidden_item" . $id]) ? esc_html($_POST['wdform_' . $i . "_hidden_item" . $id]) : "");
1939
- for ( $k = 0; $k < sizeof($items) - 1; $k++ ) {
1940
- $value .= (isset($_POST['wdform_' . $i . "_element" . $id . '_' . $k]) ? esc_html($_POST['wdform_' . $i . "_element" . $id . '_' . $k]) : "") . ':';
1941
  }
1942
- $value .= (isset($_POST['wdform_' . $i . "_hidden_item" . $id]) ? esc_html($_POST['wdform_' . $i . "_hidden_item" . $id]) : "") . '***grading***';
1943
  break;
1944
  }
1945
  case "type_matrix": {
1946
- $rows_of_matrix = explode("***", isset($_POST['wdform_' . $i . "_hidden_row" . $id]) ? esc_html($_POST['wdform_' . $i . "_hidden_row" . $id]) : "");
1947
- $rows_count = sizeof($rows_of_matrix) - 1;
1948
- $column_of_matrix = explode("***", isset($_POST['wdform_' . $i . "_hidden_column" . $id]) ? esc_html($_POST['wdform_' . $i . "_hidden_column" . $id]) : "");
1949
- $columns_count = sizeof($column_of_matrix) - 1;
1950
- if ( isset($_POST['wdform_' . $i . "_input_type" . $id]) && $_POST['wdform_' . $i . "_input_type" . $id] == "radio" ) {
1951
  $input_value = "";
1952
  for ( $k = 1; $k <= $rows_count; $k++ ) {
1953
- $input_value .= (isset($_POST['wdform_' . $i . "_input_element" . $id . $k]) ? esc_html($_POST['wdform_' . $i . "_input_element" . $id . $k]) : 0) . "***";
1954
  }
1955
  }
1956
- if ( isset($_POST['wdform_' . $i . "_input_type" . $id]) && $_POST['wdform_' . $i . "_input_type" . $id] == "checkbox" ) {
1957
  $input_value = "";
1958
  for ( $k = 1; $k <= $rows_count; $k++ ) {
1959
  for ( $j = 1; $j <= $columns_count; $j++ ) {
1960
- $input_value .= (isset($_POST['wdform_' . $i . "_input_element" . $id . $k . '_' . $j]) ? esc_html($_POST['wdform_' . $i . "_input_element" . $id . $k . '_' . $j]) : 0) . "***";
1961
  }
1962
  }
1963
  }
1964
- if ( isset($_POST['wdform_' . $i . "_input_type" . $id]) && $_POST['wdform_' . $i . "_input_type" . $id] == "text" ) {
1965
  $input_value = "";
1966
  for ( $k = 1; $k <= $rows_count; $k++ ) {
1967
  for ( $j = 1; $j <= $columns_count; $j++ ) {
1968
- $input_value .= (isset($_POST['wdform_' . $i . "_input_element" . $id . $k . '_' . $j]) ? esc_html($_POST['wdform_' . $i . "_input_element" . $id . $k . '_' . $j]) : "") . "***";
1969
  }
1970
  }
1971
  }
1972
- if ( isset($_POST['wdform_' . $i . "_input_type" . $id]) && $_POST['wdform_' . $i . "_input_type" . $id] == "select" ) {
1973
  $input_value = "";
1974
  for ( $k = 1; $k <= $rows_count; $k++ ) {
1975
  for ( $j = 1; $j <= $columns_count; $j++ ) {
1976
- $input_value .= (isset($_POST['wdform_' . $i . "_select_yes_no" . $id . $k . '_' . $j]) ? esc_html($_POST['wdform_' . $i . "_select_yes_no" . $id . $k . '_' . $j]) : "") . "***";
1977
  }
1978
  }
1979
  }
1980
- $value = $rows_count . (isset($_POST['wdform_' . $i . "_hidden_row" . $id]) ? esc_html($_POST['wdform_' . $i . "_hidden_row" . $id]) : "") . '***' . $columns_count . (isset($_POST['wdform_' . $i . "_hidden_column" . $id]) ? esc_html($_POST['wdform_' . $i . "_hidden_column" . $id]) : "") . '***' . (isset($_POST['wdform_' . $i . "_input_type" . $id]) ? esc_html($_POST['wdform_' . $i . "_input_type" . $id]) : "") . '***' . $input_value . '***matrix***';
1981
  break;
1982
  }
1983
  }
@@ -1988,243 +1900,225 @@ class FMModelForm_maker {
1988
  }
1989
  if ( $type == "type_text" or $type == "type_textarea" or $type == "type_name" or $type == "type_submitter_mail" or $type == "type_number" or $type == "type_phone" or $type == "type_phone_new" ) {
1990
  $untilupload = $form->form_fields;
1991
- $untilupload = substr($untilupload, strpos($untilupload, $i . '*:*id*:*' . $type), -1);
1992
- $untilupload = substr($untilupload, 0, strpos($untilupload, '*:*new_field*:'));
1993
- $untilupload = explode('*:*w_required*:*', $untilupload);
1994
- $untilupload = $untilupload[1];
1995
- $untilupload = explode('*:*w_unique*:*', $untilupload);
1996
- $unique_element = $untilupload[0];
1997
- if ( strlen($unique_element) > 3 ) {
1998
- $unique_element = substr($unique_element, -3);
1999
  }
2000
  if ( $unique_element == 'yes' ) {
2001
- $unique = $wpdb->get_col($wpdb->prepare("SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id= %d and element_label= %s and element_value= %s", $id, $i, addslashes($value)));
2002
  if ( $unique ) {
2003
- return array(
2004
- ($max + 1),
2005
- addslashes(addslashes(sprintf(__('This field %s requires a unique entry.', 'form_maker'), $label_label[$key]))),
2006
- );
2007
  }
2008
  }
2009
  }
2010
  $save_or_no = TRUE;
2011
- $fvals['{' . $i . '}'] = str_replace(array(
2012
- "***map***",
2013
- "*@@url@@*",
2014
- "@@@@@@@@@",
2015
- "@@@",
2016
- "***grading***",
2017
- "***br***",
2018
- ), array( " ", "", " ", " ", " ", ", " ), addslashes($value));
2019
 
2020
- if( $type == 'type_checkbox' ) {
2021
- $fvals['{' . $i . '}'] = rtrim( $fvals['{' . $i . '}'], ', ' );
2022
  }
2023
 
2024
  if ( $form->savedb ) {
2025
- $save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
2026
  'form_id' => $id,
2027
  'element_label' => $i,
2028
- 'element_value' => stripslashes($value),
2029
- 'group_id' => ($max + 1),
2030
- 'date' => date('Y-m-d H:i:s'),
2031
- 'ip' => $_SERVER['REMOTE_ADDR'],
2032
  'user_id_wd' => $current_user->ID,
2033
  ), array(
2034
- '%d',
2035
- '%s',
2036
- '%s',
2037
- '%d',
2038
- '%s',
2039
- '%s',
2040
- '%d',
2041
- ));
2042
  }
2043
  if ( !$save_or_no ) {
2044
- return FALSE;
2045
  }
2046
  $chgnac = FALSE;
2047
- }
2048
- else {
2049
- $fvals['{' . $i . '}'] = '';
2050
  }
2051
  }
2052
- $subid = $wpdb->get_var("SELECT MAX( group_id ) FROM " . $wpdb->prefix . "formmaker_submits");
2053
  $user_fields = array(
2054
- "subid" => $subid,
2055
  "ip" => $ip,
2056
  "userid" => $wp_userid,
2057
  "username" => $wp_username,
2058
  "useremail" => $wp_useremail,
2059
  );
2060
- $queries = $wpdb->get_results($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker_query WHERE form_id=%d", (int) $id));
2061
  if ( $queries ) {
2062
  foreach ( $queries as $query ) {
2063
- $temp = explode('***wdfcon_typewdf***', $query->details);
2064
- $con_type = $temp[0];
2065
- $temp = explode('***wdfcon_methodwdf***', $temp[1]);
2066
- $con_method = $temp[0];
2067
- $temp = explode('***wdftablewdf***', $temp[1]);
2068
- $table_cur = $temp[0];
2069
- $temp = explode('***wdfhostwdf***', $temp[1]);
2070
- $host = $temp[0];
2071
- $temp = explode('***wdfportwdf***', $temp[1]);
2072
- $temp = explode('***wdfusernamewdf***', $temp[1]);
2073
- $username = $temp[0];
2074
- $temp = explode('***wdfpasswordwdf***', $temp[1]);
2075
- $password = $temp[0];
2076
- $temp = explode('***wdfdatabasewdf***', $temp[1]);
2077
- $database = $temp[0];
2078
- $query = str_replace(array_keys($fvals), $fvals, $query->query);
2079
  foreach ( $user_fields as $user_key => $user_field ) {
2080
- $query = str_replace('{' . $user_key . '}', $user_field, $query);
2081
  }
2082
  if ( $con_type == 'remote' ) {
2083
- $wpdb_temp = new wpdb($username, $password, $database, $host);
2084
- $wpdb_temp->query($query);
2085
- }
2086
- else {
2087
- $wpdb->query($query);
2088
  }
2089
  }
2090
  }
2091
 
2092
- /* TODO: remove this code.
2093
- $addons = array( 'WD_FM_MAILCHIMP' => 'MailChimp', 'WD_FM_REG' => 'Registration' );
2094
- foreach ( $addons as $addon => $addon_name ) {
2095
- if ( defined($addon) && is_plugin_active(constant($addon)) ) {
2096
- $_GET['addon_task'] = 'frontend';
2097
- $_GET['form_id'] = $id;
2098
- $GLOBALS['fvals'] = $fvals;
2099
- do_action($addon . '_init');
2100
- }
2101
- }*/
2102
-
2103
  // Get stripe post value.
2104
  $stripe_post_key = 'stripeToken' . $id;
2105
- $stripeToken = WDW_FM_Library::get($stripe_post_key, '');
2106
  if ( $is_amount && $stripeToken ) {
2107
  $wdstripe_products_data = new stdClass();
2108
  $tax = $form->tax;
2109
  $total = $total + ($total * $tax) / 100;
2110
- $shipping = isset($paypal['shipping']) ? $paypal['shipping'] : 0;
2111
  $total = $total + $shipping;
2112
- $total = round($total, 2);
2113
  $wdstripe_products_data->currency = $form->payment_currency;
2114
  $wdstripe_products_data->amount = $total;
2115
  $wdstripe_products_data->shipping = $shipping;
2116
- $wdstripe_products_data = json_encode($wdstripe_products_data);
2117
  $frontend_parmas['wdstripe_stripeToken'] = $stripeToken;
2118
  $frontend_parmas['wdstripe_products_data'] = $wdstripe_products_data;
2119
  }
2120
 
2121
  $str = '';
2122
- if ( $form->paypal_mode && $form->paypal_mode == 1) {
2123
- if ( $paypal['item_name'] ) {
2124
  if ( $is_amount ) {
2125
  $tax = $form->tax;
2126
  $currency = $form->payment_currency;
2127
  $business = $form->paypal_email;
2128
- $ip = $_SERVER['REMOTE_ADDR'];
2129
- $total2 = round($total, 2);
2130
- $save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
2131
  'form_id' => $id,
2132
  'element_label' => 'item_total',
2133
  'element_value' => $form_currency . $total2,
2134
- 'group_id' => ($max + 1),
2135
- 'date' => date('Y-m-d H:i:s'),
2136
  'ip' => $ip,
2137
  'user_id_wd' => $current_user->ID,
2138
  ), array(
2139
- '%d',
2140
- '%s',
2141
- '%s',
2142
- '%d',
2143
- '%s',
2144
- '%s',
2145
- '%d',
2146
- ));
2147
  if ( !$save_or_no ) {
2148
- return FALSE;
2149
  }
2150
  $total = $total + ($total * $tax) / 100;
2151
- if ( isset($paypal['shipping']) ) {
2152
- $total = $total + $paypal['shipping'];
2153
  }
2154
- $total = round($total, 2);
2155
- $save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
2156
  'form_id' => $id,
2157
  'element_label' => 'total',
2158
  'element_value' => $form_currency . $total,
2159
- 'group_id' => ($max + 1),
2160
- 'date' => date('Y-m-d H:i:s'),
2161
  'ip' => $ip,
2162
  'user_id_wd' => $current_user->ID,
2163
  ), array(
2164
- '%d',
2165
- '%s',
2166
- '%s',
2167
- '%d',
2168
- '%s',
2169
- '%s',
2170
- '%d',
2171
- ));
2172
  if ( !$save_or_no ) {
2173
- return FALSE;
2174
  }
2175
- $save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
2176
  'form_id' => $id,
2177
  'element_label' => '0',
2178
  'element_value' => 'In progress',
2179
- 'group_id' => ($max + 1),
2180
- 'date' => date('Y-m-d H:i:s'),
2181
  'ip' => $ip,
2182
  'user_id_wd' => $current_user->ID,
2183
  ), array(
2184
- '%d',
2185
- '%s',
2186
- '%s',
2187
- '%d',
2188
- '%s',
2189
- '%s',
2190
- '%d',
2191
- ));
2192
  if ( !$save_or_no ) {
2193
- return FALSE;
2194
  }
2195
  $str = '';
2196
  if ( $form->checkout_mode == 1 || $form->checkout_mode == "production" ) {
2197
  $str .= "https://www.paypal.com/cgi-bin/webscr?";
2198
- }
2199
- else {
2200
  $str .= "https://www.sandbox.paypal.com/cgi-bin/webscr?";
2201
  }
2202
  $str .= "currency_code=" . $currency;
2203
- $str .= "&business=" . urlencode($business);
2204
  $str .= "&cmd=" . "_cart";
2205
- $str .= "&notify_url=" . admin_url('admin-ajax.php?action=checkpaypal%26form_id=' . $id . '%26group_id=' . ($max + 1));
2206
  $str .= "&upload=" . "1";
2207
  $str .= "&charset=UTF-8";
2208
- if ( isset($paypal['shipping']) ) {
2209
- $str = $str . "&shipping_1=" . $paypal['shipping'];
2210
  // $str=$str."&weight_cart=".$paypal['shipping'];
2211
  // $str=$str."&shipping2=3".$paypal['shipping'];
2212
  $str = $str . "&no_shipping=2";
2213
  }
2214
  $i = 0;
2215
- foreach ( $paypal['item_name'] as $pkey => $pitem_name ) {
2216
- if ( $paypal['amount'][$pkey] ) {
2217
  $i++;
2218
- $str = $str . "&item_name_" . $i . "=" . urlencode($pitem_name);
2219
- $str = $str . "&amount_" . $i . "=" . $paypal['amount'][$pkey];
2220
- $str = $str . "&quantity_" . $i . "=" . $paypal['quantity'][$pkey];
2221
  if ( $tax ) {
2222
  $str = $str . "&tax_rate_" . $i . "=" . $tax;
2223
  }
2224
- if ( $paypal['on_os'][$pkey] ) {
2225
- foreach ( $paypal['on_os'][$pkey]['on'] as $on_os_key => $on_item_name ) {
2226
  $str = $str . "&on" . $on_os_key . "_" . $i . "=" . $on_item_name;
2227
- $str = $str . "&os" . $on_os_key . "_" . $i . "=" . $paypal['on_os'][$pkey]['os'][$on_os_key];
2228
  }
2229
  }
2230
  }
@@ -2233,56 +2127,89 @@ class FMModelForm_maker {
2233
  }
2234
  }
2235
  if ( $form->mail_verify ) {
2236
- unset($_SESSION['hash']);
2237
- unset($_SESSION['gid']);
2238
- $ip = $_SERVER['REMOTE_ADDR'];
2239
- $_SESSION['gid'] = $max + 1;
2240
- $send_tos = explode('**', $form->send_to);
2241
  if ( $send_tos ) {
2242
  foreach ( $send_tos as $send_index => $send_to ) {
2243
- $_SESSION['hash'][] = md5($ip . time() . rand());
2244
- $send_to = str_replace('*', '', $send_to);
2245
- $save_or_no = $wpdb->insert($wpdb->prefix . "formmaker_submits", array(
2246
  'form_id' => $id,
2247
  'element_label' => 'verifyInfo@' . $send_to,
2248
- 'element_value' => $_SESSION['hash'][$send_index] . "**" . $form->mail_verify_expiretime . "**" . $send_to,
2249
- 'group_id' => ($max + 1),
2250
- 'date' => date('Y-m-d H:i:s'),
2251
  'ip' => $ip,
2252
  'user_id_wd' => $current_user->ID,
2253
  ), array(
2254
- '%d',
2255
- '%s',
2256
- '%s',
2257
- '%d',
2258
- '%s',
2259
- '%s',
2260
- '%d',
2261
- ));
2262
  if ( !$save_or_no ) {
2263
- return FALSE;
2264
  }
2265
  }
2266
  }
2267
  }
2268
  if ( $chgnac ) {
2269
  if ( $form->submit_text_type != 4 ) {
2270
- $_SESSION['massage_after_submit' . $id] = addslashes(addslashes(__('Nothing was submitted.', WDFM()->prefix)));
2271
  }
2272
- $_SESSION['error_or_no' . $id] = 1;
2273
- $_SESSION['form_submit_type' . $id] = $form->submit_text_type . "," . $form->id;
2274
- wp_redirect($_SERVER["REQUEST_URI"]);
2275
  exit;
2276
  }
2277
 
2278
- $frontend_parmas['fvals'] = $fvals;
2279
- $frontend_parmas['all_files'] = json_encode($all_files);
2280
- $frontend_parmas['form_currency'] = $form_currency;
 
 
 
 
 
 
 
 
 
 
 
 
2281
 
2282
- if (WDFM()->is_free != 2) {
2283
- do_action('fm_addon_frontend_init', $frontend_parmas);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2284
  }
2285
- return array( $all_files, $str );
2286
  }
2287
 
2288
  /**
@@ -2290,73 +2217,77 @@ class FMModelForm_maker {
2290
  */
2291
  public function remove( $group_id ) {
2292
  global $wpdb;
2293
- $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id= %d', $group_id));
2294
  }
2295
 
2296
  /**
2297
  * @param $form_id
 
2298
  *
2299
  * @return mixed|null|string
2300
  */
2301
- public function get_after_submission_text( $form_id ) {
2302
  global $wpdb;
2303
- $submit_text = $wpdb->get_var("SELECT submit_text FROM " . $wpdb->prefix . "formmaker WHERE id='" . $form_id . "'");
2304
  $current_user = wp_get_current_user();
2305
  if ( $current_user->ID != 0 ) {
2306
  $userid = $current_user->ID;
2307
  $username = $current_user->display_name;
2308
  $useremail = $current_user->user_email;
2309
- }
2310
- else {
2311
  $userid = '';
2312
  $username = '';
2313
  $useremail = '';
2314
  }
 
2315
  $ip = $_SERVER['REMOTE_ADDR'];
2316
- $subid = $wpdb->get_var("SELECT MAX( group_id ) FROM " . $wpdb->prefix . "formmaker_submits");
2317
- $row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id=%d", $form_id));
 
2318
  $label_order_original = array();
2319
  $label_order_ids = array();
2320
  $submission_array = array();
2321
- $label_all = explode('#****#', $row->label_order_current);
2322
- $label_all = array_slice($label_all, 0, count($label_all) - 1);
2323
  foreach ( $label_all as $key => $label_each ) {
2324
- $label_id_each = explode('#**id**#', $label_each);
2325
- $label_id = $label_id_each[0];
2326
- array_push($label_order_ids, $label_id);
2327
- $label_order_each = explode('#**label**#', $label_id_each[1]);
2328
- $label_order_original[$label_id] = $label_order_each[0];
2329
  }
2330
- $submissions_row = $wpdb->get_results($wpdb->prepare("SELECT `element_label`, `element_value` FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id=%d AND group_id=%d", $form_id, $subid));
2331
  foreach ( $submissions_row as $sub_row ) {
2332
- $submission_array[$sub_row->element_label] = $sub_row->element_value;
2333
  }
2334
  foreach ( $label_order_original as $key => $label_each ) {
2335
- if ( strpos($submit_text, "%" . $label_each . "%") > -1 ) {
2336
- $submit_text = str_replace("%" . $label_each . "%", $submission_array[$key], $submit_text);
2337
  }
2338
  }
2339
  $custom_fields = array(
2340
- "subid" => $subid,
2341
  "ip" => $ip,
 
2342
  "userid" => $userid,
2343
- "username" => $username,
2344
  "useremail" => $useremail,
 
 
 
2345
  );
2346
  foreach ( $custom_fields as $key => $custom_field ) {
2347
- if ( strpos($submit_text, "%" . $key . "%") > -1 ) {
2348
- $submit_text = str_replace("%" . $key . "%", $custom_field, $submit_text);
2349
- }
2350
  }
2351
- $submit_text = str_replace(array(
2352
- "***map***",
2353
- "*@@url@@*",
2354
- "@@@@@@@@@",
2355
- "@@@",
2356
- "***grading***",
2357
- "***br***",
2358
- "***star_rating***",
2359
- ), array( " ", "", " ", " ", " ", ", ", " " ), $submit_text);
2360
 
2361
  return $submit_text;
2362
  }
@@ -2366,151 +2297,106 @@ class FMModelForm_maker {
2366
  */
2367
  public function increment_views_count( $id ) {
2368
  global $wpdb;
2369
- $vives_form = $wpdb->get_var($wpdb->prepare("SELECT views FROM " . $wpdb->prefix . "formmaker_views WHERE form_id=%d", $id));
2370
- if ( isset($vives_form) ) {
2371
  $vives_form = $vives_form + 1;
2372
- $wpdb->update($wpdb->prefix . "formmaker_views", array(
2373
  'views' => $vives_form,
2374
  ), array( 'form_id' => $id ), array(
2375
- '%d',
2376
- ), array( '%d' ));
2377
- }
2378
- else {
2379
- $wpdb->insert($wpdb->prefix . 'formmaker_views', array(
2380
  'form_id' => $id,
2381
  'views' => 1,
2382
  ), array(
2383
- '%d',
2384
- '%d',
2385
- ));
2386
  }
2387
  }
2388
 
2389
  /**
2390
- * @param $counter
2391
  * @param $all_files
2392
  * @param $id
2393
  * @param $str
2394
  *
2395
  * @return array
2396
  */
2397
- public function gen_mail( $counter, $all_files, $id, $str ) {
 
2398
  // checking save uploads option
2399
  $upload_dir = wp_upload_dir();
2400
- global $wpdb;
2401
- $save_uploads = $wpdb->get_var("SELECT save_uploads FROM " . $wpdb->prefix . "formmaker WHERE id=" . $id);
2402
  if ( $save_uploads == 0 ) {
2403
- $destination = $upload_dir['basedir'] . '/tmpAddon';
2404
- if ( !file_exists($destination) ) {
2405
- mkdir($destination, 0777);
2406
  }
2407
  foreach ( $all_files as &$all_file ) {
2408
- $fileTemp = $all_file['tmp_name'];
2409
- $fileName = $all_file['name'];
2410
- if ( !move_uploaded_file($fileTemp, $destination . '/' . $fileName) ) {
2411
- return array( 1, addslashes(__('Error, file cannot be moved.', WDFM()->prefix)) );
2412
  }
2413
- $all_file['tmp_name'] = $destination . "/" . $fileName;
2414
  }
2415
  }
2416
- $ip = $_SERVER['REMOTE_ADDR'];
2417
- global $wpdb;
2418
- $row = $wpdb->get_row($wpdb->prepare("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id=%d", $id));
2419
  if ( !$row->form_front ) {
2420
  $id = '';
2421
  }
2422
- $custom_fields = array( 'ip', 'useremail', 'username', 'subid', 'all' );
2423
- $subid = $wpdb->get_var("SELECT MAX( group_id ) FROM " . $wpdb->prefix . "formmaker_submits");
 
 
2424
  $current_user = wp_get_current_user();
 
 
2425
  if ( $current_user->ID != 0 ) {
2426
  $username = $current_user->display_name;
2427
  $useremail = $current_user->user_email;
2428
  }
2429
- else {
2430
- $username = '';
2431
- $useremail = '';
2432
- }
2433
  $label_order_original = array();
2434
  $label_order_ids = array();
2435
  $label_label = array();
2436
  $total = 0;
2437
  $form_currency = '$';
2438
- $currency_code = array(
2439
- 'USD',
2440
- 'EUR',
2441
- 'GBP',
2442
- 'JPY',
2443
- 'CAD',
2444
- 'MXN',
2445
- 'HKD',
2446
- 'HUF',
2447
- 'NOK',
2448
- 'NZD',
2449
- 'SGD',
2450
- 'SEK',
2451
- 'PLN',
2452
- 'AUD',
2453
- 'DKK',
2454
- 'CHF',
2455
- 'CZK',
2456
- 'ILS',
2457
- 'BRL',
2458
- 'TWD',
2459
- 'MYR',
2460
- 'PHP',
2461
- 'THB',
2462
- );
2463
- $currency_sign = array(
2464
- '$',
2465
- '&#8364;',
2466
- '&#163;',
2467
- '&#165;',
2468
- 'C$',
2469
- 'Mex$',
2470
- 'HK$',
2471
- 'Ft',
2472
- 'kr',
2473
- 'NZ$',
2474
- 'S$',
2475
- 'kr',
2476
- 'zl',
2477
- 'A$',
2478
- 'kr',
2479
- 'CHF',
2480
- 'Kc',
2481
- '&#8362;',
2482
- 'R$',
2483
- 'NT$',
2484
- 'RM',
2485
- '&#8369;',
2486
- '&#xe3f;',
2487
- );
2488
  if ( $row->payment_currency ) {
2489
- $form_currency = $currency_sign[array_search($row->payment_currency, $currency_code)];
2490
  }
 
 
 
 
 
 
 
 
2491
  $label_type = array();
2492
- $label_all = explode('#****#', $row->label_order_current);
2493
- $label_all = array_slice($label_all, 0, count($label_all) - 1);
2494
  foreach ( $label_all as $key => $label_each ) {
2495
- $label_id_each = explode('#**id**#', $label_each);
2496
- $label_id = $label_id_each[0];
2497
- array_push($label_order_ids, $label_id);
2498
- $label_order_each = explode('#**label**#', $label_id_each[1]);
2499
- $label_order_original[$label_id] = $label_order_each[0];
2500
- $label_type[$label_id] = $label_order_each[1];
2501
- array_push($label_label, $label_order_each[0]);
2502
- array_push($label_type, $label_order_each[1]);
2503
  }
2504
- $disabled_fields = explode(',', isset($_REQUEST["disabled_fields" . $id]) ? $_REQUEST["disabled_fields" . $id] : "");
2505
- $disabled_fields = array_slice($disabled_fields, 0, count($disabled_fields) - 1);
2506
  $list = '<table border="1" cellpadding="3" cellspacing="0" style="width:600px;">';
2507
  $list_text_mode = '';
2508
  foreach ( $label_order_ids as $key => $label_order_id ) {
2509
  $i = $label_order_id;
2510
- $type = $label_type[$i];
2511
  if ( $type != "type_map" and $type != "type_submit_reset" and $type != "type_editor" and $type != "type_captcha" and $type != "type_arithmetic_captcha" and $type != "type_recaptcha" and $type != "type_button" ) {
2512
- $element_label = $label_order_original[$i];
2513
- if ( !in_array($i, $disabled_fields) ) {
2514
  switch ( $type ) {
2515
  case 'type_text':
2516
  case 'type_password':
@@ -2520,17 +2406,17 @@ class FMModelForm_maker {
2520
  case "type_country":
2521
  case "type_number":
2522
  case "type_phone_new": {
2523
- $element = isset($_POST['wdform_' . $i . "_element" . $id]) ? $_POST['wdform_' . $i . "_element" . $id] : NULL;
2524
- if ( isset($element) && $this->empty_field($element, $row->mail_emptyfields) ) {
2525
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>' . $element . '</td></tr>';
2526
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2527
  }
2528
  break;
2529
  }
2530
  case "type_date_range": {
2531
- $element0 = isset($_POST['wdform_' . $i . "_element" . $id . "0"]) ? $_POST['wdform_' . $i . "_element" . $id . "0"] : NULL;
2532
- $element1 = isset($_POST['wdform_' . $i . "_element" . $id . "1"]) ? $_POST['wdform_' . $i . "_element" . $id . "1"] : NULL;
2533
- if ( isset($element0) && $this->empty_field($element0, $row->mail_emptyfields) && $this->empty_field($element1, $row->mail_emptyfields) ) {
2534
  $element = $element0 . ' - ' . $element1;
2535
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>' . $element . '</td></tr>';
2536
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
@@ -2538,55 +2424,53 @@ class FMModelForm_maker {
2538
  break;
2539
  }
2540
  case 'type_textarea': {
2541
- $element = isset($_POST['wdform_' . $i . "_element" . $id]) ? wpautop($_POST['wdform_' . $i . "_element" . $id]) : NULL;
2542
- if ( isset($element) && $this->empty_field($element, $row->mail_emptyfields) ) {
2543
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>' . $element . '</td></tr>';
2544
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2545
  }
2546
  break;
2547
  }
2548
  case "type_hidden": {
2549
- $element = isset($_POST[$element_label]) ? $_POST[$element_label] : NULL;
2550
- if ( isset($element) && $this->empty_field($element, $row->mail_emptyfields) ) {
2551
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>' . $element . '</td></tr>';
2552
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2553
  }
2554
  break;
2555
  }
2556
  case "type_mark_map": {
2557
- $element = isset($_POST['wdform_' . $i . "_long" . $id]) ? $_POST['wdform_' . $i . "_long" . $id] : NULL;
2558
- if ( isset($element) && $this->empty_field($element, $row->mail_emptyfields) ) {
2559
- $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>Longitude:' . $element . '<br/>Latitude:' . (isset($_POST['wdform_' . $i . "_lat" . $id]) ? $_POST['wdform_' . $i . "_lat" . $id] : "") . '</td></tr>';
2560
- $list_text_mode = $list_text_mode . $element_label . ' - Longitude:' . $element . ' Latitude:' . (isset($_POST['wdform_' . $i . "_lat" . $id]) ? $_POST['wdform_' . $i . "_lat" . $id] : "") . "\r\n";
2561
  }
2562
  break;
2563
  }
2564
  case "type_submitter_mail": {
2565
- $element = isset($_POST['wdform_' . $i . "_element" . $id]) ? $_POST['wdform_' . $i . "_element" . $id] : NULL;
2566
- if ( isset($element) && $this->empty_field($element, $row->mail_emptyfields) ) {
2567
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
2568
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2569
  }
2570
  break;
2571
  }
2572
  case "type_time": {
2573
- $hh = isset($_POST['wdform_' . $i . "_hh" . $id]) ? $_POST['wdform_' . $i . "_hh" . $id] : NULL;
2574
- if ( isset($hh) && ($this->empty_field($hh, $row->mail_emptyfields) || $this->empty_field($_POST['wdform_' . $i . "_mm" . $id], $row->mail_emptyfields) || $this->empty_field($_POST['wdform_' . $i . "_ss" . $id], $row->mail_emptyfields)) ) {
2575
- $ss = isset($_POST['wdform_' . $i . "_ss" . $id]) ? $_POST['wdform_' . $i . "_ss" . $id] : NULL;
2576
- if ( isset($ss) ) {
2577
- $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $hh . ':' . (isset($_POST['wdform_' . $i . "_mm" . $id]) ? $_POST['wdform_' . $i . "_mm" . $id] : "") . ':' . $ss;
2578
- $list_text_mode = $list_text_mode . $element_label . ' - ' . $hh . ':' . (isset($_POST['wdform_' . $i . "_mm" . $id]) ? $_POST['wdform_' . $i . "_mm" . $id] : "") . ':' . $ss;
2579
- }
2580
- else {
2581
- $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $hh . ':' . (isset($_POST['wdform_' . $i . "_mm" . $id]) ? $_POST['wdform_' . $i . "_mm" . $id] : "");
2582
- $list_text_mode = $list_text_mode . $element_label . ' - ' . $hh . ':' . (isset($_POST['wdform_' . $i . "_mm" . $id]) ? $_POST['wdform_' . $i . "_mm" . $id] : "");
2583
  }
2584
- $am_pm = isset($_POST['wdform_' . $i . "_am_pm" . $id]) ? $_POST['wdform_' . $i . "_am_pm" . $id] : NULL;
2585
- if ( isset($am_pm) ) {
2586
  $list = $list . ' ' . $am_pm . '</td></tr>';
2587
  $list_text_mode = $list_text_mode . $am_pm . "\r\n";
2588
- }
2589
- else {
2590
  $list = $list . '</td></tr>';
2591
  $list_text_mode = $list_text_mode . "\r\n";
2592
  }
@@ -2594,89 +2478,88 @@ class FMModelForm_maker {
2594
  break;
2595
  }
2596
  case "type_phone": {
2597
- $element_first = isset($_POST['wdform_' . $i . "_element_first" . $id]) ? $_POST['wdform_' . $i . "_element_first" . $id] : NULL;
2598
- if ( isset($element_first) && $this->empty_field($element_first, $row->mail_emptyfields) ) {
2599
- $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element_first . ' ' . (isset($_POST['wdform_' . $i . "_element_last" . $id]) ? $_POST['wdform_' . $i . "_element_last" . $id] : "") . '</td></tr>';
2600
- $list_text_mode = $list_text_mode . $element_label . ' - ' . $element_first . ' ' . (isset($_POST['wdform_' . $i . "_element_last" . $id]) ? $_POST['wdform_' . $i . "_element_last" . $id] : "") . "\r\n";
2601
  }
2602
  break;
2603
  }
2604
  case "type_name": {
2605
- $element_first = isset($_POST['wdform_' . $i . "_element_first" . $id]) ? $_POST['wdform_' . $i . "_element_first" . $id] : NULL;
2606
- if ( isset($element_first) ) {
2607
- $element_title = isset($_POST['wdform_' . $i . "_element_title" . $id]) ? $_POST['wdform_' . $i . "_element_title" . $id] : NULL;
2608
- $element_middle = isset($_POST['wdform_' . $i . "_element_middle" . $id]) ? esc_html($_POST['wdform_' . $i . "_element_middle" . $id]) : NULL;
2609
- if ( (isset($element_title) || isset($element_middle)) && ($this->empty_field($element_title, $row->mail_emptyfields) || $this->empty_field($element_first, $row->mail_emptyfields) || $this->empty_field($_POST['wdform_' . $i . "_element_last" . $id], $row->mail_emptyfields) || $this->empty_field($_POST['wdform_' . $i . "_element_middle" . $id], $row->mail_emptyfields)) ) {
2610
- $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . (isset($_POST['wdform_' . $i . "_element_title" . $id]) ? $_POST['wdform_' . $i . "_element_title" . $id] : '') . ' ' . $element_first . ' ' . (isset($_POST['wdform_' . $i . "_element_last" . $id]) ? $_POST['wdform_' . $i . "_element_last" . $id] : "") . ' ' . (isset($_POST['wdform_' . $i . "_element_middle" . $id]) ? $_POST['wdform_' . $i . "_element_middle" . $id] : "") . '</td></tr>';
2611
- $list_text_mode = $list_text_mode . $element_label . ' - ' . (isset($_POST['wdform_' . $i . "_element_title" . $id]) ? $_POST['wdform_' . $i . "_element_title" . $id] : '') . ' ' . $element_first . ' ' . (isset($_POST['wdform_' . $i . "_element_last" . $id]) ? $_POST['wdform_' . $i . "_element_last" . $id] : "") . ' ' . (isset($_POST['wdform_' . $i . "_element_middle" . $id]) ? $_POST['wdform_' . $i . "_element_middle" . $id] : "") . "\r\n";
2612
- }
2613
- else {
2614
- if ( $this->empty_field($element_first, $row->mail_emptyfields) || $this->empty_field($_POST['wdform_' . $i . "_element_last" . $id], $row->mail_emptyfields) ) {
2615
- $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element_first . ' ' . (isset($_POST['wdform_' . $i . "_element_last" . $id]) ? $_POST['wdform_' . $i . "_element_last" . $id] : "") . '</td></tr>';
2616
- $list_text_mode = $list_text_mode . $element_label . ' - ' . $element_first . ' ' . (isset($_POST['wdform_' . $i . "_element_last" . $id]) ? $_POST['wdform_' . $i . "_element_last" . $id] : "") . "\r\n";
2617
  }
2618
  }
2619
  }
2620
  break;
2621
  }
2622
  case "type_address": {
2623
- $element = isset($_POST['wdform_' . $i . "_street1" . $id]) ? $_POST['wdform_' . $i . "_street1" . $id] : NULL;
2624
- if ( isset($element) && $this->empty_field($element, $row->mail_emptyfields) ) {
2625
- $list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
2626
- $list_text_mode = $list_text_mode . $label_order_original[$i] . ' - ' . $element . "\r\n";
2627
  break;
2628
  }
2629
- $element = isset($_POST['wdform_' . $i . "_street2" . $id]) ? $_POST['wdform_' . $i . "_street2" . $id] : NULL;
2630
- if ( isset($element) && $this->empty_field($element, $row->mail_emptyfields) ) {
2631
- $list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
2632
- $list_text_mode = $list_text_mode . $label_order_original[$i] . ' - ' . $element . "\r\n";
2633
  break;
2634
  }
2635
- $element = isset($_POST['wdform_' . $i . "_city" . $id]) ? $_POST['wdform_' . $i . "_city" . $id] : NULL;
2636
- if ( isset($element) && $this->empty_field($element, $row->mail_emptyfields) ) {
2637
- $list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
2638
- $list_text_mode = $list_text_mode . $label_order_original[$i] . ' - ' . $element . "\r\n";
2639
  break;
2640
  }
2641
- $element = isset($_POST['wdform_' . $i . "_state" . $id]) ? $_POST['wdform_' . $i . "_state" . $id] : NULL;
2642
- if ( isset($element) && $this->empty_field($element, $row->mail_emptyfields) ) {
2643
- $list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
2644
- $list_text_mode = $list_text_mode . $label_order_original[$i] . ' - ' . $element . "\r\n";
2645
  break;
2646
  }
2647
- $element = isset($_POST['wdform_' . $i . "_postal" . $id]) ? $_POST['wdform_' . $i . "_postal" . $id] : NULL;
2648
- if ( isset($element) && $this->empty_field($element, $row->mail_emptyfields) ) {
2649
- $list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
2650
- $list_text_mode = $list_text_mode . $label_order_original[$i] . ' - ' . $element . "\r\n";
2651
  break;
2652
  }
2653
- $element = isset($_POST['wdform_' . $i . "_country" . $id]) ? $_POST['wdform_' . $i . "_country" . $id] : NULL;
2654
- if ( isset($element) && $this->empty_field($element, $row->mail_emptyfields) ) {
2655
- $list = $list . '<tr valign="top"><td >' . $label_order_original[$i] . '</td><td >' . $element . '</td></tr>';
2656
- $list_text_mode = $list_text_mode . $label_order_original[$i] . ' - ' . $element . "\r\n";
2657
  break;
2658
  }
2659
  break;
2660
  }
2661
  case "type_date_fields": {
2662
- $day = isset($_POST['wdform_' . $i . "_day" . $id]) ? $_POST['wdform_' . $i . "_day" . $id] : NULL;
2663
- $month = isset($_POST['wdform_' . $i . "_month" . $id]) ? $_POST['wdform_' . $i . "_month" . $id] : "";
2664
- $year = isset($_POST['wdform_' . $i . "_year" . $id]) ? $_POST['wdform_' . $i . "_year" . $id] : "";
2665
- if ( isset($day) && $this->empty_field($day, $row->mail_emptyfields) ) {
2666
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . (($day || $month || $year) ? $day . '-' . $month . '-' . $year : '') . '</td></tr>';
2667
  $list_text_mode = $list_text_mode . $element_label . (($day || $month || $year) ? $day . '-' . $month . '-' . $year : '') . "\r\n";
2668
  }
2669
  break;
2670
  }
2671
  case "type_radio": {
2672
- $element = isset($_POST['wdform_' . $i . "_other_input" . $id]) ? $_POST['wdform_' . $i . "_other_input" . $id] : NULL;
2673
- if ( isset($element) && $this->empty_field($element, $row->mail_emptyfields) ) {
2674
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
2675
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2676
  break;
2677
  }
2678
- $element = isset($_POST['wdform_' . $i . "_element" . $id]) ? $_POST['wdform_' . $i . "_element" . $id] : NULL;
2679
- if ( isset($element) && $this->empty_field($element, $row->mail_emptyfields) ) {
2680
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
2681
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2682
  }
@@ -2685,16 +2568,16 @@ class FMModelForm_maker {
2685
  case "type_checkbox": {
2686
  $start = -1;
2687
  for ( $j = 0; $j < 100; $j++ ) {
2688
- $element = isset($_POST['wdform_' . $i . "_element" . $id . $j]) ? $_POST['wdform_' . $i . "_element" . $id . $j] : NULL;
2689
- if ( isset($element) ) {
2690
  $start = $j;
2691
  break;
2692
  }
2693
  }
2694
  $other_element_id = -1;
2695
- $is_other = isset($_POST['wdform_' . $i . "_allow_other" . $id]) ? $_POST['wdform_' . $i . "_allow_other" . $id] : "";
2696
  if ( $is_other == "yes" ) {
2697
- $other_element_id = isset($_POST['wdform_' . $i . "_allow_other_num" . $id]) ? $_POST['wdform_' . $i . "_allow_other_num" . $id] : "";
2698
  }
2699
  if ( $start != -1 || ($start == -1 && $row->mail_emptyfields) ) {
2700
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >';
@@ -2702,15 +2585,14 @@ class FMModelForm_maker {
2702
  }
2703
  if ( $start != -1 ) {
2704
  for ( $j = $start; $j < 100; $j++ ) {
2705
- $element = isset($_POST['wdform_' . $i . "_element" . $id . $j]) ? $_POST['wdform_' . $i . "_element" . $id . $j] : NULL;
2706
- if ( isset($element) ) {
2707
  if ( $j == $other_element_id ) {
2708
- $list = $list . (isset($_POST['wdform_' . $i . "_other_input" . $id]) ? $_POST['wdform_' . $i . "_other_input" . $id] : "") . '<br>';
2709
- $list_text_mode = $list_text_mode . (isset($_POST['wdform_' . $i . "_other_input" . $id]) ? $_POST['wdform_' . $i . "_other_input" . $id] : "") . ', ';
2710
- }
2711
- else {
2712
- $list = $list . (isset($_POST['wdform_' . $i . "_element" . $id . $j]) ? $_POST['wdform_' . $i . "_element" . $id . $j] : "") . '<br>';
2713
- $list_text_mode = $list_text_mode . (isset($_POST['wdform_' . $i . "_element" . $id . $j]) ? $_POST['wdform_' . $i . "_element" . $id . $j] : "") . ', ';
2714
  }
2715
  }
2716
  }
@@ -2723,13 +2605,13 @@ class FMModelForm_maker {
2723
  }
2724
  case "type_paypal_price": {
2725
  $value = 0;
2726
- if ( isset($_POST['wdform_' . $i . "_element_dollars" . $id]) ) {
2727
- $value = $_POST['wdform_' . $i . "_element_dollars" . $id];
2728
  }
2729
- if ( isset($_POST['wdform_' . $i . "_element_cents" . $id]) && $_POST['wdform_' . $i . "_element_cents" . $id] ) {
2730
- $value = $value . '.' . $_POST['wdform_' . $i . "_element_cents" . $id];
2731
  }
2732
- if ( $this->empty_field($value, $row->mail_emptyfields) && $value != '.' ) {
2733
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $value . $form_currency . '</td></tr>';
2734
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $value . $form_currency . "\r\n";
2735
  }
@@ -2737,10 +2619,10 @@ class FMModelForm_maker {
2737
  }
2738
  case "type_paypal_price_new": {
2739
  $value = 0;
2740
- if ( isset($_POST['wdform_' . $i . "_element" . $id]) ) {
2741
- $value = $_POST['wdform_' . $i . "_element" . $id];
2742
  }
2743
- if ( $this->empty_field($value, $row->mail_emptyfields) && $value != '.' ) {
2744
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . ($value == '' ? '' : $form_currency) . $value . '</td></tr>';
2745
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $value . $form_currency . "\r\n";
2746
  }
@@ -2748,61 +2630,60 @@ class FMModelForm_maker {
2748
  }
2749
  case "type_paypal_select": {
2750
  $value = '';
2751
- if ( isset($_POST['wdform_' . $i . "_element_label" . $id]) && $_POST['wdform_' . $i . "_element" . $id] != '' ) {
2752
- $value = $_POST['wdform_' . $i . "_element_label" . $id] . ' : ' . $form_currency . $_POST['wdform_' . $i . "_element" . $id];
2753
  }
2754
- $element_quantity_label = (isset($_POST['wdform_' . $i . "_element_quantity_label" . $id]) && $_POST['wdform_' . $i . "_element_quantity_label" . $id]) ? $_POST['wdform_' . $i . "_element_quantity_label" . $id] : NULL;
2755
- $element_quantity = (isset($_POST['wdform_' . $i . "_element_quantity" . $id]) && $_POST['wdform_' . $i . "_element_quantity" . $id]) ? $_POST['wdform_' . $i . "_element_quantity" . $id] : NULL;
 
2756
  if ( $value != '' ) {
2757
- if ( isset($element_quantity) ) {
2758
- $value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
2759
- }
2760
- for ( $k = 0; $k < 50; $k++ ) {
2761
- $temp_val = isset($_POST['wdform_' . $i . "_property" . $id . $k]) ? $_POST['wdform_' . $i . "_property" . $id . $k] : NULL;
2762
- if ( isset($temp_val) ) {
2763
- $value .= '<br/>' . (isset($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) ? $_POST['wdform_' . $i . "_element_property_label" . $id . $k] : "") . ': ' . $temp_val;
2764
  }
2765
  }
2766
  }
2767
- if ( $this->empty_field($value, $row->mail_emptyfields) ) {
2768
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $value . '</td></tr>';
2769
- $list_text_mode = $list_text_mode . $element_label . ' - ' . str_replace('<br/>', ', ', $value) . "\r\n";
2770
  }
2771
  break;
2772
  }
2773
  case "type_paypal_radio": {
2774
- if ( isset($_POST['wdform_' . $i . "_element" . $id]) ) {
2775
- $value = $_POST['wdform_' . $i . "_element_label" . $id] . ' : ' . $form_currency . (isset($_POST['wdform_' . $i . "_element" . $id]) ? $_POST['wdform_' . $i . "_element" . $id] : "");
2776
- $element_quantity_label = isset($_POST['wdform_' . $i . "_element_quantity_label" . $id]) ? $_POST['wdform_' . $i . "_element_quantity_label" . $id] : NULL;
2777
- $element_quantity = (isset($_POST['wdform_' . $i . "_element_quantity" . $id]) && $_POST['wdform_' . $i . "_element_quantity" . $id]) ? $_POST['wdform_' . $i . "_element_quantity" . $id] : NULL;
2778
- if ( isset($element_quantity) ) {
2779
- $value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
2780
- }
 
 
2781
  for ( $k = 0; $k < 50; $k++ ) {
2782
- $temp_val = isset($_POST['wdform_' . $i . "_property" . $id . $k]) ? $_POST['wdform_' . $i . "_property" . $id . $k] : NULL;
2783
- if ( isset($temp_val) ) {
2784
- $value .= '<br/>' . (isset($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) ? $_POST['wdform_' . $i . "_element_property_label" . $id . $k] : "") . ': ' . $temp_val;
2785
  }
2786
  }
2787
  }
2788
- else {
2789
- $value = '';
2790
- }
2791
- if ( $this->empty_field($value, $row->mail_emptyfields) ) {
2792
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $value . '</td></tr>';
2793
- $list_text_mode = $list_text_mode . $element_label . ' - ' . str_replace('<br/>', ', ', $value) . "\r\n";
2794
  }
2795
  break;
2796
  }
2797
  case "type_paypal_shipping": {
2798
- if ( isset($_POST['wdform_' . $i . "_element" . $id]) ) {
2799
- $value = $_POST['wdform_' . $i . "_element_label" . $id] . ' : ' . $form_currency . (isset($_POST['wdform_' . $i . "_element" . $id]) ? $_POST['wdform_' . $i . "_element" . $id] : "");
2800
- if ( $this->empty_field($value, $row->mail_emptyfields) ) {
2801
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $value . '</td></tr>';
2802
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $value . "\r\n";
2803
  }
2804
- }
2805
- else {
2806
  $value = '';
2807
  }
2808
  break;
@@ -2810,36 +2691,41 @@ class FMModelForm_maker {
2810
  case "type_paypal_checkbox": {
2811
  $start = -1;
2812
  for ( $j = 0; $j < 300; $j++ ) {
2813
- $element = isset($_POST['wdform_' . $i . "_element" . $id . $j]) ? $_POST['wdform_' . $i . "_element" . $id . $j] : NULL;
2814
- if ( isset($element) ) {
2815
  $start = $j;
2816
  break;
2817
  }
2818
  }
2819
  if ( $start != -1 || ($start == -1 && $row->mail_emptyfields) ) {
2820
- $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >';
2821
  $list_text_mode = $list_text_mode . $element_label . ' - ';
2822
  }
2823
  if ( $start != -1 ) {
2824
  for ( $j = $start; $j < 300; $j++ ) {
2825
- $element = isset($_POST['wdform_' . $i . "_element" . $id . $j]) ? $_POST['wdform_' . $i . "_element" . $id . $j] : NULL;
2826
- if ( isset($element) ) {
2827
- $list = $list . (isset($_POST['wdform_' . $i . "_element" . $id . $j . "_label"]) ? $_POST['wdform_' . $i . "_element" . $id . $j . "_label"] : "") . ' - ' . $form_currency . ($element == '' ? '0' : $element) . '<br>';
2828
- $list_text_mode = $list_text_mode . (isset($_POST['wdform_' . $i . "_element" . $id . $j . "_label"]) ? $_POST['wdform_' . $i . "_element" . $id . $j . "_label"] : "") . ' - ' . ($element == '' ? '0' . $form_currency : $element) . $form_currency . ', ';
2829
  }
2830
  }
2831
  }
2832
- $element_quantity_label = isset($_POST['wdform_' . $i . "_element_quantity_label" . $id]) ? $_POST['wdform_' . $i . "_element_quantity_label" . $id] : NULL;
2833
- $element_quantity = (isset($_POST['wdform_' . $i . "_element_quantity" . $id]) && $_POST['wdform_' . $i . "_element_quantity" . $id]) ? $_POST['wdform_' . $i . "_element_quantity" . $id] : NULL;
2834
- if ( isset($element_quantity) ) {
2835
- $list = $list . '<br/>' . $element_quantity_label . ': ' . $element_quantity;
2836
- $list_text_mode = $list_text_mode . $element_quantity_label . ': ' . $element_quantity . ', ';
 
 
 
2837
  }
2838
- for ( $k = 0; $k < 50; $k++ ) {
2839
- $temp_val = isset($_POST['wdform_' . $i . "_element_property_value" . $id . $k]) ? $_POST['wdform_' . $i . "_element_property_value" . $id . $k] : NULL;
2840
- if ( isset($temp_val) ) {
2841
- $list = $list . '<br/>' . (isset($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) ? $_POST['wdform_' . $i . "_element_property_label" . $id . $k] : "") . ': ' . $temp_val;
2842
- $list_text_mode = $list_text_mode . (isset($_POST['wdform_' . $i . "_element_property_label" . $id . $k]) ? $_POST['wdform_' . $i . "_element_property_label" . $id . $k] : "") . ': ' . $temp_val . ', ';
 
 
2843
  }
2844
  }
2845
  if ( $start != -1 || ($start == -1 && $row->mail_emptyfields) ) {
@@ -2849,136 +2735,139 @@ class FMModelForm_maker {
2849
  break;
2850
  }
2851
  case "type_paypal_total": {
2852
- $element = isset($_POST['wdform_' . $i . "_paypal_total" . $id]) ? $_POST['wdform_' . $i . "_paypal_total" . $id] : "";
2853
- if ( $this->empty_field($element, $row->mail_emptyfields) ) {
2854
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
2855
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2856
  }
2857
  break;
2858
  }
2859
  case "type_star_rating": {
2860
- $element = isset($_POST['wdform_' . $i . "_star_amount" . $id]) ? $_POST['wdform_' . $i . "_star_amount" . $id] : NULL;
2861
- $selected = isset($_POST['wdform_' . $i . "_selected_star_amount" . $id]) ? $_POST['wdform_' . $i . "_selected_star_amount" . $id] : 0;
2862
- if ( isset($element) && $this->empty_field($selected, $row->mail_emptyfields) ) {
2863
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $selected . '/' . $element . '</td></tr>';
2864
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $selected . '/' . $element . "\r\n";
2865
  }
2866
  break;
2867
  }
2868
  case "type_scale_rating": {
2869
- $element = isset($_POST['wdform_' . $i . "_scale_amount" . $id]) ? $_POST['wdform_' . $i . "_scale_amount" . $id] : NULL;
2870
- $selected = isset($_POST['wdform_' . $i . "_scale_radio" . $id]) ? $_POST['wdform_' . $i . "_scale_radio" . $id] : 0;
2871
- if ( isset($element) && $this->empty_field($selected, $row->mail_emptyfields) ) {
2872
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $selected . '/' . $element . '</td></tr>';
2873
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $selected . '/' . $element . "\r\n";
2874
  }
2875
  break;
2876
  }
2877
  case "type_spinner": {
2878
- $element = isset($_POST['wdform_' . $i . "_element" . $id]) ? $_POST['wdform_' . $i . "_element" . $id] : NULL;
2879
- if ( isset($element) && $this->empty_field($element, $row->mail_emptyfields) ) {
2880
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
2881
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2882
  }
2883
  break;
2884
  }
2885
  case "type_slider": {
2886
- $element = isset($_POST['wdform_' . $i . "_slider_value" . $id]) ? $_POST['wdform_' . $i . "_slider_value" . $id] : NULL;
2887
- if ( isset($element) && $this->empty_field($element, $row->mail_emptyfields) ) {
2888
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
2889
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2890
  }
2891
  break;
2892
  }
2893
  case "type_range": {
2894
- $element0 = isset($_POST['wdform_' . $i . "_element" . $id . '0']) ? $_POST['wdform_' . $i . "_element" . $id . '0'] : NULL;
2895
- $element1 = isset($_POST['wdform_' . $i . "_element" . $id . '1']) ? $_POST['wdform_' . $i . "_element" . $id . '1'] : NULL;
2896
- if ( (isset($element0) && $this->empty_field($element0, $row->mail_emptyfields)) || (isset($element1) && $this->empty_field($element1, $row->mail_emptyfields)) ) {
2897
- $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >From:' . $element0 . '<span style="margin-left:6px">To</span>:' . $element1 . '</td></tr>';
2898
- $list_text_mode = $list_text_mode . $element_label . ' - From:' . $element0 . ' To:' . $element1 . "\r\n";
2899
  }
2900
  break;
2901
  }
2902
  case "type_grading": {
2903
- $element = isset($_POST['wdform_' . $i . "_hidden_item" . $id]) ? $_POST['wdform_' . $i . "_hidden_item" . $id] : "";
2904
- $grading = explode(":", $element);
2905
- $items_count = sizeof($grading) - 1;
2906
  $element = "";
2907
- $total = "";
2908
- $form_empty_field = 1;
2909
  for ( $k = 0; $k < $items_count; $k++ ) {
2910
- $element .= $grading[$k] . ":" . (isset($_POST['wdform_' . $i . "_element" . $id . '_' . $k]) ? $_POST['wdform_' . $i . "_element" . $id . '_' . $k] : "") . " ";
2911
- $total += (isset($_POST['wdform_' . $i . "_element" . $id . '_' . $k]) ? $_POST['wdform_' . $i . "_element" . $id . '_' . $k] : 0);
2912
- if ( isset($_POST['wdform_' . $i . "_element" . $id . '_' . $k]) ) {
2913
- $form_empty_field = 0;
2914
  }
2915
  }
2916
- $element .= "Total:" . $total;
2917
- if ( isset($element) && $this->empty_field($form_empty_field, $row->mail_emptyfields) ) {
2918
- $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
2919
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2920
  }
2921
  break;
2922
  }
2923
  case "type_matrix": {
2924
- $input_type = isset($_POST['wdform_' . $i . "_input_type" . $id]) ? $_POST['wdform_' . $i . "_input_type" . $id] : "";
2925
- $mat_rows = explode("***", isset($_POST['wdform_' . $i . "_hidden_row" . $id]) ? $_POST['wdform_' . $i . "_hidden_row" . $id] : "");
2926
- $rows_count = sizeof($mat_rows) - 1;
2927
- $mat_columns = explode("***", isset($_POST['wdform_' . $i . "_hidden_column" . $id]) ? $_POST['wdform_' . $i . "_hidden_column" . $id] : "");
2928
- $columns_count = sizeof($mat_columns) - 1;
 
2929
  $matrix = "<table>";
2930
  $matrix .= '<tr><td></td>';
2931
- for ( $k = 1; $k < count($mat_columns); $k++ ) {
2932
- $matrix .= '<td style="background-color:#BBBBBB; padding:5px; ">' . $mat_columns[$k] . '</td>';
2933
  }
2934
  $matrix .= '</tr>';
2935
  $aaa = Array();
2936
  for ( $k = 1; $k <= $rows_count; $k++ ) {
2937
- $matrix .= '<tr><td style="background-color:#BBBBBB; padding:5px;">' . $mat_rows[$k] . '</td>';
2938
  if ( $input_type == "radio" ) {
2939
- $mat_radio = isset($_POST['wdform_' . $i . "_input_element" . $id . $k]) ? $_POST['wdform_' . $i . "_input_element" . $id . $k] : 0;
2940
  if ( $mat_radio == 0 ) {
2941
  $checked = "";
2942
- $aaa[1] = "";
2943
- }
2944
- else {
2945
- $aaa = explode("_", $mat_radio);
2946
  }
2947
  for ( $j = 1; $j <= $columns_count; $j++ ) {
2948
- if ( $aaa[1] == $j ) {
 
2949
  $checked = "checked";
2950
- }
2951
- else {
2952
  $checked = "";
2953
  }
2954
  $sign = $checked == 'checked' ? '&#10004;' : '';
2955
  $matrix .= '<td style="text-align:center">' . $sign . '</td>';
2956
  }
2957
- }
2958
- else {
2959
  if ( $input_type == "checkbox" ) {
2960
  for ( $j = 1; $j <= $columns_count; $j++ ) {
2961
- $checked = isset($_POST['wdform_' . $i . "_input_element" . $id . $k . '_' . $j]) ? $_POST['wdform_' . $i . "_input_element" . $id . $k . '_' . $j] : "";
2962
  if ( $checked == 1 ) {
 
2963
  $checked = "checked";
2964
- }
2965
- else {
2966
  $checked = "";
2967
  }
2968
  $sign = $checked == 'checked' ? '&#10004;' : '';
2969
  $matrix .= '<td style="text-align:center">' . $sign . '</td>';
2970
  }
2971
- }
2972
- else {
2973
  if ( $input_type == "text" ) {
2974
  for ( $j = 1; $j <= $columns_count; $j++ ) {
2975
- $checked = isset($_POST['wdform_' . $i . "_input_element" . $id . $k . '_' . $j]) ? esc_html($_POST['wdform_' . $i . "_input_element" . $id . $k . '_' . $j]) : "";
 
 
 
2976
  $matrix .= '<td style="text-align:center">' . $checked . '</td>';
2977
  }
2978
- }
2979
- else {
2980
  for ( $j = 1; $j <= $columns_count; $j++ ) {
2981
- $checked = isset($_POST['wdform_' . $i . "_select_yes_no" . $id . $k . '_' . $j]) ? $_POST['wdform_' . $i . "_select_yes_no" . $id . $k . '_' . $j] : "";
 
 
 
2982
  $matrix .= '<td style="text-align:center">' . $checked . '</td>';
2983
  }
2984
  }
@@ -2987,7 +2876,7 @@ class FMModelForm_maker {
2987
  $matrix .= '</tr>';
2988
  }
2989
  $matrix .= '</table>';
2990
- if ( isset($matrix) ) {
2991
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $matrix . '</td></tr>';
2992
  }
2993
  break;
@@ -2999,70 +2888,80 @@ class FMModelForm_maker {
2999
  }
3000
  }
3001
  $list = $list . '</table>';
 
3002
  if ( $row->sendemail ) {
3003
  $fromname = $row->mail_from_name_user;
3004
- if ( $row->mail_subject_user ) {
3005
- $subject = $row->mail_subject_user;
3006
- }
3007
- else {
3008
- $subject = $row->title;
3009
- }
3010
  $attachment_user = array();
3011
  if ( !WDFM()->is_demo ) {
3012
- for ( $k = 0; $k < count($all_files); $k++ ) {
3013
- if ( isset($all_files[$k]['tmp_name']) ) {
3014
- if ( !isset($attachment_user[$all_files[$k]['field_key']]) ) {
3015
- $attachment_user[$all_files[$k]['field_key']] = array();
3016
  }
3017
- $basedir = str_replace( site_url() .'/', '', $upload_dir['baseurl'] );
3018
  $file_name = $all_files[$k]['tmp_name'];
3019
- $file = $basedir . $file_name;
 
 
 
 
 
3020
  array_push($attachment_user[$all_files[$k]['field_key']], $file);
3021
  }
3022
  }
3023
  }
 
3024
  if ( $row->mail_mode_user ) {
3025
  $content_type = "text/html";
3026
- $list_user = wordwrap($list, 100, "\n", TRUE);
3027
- $new_script = wpautop($row->script_mail_user);
3028
- }
3029
- else {
3030
  $content_type = "text/plain";
3031
- $list_user = wordwrap($list_text_mode, 1000, "\n", TRUE);
3032
- $new_script = str_replace(array( '<p>', '</p>' ), '', $row->script_mail_user);
3033
  }
3034
  foreach ( $label_order_original as $key => $label_each ) {
3035
- $type = $label_type[$key];
3036
  $key1 = $type == 'type_hidden' ? $label_each : $key;
3037
- $label_each_decoded = htmlspecialchars_decode($label_each);
3038
- if ( strpos($new_script, "%" . $label_each_decoded . "%") > -1 ) {
3039
- $new_value = $this->custom_fields_mail($type, $key1, $id, $attachment_user, $form_currency);
3040
- $new_script = str_replace("%" . $label_each_decoded . "%", $new_value, $new_script);
3041
- }
3042
- if ( $type == "type_file_upload" && strpos($new_script, "%" . $label_each_decoded . "(link)%") > -1 ) {
3043
- $new_value = $this->custom_fields_mail($type, $key, $id, $attachment_user, $form_currency, 1);
3044
- $new_script = str_replace("%" . $label_each_decoded . "(link)%", $new_value, $new_script);
 
3045
  }
3046
- if ( strpos($fromname, "%" . $label_each . "%") > -1 ) {
3047
- $new_value = str_replace('<br>', ', ', $this->custom_fields_mail($type, $key, $id, '', ''));
3048
- if ( substr($new_value, -2) == ', ' ) {
3049
- $new_value = substr($new_value, 0, -2);
 
3050
  }
3051
- $fromname = str_replace("%" . $label_each . "%", $new_value, $fromname);
3052
  }
3053
- if ( strpos($subject, "%" . $label_each . "%") > -1 ) {
3054
- $new_value = str_replace('<br>', ', ', $this->custom_fields_mail($type, $key, $id, '', $form_currency));
3055
- if ( substr($new_value, -2) == ', ' ) {
3056
- $new_value = substr($new_value, 0, -2);
 
3057
  }
3058
- $subject = str_replace("%" . $label_each . "%", $new_value, $subject);
 
3059
  }
3060
  }
 
3061
 
3062
- $header_arr = array();
 
 
 
 
3063
 
 
3064
  if ( $row->mail_from_user != '' ) {
3065
- $header_arr['from'] = $row->mail_from_user;
3066
  }
3067
  $header_arr['from_name'] = $fromname;
3068
  $header_arr['content_type'] = $content_type;
@@ -3071,256 +2970,234 @@ class FMModelForm_maker {
3071
  $header_arr['cc'] = $row->mail_cc_user;
3072
  $header_arr['bcc'] = $row->mail_bcc_user;
3073
 
3074
- $custom_fields_value = array( $ip, $useremail, $username, $subid, $list_user );
3075
- foreach ( $custom_fields as $key => $custom_field ) {
3076
- if ( strpos($new_script, "%" . $custom_field . "%") > -1 ) {
3077
- $new_script = str_replace("%" . $custom_field . "%", $custom_fields_value[$key], $new_script);
3078
- }
3079
- if ( $key == 2 || $key == 3 ) {
3080
- if ( strpos($fromname, "%" . $custom_field . "%") > -1 ) {
3081
- $fromname = str_replace("%" . $custom_field . "%", $custom_fields_value[$key], $fromname);
3082
- }
3083
- if ( strpos($subject, "%" . $custom_field . "%") > -1 ) {
3084
- $subject = str_replace("%" . $custom_field . "%", $custom_fields_value[$key], $subject);
3085
- }
3086
- }
3087
- }
3088
  $body = $new_script;
3089
- $GLOBALS['attachment_user'] = '';
3090
- $GLOBALS['attachment'] = '';
3091
- if (WDFM()->is_free != 2) {
3092
- do_action('WD_FM_PDF_init', array('custom_fields_value' => $custom_fields_value, 'form_id' => $id));
3093
  }
3094
- if ( $GLOBALS['attachment_user'] ) {
3095
- array_push($attachment_user, $GLOBALS['attachment_user']);
3096
  }
 
3097
  if ( $row->send_to ) {
3098
- $send_tos = explode('**', $row->send_to);
3099
- $send_copy = isset($_POST["wdform_send_copy_" . $id]) ? $_POST["wdform_send_copy_" . $id] : NULL;
3100
- if ( isset($send_copy) ) {
3101
  $send = TRUE;
3102
- }
3103
- else {
3104
- $mail_verification_post_id = (int) $wpdb->get_var($wpdb->prepare('SELECT mail_verification_post_id FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
3105
- $verification_link = get_post($mail_verification_post_id);
 
 
 
3106
  foreach ( $send_tos as $index => $send_to ) {
3107
- $send_to = str_replace('*', '', $send_to);
3108
- if ( strpos($new_script, "%Verification link%") > -1 && $verification_link !== NULL ) {
3109
- $ver_link = $row->mail_mode_user ? "<a href =" . add_query_arg(array(
3110
- 'gid' => $_SESSION['gid'],
3111
- 'h' => $_SESSION['hash'][$index] . '@' . $send_to,
3112
- ), get_post_permalink($mail_verification_post_id)) . ">" . add_query_arg(array(
3113
- 'gid' => $_SESSION['gid'],
3114
- 'h' => $_SESSION['hash'][$index] . '@' . $send_to,
3115
- ), get_post_permalink($mail_verification_post_id)) . "</a><br/>" : add_query_arg(array(
3116
- 'gid' => $_SESSION['gid'],
3117
- 'h' => $_SESSION['hash'][$index] . '@' . $send_to,
3118
- ), get_post_permalink($mail_verification_post_id));
3119
- $body = $row->mail_verify ? str_replace("%Verification link%", $ver_link, $new_script) : str_replace("%Verification link%", '', $new_script);
3120
- }
3121
-
3122
- $recipient = isset($_POST['wdform_' . str_replace('*', '', $send_to) . "_element" . $id]) ? $_POST['wdform_' . $send_to . "_element" . $id] : NULL;
3123
  if ( $recipient ) {
3124
  if ( $row->mail_attachment_user ) {
3125
- $remove_parrent_array_user = new RecursiveIteratorIterator(new RecursiveArrayIterator($attachment_user));
3126
- $attachment_user = iterator_to_array($remove_parrent_array_user, FALSE);
3127
- }
3128
- else {
3129
  $attachment_user = array();
3130
  }
3131
- WDW_FM_Library::mail($recipient, $subject, $body, $header_arr, $attachment_user);
3132
  }
3133
  }
3134
  }
3135
  }
3136
  }
3137
-
3138
  if ( $row->sendemail ) {
3139
  $recipient = $row->mail ? $row->mail : '';
3140
-
3141
- $subject = $row->mail_subject ? $row->mail_subject : $row->title;
3142
 
3143
  $fromname = $row->from_name;
3144
  $attachment = array();
3145
  if ( !WDFM()->is_demo ) {
3146
- for ( $k = 0; $k < count($all_files); $k++ ) {
3147
- if ( isset($all_files[$k]['tmp_name']) ) {
3148
- if ( !isset($attachment[$all_files[$k]['field_key']]) ) {
3149
- $attachment[$all_files[$k]['field_key']] = array();
3150
  }
3151
- $basedir = str_replace( site_url() .'/', '', $upload_dir['baseurl'] );
3152
  $file_name = $all_files[$k]['tmp_name'];
3153
- $file = $basedir . $file_name;
3154
- array_push($attachment[$all_files[$k]['field_key']], $file);
 
 
 
 
 
3155
  }
3156
  }
3157
  }
3158
- if ( $GLOBALS['attachment'] ) {
3159
- array_push($attachment, $GLOBALS['attachment']);
3160
  }
3161
  if ( $row->mail_mode ) {
3162
  $content_type = "text/html";
3163
- $list = wordwrap($list, 100, "\n", TRUE);
3164
- $new_script = wpautop($row->script_mail);
3165
- }
3166
- else {
3167
  $content_type = "text/plain";
3168
  $list = $list_text_mode;
3169
- $list = wordwrap($list, 1000, "\n", TRUE);
3170
- $new_script = str_replace(array( '<p>', '</p>' ), '', $row->script_mail);
3171
  }
 
3172
  $header_arr = array();
3173
  foreach ( $label_order_original as $key => $label_each ) {
3174
- $type = $label_type[$key];
3175
  $key1 = $type == 'type_hidden' ? $label_each : $key;
3176
- $label_each_decoded = htmlspecialchars_decode($label_each);
3177
- if ( strpos($new_script, "%" . $label_each_decoded . "%") > -1 ) {
3178
- $new_value = $this->custom_fields_mail($type, $key1, $id, $attachment, $form_currency);
3179
- $new_script = str_replace("%" . $label_each_decoded . "%", $new_value, $new_script);
3180
- }
3181
- if ( $type == "type_file_upload" && strpos($new_script, "%" . $label_each_decoded . "(link)%") > -1 ) {
3182
- $new_value = $this->custom_fields_mail($type, $key, $id, $attachment, $form_currency, 1);
3183
- $new_script = str_replace("%" . $label_each_decoded . "(link)%", $new_value, $new_script);
 
3184
  }
3185
- if ( strpos($fromname, "%" . $label_each . "%") > -1 ) {
3186
- $new_value = str_replace('<br>', ', ', $this->custom_fields_mail($type, $key, $id, '', $form_currency));
3187
- if ( substr($new_value, -2) == ', ' ) {
3188
- $new_value = substr($new_value, 0, -2);
3189
  }
3190
- $fromname = str_replace("%" . $label_each . "%", $new_value, $fromname);
3191
  }
3192
- if ( strpos($fromname, "%username%") > -1 ) {
3193
- $fromname = str_replace("%username%", $username, $fromname);
3194
  }
3195
- if ( strpos($subject, "%" . $label_each . "%") > -1 ) {
3196
- $new_value = str_replace('<br>', ', ', $this->custom_fields_mail($type, $key, $id, '', $form_currency));
3197
- if ( substr($new_value, -2) == ', ' ) {
3198
- $new_value = substr($new_value, 0, -2);
3199
  }
3200
- $subject = str_replace("%" . $label_each . "%", $new_value, $subject);
3201
  }
3202
  }
 
 
 
 
 
 
 
 
3203
  if ( $row->from_mail ) {
3204
- $header_arr['from'] = isset($_POST['wdform_' . $row->from_mail . "_element" . $id]) ? $_POST['wdform_' . $row->from_mail . "_element" . $id] : $row->from_mail;
3205
  }
3206
  $header_arr['from_name'] = $fromname;
3207
  $header_arr['content_type'] = $content_type;
3208
  $header_arr['charset'] = 'UTF-8';
3209
- $header_arr['reply_to'] = isset($_POST['wdform_' . $row->reply_to . "_element" . $id]) ? $_POST['wdform_' . $row->reply_to . "_element" . $id] : $row->reply_to;
3210
  $header_arr['cc'] = $row->mail_cc;
3211
  $header_arr['bcc'] = $row->mail_bcc;
3212
- $custom_fields_value = array( $ip, $useremail, $username, $subid, $list );
3213
- foreach ( $custom_fields as $key => $custom_field ) {
3214
- if ( strpos($new_script, "%" . $custom_field . "%") > -1 ) {
3215
- $new_script = str_replace("%" . $custom_field . "%", $custom_fields_value[$key], $new_script);
3216
- }
3217
- if ( $key == 2 || $key == 3 ) {
3218
- if ( strpos($fromname, "%" . $custom_field . "%") > -1 ) {
3219
- $fromname = str_replace("%" . $custom_field . "%", $custom_fields_value[$key], $fromname);
3220
- }
3221
- if ( strpos($subject, "%" . $custom_field . "%") > -1 ) {
3222
- $subject = str_replace("%" . $custom_field . "%", $custom_fields_value[$key], $subject);
3223
- }
3224
- }
3225
- }
3226
  $admin_body = $new_script;
3227
  if ( $row->mail_attachment ) {
3228
- $remove_parrent_array = new RecursiveIteratorIterator(new RecursiveArrayIterator($attachment));
3229
- $attachment = iterator_to_array($remove_parrent_array, FALSE);
3230
- }
3231
- else {
3232
  $attachment = array();
3233
  }
3234
 
3235
- $send = WDW_FM_Library::mail($recipient, $subject, $admin_body, $header_arr, $attachment);
 
 
 
3236
  }
3237
- $_SESSION['error_or_no' . $id] = 0;
3238
- $msg = addslashes(__('Your form was successfully submitted.', WDFM()->prefix));
3239
  if ( $row->sendemail ) {
3240
  if ( $row->mail || $row->send_to ) {
3241
  if ( $send ) {
3242
  if ( $send !== TRUE ) {
3243
- $_SESSION['error_or_no' . $id] = 1;
3244
- $msg = addslashes(__('Error, email was not sent.', WDFM()->prefix));
3245
- }
3246
- else {
3247
- $_SESSION['error_or_no' . $id] = 0;
3248
- $msg = addslashes(__('Your form was successfully submitted.', WDFM()->prefix));
3249
  }
3250
  }
3251
  }
3252
  }
3253
 
3254
  // Add-on conditional email
3255
- $fm_email_params = $row->sendemail ? array(
3256
- 'admin_body' => $admin_body,
3257
- 'body' => $body,
3258
- 'subject' => $subject,
3259
- 'headers' => $header_arr,
3260
- 'attachment' => $attachment,
3261
- 'attachment_user' => $attachment_user,
3262
- ) : array();
3263
-
3264
- $params = array(
3265
- 'form_id' => $id,
3266
- 'fm_email_params' => $fm_email_params,
3267
- 'form_currency' => $form_currency,
3268
- 'custom_fields_value' => ( isset($custom_fields_value) ? $custom_fields_value : array() ),
3269
- );
3270
- if (WDFM()->is_free != 2) {
3271
- do_action('fm_set_params_frontend_init', $params);
 
 
 
 
3272
  }
3273
  // delete files from uploads (save_upload = 0)
3274
  if ( $row->save_uploads == 0 ) {
3275
  foreach ( $all_files as &$all_file ) {
3276
- if ( file_exists($all_file['tmp_name']) ) {
3277
- unlink($all_file['tmp_name']);
3278
  }
3279
  }
3280
  }
3281
- $https = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://');
 
 
 
 
 
 
 
 
 
 
 
 
 
3282
  if ( $row->submit_text_type != 4 ) {
3283
- $_SESSION['massage_after_submit' . $id] = $msg;
3284
  if ( $row->type == 'popover' || $row->type == 'topbar' || $row->type == 'scrollbox' ) {
3285
- $_SESSION['fm_hide_form_after_submit' . $id] = 1;
3286
- }
3287
- }
3288
- switch ( $row->submit_text_type ) {
3289
- case "2":
3290
- case "5": {
3291
- $_SESSION['form_submit_type' . $id] = $row->submit_text_type . "," . $row->id;
3292
- if ( $row->article_id ) {
3293
- $redirect_url = $row->article_id;
3294
- }
3295
- else {
3296
- $redirect_url = $https . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
3297
- }
3298
- break;
3299
- }
3300
- case "3": {
3301
- $_SESSION['form_submit_type' . $id] = $row->submit_text_type . "," . $row->id;
3302
- $redirect_url = $https . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
3303
- break;
3304
- }
3305
- case "4": {
3306
- $_SESSION['form_submit_type' . $id] = $row->submit_text_type . "," . $row->id;
3307
- $redirect_url = $row->url;
3308
- break;
3309
- }
3310
- default: {
3311
- $_SESSION['form_submit_type' . $id] = $row->submit_text_type . "," . $row->id;
3312
- $redirect_url = $https . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
3313
- break;
3314
  }
3315
  }
 
3316
  if ( !$str ) {
3317
- wp_redirect(html_entity_decode($redirect_url));
3318
  exit;
3319
  }
3320
  else {
3321
- $_SESSION['redirect_paypal' . $id] = 1;
3322
- $str .= "&return=" . urlencode(add_query_arg(array('succes' => time()), $redirect_url));
3323
- wp_redirect($str);
3324
  exit;
3325
  }
3326
  }
@@ -3348,29 +3225,28 @@ class FMModelForm_maker {
3348
  case "type_own_select":
3349
  case "type_country":
3350
  case "type_number": {
3351
- $element = isset($_POST['wdform_' . $key . "_element" . $id]) ? $_POST['wdform_' . $key . "_element" . $id] : NULL;
3352
- if ( isset($element) ) {
3353
  $new_value = $element;
3354
  }
3355
  break;
3356
  }
3357
  case 'type_date_range' : {
3358
- $element0 = isset($_POST['wdform_' . $key . "_element" . $id . "0"]) ? $_POST['wdform_' . $key . "_element" . $id . "0"] : NULL;
3359
- $element1 = isset($_POST['wdform_' . $key . "_element" . $id . "1"]) ? $_POST['wdform_' . $key . "_element" . $id . "1"] : NULL;
3360
  $element = $element0 . ' - ' . $element1;
3361
  $new_value = $element;
3362
  }
3363
  case "type_file_upload": {
3364
- if ( isset($attachment[$key]) ) {
3365
- foreach ( $attachment[$key] as $attach ) {
3366
- $uploadedFileNameParts = explode('.', $attach);
3367
- $uploadedFileExtension = array_pop($uploadedFileNameParts);
3368
- $file_name = explode('/', $attach);
3369
- $file_name = end($file_name);
3370
  if ( $file_upload_link == 1 ) {
3371
  $new_value .= '<a href="' . site_url() . '/' . $attach . '"/>' . $file_name . '</a><br />';
3372
- }
3373
- else {
3374
  $invalidFileExts = array(
3375
  'gif',
3376
  'jpg',
@@ -3391,7 +3267,7 @@ class FMModelForm_maker {
3391
  );
3392
  $extOk = FALSE;
3393
  foreach ( $invalidFileExts as $key => $valuee ) {
3394
- if ( is_numeric(strpos(strtolower($valuee), strtolower($uploadedFileExtension))) ) {
3395
  $extOk = TRUE;
3396
  }
3397
  }
@@ -3404,111 +3280,109 @@ class FMModelForm_maker {
3404
  break;
3405
  }
3406
  case "type_hidden": {
3407
- $element = isset($_POST[$key]) ? $_POST[$key] : NULL;
3408
- if ( isset($element) ) {
3409
  $new_value = $element;
3410
  }
3411
  break;
3412
  }
3413
  case "type_mark_map": {
3414
- $element = isset($_POST['wdform_' . $key . "_long" . $id]) ? $_POST['wdform_' . $key . "_long" . $id] : NULL;
3415
- if ( isset($element) ) {
3416
- $new_value = 'Longitude:' . $element . '<br/>Latitude:' . (isset($_POST['wdform_' . $key . "_lat" . $id]) ? $_POST['wdform_' . $key . "_lat" . $id] : "");
3417
  }
3418
  break;
3419
  }
3420
  case "type_submitter_mail": {
3421
- $element = isset($_POST['wdform_' . $key . "_element" . $id]) ? $_POST['wdform_' . $key . "_element" . $id] : NULL;
3422
- if ( isset($element) ) {
3423
  $new_value = $element;
3424
  }
3425
  break;
3426
  }
3427
  case "type_time": {
3428
- $hh = isset($_POST['wdform_' . $key . "_hh" . $id]) ? $_POST['wdform_' . $key . "_hh" . $id] : NULL;
3429
- if ( isset($hh) ) {
3430
- $ss = isset($_POST['wdform_' . $key . "_ss" . $id]) ? $_POST['wdform_' . $key . "_ss" . $id] : NULL;
3431
- if ( isset($ss) ) {
3432
- $new_value = $hh . ':' . (isset($_POST['wdform_' . $key . "_mm" . $id]) ? $_POST['wdform_' . $key . "_mm" . $id] : "") . ':' . $ss;
3433
- }
3434
- else {
3435
- $new_value = $hh . ':' . (isset($_POST['wdform_' . $key . "_mm" . $id]) ? $_POST['wdform_' . $key . "_mm" . $id] : "");
3436
- }
3437
- $am_pm = isset($_POST['wdform_' . $key . "_am_pm" . $id]) ? $_POST['wdform_' . $key . "_am_pm" . $id] : NULL;
3438
- if ( isset($am_pm) ) {
3439
  $new_value = $new_value . ' ' . $am_pm;
3440
  }
3441
  }
3442
  break;
3443
  }
3444
  case "type_phone": {
3445
- $element_first = isset($_POST['wdform_' . $key . "_element_first" . $id]) ? $_POST['wdform_' . $key . "_element_first" . $id] : NULL;
3446
- if ( isset($element_first) ) {
3447
- $new_value = $element_first . ' ' . (isset($_POST['wdform_' . $key . "_element_last" . $id]) ? $_POST['wdform_' . $key . "_element_last" . $id] : "");
3448
  }
3449
  break;
3450
  }
3451
  case "type_name": {
3452
- $element_first = isset($_POST['wdform_' . $key . "_element_first" . $id]) ? $_POST['wdform_' . $key . "_element_first" . $id] : NULL;
3453
- if ( isset($element_first) ) {
3454
- $element_title = isset($_POST['wdform_' . $key . "_element_title" . $id]) ? $_POST['wdform_' . $key . "_element_title" . $id] : NULL;
3455
- if ( isset($element_title) ) {
3456
- $new_value = $element_title . ' ' . $element_first . ' ' . (isset($_POST['wdform_' . $key . "_element_last" . $id]) ? $_POST['wdform_' . $key . "_element_last" . $id] : "") . ' ' . (isset($_POST['wdform_' . $key . "_element_middle" . $id]) ? $_POST['wdform_' . $key . "_element_middle" . $id] : "");
3457
- }
3458
- else {
3459
- $new_value = $element_first . ' ' . (isset($_POST['wdform_' . $key . "_element_last" . $id]) ? $_POST['wdform_' . $key . "_element_last" . $id] : "");
3460
  }
3461
  }
3462
  break;
3463
  }
3464
  case "type_address": {
3465
- $street1 = isset($_POST['wdform_' . $key . "_street1" . $id]) ? $_POST['wdform_' . $key . "_street1" . $id] : NULL;
3466
- if ( isset($street1) ) {
3467
  $new_value = $street1;
3468
  break;
3469
  }
3470
- $street2 = isset($_POST['wdform_' . $key . "_street2" . $id]) ? $_POST['wdform_' . $key . "_street2" . $id] : NULL;
3471
- if ( isset($street2) ) {
3472
  $new_value = $street2;
3473
  break;
3474
  }
3475
- $city = isset($_POST['wdform_' . $key . "_city" . $id]) ? $_POST['wdform_' . $key . "_city" . $id] : NULL;
3476
- if ( isset($city) ) {
3477
  $new_value = $city;
3478
  break;
3479
  }
3480
- $state = isset($_POST['wdform_' . $key . "_state" . $id]) ? $_POST['wdform_' . $key . "_state" . $id] : NULL;
3481
- if ( isset($state) ) {
3482
  $new_value = $state;
3483
  break;
3484
  }
3485
- $postal = isset($_POST['wdform_' . $key . "_postal" . $id]) ? $_POST['wdform_' . $key . "_postal" . $id] : NULL;
3486
- if ( isset($postal) ) {
3487
  $new_value = $postal;
3488
  break;
3489
  }
3490
- $country = isset($_POST['wdform_' . $key . "_country" . $id]) ? $_POST['wdform_' . $key . "_country" . $id] : NULL;
3491
- if ( isset($country) ) {
3492
  $new_value = $country;
3493
  break;
3494
  }
3495
  break;
3496
  }
3497
  case "type_date_fields": {
3498
- $day = isset($_POST['wdform_' . $key . "_day" . $id]) ? $_POST['wdform_' . $key . "_day" . $id] : NULL;
3499
- if ( isset($day) ) {
3500
- $new_value = $day . '-' . (isset($_POST['wdform_' . $key . "_month" . $id]) ? $_POST['wdform_' . $key . "_month" . $id] : "") . '-' . (isset($_POST['wdform_' . $key . "_year" . $id]) ? $_POST['wdform_' . $key . "_year" . $id] : "");
3501
  }
3502
  break;
3503
  }
3504
  case "type_radio": {
3505
- $element = isset($_POST['wdform_' . $key . "_other_input" . $id]) ? $_POST['wdform_' . $key . "_other_input" . $id] : NULL;
3506
- if ( isset($element) ) {
3507
  $new_value = $element;
3508
  break;
3509
  }
3510
- $element = isset($_POST['wdform_' . $key . "_element" . $id]) ? $_POST['wdform_' . $key . "_element" . $id] : NULL;
3511
- if ( isset($element) ) {
3512
  $new_value = $element;
3513
  }
3514
  break;
@@ -3516,25 +3390,24 @@ class FMModelForm_maker {
3516
  case "type_checkbox": {
3517
  $start = -1;
3518
  for ( $j = 0; $j < 100; $j++ ) {
3519
- $element = isset($_POST['wdform_' . $key . "_element" . $id . $j]) ? $_POST['wdform_' . $key . "_element" . $id . $j] : NULL;
3520
- if ( isset($element) ) {
3521
  $start = $j;
3522
  break;
3523
  }
3524
  }
3525
  $other_element_id = -1;
3526
- $is_other = isset($_POST['wdform_' . $key . "_allow_other" . $id]) ? $_POST['wdform_' . $key . "_allow_other" . $id] : "";
3527
  if ( $is_other == "yes" ) {
3528
- $other_element_id = isset($_POST['wdform_' . $key . "_allow_other_num" . $id]) ? $_POST['wdform_' . $key . "_allow_other_num" . $id] : "";
3529
  }
3530
  if ( $start != -1 ) {
3531
  for ( $j = $start; $j < 100; $j++ ) {
3532
- $element = isset($_POST['wdform_' . $key . "_element" . $id . $j]) ? $_POST['wdform_' . $key . "_element" . $id . $j] : NULL;
3533
- if ( isset($element) ) {
3534
  if ( $j == $other_element_id ) {
3535
- $new_value = $new_value . (isset($_POST['wdform_' . $key . "_other_input" . $id]) ? $_POST['wdform_' . $key . "_other_input" . $id] : "") . '<br>';
3536
- }
3537
- else {
3538
  $new_value = $new_value . $element . '<br>';
3539
  }
3540
  }
@@ -3544,206 +3417,203 @@ class FMModelForm_maker {
3544
  }
3545
  case "type_paypal_price": {
3546
  $new_value = 0;
3547
- if ( isset($_POST['wdform_' . $key . "_element_dollars" . $id]) ) {
3548
- $new_value = $_POST['wdform_' . $key . "_element_dollars" . $id];
3549
  }
3550
- if ( isset($_POST['wdform_' . $key . "_element_cents" . $id]) ) {
3551
- $new_value = $new_value . '.' . $_POST['wdform_' . $key . "_element_cents" . $id];
3552
  }
3553
  $new_value = $new_value . $form_currency;
3554
  break;
3555
  }
3556
  case "type_paypal_price_new": {
3557
  $new_value = '';
3558
- if ( isset($_POST['wdform_' . $key . "_element" . $id]) && $_POST['wdform_' . $key . "_element" . $id] ) {
3559
- $new_value = $form_currency . $_POST['wdform_' . $key . "_element" . $id];
3560
  }
3561
  $new_value = $new_value;
3562
  break;
3563
  }
3564
  case "type_paypal_select": {
3565
- $element = isset($_POST['wdform_' . $key . "_element" . $id]) && $_POST['wdform_' . $key . "_element" . $id] ? $_POST['wdform_' . $key . "_element" . $id] : '';
3566
  if ( $element ) {
3567
- $new_value = (isset($_POST['wdform_' . $key . "_element_label" . $id]) ? $_POST['wdform_' . $key . "_element_label" . $id] : "") . ' : ' . $form_currency . $element;
3568
- $element_quantity_label = isset($_POST['wdform_' . $key . "_element_quantity_label" . $id]) ? $_POST['wdform_' . $key . "_element_quantity_label" . $id] : NULL;
3569
- $element_quantity = (isset($_POST['wdform_' . $key . "_element_quantity" . $id]) && $_POST['wdform_' . $key . "_element_quantity" . $id]) ? $_POST['wdform_' . $key . "_element_quantity" . $id] : NULL;
3570
- if ( isset($element_quantity) ) {
3571
- $new_value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
 
3572
  }
3573
- for ( $k = 0; $k < 50; $k++ ) {
3574
- $temp_val = isset($_POST['wdform_' . $key . "_property" . $id . $k]) ? $_POST['wdform_' . $key . "_property" . $id . $k] : NULL;
3575
- if ( isset($temp_val) ) {
3576
- $new_value .= '<br/>' . (isset($_POST['wdform_' . $key . "_element_property_label" . $id . $k]) ? $_POST['wdform_' . $key . "_element_property_label" . $id . $k] : "") . ': ' . $temp_val;
3577
  }
3578
  }
3579
  }
3580
  break;
3581
  }
3582
  case "type_paypal_radio": {
3583
- $new_value = (isset($_POST['wdform_' . $key . "_element_label" . $id]) ? $_POST['wdform_' . $key . "_element_label" . $id] : "") . (isset($_POST['wdform_' . $key . "_element" . $id]) && $_POST['wdform_' . $key . "_element" . $id] ? ' - ' . $form_currency . $_POST['wdform_' . $key . "_element" . $id] : "");
3584
- $element_quantity_label = isset($_POST['wdform_' . $key . "_element_quantity_label" . $id]) ? $_POST['wdform_' . $key . "_element_quantity_label" . $id] : NULL;
3585
- $element_quantity = (isset($_POST['wdform_' . $i . "_element_quantity" . $id]) && $_POST['wdform_' . $i . "_element_quantity" . $id]) ? $_POST['wdform_' . $i . "_element_quantity" . $id] : NULL;
3586
- if ( isset($element_quantity) ) {
3587
- $new_value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
3588
- }
 
3589
  for ( $k = 0; $k < 50; $k++ ) {
3590
- $temp_val = isset($_POST['wdform_' . $key . "_property" . $id . $k]) ? $_POST['wdform_' . $key . "_property" . $id . $k] : NULL;
3591
- if ( isset($temp_val) ) {
3592
- $new_value .= '<br/>' . (isset($_POST['wdform_' . $key . "_element_property_label" . $id . $k]) ? $_POST['wdform_' . $key . "_element_property_label" . $id . $k] : "") . ': ' . $temp_val;
3593
  }
3594
  }
3595
  break;
3596
  }
3597
  case "type_paypal_shipping": {
3598
- $new_value = (isset($_POST['wdform_' . $key . "_element_label" . $id]) ? $_POST['wdform_' . $key . "_element_label" . $id] : "") . (isset($_POST['wdform_' . $key . "_element" . $id]) && $_POST['wdform_' . $key . "_element" . $id] ? ' : ' . $form_currency . $_POST['wdform_' . $key . "_element" . $id] : "");
3599
  break;
3600
  }
3601
  case "type_paypal_checkbox": {
3602
  $start = -1;
3603
  for ( $j = 0; $j < 100; $j++ ) {
3604
- $element = isset($_POST['wdform_' . $key . "_element" . $id . $j]) ? $_POST['wdform_' . $key . "_element" . $id . $j] : NULL;
3605
- if ( isset($element) ) {
3606
  $start = $j;
3607
  break;
3608
  }
3609
  }
3610
  if ( $start != -1 ) {
3611
  for ( $j = $start; $j < 100; $j++ ) {
3612
- $element = isset($_POST['wdform_' . $key . "_element" . $id . $j]) ? $_POST['wdform_' . $key . "_element" . $id . $j] : NULL;
3613
- if ( isset($element) ) {
3614
- $new_value = $new_value . (isset($_POST['wdform_' . $key . "_element" . $id . $j . "_label"]) ? $_POST['wdform_' . $key . "_element" . $id . $j . "_label"] : "") . ' - ' . (isset($element) ? $form_currency . ($element == '' ? '0' : $element) : "") . '<br>';
3615
  }
3616
  }
3617
  }
3618
- $element_quantity_label = isset($_POST['wdform_' . $key . "_element_quantity_label" . $id]) ? $_POST['wdform_' . $key . "_element_quantity_label" . $id] : NULL;
3619
- $element_quantity = (isset($_POST['wdform_' . $key . "_element_quantity" . $id]) && $_POST['wdform_' . $key . "_element_quantity" . $id]) ? $_POST['wdform_' . $key . "_element_quantity" . $id] : NULL;
3620
- if ( isset($element_quantity) ) {
3621
- $new_value .= '<br/>' . $element_quantity_label . ': ' . $element_quantity;
3622
- }
 
3623
  for ( $k = 0; $k < 50; $k++ ) {
3624
- $temp_val = isset($_POST['wdform_' . $key . "_property" . $id . $k]) ? $_POST['wdform_' . $key . "_property" . $id . $k] : NULL;
3625
- if ( isset($temp_val) ) {
3626
- $new_value .= '<br/>' . (isset($_POST['wdform_' . $key . "_element_property_label" . $id . $k]) ? $_POST['wdform_' . $key . "_element_property_label" . $id . $k] : "") . ': ' . $temp_val;
3627
  }
3628
  }
3629
  break;
3630
  }
3631
  case "type_paypal_total": {
3632
- $element = isset($_POST['wdform_' . $key . "_paypal_total" . $id]) ? $_POST['wdform_' . $key . "_paypal_total" . $id] : "";
3633
  $new_value = $new_value . $element;
3634
  break;
3635
  }
3636
  case "type_star_rating": {
3637
- $element = isset($_POST['wdform_' . $key . "_star_amount" . $id]) ? $_POST['wdform_' . $key . "_star_amount" . $id] : NULL;
3638
- $selected = isset($_POST['wdform_' . $key . "_selected_star_amount" . $id]) ? $_POST['wdform_' . $key . "_selected_star_amount" . $id] : 0;
3639
- if ( isset($element) ) {
3640
  $new_value = $new_value . $selected . '/' . $element;
3641
  }
3642
  break;
3643
  }
3644
  case "type_scale_rating": {
3645
- $element = isset($_POST['wdform_' . $key . "_scale_amount" . $id]) ? $_POST['wdform_' . $key . "_scale_amount" . $id] : NULL;
3646
- $selected = isset($_POST['wdform_' . $key . "_scale_radio" . $id]) ? $_POST['wdform_' . $key . "_scale_radio" . $id] : 0;
3647
- if ( isset($element) ) {
3648
  $new_value = $new_value . $selected . '/' . $element;
3649
  }
3650
  break;
3651
  }
3652
  case "type_spinner": {
3653
- $element = isset($_POST['wdform_' . $key . "_element" . $id]) ? $_POST['wdform_' . $key . "_element" . $id] : NULL;
3654
- if ( isset($element) ) {
3655
  $new_value = $new_value . $element;
3656
  }
3657
  break;
3658
  }
3659
  case "type_slider": {
3660
- $element = isset($_POST['wdform_' . $key . "_slider_value" . $id]) ? $_POST['wdform_' . $key . "_slider_value" . $id] : NULL;
3661
- if ( isset($element) ) {
3662
  $new_value = $new_value . $element;
3663
  }
3664
  break;
3665
  }
3666
  case "type_range": {
3667
- $element0 = isset($_POST['wdform_' . $key . "_element" . $id . '0']) ? $_POST['wdform_' . $key . "_element" . $id . '0'] : NULL;
3668
- $element1 = isset($_POST['wdform_' . $key . "_element" . $id . '1']) ? $_POST['wdform_' . $key . "_element" . $id . '1'] : NULL;
3669
- if ( isset($element0) || isset($element1) ) {
3670
  $new_value = $new_value . $element0 . '-' . $element1;
3671
  }
3672
  break;
3673
  }
3674
  case "type_grading": {
3675
- $element = isset($_POST['wdform_' . $key . "_hidden_item" . $id]) ? $_POST['wdform_' . $key . "_hidden_item" . $id] : "";
3676
- $grading = explode(":", $element);
3677
- $items_count = sizeof($grading) - 1;
3678
  $element = "";
3679
- $total = "";
3680
  for ( $k = 0; $k < $items_count; $k++ ) {
3681
- $element .= $grading[$k] . ":" . (isset($_POST['wdform_' . $key . "_element" . $id . '_' . $k]) ? $_POST['wdform_' . $key . "_element" . $id . '_' . $k] : "") . " ";
3682
- $total += (isset($_POST['wdform_' . $key . "_element" . $id . '_' . $k]) ? $_POST['wdform_' . $key . "_element" . $id . '_' . $k] : 0);
3683
  }
3684
- $element .= "Total:" . $total;
3685
- if ( isset($element) ) {
3686
  $new_value = $new_value . $element;
3687
  }
3688
  break;
3689
  }
3690
  case "type_matrix": {
3691
- $input_type = isset($_POST['wdform_' . $key . "_input_type" . $id]) ? $_POST['wdform_' . $key . "_input_type" . $id] : "";
3692
- $mat_rows = explode("***", isset($_POST['wdform_' . $key . "_hidden_row" . $id]) ? $_POST['wdform_' . $key . "_hidden_row" . $id] : "");
3693
- $rows_count = sizeof($mat_rows) - 1;
3694
- $mat_columns = explode("***", isset($_POST['wdform_' . $key . "_hidden_column" . $id]) ? $_POST['wdform_' . $key . "_hidden_column" . $id] : "");
3695
- $columns_count = sizeof($mat_columns) - 1;
3696
  $matrix = "<table>";
3697
  $matrix .= '<tr><td></td>';
3698
- for ( $k = 1; $k < count($mat_columns); $k++ ) {
3699
- $matrix .= '<td style="background-color:#BBBBBB; padding:5px; ">' . $mat_columns[$k] . '</td>';
3700
  }
3701
  $matrix .= '</tr>';
3702
  $aaa = Array();
3703
  for ( $k = 1; $k <= $rows_count; $k++ ) {
3704
- $matrix .= '<tr><td style="background-color:#BBBBBB; padding:5px;">' . $mat_rows[$k] . '</td>';
3705
  if ( $input_type == "radio" ) {
3706
- $mat_radio = isset($_POST['wdform_' . $key . "_input_element" . $id . $k]) ? $_POST['wdform_' . $key . "_input_element" . $id . $k] : 0;
3707
  if ( $mat_radio == 0 ) {
3708
  $checked = "";
3709
- $aaa[1] = "";
3710
- }
3711
- else {
3712
- $aaa = explode("_", $mat_radio);
3713
  }
3714
  for ( $j = 1; $j <= $columns_count; $j++ ) {
3715
- if ( $aaa[1] == $j ) {
3716
  $checked = "&#10004;";
3717
- }
3718
- else {
3719
  $checked = "";
3720
  }
3721
  $matrix .= '<td style="text-align:center">' . $checked . '</td>';
3722
  }
3723
- }
3724
- else {
3725
  if ( $input_type == "checkbox" ) {
3726
  for ( $j = 1; $j <= $columns_count; $j++ ) {
3727
- $checked = isset($_POST['wdform_' . $key . "_input_element" . $id . $k . '_' . $j]) ? $_POST['wdform_' . $key . "_input_element" . $id . $k . '_' . $j] : 0;
3728
  if ( $checked == 1 ) {
3729
  $checked = "&#10004;";
3730
- }
3731
- else {
3732
  $checked = "";
3733
  }
3734
  $matrix .= '<td style="text-align:center">' . $checked . '</td>';
3735
  }
3736
- }
3737
- else {
3738
  if ( $input_type == "text" ) {
3739
  for ( $j = 1; $j <= $columns_count; $j++ ) {
3740
- $checked = isset($_POST['wdform_' . $key . "_input_element" . $id . $k . '_' . $j]) ? esc_html($_POST['wdform_' . $key . "_input_element" . $id . $k . '_' . $j]) : "";
3741
  $matrix .= '<td style="text-align:center">' . $checked . '</td>';
3742
  }
3743
- }
3744
- else {
3745
  for ( $j = 1; $j <= $columns_count; $j++ ) {
3746
- $checked = isset($_POST['wdform_' . $key . "_select_yes_no" . $id . $k . '_' . $j]) ? $_POST['wdform_' . $key . "_select_yes_no" . $id . $k . '_' . $j] : "";
3747
  $matrix .= '<td style="text-align:center">' . $checked . '</td>';
3748
  }
3749
  }
@@ -3752,7 +3622,7 @@ class FMModelForm_maker {
3752
  $matrix .= '</tr>';
3753
  }
3754
  $matrix .= '</table>';
3755
- if ( isset($matrix) ) {
3756
  $new_value = $new_value . $matrix;
3757
  }
3758
  break;
@@ -3773,7 +3643,7 @@ class FMModelForm_maker {
3773
  */
3774
  public function empty_field( $element, $mail_emptyfields ) {
3775
  if ( !$mail_emptyfields ) {
3776
- if ( empty($element) ) {
3777
  return 0;
3778
  }
3779
  }
@@ -3788,9 +3658,9 @@ class FMModelForm_maker {
3788
  * @return bool
3789
  */
3790
  public function fm_validateDate( $date, $format = 'Y-m-d H:i:s' ) {
3791
- $d = DateTime::createFromFormat($format, $date);
3792
 
3793
- return $d && $d->format($format) == $date;
3794
  }
3795
 
3796
  /**
@@ -3800,8 +3670,8 @@ class FMModelForm_maker {
3800
  */
3801
  public function all_forms() {
3802
  global $wpdb;
3803
- $q = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_display_options as display INNER JOIN ' . $wpdb->prefix . 'formmaker as forms ON display.form_id = forms.id WHERE display.type != "embedded" and forms.published=1'. (!WDFM()->is_free ? '' : ' AND forms.id' . (WDFM()->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')');
3804
- $forms = $wpdb->get_results($q);
3805
  return $forms;
3806
  }
3807
  }
5
  */
6
  class FMModelForm_maker {
7
 
8
+ public $fm_css_content;
9
+
10
+ public $custom_fields = array();
11
+
12
  /**
13
+ * @param int $id
14
  * @param string $type
15
  *
16
  * @return array
17
  */
18
  public function showform( $id, $type = 'embedded' ) {
19
  global $wpdb;
20
+ $row = $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"' . (!WDFM()->is_free ? '' : ' AND id' . (WDFM()->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option( 'contact_form_forms', '' ) != '' ? get_option( 'contact_form_forms' ) : 0) . ')'), $id ) );
21
 
22
  if ( !$row ) {
23
+ echo WDW_FM_Library::message( __( 'Something went wrong when trying to display this form.', WDFM()->prefix ), 'fm-notice-error' );
24
  return FALSE;
25
  }
26
 
27
  if ( $row->type != $type ) {
28
+ echo WDW_FM_Library::message( __( 'The form you are trying to view does not have Embedded display type.', WDFM()->prefix ), 'fm-notice-error' );
29
  return FALSE;
30
  }
31
 
32
+ $form_preview = (WDW_FM_Library::get( 'wdform_id', '' ) == $id) ? TRUE : FALSE;
33
  if ( !$form_preview && !$row->published ) {
34
  // If the form has been unpublished.
35
+ echo WDW_FM_Library::message( __( 'The form you are trying to view has been unpublished.', WDFM()->prefix ), 'fm-notice-error' );
36
  return FALSE;
37
  }
38
+ $theme_id = WDW_FM_Library::get( 'test_theme', '' );
39
 
40
  if ( $theme_id == '' ) {
41
  $theme_id = $row->theme;
42
  }
43
+ $form_theme = $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $theme_id ) );
44
  if ( !$form_theme ) {
45
+ $form_theme = $wpdb->get_row( 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_themes' );
46
  if ( !$form_theme ) {
47
  return FALSE;
48
  }
49
  }
50
+ $params_decoded = json_decode( html_entity_decode( $form_theme->css ), TRUE );
51
  if ( $params_decoded != NULL ) {
52
  $old = $form_theme->version == 1;
53
  $form_theme = $params_decoded;
54
+ } else {
 
55
  $old = true;
56
  $form_theme = array( "CUPCSS" => $form_theme->css );
57
  }
58
+ $cssver = isset( $form_theme[ 'version' ] ) ? $form_theme[ 'version' ] : 1;
59
+ $this->create_css( $theme_id, $form_theme, $old );
60
+ $front_urls = WDFM()->front_urls;
61
  $wp_upload_dir = wp_upload_dir();
62
+ $frontend_dir = '/form-maker-frontend/';
63
+ $fm_style_dir = $wp_upload_dir[ 'basedir' ] . $frontend_dir . 'css/fm-style-' . $theme_id . '.css';
64
+ $fm_style_url = $front_urls[ 'upload_url' ] . $frontend_dir . 'css/fm-style-' . $theme_id . '.css';
65
+ if ( !file_exists( $fm_style_dir ) ) {
66
+ if ( function_exists( 'wp_add_inline_style' ) ) {
67
+ wp_add_inline_style( 'fm-frontend', $this->fm_css_content );
68
+ } else {
 
69
  echo '<style>' . $this->fm_css_content . '</style>';
70
  }
71
+ } else {
72
+ wp_register_style( 'fm-style-' . $theme_id, $fm_style_url, array(), $cssver );
73
+ wp_enqueue_style( 'fm-style-' . $theme_id );
 
74
  }
75
 
76
  $label_id = array();
77
  $label_type = array();
78
+ $label_all = explode( '#****#', $row->label_order );
79
+ $label_all = array_slice( $label_all, 0, count( $label_all ) - 1 );
80
  foreach ( $label_all as $key => $label_each ) {
81
+ $label_id_each = explode( '#**id**#', $label_each );
82
+ array_push( $label_id, $label_id_each[ 0 ] );
83
+ $label_order_each = explode( '#**label**#', $label_id_each[ 1 ] );
84
+ array_push( $label_type, $label_order_each[ 1 ] );
85
  }
86
 
87
  return array(
98
  * @param $key
99
  */
100
  public static function set_empty_values_transparent( &$value, $key ) {
101
+ if ( strpos( $key, 'Color' ) > -1 ) {
102
  /*
103
  * New themes colorpicker conflict with others.
104
  * Remove comments if no '#' is beeing saved with colors.
121
  public function create_css( $theme_id, $form_theme, $old = TRUE, $force_rewrite = FALSE ) {
122
  $wp_upload_dir = wp_upload_dir();
123
  $frontend_dir = '/form-maker-frontend/';
124
+ if ( !is_dir( $wp_upload_dir[ 'basedir' ] . $frontend_dir ) ) {
125
+ mkdir( $wp_upload_dir[ 'basedir' ] . $frontend_dir );
126
+ file_put_contents( $wp_upload_dir[ 'basedir' ] . $frontend_dir . 'index.html', WDW_FM_Library::forbidden_template() );
127
  }
128
+ if ( !is_dir( $wp_upload_dir[ 'basedir' ] . $frontend_dir . 'css' ) ) {
129
+ mkdir( $wp_upload_dir[ 'basedir' ] . $frontend_dir . 'css' );
130
+ file_put_contents( $wp_upload_dir[ 'basedir' ] . $frontend_dir . 'css/index.html', WDW_FM_Library::forbidden_template() );
131
  }
132
+ $frontend_css = $wp_upload_dir[ 'basedir' ] . $frontend_dir . 'css/fm-style-' . $theme_id . '.css';
133
+ if ( $theme_id && !$force_rewrite && file_exists( $frontend_css ) ) {
134
  return;
135
  }
136
  $prefixes = array(
159
  $border_types = array( 'top', 'left', 'right', 'bottom' );
160
  $borders = array();
161
  foreach ( $prefixes as $prefix ) {
162
+ $borders[ $prefix ] = array();
163
  foreach ( $border_types as $border_type ) {
164
+ if ( isset( $form_theme[ $prefix . 'Border' . ucfirst( $border_type ) ] ) ) {
165
+ array_push( $borders[ $prefix ], $form_theme[ $prefix . 'Border' . ucfirst( $border_type ) ] );
166
  }
167
  }
168
  }
169
  clearstatcache();
170
  $css_content = '';
171
  if ( !$old ) {
172
+ $css_content = '.fm-form-container.fm-theme' . $theme_id . ' {' .
173
+ (!empty( $form_theme[ 'AGPWidth' ] ) ? 'width:' . $form_theme[ 'AGPWidth' ] . '%;' : '') .
174
+ '}';
175
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form {' .
176
+ (!empty( $form_theme[ 'AGPMargin' ] ) ? 'margin:' . $form_theme[ 'AGPMargin' ] . ';' : '') .
177
+ (!empty( $form_theme[ 'AGPPadding' ] ) ? 'padding:' . $form_theme[ 'AGPPadding' ] . ' !important;' : '') .
178
+ ((isset( $form_theme[ 'AGPBorderRadius' ] ) && $form_theme[ 'AGPBorderRadius' ] !== '') ? 'border-radius:' . $form_theme[ 'AGPBorderRadius' ] . 'px;' : '') .
179
+ (!empty( $form_theme[ 'AGPBoxShadow' ] ) ? 'box-shadow:' . $form_theme[ 'AGPBoxShadow' ] . ';' : '') .
180
  '}';
181
+ if ( !empty( $borders[ 'AGP' ] ) ) {
182
+ foreach ( $borders[ 'AGP' ] as $border ) {
183
+ if ( !empty( $form_theme[ 'AGPBorderType' ] ) && ($form_theme[ 'AGPBorderType' ] == 'inherit' || $form_theme[ 'AGPBorderType' ] == 'initial') ) {
184
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form {' .
185
+ 'border-' . $border . ': ' . $form_theme[ 'AGPBorderType' ] . ' !important;' .
186
  '}';
187
  break;
188
+ } else {
189
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form {' .
190
+ ((isset( $form_theme[ 'AGPBorderWidth' ] ) && $form_theme[ 'AGPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'AGPBorderWidth' ] . 'px !important;' : '') .
191
+ (!empty( $form_theme[ 'AGPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'AGPBorderType' ] . ' !important;' : '') .
192
+ (!empty( $form_theme[ 'AGPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'AGPBorderColor' ] . ' !important;' : '') .
 
193
  '}';
194
  }
195
  }
196
  }
197
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .fm-header-bg {' .
198
+ 'display:' . ((!empty( $form_theme[ 'HPAlign' ] ) && ($form_theme[ 'HPAlign' ] == 'left' || $form_theme[ 'HPAlign' ] == 'right')) ? 'table-cell;' : 'block;') .
199
+ (!empty( $form_theme[ 'HPWidth' ] ) ? 'width:' . $form_theme[ 'HPWidth' ] . '%;' : '') .
200
+ (!empty( $form_theme[ 'HPBGColor' ] ) ? 'background-color:' . $form_theme[ 'HPBGColor' ] . ';' : '') .
201
  // 'vertical-align: top;'.
202
  '}';
203
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .fm-header {' .
204
+ (!empty( $form_theme[ 'HPWidth' ] ) ? 'width:' . $form_theme[ 'HPWidth' ] . '%;' : '') .
205
+ (!empty( $form_theme[ 'HPMargin' ] ) ? 'margin:' . $form_theme[ 'HPMargin' ] . ';' : '') .
206
+ (!empty( $form_theme[ 'HPPadding' ] ) ? 'padding:' . $form_theme[ 'HPPadding' ] . '!important;' : '') .
207
+ ((isset( $form_theme[ 'HPBorderRadius' ] ) && $form_theme[ 'HPBorderRadius' ] !== '') ? 'border-radius:' . $form_theme[ 'HPBorderRadius' ] . 'px;' : '') .
208
+ (!empty( $form_theme[ 'HPTextAlign' ] ) ? 'text-align:' . $form_theme[ 'HPTextAlign' ] . ';' : '') .
209
  '}';
210
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .image_left_right.fm-header {' .
211
  'padding: 0 !important;' .
212
  '}';
213
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .image_left_right > div {' .
214
+ (!empty( $form_theme[ 'HPPadding' ] ) ? 'padding:' . $form_theme[ 'HPPadding' ] . '!important;' : '') .
215
  '}';
216
+ if ( !empty( $borders[ 'HP' ] ) ) {
217
+ foreach ( $borders[ 'HP' ] as $border ) {
218
+ if ( !empty( $form_theme[ 'HPBorderType' ] ) && ($form_theme[ 'HPBorderType' ] == 'inherit' || $form_theme[ 'HPBorderType' ] == 'initial') ) {
219
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .fm-header {' .
220
+ 'border-' . $border . ':' . $form_theme[ 'HPBorderType' ] . ' !important;' .
221
  '}';
222
  break;
223
+ } else {
224
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .fm-header {' .
225
+ ((isset( $form_theme[ 'HPBorderWidth' ] ) && $form_theme[ 'HPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'HPBorderWidth' ] . 'px !important;' : '') .
226
+ (!empty( $form_theme[ 'HPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'HPBorderType' ] . ' !important;' : '') .
227
+ (!empty( $form_theme[ 'HPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'HPBorderColor' ] . ' !important;' : '') .
 
228
  '}';
229
  }
230
  }
231
  }
232
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form.header_left_right .wdform-page-and-images {' .
233
+ (!empty( $form_theme[ 'GPWidth' ] ) ? 'width:' . $form_theme[ 'GPWidth' ] . '%;' : '') .
234
  '}';
235
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form.header_left_right .fm-header {' .
236
+ (!empty( $form_theme[ 'HPWidth' ] ) ? 'width:' . $form_theme[ 'HPWidth' ] . '%;' : '') .
237
  '}';
238
+ $css_content .= '.fm-topbar .fm-form-container.fm-theme' . $theme_id . ' .fm-form .fm-header {' .
239
+ (!empty( $form_theme[ 'HTPWidth' ] ) ? 'width:' . $form_theme[ 'HTPWidth' ] . '% !important;' : '') .
240
  '}';
241
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .fm-header-title {' .
242
+ (!empty( $form_theme[ 'HTPFontSize' ] ) ? 'font-size:' . $form_theme[ 'HTPFontSize' ] . 'px;' : '') .
243
+ (!empty( $form_theme[ 'HTPColor' ] ) ? 'color:' . $form_theme[ 'HTPColor' ] . ';' : '') .
244
  '}';
245
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .fm-header-description {' .
246
+ (!empty( $form_theme[ 'HDPFontSize' ] ) ? 'font-size:' . $form_theme[ 'HDPFontSize' ] . 'px;' : '') .
247
+ (!empty( $form_theme[ 'HDPColor' ] ) ? 'color:' . $form_theme[ 'HDPColor' ] . ';' : '') .
248
  '}';
249
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-scrollbox {' .
250
+ (!empty( $form_theme[ 'AGPSPWidth' ] ) ? 'width:' . $form_theme[ 'AGPSPWidth' ] . '%;' : '') .
251
  '}';
252
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-minimize-text div {' .
253
+ (!empty( $form_theme[ 'MBPPadding' ] ) ? 'padding:' . $form_theme[ 'MBPPadding' ] . ';' : '') .
254
+ (!empty( $form_theme[ 'MBPMargin' ] ) ? 'margin:' . $form_theme[ 'MBPMargin' ] . ';' : '') .
255
+ (!empty( $form_theme[ 'MBPTextAlign' ] ) ? 'text-align:' . $form_theme[ 'MBPTextAlign' ] . ';' : '') .
256
+ (!empty( $form_theme[ 'MBPFontSize' ] ) ? 'font-size:' . $form_theme[ 'MBPFontSize' ] . 'px;' : '') .
257
+ (!empty( $form_theme[ 'MBPFontWeight' ] ) ? 'font-weight:' . $form_theme[ 'MBPFontWeight' ] . ';' : '') .
258
+ ((isset( $form_theme[ 'MBPBorderRadius' ] ) && $form_theme[ 'MBPBorderRadius' ] !== '') ? 'border-radius:' . $form_theme[ 'MBPBorderRadius' ] . 'px;' : '') .
259
  '}';
260
+ if ( !empty( $borders[ 'MBP' ] ) ) {
261
+ foreach ( $borders[ 'MBP' ] as $border ) {
262
+ if ( !empty( $form_theme[ 'MBPBorderType' ] ) && ($form_theme[ 'MBPBorderType' ] == 'inherit' || $form_theme[ 'MBPBorderType' ] == 'initial') ) {
263
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-minimize-text div {' .
264
+ 'border-' . $border . ':' . $form_theme[ 'MBPBorderType' ] . ' !important;' .
265
  '}';
266
  break;
267
+ } else {
268
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-minimize-text div {' .
269
+ ((isset( $form_theme[ 'MBPBorderWidth' ] ) && $form_theme[ 'MBPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'MBPBorderWidth' ] . 'px !important;' : '') .
270
+ (!empty( $form_theme[ 'MBPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'MBPBorderType' ] . ' !important;' : '') .
271
+ (!empty( $form_theme[ 'MBPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'MBPBorderColor' ] . ' !important;' : '') .
 
272
  '}';
273
  }
274
  }
275
  }
276
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-minimize-text div:hover {' .
277
+ (!empty( $form_theme[ 'MBHPBGColor' ] ) ? 'background-color:' . $form_theme[ 'MBHPBGColor' ] . ';' : '') .
278
+ (!empty( $form_theme[ 'MBHPColor' ] ) ? 'color:' . $form_theme[ 'MBHPColor' ] . ';' : '') .
279
  '}';
280
+ if ( $borders[ 'MBHP' ] ) {
281
+ foreach ( $borders[ 'MBHP' ] as $border ) {
282
+ if ( !empty( $form_theme[ 'MBHPBorderType' ] ) && ($form_theme[ 'MBHPBorderType' ] == 'inherit' || $form_theme[ 'MBHPBorderType' ] == 'initial') ) {
283
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-minimize-text div:hover {' .
284
+ 'border-' . $border . ':' . $form_theme[ 'MBHPBorderType' ] . ' !important;' .
285
  ';';
286
  break;
287
+ } else {
288
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-minimize-text div:hover { ' .
289
+ ((isset( $form_theme[ 'MBHPBorderWidth' ] ) && $form_theme[ 'MBHPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'MBHPBorderWidth' ] . 'px !important;' : '') .
290
+ (!empty( $form_theme[ 'MBHPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'MBHPBorderType' ] . ' !important;' : '') .
291
+ (!empty( $form_theme[ 'MBHPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'MBHPBorderColor' ] . ' !important;' : '') .
 
292
  '}';
293
  }
294
  }
295
  }
296
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform-page-and-images {' .
297
+ (!empty( $form_theme[ 'GPWidth' ] ) ? 'width:' . $form_theme[ 'GPWidth' ] . '%;' : '') .
298
+ (!empty( $form_theme[ 'GPMargin' ] ) ? 'margin:' . $form_theme[ 'GPMargin' ] . ';' : '') .
299
+ (!empty( $form_theme[ 'GPPadding' ] ) ? 'padding:' . $form_theme[ 'GPPadding' ] . ';' : '') .
300
+ ((isset( $form_theme[ 'GPBorderRadius' ] ) && $form_theme[ 'GPBorderRadius' ] !== '') ? 'border-radius:' . $form_theme[ 'GPBorderRadius' ] . 'px;' : '') .
301
+ (!empty( $form_theme[ 'GPFontWeight' ] ) ? 'font-weight:' . $form_theme[ 'GPFontWeight' ] . ';' : '') .
302
+ (!empty( $form_theme[ 'GPFontSize' ] ) ? 'font-size:' . $form_theme[ 'GPFontSize' ] . 'px;' : '') .
303
+ (!empty( $form_theme[ 'GPColor' ] ) ? 'color:' . $form_theme[ 'GPColor' ] . ';' : '') .
304
  '}';
305
+ $css_content .= '.fm-topbar .fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform-page-and-images {' .
306
+ (!empty( $form_theme[ 'GTPWidth' ] ) ? 'width:' . $form_theme[ 'GTPWidth' ] . '% !important;' : '') .
307
  '}';
308
+ if ( $borders[ 'GP' ] ) {
309
+ foreach ( $borders[ 'GP' ] as $border ) {
310
+ if ( !empty( $form_theme[ 'GPBorderType' ] ) && ($form_theme[ 'GPBorderType' ] == 'inherit' || $form_theme[ 'GPBorderType' ] == 'initial') ) {
311
  $css_content .= '
312
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform-page-and-images,
313
+ .fm-form-container.fm-theme' . $theme_id . ' .fm-minimize-text {' .
314
+ 'border-' . $border . ':' . $form_theme[ 'GPBorderType' ] . ' !important;' .
315
  '}';
316
  break;
317
+ } else {
 
318
  $css_content .= '
319
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform-page-and-images,
320
+ .fm-form-container.fm-theme' . $theme_id . ' .fm-minimize-text {' .
321
+ ((isset( $form_theme[ 'GPBorderWidth' ] ) && $form_theme[ 'GPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'GPBorderWidth' ] . 'px !important;' : '') .
322
+ (!empty( $form_theme[ 'GPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'GPBorderType' ] . ' !important;' : '') .
323
+ (!empty( $form_theme[ 'GPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'GPBorderColor' ] . ' !important;' : '') .
324
  '}';
325
  }
326
  }
327
  }
328
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .mini_label {' .
329
+ (!empty( $form_theme[ 'GPMLMargin' ] ) ? 'margin:' . $form_theme[ 'GPMLMargin' ] . ';' : '') .
330
+ (!empty( $form_theme[ 'GPMLPadding' ] ) ? 'padding:' . $form_theme[ 'GPMLPadding' ] . ' !important;' : '') .
331
+ (!empty( $form_theme[ 'GPMLFontWeight' ] ) ? 'font-weight:' . $form_theme[ 'GPMLFontWeight' ] . ';' : '') .
332
+ (!empty( $form_theme[ 'GPMLFontSize' ] ) ? 'font-size:' . $form_theme[ 'GPMLFontSize' ] . 'px !important;' : '') .
333
+ (!empty( $form_theme[ 'GPMLColor' ] ) ? 'color:' . $form_theme[ 'GPMLColor' ] . ';' : '') .
334
  '}';
335
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform-page-and-images label {' .
336
+ (!empty( $form_theme[ 'GPFontSize' ] ) ? 'font-size:' . $form_theme[ 'GPFontSize' ] . 'px;' : '') .
337
+ (!empty( $form_theme[ 'GPColor' ] ) ? 'color:' . $form_theme[ 'GPColor' ] . ';' : '') .
338
  '}';
339
+ if ( !empty( $form_theme[ 'GPAlign' ] ) && $form_theme[ 'GPAlign' ] == 'center' ) {
340
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform-page-and-images {' .
341
+ 'margin:0 auto;' .
342
  '}';
343
+ } else {
344
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform-page-and-images {' .
345
+ (!empty( $form_theme[ 'GPAlign' ] ) ? 'float:' . $form_theme[ 'GPAlign' ] . ';' : '') .
 
346
  '}';
347
  }
348
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform_section {' .
349
+ (!empty( $form_theme[ 'SEPMargin' ] ) ? 'margin:' . $form_theme[ 'SEPMargin' ] . ';' : '') .
350
+ (!empty( $form_theme[ 'SEPPadding' ] ) ? 'padding:' . $form_theme[ 'SEPPadding' ] . ';' : '') .
351
+ 'background: transparent;' .
352
  '}';
353
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . '.fm-form .wdform_column {' .
354
+ (!empty( $form_theme[ 'COPMargin' ] ) ? 'margin:' . $form_theme[ 'COPMargin' ] . ';' : '') .
355
+ (!empty( $form_theme[ 'COPPadding' ] ) ? 'padding:' . $form_theme[ 'COPPadding' ] . ';' : '') .
356
  '}';
357
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-slider {' .
358
+ (!empty( $form_theme[ 'IPBGColor' ] ) ? 'background:' . $form_theme[ 'IPBGColor' ] . ' !important;' : '') .
359
  '}';
360
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-scrollbox .fm-scrollbox-form {' .
361
+ (!empty( $form_theme[ 'AGPMargin' ] ) ? 'margin:' . $form_theme[ 'AGPMargin' ] . ';' : '') .
362
  '}';
363
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-popover .fm-popover-content {' .
364
+ (!empty( $form_theme[ 'AGPMargin' ] ) ? 'margin:' . $form_theme[ 'AGPMargin' ] . ';' : '') .
365
+ (!empty( $form_theme[ 'AGPWidth' ] ) ? 'width:' . $form_theme[ 'AGPWidth' ] . '%;' : '') .
366
  '}';
367
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages.wdform_page_navigation {' .
368
+ (!empty( $form_theme[ 'AGPMargin' ] ) ? 'margin:' . $form_theme[ 'AGPMargin' ] . '%;' : '') .
369
  '}';
370
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform_footer {' .
371
+ (!empty( $form_theme[ 'FPWidth' ] ) ? 'width:' . $form_theme[ 'FPWidth' ] . '%;' : '') .
372
+ (!empty( $form_theme[ 'FPMargin' ] ) ? 'margin:' . $form_theme[ 'FPMargin' ] . ';' : '') .
373
+ (!empty( $form_theme[ 'FPPadding' ] ) ? 'padding:' . $form_theme[ 'FPPadding' ] . ';' : '') .
374
+ (!empty( $form_theme[ 'GPFontWeight' ] ) ? 'font-weight:' . $form_theme[ 'GPFontWeight' ] . ';' : '') .
375
+ (!empty( $form_theme[ 'GPFontSize' ] ) ? 'font-size:' . $form_theme[ 'GPFontSize' ] . 'px;' : '') .
376
+ (!empty( $form_theme[ 'GPColor' ] ) ? 'color:' . $form_theme[ 'GPColor' ] . ';' : '') .
377
  '}';
378
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_active {' .
379
+ (!empty( $form_theme[ 'PSAPMargin' ] ) ? 'margin:' . $form_theme[ 'PSAPMargin' ] . ';' : '') .
380
+ (!empty( $form_theme[ 'PSAPPadding' ] ) ? 'padding:' . $form_theme[ 'PSAPPadding' ] . ';' : '') .
381
+ (!empty( $form_theme[ 'PSAPWidth' ] ) ? 'width:' . $form_theme[ 'PSAPWidth' ] . 'px;' : '') .
382
+ (!empty( $form_theme[ 'PSAPHeight' ] ) ? 'height:' . $form_theme[ 'PSAPHeight' ] . 'px;' : '') .
383
+ (!empty( $form_theme[ 'PSAPBGColor' ] ) ? 'background-color:' . $form_theme[ 'PSAPBGColor' ] . ';' : '') .
384
+ (!empty( $form_theme[ 'PSAPFontSize' ] ) ? 'font-size:' . $form_theme[ 'PSAPFontSize' ] . 'px;' : '') .
385
+ (!empty( $form_theme[ 'PSAPFontWeight' ] ) ? 'font-weight:' . $form_theme[ 'PSAPFontWeight' ] . ';' : '') .
386
+ (!empty( $form_theme[ 'PSAPColor' ] ) ? 'color:' . $form_theme[ 'PSAPColor' ] . ';' : '') .
387
+ (!empty( $form_theme[ 'PSAPLineHeight' ] ) ? 'line-height:' . $form_theme[ 'PSAPLineHeight' ] . 'px;' : '') .
388
+ ((isset( $form_theme[ 'PSAPBorderRadius' ] ) && $form_theme[ 'PSAPBorderRadius' ] !== '') ? 'border-radius:' . $form_theme[ 'PSAPBorderRadius' ] . 'px;' : '') .
389
  '}';
390
+ if ( $borders[ 'PSAP' ] ) {
391
+ foreach ( $borders[ 'PSAP' ] as $border ) {
392
+ if ( !empty( $form_theme[ 'PSAPBorderType' ] ) && ($form_theme[ 'PSAPBorderType' ] == 'inherit' || $form_theme[ 'PSAPBorderType' ] == 'initial') ) {
393
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_active {' .
394
+ 'border:' . $form_theme[ 'PSAPBorderType' ] . ' !important;' .
395
  '}';
396
  break;
397
+ } else {
398
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_active {' .
399
+ ((isset( $form_theme[ 'PSAPBorderWidth' ] ) && $form_theme[ 'PSAPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'PSAPBorderWidth' ] . 'px !important;' : '') .
400
+ (!empty( $form_theme[ 'PSAPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'PSAPBorderType' ] . ' !important;' : '') .
401
+ (!empty( $form_theme[ 'PSAPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'PSAPBorderColor' ] . ' !important;' : '') .
 
402
  '}';
403
  }
404
  }
405
  }
406
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_deactive {' .
407
+ (!empty( $form_theme[ 'PSDPBGColor' ] ) ? 'background-color:' . $form_theme[ 'PSDPBGColor' ] . ';' : '') .
408
+ (!empty( $form_theme[ 'PSAPWidth' ] ) ? 'width:' . $form_theme[ 'PSAPWidth' ] . 'px;' : '') .
409
+ (!empty( $form_theme[ 'PSDPHeight' ] ) ? 'height:' . $form_theme[ 'PSDPHeight' ] . 'px;' : '') .
410
+ (!empty( $form_theme[ 'PSDPMargin' ] ) ? 'margin:' . $form_theme[ 'PSDPMargin' ] . ';' : '') .
411
+ (!empty( $form_theme[ 'PSDPPadding' ] ) ? 'padding:' . $form_theme[ 'PSDPPadding' ] . ';' : '') .
412
+ (!empty( $form_theme[ 'PSDPLineHeight' ] ) ? 'line-height:' . $form_theme[ 'PSDPLineHeight' ] . 'px;' : '') .
413
+ ((isset( $form_theme[ 'PSAPBorderRadius' ] ) && $form_theme[ 'PSAPBorderRadius' ] !== '') ? 'border-radius:' . $form_theme[ 'PSAPBorderRadius' ] . 'px;' : '') .
414
+ (!empty( $form_theme[ 'PSDPFontWeight' ] ) ? 'font-weight:' . $form_theme[ 'PSDPFontWeight' ] . ';' : '') .
415
+ (!empty( $form_theme[ 'PSDPFontSize' ] ) ? 'font-size:' . $form_theme[ 'PSDPFontSize' ] . 'px;' : '') .
416
+ (!empty( $form_theme[ 'PSDPColor' ] ) ? 'color:' . $form_theme[ 'PSDPColor' ] . ';' : '') .
417
  '}';
418
+ if ( $borders[ 'PSDP' ] ) {
419
+ foreach ( $borders[ 'PSDP' ] as $border ) {
420
+ if ( !empty( $form_theme[ 'PSDPBorderType' ] ) && ($form_theme[ 'PSDPBorderType' ] == 'inherit' || $form_theme[ 'PSDPBorderType' ] == 'initial') ) {
421
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_deactive {' .
422
+ 'border:' . $form_theme[ 'PSDPBorderType' ] . ' !important;' .
423
  '}';
424
  break;
425
+ } else {
426
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_deactive {' .
427
+ ((isset( $form_theme[ 'PSDPBorderWidth' ] ) && $form_theme[ 'PSDPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'PSDPBorderWidth' ] . 'px !important;' : '') .
428
+ (!empty( $form_theme[ 'PSDPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'PSDPBorderType' ] . ' !important;' : '') .
429
+ (!empty( $form_theme[ 'PSDPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'PSDPBorderColor' ] . ' !important;' : '') .
 
430
  '}';
431
  }
432
  }
433
  }
434
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_percentage_active {' .
435
+ (!empty( $form_theme[ 'PSAPWidth' ] ) ? 'width:' . $form_theme[ 'PSAPWidth' ] . 'px;' : '') .
436
+ (!empty( $form_theme[ 'PSAPHeight' ] ) ? 'height:' . $form_theme[ 'PSAPHeight' ] . 'px;' : '') .
437
+ (!empty( $form_theme[ 'PSAPMargin' ] ) ? 'margin:' . $form_theme[ 'PSAPMargin' ] . ';' : '') .
438
+ (!empty( $form_theme[ 'PSAPPadding' ] ) ? 'padding:' . $form_theme[ 'PSAPPadding' ] . ';' : '') .
439
+ (!empty( $form_theme[ 'PSAPBGColor' ] ) ? 'background-color:' . $form_theme[ 'PSAPBGColor' ] . ';' : '') .
440
+ (!empty( $form_theme[ 'PSAPFontWeight' ] ) ? 'font-weight:' . $form_theme[ 'PSAPFontWeight' ] . ';' : '') .
441
+ (!empty( $form_theme[ 'PSAPFontSize' ] ) ? 'font-size:' . $form_theme[ 'PSAPFontSize' ] . 'px;' : '') .
442
+ (!empty( $form_theme[ 'PSAPColor' ] ) ? 'color:' . $form_theme[ 'PSAPColor' ] . ';' : '') .
443
+ (!empty( $form_theme[ 'PSAPLineHeight' ] ) ? 'line-height:' . $form_theme[ 'PSAPLineHeight' ] . 'px;' : '') .
444
+ ((isset( $form_theme[ 'PSAPBorderRadius' ] ) && $form_theme[ 'PSAPBorderRadius' ] !== '') ? 'border-radius:' . $form_theme[ 'PSAPBorderRadius' ] . 'px;' : '') .
445
  '}';
446
+ if ( $borders[ 'PSAP' ] ) {
447
+ foreach ( $borders[ 'PSAP' ] as $border ) {
448
+ if ( !empty( $form_theme[ 'PSAPBorderType' ] ) && ($form_theme[ 'PSAPBorderType' ] == 'inherit' || $form_theme[ 'PSAPBorderType' ] == 'initial') ) {
449
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_percentage_active {' .
450
+ 'border:' . $form_theme[ 'PSAPBorderType' ] . ' !important;' .
451
  '}';
452
  break;
453
+ } else {
454
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_percentage_active {' .
455
+ ((isset( $form_theme[ 'PSAPBorderWidth' ] ) && $form_theme[ 'PSAPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'PSAPBorderWidth' ] . 'px !important;' : '') .
456
+ (!empty( $form_theme[ 'PSAPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'PSAPBorderType' ] . ' !important;' : '') .
457
+ (!empty( $form_theme[ 'PSAPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'PSAPBorderColor' ] . ' !important;' : '') .
 
458
  '}';
459
  }
460
  }
461
  }
462
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_percentage_deactive {' .
463
+ (!empty( $form_theme[ 'PPAPWidth' ] ) ? 'width:' . $form_theme[ 'PPAPWidth' ] . ';' : '') .
464
+ (!empty( $form_theme[ 'PSDPHeight' ] ) ? 'height:' . $form_theme[ 'PSDPHeight' ] . 'px;' : '') .
465
+ (!empty( $form_theme[ 'PSDPMargin' ] ) ? 'margin:' . $form_theme[ 'PSDPMargin' ] . ';' : '') .
466
+ (!empty( $form_theme[ 'PSDPPadding' ] ) ? 'padding:' . $form_theme[ 'PSDPPadding' ] . ';' : '') .
467
+ (!empty( $form_theme[ 'PSDPBGColor' ] ) ? 'background-color:' . $form_theme[ 'PSDPBGColor' ] . ';' : '') .
468
+ (!empty( $form_theme[ 'PSDPFontWeight' ] ) ? 'font-weight:' . $form_theme[ 'PSDPFontWeight' ] . ';' : '') .
469
+ (!empty( $form_theme[ 'PSDPFontSize' ] ) ? 'font-size:' . $form_theme[ 'PSDPFontSize' ] . 'px;' : '') .
470
+ (!empty( $form_theme[ 'PSDPColor' ] ) ? 'color:' . $form_theme[ 'PSDPColor' ] . ';' : '') .
471
+ (!empty( $form_theme[ 'PSDPLineHeight' ] ) ? 'line-height:' . $form_theme[ 'PSDPLineHeight' ] . 'px;' : '') .
472
+ ((isset( $form_theme[ 'PSDPBorderRadius' ] ) && $form_theme[ 'PSDPBorderRadius' ] !== '') ? 'border-radius:' . $form_theme[ 'PSDPBorderRadius' ] . 'px;' : '') .
473
  '}';
474
+ if ( $borders[ 'PSDP' ] ) {
475
+ foreach ( $borders[ 'PSDP' ] as $border ) {
476
+ if ( !empty( $form_theme[ 'PSDPBorderType' ] ) && ($form_theme[ 'PSDPBorderType' ] == 'inherit' || $form_theme[ 'PSDPBorderType' ] == 'initial') ) {
477
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_percentage_deactive {' .
478
+ 'border:' . $form_theme[ 'PSDPBorderType' ] . ' !important;' .
479
  '}';
480
  break;
481
+ } else {
482
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-pages .page_percentage_deactive {' .
483
+ ((isset( $form_theme[ 'PSDPBorderWidth' ] ) && $form_theme[ 'PSDPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'PSDPBorderWidth' ] . 'px !important;' : '') .
484
+ (!empty( $form_theme[ 'PSDPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'PSDPBorderType' ] . ' !important;' : '') .
485
+ (!empty( $form_theme[ 'PSDPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'PSDPBorderColor' ] . ' !important;' : '') .
 
486
  '}';
487
  }
488
  }
489
  }
490
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-action-buttons {' .
491
+ (!empty( $form_theme[ 'CBPFontWeight' ] ) ? 'font-weight:' . $form_theme[ 'CBPFontWeight' ] . ';' : '') .
492
+ (!empty( $form_theme[ 'CBPFontSize' ] ) ? 'font-size:' . $form_theme[ 'CBPFontSize' ] . 'px;' : '') .
493
+ (!empty( $form_theme[ 'CBPColor' ] ) ? 'color:' . $form_theme[ 'CBPColor' ] . ';' : '') .
494
  '}';
495
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .closing-form,
496
+ .fm-form-container.fm-theme' . $theme_id . ' .minimize-form {' .
497
+ (!empty( $form_theme[ 'CBPMargin' ] ) ? 'margin:' . $form_theme[ 'CBPMargin' ] . ';' : '') .
498
+ (!empty( $form_theme[ 'CBPPadding' ] ) ? 'padding:' . $form_theme[ 'CBPPadding' ] . ';' : '') .
499
+ (!empty( $form_theme[ 'CBPPosition' ] ) ? 'position:' . $form_theme[ 'CBPPosition' ] . ';' : '') .
500
+ (!empty( $form_theme[ 'CBPBGColor' ] ) ? 'background-color:' . $form_theme[ 'CBPBGColor' ] . ';' : '') .
501
+ ((isset( $form_theme[ 'CBPBorderRadius' ] ) && $form_theme[ 'CBPBorderRadius' ] !== '') ? 'border-radius:' . $form_theme[ 'CBPBorderRadius' ] . 'px;' : '') .
502
  '}';
503
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .closing-form {' .
504
+ (!empty( $form_theme[ 'CBPTop' ] ) ? 'top:' . $form_theme[ 'CBPTop' ] . ';' : '') .
505
+ (!empty( $form_theme[ 'CBPRight' ] ) ? 'right:' . $form_theme[ 'CBPRight' ] . ';' : '') .
506
+ (!empty( $form_theme[ 'CBPBottom' ] ) ? 'bottom:' . $form_theme[ 'CBPBottom' ] . ';' : '') .
507
+ (!empty( $form_theme[ 'CBPLeft' ] ) ? 'left:' . $form_theme[ 'CBPLeft' ] . ';' : '') .
508
  '}';
509
+ $for_mini = !empty( $form_theme[ 'CBPLeft' ] ) ? 'left' : 'right';
510
+ $cbp_for_mini = ($form_theme[ 'CBP' . ucfirst( $for_mini ) ]) ? $form_theme[ 'CBP' . ucfirst( $for_mini ) ] : 0;
511
+ $cbpfontsize = !empty( $form_theme[ 'CBPFontSize' ] ) ? (int)$form_theme[ 'CBPFontSize' ] : 0;
512
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .minimize-form {' .
513
+ (!empty( $form_theme[ 'CBPTop' ] ) ? 'top:' . $form_theme[ 'CBPTop' ] . ';' : '') .
514
+ (!empty( $form_theme[ 'CBPBottom' ] ) ? 'bottom:' . $form_theme[ 'CBPBottom' ] . ';' : '') .
515
+ $for_mini . ': ' . (2 * (int)$cbp_for_mini + $cbpfontsize + 3) . 'px;' .
516
  '}';
517
+ if ( $borders[ 'CBP' ] ) {
518
+ foreach ( $borders[ 'CBP' ] as $border ) {
519
+ if ( !empty( $form_theme[ 'CBPBorderType' ] ) && ($form_theme[ 'CBPBorderType' ] == 'inherit' || $form_theme[ 'CBPBorderType' ] == 'initial') ) {
520
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .closing-form,
521
+ .fm-form-container.fm-theme' . $theme_id . ' .minimize-form {' .
522
+ 'border-' . $border . ':' . $form_theme[ 'CBPBorderType' ] . ' !important;' .
523
  '}';
524
  break;
525
+ } else {
 
526
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .closing-form,
527
+ .fm-form-container.fm-theme' . $theme_id . ' .minimize-form {' .
528
+ ((isset( $form_theme[ 'CBPBorderWidth' ] ) && $form_theme[ 'CBPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'CBPBorderWidth' ] . 'px !important;' : '') .
529
+ (!empty( $form_theme[ 'CBPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'CBPBorderType' ] . ' !important;' : '') .
530
+ (!empty( $form_theme[ 'CBPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'CBPBorderColor' ] . ' !important;' : '') .
531
  '}';
532
  }
533
  }
534
  }
535
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .closing-form:hover,
536
+ .fm-form-container.fm-theme' . $theme_id . ' .minimize-form:hover {' .
537
+ (!empty( $form_theme[ 'CBHPBGColor' ] ) ? 'background:' . $form_theme[ 'CBHPBGColor' ] . ';' : '') .
538
+ (!empty( $form_theme[ 'CBHPColor' ] ) ? 'color:' . $form_theme[ 'CBHPColor' ] . ';' : '') .
539
+ 'border:none;' .
540
  '}';
541
+ if ( $borders[ 'CBHP' ] ) {
542
+ foreach ( $borders[ 'CBHP' ] as $border ) {
543
+ if ( !empty( $form_theme[ 'CBHPBorderType' ] ) && ($form_theme[ 'CBHPBorderType' ] == 'inherit' || $form_theme[ 'CBHPBorderType' ] == 'initial') ) {
544
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .closing-form:hover,
545
+ .fm-form-container.fm-theme' . $theme_id . ' .minimize-form:hover {' .
546
+ 'border-' . $border . ':' . $form_theme[ 'CBHPBorderType' ] . ' !important;' .
547
  '}';
548
  break;
549
+ } else {
 
550
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .closing-form:hover,
551
+ .fm-form-container.fm-theme' . $theme_id . ' .minimize-form:hover {' .
552
+ ((isset( $form_theme[ 'CBHPBorderWidth' ] ) && $form_theme[ 'CBHPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'CBHPBorderWidth' ] . 'px !important;' : '') .
553
+ (!empty( $form_theme[ 'CBHPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'CBHPBorderType' ] . ' !important;' : '') .
554
+ (!empty( $form_theme[ 'CBHPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'CBHPBorderColor' ] . ' !important;' : '') .
555
  '}';
556
  }
557
  }
558
  }
559
+ $user_agent = $_SERVER[ 'HTTP_USER_AGENT' ];
560
+ if ( stripos( $user_agent, 'Safari' ) !== FALSE && stripos( $user_agent, 'Chrome' ) === FALSE ) {
561
  $css_content .= '.fm-popover-container:before {
562
  position:absolute;
563
  }';
564
  }
565
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform-required {' .
566
+ (!empty( $form_theme[ 'OPRColor' ] ) ? 'color:' . $form_theme[ 'OPRColor' ] . ';' : '') .
567
  '}';
568
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form input(not:active) {' .
569
+ (!empty( $form_theme[ 'OPFontStyle' ] ) ? 'font-style:' . $form_theme[ 'OPFontStyle' ] . ';' : '') .
570
+ (!empty( $form_theme[ 'OPDeInputColor' ] ) ? 'color:' . $form_theme[ 'OPDeInputColor' ] . ' !important;' : '') .
571
  '}';
572
 
573
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .file-picker {' .
574
+ (!empty( $form_theme[ 'OPFBgUrl' ] ) ? 'display: inline-block; width: 22px; height: 22px; background: url("' . WDFM()->plugin_url . '/' . $form_theme[ 'OPFBgUrl' ] . '");' : '') .
575
+ (!empty( $form_theme[ 'OPFBGRepeat' ] ) ? 'background-repeat:' . $form_theme[ 'OPFBGRepeat' ] . ';' : '') .
576
+ (!empty( $form_theme[ 'OPFPos1' ] ) ? 'background-position-x:' . $form_theme[ 'OPFPos1' ] . ';' : '') .
577
+ (!empty( $form_theme[ 'OPFPos2' ] ) ? 'background-position-y:' . $form_theme[ 'OPFPos2' ] . ';' : '') .
578
  '}';
579
+ if ( empty( $form_theme[ 'OPFBgUrl' ] ) ) {
580
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .file-upload-status {' .
581
  'display: none;' .
582
  '}';
583
  }
584
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .file-upload input {' .
585
+ (!empty( $form_theme[ 'OPFBgUrl' ] ) ? 'position: absolute; visibility: hidden;' : 'border: none;') .
586
  '}';
587
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form {' .
588
+ (!empty( $form_theme[ 'GPBGColor' ] ) ? 'background:' . $form_theme[ 'GPBGColor' ] . ';' : '') .
589
+ (!empty( $form_theme[ 'GPFontFamily' ] ) ? 'font-family:' . $form_theme[ 'GPFontFamily' ] . ';' : '') .
590
  '}';
591
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .wdform_section {' .
592
+ ((!empty( $form_theme[ 'GPBGColor' ] ) && !empty( $form_theme[ 'SEPBGColor' ] ) && $form_theme[ 'GPBGColor' ] != $form_theme[ 'SEPBGColor' ]) ? 'background:' . $form_theme[ 'SEPBGColor' ] . ';' : '') .
593
  '}';
594
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type="text"],
595
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-corner-all,
601
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-spinner-input,
602
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form select,
603
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .captcha_img,
604
+ .fm-form-container.fm-theme' . $theme_id . ' .fm-form .arithmetic_captcha_img {' .
605
+ (!empty( $form_theme[ 'IPHeight' ] ) ? 'height:' . $form_theme[ 'IPHeight' ] . 'px;' : '') .
606
  '}';
607
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type="text"],
608
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-corner-all:not(.ui-spinner):not(.ui-slider-horizontal),
613
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form textarea,
614
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-spinner-input,
615
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .file-upload-status,
616
+ .fm-form-container.fm-theme' . $theme_id . ' .fm-form select {' .
617
+ (!empty( $form_theme[ 'IPPadding' ] ) ? 'padding:' . $form_theme[ 'IPPadding' ] . ';' : '') .
618
  '}';
619
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type="text"],
620
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-corner-all,
625
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form textarea,
626
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-spinner-input,
627
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .file-upload-status,
628
+ .fm-form-container.fm-theme' . $theme_id . ' .fm-form select {' .
629
+ (!empty( $form_theme[ 'IPMargin' ] ) ? 'margin:' . $form_theme[ 'IPMargin' ] . ';' : '') .
630
+ (!empty( $form_theme[ 'IPBGColor' ] ) ? 'background-color:' . $form_theme[ 'IPBGColor' ] . ';' : '') .
631
+ (!empty( $form_theme[ 'IPFontWeight' ] ) ? 'font-weight:' . $form_theme[ 'IPFontWeight' ] . ';' : '') .
632
+ (!empty( $form_theme[ 'IPFontSize' ] ) ? 'font-size:' . $form_theme[ 'IPFontSize' ] . 'px;' : '') .
633
+ (!empty( $form_theme[ 'IPColor' ] ) ? 'color:' . $form_theme[ 'IPColor' ] . ';' : '') .
634
+ ((isset( $form_theme[ 'IPBorderRadius' ] ) && $form_theme[ 'IPBorderRadius' ] !== '') ? 'border-radius:' . $form_theme[ 'IPBorderRadius' ] . 'px !important;' : '') .
635
+ (!empty( $form_theme[ 'IPBoxShadow' ] ) ? 'box-shadow:' . $form_theme[ 'IPBoxShadow' ] . ';' : '') .
636
  '}';
637
+ if ( $borders[ 'IP' ] ) {
638
+ foreach ( $borders[ 'IP' ] as $border ) {
639
+ if ( !empty( $form_theme[ 'IPBorderType' ] ) && ($form_theme[ 'IPBorderType' ] == 'inherit' || $form_theme[ 'IPBorderType' ] == 'initial') ) {
640
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type="text"]:not(.ui-spinner-input),
641
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type="number"]:not(.ui-spinner-input),
642
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type=password],
646
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-spinner,
647
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-slider,
648
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-slider-handle,
649
+ .fm-form-container.fm-theme' . $theme_id . ' .fm-form select {' .
650
+ 'border-' . $border . '-style:' . $form_theme[ 'IPBorderType' ] . ' !important;' .
651
  '}';
652
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-spinner-button {' .
653
+ 'border-left-style:' . $form_theme[ 'IPBorderType' ] . ' !important;' .
654
  '}';
655
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-slider-range {' .
656
  '}';
657
  break;
658
+ } else {
 
659
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type="text"]:not(.ui-spinner-input),
660
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type="number"]:not(.ui-spinner-input),
661
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type=password],
665
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-spinner,
666
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-slider,
667
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-slider-handle,
668
+ .fm-form-container.fm-theme' . $theme_id . ' .fm-form select {' .
669
+ ((isset( $form_theme[ 'IPBorderWidth' ] ) && $form_theme[ 'IPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'IPBorderWidth' ] . 'px !important;' : '') .
670
+ (!empty( $form_theme[ 'IPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'IPBorderType' ] . ' !important;' : '') .
671
+ (!empty( $form_theme[ 'IPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'IPBorderColor' ] . ' !important;' : '') .
672
  '}';
673
  if ( $border == 'left' ) {
674
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-spinner-button {' .
675
+ ((isset( $form_theme[ 'IPBorderWidth' ] ) && $form_theme[ 'IPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'IPBorderWidth' ] . 'px !important;' : '') .
676
+ (!empty( $form_theme[ 'IPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'IPBorderType' ] . ' !important;' : '') .
677
+ (!empty( $form_theme[ 'IPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'IPBorderColor' ] . ' !important;' : '') .
678
  '}';
679
  }
680
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .ui-slider-range {' .
681
+ (!empty( $form_theme[ 'IPBorderColor' ] ) ? 'background:' . $form_theme[ 'IPBorderColor' ] . ' !important;' : '') .
682
  '}';
683
  }
684
  }
685
  }
686
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form select {' .
687
+ (!empty( $form_theme[ 'IPBGColor' ] ) ? 'background-color:' . $form_theme[ 'IPBGColor' ] . ';' : '') .
688
+ (!empty( $form_theme[ 'SBPBackground' ] ) ? 'background-image: url("' . WDFM()->plugin_url . '/' . $form_theme[ 'SBPBackground' ] . '");' : '') .
689
+ (!empty( $form_theme[ 'SBPBGRepeat' ] ) ? 'background-repeat:' . $form_theme[ 'SBPBGRepeat' ] . ';' : '') .
690
+ (!empty( $form_theme[ 'SBPBackground' ] ) ? 'background-position-x: calc(100% - 8px);' : '') .
691
+ (!empty( $form_theme[ 'SBPBackground' ] ) ? 'background-position-y: 50%;' : '') .
692
+ (!empty( $form_theme[ 'SBPBackground' ] ) ? 'background-size: 12px;' : '') .
693
+ (!empty( $form_theme[ 'SBPAppearance' ] ) ? 'appearance:' . $form_theme[ 'SBPAppearance' ] . ';' : '') .
694
+ (!empty( $form_theme[ 'SBPAppearance' ] ) ? '-moz-appearance:' . $form_theme[ 'SBPAppearance' ] . ';' : '') .
695
+ (!empty( $form_theme[ 'SBPAppearance' ] ) ? '-webkit-appearance:' . $form_theme[ 'SBPAppearance' ] . ';' : '') .
696
  '}';
697
+ $css_content .= '.rtl .fm-form-container.fm-theme' . $theme_id . ' .fm-form select {' .
698
+ (!empty( $form_theme[ 'SBPBackground' ] ) ? 'background-position-x: 8px;' : '') .
699
  '}';
700
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .radio-div label span {' .
701
+ (!empty( $form_theme[ 'SCPWidth' ] ) ? 'width:' . $form_theme[ 'SCPWidth' ] . 'px;' : '') .
702
+ (!empty( $form_theme[ 'SCPHeight' ] ) ? 'height:' . $form_theme[ 'SCPHeight' ] . 'px;' : '') .
703
+ (!empty( $form_theme[ 'SCPMargin' ] ) ? 'margin:' . $form_theme[ 'SCPMargin' ] . ';' : '') .
704
+ (!empty( $form_theme[ 'SCPBGColor' ] ) ? 'background-color:' . $form_theme[ 'SCPBGColor' ] . ';' : '') .
705
+ (!empty( $form_theme[ 'SCPBoxShadow' ] ) ? 'box-shadow:' . $form_theme[ 'SCPBoxShadow' ] . ';' : '') .
706
+ ((isset( $form_theme[ 'SCPBorderRadius' ] ) && $form_theme[ 'SCPBorderRadius' ] !== '') ? 'border-radius:' . $form_theme[ 'SCPBorderRadius' ] . 'px;' : '') .
707
+ (!empty( $form_theme[ 'SCPWidth' ] ) ? 'min-width:' . $form_theme[ 'SCPWidth' ] . 'px;' : '') .
708
  '}';
709
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .radio-div input[type="radio"]:checked + label span:after {' .
710
+ (!empty( $form_theme[ 'SCCPWidth' ] ) ? 'content:""; display: block;' : '') .
711
+ (!empty( $form_theme[ 'SCCPWidth' ] ) ? 'width:' . $form_theme[ 'SCCPWidth' ] . 'px;' : '') .
712
+ (!empty( $form_theme[ 'SCCPHeight' ] ) ? 'height:' . $form_theme[ 'SCCPHeight' ] . 'px;' : '') .
713
+ (!empty( $form_theme[ 'SCCPMargin' ] ) ? 'margin:' . $form_theme[ 'SCCPMargin' ] . 'px;' : '') .
714
+ (!empty( $form_theme[ 'SCCPBGColor' ] ) ? 'background-color:' . $form_theme[ 'SCCPBGColor' ] . ';' : '') .
715
+ ((isset( $form_theme[ 'SCCPBorderRadius' ] ) && $form_theme[ 'SCCPBorderRadius' ] !== '') ? 'border-radius:' . $form_theme[ 'SCCPBorderRadius' ] . 'px;' : '') .
716
  '}';
717
+ if ( !empty( $borders[ 'SCP' ] ) ) {
718
+ foreach ( $borders[ 'SCP' ] as $border ) {
719
+ if ( !empty( $form_theme[ 'SCPBorderType' ] ) && ($form_theme[ 'SCPBorderType' ] == 'inherit' || $form_theme[ 'SCPBorderType' ] == 'initial') ) {
720
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .radio-div label span {' .
721
+ 'border-' . $border . '-style:' . $form_theme[ 'SCPBorderType' ] . ' !important;' .
722
  '}';
723
  break;
724
+ } else {
725
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .radio-div label span {' .
726
+ ((isset( $form_theme[ 'SCPBorderWidth' ] ) && $form_theme[ 'SCPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'SCPBorderWidth' ] . 'px !important;' : '') .
727
+ (!empty( $form_theme[ 'SCPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'SCPBorderType' ] . ' !important;' : '') .
728
+ (!empty( $form_theme[ 'SCPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'SCPBorderColor' ] . ' !important;' : '') .
 
729
  '}';
730
  }
731
  }
732
  }
733
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .checkbox-div label span {' .
734
+ (!empty( $form_theme[ 'MCPWidth' ] ) ? 'width:' . $form_theme[ 'MCPWidth' ] . 'px;' : '') .
735
+ (!empty( $form_theme[ 'MCPHeight' ] ) ? 'height:' . $form_theme[ 'MCPHeight' ] . 'px;' : '') .
736
+ (!empty( $form_theme[ 'MCPMargin' ] ) ? 'margin:' . $form_theme[ 'MCPMargin' ] . ';' : '') .
737
+ (!empty( $form_theme[ 'MCPBGColor' ] ) ? 'background-color:' . $form_theme[ 'MCPBGColor' ] . ';' : '') .
738
+ (!empty( $form_theme[ 'MCPBoxShadow' ] ) ? 'box-shadow:' . $form_theme[ 'MCPBoxShadow' ] . ';' : '') .
739
+ ((isset( $form_theme[ 'MCPBorderRadius' ] ) && $form_theme[ 'MCPBorderRadius' ] !== '') ? 'border-radius:' . $form_theme[ 'MCPBorderRadius' ] . 'px;' : '') .
740
+ (!empty( $form_theme[ 'MCPWidth' ] ) ? 'min-width:' . $form_theme[ 'MCPWidth' ] . 'px;' : '') .
741
  '}';
742
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .checkbox-div input[type="checkbox"]:checked + label span:after {' .
743
+ ((!empty( $form_theme[ 'MCCPBackground' ] ) || !empty( $form_theme[ 'MCCPBGColor' ] )) ? 'content:""; display: block;' : '') .
744
+ (!empty( $form_theme[ 'MCCPWidth' ] ) ? 'width:' . $form_theme[ 'MCCPWidth' ] . 'px;' : '') .
745
+ (!empty( $form_theme[ 'MCCPHeight' ] ) ? 'height:' . $form_theme[ 'MCCPHeight' ] . 'px;' : '') .
746
+ (!empty( $form_theme[ 'MCPMargin' ] ) ? 'margin:' . $form_theme[ 'MCCPMargin' ] . 'px;' : '') .
747
+ (!empty( $form_theme[ 'MCCPBGColor' ] ) ? 'background-color:' . $form_theme[ 'MCCPBGColor' ] . ';' : '') .
748
+ (!empty( $form_theme[ 'MCCPBackground' ] ) ? 'background-image: url("' . WDFM()->plugin_url . '/' . $form_theme[ 'MCCPBackground' ] . '");' : '') .
749
+ (!empty( $form_theme[ 'MCCPBGRepeat' ] ) ? 'background-repeat:' . $form_theme[ 'MCCPBGRepeat' ] . ';' : '') .
750
+ (!empty( $form_theme[ 'MCCPBGPos1' ] ) ? 'background-position-x:' . $form_theme[ 'MCCPBGPos1' ] . ';' : '') .
751
+ (!empty( $form_theme[ 'MCCPBGPos2' ] ) ? 'background-position-y:' . $form_theme[ 'MCCPBGPos2' ] . ';' : '') .
752
+ ((isset( $form_theme[ 'MCCPBorderRadius' ] ) && $form_theme[ 'MCCPBorderRadius' ] !== '') ? 'border-radius:' . $form_theme[ 'MCCPBorderRadius' ] . 'px;' : '') .
753
  '}';
754
+ if ( !empty( $borders[ 'MCP' ] ) ) {
755
+ foreach ( $borders[ 'MCP' ] as $border ) {
756
+ if ( !empty( $form_theme[ 'MCPBorderType' ] ) && ($form_theme[ 'MCPBorderType' ] == 'inherit' || $form_theme[ 'MCPBorderType' ] == 'initial') ) {
757
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .checkbox-div label span {' .
758
+ 'border-' . $border . '-style:' . $form_theme[ 'MCPBorderType' ] . ' !important;' .
759
  '}';
760
  break;
761
+ } else {
762
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .checkbox-div label span {' .
763
+ ((isset( $form_theme[ 'MCPBorderWidth' ] ) && $form_theme[ 'MCPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'MCPBorderWidth' ] . 'px !important;' : '') .
764
+ (!empty( $form_theme[ 'MCPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'MCPBorderType' ] . ' !important;' : '') .
765
+ (!empty( $form_theme[ 'MCPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'MCPBorderColor' ] . ' !important;' : '') .
 
766
  '}';
767
  }
768
  }
769
  }
770
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .button-submit,
771
  .fm-form-container.fm-theme' . $theme_id . ' .button-reset {' .
772
+ (!empty( $form_theme[ 'SPBGColor' ] ) ? 'background-image: none; text-transform: none;' : '') .
773
  '}';
774
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-submit {' .
775
+ (!empty( $form_theme[ 'SPWidth' ] ) ? 'width:' . $form_theme[ 'SPWidth' ] . 'px !important;' : '') .
776
+ (!empty( $form_theme[ 'SPHeight' ] ) ? 'height:' . $form_theme[ 'SPHeight' ] . 'px !important;' : '') .
777
+ (!empty( $form_theme[ 'SPMargin' ] ) ? 'margin:' . $form_theme[ 'SPMargin' ] . ' !important;' : '') .
778
+ (!empty( $form_theme[ 'SPPadding' ] ) ? 'padding:' . $form_theme[ 'SPPadding' ] . ' !important;' : '') .
779
+ (!empty( $form_theme[ 'SPBGColor' ] ) ? 'background-color:' . $form_theme[ 'SPBGColor' ] . ' !important;' : '') .
780
+ (!empty( $form_theme[ 'SPBGColor' ] ) ? 'background-image: none; border: none;' : '') .
781
+ (!empty( $form_theme[ 'SPFontWeight' ] ) ? 'font-weight:' . $form_theme[ 'SPFontWeight' ] . ' !important;' : '') .
782
+ (!empty( $form_theme[ 'SPFontSize' ] ) ? 'font-size:' . $form_theme[ 'SPFontSize' ] . 'px !important;' : '') .
783
+ (!empty( $form_theme[ 'SPColor' ] ) ? 'color:' . $form_theme[ 'SPColor' ] . ' !important;' : '') .
784
+ (!empty( $form_theme[ 'SPBoxShadow' ] ) ? 'box-shadow:' . $form_theme[ 'SPBoxShadow' ] . ' !important;' : '') .
785
+ ((isset( $form_theme[ 'SPBorderRadius' ] ) && $form_theme[ 'SPBorderRadius' ] !== '') ? 'border-radius:' . $form_theme[ 'SPBorderRadius' ] . 'px !important;' : '') .
786
  '}';
787
+ if ( !empty( $borders[ 'SP' ] ) ) {
788
+ foreach ( $borders[ 'SP' ] as $border ) {
789
+ if ( !empty( $form_theme[ 'SPBorderType' ] ) && ($form_theme[ 'SPBorderType' ] == 'inherit' || $form_theme[ 'SPBorderType' ] == 'initial') ) {
790
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-submit {' .
791
+ 'border-' . $border . '-style:' . $form_theme[ 'SPBorderType' ] . ' !important;' .
792
  '}';
793
  break;
794
+ } else {
795
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-submit {' .
796
+ ((isset( $form_theme[ 'SPBorderWidth' ] ) && $form_theme[ 'SPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'SPBorderWidth' ] . 'px !important;' : '') .
797
+ (!empty( $form_theme[ 'SPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'SPBorderType' ] . ' !important;' : '') .
798
+ (!empty( $form_theme[ 'SPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'SPBorderColor' ] . ' !important;' : '') .
 
799
  '}';
800
  }
801
  }
802
  }
803
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-submit:hover {' .
804
+ (!empty( $form_theme[ 'SHPBGColor' ] ) ? 'background-color:' . $form_theme[ 'SHPBGColor' ] . ' !important;' : '') .
805
+ (!empty( $form_theme[ 'SHPColor' ] ) ? 'color:' . $form_theme[ 'SHPColor' ] . ' !important;' : '') .
806
  '}';
807
+ if ( !empty( $borders[ 'SHP' ] ) ) {
808
+ foreach ( $borders[ 'SHP' ] as $border ) {
809
+ if ( !empty( $form_theme[ 'SHPBorderType' ] ) && ($form_theme[ 'SHPBorderType' ] == 'inherit' || $form_theme[ 'SHPBorderType' ] == 'initial') ) {
810
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-submit:hover {' .
811
+ 'border-' . $border . '-style:' . $form_theme[ 'SHPBorderType' ] . ' !important;' .
812
  '}';
813
  break;
814
+ } else {
815
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-submit:hover {' .
816
+ ((isset( $form_theme[ 'SHPBorderWidth' ] ) && $form_theme[ 'SHPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'SHPBorderWidth' ] . 'px !important;' : '') .
817
+ (!empty( $form_theme[ 'SHPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'SHPBorderType' ] . ' !important;' : '') .
818
+ (!empty( $form_theme[ 'SHPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'SHPBorderColor' ] . ' !important;' : '') .
 
819
  '}';
820
  }
821
  }
822
  }
823
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-reset,
824
+ .fm-form-container.fm-theme' . $theme_id . ' .fm-form button { ' .
825
+ (!empty( $form_theme[ 'BPWidth' ] ) ? 'width:' . $form_theme[ 'BPWidth' ] . 'px !important;' : '') .
826
+ (!empty( $form_theme[ 'BPHeight' ] ) ? 'height:' . $form_theme[ 'BPHeight' ] . 'px !important;' : '') .
827
+ (!empty( $form_theme[ 'BPMargin' ] ) ? 'margin:' . $form_theme[ 'BPMargin' ] . ' !important;' : '') .
828
+ (!empty( $form_theme[ 'BPPadding' ] ) ? 'padding:' . $form_theme[ 'BPPadding' ] . ' !important;' : '') .
829
+ (!empty( $form_theme[ 'BPBGColor' ] ) ? 'background-color:' . $form_theme[ 'BPBGColor' ] . ' !important;' : '') .
830
+ (!empty( $form_theme[ 'BPBGColor' ] ) ? 'background-image: none;' : '') .
831
+ (!empty( $form_theme[ 'BPFontWeight' ] ) ? 'font-weight:' . $form_theme[ 'BPFontWeight' ] . ' !important;' : '') .
832
+ (!empty( $form_theme[ 'BPFontSize' ] ) ? 'font-size:' . $form_theme[ 'BPFontSize' ] . 'px !important;' : '') .
833
+ (!empty( $form_theme[ 'BPColor' ] ) ? 'color:' . $form_theme[ 'BPColor' ] . ' !important;' : '') .
834
+ ((isset( $form_theme[ 'BPBorderRadius' ] ) && $form_theme[ 'BPBorderRadius' ] !== '') ? 'border-radius:' . $form_theme[ 'BPBorderRadius' ] . 'px;' : '') .
835
+ (!empty( $form_theme[ 'BPBoxShadow' ] ) ? 'box-shadow:' . $form_theme[ 'BPBoxShadow' ] . ' !important;' : '') .
836
  '}';
837
+ if ( !empty( $borders[ 'BP' ] ) ) {
838
+ foreach ( $borders[ 'BP' ] as $border ) {
839
+ if ( !empty( $form_theme[ 'BPBorderType' ] ) && ($form_theme[ 'BPBorderType' ] == 'inherit' || $form_theme[ 'BPBorderType' ] == 'initial') ) {
840
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-reset,
841
+ .fm-form-container.fm-theme' . $theme_id . ' .fm-form button {' .
842
+ 'border-' . $border . '-style:' . $form_theme[ 'BPBorderType' ] . ' !important;' .
843
  '}';
844
  break;
845
+ } else {
 
846
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-reset,
847
+ .fm-form-container.fm-theme' . $theme_id . ' .fm-form button {' .
848
+ ((isset( $form_theme[ 'BPBorderWidth' ] ) && $form_theme[ 'BPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'BPBorderWidth' ] . 'px !important;' : '') .
849
+ (!empty( $form_theme[ 'BPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'BPBorderType' ] . ' !important;' : '') .
850
+ (!empty( $form_theme[ 'BPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'BPBorderColor' ] . ' !important;' : '') .
851
  '}';
852
  }
853
  }
854
  }
855
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-reset:hover,
856
+ .fm-form-container.fm-theme' . $theme_id . ' .fm-form button:hover {' .
857
+ (!empty( $form_theme[ 'BHPBGColor' ] ) ? 'background-color:' . $form_theme[ 'BHPBGColor' ] . ' !important;' : '') .
858
+ (!empty( $form_theme[ 'BHPColor' ] ) ? 'color:' . $form_theme[ 'BHPColor' ] . ' !important;' : '') .
859
  '}';
860
+ if ( !empty( $borders[ 'BHP' ] ) ) {
861
+ foreach ( $borders[ 'BHP' ] as $border ) {
862
+ if ( !empty( $form_theme[ 'BHPBorderType' ] ) && ($form_theme[ 'BHPBorderType' ] == 'inherit' || $form_theme[ 'BHPBorderType' ] == 'initial') ) {
863
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-reset:hover,
864
+ .fm-form-container.fm-theme' . $theme_id . ' .fm-form button:hover {' .
865
+ 'border-' . $border . '-style:' . $form_theme[ 'BHPBorderType' ] . ' !important;' .
866
  '}';
867
  break;
868
+ } else {
 
869
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .button-reset:hover,
870
+ .fm-form-container.fm-theme' . $theme_id . ' .fm-form button:hover {' .
871
+ ((isset( $form_theme[ 'BHPBorderWidth' ] ) && $form_theme[ 'BHPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'BHPBorderWidth' ] . 'px !important;' : '') .
872
+ (!empty( $form_theme[ 'BHPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'BHPBorderType' ] . ' !important;' : '') .
873
+ (!empty( $form_theme[ 'BHPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'BHPBorderColor' ] . ' !important;' : '') .
874
  '}';
875
  }
876
  }
877
  }
878
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .next-page div.wdform-page-button {' .
879
+ (!empty( $form_theme[ 'NBPWidth' ] ) ? 'width:' . $form_theme[ 'NBPWidth' ] . 'px !important;' : '') .
880
+ (!empty( $form_theme[ 'NBPHeight' ] ) ? 'height:' . $form_theme[ 'NBPHeight' ] . 'px !important;' : '') .
881
+ (!empty( $form_theme[ 'NBPMargin' ] ) ? 'margin:' . $form_theme[ 'NBPMargin' ] . ' !important;' : '') .
882
+ (!empty( $form_theme[ 'NBPPadding' ] ) ? 'padding:' . $form_theme[ 'NBPPadding' ] . ' !important;' : '') .
883
+ (!empty( $form_theme[ 'NBPBGColor' ] ) ? 'background-color:' . $form_theme[ 'NBPBGColor' ] . ' !important;' : '') .
884
+ (!empty( $form_theme[ 'BPFontWeight' ] ) ? 'font-weight:' . $form_theme[ 'BPFontWeight' ] . ' !important;' : '') .
885
+ (!empty( $form_theme[ 'BPFontSize' ] ) ? 'font-size:' . $form_theme[ 'BPFontSize' ] . 'px !important;' : '') .
886
+ (!empty( $form_theme[ 'NBPColor' ] ) ? 'color:' . $form_theme[ 'NBPColor' ] . ' !important;' : '') .
887
+ ((isset( $form_theme[ 'NBPBorderRadius' ] ) && $form_theme[ 'NBPBorderRadius' ] !== '') ? 'border-radius:' . $form_theme[ 'NBPBorderRadius' ] . 'px;' : '') .
888
+ (!empty( $form_theme[ 'NBPBoxShadow' ] ) ? 'box-shadow:' . $form_theme[ 'NBPBoxShadow' ] . ' !important;' : '') .
889
  '}';
890
+ if ( !empty( $borders[ 'NBP' ] ) ) {
891
+ foreach ( $borders[ 'NBP' ] as $border ) {
892
+ if ( !empty( $form_theme[ 'NBPBorderType' ] ) && ($form_theme[ 'NBPBorderType' ] == 'inherit' || $form_theme[ 'NBPBorderType' ] == 'initial') ) {
893
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .next-page div.wdform-page-button {' .
894
+ 'border-' . $border . '-style:' . $form_theme[ 'NBPBorderType' ] . ' !important;' .
895
  '}';
896
  break;
897
+ } else {
898
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .next-page div.wdform-page-button {' .
899
+ ((isset( $form_theme[ 'NBPBorderWidth' ] ) && $form_theme[ 'NBPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'NBPBorderWidth' ] . 'px !important;' : '') .
900
+ (!empty( $form_theme[ 'NBPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'NBPBorderType' ] . ' !important;' : '') .
901
+ (!empty( $form_theme[ 'NBPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'NBPBorderColor' ] . ' !important;' : '') .
 
902
  '}';
903
  }
904
  }
905
  }
906
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .next-page div.wdform-page-button:hover {' .
907
+ (!empty( $form_theme[ 'NBHPBGColor' ] ) ? 'background-color:' . $form_theme[ 'NBHPBGColor' ] . ' !important;' : '') .
908
+ (!empty( $form_theme[ 'NBHPColor' ] ) ? 'color:' . $form_theme[ 'NBHPColor' ] . ' !important;' : '') .
909
  '}';
910
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-minimize-text div {' .
911
+ (!empty( $form_theme[ 'MBPBGColor' ] ) ? 'background-color:' . $form_theme[ 'MBPBGColor' ] . ' !important;' : '') .
912
+ (!empty( $form_theme[ 'MBPColor' ] ) ? 'color:' . $form_theme[ 'MBPColor' ] . ' !important;' : '') .
913
  '}';
914
+ if ( !empty( $borders[ 'NBHP' ] ) ) {
915
+ foreach ( $borders[ 'NBHP' ] as $border ) {
916
+ if ( !empty( $form_theme[ 'NBHPBorderType' ] ) && ($form_theme[ 'NBHPBorderType' ] == 'inherit' || $form_theme[ 'NBHPBorderType' ] == 'initial') ) {
917
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .next-page div.wdform-page-button:hover {' .
918
+ 'border-' . $border . '-style:' . $form_theme[ 'NBHPBorderType' ] . ' !important;' .
919
  '}';
920
  break;
921
+ } else {
922
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .next-page div.wdform-page-button:hover {' .
923
+ ((isset( $form_theme[ 'NBHPBorderWidth' ] ) && $form_theme[ 'NBHPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'NBHPBorderWidth' ] . 'px !important;' : '') .
924
+ (!empty( $form_theme[ 'NBHPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'NBHPBorderType' ] . ' !important;' : '') .
925
+ (!empty( $form_theme[ 'NBHPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'NBHPBorderColor' ] . ' !important;' : '') .
 
926
  '}';
927
  }
928
  }
929
  }
930
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .previous-page div.wdform-page-button {' .
931
+ (!empty( $form_theme[ 'PBPWidth' ] ) ? 'width:' . $form_theme[ 'PBPWidth' ] . 'px !important;' : '') .
932
+ (!empty( $form_theme[ 'PBPHeight' ] ) ? 'height:' . $form_theme[ 'PBPHeight' ] . 'px !important;' : '') .
933
+ (!empty( $form_theme[ 'PBPMargin' ] ) ? 'margin:' . $form_theme[ 'PBPMargin' ] . ' !important;' : '') .
934
+ (!empty( $form_theme[ 'PBPPadding' ] ) ? 'padding:' . $form_theme[ 'PBPPadding' ] . ' !important;' : '') .
935
+ (!empty( $form_theme[ 'PBPBGColor' ] ) ? 'background-color:' . $form_theme[ 'PBPBGColor' ] . ' !important;' : '') .
936
+ (!empty( $form_theme[ 'BPFontWeight' ] ) ? 'font-weight:' . $form_theme[ 'BPFontWeight' ] . ' !important;' : '') .
937
+ (!empty( $form_theme[ 'BPFontSize' ] ) ? 'font-size:' . $form_theme[ 'BPFontSize' ] . 'px !important;' : '') .
938
+ (!empty( $form_theme[ 'PBPColor' ] ) ? 'color:' . $form_theme[ 'PBPColor' ] . ' !important;' : '') .
939
+ ((isset( $form_theme[ 'PBPBorderRadius' ] ) && $form_theme[ 'PBPBorderRadius' ] !== '') ? 'border-radius:' . $form_theme[ 'PBPBorderRadius' ] . 'px;' : '') .
940
+ (!empty( $form_theme[ 'PBPBoxShadow' ] ) ? 'box-shadow:' . $form_theme[ 'PBPBoxShadow' ] . ' !important;' : '') .
941
  '}';
942
+ if ( !empty( $borders[ 'PBP' ] ) ) {
943
+ foreach ( $borders[ 'PBP' ] as $border ) {
944
+ if ( !empty( $form_theme[ 'PBPBorderType' ] ) && ($form_theme[ 'PBPBorderType' ] == 'inherit' || $form_theme[ 'PBPBorderType' ] == 'initial') ) {
945
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .previous-page div.wdform-page-button {' .
946
+ 'border-' . $border . '-style:' . $form_theme[ 'PBPBorderType' ] . ' !important;' .
947
  '}';
948
  break;
949
+ } else {
950
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .previous-page div.wdform-page-button {' .
951
+ ((isset( $form_theme[ 'PBPBorderWidth' ] ) && $form_theme[ 'PBPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'PBPBorderWidth' ] . 'px !important;' : '') .
952
+ (!empty( $form_theme[ 'PBPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'PBPBorderType' ] . ' !important;' : '') .
953
+ (!empty( $form_theme[ 'PBPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'PBPBorderColor' ] . ' !important;' : '') .
 
954
  '}';
955
  }
956
  }
957
  }
958
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .previous-page div.wdform-page-button:hover {' .
959
+ (!empty( $form_theme[ 'PBHPBGColor' ] ) ? 'background-color:' . $form_theme[ 'PBHPBGColor' ] . ' !important;' : '') .
960
+ (!empty( $form_theme[ 'PBHPColor' ] ) ? 'color:' . $form_theme[ 'PBHPColor' ] . ' !important;' : '') .
961
  '}';
962
+ if ( !empty( $borders[ 'PBHP' ] ) ) {
963
+ foreach ( $borders[ 'PBHP' ] as $border ) {
964
+ if ( !empty( $form_theme[ 'PBHPBorderType' ] ) && ($form_theme[ 'PBHPBorderType' ] == 'inherit' || $form_theme[ 'PBHPBorderType' ] == 'initial') ) {
965
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .previous-page div.wdform-page-button:hover {' .
966
+ 'border-' . $border . '-style:' . $form_theme[ 'PBHPBorderType' ] . ' !important;' .
967
  '}';
968
  break;
969
+ } else {
970
+ $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .previous-page div.wdform-page-button:hover {' .
971
+ ((isset( $form_theme[ 'PBHPBorderWidth' ] ) && $form_theme[ 'PBHPBorderWidth' ] !== '') ? 'border-' . $border . ':' . $form_theme[ 'PBHPBorderWidth' ] . 'px !important;' : '') .
972
+ (!empty( $form_theme[ 'PBHPBorderType' ] ) ? 'border-' . $border . '-style:' . $form_theme[ 'PBHPBorderType' ] . ' !important;' : '') .
973
+ (!empty( $form_theme[ 'PBHPBorderColor' ] ) ? 'border-' . $border . '-color:' . $form_theme[ 'PBHPBorderColor' ] . ' !important;' : '') .
 
974
  '}';
975
  }
976
  }
977
  }
978
  $css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type="radio"] {' .
979
+ (!empty( $form_theme[ 'SCCPWidth' ] ) ? 'display: none;' : '') .
980
  '}
981
  .fm-form-container.fm-theme' . $theme_id . ' .fm-form input[type="checkbox"] {' .
982
+ (!empty( $form_theme[ 'MCCPBackground' ] ) || !empty( $form_theme[ 'MCCPBGColor' ] ) ? 'display: none;' : '') .
983
  '}';
984
  }
985
+ if ( !empty( $form_theme[ 'CUPCSS' ] ) ) {
986
  $pattern = '/\/\/(.+)(\r\n|\r|\n)/';
987
+ $form_theme_css = $form_theme[ 'CUPCSS' ];
988
+ if ( strpos( $form_theme_css, ':checked + label' ) !== FALSE ) {
989
  $form_theme_css .= '
990
  .checkbox-div label span {
991
  border: 1px solid #868686 !important;
1033
  line-height: 13px;
1034
  }';
1035
  }
1036
+ $form_theme_css = explode( '{', $form_theme_css );
1037
+ $count_after_explod_theme = count( $form_theme_css );
1038
  for ( $i = 0; $i < $count_after_explod_theme; $i++ ) {
1039
+ $body_or_classes[ $i ] = explode( '}', $form_theme_css[ $i ] );
1040
  }
1041
  for ( $i = 0; $i < $count_after_explod_theme; $i++ ) {
1042
  if ( $i == 0 ) {
1043
+ $body_or_classes[ $i ][ 0 ] = '.fm-form-container.fm-theme' . $theme_id . ' .fm-form' . ' ' . str_replace( ',', ', .fm-form-container.fm-theme' . $theme_id . ' .fm-form', $body_or_classes[ $i ][ 0 ] );
1044
+ } else {
1045
+ $body_or_classes[ $i ][ 1 ] = '.fm-form-container.fm-theme' . $theme_id . ' .fm-form' . ' ' . str_replace( ',', ', .fm-form-container.fm-theme' . $theme_id . ' .fm-form', $body_or_classes[ $i ][ 1 ] );
 
1046
  }
1047
  }
1048
  for ( $i = 0; $i < $count_after_explod_theme; $i++ ) {
1049
+ $body_or_classes_implode[ $i ] = implode( '}', $body_or_classes[ $i ] );
1050
  }
1051
+ $theme = implode( '{', $body_or_classes_implode );
1052
+ $theme = preg_replace( $pattern, ' ', $theme );
1053
+ $css_content .= str_replace( '[SITE_ROOT]', WDFM()->plugin_url, $theme );
1054
  }
1055
  $this->fm_css_content = $css_content;
1056
+ file_put_contents( $frontend_css, $css_content );
1057
  }
1058
 
1059
  /**
1063
  * @return array|mixed
1064
  */
1065
  public function savedata( $form, $id ) {
1066
+ $fm_settings = get_option( 'fm_settings' );
1067
  $all_files = array();
1068
  $correct = FALSE;
1069
  $id_for_old = $id;
1070
  if ( !$form->form_front ) {
1071
  $id = '';
1072
  }
1073
+ if ( isset( $_POST[ "counter" . $id ] ) ) {
1074
+ if ( (isset( $_POST[ "save_or_submit" . $id ] ) && $_POST[ "save_or_submit" . $id ] != 'save') ) {
1075
+ if ( isset( $_POST[ "captcha_input" ] ) ) {
1076
+ $captcha_input = esc_html( $_POST[ "captcha_input" ] );
1077
+ $session_wd_captcha_code = isset( $_SESSION[ $id . '_wd_captcha_code' ] ) ? $_SESSION[ $id . '_wd_captcha_code' ] : '-';
1078
+ if ( md5( $captcha_input ) == $session_wd_captcha_code ) {
 
1079
  $correct = TRUE;
1080
+ } else {
1081
+ $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Error, incorrect Security code.', WDFM()->prefix ) ) );
1082
+ $_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
1083
+ $_SESSION[ 'error_or_no' . $id ] = 1;
1084
+ }
1085
+ } elseif ( isset( $_POST[ "arithmetic_captcha_input" ] ) ) {
1086
+ $arithmetic_captcha_input = esc_html( $_POST[ "arithmetic_captcha_input" ] );
1087
+ $session_wd_arithmetic_captcha_code = isset( $_SESSION[ $id . '_wd_arithmetic_captcha_code' ] ) ? $_SESSION[ $id . '_wd_arithmetic_captcha_code' ] : '-';
1088
+ if ( md5( $arithmetic_captcha_input ) == $session_wd_arithmetic_captcha_code ) {
 
 
1089
  $correct = TRUE;
1090
+ } else {
1091
+ $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Error, incorrect Security code.', WDFM()->prefix ) ) );
1092
+ $_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
1093
+ $_SESSION[ 'error_or_no' . $id ] = 1;
1094
+ }
1095
+ } elseif ( isset( $_POST[ "g-recaptcha-response" ] ) ) {
1096
+ $privatekey = isset( $fm_settings[ 'private_key' ] ) ? $fm_settings[ 'private_key' ] : '';
1097
+ $captcha = $_POST[ 'g-recaptcha-response' ];
 
 
1098
  $url = 'https://www.google.com/recaptcha/api/siteverify';
1099
  $data = array(
1100
  'secret' => $privatekey,
1101
  'response' => $captcha,
1102
+ 'remoteip' => $_SERVER[ 'REMOTE_ADDR' ],
1103
  );
1104
+ $response = wp_remote_post( $url, array( 'body' => $data ) );
1105
+ if ( !is_wp_error( $response ) ) {
1106
+ $jsonResponse = json_decode( wp_remote_retrieve_body( $response ), true );
1107
+ if ( $jsonResponse[ 'success' ] == "true" ) {
1108
  $correct = TRUE;
1109
+ } else {
1110
+ if ( isset( $jsonResponse[ 'error-codes' ] ) ) {
1111
+ foreach ( $jsonResponse[ 'error-codes' ] as $errorcode ) {
1112
+ switch ( $errorcode ) {
 
1113
  case 'missing-input-secret' :
1114
  case 'invalid-input-secret' : {
1115
+ $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Error, incorrect secret code.', WDFM()->prefix ) ) );
1116
  break;
1117
  }
1118
  case 'missing-input-response' :
1119
  case 'invalid-input-response' :
1120
  case 'bad-request' :
1121
  default: {
1122
+ $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Verification failed.', WDFM()->prefix ) ) );
1123
  break;
1124
  }
1125
  }
1126
  }
1127
+ } else {
1128
+ $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Verification failed.', WDFM()->prefix ) ) );
1129
  }
1130
+ $_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
1131
+ $_SESSION[ 'error_or_no' . $id ] = 1;
 
 
 
1132
  $correct = FALSE;
1133
  }
1134
+ } else {
1135
+ $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Verification failed.', WDFM()->prefix ) ) );
1136
+ $_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
1137
+ $_SESSION[ 'error_or_no' . $id ] = 1;
 
1138
  $correct = FALSE;
1139
  }
1140
+ } else {
1141
+ if ( preg_match( '(type_arithmetic_captcha|type_captcha|type_recaptcha)', $form->label_order_current ) === 1 ) {
1142
+ $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Error, incorrect Security code.', WDFM()->prefix ) ) );
1143
+ $_SESSION[ 'message_captcha' ] = $_SESSION[ 'massage_after_submit' . $id ];
1144
+ $_SESSION[ 'error_or_no' . $id ] = 1;
 
1145
  $correct = FALSE;
1146
+ } else {
 
1147
  $correct = TRUE;
1148
  }
1149
  }
1150
+ } else {
 
1151
  $correct = TRUE;
1152
  }
1153
  if ( $correct ) {
1154
+ $ip = $_SERVER[ 'REMOTE_ADDR' ];
1155
  global $wpdb;
1156
+ $blocked_ip = $wpdb->get_var( $wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE ip="%s"', $ip ) );
1157
  if ( $blocked_ip ) {
1158
+ $_SESSION[ 'massage_after_submit' . $id ] = addslashes( __( 'Your ip is blacklisted. Please contact the website administrator.', WDFM()->prefix ) );
1159
+ wp_redirect( $_SERVER[ "REQUEST_URI" ] );//to be checked
1160
  exit;
1161
  }
1162
+ if ( isset( $_POST[ "save_or_submit" . $id ] ) && $_POST[ "save_or_submit" . $id ] == 'save' ) {
1163
+ if ( WDFM()->is_free != 2 ) {
1164
+ $current_user = wp_get_current_user();
1165
+ $userid = '';
1166
+ $username = '';
1167
+ $useremail = '';
1168
+ $adminemail = get_option( 'admin_email' );
1169
+ $current_page_url = WDW_FM_Library::get_current_page_url();
1170
+ if ( $current_user->ID != 0 ) {
1171
+ $userid = $current_user->ID;
1172
+ $username = $current_user->display_name;
1173
+ $useremail = $current_user->user_email;
1174
+ }
1175
+ $custom_fields = array(
1176
+ "ip" => $ip,
1177
+ "subid" => '',
1178
+ "userid" => $userid,
1179
+ 'adminemail' => $adminemail,
1180
+ "useremail" => $useremail,
1181
+ "username" => $username,
1182
+ 'pageurl' => $current_page_url,
1183
+ 'formtitle' => $form->title
1184
+ );
1185
+ do_action( 'WD_FM_SAVE_PROG_save_progress_init', array( 'id' => $id, 'addon_task' => 'save_progress', 'form' => $form, 'custom_fields' => $custom_fields ) );
1186
  }
1187
  return $all_files;
1188
  }
1189
  else {
1190
+ $result_temp = $this->save_db( $id_for_old );
1191
+ if ( isset( $result_temp[ 'error' ] ) ) {
1192
+ $this->remove( $result_temp['group_id'] );
1193
+ $_SESSION[ 'massage_after_submit' . $id ] = $result_temp[ 'message' ];
1194
+ $_SESSION[ 'error_or_no' . $id ] = 1;
 
1195
  }
1196
  else {
1197
+ if ( WDFM()->is_free != 2 ) {
1198
+ do_action( 'WD_FM_SAVE_PROG_save_progress_init', array( 'id' => $id, 'addon_task' => 'clear_data' ) );
 
 
 
1199
  }
1200
+ $this->gen_mail( $result_temp['group_id'], $result_temp[ 'all_files' ], $id_for_old, $result_temp[ 'redirect_url' ] );
1201
  }
1202
  }
1203
  }
1219
  global $wpdb;
1220
  $query = "SELECT `" . $label_column . "` FROM " . $table . $where . " ORDER BY " . $order_by;
1221
  if ( $db_info ) {
1222
+ $db_info = substr($db_info, 1, -1);
1223
+ $temp = explode( '@@@wdfhostwdf@@@', $db_info );
1224
+ $host = $temp[ 0 ];
1225
+ $temp = explode( '@@@wdfportwdf@@@', $temp[ 1 ] );
1226
+ $temp = explode( '@@@wdfusernamewdf@@@', $temp[ 1 ] );
1227
+ $username = $temp[ 0 ];
1228
+ $temp = explode( '@@@wdfpasswordwdf@@@', $temp[ 1 ] );
1229
+ $password = $temp[ 0 ];
1230
+ $temp = explode( '@@@wdfdatabasewdf@@@', $temp[ 1 ] );
1231
+ $database = $temp[ 0 ];
1232
+ $wpdb_temp = new wpdb( $username, $password, $database, $host );
1233
+ $choices_labels = $wpdb_temp->get_results( $query, ARRAY_N );
1234
+ } else {
1235
+ $choices_labels = $wpdb->get_results( $query, ARRAY_N );
1236
  }
1237
 
1238
  return $choices_labels;
1251
  global $wpdb;
1252
  $query = "SELECT `" . $value_column . "` FROM " . $table . $where . " ORDER BY " . $order_by;
1253
  if ( $db_info ) {
1254
+ $db_info = substr($db_info, 1, -1);
1255
+ $temp = explode( '@@@wdfhostwdf@@@', $db_info );
1256
+ $host = $temp[ 0 ];
1257
+ $temp = explode( '@@@wdfportwdf@@@', $temp[ 1 ] );
1258
+ $temp = explode( '@@@wdfusernamewdf@@@', $temp[ 1 ] );
1259
+ $username = $temp[ 0 ];
1260
+ $temp = explode( '@@@wdfpasswordwdf@@@', $temp[ 1 ] );
1261
+ $password = $temp[ 0 ];
1262
+ $temp = explode( '@@@wdfdatabasewdf@@@', $temp[ 1 ] );
1263
+ $database = $temp[ 0 ];
1264
+ $wpdb_temp = new wpdb( $username, $password, $database, $host );
1265
+ $choices_values = $wpdb_temp->get_results( $query, ARRAY_N );
1266
+ } else {
1267
+ $choices_values = $wpdb->get_results( $query, ARRAY_N );
1268
  }
1269
 
1270
  return $choices_values;
1271
  }
1272
 
1273
  /**
 
1274
  * @param $id
1275
  *
1276
+ * @return array( 'error' => true, 'group_id' => $max, 'message' => '' ); in case of error | array('group_id' => $max, 'all_files' => '', 'redirect_url' => '')
1277
  */
1278
+ public function save_db( $id ) {
1279
  global $wpdb;
1280
+ $wp_userid = '';
1281
+ $wp_username = '';
1282
+ $wp_useremail = '';
1283
  $current_user = wp_get_current_user();
1284
  if ( $current_user->ID != 0 ) {
1285
  $wp_userid = $current_user->ID;
1286
  $wp_username = $current_user->display_name;
1287
  $wp_useremail = $current_user->user_email;
1288
  }
 
 
 
 
 
 
1289
  $chgnac = TRUE;
 
1290
  $paypal = array();
1291
+ $all_files = array();
1292
+ $frontend_parmas = array();
1293
  $paypal['item_name'] = array();
1294
  $paypal['quantity'] = array();
1295
  $paypal['amount'] = array();
 
1296
  $paypal['on_os'] = array();
1297
+ $is_amount = FALSE;
1298
  $total = 0;
1299
  $form_currency = '$';
1300
+ $ip = $_SERVER['REMOTE_ADDR'];
1301
+ $adminemail = get_option('admin_email');
1302
+ $current_page_url = WDW_FM_Library::get_current_page_url();
1303
+ $form = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id= %d", $id ) );
1304
+ $formtitle = $form->title;
1305
+ if ( !$form->form_front ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1306
  $id = '';
1307
  }
1308
  if ( $form->payment_currency ) {
1309
+ $form_currency = WDW_FM_Library::replace_currency_code( $form->payment_currency );
1310
  }
1311
  $label_id = array();
1312
  $label_label = array();
1313
  $label_type = array();
1314
+ $disabled_fields = explode( ',', (isset( $_REQUEST[ "disabled_fields" . $id ] ) ? $_REQUEST[ "disabled_fields" . $id ] : "") );
1315
+ $disabled_fields = array_slice( $disabled_fields, 0, count( $disabled_fields ) - 1 );
1316
+ $label_all = explode( '#****#', $form->label_order_current );
1317
+ $label_all = array_slice( $label_all, 0, count( $label_all ) - 1 );
1318
  foreach ( $label_all as $key => $label_each ) {
1319
+ $label_id_each = explode( '#**id**#', $label_each );
1320
+ array_push( $label_id, $label_id_each[ 0 ] );
1321
+ $label_order_each = explode( '#**label**#', $label_id_each[ 1 ] );
1322
+ array_push( $label_label, $label_order_each[ 0 ] );
1323
+ array_push( $label_type, $label_order_each[ 1 ] );
1324
  }
1325
+ $group_id = $this->get_group_id();
1326
  $fvals = array();
1327
  foreach ( $label_type as $key => $type ) {
1328
  $value = '';
1329
  if ( $type == "type_submit_reset" or $type == "type_map" or $type == "type_editor" or $type == "type_captcha" or $type == "type_arithmetic_captcha" or $type == "type_recaptcha" or $type == "type_button" or $type == "type_paypal_total" or $type == "type_send_copy" ) {
1330
  continue;
1331
  }
1332
+ $i = $label_id[ $key ];
1333
+ if ( !in_array( $i, $disabled_fields ) ) {
1334
  switch ( $type ) {
1335
  case 'type_text':
1336
  case 'type_password':
1339
  case "type_country":
1340
  case "type_number":
1341
  case "type_phone_new": {
1342
+ $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "";
1343
  break;
1344
  }
1345
  case "type_date": {
1346
+ $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "";
1347
+ $date_format = isset( $_POST[ 'wdform_' . $i . "_date_format" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_date_format" . $id ] ) : "";
1348
  if ( $value ) {
1349
+ if ( !$this->fm_validateDate( $value, $date_format ) ) {
1350
+ echo "<script> alert('" . addslashes( __( "This is not a valid date format.", WDFM()->prefix ) ) . "');</script>";
1351
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => '' );
 
1352
  }
1353
  }
1354
  break;
1355
  }
1356
  case "type_date_new": {
1357
+ $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "";
1358
  break;
1359
  }
1360
  case "type_date_range": {
1361
+ $value = (isset( $_POST[ 'wdform_' . $i . "_element" . $id . "0" ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . "0" ] ) : "") . ' - ' . (isset( $_POST[ 'wdform_' . $i . "_element" . $id . "1" ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . "1" ] ) : "");
1362
  break;
1363
  }
1364
  case 'type_textarea': {
1365
+ $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "";
1366
  break;
1367
  }
1368
  case "type_wdeditor": {
1369
+ $value = isset( $_POST[ 'wdform_' . $i . '_wd_editor' . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . '_wd_editor' . $id ] ) : "";
1370
  break;
1371
  }
1372
  case "type_mark_map": {
1373
+ $value = (isset( $_POST[ 'wdform_' . $i . "_long" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_long" . $id ] ) : "") . '***map***' . (isset( $_POST[ 'wdform_' . $i . "_lat" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_lat" . $id ] ) : "");
1374
  break;
1375
  }
1376
  case "type_date_fields": {
1377
+ $value = (isset( $_POST[ 'wdform_' . $i . "_day" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_day" . $id ] ) : "") . '-' . (isset( $_POST[ 'wdform_' . $i . "_month" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_month" . $id ] ) : "") . '-' . (isset( $_POST[ 'wdform_' . $i . "_year" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_year" . $id ] ) : "");
1378
  break;
1379
  }
1380
  case "type_time": {
1381
+ $ss = isset( $_POST[ 'wdform_' . $i . "_ss" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_ss" . $id ] ) : NULL;
1382
+ if ( isset( $ss ) ) {
1383
+ $value = (isset( $_POST[ 'wdform_' . $i . "_hh" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hh" . $id ] ) : "") . ':' . (isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) : "") . ':' . (isset( $_POST[ 'wdform_' . $i . "_ss" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_ss" . $id ] ) : "");
1384
+ } else {
1385
+ $value = (isset( $_POST[ 'wdform_' . $i . "_hh" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hh" . $id ] ) : "") . ':' . (isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) : "");
1386
+ }
1387
+ $am_pm = isset( $_POST[ 'wdform_' . $i . "_am_pm" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_am_pm" . $id ] ) : NULL;
1388
+ if ( isset( $am_pm ) ) {
 
1389
  $value = $value . ' ' . $am_pm;
1390
  }
1391
  break;
1392
  }
1393
  case "type_phone": {
1394
+ $value = (isset( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) : "") . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) : "");
1395
  break;
1396
  }
1397
  case "type_name": {
1398
+ $element_title = isset( $_POST[ 'wdform_' . $i . "_element_title" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_title" . $id ] ) : NULL;
1399
+ $element_middle = isset( $_POST[ 'wdform_' . $i . "_element_middle" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_middle" . $id ] ) : NULL;
1400
+ if ( isset( $element_title ) || isset( $element_middle ) ) {
1401
+ $value = (isset( $_POST[ 'wdform_' . $i . "_element_title" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_title" . $id ] ) : "") . '@@@' . (isset( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) : "") . '@@@' . (isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) : "") . '@@@' . (isset( $_POST[ 'wdform_' . $i . "_element_middle" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_middle" . $id ] ) : "");
1402
+ } else {
1403
+ $value = (isset( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) : "") . '@@@' . (isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) : "");
 
1404
  }
1405
  break;
1406
  }
1407
  case "type_file_upload": {
1408
  if ( WDFM()->is_demo ) {
1409
  $value = '';
1410
+ } else {
1411
+ if ( isset( $_POST[ 'wdform_' . $i . "_file_url" . $id . '_save' ] ) ) {
1412
+ $file_url = isset( $_POST[ 'wdform_' . $i . "_file_url" . $id . '_save' ] ) ? stripslashes( $_POST[ 'wdform_' . $i . "_file_url" . $id . '_save' ] ) : NULL;
1413
+ if ( isset( $file_url ) ) {
1414
+ $all_files = isset( $_POST[ 'wdform_' . $i . "_all_files" . $id . '_save' ] ) ? json_decode( stripslashes( $_POST[ 'wdform_' . $i . "_all_files" . $id . '_save' ] ), TRUE ) : array();
 
1415
  $value = $file_url;
1416
  }
1417
+ } else {
 
1418
  $upload_dir = wp_upload_dir();
1419
+ $files = isset( $_FILES[ 'wdform_' . $i . '_file' . $id ] ) ? $_FILES[ 'wdform_' . $i . '_file' . $id ] : array();
1420
+ if ( !empty($files) ) {
1421
+ foreach ( $files[ 'name' ] as $file_key => $file_name ) {
1422
  if ( $file_name ) {
1423
  $untilupload = $form->form_fields;
1424
+ $untilupload = substr( $untilupload, strpos( $untilupload, $i . '*:*id*:*type_file_upload' ), -1 );
1425
+ $untilupload = substr( $untilupload, 0, strpos( $untilupload, '*:*new_field*:' ) );
1426
+ $untilupload = explode( '*:*w_field_label_pos*:*', $untilupload );
1427
+ $untilupload = $untilupload[ 1 ];
1428
+ $untilupload = explode( '*:*w_destination*:*', $untilupload );
1429
+ $destination = explode( '*:*w_hide_label*:*', $untilupload[ 0 ] );
1430
+ $destination = $destination[ 1 ];
1431
+ $destination = str_replace( $upload_dir[ 'baseurl' ], '', $destination );
1432
+ $destination = ltrim( $destination, '/' );
1433
+ $destination = rtrim( $destination, '/' );
1434
+ $untilupload = $untilupload[ 1 ];
1435
+ $untilupload = explode( '*:*w_extension*:*', $untilupload );
1436
+ $extension = $untilupload[ 0 ];
1437
+ $untilupload = $untilupload[ 1 ];
1438
+ $untilupload = explode( '*:*w_max_size*:*', $untilupload );
1439
+ $max_size = $untilupload[ 0 ];
1440
+ $untilupload = $untilupload[ 1 ];
1441
+ $fileName = $files[ 'name' ][ $file_key ];
1442
+ $fileSize = $files[ 'size' ][ $file_key ];
1443
  if ( $fileSize > $max_size * 1024 ) {
1444
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes(sprintf( __('The file exceeds the allowed size of %s KB.', WDFM()->prefix ), $max_size )));
 
 
 
1445
  }
1446
+ $uploadedFileNameParts = explode( '.', $fileName );
1447
+ $uploadedFileExtension = array_pop( $uploadedFileNameParts );
1448
+ $to = strlen( $fileName ) - strlen( $uploadedFileExtension ) - 1;
1449
+ $fileNameFree = substr( $fileName, 0, $to );
1450
+ $invalidFileExts = explode( ',', $extension );
1451
  $extOk = FALSE;
1452
  foreach ( $invalidFileExts as $key => $valuee ) {
1453
+ if ( is_numeric( strpos( strtolower( $valuee ), strtolower( $uploadedFileExtension ) ) ) ) {
1454
  $extOk = TRUE;
1455
  }
1456
  }
1457
  if ( $extOk == FALSE ) {
1458
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Can not upload this type of file.', WDFM()->prefix ) ) );
1459
  }
1460
+ $fileTemp = $files[ 'tmp_name' ][ $file_key ];
1461
  $p = 1;
1462
+ if ( !file_exists( $upload_dir[ 'basedir' ] . '/' . $destination ) ) {
1463
+ $array_dir = explode( '/', $destination );
1464
+ if ( !empty( $array_dir ) ) {
1465
+ $dirTmp = $upload_dir[ 'basedir' ] . '/';
1466
  foreach ( $array_dir as $dir ) {
1467
+ if ( !empty( $dir ) ) {
1468
  $dirTmp .= $dir . '/';
1469
+ if ( !is_dir( $dirTmp ) ) {
1470
+ mkdir( $dirTmp, 0777 );
1471
  }
1472
  }
1473
  }
1474
  }
1475
  }
1476
+ if ( file_exists( $upload_dir[ 'basedir' ] . '/' . $destination . "/" . $fileName ) ) {
1477
  $fileName1 = $fileName;
1478
+ while ( file_exists( $upload_dir[ 'basedir' ] . '/' . $destination . "/" . $fileName1 ) ) {
1479
+ $to = strlen( $file_name ) - strlen( $uploadedFileExtension ) - 1;
1480
+ $fileName1 = substr( $fileName, 0, $to ) . '(' . $p . ').' . $uploadedFileExtension;
1481
  // $file['name'] = $fileName;
1482
  $p++;
1483
  }
1486
  // for dropbox & google drive integration addons
1487
  $check_both = 0;
1488
  if ( $form->save_uploads == 0 ) {
1489
+ if ( defined( 'WD_FM_DBOX_INT' ) && is_plugin_active( constant( 'WD_FM_DBOX_INT' ) ) ) {
1490
+ $enable = $wpdb->get_var( "SELECT enable FROM " . $wpdb->prefix . "formmaker_dbox_int WHERE form_id=" . $form->id );
1491
  if ( $enable == 1 ) {
1492
+ $selectable_upload = $wpdb->get_var( "SELECT selectable_upload FROM " . $wpdb->prefix . "formmaker_dbox_int WHERE form_id=" . $form->id );
1493
+ if ( (int)$selectable_upload == 1 ) {
1494
+ $temp_dir_dbox = explode( '\\', $fileTemp );
1495
+ $temp_dir_dbox = implode( '%%', $temp_dir_dbox );
1496
  $value .= $temp_dir_dbox . '*@@url@@*' . $fileName;
1497
+ } else {
1498
+ $dbox_folder_name = preg_replace( '/[^A-Z|a-z|0-9|\-|\\|\/]/', '', $form->title );
1499
+ $dlink_dbox = '<a href="' . add_query_arg( array(
1500
+ 'action' => 'WD_FM_DBOX_INT',
1501
+ 'addon_task' => 'upload_dbox_file',
1502
+ 'form_id' => $form->id,
1503
+ ), admin_url( 'admin-ajax.php' ) ) . '&dbox_file_name=' . $fileName . '&dbox_folder_name=/' . $dbox_folder_name . '" >' . $fileName . '</a>';
 
1504
  $value .= $dlink_dbox;
1505
  }
1506
+ $files[ 'tmp_name' ][ $file_key ] = $fileTemp;
1507
  $temp_file = array(
1508
+ "name" => $files[ 'name' ][ $file_key ],
1509
+ "type" => $files[ 'type' ][ $file_key ],
1510
+ "tmp_name" => $files[ 'tmp_name' ][ $file_key ],
1511
  'field_key' => $i,
1512
  );
1513
+ } else {
 
1514
  $check_both++;
1515
  }
1516
+ } else {
 
1517
  $check_both++;
1518
  }
1519
+ if ( defined( 'WD_FM_GDRIVE_INT' ) && is_plugin_active( constant( 'WD_FM_GDRIVE_INT' ) ) ) {
1520
+ $enable = $wpdb->get_var( "SELECT enable FROM " . $wpdb->prefix . "formmaker_gdrive_int WHERE form_id=" . $form->id );
1521
  if ( $enable == 1 ) {
1522
+ $selectable_upload = $wpdb->get_var( "SELECT selectable_upload FROM " . $wpdb->prefix . "formmaker_gdrive_int WHERE form_id=" . $form->id );
1523
+ if ( (int)$selectable_upload == 1 ) {
1524
+ $temp_dir_dbox = explode( '\\', $fileTemp );
1525
+ $temp_dir_dbox = implode( '%%', $temp_dir_dbox );
1526
+ $value .= 'wdCloudAddon' . $temp_dir_dbox . '*@@url@@*' . $fileName . '*@@url@@*' . $files[ 'type' ][ $file_key ];
1527
+ } else {
1528
+ $dlink_dbox = '<a target="_blank" href="' . add_query_arg( array(
1529
+ 'action' => 'WD_FM_GDRIVE_INT',
1530
+ 'addon_task' => 'create_drive_link',
1531
+ 'id' => $form->id,
1532
+ ), admin_url( 'admin-ajax.php' ) ) . '&gdrive_file_name=' . $fileName . '&gdrive_folder_name=' . $form->title . '" >' . $fileName . '</a>';
 
1533
  $value .= $dlink_dbox;
1534
  }
1535
+ $files[ 'tmp_name' ][ $file_key ] = $fileTemp;
1536
  $temp_file = array(
1537
+ "name" => $files[ 'name' ][ $file_key ],
1538
+ "type" => $files[ 'type' ][ $file_key ],
1539
+ "tmp_name" => $files[ 'tmp_name' ][ $file_key ],
1540
  'field_key' => $i,
1541
  );
1542
+ } else {
 
1543
  $check_both++;
1544
  }
1545
+ } else {
 
1546
  $check_both++;
1547
  }
1548
  }
1549
  //
1550
  if ( $check_both != 0 ) {
1551
  $value .= '';
1552
+ $files[ 'tmp_name' ][ $file_key ] = $fileTemp;
1553
  $temp_file = array(
1554
+ "name" => $files[ 'name' ][ $file_key ],
1555
+ "type" => $files[ 'type' ][ $file_key ],
1556
+ "tmp_name" => $files[ 'tmp_name' ][ $file_key ],
1557
  'field_key' => $i,
1558
  );
1559
  }
1560
  if ( $form->save_uploads == 1 ) {
1561
+ if ( !move_uploaded_file( $fileTemp, $upload_dir[ 'basedir' ] . '/' . $destination . '/' . $fileName ) ) {
1562
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Error, file cannot be moved.', WDFM()->prefix ) ) );
1563
  }
1564
+ $value .= $upload_dir[ 'baseurl' ] . '/' . $destination . '/' . $fileName . '*@@url@@*';
1565
+ $files[ 'tmp_name' ][ $file_key ] = '/' . $destination . '/' . $fileName;
1566
  $temp_file = array(
1567
+ "name" => $files[ 'name' ][ $file_key ],
1568
+ "type" => $files[ 'type' ][ $file_key ],
1569
+ "tmp_name" => $files[ 'tmp_name' ][ $file_key ],
1570
  'field_key' => $i,
1571
  );
1572
  }
1573
+ array_push( $all_files, $temp_file );
1574
  }
1575
  }
1576
+ }
1577
  }
1578
  }
1579
  break;
1580
  }
1581
  case 'type_address': {
1582
  $value = '*#*#*#';
1583
+ $element = isset( $_POST[ 'wdform_' . $i . "_street1" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_street1" . $id ] ) : NULL;
1584
+ if ( isset( $element ) ) {
1585
  $value = $element;
1586
  break;
1587
  }
1588
+ $element = isset( $_POST[ 'wdform_' . $i . "_street2" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_street2" . $id ] ) : NULL;
1589
+ if ( isset( $element ) ) {
1590
  $value = $element;
1591
  break;
1592
  }
1593
+ $element = isset( $_POST[ 'wdform_' . $i . "_city" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_city" . $id ] ) : NULL;
1594
+ if ( isset( $element ) ) {
1595
  $value = $element;
1596
  break;
1597
  }
1598
+ $element = isset( $_POST[ 'wdform_' . $i . "_state" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_state" . $id ] ) : NULL;
1599
+ if ( isset( $element ) ) {
1600
  $value = $element;
1601
  break;
1602
  }
1603
+ $element = isset( $_POST[ 'wdform_' . $i . "_postal" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_postal" . $id ] ) : NULL;
1604
+ if ( isset( $element ) ) {
1605
  $value = $element;
1606
  break;
1607
  }
1608
+ $element = isset( $_POST[ 'wdform_' . $i . "_country" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_country" . $id ] ) : NULL;
1609
+ if ( isset( $element ) ) {
1610
  $value = $element;
1611
  break;
1612
  }
1613
  break;
1614
  }
1615
  case "type_hidden": {
1616
+ $value = isset( $_POST[ $label_label[ $key ] ] ) ? esc_html( $_POST[ $label_label[ $key ] ] ) : "";
1617
  break;
1618
  }
1619
  case "type_radio": {
1620
+ $element = isset( $_POST[ 'wdform_' . $i . "_other_input" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_other_input" . $id ] ) : NULL;
1621
+ if ( isset( $element ) ) {
1622
  $value = $element;
1623
  break;
1624
  }
1625
+ $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "";
1626
  break;
1627
  }
1628
  case "type_checkbox": {
1629
  $start = -1;
1630
  $value = '';
1631
  for ( $j = 0; $j < 100; $j++ ) {
1632
+ $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) : NULL;
1633
+ if ( isset( $element ) ) {
1634
  $start = $j;
1635
  break;
1636
  }
1637
  }
1638
  $other_element_id = -1;
1639
+ $is_other = isset( $_POST[ 'wdform_' . $i . "_allow_other" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_allow_other" . $id ] ) : "";
1640
  if ( $is_other == "yes" ) {
1641
+ $other_element_id = isset( $_POST[ 'wdform_' . $i . "_allow_other_num" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_allow_other_num" . $id ] ) : "";
1642
  }
1643
  if ( $start != -1 ) {
1644
  for ( $j = $start; $j < 100; $j++ ) {
1645
+ $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) : NULL;
1646
+ if ( isset( $element ) ) {
1647
  if ( $j == $other_element_id ) {
1648
+ $value = $value . (isset( $_POST[ 'wdform_' . $i . "_other_input" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_other_input" . $id ] ) : "") . '***br***';
1649
+ } else {
1650
+ $value = $value . (isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) : "") . '***br***';
 
1651
  }
1652
  }
1653
  }
1655
  break;
1656
  }
1657
  case "type_paypal_price": {
1658
+ $value = isset( $_POST[ 'wdform_' . $i . "_element_dollars" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_dollars" . $id ] ) : 0;
1659
+ $value = (int)preg_replace( '/\D/', '', $value );
1660
+ if ( isset( $_POST[ 'wdform_' . $i . "_element_cents" . $id ] ) ) {
1661
+ $value = $value . '.' . (preg_replace( '/\D/', '', esc_html( $_POST[ 'wdform_' . $i . "_element_cents" . $id ] ) ));
1662
  }
1663
+ $total += (float)($value);
1664
  $paypal_option = array();
1665
  if ( $value != 0 ) {
1666
+ $quantity = (isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) : 1);
1667
+ array_push( $paypal[ 'item_name' ], $label_label[ $key ] );
1668
+ array_push( $paypal[ 'quantity' ], $quantity );
1669
+ array_push( $paypal[ 'amount' ], $value );
1670
  $is_amount = TRUE;
1671
+ array_push( $paypal[ 'on_os' ], $paypal_option );
1672
  }
1673
  $value = $value . $form_currency;
1674
  break;
1675
  }
1676
  case "type_paypal_price_new": {
1677
+ $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : 0;
1678
+ $total += (float)($value);
1679
  $paypal_option = array();
1680
  if ( $value != 0 ) {
1681
+ $quantity = (isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) : 1);
1682
+ array_push( $paypal[ 'item_name' ], $label_label[ $key ] );
1683
+ array_push( $paypal[ 'quantity' ], $quantity );
1684
+ array_push( $paypal[ 'amount' ], $value );
1685
  $is_amount = TRUE;
1686
+ array_push( $paypal[ 'on_os' ], $paypal_option );
1687
  }
1688
  $value = $form_currency . $value;
1689
  break;
1690
  }
1691
  case "type_paypal_select": {
1692
+ $value = '';
1693
+ if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] != '' ) {
1694
+ $value = esc_html( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) . ' : ' . $form_currency . (isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "");
1695
+ }
1696
+ $quantity = ( isset($_POST['wdform_' . $i . "_element_quantity" . $id]) ) ? intval( esc_html( $_POST['wdform_' . $i . "_element_quantity" . $id] ) ) : 1;
1697
+ $total += (float)(isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : 0) * $quantity;
1698
+ array_push( $paypal[ 'item_name' ], $label_label[ $key ] . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_label" . $id ] : "") );
1699
+ array_push( $paypal[ 'quantity' ], $quantity );
1700
+ array_push( $paypal[ 'amount' ], (isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "") );
1701
+ if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] != 0 ) {
 
 
1702
  $is_amount = TRUE;
1703
  }
1704
+ $element_quantity = isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) : NULL;
1705
+ if ( isset( $element_quantity ) && $value != '' ) {
1706
+ $value .= '***br***' . (isset( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) : "") . ': ' . esc_html( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) . '***quantity***';
1707
  }
1708
  $paypal_option = array();
1709
+ $paypal_option[ 'on' ] = array();
1710
+ $paypal_option[ 'os' ] = array();
1711
  for ( $k = 0; $k < 50; $k++ ) {
1712
+ $temp_val = isset( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) : NULL;
1713
+ if ( isset( $temp_val ) && $value != '' ) {
1714
+ array_push( $paypal_option[ 'on' ], (isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) : "") );
1715
+ array_push( $paypal_option[ 'os' ], (isset( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) : "") );
1716
+ $value .= '***br***' . (isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) : "") . ': ' . (isset( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) : "") . '***property***';
1717
  }
1718
  }
1719
+ array_push( $paypal[ 'on_os' ], $paypal_option );
1720
  break;
1721
  }
1722
  case "type_paypal_radio": {
1723
+ $value = '';
1724
+ $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : '';
1725
  if ( $element ) {
1726
+ $value = (isset( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) : '') . ' : ' . $form_currency . $element;
1727
+ }
1728
+ $quantity = ( isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ]) ) ? intval( esc_html( $_POST['wdform_' . $i . "_element_quantity" . $id] ) ) : 1;
1729
+ $total += (float)(isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : 0) * $quantity;
1730
+ array_push( $paypal[ 'item_name' ], $label_label[ $key ] . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) : "") );
1731
+ array_push( $paypal[ 'quantity' ], $quantity );
1732
+ array_push( $paypal[ 'amount' ], (isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : 0) );
1733
+ if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] != 0 ) {
 
 
 
1734
  $is_amount = TRUE;
1735
  }
1736
+ $element_quantity = isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) : NULL;
1737
+ if ( isset( $element_quantity ) && $value != '' ) {
1738
+ $value .= '***br***' . (isset( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) : "") . ': ' . esc_html( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) . '***quantity***';
1739
  }
1740
  $paypal_option = array();
1741
+ $paypal_option[ 'on' ] = array();
1742
+ $paypal_option[ 'os' ] = array();
1743
  for ( $k = 0; $k < 50; $k++ ) {
1744
+ $temp_val = isset( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) : NULL;
1745
+ if ( isset( $temp_val ) && $value != '' ) {
1746
+ array_push( $paypal_option[ 'on' ], (isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) : "") );
1747
+ array_push( $paypal_option[ 'os' ], esc_html( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) );
1748
+ $value .= '***br***' . (isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) : "") . ': ' . esc_html( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) . '***property***';
1749
  }
1750
  }
1751
+ array_push( $paypal[ 'on_os' ], $paypal_option );
1752
  break;
1753
  }
1754
  case "type_paypal_shipping": {
1755
+ $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : '';
1756
  if ( $element ) {
1757
+ $value = (isset( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) : '') . ' : ' . $form_currency . $element;
1758
+ } else {
 
1759
  $value = '';
1760
  }
1761
+ $paypal[ 'shipping' ] = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "";
1762
  break;
1763
  }
1764
  case "type_paypal_checkbox": {
1765
  $start = -1;
1766
  $value = '';
1767
  for ( $j = 0; $j < 100; $j++ ) {
1768
+ $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) : NULL;
1769
+ if ( isset( $element ) ) {
1770
  $start = $j;
1771
  break;
1772
  }
1773
  }
1774
  $other_element_id = -1;
1775
+ $is_other = isset( $_POST[ 'wdform_' . $i . "_allow_other" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_allow_other" . $id ] ) : "";
1776
  if ( $is_other == "yes" ) {
1777
+ $other_element_id = isset( $_POST[ 'wdform_' . $i . "_allow_other_num" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_allow_other_num" . $id ] ) : "";
1778
  }
1779
  if ( $start != -1 ) {
1780
  for ( $j = $start; $j < 100; $j++ ) {
1781
+ $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) : NULL;
1782
+ if ( isset( $element ) ) {
1783
  if ( $j == $other_element_id ) {
1784
+ $value = $value . (isset( $_POST[ 'wdform_' . $i . "_other_input" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_other_input" . $id ] ) : "") . '***br***';
1785
+ } else {
1786
+ $element = (isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) && $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) : 0);
1787
+ $value = $value . (isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j . "_label" ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . $j . "_label" ] ) : "") . ' - ' . $form_currency . $element . '***br***';
1788
+ $quantity = ( isset($_POST[ 'wdform_' . $i . "_element_quantity" . $id]) ) ? intval( esc_html( $_POST['wdform_' . $i . "_element_quantity" . $id] ) ) : 1;
1789
+ $total += (float)(isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . $j ] : 0) * (float)($quantity);
1790
+ array_push( $paypal[ 'item_name' ], $label_label[ $key ] . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j . "_label" ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . $j . "_label" ] ) : "") );
1791
+ array_push( $paypal[ 'quantity' ], $quantity );
1792
+ array_push( $paypal[ 'amount' ], (isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? ($_POST[ 'wdform_' . $i . "_element" . $id . $j ] == '' ? '0' : esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] )) : "") );
1793
+ if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) && $_POST[ 'wdform_' . $i . "_element" . $id . $j ] != 0 ) {
 
1794
  $is_amount = TRUE;
1795
  }
1796
  $paypal_option = array();
1797
+ $paypal_option[ 'on' ] = array();
1798
+ $paypal_option[ 'os' ] = array();
1799
  for ( $k = 0; $k < 50; $k++ ) {
1800
+ $temp_val = isset( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) : NULL;
1801
+ if ( isset( $temp_val ) ) {
1802
+ array_push( $paypal_option[ 'on' ], isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) : "" );
1803
+ array_push( $paypal_option[ 'os' ], esc_html( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) );
1804
  }
1805
  }
1806
+ array_push( $paypal[ 'on_os' ], $paypal_option );
1807
  }
1808
  }
1809
  }
1810
+ $element_quantity = isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) : NULL;
1811
+ if ( isset( $element_quantity ) ) {
1812
+ $value .= (isset( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) : "") . ': ' . esc_html( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) . '***quantity***';
1813
  }
1814
  for ( $k = 0; $k < 50; $k++ ) {
1815
+ $temp_val = isset( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) : NULL;
1816
+ if ( isset( $temp_val ) ) {
1817
+ $value .= '***br***' . (isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) : "") . ': ' . $_POST[ 'wdform_' . $i . "_property" . $id . $k ] . '***property***';
1818
  }
1819
  }
1820
  }
1821
  break;
1822
  }
1823
  case "type_star_rating": {
1824
+ if ( isset( $_POST[ 'wdform_' . $i . "_selected_star_amount" . $id ] ) && $_POST[ 'wdform_' . $i . "_selected_star_amount" . $id ] == "" ) {
1825
  $selected_star_amount = 0;
1826
+ } else {
1827
+ $selected_star_amount = isset( $_POST[ 'wdform_' . $i . "_selected_star_amount" . $id ] ) ? $_POST[ 'wdform_' . $i . "_selected_star_amount" . $id ] : 0;
1828
  }
1829
+ $value = $selected_star_amount . '/' . (isset( $_POST[ 'wdform_' . $i . "_star_amount" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_star_amount" . $id ] ) : "");
 
 
 
1830
  break;
1831
  }
1832
  case "type_scale_rating": {
1833
+ $value = (isset( $_POST[ 'wdform_' . $i . "_scale_radio" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_scale_radio" . $id ] ) : 0) . '/' . (isset( $_POST[ 'wdform_' . $i . "_scale_amount" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_scale_amount" . $id ] ) : "");
1834
  break;
1835
  }
1836
  case "type_spinner": {
1837
+ $value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "";
1838
  break;
1839
  }
1840
  case "type_slider": {
1841
+ $value = isset( $_POST[ 'wdform_' . $i . "_slider_value" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_slider_value" . $id ] ) : "";
1842
  break;
1843
  }
1844
  case "type_range": {
1845
+ $value = (isset( $_POST[ 'wdform_' . $i . "_element" . $id . '0' ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . '0' ] ) : "") . '-' . (isset( $_POST[ 'wdform_' . $i . "_element" . $id . '1' ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . '1' ] ) : "");
1846
  break;
1847
  }
1848
  case "type_grading": {
1849
  $value = "";
1850
+ $items = explode( ":", isset( $_POST[ 'wdform_' . $i . "_hidden_item" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hidden_item" . $id ] ) : "" );
1851
+ for ( $k = 0; $k < sizeof( $items ) - 1; $k++ ) {
1852
+ $value .= (isset( $_POST[ 'wdform_' . $i . "_element" . $id . '_' . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id . '_' . $k ] ) : "") . ':';
1853
  }
1854
+ $value .= (isset( $_POST[ 'wdform_' . $i . "_hidden_item" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hidden_item" . $id ] ) : "") . '***grading***';
1855
  break;
1856
  }
1857
  case "type_matrix": {
1858
+ $rows_of_matrix = explode( "***", isset( $_POST[ 'wdform_' . $i . "_hidden_row" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hidden_row" . $id ] ) : "" );
1859
+ $rows_count = sizeof( $rows_of_matrix ) - 1;
1860
+ $column_of_matrix = explode( "***", isset( $_POST[ 'wdform_' . $i . "_hidden_column" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hidden_column" . $id ] ) : "" );
1861
+ $columns_count = sizeof( $column_of_matrix ) - 1;
1862
+ if ( isset( $_POST[ 'wdform_' . $i . "_input_type" . $id ] ) && $_POST[ 'wdform_' . $i . "_input_type" . $id ] == "radio" ) {
1863
  $input_value = "";
1864
  for ( $k = 1; $k <= $rows_count; $k++ ) {
1865
+ $input_value .= (isset( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k ] ) : 0) . "***";
1866
  }
1867
  }
1868
+ if ( isset( $_POST[ 'wdform_' . $i . "_input_type" . $id ] ) && $_POST[ 'wdform_' . $i . "_input_type" . $id ] == "checkbox" ) {
1869
  $input_value = "";
1870
  for ( $k = 1; $k <= $rows_count; $k++ ) {
1871
  for ( $j = 1; $j <= $columns_count; $j++ ) {
1872
+ $input_value .= (isset( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k . '_' . $j ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k . '_' . $j ] ) : 0) . "***";
1873
  }
1874
  }
1875
  }
1876
+ if ( isset( $_POST[ 'wdform_' . $i . "_input_type" . $id ] ) && $_POST[ 'wdform_' . $i . "_input_type" . $id ] == "text" ) {
1877
  $input_value = "";
1878
  for ( $k = 1; $k <= $rows_count; $k++ ) {
1879
  for ( $j = 1; $j <= $columns_count; $j++ ) {
1880
+ $input_value .= (isset( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k . '_' . $j ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k . '_' . $j ] ) : "") . "***";
1881
  }
1882
  }
1883
  }
1884
+ if ( isset( $_POST[ 'wdform_' . $i . "_input_type" . $id ] ) && $_POST[ 'wdform_' . $i . "_input_type" . $id ] == "select" ) {
1885
  $input_value = "";
1886
  for ( $k = 1; $k <= $rows_count; $k++ ) {
1887
  for ( $j = 1; $j <= $columns_count; $j++ ) {
1888
+ $input_value .= (isset( $_POST[ 'wdform_' . $i . "_select_yes_no" . $id . $k . '_' . $j ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_select_yes_no" . $id . $k . '_' . $j ] ) : "") . "***";
1889
  }
1890
  }
1891
  }
1892
+ $value = $rows_count . (isset( $_POST[ 'wdform_' . $i . "_hidden_row" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hidden_row" . $id ] ) : "") . '***' . $columns_count . (isset( $_POST[ 'wdform_' . $i . "_hidden_column" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_hidden_column" . $id ] ) : "") . '***' . (isset( $_POST[ 'wdform_' . $i . "_input_type" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_input_type" . $id ] ) : "") . '***' . $input_value . '***matrix***';
1893
  break;
1894
  }
1895
  }
1900
  }
1901
  if ( $type == "type_text" or $type == "type_textarea" or $type == "type_name" or $type == "type_submitter_mail" or $type == "type_number" or $type == "type_phone" or $type == "type_phone_new" ) {
1902
  $untilupload = $form->form_fields;
1903
+ $untilupload = substr( $untilupload, strpos( $untilupload, $i . '*:*id*:*' . $type ), -1 );
1904
+ $untilupload = substr( $untilupload, 0, strpos( $untilupload, '*:*new_field*:' ) );
1905
+ $untilupload = explode( '*:*w_required*:*', $untilupload );
1906
+ $untilupload = $untilupload[ 1 ];
1907
+ $untilupload = explode( '*:*w_unique*:*', $untilupload );
1908
+ $unique_element = $untilupload[ 0 ];
1909
+ if ( strlen( $unique_element ) > 3 ) {
1910
+ $unique_element = substr( $unique_element, -3 );
1911
  }
1912
  if ( $unique_element == 'yes' ) {
1913
+ $unique = $wpdb->get_col( $wpdb->prepare( "SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id= %d and element_label= %s and element_value= %s", $id, $i, addslashes( $value ) ) );
1914
  if ( $unique ) {
1915
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( addslashes( sprintf( __( 'This field %s requires a unique entry.', WDFM()->prefix ), $label_label[ $key ] ) ) ) );
 
 
 
1916
  }
1917
  }
1918
  }
1919
  $save_or_no = TRUE;
1920
+ $fvals[ '{' . $i . '}' ] = str_replace( array(
1921
+ "***map***",
1922
+ "*@@url@@*",
1923
+ "@@@@@@@@@",
1924
+ "@@@",
1925
+ "***grading***",
1926
+ "***br***",
1927
+ ), array( " ", "", " ", " ", " ", ", " ), addslashes( $value ) );
1928
 
1929
+ if ( $type == 'type_checkbox' ) {
1930
+ $fvals[ '{' . $i . '}' ] = rtrim( $fvals[ '{' . $i . '}' ], ', ' );
1931
  }
1932
 
1933
  if ( $form->savedb ) {
1934
+ $save_or_no = $wpdb->insert( $wpdb->prefix . "formmaker_submits", array(
1935
  'form_id' => $id,
1936
  'element_label' => $i,
1937
+ 'element_value' => stripslashes( $value ),
1938
+ 'group_id' => ($group_id),
1939
+ 'date' => date( 'Y-m-d H:i:s' ),
1940
+ 'ip' => $_SERVER[ 'REMOTE_ADDR' ],
1941
  'user_id_wd' => $current_user->ID,
1942
  ), array(
1943
+ '%d',
1944
+ '%s',
1945
+ '%s',
1946
+ '%d',
1947
+ '%s',
1948
+ '%s',
1949
+ '%d',
1950
+ ) );
1951
  }
1952
  if ( !$save_or_no ) {
1953
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFM()->prefix ) ) );
1954
  }
1955
  $chgnac = FALSE;
1956
+ } else {
1957
+ $fvals[ '{' . $i . '}' ] = '';
 
1958
  }
1959
  }
 
1960
  $user_fields = array(
1961
+ "subid" => $group_id,
1962
  "ip" => $ip,
1963
  "userid" => $wp_userid,
1964
  "username" => $wp_username,
1965
  "useremail" => $wp_useremail,
1966
  );
1967
+ $queries = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM " . $wpdb->prefix . "formmaker_query WHERE form_id=%d", (int)$id ) );
1968
  if ( $queries ) {
1969
  foreach ( $queries as $query ) {
1970
+ $temp = explode( '***wdfcon_typewdf***', $query->details );
1971
+ $con_type = $temp[ 0 ];
1972
+ $temp = explode( '***wdfcon_methodwdf***', $temp[ 1 ] );
1973
+ $con_method = $temp[ 0 ];
1974
+ $temp = explode( '***wdftablewdf***', $temp[ 1 ] );
1975
+ $table_cur = $temp[ 0 ];
1976
+ $temp = explode( '***wdfhostwdf***', $temp[ 1 ] );
1977
+ $host = $temp[ 0 ];
1978
+ $temp = explode( '***wdfportwdf***', $temp[ 1 ] );
1979
+ $temp = explode( '***wdfusernamewdf***', $temp[ 1 ] );
1980
+ $username = $temp[ 0 ];
1981
+ $temp = explode( '***wdfpasswordwdf***', $temp[ 1 ] );
1982
+ $password = $temp[ 0 ];
1983
+ $temp = explode( '***wdfdatabasewdf***', $temp[ 1 ] );
1984
+ $database = $temp[ 0 ];
1985
+ $query = str_replace( array_keys( $fvals ), $fvals, $query->query );
1986
  foreach ( $user_fields as $user_key => $user_field ) {
1987
+ $query = str_replace( '{' . $user_key . '}', $user_field, $query );
1988
  }
1989
  if ( $con_type == 'remote' ) {
1990
+ $wpdb_temp = new wpdb( $username, $password, $database, $host );
1991
+ $wpdb_temp->query( $query );
1992
+ } else {
1993
+ $wpdb->query( $query );
 
1994
  }
1995
  }
1996
  }
1997
 
 
 
 
 
 
 
 
 
 
 
 
1998
  // Get stripe post value.
1999
  $stripe_post_key = 'stripeToken' . $id;
2000
+ $stripeToken = WDW_FM_Library::get( $stripe_post_key, '' );
2001
  if ( $is_amount && $stripeToken ) {
2002
  $wdstripe_products_data = new stdClass();
2003
  $tax = $form->tax;
2004
  $total = $total + ($total * $tax) / 100;
2005
+ $shipping = isset( $paypal[ 'shipping' ] ) ? $paypal[ 'shipping' ] : 0;
2006
  $total = $total + $shipping;
2007
+ $total = round( $total, 2 );
2008
  $wdstripe_products_data->currency = $form->payment_currency;
2009
  $wdstripe_products_data->amount = $total;
2010
  $wdstripe_products_data->shipping = $shipping;
2011
+ $wdstripe_products_data = json_encode( $wdstripe_products_data );
2012
  $frontend_parmas['wdstripe_stripeToken'] = $stripeToken;
2013
  $frontend_parmas['wdstripe_products_data'] = $wdstripe_products_data;
2014
  }
2015
 
2016
  $str = '';
2017
+ if ( $form->paypal_mode && $form->paypal_mode == 1 ) {
2018
+ if ( $paypal[ 'item_name' ] ) {
2019
  if ( $is_amount ) {
2020
  $tax = $form->tax;
2021
  $currency = $form->payment_currency;
2022
  $business = $form->paypal_email;
2023
+ $ip = $_SERVER[ 'REMOTE_ADDR' ];
2024
+ $total2 = round( $total, 2 );
2025
+ $save_or_no = $wpdb->insert( $wpdb->prefix . "formmaker_submits", array(
2026
  'form_id' => $id,
2027
  'element_label' => 'item_total',
2028
  'element_value' => $form_currency . $total2,
2029
+ 'group_id' => $group_id,
2030
+ 'date' => date( 'Y-m-d H:i:s' ),
2031
  'ip' => $ip,
2032
  'user_id_wd' => $current_user->ID,
2033
  ), array(
2034
+ '%d',
2035
+ '%s',
2036
+ '%s',
2037
+ '%d',
2038
+ '%s',
2039
+ '%s',
2040
+ '%d',
2041
+ ) );
2042
  if ( !$save_or_no ) {
2043
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFM()->prefix ) ) );
2044
  }
2045
  $total = $total + ($total * $tax) / 100;
2046
+ if ( isset( $paypal[ 'shipping' ] ) ) {
2047
+ $total = $total + $paypal[ 'shipping' ];
2048
  }
2049
+ $total = round( $total, 2 );
2050
+ $save_or_no = $wpdb->insert( $wpdb->prefix . "formmaker_submits", array(
2051
  'form_id' => $id,
2052
  'element_label' => 'total',
2053
  'element_value' => $form_currency . $total,
2054
+ 'group_id' => $group_id,
2055
+ 'date' => date( 'Y-m-d H:i:s' ),
2056
  'ip' => $ip,
2057
  'user_id_wd' => $current_user->ID,
2058
  ), array(
2059
+ '%d',
2060
+ '%s',
2061
+ '%s',
2062
+ '%d',
2063
+ '%s',
2064
+ '%s',
2065
+ '%d',
2066
+ ) );
2067
  if ( !$save_or_no ) {
2068
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFM()->prefix ) ) );
2069
  }
2070
+ $save_or_no = $wpdb->insert( $wpdb->prefix . "formmaker_submits", array(
2071
  'form_id' => $id,
2072
  'element_label' => '0',
2073
  'element_value' => 'In progress',
2074
+ 'group_id' => $group_id,
2075
+ 'date' => date( 'Y-m-d H:i:s' ),
2076
  'ip' => $ip,
2077
  'user_id_wd' => $current_user->ID,
2078
  ), array(
2079
+ '%d',
2080
+ '%s',
2081
+ '%s',
2082
+ '%d',
2083
+ '%s',
2084
+ '%s',
2085
+ '%d',
2086
+ ) );
2087
  if ( !$save_or_no ) {
2088
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFM()->prefix ) ) );
2089
  }
2090
  $str = '';
2091
  if ( $form->checkout_mode == 1 || $form->checkout_mode == "production" ) {
2092
  $str .= "https://www.paypal.com/cgi-bin/webscr?";
2093
+ } else {
 
2094
  $str .= "https://www.sandbox.paypal.com/cgi-bin/webscr?";
2095
  }
2096
  $str .= "currency_code=" . $currency;
2097
+ $str .= "&business=" . urlencode( $business );
2098
  $str .= "&cmd=" . "_cart";
2099
+ $str .= "&notify_url=" . admin_url( 'admin-ajax.php?action=checkpaypal%26form_id=' . $id . '%26group_id=' . $group_id );
2100
  $str .= "&upload=" . "1";
2101
  $str .= "&charset=UTF-8";
2102
+ if ( isset( $paypal[ 'shipping' ] ) ) {
2103
+ $str = $str . "&shipping_1=" . $paypal[ 'shipping' ];
2104
  // $str=$str."&weight_cart=".$paypal['shipping'];
2105
  // $str=$str."&shipping2=3".$paypal['shipping'];
2106
  $str = $str . "&no_shipping=2";
2107
  }
2108
  $i = 0;
2109
+ foreach ( $paypal[ 'item_name' ] as $pkey => $pitem_name ) {
2110
+ if ( $paypal[ 'amount' ][ $pkey ] ) {
2111
  $i++;
2112
+ $str = $str . "&item_name_" . $i . "=" . urlencode( $pitem_name );
2113
+ $str = $str . "&amount_" . $i . "=" . $paypal[ 'amount' ][ $pkey ];
2114
+ $str = $str . "&quantity_" . $i . "=" . $paypal[ 'quantity' ][ $pkey ];
2115
  if ( $tax ) {
2116
  $str = $str . "&tax_rate_" . $i . "=" . $tax;
2117
  }
2118
+ if ( $paypal[ 'on_os' ][ $pkey ] ) {
2119
+ foreach ( $paypal[ 'on_os' ][ $pkey ][ 'on' ] as $on_os_key => $on_item_name ) {
2120
  $str = $str . "&on" . $on_os_key . "_" . $i . "=" . $on_item_name;
2121
+ $str = $str . "&os" . $on_os_key . "_" . $i . "=" . $paypal[ 'on_os' ][ $pkey ][ 'os' ][ $on_os_key ];
2122
  }
2123
  }
2124
  }
2127
  }
2128
  }
2129
  if ( $form->mail_verify ) {
2130
+ unset( $_SESSION[ 'hash' ] );
2131
+ unset( $_SESSION[ 'gid' ] );
2132
+ $ip = $_SERVER[ 'REMOTE_ADDR' ];
2133
+ $_SESSION[ 'gid' ] = $group_id;
2134
+ $send_tos = explode( '**', $form->send_to );
2135
  if ( $send_tos ) {
2136
  foreach ( $send_tos as $send_index => $send_to ) {
2137
+ $_SESSION[ 'hash' ][] = md5( $ip . time() . rand() );
2138
+ $send_to = str_replace( '*', '', $send_to );
2139
+ $save_or_no = $wpdb->insert( $wpdb->prefix . "formmaker_submits", array(
2140
  'form_id' => $id,
2141
  'element_label' => 'verifyInfo@' . $send_to,
2142
+ 'element_value' => $_SESSION[ 'hash' ][ $send_index ] . "**" . $form->mail_verify_expiretime . "**" . $send_to,
2143
+ 'group_id' => $group_id,
2144
+ 'date' => date( 'Y-m-d H:i:s' ),
2145
  'ip' => $ip,
2146
  'user_id_wd' => $current_user->ID,
2147
  ), array(
2148
+ '%d',
2149
+ '%s',
2150
+ '%s',
2151
+ '%d',
2152
+ '%s',
2153
+ '%s',
2154
+ '%d',
2155
+ ) );
2156
  if ( !$save_or_no ) {
2157
+ return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFM()->prefix ) ) );
2158
  }
2159
  }
2160
  }
2161
  }
2162
  if ( $chgnac ) {
2163
  if ( $form->submit_text_type != 4 ) {
2164
+ $_SESSION[ 'massage_after_submit' . $id ] = addslashes( addslashes( __( 'Nothing was submitted.', WDFM()->prefix ) ) );
2165
  }
2166
+ $_SESSION[ 'error_or_no' . $id ] = 1;
2167
+ $_SESSION[ 'form_submit_type' . $id ] = $form->submit_text_type . ',' . $form->id . ',' . $group_id;
2168
+ wp_redirect( $_SERVER[ "REQUEST_URI" ] );
2169
  exit;
2170
  }
2171
 
2172
+ if ( WDFM()->is_free != 2 ) {
2173
+ $custom_fields = array(
2174
+ "ip" => $ip,
2175
+ "subid" => $group_id,
2176
+ 'adminemail' => $adminemail,
2177
+ "useremail" => $wp_useremail,
2178
+ "username" => $wp_username,
2179
+ 'pageurl' => $current_page_url,
2180
+ 'formtitle' => $formtitle
2181
+ );
2182
+ $frontend_parmas['form_id'] = $id;
2183
+ $frontend_parmas['fvals'] = $fvals;
2184
+ $frontend_parmas['form_currency'] = $form_currency;
2185
+ $frontend_parmas['custom_fields'] = $custom_fields;
2186
+ $frontend_parmas['all_files'] = json_encode($all_files);
2187
 
2188
+ do_action( 'fm_addon_frontend_init', $frontend_parmas );
2189
+ }
2190
+ return array( 'group_id' => $group_id, 'all_files' => $all_files, 'redirect_url' => $str );
2191
+ }
2192
+
2193
+ /**
2194
+ * @return int autoincrement value for group_id.
2195
+ */
2196
+ public function get_group_id() {
2197
+ global $wpdb;
2198
+ // Get max id from used group ids to prevent conflicts.
2199
+ $max_id = $wpdb->get_var( 'SELECT MAX( group_id ) FROM ' . $wpdb->prefix . 'formmaker_submits' );
2200
+ $last_id = $wpdb->insert( $wpdb->prefix . 'formmaker_groups', array( 'id' => 'NULL' ) );
2201
+ // If somehow maximum group id is greater than autoincrement number.
2202
+ if ($last_id && $wpdb->insert_id <= $max_id) {
2203
+ $last_id = $wpdb->insert( $wpdb->prefix . 'formmaker_groups', array( 'id' => $max_id + 1 ) );
2204
+ }
2205
+ if ($last_id) {
2206
+ // Get an autoincrement number for group_id.
2207
+ return $wpdb->insert_id;
2208
+ }
2209
+ else {
2210
+ // Get max id if somehow table does not exist.
2211
+ return $max_id + 1;
2212
  }
 
2213
  }
2214
 
2215
  /**
2217
  */
2218
  public function remove( $group_id ) {
2219
  global $wpdb;
2220
+ $wpdb->query( $wpdb->prepare( 'DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id= %d', $group_id ) );
2221
  }
2222
 
2223
  /**
2224
  * @param $form_id
2225
+ * @param $group_id
2226
  *
2227
  * @return mixed|null|string
2228
  */
2229
+ public function get_after_submission_text( $form_id, $group_id ) {
2230
  global $wpdb;
2231
+ $submit_text = $wpdb->get_var( "SELECT submit_text FROM " . $wpdb->prefix . "formmaker WHERE id='" . $form_id . "'" );
2232
  $current_user = wp_get_current_user();
2233
  if ( $current_user->ID != 0 ) {
2234
  $userid = $current_user->ID;
2235
  $username = $current_user->display_name;
2236
  $useremail = $current_user->user_email;
2237
+ } else {
 
2238
  $userid = '';
2239
  $username = '';
2240
  $useremail = '';
2241
  }
2242
+ $row = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id=%d", $form_id ) );
2243
  $ip = $_SERVER['REMOTE_ADDR'];
2244
+ $adminemail = get_option( 'admin_email' );
2245
+ $current_page_url = WDW_FM_Library::get_current_page_url();
2246
+ $formtitle = $row->title;
2247
  $label_order_original = array();
2248
  $label_order_ids = array();
2249
  $submission_array = array();
2250
+ $label_all = explode( '#****#', $row->label_order_current );
2251
+ $label_all = array_slice( $label_all, 0, count( $label_all ) - 1 );
2252
  foreach ( $label_all as $key => $label_each ) {
2253
+ $label_id_each = explode( '#**id**#', $label_each );
2254
+ $label_id = $label_id_each[ 0 ];
2255
+ array_push( $label_order_ids, $label_id );
2256
+ $label_order_each = explode( '#**label**#', $label_id_each[ 1 ] );
2257
+ $label_order_original[ $label_id ] = $label_order_each[ 0 ];
2258
  }
2259
+ $submissions_row = $wpdb->get_results( $wpdb->prepare( "SELECT `element_label`, `element_value` FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id=%d AND group_id=%d", $form_id, $group_id ) );
2260
  foreach ( $submissions_row as $sub_row ) {
2261
+ $submission_array[ $sub_row->element_label ] = $sub_row->element_value;
2262
  }
2263
  foreach ( $label_order_original as $key => $label_each ) {
2264
+ if (isset($submission_array[ $key ])) {
2265
+ $submit_text = str_replace( array( '%' . $label_each . '%', '{' . $key . '}' ), $submission_array[ $key ], $submit_text );
2266
  }
2267
  }
2268
  $custom_fields = array(
 
2269
  "ip" => $ip,
2270
+ "subid" => $group_id,
2271
  "userid" => $userid,
2272
+ 'adminemail' => $adminemail,
2273
  "useremail" => $useremail,
2274
+ "username" => $username,
2275
+ 'pageurl' => $current_page_url,
2276
+ 'formtitle' => $formtitle
2277
  );
2278
  foreach ( $custom_fields as $key => $custom_field ) {
2279
+ $key_replace = array( '%' . $key . '%', '{' . $key . '}' );
2280
+ $submit_text = str_replace( $key_replace, $custom_field, $submit_text );
 
2281
  }
2282
+ $submit_text = str_replace( array(
2283
+ "***map***",
2284
+ "*@@url@@*",
2285
+ "@@@@@@@@@",
2286
+ "@@@",
2287
+ "***grading***",
2288
+ "***br***",
2289
+ "***star_rating***",
2290
+ ), array( " ", "", " ", " ", " ", ", ", " " ), $submit_text );
2291
 
2292
  return $submit_text;
2293
  }
2297
  */
2298
  public function increment_views_count( $id ) {
2299
  global $wpdb;
2300
+ $vives_form = $wpdb->get_var( $wpdb->prepare( "SELECT views FROM " . $wpdb->prefix . "formmaker_views WHERE form_id=%d", $id ) );
2301
+ if ( isset( $vives_form ) ) {
2302
  $vives_form = $vives_form + 1;
2303
+ $wpdb->update( $wpdb->prefix . "formmaker_views", array(
2304
  'views' => $vives_form,
2305
  ), array( 'form_id' => $id ), array(
2306
+ '%d',
2307
+ ), array( '%d' ) );
2308
+ } else {
2309
+ $wpdb->insert( $wpdb->prefix . 'formmaker_views', array(
 
2310
  'form_id' => $id,
2311
  'views' => 1,
2312
  ), array(
2313
+ '%d',
2314
+ '%d',
2315
+ ) );
2316
  }
2317
  }
2318
 
2319
  /**
2320
+ * @param $group_id
2321
  * @param $all_files
2322
  * @param $id
2323
  * @param $str
2324
  *
2325
  * @return array
2326
  */
2327
+ public function gen_mail( $group_id, $all_files, $id, $str ) {
2328
+ global $wpdb;
2329
  // checking save uploads option
2330
  $upload_dir = wp_upload_dir();
2331
+ $save_uploads = $wpdb->get_var( "SELECT save_uploads FROM " . $wpdb->prefix . "formmaker WHERE id=" . $id );
 
2332
  if ( $save_uploads == 0 ) {
2333
+ $destination = $upload_dir[ 'basedir' ] . '/tmpAddon';
2334
+ if ( !file_exists( $destination ) ) {
2335
+ mkdir( $destination, 0777 );
2336
  }
2337
  foreach ( $all_files as &$all_file ) {
2338
+ $fileTemp = $all_file[ 'tmp_name' ];
2339
+ $fileName = $all_file[ 'name' ];
2340
+ if ( !move_uploaded_file( $fileTemp, $destination . '/' . $fileName ) ) {
2341
+ return array( 1, addslashes( __( 'Error, file cannot be moved.', WDFM()->prefix ) ) );
2342
  }
2343
+ $all_file[ 'tmp_name' ] = $destination . "/" . $fileName;
2344
  }
2345
  }
2346
+ $row = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id=%d", $id ) );
 
 
2347
  if ( !$row->form_front ) {
2348
  $id = '';
2349
  }
2350
+ $ip = $_SERVER['REMOTE_ADDR'];
2351
+ $adminemail = get_option( 'admin_email' );
2352
+ $current_page_url = WDW_FM_Library::get_current_page_url();
2353
+ $formtitle = $row->title;
2354
  $current_user = wp_get_current_user();
2355
+ $username = '';
2356
+ $useremail = '';
2357
  if ( $current_user->ID != 0 ) {
2358
  $username = $current_user->display_name;
2359
  $useremail = $current_user->user_email;
2360
  }
 
 
 
 
2361
  $label_order_original = array();
2362
  $label_order_ids = array();
2363
  $label_label = array();
2364
  $total = 0;
2365
  $form_currency = '$';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2366
  if ( $row->payment_currency ) {
2367
+ $form_currency = WDW_FM_Library::replace_currency_code( $row->payment_currency );
2368
  }
2369
+ $this->custom_fields['ip'] = $ip;
2370
+ $this->custom_fields['subid'] = $group_id;
2371
+ $this->custom_fields['adminemail'] = $adminemail;
2372
+ $this->custom_fields['useremail'] = $useremail;
2373
+ $this->custom_fields['username'] = $username;
2374
+ $this->custom_fields['pageurl'] = $current_page_url;
2375
+ $this->custom_fields['formtitle'] = $formtitle;
2376
+
2377
  $label_type = array();
2378
+ $label_all = explode( '#****#', $row->label_order_current );
2379
+ $label_all = array_slice( $label_all, 0, count( $label_all ) - 1 );
2380
  foreach ( $label_all as $key => $label_each ) {
2381
+ $label_id_each = explode( '#**id**#', $label_each );
2382
+ $label_id = $label_id_each[ 0 ];
2383
+ array_push( $label_order_ids, $label_id );
2384
+ $label_order_each = explode( '#**label**#', $label_id_each[ 1 ] );
2385
+ $label_order_original[ $label_id ] = $label_order_each[ 0 ];
2386
+ $label_type[ $label_id ] = $label_order_each[ 1 ];
2387
+ array_push( $label_label, $label_order_each[ 0 ] );
2388
+ array_push( $label_type, $label_order_each[ 1 ] );
2389
  }
2390
+ $disabled_fields = explode( ',', isset( $_REQUEST[ "disabled_fields" . $id ] ) ? $_REQUEST[ "disabled_fields" . $id ] : "" );
2391
+ $disabled_fields = array_slice( $disabled_fields, 0, count( $disabled_fields ) - 1 );
2392
  $list = '<table border="1" cellpadding="3" cellspacing="0" style="width:600px;">';
2393
  $list_text_mode = '';
2394
  foreach ( $label_order_ids as $key => $label_order_id ) {
2395
  $i = $label_order_id;
2396
+ $type = $label_type[ $i ];
2397
  if ( $type != "type_map" and $type != "type_submit_reset" and $type != "type_editor" and $type != "type_captcha" and $type != "type_arithmetic_captcha" and $type != "type_recaptcha" and $type != "type_button" ) {
2398
+ $element_label = $label_order_original[ $i ];
2399
+ if ( !in_array( $i, $disabled_fields ) ) {
2400
  switch ( $type ) {
2401
  case 'type_text':
2402
  case 'type_password':
2406
  case "type_country":
2407
  case "type_number":
2408
  case "type_phone_new": {
2409
+ $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : NULL;
2410
+ if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2411
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>' . $element . '</td></tr>';
2412
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2413
  }
2414
  break;
2415
  }
2416
  case "type_date_range": {
2417
+ $element0 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . "0" ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . "0" ] : NULL;
2418
+ $element1 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . "1" ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . "1" ] : NULL;
2419
+ if ( isset( $element0 ) && $this->empty_field( $element0, $row->mail_emptyfields ) && $this->empty_field( $element1, $row->mail_emptyfields ) ) {
2420
  $element = $element0 . ' - ' . $element1;
2421
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>' . $element . '</td></tr>';
2422
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2424
  break;
2425
  }
2426
  case 'type_textarea': {
2427
+ $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? wpautop( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : NULL;
2428
+ if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2429
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>' . $element . '</td></tr>';
2430
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2431
  }
2432
  break;
2433
  }
2434
  case "type_hidden": {
2435
+ $element = isset( $_POST[ $element_label ] ) ? $_POST[ $element_label ] : NULL;
2436
+ if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2437
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>' . $element . '</td></tr>';
2438
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2439
  }
2440
  break;
2441
  }
2442
  case "type_mark_map": {
2443
+ $element = isset( $_POST[ 'wdform_' . $i . "_long" . $id ] ) ? $_POST[ 'wdform_' . $i . "_long" . $id ] : NULL;
2444
+ if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2445
+ $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>Longitude:' . $element . '<br/>Latitude:' . (isset( $_POST[ 'wdform_' . $i . "_lat" . $id ] ) ? $_POST[ 'wdform_' . $i . "_lat" . $id ] : "") . '</td></tr>';
2446
+ $list_text_mode = $list_text_mode . $element_label . ' - Longitude:' . $element . ' Latitude:' . (isset( $_POST[ 'wdform_' . $i . "_lat" . $id ] ) ? $_POST[ 'wdform_' . $i . "_lat" . $id ] : "") . "\r\n";
2447
  }
2448
  break;
2449
  }
2450
  case "type_submitter_mail": {
2451
+ $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : NULL;
2452
+ if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2453
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
2454
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2455
  }
2456
  break;
2457
  }
2458
  case "type_time": {
2459
+ $hh = isset( $_POST[ 'wdform_' . $i . "_hh" . $id ] ) ? $_POST[ 'wdform_' . $i . "_hh" . $id ] : NULL;
2460
+ if ( isset( $hh ) && ($this->empty_field( $hh, $row->mail_emptyfields ) || $this->empty_field( $_POST[ 'wdform_' . $i . "_mm" . $id ], $row->mail_emptyfields ) || $this->empty_field( $_POST[ 'wdform_' . $i . "_ss" . $id ], $row->mail_emptyfields )) ) {
2461
+ $ss = isset( $_POST[ 'wdform_' . $i . "_ss" . $id ] ) ? $_POST[ 'wdform_' . $i . "_ss" . $id ] : NULL;
2462
+ if ( isset( $ss ) ) {
2463
+ $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $hh . ':' . (isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ? $_POST[ 'wdform_' . $i . "_mm" . $id ] : "") . ':' . $ss;
2464
+ $list_text_mode = $list_text_mode . $element_label . ' - ' . $hh . ':' . (isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ? $_POST[ 'wdform_' . $i . "_mm" . $id ] : "") . ':' . $ss;
2465
+ } else {
2466
+ $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $hh . ':' . (isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ? $_POST[ 'wdform_' . $i . "_mm" . $id ] : "");
2467
+ $list_text_mode = $list_text_mode . $element_label . ' - ' . $hh . ':' . (isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ? $_POST[ 'wdform_' . $i . "_mm" . $id ] : "");
 
2468
  }
2469
+ $am_pm = isset( $_POST[ 'wdform_' . $i . "_am_pm" . $id ] ) ? $_POST[ 'wdform_' . $i . "_am_pm" . $id ] : NULL;
2470
+ if ( isset( $am_pm ) ) {
2471
  $list = $list . ' ' . $am_pm . '</td></tr>';
2472
  $list_text_mode = $list_text_mode . $am_pm . "\r\n";
2473
+ } else {
 
2474
  $list = $list . '</td></tr>';
2475
  $list_text_mode = $list_text_mode . "\r\n";
2476
  }
2478
  break;
2479
  }
2480
  case "type_phone": {
2481
+ $element_first = isset( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_first" . $id ] : NULL;
2482
+ if ( isset( $element_first ) && $this->empty_field( $element_first, $row->mail_emptyfields ) ) {
2483
+ $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element_first . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_last" . $id ] : "") . '</td></tr>';
2484
+ $list_text_mode = $list_text_mode . $element_label . ' - ' . $element_first . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_last" . $id ] : "") . "\r\n";
2485
  }
2486
  break;
2487
  }
2488
  case "type_name": {
2489
+ $element_first = isset( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_first" . $id ] : NULL;
2490
+ if ( isset( $element_first ) ) {
2491
+ $element_title = isset( $_POST[ 'wdform_' . $i . "_element_title" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_title" . $id ] : NULL;
2492
+ $element_middle = isset( $_POST[ 'wdform_' . $i . "_element_middle" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_middle" . $id ] ) : NULL;
2493
+ if ( (isset( $element_title ) || isset( $element_middle )) && ($this->empty_field( $element_title, $row->mail_emptyfields ) || $this->empty_field( $element_first, $row->mail_emptyfields ) || $this->empty_field( $_POST[ 'wdform_' . $i . "_element_last" . $id ], $row->mail_emptyfields ) || $this->empty_field( $_POST[ 'wdform_' . $i . "_element_middle" . $id ], $row->mail_emptyfields )) ) {
2494
+ $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . (isset( $_POST[ 'wdform_' . $i . "_element_title" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_title" . $id ] : '') . ' ' . $element_first . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_last" . $id ] : "") . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_middle" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_middle" . $id ] : "") . '</td></tr>';
2495
+ $list_text_mode = $list_text_mode . $element_label . ' - ' . (isset( $_POST[ 'wdform_' . $i . "_element_title" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_title" . $id ] : '') . ' ' . $element_first . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_last" . $id ] : "") . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_middle" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_middle" . $id ] : "") . "\r\n";
2496
+ } else {
2497
+ if ( $this->empty_field( $element_first, $row->mail_emptyfields ) || $this->empty_field( $_POST[ 'wdform_' . $i . "_element_last" . $id ], $row->mail_emptyfields ) ) {
2498
+ $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element_first . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_last" . $id ] : "") . '</td></tr>';
2499
+ $list_text_mode = $list_text_mode . $element_label . ' - ' . $element_first . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_last" . $id ] : "") . "\r\n";
 
2500
  }
2501
  }
2502
  }
2503
  break;
2504
  }
2505
  case "type_address": {
2506
+ $element = isset( $_POST[ 'wdform_' . $i . "_street1" . $id ] ) ? $_POST[ 'wdform_' . $i . "_street1" . $id ] : NULL;
2507
+ if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2508
+ $list = $list . '<tr valign="top"><td >' . $label_order_original[ $i ] . '</td><td >' . $element . '</td></tr>';
2509
+ $list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
2510
  break;
2511
  }
2512
+ $element = isset( $_POST[ 'wdform_' . $i . "_street2" . $id ] ) ? $_POST[ 'wdform_' . $i . "_street2" . $id ] : NULL;
2513
+ if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2514
+ $list = $list . '<tr valign="top"><td >' . $label_order_original[ $i ] . '</td><td >' . $element . '</td></tr>';
2515
+ $list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
2516
  break;
2517
  }
2518
+ $element = isset( $_POST[ 'wdform_' . $i . "_city" . $id ] ) ? $_POST[ 'wdform_' . $i . "_city" . $id ] : NULL;
2519
+ if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2520
+ $list = $list . '<tr valign="top"><td >' . $label_order_original[ $i ] . '</td><td >' . $element . '</td></tr>';
2521
+ $list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
2522
  break;
2523
  }
2524
+ $element = isset( $_POST[ 'wdform_' . $i . "_state" . $id ] ) ? $_POST[ 'wdform_' . $i . "_state" . $id ] : NULL;
2525
+ if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2526
+ $list = $list . '<tr valign="top"><td >' . $label_order_original[ $i ] . '</td><td >' . $element . '</td></tr>';
2527
+ $list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
2528
  break;
2529
  }
2530
+ $element = isset( $_POST[ 'wdform_' . $i . "_postal" . $id ] ) ? $_POST[ 'wdform_' . $i . "_postal" . $id ] : NULL;
2531
+ if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2532
+ $list = $list . '<tr valign="top"><td >' . $label_order_original[ $i ] . '</td><td >' . $element . '</td></tr>';
2533
+ $list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
2534
  break;
2535
  }
2536
+ $element = isset( $_POST[ 'wdform_' . $i . "_country" . $id ] ) ? $_POST[ 'wdform_' . $i . "_country" . $id ] : NULL;
2537
+ if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2538
+ $list = $list . '<tr valign="top"><td >' . $label_order_original[ $i ] . '</td><td >' . $element . '</td></tr>';
2539
+ $list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
2540
  break;
2541
  }
2542
  break;
2543
  }
2544
  case "type_date_fields": {
2545
+ $day = isset( $_POST[ 'wdform_' . $i . "_day" . $id ] ) ? $_POST[ 'wdform_' . $i . "_day" . $id ] : NULL;
2546
+ $month = isset( $_POST[ 'wdform_' . $i . "_month" . $id ] ) ? $_POST[ 'wdform_' . $i . "_month" . $id ] : "";
2547
+ $year = isset( $_POST[ 'wdform_' . $i . "_year" . $id ] ) ? $_POST[ 'wdform_' . $i . "_year" . $id ] : "";
2548
+ if ( isset( $day ) && $this->empty_field( $day, $row->mail_emptyfields ) ) {
2549
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . (($day || $month || $year) ? $day . '-' . $month . '-' . $year : '') . '</td></tr>';
2550
  $list_text_mode = $list_text_mode . $element_label . (($day || $month || $year) ? $day . '-' . $month . '-' . $year : '') . "\r\n";
2551
  }
2552
  break;
2553
  }
2554
  case "type_radio": {
2555
+ $element = isset( $_POST[ 'wdform_' . $i . "_other_input" . $id ] ) ? $_POST[ 'wdform_' . $i . "_other_input" . $id ] : NULL;
2556
+ if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2557
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
2558
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2559
  break;
2560
  }
2561
+ $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : NULL;
2562
+ if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2563
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
2564
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2565
  }
2568
  case "type_checkbox": {
2569
  $start = -1;
2570
  for ( $j = 0; $j < 100; $j++ ) {
2571
+ $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . $j ] : NULL;
2572
+ if ( isset( $element ) ) {
2573
  $start = $j;
2574
  break;
2575
  }
2576
  }
2577
  $other_element_id = -1;
2578
+ $is_other = isset( $_POST[ 'wdform_' . $i . "_allow_other" . $id ] ) ? $_POST[ 'wdform_' . $i . "_allow_other" . $id ] : "";
2579
  if ( $is_other == "yes" ) {
2580
+ $other_element_id = isset( $_POST[ 'wdform_' . $i . "_allow_other_num" . $id ] ) ? $_POST[ 'wdform_' . $i . "_allow_other_num" . $id ] : "";
2581
  }
2582
  if ( $start != -1 || ($start == -1 && $row->mail_emptyfields) ) {
2583
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >';
2585
  }
2586
  if ( $start != -1 ) {
2587
  for ( $j = $start; $j < 100; $j++ ) {
2588
+ $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . $j ] : NULL;
2589
+ if ( isset( $element ) ) {
2590
  if ( $j == $other_element_id ) {
2591
+ $list = $list . (isset( $_POST[ 'wdform_' . $i . "_other_input" . $id ] ) ? $_POST[ 'wdform_' . $i . "_other_input" . $id ] : "") . '<br>';
2592
+ $list_text_mode = $list_text_mode . (isset( $_POST[ 'wdform_' . $i . "_other_input" . $id ] ) ? $_POST[ 'wdform_' . $i . "_other_input" . $id ] : "") . ', ';
2593
+ } else {
2594
+ $list = $list . (isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . $j ] : "") . '<br>';
2595
+ $list_text_mode = $list_text_mode . (isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . $j ] : "") . ', ';
 
2596
  }
2597
  }
2598
  }
2605
  }
2606
  case "type_paypal_price": {
2607
  $value = 0;
2608
+ if ( isset( $_POST[ 'wdform_' . $i . "_element_dollars" . $id ] ) ) {
2609
+ $value = $_POST[ 'wdform_' . $i . "_element_dollars" . $id ];
2610
  }
2611
+ if ( isset( $_POST[ 'wdform_' . $i . "_element_cents" . $id ] ) && $_POST[ 'wdform_' . $i . "_element_cents" . $id ] ) {
2612
+ $value = $value . '.' . $_POST[ 'wdform_' . $i . "_element_cents" . $id ];
2613
  }
2614
+ if ( $this->empty_field( $value, $row->mail_emptyfields ) && $value != '.' ) {
2615
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $value . $form_currency . '</td></tr>';
2616
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $value . $form_currency . "\r\n";
2617
  }
2619
  }
2620
  case "type_paypal_price_new": {
2621
  $value = 0;
2622
+ if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
2623
+ $value = $_POST[ 'wdform_' . $i . "_element" . $id ];
2624
  }
2625
+ if ( $this->empty_field( $value, $row->mail_emptyfields ) && $value != '.' ) {
2626
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . ($value == '' ? '' : $form_currency) . $value . '</td></tr>';
2627
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $value . $form_currency . "\r\n";
2628
  }
2630
  }
2631
  case "type_paypal_select": {
2632
  $value = '';
2633
+ if ( isset( $_POST[ 'wdform_' . $i . "_element_label" . $id ] ) && $_POST[ 'wdform_' . $i . "_element" . $id ] != '' ) {
2634
+ $value = $_POST[ 'wdform_' . $i . "_element_label" . $id ] . ' : ' . $form_currency . $_POST[ 'wdform_' . $i . "_element" . $id ];
2635
  }
2636
+ $is_element_quantity = isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) ? TRUE : FALSE;
2637
+ $element_quantity_label = (isset( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) && $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ]) ? $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] : NULL;
2638
+ $element_quantity = (isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $i . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] : NULL;
2639
  if ( $value != '' ) {
2640
+ if( $is_element_quantity ) {
2641
+ $value .= '<br/>' . $element_quantity_label . ': ' . (($element_quantity == NULL) ? 0 : $element_quantity);
2642
+ }
2643
+ for ( $k = 0; $k < 50; $k++ ) {
2644
+ $temp_val = isset( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_property" . $id . $k ] : NULL;
2645
+ if ( isset( $temp_val ) ) {
2646
+ $value .= '<br/>' . (isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] : "") . ': ' . $temp_val;
2647
  }
2648
  }
2649
  }
2650
+ if ( $this->empty_field( $value, $row->mail_emptyfields ) ) {
2651
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $value . '</td></tr>';
2652
+ $list_text_mode = $list_text_mode . $element_label . ' - ' . str_replace( '<br/>', ', ', $value ) . "\r\n";
2653
  }
2654
  break;
2655
  }
2656
  case "type_paypal_radio": {
2657
+ $value = '';
2658
+ if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
2659
+ $value = $_POST[ 'wdform_' . $i . "_element_label" . $id ] . ' : ' . $form_currency . (isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : "");
2660
+ $is_element_quantity = isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) ? TRUE : FALSE;
2661
+ $element_quantity_label = isset( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] : NULL;
2662
+ $element_quantity = (isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $i . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] : NULL;
2663
+ if ( !empty($is_element_quantity) ) {
2664
+ $value .= '<br/>' . $element_quantity_label . ': ' . (($element_quantity == NULL) ? 0 : $element_quantity);
2665
+ }
2666
  for ( $k = 0; $k < 50; $k++ ) {
2667
+ $temp_val = isset( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_property" . $id . $k ] : NULL;
2668
+ if ( isset( $temp_val ) ) {
2669
+ $value .= '<br/>' . (isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] : "") . ': ' . $temp_val;
2670
  }
2671
  }
2672
  }
2673
+ if ( $this->empty_field( $value, $row->mail_emptyfields ) ) {
 
 
 
2674
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $value . '</td></tr>';
2675
+ $list_text_mode = $list_text_mode . $element_label . ' - ' . str_replace( '<br/>', ', ', $value ) . "\r\n";
2676
  }
2677
  break;
2678
  }
2679
  case "type_paypal_shipping": {
2680
+ if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
2681
+ $value = $_POST[ 'wdform_' . $i . "_element_label" . $id ] . ' : ' . $form_currency . (isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : "");
2682
+ if ( $this->empty_field( $value, $row->mail_emptyfields ) ) {
2683
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $value . '</td></tr>';
2684
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $value . "\r\n";
2685
  }
2686
+ } else {
 
2687
  $value = '';
2688
  }
2689
  break;
2691
  case "type_paypal_checkbox": {
2692
  $start = -1;
2693
  for ( $j = 0; $j < 300; $j++ ) {
2694
+ $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . $j ] : NULL;
2695
+ if ( isset( $element ) ) {
2696
  $start = $j;
2697
  break;
2698
  }
2699
  }
2700
  if ( $start != -1 || ($start == -1 && $row->mail_emptyfields) ) {
2701
+ $list = $list . '<tr valign="top"><td>' . $element_label . '</td><td>';
2702
  $list_text_mode = $list_text_mode . $element_label . ' - ';
2703
  }
2704
  if ( $start != -1 ) {
2705
  for ( $j = $start; $j < 300; $j++ ) {
2706
+ $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . $j ] : NULL;
2707
+ if ( isset( $element ) ) {
2708
+ $list = $list . (isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j . "_label" ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . $j . "_label" ] : "") . ' - ' . $form_currency . ($element == '' ? '0' : $element) . '<br>';
2709
+ $list_text_mode = $list_text_mode . (isset( $_POST[ 'wdform_' . $i . "_element" . $id . $j . "_label" ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . $j . "_label" ] : "") . ' - ' . ($element == '' ? '0' . $form_currency : $element) . $form_currency . ', ';
2710
  }
2711
  }
2712
  }
2713
+ if ( $start != -1 ) {
2714
+ $is_element_quantity = isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) ? TRUE : FALSE;
2715
+ $element_quantity_label = isset( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] : NULL;
2716
+ $element_quantity = (isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $i . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] : NULL;
2717
+ if ( $is_element_quantity ) {
2718
+ $list = $list . $element_quantity_label . ': ' . (($element_quantity == NULL) ? 0 : $element_quantity);
2719
+ $list_text_mode = $list_text_mode . $element_quantity_label . ': ' . (($element_quantity == NULL) ? 0 : $element_quantity) . ', ';
2720
+ }
2721
  }
2722
+ if ( $start != -1 ) {
2723
+ for ( $k = 0; $k < 50; $k++ ) {
2724
+ $temp_val = isset( $_POST[ 'wdform_' . $i . "_element_property_value" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_element_property_value" . $id . $k ] : NULL;
2725
+ if ( isset( $temp_val ) ) {
2726
+ $list = $list . '<br/>' . (isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] : "") . ': ' . $temp_val;
2727
+ $list_text_mode = $list_text_mode . (isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] : "") . ': ' . $temp_val . ', ';
2728
+ }
2729
  }
2730
  }
2731
  if ( $start != -1 || ($start == -1 && $row->mail_emptyfields) ) {
2735
  break;
2736
  }
2737
  case "type_paypal_total": {
2738
+ $element = isset( $_POST[ 'wdform_' . $i . "_paypal_total" . $id ] ) ? $_POST[ 'wdform_' . $i . "_paypal_total" . $id ] : "";
2739
+ if ( $this->empty_field( $element, $row->mail_emptyfields ) ) {
2740
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
2741
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2742
  }
2743
  break;
2744
  }
2745
  case "type_star_rating": {
2746
+ $element = isset( $_POST[ 'wdform_' . $i . "_star_amount" . $id ] ) ? $_POST[ 'wdform_' . $i . "_star_amount" . $id ] : NULL;
2747
+ $selected = isset( $_POST[ 'wdform_' . $i . "_selected_star_amount" . $id ] ) ? $_POST[ 'wdform_' . $i . "_selected_star_amount" . $id ] : 0;
2748
+ if ( isset( $element ) && $this->empty_field( $selected, $row->mail_emptyfields ) ) {
2749
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $selected . '/' . $element . '</td></tr>';
2750
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $selected . '/' . $element . "\r\n";
2751
  }
2752
  break;
2753
  }
2754
  case "type_scale_rating": {
2755
+ $element = isset( $_POST[ 'wdform_' . $i . "_scale_amount" . $id ] ) ? $_POST[ 'wdform_' . $i . "_scale_amount" . $id ] : NULL;
2756
+ $selected = isset( $_POST[ 'wdform_' . $i . "_scale_radio" . $id ] ) ? $_POST[ 'wdform_' . $i . "_scale_radio" . $id ] : 0;
2757
+ if ( isset( $element ) && $this->empty_field( $selected, $row->mail_emptyfields ) ) {
2758
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $selected . '/' . $element . '</td></tr>';
2759
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $selected . '/' . $element . "\r\n";
2760
  }
2761
  break;
2762
  }
2763
  case "type_spinner": {
2764
+ $element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : NULL;
2765
+ if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2766
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
2767
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2768
  }
2769
  break;
2770
  }
2771
  case "type_slider": {
2772
+ $element = isset( $_POST[ 'wdform_' . $i . "_slider_value" . $id ] ) ? $_POST[ 'wdform_' . $i . "_slider_value" . $id ] : NULL;
2773
+ if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
2774
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
2775
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2776
  }
2777
  break;
2778
  }
2779
  case "type_range": {
2780
+ $element0 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . '0' ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . '0' ] : NULL;
2781
+ $element1 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . '1' ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . '1' ] : NULL;
2782
+ if ( (isset( $element0 ) && $this->empty_field( $element0, $row->mail_emptyfields )) || (isset( $element1 ) && $this->empty_field( $element1, $row->mail_emptyfields )) ) {
2783
+ $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >From: ' . $element0 . '<span style="margin-left:6px"> To </span>:' . $element1 . '</td></tr>';
2784
+ $list_text_mode = $list_text_mode . $element_label . ' - From: ' . $element0 . ' To: ' . $element1 . "\r\n";
2785
  }
2786
  break;
2787
  }
2788
  case "type_grading": {
2789
+ $element = isset( $_POST[ 'wdform_' . $i . "_hidden_item" . $id ] ) ? $_POST[ 'wdform_' . $i . "_hidden_item" . $id ] : "";
2790
+ $grading = explode( ":", $element );
2791
+ $items_count = sizeof( $grading ) - 1;
2792
  $element = "";
2793
+ $total = 0;
2794
+ $form_empty_field = 0;
2795
  for ( $k = 0; $k < $items_count; $k++ ) {
2796
+ $element .= $grading[ $k ] . ": " . (isset( $_POST[ 'wdform_' . $i . "_element" . $id . '_' . $k ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . '_' . $k ] : "") . " ";
2797
+ $total += (isset( $_POST[ 'wdform_' . $i . "_element" . $id . '_' . $k ] ) ? (float) $_POST[ 'wdform_' . $i . "_element" . $id . '_' . $k ] : 0);
2798
+ if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id . '_' . $k ] ) ) {
2799
+ $form_empty_field = 1;
2800
  }
2801
  }
2802
+ $element .= "Total: " . $total;
2803
+ if ( isset( $element ) && $this->empty_field( $form_empty_field, $row->mail_emptyfields ) ) {
2804
+ $list = $list . '<tr valign="top"><td>' . $element_label . '</td><td >' . $element . '</td></tr>';
2805
  $list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
2806
  }
2807
  break;
2808
  }
2809
  case "type_matrix": {
2810
+ $form_empty_field = 0;
2811
+ $input_type = isset( $_POST[ 'wdform_' . $i . "_input_type" . $id ] ) ? $_POST[ 'wdform_' . $i . "_input_type" . $id ] : "";
2812
+ $mat_rows = explode( "***", isset( $_POST[ 'wdform_' . $i . "_hidden_row" . $id ] ) ? $_POST[ 'wdform_' . $i . "_hidden_row" . $id ] : "" );
2813
+ $rows_count = sizeof( $mat_rows ) - 1;
2814
+ $mat_columns = explode( "***", isset( $_POST[ 'wdform_' . $i . "_hidden_column" . $id ] ) ? $_POST[ 'wdform_' . $i . "_hidden_column" . $id ] : "" );
2815
+ $columns_count = sizeof( $mat_columns ) - 1;
2816
  $matrix = "<table>";
2817
  $matrix .= '<tr><td></td>';
2818
+ for ( $k = 1; $k < count( $mat_columns ); $k++ ) {
2819
+ $matrix .= '<td style="background-color:#BBBBBB; padding:5px; ">' . $mat_columns[ $k ] . '</td>';
2820
  }
2821
  $matrix .= '</tr>';
2822
  $aaa = Array();
2823
  for ( $k = 1; $k <= $rows_count; $k++ ) {
2824
+ $matrix .= '<tr><td style="background-color:#BBBBBB; padding:5px;">' . $mat_rows[ $k ] . '</td>';
2825
  if ( $input_type == "radio" ) {
2826
+ $mat_radio = isset( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_input_element" . $id . $k ] : 0;
2827
  if ( $mat_radio == 0 ) {
2828
  $checked = "";
2829
+ $aaa[ 1 ] = "";
2830
+ } else {
2831
+ $aaa = explode( "_", $mat_radio );
 
2832
  }
2833
  for ( $j = 1; $j <= $columns_count; $j++ ) {
2834
+ if ( $aaa[ 1 ] == $j ) {
2835
+ $form_empty_field = 1;
2836
  $checked = "checked";
2837
+ } else {
 
2838
  $checked = "";
2839
  }
2840
  $sign = $checked == 'checked' ? '&#10004;' : '';
2841
  $matrix .= '<td style="text-align:center">' . $sign . '</td>';
2842
  }
2843
+ } else {
 
2844
  if ( $input_type == "checkbox" ) {
2845
  for ( $j = 1; $j <= $columns_count; $j++ ) {
2846
+ $checked = isset( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k . '_' . $j ] ) ? $_POST[ 'wdform_' . $i . "_input_element" . $id . $k . '_' . $j ] : "";
2847
  if ( $checked == 1 ) {
2848
+ $form_empty_field = 1;
2849
  $checked = "checked";
2850
+ } else {
 
2851
  $checked = "";
2852
  }
2853
  $sign = $checked == 'checked' ? '&#10004;' : '';
2854
  $matrix .= '<td style="text-align:center">' . $sign . '</td>';
2855
  }
2856
+ } else {
 
2857
  if ( $input_type == "text" ) {
2858
  for ( $j = 1; $j <= $columns_count; $j++ ) {
2859
+ $checked = isset( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k . '_' . $j ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k . '_' . $j ] ) : "";
2860
+ if ( $checked ) {
2861
+ $form_empty_field = 1;
2862
+ }
2863
  $matrix .= '<td style="text-align:center">' . $checked . '</td>';
2864
  }
2865
+ } else {
 
2866
  for ( $j = 1; $j <= $columns_count; $j++ ) {
2867
+ $checked = isset( $_POST[ 'wdform_' . $i . "_select_yes_no" . $id . $k . '_' . $j ] ) ? $_POST[ 'wdform_' . $i . "_select_yes_no" . $id . $k . '_' . $j ] : "";
2868
+ if ( $checked ) {
2869
+ $form_empty_field = 1;
2870
+ }
2871
  $matrix .= '<td style="text-align:center">' . $checked . '</td>';
2872
  }
2873
  }
2876
  $matrix .= '</tr>';
2877
  }
2878
  $matrix .= '</table>';
2879
+ if ( isset( $matrix ) && $this->empty_field( $form_empty_field, $row->mail_emptyfields ) ) {
2880
  $list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $matrix . '</td></tr>';
2881
  }
2882
  break;
2888
  }
2889
  }
2890
  $list = $list . '</table>';
2891
+ // User part.
2892
  if ( $row->sendemail ) {
2893
  $fromname = $row->mail_from_name_user;
2894
+ $subject = !empty( $row->mail_subject_user ) ? $row->mail_subject_user : $row->title;
 
 
 
 
 
2895
  $attachment_user = array();
2896
  if ( !WDFM()->is_demo ) {
2897
+ for ( $k = 0; $k < count( $all_files ); $k++ ) {
2898
+ if ( isset( $all_files[ $k ][ 'tmp_name' ] ) ) {
2899
+ if ( !isset( $attachment_user[ $all_files[ $k ][ 'field_key' ] ] ) ) {
2900
+ $attachment_user[ $all_files[ $k ][ 'field_key' ] ] = array();
2901
  }
 
2902
  $file_name = $all_files[$k]['tmp_name'];
2903
+ if ( $row->save_uploads == 1 ) {
2904
+ $basedir = str_replace( site_url() .'/', '', $upload_dir['baseurl'] );
2905
+ $file = $basedir . $file_name;
2906
+ } else {
2907
+ $file = $file_name;
2908
+ }
2909
  array_push($attachment_user[$all_files[$k]['field_key']], $file);
2910
  }
2911
  }
2912
  }
2913
+
2914
  if ( $row->mail_mode_user ) {
2915
  $content_type = "text/html";
2916
+ $list_user = wordwrap( $list, 100, "\n", TRUE );
2917
+ $new_script = wpautop( $row->script_mail_user );
2918
+ } else {
 
2919
  $content_type = "text/plain";
2920
+ $list_user = wordwrap( $list_text_mode, 1000, "\n", TRUE );
2921
+ $new_script = str_replace( array( '<p>', '</p>' ), '', $row->script_mail_user );
2922
  }
2923
  foreach ( $label_order_original as $key => $label_each ) {
2924
+ $type = $label_type[ $key ];
2925
  $key1 = $type == 'type_hidden' ? $label_each : $key;
2926
+ $label_each_decoded = htmlspecialchars_decode( $label_each );
2927
+ $new_value = $this->custom_fields_mail( $type, $key1, $id, $attachment_user, $form_currency );
2928
+ $key_replace = array( '%' . $label_each_decoded . '%', '{' . $key . '}' );
2929
+
2930
+ $new_script = str_replace( $key_replace, $new_value, $new_script );
2931
+
2932
+ if ( $type == "type_file_upload" ) {
2933
+ $new_value = $this->custom_fields_mail( $type, $key, $id, $attachment_user, $form_currency, 1 );
2934
+ $new_script = str_replace( array( '%' . $label_each_decoded . '(link)%', '{' . $key . '(link)}' ), $new_value, $new_script );
2935
  }
2936
+ // Set from name value.
2937
+ if ( strpos( $fromname, '{' . $key . '}' ) > -1 || strpos( $fromname, '%' . $label_each . '%' ) > -1 ) {
2938
+ $new_value = str_replace( '<br>', ', ', $this->custom_fields_mail( $type, $key, $id, '', '' ) );
2939
+ if ( substr( $new_value, -2 ) == ', ' ) {
2940
+ $new_value = substr( $new_value, 0, -2 );
2941
  }
2942
+ $fromname = str_replace( array( '%' . $label_each . '%', '{' . $key . '}' ), $new_value, $fromname );
2943
  }
2944
+ // Set subject value.
2945
+ if ( (strpos( $subject, "{" . $key . "}" ) > -1) || (strpos( $subject, "%" . $label_each . "%" ) > -1) ) {
2946
+ $new_value = str_replace( '<br>', ', ', $this->custom_fields_mail( $type, $key1, $id, '', $form_currency ) );
2947
+ if ( substr( $new_value, -2 ) == ', ' ) {
2948
+ $new_value = substr( $new_value, 0, -2 );
2949
  }
2950
+
2951
+ $subject = str_replace( array( '%' . $label_each . '%', '{' . $key . '}' ), $new_value, $subject );
2952
  }
2953
  }
2954
+ $this->custom_fields['all'] = $list_user;
2955
 
2956
+ foreach ( $this->custom_fields as $key => $custom_field ) {
2957
+ $new_script = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $new_script );
2958
+ $fromname = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $fromname );
2959
+ $subject = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $subject );
2960
+ }
2961
 
2962
+ $header_arr = array();
2963
  if ( $row->mail_from_user != '' ) {
2964
+ $header_arr[ 'from' ] = $row->mail_from_user;
2965
  }
2966
  $header_arr['from_name'] = $fromname;
2967
  $header_arr['content_type'] = $content_type;
2970
  $header_arr['cc'] = $row->mail_cc_user;
2971
  $header_arr['bcc'] = $row->mail_bcc_user;
2972
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2973
  $body = $new_script;
2974
+ $pdf_data = array('attach_to_admin' => 0, 'attach_to_user' => 0, 'pdf_url' => '');
2975
+ if ( WDFM()->is_free != 2 ) {
2976
+ $pdf_data = apply_filters( 'fm_pdf_data_frontend', $pdf_data, array( 'custom_fields' => $this->custom_fields, 'form_id' => $id ) );
 
2977
  }
2978
+ if ( $pdf_data['attach_to_user'] ) {
2979
+ array_push( $attachment_user, $pdf_data['pdf_url'] );
2980
  }
2981
+
2982
  if ( $row->send_to ) {
2983
+ $send_tos = explode( '**', $row->send_to );
2984
+ $send_copy = isset( $_POST[ "wdform_send_copy_" . $id ] ) ? $_POST[ "wdform_send_copy_" . $id ] : NULL;
2985
+ if ( isset( $send_copy ) ) {
2986
  $send = TRUE;
2987
+ } else {
2988
+ $mail_verification_post_id = (int)$wpdb->get_var( $wpdb->prepare( 'SELECT mail_verification_post_id FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id ) );
2989
+ $verification_link = get_post( $mail_verification_post_id );
2990
+
2991
+ // Replace pdf link in email body.
2992
+ $body = str_replace( '{PDF(link)}', site_url($pdf_data['pdf_url']), $body );
2993
+
2994
  foreach ( $send_tos as $index => $send_to ) {
2995
+ $send_to = str_replace( '*', '', $send_to );
2996
+ if ( $row->mail_verify && $verification_link !== NULL && (strpos( $new_script, "{verificationlink}" ) > -1 || strpos( $new_script, "%Verification link%" ) > -1) ) {
2997
+ $ver_link = $row->mail_mode_user ? "<a href =" . add_query_arg( array(
2998
+ 'gid' => $_SESSION[ 'gid' ],
2999
+ 'h' => $_SESSION[ 'hash' ][ $index ] . '@' . $send_to,
3000
+ ), get_post_permalink( $mail_verification_post_id ) ) . ">" . add_query_arg( array(
3001
+ 'gid' => $_SESSION[ 'gid' ],
3002
+ 'h' => $_SESSION[ 'hash' ][ $index ] . '@' . $send_to,
3003
+ ), get_post_permalink( $mail_verification_post_id ) ) . "</a><br/>" : add_query_arg( array(
3004
+ 'gid' => $_SESSION[ 'gid' ],
3005
+ 'h' => $_SESSION[ 'hash' ][ $index ] . '@' . $send_to,
3006
+ ), get_post_permalink( $mail_verification_post_id ) );
3007
+ $body = str_replace( array( '%Verification link%', '{verificationlink}' ), $ver_link, $new_script );
3008
+ }
3009
+
3010
+ $recipient = isset( $_POST[ 'wdform_' . str_replace( '*', '', $send_to ) . "_element" . $id ] ) ? $_POST[ 'wdform_' . $send_to . "_element" . $id ] : NULL;
3011
  if ( $recipient ) {
3012
  if ( $row->mail_attachment_user ) {
3013
+ $remove_parrent_array_user = new RecursiveIteratorIterator( new RecursiveArrayIterator( $attachment_user ) );
3014
+ $attachment_user = iterator_to_array( $remove_parrent_array_user, FALSE );
3015
+ } else {
 
3016
  $attachment_user = array();
3017
  }
3018
+ WDW_FM_Library::mail( $recipient, $subject, $body, $header_arr, $attachment_user );
3019
  }
3020
  }
3021
  }
3022
  }
3023
  }
3024
+ // Admin part.
3025
  if ( $row->sendemail ) {
3026
  $recipient = $row->mail ? $row->mail : '';
3027
+ $subject = !empty( $row->mail_subject ) ? $row->mail_subject : $row->title;
 
3028
 
3029
  $fromname = $row->from_name;
3030
  $attachment = array();
3031
  if ( !WDFM()->is_demo ) {
3032
+ for ( $k = 0; $k < count( $all_files ); $k++ ) {
3033
+ if ( isset( $all_files[ $k ][ 'tmp_name' ] ) ) {
3034
+ if ( !isset( $attachment[ $all_files[ $k ][ 'field_key' ] ] ) ) {
3035
+ $attachment[ $all_files[ $k ][ 'field_key' ] ] = array();
3036
  }
 
3037
  $file_name = $all_files[$k]['tmp_name'];
3038
+ if( $save_uploads == 1 ) {
3039
+ $basedir = str_replace(site_url() . '/', '', $upload_dir['baseurl']);
3040
+ $file = $basedir . $file_name;
3041
+ } else {
3042
+ $file = $file_name;
3043
+ }
3044
+ array_push( $attachment[ $all_files[ $k ][ 'field_key' ] ], $file );
3045
  }
3046
  }
3047
  }
3048
+ if ( $pdf_data['attach_to_admin'] ) {
3049
+ array_push( $attachment, $pdf_data['pdf_url'] );
3050
  }
3051
  if ( $row->mail_mode ) {
3052
  $content_type = "text/html";
3053
+ $list = wordwrap( $list, 100, "\n", TRUE );
3054
+ $new_script = wpautop( $row->script_mail );
3055
+ } else {
 
3056
  $content_type = "text/plain";
3057
  $list = $list_text_mode;
3058
+ $list = wordwrap( $list, 1000, "\n", TRUE );
3059
+ $new_script = str_replace( array( '<p>', '</p>' ), '', $row->script_mail );
3060
  }
3061
+
3062
  $header_arr = array();
3063
  foreach ( $label_order_original as $key => $label_each ) {
3064
+ $type = $label_type[ $key ];
3065
  $key1 = $type == 'type_hidden' ? $label_each : $key;
3066
+ $label_each_decoded = htmlspecialchars_decode( $label_each );
3067
+ $key_replace = array( '%' . $label_each_decoded . '%', '{' . $key . '}' );
3068
+
3069
+ $new_value = $this->custom_fields_mail( $type, $key1, $id, $attachment, $form_currency );
3070
+ $new_script = str_replace( $key_replace, $new_value, $new_script );
3071
+
3072
+ if ( $type == "type_file_upload" ) {
3073
+ $new_value = $this->custom_fields_mail( $type, $key, $id, $attachment, $form_currency, 1 );
3074
+ $new_script = str_replace( array( '%' . $label_each_decoded . '(link)%', '{' . $key . '(link)}' ), $new_value, $new_script );
3075
  }
3076
+ if ( strpos( $fromname, "{" . $key . "}" ) > -1 || strpos( $fromname, "%" . $label_each . "%" ) > -1 ) {
3077
+ $new_value = str_replace( '<br>', ', ', $this->custom_fields_mail( $type, $key, $id, '', $form_currency ) );
3078
+ if ( substr( $new_value, -2 ) == ', ' ) {
3079
+ $new_value = substr( $new_value, 0, -2 );
3080
  }
3081
+ $fromname = str_replace( array( '%' . $label_each . '%', '{' . $key . '}' ), $new_value, $fromname );
3082
  }
3083
+ if ( strpos( $fromname, "{" . $key . "}" ) > -1 || strpos( $fromname, "%username%" ) > -1 ) {
3084
+ $fromname = str_replace( array( '%' . $username . '%', '{' . $key . '}' ), $username, $fromname );
3085
  }
3086
+ if ( strpos( $subject, "{" . $key . "}" ) > -1 || strpos( $subject, "%" . $label_each . "%" ) > -1 ) {
3087
+ $new_value = str_replace( '<br>', ', ', $this->custom_fields_mail( $type, $key1, $id, '', $form_currency ) );
3088
+ if ( substr( $new_value, -2 ) == ', ' ) {
3089
+ $new_value = substr( $new_value, 0, -2 );
3090
  }
3091
+ $subject = str_replace( array( '%' . $label_each . '%', '{' . $key . '}' ), $new_value, $subject );
3092
  }
3093
  }
3094
+ $this->custom_fields['all'] = $list;
3095
+
3096
+ foreach ( $this->custom_fields as $key => $custom_field ) {
3097
+ $new_script = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $new_script );
3098
+ $recipient = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $recipient);
3099
+ $fromname = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $fromname );
3100
+ $subject = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $subject );
3101
+ }
3102
  if ( $row->from_mail ) {
3103
+ $header_arr[ 'from' ] = isset( $_POST['wdform_' . $row->from_mail . "_element" . $id] ) ? $_POST['wdform_' . $row->from_mail . "_element" . $id] : $row->from_mail;
3104
  }
3105
  $header_arr['from_name'] = $fromname;
3106
  $header_arr['content_type'] = $content_type;
3107
  $header_arr['charset'] = 'UTF-8';
3108
+ $header_arr['reply_to'] = isset( $_POST['wdform_' . $row->reply_to . "_element" . $id] ) ? $_POST['wdform_' . $row->reply_to . "_element" . $id] : $row->reply_to;
3109
  $header_arr['cc'] = $row->mail_cc;
3110
  $header_arr['bcc'] = $row->mail_bcc;
3111
+
 
 
 
 
 
 
 
 
 
 
 
 
 
3112
  $admin_body = $new_script;
3113
  if ( $row->mail_attachment ) {
3114
+ $remove_parrent_array = new RecursiveIteratorIterator( new RecursiveArrayIterator( $attachment ) );
3115
+ $attachment = iterator_to_array( $remove_parrent_array, FALSE );
3116
+ } else {
 
3117
  $attachment = array();
3118
  }
3119
 
3120
+ // Replace pdf link in email body.
3121
+ $admin_body = str_replace( '{PDF(link)}', site_url($pdf_data['pdf_url']), $admin_body );
3122
+
3123
+ $send = WDW_FM_Library::mail( $recipient, $subject, $admin_body, $header_arr, $attachment );
3124
  }
3125
+ $_SESSION[ 'error_or_no' . $id ] = 0;
3126
+ $msg = addslashes( __( 'Your form was successfully submitted.', WDFM()->prefix ) );
3127
  if ( $row->sendemail ) {
3128
  if ( $row->mail || $row->send_to ) {
3129
  if ( $send ) {
3130
  if ( $send !== TRUE ) {
3131
+ $_SESSION[ 'error_or_no' . $id ] = 1;
3132
+ $msg = addslashes( __( 'Error, email was not sent.', WDFM()->prefix ) );
3133
+ } else {
3134
+ $_SESSION[ 'error_or_no' . $id ] = 0;
3135
+ $msg = addslashes( __( 'Your form was successfully submitted.', WDFM()->prefix ) );
 
3136
  }
3137
  }
3138
  }
3139
  }
3140
 
3141
  // Add-on conditional email
3142
+ if ( WDFM()->is_free != 2 ) {
3143
+ $fm_email_params = $row->sendemail ? array(
3144
+ 'admin_body' => $admin_body,
3145
+ 'body' => $body,
3146
+ 'subject' => $subject,
3147
+ 'headers' => $header_arr,
3148
+ 'attachment' => $attachment,
3149
+ 'attachment_user' => $attachment_user,
3150
+ ) : array();
3151
+ /*
3152
+ * TODO. Need 'custom_fields_value' key. They work with it old conditional-emails.
3153
+ */
3154
+ $custom_fields_value = array( $this->custom_fields['ip'], $this->custom_fields['useremail'], $this->custom_fields['username'], $this->custom_fields['subid'], $this->custom_fields['all'] );
3155
+ $params = array(
3156
+ 'form_id' => $id,
3157
+ 'fm_email_params' => $fm_email_params,
3158
+ 'form_currency' => $form_currency,
3159
+ 'custom_fields' => $this->custom_fields,
3160
+ 'custom_fields_value' => $custom_fields_value
3161
+ );
3162
+ do_action( 'fm_set_params_frontend_init', $params );
3163
  }
3164
  // delete files from uploads (save_upload = 0)
3165
  if ( $row->save_uploads == 0 ) {
3166
  foreach ( $all_files as &$all_file ) {
3167
+ if ( file_exists( $all_file[ 'tmp_name' ] ) ) {
3168
+ unlink( $all_file[ 'tmp_name' ] );
3169
  }
3170
  }
3171
  }
3172
+
3173
+ $_SESSION[ 'form_submit_type' . $id ] = $row->submit_text_type . ',' . $row->id . ',' . $group_id;
3174
+
3175
+ $https = ((isset( $_SERVER[ 'HTTPS' ] ) && $_SERVER[ 'HTTPS' ] == 'on') ? 'https://' : 'http://');
3176
+ $redirect_url = $https . $_SERVER[ "HTTP_HOST" ] . $_SERVER[ "REQUEST_URI" ];
3177
+ if ( $row->submit_text_type == 4 ) {
3178
+ // Action after submission: URL.
3179
+ $redirect_url = $row->url;
3180
+ }
3181
+ elseif ( $row->article_id && ($row->submit_text_type == 2 || $row->submit_text_type == 5) ) {
3182
+ // Action after submission: Post/page.
3183
+ $redirect_url = $row->article_id;
3184
+ }
3185
+
3186
  if ( $row->submit_text_type != 4 ) {
3187
+ $_SESSION[ 'massage_after_submit' . $id ] = $msg;
3188
  if ( $row->type == 'popover' || $row->type == 'topbar' || $row->type == 'scrollbox' ) {
3189
+ $_SESSION[ 'fm_hide_form_after_submit' . $id ] = 1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3190
  }
3191
  }
3192
+
3193
  if ( !$str ) {
3194
+ wp_redirect( html_entity_decode( $redirect_url ) );
3195
  exit;
3196
  }
3197
  else {
3198
+ $_SESSION[ 'redirect_paypal' . $id ] = 1;
3199
+ $str .= "&return=" . urlencode( add_query_arg( array( 'succes' => time() ), $redirect_url ) );
3200
+ wp_redirect( $str );
3201
  exit;
3202
  }
3203
  }
3225
  case "type_own_select":
3226
  case "type_country":
3227
  case "type_number": {
3228
+ $element = isset( $_POST[ 'wdform_' . $key . "_element" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id ] : NULL;
3229
+ if ( isset( $element ) ) {
3230
  $new_value = $element;
3231
  }
3232
  break;
3233
  }
3234
  case 'type_date_range' : {
3235
+ $element0 = isset( $_POST[ 'wdform_' . $key . "_element" . $id . "0" ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id . "0" ] : NULL;
3236
+ $element1 = isset( $_POST[ 'wdform_' . $key . "_element" . $id . "1" ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id . "1" ] : NULL;
3237
  $element = $element0 . ' - ' . $element1;
3238
  $new_value = $element;
3239
  }
3240
  case "type_file_upload": {
3241
+ if ( isset( $attachment[ $key ] ) ) {
3242
+ foreach ( $attachment[ $key ] as $attach ) {
3243
+ $uploadedFileNameParts = explode( '.', $attach );
3244
+ $uploadedFileExtension = array_pop( $uploadedFileNameParts );
3245
+ $file_name = explode( '/', $attach );
3246
+ $file_name = end( $file_name );
3247
  if ( $file_upload_link == 1 ) {
3248
  $new_value .= '<a href="' . site_url() . '/' . $attach . '"/>' . $file_name . '</a><br />';
3249
+ } else {
 
3250
  $invalidFileExts = array(
3251
  'gif',
3252
  'jpg',
3267
  );
3268
  $extOk = FALSE;
3269
  foreach ( $invalidFileExts as $key => $valuee ) {
3270
+ if ( is_numeric( strpos( strtolower( $valuee ), strtolower( $uploadedFileExtension ) ) ) ) {
3271
  $extOk = TRUE;
3272
  }
3273
  }
3280
  break;
3281
  }
3282
  case "type_hidden": {
3283
+ $element = isset( $_POST[ $key ] ) ? $_POST[ $key ] : NULL;
3284
+ if ( isset( $element ) ) {
3285
  $new_value = $element;
3286
  }
3287
  break;
3288
  }
3289
  case "type_mark_map": {
3290
+ $element = isset( $_POST[ 'wdform_' . $key . "_long" . $id ] ) ? $_POST[ 'wdform_' . $key . "_long" . $id ] : NULL;
3291
+ if ( isset( $element ) ) {
3292
+ $new_value = 'Longitude:' . $element . '<br/>Latitude:' . (isset( $_POST[ 'wdform_' . $key . "_lat" . $id ] ) ? $_POST[ 'wdform_' . $key . "_lat" . $id ] : "");
3293
  }
3294
  break;
3295
  }
3296
  case "type_submitter_mail": {
3297
+ $element = isset( $_POST[ 'wdform_' . $key . "_element" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id ] : NULL;
3298
+ if ( isset( $element ) ) {
3299
  $new_value = $element;
3300
  }
3301
  break;
3302
  }
3303
  case "type_time": {
3304
+ $hh = isset( $_POST[ 'wdform_' . $key . "_hh" . $id ] ) ? $_POST[ 'wdform_' . $key . "_hh" . $id ] : NULL;
3305
+ if ( isset( $hh ) ) {
3306
+ $ss = isset( $_POST[ 'wdform_' . $key . "_ss" . $id ] ) ? $_POST[ 'wdform_' . $key . "_ss" . $id ] : NULL;
3307
+ if ( isset( $ss ) ) {
3308
+ $new_value = $hh . ':' . (isset( $_POST[ 'wdform_' . $key . "_mm" . $id ] ) ? $_POST[ 'wdform_' . $key . "_mm" . $id ] : "") . ':' . $ss;
3309
+ } else {
3310
+ $new_value = $hh . ':' . (isset( $_POST[ 'wdform_' . $key . "_mm" . $id ] ) ? $_POST[ 'wdform_' . $key . "_mm" . $id ] : "");
3311
+ }
3312
+ $am_pm = isset( $_POST[ 'wdform_' . $key . "_am_pm" . $id ] ) ? $_POST[ 'wdform_' . $key . "_am_pm" . $id ] : NULL;
3313
+ if ( isset( $am_pm ) ) {
 
3314
  $new_value = $new_value . ' ' . $am_pm;
3315
  }
3316
  }
3317
  break;
3318
  }
3319
  case "type_phone": {
3320
+ $element_first = isset( $_POST[ 'wdform_' . $key . "_element_first" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_first" . $id ] : NULL;
3321
+ if ( isset( $element_first ) ) {
3322
+ $new_value = $element_first . ' ' . (isset( $_POST[ 'wdform_' . $key . "_element_last" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_last" . $id ] : "");
3323
  }
3324
  break;
3325
  }
3326
  case "type_name": {
3327
+ $element_first = isset( $_POST[ 'wdform_' . $key . "_element_first" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_first" . $id ] : NULL;
3328
+ if ( isset( $element_first ) ) {
3329
+ $element_title = isset( $_POST[ 'wdform_' . $key . "_element_title" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_title" . $id ] : NULL;
3330
+ if ( isset( $element_title ) ) {
3331
+ $new_value = $element_title . ' ' . $element_first . ' ' . (isset( $_POST[ 'wdform_' . $key . "_element_last" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_last" . $id ] : "") . ' ' . (isset( $_POST[ 'wdform_' . $key . "_element_middle" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_middle" . $id ] : "");
3332
+ } else {
3333
+ $new_value = $element_first . ' ' . (isset( $_POST[ 'wdform_' . $key . "_element_last" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_last" . $id ] : "");
 
3334
  }
3335
  }
3336
  break;
3337
  }
3338
  case "type_address": {
3339
+ $street1 = isset( $_POST[ 'wdform_' . $key . "_street1" . $id ] ) ? $_POST[ 'wdform_' . $key . "_street1" . $id ] : NULL;
3340
+ if ( isset( $street1 ) ) {
3341
  $new_value = $street1;
3342
  break;
3343
  }
3344
+ $street2 = isset( $_POST[ 'wdform_' . $key . "_street2" . $id ] ) ? $_POST[ 'wdform_' . $key . "_street2" . $id ] : NULL;
3345
+ if ( isset( $street2 ) ) {
3346
  $new_value = $street2;
3347
  break;
3348
  }
3349
+ $city = isset( $_POST[ 'wdform_' . $key . "_city" . $id ] ) ? $_POST[ 'wdform_' . $key . "_city" . $id ] : NULL;
3350
+ if ( isset( $city ) ) {
3351
  $new_value = $city;
3352
  break;
3353
  }
3354
+ $state = isset( $_POST[ 'wdform_' . $key . "_state" . $id ] ) ? $_POST[ 'wdform_' . $key . "_state" . $id ] : NULL;
3355
+ if ( isset( $state ) ) {
3356
  $new_value = $state;
3357
  break;
3358
  }
3359
+ $postal = isset( $_POST[ 'wdform_' . $key . "_postal" . $id ] ) ? $_POST[ 'wdform_' . $key . "_postal" . $id ] : NULL;
3360
+ if ( isset( $postal ) ) {
3361
  $new_value = $postal;
3362
  break;
3363
  }
3364
+ $country = isset( $_POST[ 'wdform_' . $key . "_country" . $id ] ) ? $_POST[ 'wdform_' . $key . "_country" . $id ] : NULL;
3365
+ if ( isset( $country ) ) {
3366
  $new_value = $country;
3367
  break;
3368
  }
3369
  break;
3370
  }
3371
  case "type_date_fields": {
3372
+ $day = isset( $_POST[ 'wdform_' . $key . "_day" . $id ] ) ? $_POST[ 'wdform_' . $key . "_day" . $id ] : NULL;
3373
+ if ( isset( $day ) ) {
3374
+ $new_value = $day . '-' . (isset( $_POST[ 'wdform_' . $key . "_month" . $id ] ) ? $_POST[ 'wdform_' . $key . "_month" . $id ] : "") . '-' . (isset( $_POST[ 'wdform_' . $key . "_year" . $id ] ) ? $_POST[ 'wdform_' . $key . "_year" . $id ] : "");
3375
  }
3376
  break;
3377
  }
3378
  case "type_radio": {
3379
+ $element = isset( $_POST[ 'wdform_' . $key . "_other_input" . $id ] ) ? $_POST[ 'wdform_' . $key . "_other_input" . $id ] : NULL;
3380
+ if ( isset( $element ) ) {
3381
  $new_value = $element;
3382
  break;
3383
  }
3384
+ $element = isset( $_POST[ 'wdform_' . $key . "_element" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id ] : NULL;
3385
+ if ( isset( $element ) ) {
3386
  $new_value = $element;
3387
  }
3388
  break;
3390
  case "type_checkbox": {
3391
  $start = -1;
3392
  for ( $j = 0; $j < 100; $j++ ) {
3393
+ $element = isset( $_POST[ 'wdform_' . $key . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id . $j ] : NULL;
3394
+ if ( isset( $element ) ) {
3395
  $start = $j;
3396
  break;
3397
  }
3398
  }
3399
  $other_element_id = -1;
3400
+ $is_other = isset( $_POST[ 'wdform_' . $key . "_allow_other" . $id ] ) ? $_POST[ 'wdform_' . $key . "_allow_other" . $id ] : "";
3401
  if ( $is_other == "yes" ) {
3402
+ $other_element_id = isset( $_POST[ 'wdform_' . $key . "_allow_other_num" . $id ] ) ? $_POST[ 'wdform_' . $key . "_allow_other_num" . $id ] : "";
3403
  }
3404
  if ( $start != -1 ) {
3405
  for ( $j = $start; $j < 100; $j++ ) {
3406
+ $element = isset( $_POST[ 'wdform_' . $key . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id . $j ] : NULL;
3407
+ if ( isset( $element ) ) {
3408
  if ( $j == $other_element_id ) {
3409
+ $new_value = $new_value . (isset( $_POST[ 'wdform_' . $key . "_other_input" . $id ] ) ? $_POST[ 'wdform_' . $key . "_other_input" . $id ] : "") . '<br>';
3410
+ } else {
 
3411
  $new_value = $new_value . $element . '<br>';
3412
  }
3413
  }
3417
  }
3418
  case "type_paypal_price": {
3419
  $new_value = 0;
3420
+ if ( isset( $_POST[ 'wdform_' . $key . "_element_dollars" . $id ] ) ) {
3421
+ $new_value = $_POST[ 'wdform_' . $key . "_element_dollars" . $id ];
3422
  }
3423
+ if ( isset( $_POST[ 'wdform_' . $key . "_element_cents" . $id ] ) ) {
3424
+ $new_value = $new_value . '.' . $_POST[ 'wdform_' . $key . "_element_cents" . $id ];
3425
  }
3426
  $new_value = $new_value . $form_currency;
3427
  break;
3428
  }
3429
  case "type_paypal_price_new": {
3430
  $new_value = '';
3431
+ if ( isset( $_POST[ 'wdform_' . $key . "_element" . $id ] ) && $_POST[ 'wdform_' . $key . "_element" . $id ] ) {
3432
+ $new_value = $form_currency . $_POST[ 'wdform_' . $key . "_element" . $id ];
3433
  }
3434
  $new_value = $new_value;
3435
  break;
3436
  }
3437
  case "type_paypal_select": {
3438
+ $element = isset( $_POST[ 'wdform_' . $key . "_element" . $id ] ) && $_POST[ 'wdform_' . $key . "_element" . $id ] ? $_POST[ 'wdform_' . $key . "_element" . $id ] : '';
3439
  if ( $element ) {
3440
+ $new_value = (isset( $_POST[ 'wdform_' . $key . "_element_label" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_label" . $id ] : "") . ' : ' . $form_currency . $element;
3441
+ $is_element_quantity = isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) ? TRUE : FALSE;
3442
+ $element_quantity_label = isset( $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] : NULL;
3443
+ $element_quantity = (isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $key . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] : NULL;
3444
+ if ( $is_element_quantity ) {
3445
+ $new_value .= '<br/>' . $element_quantity_label . ': ' . ( !(empty($element_quantity)) ? $element_quantity : 0);
3446
  }
3447
+ for ( $k = 0; $k < 50; $k++ ) {
3448
+ $temp_val = isset( $_POST[ 'wdform_' . $key . "_property" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_property" . $id . $k ] : NULL;
3449
+ if ( isset( $temp_val ) ) {
3450
+ $new_value .= '<br/>' . (isset( $_POST[ 'wdform_' . $key . "_element_property_label" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_element_property_label" . $id . $k ] : "") . ': ' . $temp_val;
3451
  }
3452
  }
3453
  }
3454
  break;
3455
  }
3456
  case "type_paypal_radio": {
3457
+ $new_value = (isset( $_POST[ 'wdform_' . $key . "_element_label" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_label" . $id ] : "") . (isset( $_POST[ 'wdform_' . $key . "_element" . $id ] ) && $_POST[ 'wdform_' . $key . "_element" . $id ] ? ' - ' . $form_currency . $_POST[ 'wdform_' . $key . "_element" . $id ] : "");
3458
+ $is_element_quantity = isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) ? TRUE : FALSE;
3459
+ $element_quantity_label = isset( $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] : NULL;
3460
+ $element_quantity = ( isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $key . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] : NULL;
3461
+ if ( $is_element_quantity ) {
3462
+ $new_value .= '<br/>'. $element_quantity_label . ': ' . ( (!empty($element_quantity)) ? $element_quantity : 0 );
3463
+ }
3464
  for ( $k = 0; $k < 50; $k++ ) {
3465
+ $temp_val = isset( $_POST[ 'wdform_' . $key . "_property" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_property" . $id . $k ] : NULL;
3466
+ if ( isset( $temp_val ) ) {
3467
+ $new_value .= '<br/>' . (isset( $_POST[ 'wdform_' . $key . "_element_property_label" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_element_property_label" . $id . $k ] : "") . ': ' . $temp_val;
3468
  }
3469
  }
3470
  break;
3471
  }
3472
  case "type_paypal_shipping": {
3473
+ $new_value = (isset( $_POST[ 'wdform_' . $key . "_element_label" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_label" . $id ] : "") . (isset( $_POST[ 'wdform_' . $key . "_element" . $id ] ) && $_POST[ 'wdform_' . $key . "_element" . $id ] ? ' : ' . $form_currency . $_POST[ 'wdform_' . $key . "_element" . $id ] : "");
3474
  break;
3475
  }
3476
  case "type_paypal_checkbox": {
3477
  $start = -1;
3478
  for ( $j = 0; $j < 100; $j++ ) {
3479
+ $element = isset( $_POST[ 'wdform_' . $key . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id . $j ] : NULL;
3480
+ if ( isset( $element ) ) {
3481
  $start = $j;
3482
  break;
3483
  }
3484
  }
3485
  if ( $start != -1 ) {
3486
  for ( $j = $start; $j < 100; $j++ ) {
3487
+ $element = isset( $_POST[ 'wdform_' . $key . "_element" . $id . $j ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id . $j ] : NULL;
3488
+ if ( isset( $element ) ) {
3489
+ $new_value = $new_value . (isset( $_POST[ 'wdform_' . $key . "_element" . $id . $j . "_label" ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id . $j . "_label" ] : "") . ' - ' . (isset( $element ) ? $form_currency . ($element == '' ? '0' : $element) : "") . '<br>';
3490
  }
3491
  }
3492
  }
3493
+ $is_element_quantity = isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) ? TRUE : FALSE;
3494
+ $element_quantity_label = isset( $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] : NULL;
3495
+ $element_quantity = (isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $key . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] : NULL;
3496
+ if ( $is_element_quantity ) {
3497
+ $new_value .= $element_quantity_label . ': ' . ( (!empty($element_quantity)) ? $element_quantity : 0 );
3498
+ }
3499
  for ( $k = 0; $k < 50; $k++ ) {
3500
+ $temp_val = isset( $_POST[ 'wdform_' . $key . "_property" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_property" . $id . $k ] : NULL;
3501
+ if ( isset( $temp_val ) ) {
3502
+ $new_value .= '<br/>' . (isset( $_POST[ 'wdform_' . $key . "_element_property_label" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_element_property_label" . $id . $k ] : "") . ': ' . $temp_val;
3503
  }
3504
  }
3505
  break;
3506
  }
3507
  case "type_paypal_total": {
3508
+ $element = isset( $_POST[ 'wdform_' . $key . "_paypal_total" . $id ] ) ? $_POST[ 'wdform_' . $key . "_paypal_total" . $id ] : "";
3509
  $new_value = $new_value . $element;
3510
  break;
3511
  }
3512
  case "type_star_rating": {
3513
+ $element = isset( $_POST[ 'wdform_' . $key . "_star_amount" . $id ] ) ? $_POST[ 'wdform_' . $key . "_star_amount" . $id ] : NULL;
3514
+ $selected = isset( $_POST[ 'wdform_' . $key . "_selected_star_amount" . $id ] ) ? $_POST[ 'wdform_' . $key . "_selected_star_amount" . $id ] : 0;
3515
+ if ( isset( $element ) ) {
3516
  $new_value = $new_value . $selected . '/' . $element;
3517
  }
3518
  break;
3519
  }
3520
  case "type_scale_rating": {
3521
+ $element = isset( $_POST[ 'wdform_' . $key . "_scale_amount" . $id ] ) ? $_POST[ 'wdform_' . $key . "_scale_amount" . $id ] : NULL;
3522
+ $selected = isset( $_POST[ 'wdform_' . $key . "_scale_radio" . $id ] ) ? $_POST[ 'wdform_' . $key . "_scale_radio" . $id ] : 0;
3523
+ if ( isset( $element ) ) {
3524
  $new_value = $new_value . $selected . '/' . $element;
3525
  }
3526
  break;
3527
  }
3528
  case "type_spinner": {
3529
+ $element = isset( $_POST[ 'wdform_' . $key . "_element" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id ] : NULL;
3530
+ if ( isset( $element ) ) {
3531
  $new_value = $new_value . $element;
3532
  }
3533
  break;
3534
  }
3535
  case "type_slider": {
3536
+ $element = isset( $_POST[ 'wdform_' . $key . "_slider_value" . $id ] ) ? $_POST[ 'wdform_' . $key . "_slider_value" . $id ] : NULL;
3537
+ if ( isset( $element ) ) {
3538
  $new_value = $new_value . $element;
3539
  }
3540
  break;
3541
  }
3542
  case "type_range": {
3543
+ $element0 = isset( $_POST[ 'wdform_' . $key . "_element" . $id . '0' ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id . '0' ] : NULL;
3544
+ $element1 = isset( $_POST[ 'wdform_' . $key . "_element" . $id . '1' ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id . '1' ] : NULL;
3545
+ if ( isset( $element0 ) || isset( $element1 ) ) {
3546
  $new_value = $new_value . $element0 . '-' . $element1;
3547
  }
3548
  break;
3549
  }
3550
  case "type_grading": {
3551
+ $element = isset( $_POST[ 'wdform_' . $key . "_hidden_item" . $id ] ) ? $_POST[ 'wdform_' . $key . "_hidden_item" . $id ] : "";
3552
+ $grading = explode( ":", $element );
3553
+ $items_count = sizeof( $grading ) - 1;
3554
  $element = "";
3555
+ $total = 0;
3556
  for ( $k = 0; $k < $items_count; $k++ ) {
3557
+ $element .= $grading[ $k ] . ":" . (isset( $_POST[ 'wdform_' . $key . "_element" . $id . '_' . $k ] ) ? $_POST[ 'wdform_' . $key . "_element" . $id . '_' . $k ] : "") . " ";
3558
+ $total += (isset( $_POST[ 'wdform_' . $key . "_element" . $id . '_' . $k ] ) ? (float) $_POST[ 'wdform_' . $key . "_element" . $id . '_' . $k ] : 0);
3559
  }
3560
+ $element .= "Total: " . $total;
3561
+ if ( isset( $element ) ) {
3562
  $new_value = $new_value . $element;
3563
  }
3564
  break;
3565
  }
3566
  case "type_matrix": {
3567
+ $input_type = isset( $_POST[ 'wdform_' . $key . "_input_type" . $id ] ) ? $_POST[ 'wdform_' . $key . "_input_type" . $id ] : "";
3568
+ $mat_rows = explode( "***", isset( $_POST[ 'wdform_' . $key . "_hidden_row" . $id ] ) ? $_POST[ 'wdform_' . $key . "_hidden_row" . $id ] : "" );
3569
+ $rows_count = sizeof( $mat_rows ) - 1;
3570
+ $mat_columns = explode( "***", isset( $_POST[ 'wdform_' . $key . "_hidden_column" . $id ] ) ? $_POST[ 'wdform_' . $key . "_hidden_column" . $id ] : "" );
3571
+ $columns_count = sizeof( $mat_columns ) - 1;
3572
  $matrix = "<table>";
3573
  $matrix .= '<tr><td></td>';
3574
+ for ( $k = 1; $k < count( $mat_columns ); $k++ ) {
3575
+ $matrix .= '<td style="background-color:#BBBBBB; padding:5px; ">' . $mat_columns[ $k ] . '</td>';
3576
  }
3577
  $matrix .= '</tr>';
3578
  $aaa = Array();
3579
  for ( $k = 1; $k <= $rows_count; $k++ ) {
3580
+ $matrix .= '<tr><td style="background-color:#BBBBBB; padding:5px;">' . $mat_rows[ $k ] . '</td>';
3581
  if ( $input_type == "radio" ) {
3582
+ $mat_radio = isset( $_POST[ 'wdform_' . $key . "_input_element" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_input_element" . $id . $k ] : 0;
3583
  if ( $mat_radio == 0 ) {
3584
  $checked = "";
3585
+ $aaa[ 1 ] = "";
3586
+ } else {
3587
+ $aaa = explode( "_", $mat_radio );
 
3588
  }
3589
  for ( $j = 1; $j <= $columns_count; $j++ ) {
3590
+ if ( $aaa[ 1 ] == $j ) {
3591
  $checked = "&#10004;";
3592
+ } else {
 
3593
  $checked = "";
3594
  }
3595
  $matrix .= '<td style="text-align:center">' . $checked . '</td>';
3596
  }
3597
+ } else {
 
3598
  if ( $input_type == "checkbox" ) {
3599
  for ( $j = 1; $j <= $columns_count; $j++ ) {
3600
+ $checked = isset( $_POST[ 'wdform_' . $key . "_input_element" . $id . $k . '_' . $j ] ) ? $_POST[ 'wdform_' . $key . "_input_element" . $id . $k . '_' . $j ] : 0;
3601
  if ( $checked == 1 ) {
3602
  $checked = "&#10004;";
3603
+ } else {
 
3604
  $checked = "";
3605
  }
3606
  $matrix .= '<td style="text-align:center">' . $checked . '</td>';
3607
  }
3608
+ } else {
 
3609
  if ( $input_type == "text" ) {
3610
  for ( $j = 1; $j <= $columns_count; $j++ ) {
3611
+ $checked = isset( $_POST[ 'wdform_' . $key . "_input_element" . $id . $k . '_' . $j ] ) ? esc_html( $_POST[ 'wdform_' . $key . "_input_element" . $id . $k . '_' . $j ] ) : "";
3612
  $matrix .= '<td style="text-align:center">' . $checked . '</td>';
3613
  }
3614
+ } else {
 
3615
  for ( $j = 1; $j <= $columns_count; $j++ ) {
3616
+ $checked = isset( $_POST[ 'wdform_' . $key . "_select_yes_no" . $id . $k . '_' . $j ] ) ? $_POST[ 'wdform_' . $key . "_select_yes_no" . $id . $k . '_' . $j ] : "";
3617
  $matrix .= '<td style="text-align:center">' . $checked . '</td>';
3618
  }
3619
  }
3622
  $matrix .= '</tr>';
3623
  }
3624
  $matrix .= '</table>';
3625
+ if ( isset( $matrix ) ) {
3626
  $new_value = $new_value . $matrix;
3627
  }
3628
  break;
3643
  */
3644
  public function empty_field( $element, $mail_emptyfields ) {
3645
  if ( !$mail_emptyfields ) {
3646
+ if ( empty( $element ) ) {
3647
  return 0;
3648
  }
3649
  }
3658
  * @return bool
3659
  */
3660
  public function fm_validateDate( $date, $format = 'Y-m-d H:i:s' ) {
3661
+ $d = DateTime::createFromFormat( $format, $date );
3662
 
3663
+ return $d && $d->format( $format ) == $date;
3664
  }
3665
 
3666
  /**
3670
  */
3671
  public function all_forms() {
3672
  global $wpdb;
3673
+ $q = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_display_options as display INNER JOIN ' . $wpdb->prefix . 'formmaker as forms ON display.form_id = forms.id WHERE display.type != "embedded" and forms.published=1' . (!WDFM()->is_free ? '' : ' AND forms.id' . (WDFM()->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option( 'contact_form_forms', '' ) != '' ? get_option( 'contact_form_forms' ) : 0) . ')');
3674
+ $forms = $wpdb->get_results( $q );
3675
  return $forms;
3676
  }
3677
  }
frontend/views/form_maker.php CHANGED
@@ -58,64 +58,13 @@ class FMViewForm_maker {
58
  $header_pos = isset($form_theme['HPAlign']) && ($form_theme['HPAlign'] == 'left' || $form_theme['HPAlign'] == 'right') ? (($row->header_title || $row->header_description || $row->header_image_url) ? 'header_left_right' : 'no_header') : '';
59
  $pagination_align = $row->pagination == 'steps' && isset($form_theme['PSAPAlign']) ? 'fm-align-' . $form_theme['PSAPAlign'] : '';
60
  $form_currency = '$';
61
- $currency_code = array(
62
- 'USD',
63
- 'EUR',
64
- 'GBP',
65
- 'JPY',
66
- 'CAD',
67
- 'MXN',
68
- 'HKD',
69
- 'HUF',
70
- 'NOK',
71
- 'NZD',
72
- 'SGD',
73
- 'SEK',
74
- 'PLN',
75
- 'AUD',
76
- 'DKK',
77
- 'CHF',
78
- 'CZK',
79
- 'ILS',
80
- 'BRL',
81
- 'TWD',
82
- 'MYR',
83
- 'PHP',
84
- 'THB',
85
- );
86
- $currency_sign = array(
87
- '$',
88
- '&#8364;',
89
- '&#163;',
90
- '&#165;',
91
- 'C$',
92
- 'Mex$',
93
- 'HK$',
94
- 'Ft',
95
- 'kr',
96
- 'NZ$',
97
- 'S$',
98
- 'kr',
99
- 'zl',
100
- 'A$',
101
- 'kr',
102
- 'CHF',
103
- 'Kc',
104
- '&#8362;',
105
- 'R$',
106
- 'NT$',
107
- 'RM',
108
- '&#8369;',
109
- '&#xe3f;',
110
- );
111
  if ( $row->payment_currency ) {
112
- $form_currency = $currency_sign[array_search($row->payment_currency, $currency_code)];
113
  }
114
 
115
  $form_maker_front_end = '';
116
  $form_maker_front_end .= '<div id="fm-pages' . $form_id . '" class="fm-pages wdform_page_navigation ' . $pagination_align . '" show_title="' . $row->show_title . '" show_numbers="' . $row->show_numbers . '" type="' . $row->pagination . '"></div>';
117
  $form_maker_front_end .= '<form name="form' . $form_id . '" action="' . $current_url . '" method="post" id="form' . $form_id . '" class="fm-form form' . $form_id . ' ' . $header_pos . '" enctype="multipart/form-data">';
118
-
119
  // Form messages.
120
  $fm_hide_form_after_submit = 0;
121
  if ( isset($_SESSION['form_submit_type' . $form_id]) ) {
@@ -123,11 +72,12 @@ class FMViewForm_maker {
123
  $type_and_id = explode(',', $type_and_id);
124
  $form_get_type = $type_and_id[0];
125
  $form_get_id = isset($type_and_id[1]) ? $type_and_id[1] : '';
 
126
  $_SESSION['form_submit_type' . $form_id] = 0;
127
  if ( $form_get_type == 3 ) {
128
  $_SESSION['massage_after_submit' . $form_id] = "";
129
- $after_submission_text = $this->model->get_after_submission_text($form_get_id);
130
- $form_maker_front_end .= WDW_FM_Library::message(wpautop(html_entity_decode($after_submission_text)), 'fm-notice-success', $form_id);
131
  $fm_hide_form_after_submit = 1;
132
  }
133
  }
@@ -180,22 +130,23 @@ class FMViewForm_maker {
180
  $form_maker_front_end .= '<input type="hidden" id="counter' . $form_id . '" value="' . $row->counter . '" name="counter' . $form_id . '" />';
181
  $form_maker_front_end .= '<input type="hidden" id="Itemid' . $form_id . '" value="" name="Itemid' . $form_id . '" />';
182
 
183
- // Form header.
184
- $image_pos = isset($form_theme['HIPAlign']) && ($form_theme['HIPAlign'] == 'left' || $form_theme['HIPAlign'] == 'right') ? 'image_left_right' : '';
185
- $image_width = isset($form_theme['HIPWidth']) && $form_theme['HIPWidth'] ? 'width="' . $form_theme['HIPWidth'] . 'px"' : '';
186
- $image_height = isset($form_theme['HIPHeight']) && $form_theme['HIPHeight'] ? 'height="' . $form_theme['HIPHeight'] . 'px"' : '';
187
- $hide_header_image_class = wp_is_mobile() && $row->header_hide_image ? 'fm_hide_mobile' : '';
188
- $header_image_animation = $formType == 'embedded' ? $row->header_image_animation : '';
189
- if ( !isset($form_theme['HPAlign']) || ($form_theme['HPAlign'] == 'left' || $form_theme['HPAlign'] == 'top') ) {
190
- if ( $row->header_title || $row->header_description || $row->header_image_url ) {
191
- $form_maker_front_end .= '<div class="fm-header-bg"><div class="fm-header ' . $image_pos . '">';
192
- if ( !isset($form_theme['HIPAlign']) || $form_theme['HIPAlign'] == 'left' || $form_theme['HIPAlign'] == 'top' ) {
193
- if ( $row->header_image_url ) {
194
- $form_maker_front_end .= '<div class="fm-header-img ' . $hide_header_image_class . ' fm-animated ' . $header_image_animation . '"><img src="' . $row->header_image_url . '" ' . $image_width . ' ' . $image_height . '/></div>';
195
- }
196
- }
197
- if ( $row->header_title || $row->header_description ) {
198
- $form_maker_front_end .= '<div class="fm-header-text">
 
199
  <div class="fm-header-title">
200
  ' . $row->header_title . '
201
  </div>
@@ -203,13 +154,14 @@ class FMViewForm_maker {
203
  ' . $row->header_description . '
204
  </div>
205
  </div>';
206
- }
207
- if ( isset($form_theme['HIPAlign']) && ($form_theme['HIPAlign'] == 'right' || $form_theme['HIPAlign'] == 'bottom') ) {
208
- if ( $row->header_image_url ) {
209
- $form_maker_front_end .= '<div class="fm-header-img"><img src="' . $row->header_image_url . '" ' . $image_width . ' ' . $image_height . '/></div>';
210
  }
 
 
 
 
 
 
211
  }
212
- $form_maker_front_end .= '</div></div>';
213
  }
214
  }
215
 
@@ -253,7 +205,6 @@ class FMViewForm_maker {
253
 
254
  // Remove unnecessary classes.
255
  $form = str_replace(array('ui-sortable-handle', 'ui-sortable-disabled', 'ui-sortable'), '', $form);
256
-
257
  foreach ( $id1s as $id1s_key => $id1 ) {
258
  $label = $labels[$id1s_key];
259
  $type = $types[$id1s_key];
@@ -1646,31 +1597,31 @@ class FMViewForm_maker {
1646
  $form = str_replace($rep1, $rep2, $form);
1647
  if ( !$fm_hide_form_after_submit ) {
1648
  $form_maker_front_end .= $form;
1649
- }
1650
- if ( isset($form_theme['HPAlign']) && ($form_theme['HPAlign'] == 'right' || $form_theme['HPAlign'] == 'bottom') ) {
1651
- if ( $row->header_title || $row->header_description || $row->header_image_url ) {
1652
- $form_maker_front_end .= '<div class="fm-header-bg"><div class="fm-header ' . $image_pos . '">';
1653
- if ( $form_theme['HIPAlign'] == 'left' || $form_theme['HIPAlign'] == 'top' ) {
1654
- if ( $row->header_image_url ) {
1655
- $form_maker_front_end .= '<div class="fm-header-img ' . $hide_header_image_class . ' fm-animated ' . $header_image_animation . '"><img src="' . $row->header_image_url . '" ' . $image_width . ' ' . $image_height . '/></div>';
 
 
 
 
 
 
 
 
 
 
1656
  }
1657
- }
1658
- if ( $row->header_title || $row->header_description ) {
1659
- $form_maker_front_end .= '<div class="fm-header-text">
1660
- <div class="fm-header-title">
1661
- ' . $row->header_title . '
1662
- </div>
1663
- <div class="fm-header-description">
1664
- ' . $row->header_description . '
1665
- </div>
1666
- </div>';
1667
- }
1668
- if ( $form_theme['HIPAlign'] == 'right' || $form_theme['HIPAlign'] == 'bottom' ) {
1669
- if ( $row->header_image_url ) {
1670
- $form_maker_front_end .= '<div class="fm-header-img"><img src="' . $row->header_image_url . '" ' . $image_width . ' ' . $image_height . '/></div>';
1671
  }
 
1672
  }
1673
- $form_maker_front_end .= '</div></div>';
1674
  }
1675
  }
1676
  $form_maker_front_end .= '<div class="wdform_preload"></div>';
@@ -1699,7 +1650,11 @@ class FMViewForm_maker {
1699
  $_GET['addon_view'] = 'frontend';
1700
  $_GET['form_id'] = $form_id;
1701
  if (WDFM()->is_free != 2) {
1702
- do_action('WD_FM_SAVE_PROG_init');
 
 
 
 
1703
  }
1704
  return $formType == 'embedded' ? WDW_FM_Library::fm_container($theme_id, $form_maker_front_end) : $form_maker_front_end;
1705
  }
@@ -2100,7 +2055,7 @@ class FMViewForm_maker {
2100
  ), '', $w_choices_params[0]) : '');
2101
  $w_choices_params = explode('[db_info]', $w_choices_params[1]);
2102
  $order_by = str_replace(array( '[', ']' ), '', $w_choices_params[0]);
2103
- $db_info = str_replace(array( '[', ']' ), '', $w_choices_params[1]);
2104
  $label_table_and_column = explode(':', str_replace(array( '[', ']' ), '', $choice));
2105
  $table = $label_table_and_column[0];
2106
  $label_column = $label_table_and_column[1];
@@ -2257,7 +2212,7 @@ class FMViewForm_maker {
2257
  $where = (str_replace(array( '[', ']' ), '', $w_choices_params[0]) ? ' WHERE ' . str_replace(array('[', ']'), '', $w_choices_params[0]) : '');
2258
  $w_choices_params = explode('[db_info]', $w_choices_params[1]);
2259
  $order_by = str_replace(array( '[', ']' ), '', $w_choices_params[0]);
2260
- $db_info = str_replace(array( '[', ']' ), '', $w_choices_params[1]);
2261
  $label_table_and_column = explode(':', str_replace(array( '[', ']' ), '', $choice));
2262
  $table = $label_table_and_column[0];
2263
  $label_column = $label_table_and_column[1];
@@ -2399,7 +2354,7 @@ class FMViewForm_maker {
2399
  $where = (str_replace(array( '[', ']' ), '', $w_choices_params[0]) ? ' WHERE ' . str_replace(array('[', ']'), '', $w_choices_params[0]) : '');
2400
  $w_choices_params = explode('[db_info]', $w_choices_params[1]);
2401
  $order_by = str_replace(array( '[', ']' ), '', $w_choices_params[0]);
2402
- $db_info = str_replace(array( '[', ']' ), '', $w_choices_params[1]);
2403
  $label_table_and_column = explode(':', str_replace(array( '[', ']' ), '', $choice));
2404
  $table = $label_table_and_column[0];
2405
  $label_column = $label_table_and_column[1];
58
  $header_pos = isset($form_theme['HPAlign']) && ($form_theme['HPAlign'] == 'left' || $form_theme['HPAlign'] == 'right') ? (($row->header_title || $row->header_description || $row->header_image_url) ? 'header_left_right' : 'no_header') : '';
59
  $pagination_align = $row->pagination == 'steps' && isset($form_theme['PSAPAlign']) ? 'fm-align-' . $form_theme['PSAPAlign'] : '';
60
  $form_currency = '$';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
61
  if ( $row->payment_currency ) {
62
+ $form_currency = WDW_FM_Library::replace_currency_code( $row->payment_currency );
63
  }
64
 
65
  $form_maker_front_end = '';
66
  $form_maker_front_end .= '<div id="fm-pages' . $form_id . '" class="fm-pages wdform_page_navigation ' . $pagination_align . '" show_title="' . $row->show_title . '" show_numbers="' . $row->show_numbers . '" type="' . $row->pagination . '"></div>';
67
  $form_maker_front_end .= '<form name="form' . $form_id . '" action="' . $current_url . '" method="post" id="form' . $form_id . '" class="fm-form form' . $form_id . ' ' . $header_pos . '" enctype="multipart/form-data">';
 
68
  // Form messages.
69
  $fm_hide_form_after_submit = 0;
70
  if ( isset($_SESSION['form_submit_type' . $form_id]) ) {
72
  $type_and_id = explode(',', $type_and_id);
73
  $form_get_type = $type_and_id[0];
74
  $form_get_id = isset($type_and_id[1]) ? $type_and_id[1] : '';
75
+ $group_id = isset($type_and_id[2]) ? $type_and_id[2] : '';
76
  $_SESSION['form_submit_type' . $form_id] = 0;
77
  if ( $form_get_type == 3 ) {
78
  $_SESSION['massage_after_submit' . $form_id] = "";
79
+ $after_submission_text = $this->model->get_after_submission_text($form_get_id, $group_id);
80
+ $form_maker_front_end .= WDW_FM_Library::message(wpautop(html_entity_decode($after_submission_text)), '', $form_id);
81
  $fm_hide_form_after_submit = 1;
82
  }
83
  }
130
  $form_maker_front_end .= '<input type="hidden" id="counter' . $form_id . '" value="' . $row->counter . '" name="counter' . $form_id . '" />';
131
  $form_maker_front_end .= '<input type="hidden" id="Itemid' . $form_id . '" value="" name="Itemid' . $form_id . '" />';
132
 
133
+ if ( !$fm_hide_form_after_submit ) {
134
+ // Form header.
135
+ $image_pos = isset($form_theme['HIPAlign']) && ($form_theme['HIPAlign'] == 'left' || $form_theme['HIPAlign'] == 'right') ? 'image_left_right' : '';
136
+ $image_width = isset($form_theme['HIPWidth']) && $form_theme['HIPWidth'] ? 'width="' . $form_theme['HIPWidth'] . 'px"' : '';
137
+ $image_height = isset($form_theme['HIPHeight']) && $form_theme['HIPHeight'] ? 'height="' . $form_theme['HIPHeight'] . 'px"' : '';
138
+ $hide_header_image_class = wp_is_mobile() && $row->header_hide_image ? 'fm_hide_mobile' : '';
139
+ $header_image_animation = $formType == 'embedded' ? $row->header_image_animation : '';
140
+ if ( !isset($form_theme['HPAlign']) || ($form_theme['HPAlign'] == 'left' || $form_theme['HPAlign'] == 'top') ) {
141
+ if ( $row->header_title || $row->header_description || $row->header_image_url ) {
142
+ $form_maker_front_end .= '<div class="fm-header-bg"><div class="fm-header ' . $image_pos . '">';
143
+ if ( !isset($form_theme['HIPAlign']) || $form_theme['HIPAlign'] == 'left' || $form_theme['HIPAlign'] == 'top' ) {
144
+ if ( $row->header_image_url ) {
145
+ $form_maker_front_end .= '<div class="fm-header-img ' . $hide_header_image_class . ' fm-animated ' . $header_image_animation . '"><img src="' . $row->header_image_url . '" ' . $image_width . ' ' . $image_height . '/></div>';
146
+ }
147
+ }
148
+ if ( $row->header_title || $row->header_description ) {
149
+ $form_maker_front_end .= '<div class="fm-header-text">
150
  <div class="fm-header-title">
151
  ' . $row->header_title . '
152
  </div>
154
  ' . $row->header_description . '
155
  </div>
156
  </div>';
 
 
 
 
157
  }
158
+ if ( isset($form_theme['HIPAlign']) && ($form_theme['HIPAlign'] == 'right' || $form_theme['HIPAlign'] == 'bottom') ) {
159
+ if ( $row->header_image_url ) {
160
+ $form_maker_front_end .= '<div class="fm-header-img"><img src="' . $row->header_image_url . '" ' . $image_width . ' ' . $image_height . '/></div>';
161
+ }
162
+ }
163
+ $form_maker_front_end .= '</div></div>';
164
  }
 
165
  }
166
  }
167
 
205
 
206
  // Remove unnecessary classes.
207
  $form = str_replace(array('ui-sortable-handle', 'ui-sortable-disabled', 'ui-sortable'), '', $form);
 
208
  foreach ( $id1s as $id1s_key => $id1 ) {
209
  $label = $labels[$id1s_key];
210
  $type = $types[$id1s_key];
1597
  $form = str_replace($rep1, $rep2, $form);
1598
  if ( !$fm_hide_form_after_submit ) {
1599
  $form_maker_front_end .= $form;
1600
+ if ( isset($form_theme['HPAlign']) && ($form_theme['HPAlign'] == 'right' || $form_theme['HPAlign'] == 'bottom') ) {
1601
+ if ( $row->header_title || $row->header_description || $row->header_image_url ) {
1602
+ $form_maker_front_end .= '<div class="fm-header-bg"><div class="fm-header ' . $image_pos . '">';
1603
+ if ( $form_theme['HIPAlign'] == 'left' || $form_theme['HIPAlign'] == 'top' ) {
1604
+ if ( $row->header_image_url ) {
1605
+ $form_maker_front_end .= '<div class="fm-header-img ' . $hide_header_image_class . ' fm-animated ' . $header_image_animation . '"><img src="' . $row->header_image_url . '" ' . $image_width . ' ' . $image_height . '/></div>';
1606
+ }
1607
+ }
1608
+ if ( $row->header_title || $row->header_description ) {
1609
+ $form_maker_front_end .= '<div class="fm-header-text">
1610
+ <div class="fm-header-title">
1611
+ ' . $row->header_title . '
1612
+ </div>
1613
+ <div class="fm-header-description">
1614
+ ' . $row->header_description . '
1615
+ </div>
1616
+ </div>';
1617
  }
1618
+ if ( $form_theme['HIPAlign'] == 'right' || $form_theme['HIPAlign'] == 'bottom' ) {
1619
+ if ( $row->header_image_url ) {
1620
+ $form_maker_front_end .= '<div class="fm-header-img"><img src="' . $row->header_image_url . '" ' . $image_width . ' ' . $image_height . '/></div>';
1621
+ }
 
 
 
 
 
 
 
 
 
 
1622
  }
1623
+ $form_maker_front_end .= '</div></div>';
1624
  }
 
1625
  }
1626
  }
1627
  $form_maker_front_end .= '<div class="wdform_preload"></div>';
1650
  $_GET['addon_view'] = 'frontend';
1651
  $_GET['form_id'] = $form_id;
1652
  if (WDFM()->is_free != 2) {
1653
+ $save_progress_params = array();
1654
+ $save_progress_params['form'] = $row;
1655
+ $save_progress_params['form_id'] = $form_id;
1656
+
1657
+ do_action('WD_FM_SAVE_PROG_init', $save_progress_params);
1658
  }
1659
  return $formType == 'embedded' ? WDW_FM_Library::fm_container($theme_id, $form_maker_front_end) : $form_maker_front_end;
1660
  }
2055
  ), '', $w_choices_params[0]) : '');
2056
  $w_choices_params = explode('[db_info]', $w_choices_params[1]);
2057
  $order_by = str_replace(array( '[', ']' ), '', $w_choices_params[0]);
2058
+ $db_info = $w_choices_params[1];
2059
  $label_table_and_column = explode(':', str_replace(array( '[', ']' ), '', $choice));
2060
  $table = $label_table_and_column[0];
2061
  $label_column = $label_table_and_column[1];
2212
  $where = (str_replace(array( '[', ']' ), '', $w_choices_params[0]) ? ' WHERE ' . str_replace(array('[', ']'), '', $w_choices_params[0]) : '');
2213
  $w_choices_params = explode('[db_info]', $w_choices_params[1]);
2214
  $order_by = str_replace(array( '[', ']' ), '', $w_choices_params[0]);
2215
+ $db_info = $w_choices_params[1];
2216
  $label_table_and_column = explode(':', str_replace(array( '[', ']' ), '', $choice));
2217
  $table = $label_table_and_column[0];
2218
  $label_column = $label_table_and_column[1];
2354
  $where = (str_replace(array( '[', ']' ), '', $w_choices_params[0]) ? ' WHERE ' . str_replace(array('[', ']'), '', $w_choices_params[0]) : '');
2355
  $w_choices_params = explode('[db_info]', $w_choices_params[1]);
2356
  $order_by = str_replace(array( '[', ']' ), '', $w_choices_params[0]);
2357
+ $db_info = $w_choices_params[1];
2358
  $label_table_and_column = explode(':', str_replace(array( '[', ']' ), '', $choice));
2359
  $table = $label_table_and_column[0];
2360
  $label_column = $label_table_and_column[1];
images/FormMaker.png CHANGED
Binary file
images/addons/Form 13.svg ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#2E3243;}
7
+ </style>
8
+ <path class="st0" d="M36,72C16.1,72,0,55.9,0,36S16.1,0,36,0s36,16.1,36,36S55.9,72,36,72z M36,2C17.3,2,2,17.3,2,36s15.3,34,34,34
9
+ s34-15.3,34-34S54.7,2,36,2z"/>
10
+ <path class="st0" d="M47.1,22.1H24.9c-1.6,0-2.9,1.3-2.9,2.9v22.1c0,1.6,1.3,2.9,2.9,2.9h12c0.3,0,0.5-0.2,0.5-0.5V39
11
+ c0-0.3-0.2-0.5-0.5-0.5h-3v-3h3c0.3,0,0.5-0.2,0.5-0.5v-3c0-3.1,1.7-4.8,4.7-4.8c1,0,2,0.1,2.6,0.1v2.6l-1.6,0
12
+ c-2.3,0-2.5,1.3-2.5,2.5V35c0,0.3,0.2,0.5,0.5,0.5h3.4l-0.4,3h-3c-0.3,0-0.5,0.2-0.5,0.5v10.4c0,0.3,0.2,0.5,0.5,0.5h6
13
+ c1.6,0,2.9-1.3,2.9-2.9V24.9C49.9,23.4,48.6,22.1,47.1,22.1z M48.9,47.1c0,1-0.8,1.8-1.8,1.8h-5.4v-9.3h2.9c0.3,0,0.5-0.2,0.5-0.5
14
+ l0.5-4c0-0.2,0-0.3-0.1-0.4c-0.1-0.1-0.2-0.2-0.4-0.2h-3.5v-2c0-1,0.2-1.4,1.5-1.4l2.1,0c0.3,0,0.5-0.2,0.5-0.5v-3.6
15
+ c0-0.3-0.2-0.5-0.5-0.5c-0.4-0.1-1.7-0.2-3.2-0.2c-3.5,0-5.7,2.3-5.7,5.9v2.4h-3c-0.3,0-0.5,0.2-0.5,0.5v4c0,0.3,0.2,0.5,0.5,0.5h3
16
+ v9.3H24.9c-1,0-1.8-0.8-1.8-1.8V24.9c0-1,0.8-1.8,1.8-1.8h22.1c1,0,1.8,0.8,1.8,1.8V47.1z"/>
17
+ </svg>
images/addons/calculator.svg ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#2E3243;}
7
+ </style>
8
+ <path class="st0" d="M36,72C16.1,72,0,55.9,0,36S16.1,0,36,0s36,16.1,36,36S55.9,72,36,72z M36,2C17.3,2,2,17.3,2,36s15.3,34,34,34
9
+ s34-15.3,34-34S54.7,2,36,2z"/>
10
+ <g>
11
+ <path class="st0" d="M31.5,27.6h-2.8v-2.8c0-0.3-0.2-0.6-0.6-0.6c-0.3,0-0.6,0.2-0.6,0.6v2.8h-2.8c-0.3,0-0.6,0.2-0.6,0.6
12
+ c0,0.3,0.2,0.6,0.6,0.6h2.8v2.8c0,0.3,0.2,0.6,0.6,0.6c0.3,0,0.6-0.2,0.6-0.6v-2.8h2.8c0.3,0,0.6-0.2,0.6-0.6
13
+ C32.1,27.9,31.9,27.6,31.5,27.6z"/>
14
+ <path class="st0" d="M47.1,27.6h-6.7c-0.3,0-0.6,0.2-0.6,0.6c0,0.3,0.2,0.6,0.6,0.6h6.7c0.3,0,0.6-0.2,0.6-0.6
15
+ C47.7,27.9,47.4,27.6,47.1,27.6z"/>
16
+ <path class="st0" d="M36.6,19.8h-1.1H19.8v15.6v1.1v15.6h15.6h1.1h15.6V36.6v-1.1V19.8H36.6z M21,21h14.5v14.5H21V21z M21,51V36.6
17
+ h14.5V51H21z M51,51H36.6V36.6H51V51z M36.6,35.4V21H51v14.5H36.6z"/>
18
+ <path class="st0" d="M40.5,46h6.7c0.3,0,0.6-0.2,0.6-0.6c0-0.3-0.2-0.6-0.6-0.6h-6.7c-0.3,0-0.6,0.2-0.6,0.6
19
+ C39.9,45.8,40.1,46,40.5,46z"/>
20
+ <path class="st0" d="M40.5,42.7h6.7c0.3,0,0.6-0.2,0.6-0.6s-0.2-0.6-0.6-0.6h-6.7c-0.3,0-0.6,0.2-0.6,0.6S40.1,42.7,40.5,42.7z"/>
21
+ <path class="st0" d="M31.4,40.6c-0.2-0.2-0.6-0.2-0.8,0L28.2,43l-2.4-2.4c-0.2-0.2-0.6-0.2-0.8,0c-0.2,0.2-0.2,0.6,0,0.8l2.4,2.4
22
+ L25,46.2c-0.2,0.2-0.2,0.6,0,0.8c0.1,0.1,0.3,0.2,0.4,0.2c0.1,0,0.3-0.1,0.4-0.2l2.4-2.4l2.4,2.4c0.1,0.1,0.3,0.2,0.4,0.2
23
+ c0.1,0,0.3-0.1,0.4-0.2c0.2-0.2,0.2-0.6,0-0.8L29,43.8l2.4-2.4C31.6,41.2,31.6,40.8,31.4,40.6z"/>
24
+ </g>
25
+ </svg>
images/addons/conditional_emails.svg ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#2E3243;}
7
+ .st1{fill:#2D3142;}
8
+ </style>
9
+ <path class="st0" d="M36,72C16.1,72,0,55.9,0,36S16.1,0,36,0s36,16.1,36,36S55.9,72,36,72z M36,2C17.3,2,2,17.3,2,36s15.3,34,34,34
10
+ s34-15.3,34-34S54.7,2,36,2z"/>
11
+ <g>
12
+ <path id="Fill-3_3_" class="st1" d="M51.7,27c-0.3-0.3-0.5-0.5-0.8-0.8c-4,4-8,7.9-12,11.9c-0.3,0.2-1.3,1-2.9,1
13
+ c-1.4,0-2.4-0.7-2.7-1c-4-4-8-7.9-12-11.9c-0.3,0.3-0.6,0.6-0.9,0.9c3,3,6,6,9,9c-2.9,2.9-5.8,5.8-8.8,8.6c0.3,0.3,0.7,0.7,1,1
14
+ l8.7-8.7l1.7,1.7c0.2,0.3,1.7,1.7,3.9,1.7s3.7-1.4,3.9-1.7l1.7-1.7l8.7,8.7c0.3-0.3,0.6-0.6,0.9-0.9c-2.9-2.9-5.8-5.9-8.7-8.8
15
+ C45.6,33.1,48.6,30.1,51.7,27z"/>
16
+ <path class="st1" d="M49.1,23.8H22.9c-1.5,0-2.8,1.3-2.8,2.8v18.8c0,1.5,1.3,2.8,2.8,2.8h26.3c1.5,0,2.8-1.3,2.8-2.8V26.6
17
+ C51.9,25.1,50.7,23.8,49.1,23.8z M50.3,45.5c0,0.6-0.5,1.1-1.1,1.1H22.8c-0.6,0-1.1-0.5-1.1-1.1v-19c0-0.6,0.5-1.1,1.1-1.1h26.5
18
+ c0.6,0,1.1,0.5,1.1,1.1V45.5z"/>
19
+ </g>
20
+ </svg>
images/addons/dropbox_integration.svg ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#2E3243;}
7
+ </style>
8
+ <path class="st0" d="M36,72C16.1,72,0,55.9,0,36S16.1,0,36,0s36,16.1,36,36S55.9,72,36,72z M36,2C17.3,2,2,17.3,2,36s15.3,34,34,34
9
+ s34-15.3,34-34S54.7,2,36,2z"/>
10
+ <g transform="translate(2 2)">
11
+ <g>
12
+ <path class="st0" d="M44.3,30.3l6.7-4.9l-9.5-5.7l-6.8,4.5l-6.8-4.5l-10.7,5.7l6.8,5.2l-5.6,5.2l5.5,3.2v2.3
13
+ c0,0.2,0.1,0.3,0.3,0.5l9.4,6.2c0,0.1,0.1,0.1,0.2,0.2c0.1,0.1,0.2,0.1,0.3,0.1c0.1,0,0.1,0,0.2,0c0,0,0.1,0,0.1-0.1l9.6-6.2
14
+ c0.2-0.1,0.3-0.3,0.3-0.5v-2.7l5.5-3.5L44.3,30.3z M34.1,35.6l-8.1-5l8.6-5l7.5,4.8L34.1,35.6z M39.6,40.3l-4.6-4l8.2-5.3l4.6,4
15
+ L39.6,40.3z M41.4,21.1l7.5,4.5l-5.5,4l0,0l-0.1,0.1l-7.5-4.7l0,0l0,0L41.4,21.1z M27.8,21.1l5.8,3.8l-8.7,5l-5.7-4.3L27.8,21.1z
16
+ M25,31.3l8.1,5l-4.5,4.2l-3.9-2.3c0,0-0.1,0-0.1,0l-4.4-2.6L25,31.3z M25,39.7l3.4,2c0,0,0.1,0.1,0.1,0.1l0.3,0.2l1.7-1.6l3-2.8
17
+ v9L25,41L25,39.7L25,39.7z M39.9,41.5l3.3-2.1v1.6l-8.5,5.5v-9.1l4.5,4c0.1,0.1,0.1,0.1,0.2,0.1l0.1,0.1l0.2-0.1
18
+ C39.8,41.6,39.8,41.5,39.9,41.5z"/>
19
+ </g>
20
+ </g>
21
+ </svg>
images/addons/gdrive_integration.svg ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#2E3243;}
7
+ .st1{fill:none;}
8
+ .st2{clip-path:url(#SVGID_2_);fill:#2E3243;}
9
+ </style>
10
+ <path class="st0" d="M36,72C16.1,72,0,55.9,0,36S16.1,0,36,0s36,16.1,36,36S55.9,72,36,72z M36,2C17.3,2,2,17.3,2,36s15.3,34,34,34
11
+ s34-15.3,34-34S54.7,2,36,2z"/>
12
+ <g>
13
+ <polygon class="st1" points="50.4,39.1 40.2,21.4 31.1,21.4 41.3,39.1 "/>
14
+ <polygon class="st1" points="39.9,39.1 35.3,31.1 30.7,39.2 "/>
15
+ <polygon class="st1" points="25.4,48.3 45.9,48.2 50.4,40.3 30,40.4 "/>
16
+ <polygon class="st1" points="30,22 19.9,39.7 24.4,47.7 34.6,29.9 "/>
17
+ <polygon class="st1" points="30,22 30.8,23.2 30,22 "/>
18
+ <polygon class="st1" points="50.4,39.1 40.2,21.4 31.1,21.4 41.3,39.1 "/>
19
+ <g>
20
+ <defs>
21
+ <rect id="SVGID_1_" x="27.9" y="18.8" width="26.9" height="20.4"/>
22
+ </defs>
23
+ <clipPath id="SVGID_2_">
24
+ <use xlink:href="#SVGID_1_" style="overflow:visible;"/>
25
+ </clipPath>
26
+ <path class="st2" d="M30.7,21.7l0.7,1.3l10,17.5h11.3l0.2-0.3c0.1-0.2,0.1-0.4,0-0.6l0,0l0,0l0,0l0,0l-11-19.4
27
+ c-0.1-0.2-0.3-0.3-0.5-0.3H30.7c-0.2,0-0.4,0.1-0.5,0.3c0,0,0,0,0,0v0L30,20.4L30.7,21.7L30.7,21.7z M41,21.1l10.3,18.2l-9.2,0
28
+ L31.8,21.1H41z"/>
29
+ </g>
30
+ <path class="st0" d="M51.1,38.8l-1.4,0L30,38.9l-5.6,9.7l0.2,0.3c0.1,0.2,0.3,0.3,0.5,0.3l0,0l0,0l0,0l0,0l21.8,0
31
+ c0.2,0,0.4-0.1,0.5-0.3l5.2-9.1c0.1-0.2,0.1-0.4,0-0.6c0,0,0,0,0,0l0,0l-0.2-0.3L51.1,38.8L51.1,38.8z M46.6,47.9l-20.4,0l4.5-7.9
32
+ l20.5,0L46.6,47.9z"/>
33
+ <path class="st0" d="M26.2,47.9l0.7-1.3c3.2-5.7,6.5-11.4,9.7-17.1c-1.8-3.2-3.7-6.5-5.5-9.7c-0.1,0-0.3,0-0.4,0
34
+ c-0.2,0-0.4,0.1-0.5,0.3l0,0l0,0v0v0l-10.9,19c-0.1,0.2-0.1,0.4,0,0.6l5.3,9.1c0.1,0.2,0.3,0.3,0.5,0.3c0,0,0,0,0,0v0l0.4,0
35
+ C25.7,48.8,26,48.3,26.2,47.9z M20.5,39.4c3.4-5.9,6.8-11.8,10.2-17.7c1.5,2.6,3,5.3,4.5,7.9c-3.4,5.9-6.7,11.8-10.1,17.8
36
+ L20.5,39.4z"/>
37
+ </g>
38
+ </svg>
images/addons/import_export.svg ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#2E3243;}
7
+ </style>
8
+ <g>
9
+ <g>
10
+ <path class="st0" d="M32.2,28.8c1.9,0,3.8,0,5.7,0c0.7,0,1.1-0.9,0.6-1.4c-2.9-2.8-5.7-5.7-8.6-8.5c-0.3-0.3-0.8-0.3-1.1,0
11
+ c-2.9,2.8-5.8,5.7-8.6,8.5c-0.5,0.5-0.1,1.4,0.6,1.4c1.9,0,3.8,0,5.6,0c0,4.8,0,9.5,0,14.3c0,0.4,0.4,0.8,0.8,0.8
12
+ c1.5,0,2.9,0,4.4,0c0.2,0,0.4-0.1,0.5-0.2c0,0,0,0,0,0c0,0,0,0,0,0c0.1-0.1,0.2-0.3,0.2-0.5C32.2,38.3,32.2,33.5,32.2,28.8z
13
+ M35.9,27.2c-1.5,0-3,0-4.5,0c-0.4,0-0.8,0.4-0.8,0.8c0,4.8,0,9.5,0,14.3c-0.9,0-1.8,0-2.8,0c0-4.8,0-9.5,0-14.3
14
+ c0-0.4-0.4-0.8-0.8-0.8c-1.5,0-3,0-4.5,0c2.2-2.2,4.5-4.4,6.7-6.6C31.5,22.8,33.7,25,35.9,27.2z"/>
15
+ <path class="st0" d="M51.4,43.2c-1.9,0-3.8,0-5.7,0c0-4.8,0-9.5,0-14.3c0-0.4-0.4-0.8-0.8-0.8c-1.5,0-2.9,0-4.4,0
16
+ c-0.4,0-0.8,0.4-0.8,0.8c0,4.8,0,9.5,0,14.3c-1.9,0-3.8,0-5.7,0c-0.4,0-0.6,0.2-0.7,0.5c-0.1,0.3-0.1,0.6,0.1,0.9c0,0,0,0,0,0
17
+ c0,0,0,0,0,0c2.9,2.9,5.8,5.7,8.7,8.6c0.3,0.3,0.8,0.3,1.1,0c2.9-2.9,5.8-5.7,8.7-8.6C52.5,44,52.1,43.2,51.4,43.2z M36,44.8
18
+ c1.5,0,3,0,4.6,0c0.4,0,0.8-0.4,0.8-0.8c0-4.8,0-9.5,0-14.3c0.9,0,1.9,0,2.8,0c0,4.8,0,9.5,0,14.3c0,0.4,0.4,0.8,0.8,0.8
19
+ c1.5,0,3,0,4.5,0c-2.2,2.2-4.5,4.4-6.7,6.6C40.5,49.2,38.3,47,36,44.8z"/>
20
+ </g>
21
+ <path class="st0" d="M36,72C16.1,72,0,55.9,0,36S16.1,0,36,0s36,16.1,36,36S55.9,72,36,72z M36,2C17.3,2,2,17.3,2,36s15.3,34,34,34
22
+ s34-15.3,34-34S54.7,2,36,2z"/>
23
+ </g>
24
+ </svg>
images/addons/mailchimp.svg ADDED
@@ -0,0 +1,83 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#2E3243;}
7
+ .st1{fill:#2D3142;}
8
+ </style>
9
+ <path class="st0" d="M36,72C16.1,72,0,55.9,0,36S16.1,0,36,0s36,16.1,36,36S55.9,72,36,72z M36,2C17.3,2,2,17.3,2,36s15.3,34,34,34
10
+ s34-15.3,34-34S54.7,2,36,2z"/>
11
+ <g>
12
+ <path class="st1" d="M41.3,43.5c-0.4,0-0.9,0-1.3,0c-0.1,0-0.2,0-0.3,0c-0.2,0-0.4-0.1-0.5,0.2c-0.1,0.2,0.1,0.4,0.2,0.6
13
+ c0.3,0.3,0.6,0.5,1.1,0.6c0.8,0.1,1.6,0.1,2.4,0c1.1-0.1,2.1-0.5,3-0.9c1-0.4,1.9-1,2.7-1.6c-1.9,1.6-3.9,2.5-6.3,2.8
14
+ c-0.4,0.1-0.9,0.1-1.3,0c-0.8-0.1-1.6-0.3-2-1.2c-0.1-0.1-0.1-0.2-0.1-0.3c0,0.1,0,0.3,0,0.4c0.3,0.9,1.1,1.2,2,1.2
15
+ c0.5,0,1,0,1.6,0l0,0c0.2,0,0.3,0,0.5,0c1.5-0.3,3-0.8,4.3-1.7c0.7-0.5,1.5-0.9,2-1.7c-0.2-0.1-0.3,0-0.4,0.1
16
+ c-0.9,0.7-2,1.4-3.1,1.8c-1.5,0.7-3.2,1.1-4.9,0.9c-0.7-0.1-1.3-0.3-1.6-1c0.2,0,0.5,0,0.7,0c0.5-0.2,1-0.2,1.5,0
17
+ c0.1,0,0.2,0,0.3,0c0-0.1,0-0.1-0.1-0.2C41.5,43.5,41.4,43.5,41.3,43.5z"/>
18
+ <path class="st1" d="M36,26.5c0.2,0.2,0.4,0.1,0.6,0.1c-0.2,0.1-0.4,0-0.6,0.2c0.3,0,0.5-0.1,0.8-0.3C36.5,26.5,36.3,26.5,36,26.5z
19
+ "/>
20
+ <path class="st1" d="M38.5,25.9c0,0-0.1,0-0.1,0c-0.4,0.3-0.9-0.1-1.3,0.2c0.5,0,0.9,0,1.4,0C38.6,26,38.7,25.9,38.5,25.9z"/>
21
+ <path class="st1" d="M41.6,26.6c-0.5,0-0.9,0-1.4,0C40.6,26.7,41.1,26.7,41.6,26.6z"/>
22
+ <path class="st1" d="M39.9,43.6c0.5,0,1,0,1.5,0C40.9,43.6,40.4,43.6,39.9,43.6z"/>
23
+ <path class="st1" d="M32.4,30.4c0,0-0.1-0.1-0.1-0.1C32.2,30.4,32.3,30.5,32.4,30.4z"/>
24
+ <path class="st1" d="M42.1,48.7c-0.4,0-0.8,0-1.2,0C41.3,48.8,41.7,48.8,42.1,48.7z"/>
25
+ <path class="st1" d="M40.8,45.2c0.5,0.2,1,0.1,1.6,0h0C41.8,45.3,41.3,45.3,40.8,45.2z"/>
26
+ <path class="st1" d="M40.2,42.2c0.4,0,0.8,0,1.2,0C41,42.1,40.6,42,40.2,42.2z"/>
27
+ <path class="st1" d="M25.3,41.2c0.1,0.2,0.2,0.4,0.5,0.3c-0.3-0.5-0.2-1-0.2-1.5C25.3,40.4,25.7,40.9,25.3,41.2z"/>
28
+ <path class="st1" d="M36.5,23c0-0.3-0.3-0.3-0.5-0.4c0.1,0.2,0.2,0.4,0.3,0.6C36.3,23.1,36.5,23.1,36.5,23z"/>
29
+ <path class="st1" d="M28.6,40.5c-0.2-0.2-0.5-0.3-0.8-0.5c-0.1,0-0.2,0.1-0.3,0.1c0.1,0.1,0.1,0.2,0.2,0.3c0.9,0.8,0.9,0.8,0.1,1.7
30
+ c-0.1,0.1-0.1,0.2,0,0.3c0.1,0.2,0.2,0.1,0.4,0.1c0.4-0.2,0.7-0.4,0.8-0.9C29,41.2,29,40.8,28.6,40.5z"/>
31
+ <path class="st1" d="M35.8,23.4c-0.4-0.1-0.8-0.2-1.2-0.3C35.3,23.8,35.3,23.8,35.8,23.4z"/>
32
+ <path class="st1" d="M31.8,26.6c0.2,0,0.4-0.1,0.5-0.2c-0.1,0.1-0.2,0.3-0.2,0.5c0.4-0.4,0.8-0.8,1.2-1.2
33
+ C32.7,25.8,32.2,26.1,31.8,26.6z M32.9,25.8c-0.1,0.1-0.3,0.2-0.4,0.3C32.6,26,32.7,25.9,32.9,25.8z"/>
34
+ <path class="st1" d="M35,22.5c0.1-0.2,0-0.3-0.1-0.5c0-0.1-0.1-0.3-0.1-0.4c-0.2,0.1-0.2,0.2-0.2,0.3c0,0.2,0,0.4,0.2,0.6
35
+ C34.8,22.5,34.9,22.6,35,22.5z"/>
36
+ <path class="st1" d="M27.8,40c-0.1-0.2,0.1-0.4,0.1-0.6c-0.5,0.1-0.5,0.4-0.4,0.7C27.6,40.1,27.7,39.9,27.8,40z"/>
37
+ <path class="st1" d="M28.6,39.3c0.1-0.1,0-0.2,0-0.4c-0.4-0.7-1.6-1-2.5-0.5c-1,0.5-1.3,1.6-0.8,2.7c0.3-0.3,0-0.8,0.3-1.1
38
+ c0.7-1.3,1.3-1.5,2.6-0.7C28.3,39.4,28.5,39.4,28.6,39.3z"/>
39
+ <path class="st1" d="M34.2,24.6c0.2,0.2,0.4-0.2,0.6-0.3c-0.8-0.6-1.5-1.2-2.3-1.9C32.6,23.6,33.6,23.9,34.2,24.6z"/>
40
+ <path class="st1" d="M26.4,37.1c0.5,0,0.9,0,1.4,0C27.3,37,26.9,37,26.4,37.1z"/>
41
+ <path class="st1" d="M38.8,43.6c0-0.1,0-0.1,0-0.2c0,0,0,0,0,0.1C38.8,43.5,38.8,43.5,38.8,43.6z"/>
42
+ <path class="st1" d="M35.2,43.1c0,0,0,0.1,0,0.1c0,0,0,0,0.1,0c0,0,0,0,0,0c0.1,0.4-0.1,0.8,0.1,1.1c0-0.4,0-0.8,0-1.2
43
+ C35.3,43.1,35.3,43,35.2,43.1z"/>
44
+ <path class="st1" d="M44.1,34.5c0-0.6-0.2-1.1-0.4-1.4c-0.1-0.1-0.2-0.3-0.4-0.2c-0.2,0-0.3,0.2-0.3,0.4C42.8,34,43,34.3,44.1,34.5
45
+ z"/>
46
+ <path class="st1" d="M40.3,31.1c-1,0-2-0.1-3,0C38.3,31.1,39.3,31.3,40.3,31.1z"/>
47
+ <path class="st1" d="M39.8,43.4c0.5,0.1,1,0,1.5,0c0.1,0,0.2,0,0.3,0c-0.1,0-0.1-0.1-0.2-0.2v0c-0.6,0-1.2,0-1.8-0.1
48
+ c-0.2,0-0.4-0.1-0.4-0.3C39.2,43.2,39.3,43.4,39.8,43.4z"/>
49
+ <path class="st1" d="M38.8,44c-0.1-0.2-0.1-0.4,0-0.5c-0.1-0.3-0.1-0.6-0.1-0.9C38.6,43,38.5,43.5,38.8,44z"/>
50
+ <path class="st1" d="M42.7,36.7c0.2,0,0.3-0.1,0.4-0.3c-0.1-0.3-0.3-0.5-0.6-0.5c-0.2,0-0.4,0.1-0.4,0.4
51
+ C42.2,36.6,42.4,36.7,42.7,36.7z"/>
52
+ <path class="st1" d="M38.1,36.8c0.6-0.2,1.2-0.4,1.8-0.4C39.2,35.9,38.5,36.1,38.1,36.8z"/>
53
+ <path class="st1" d="M50.6,39.9c-0.7-0.5-0.8-1-0.5-1.8c0.3-0.8,0.1-1.7-0.5-2.1c-0.8-0.5-1.6-1.2-2.5-1.6
54
+ c-0.6-0.3-0.9-0.7-0.9-1.4c0-0.2,0-0.5,0-0.7c-0.1-1-0.2-2-0.9-2.9c-0.3-0.4-0.6-0.8-0.9-1.2c-0.3-0.4-0.3-0.7,0-1.1
55
+ c0.6-1,1-2.1,1.2-3.2c0.3-2.2-0.6-3.5-2.6-3.8c-0.6,0-1.1,0-1.7,0c-1.2,0.1-2.3,0.5-3.3,1.1c-0.5,0.3-0.9,0.2-1.3-0.1
56
+ c-0.5-0.4-0.9-0.8-1.6-0.9c-1.7-0.2-3.1,0.3-4.5,1.2C27.4,23.3,25,26,23,29c-1.1,1.7-2.1,3.5-2.3,5.6c0,0.6,0,1.1,0,1.7
57
+ c0.1,1,0.7,1.7,1.5,2.2c0.5,0.3,0.6,0.6,0.5,1.2c-0.5,2.6,1.4,5.1,4,5.4c0.4,0.1,0.7,0.2,1,0.6c0.5,0.7,1,1.4,1.6,2
58
+ c2.9,3,6.5,4.5,10.7,4.3c1.8-0.1,3.4-0.4,5-1.3c3.4-2,5.3-5.1,6.3-8.9c0-0.2,0-0.5,0-0.7C51.2,40.5,51,40.2,50.6,39.9z M23.4,37.8
59
+ c-1.2-0.6-1.7-1.6-1.5-2.9c0.1-1,0.5-1.9,0.9-2.8c1.8-3.8,4.4-6.9,7.9-9.4c1.4-1,2.9-1.5,4.6-1.6c0.4,0,0.5,0.3,0.7,0.5
60
+ c0.7,0.8,1.4,1.1,2.4,0.3c0.4-0.3,0.9-0.5,1.4-0.5c-4.4,2.3-7.7,5.9-10.8,9.6c0.8-1.6,2-2.9,3.1-4.2c-0.1-0.1-0.2-0.2-0.3-0.3
61
+ c-3,2.6-5.3,5.7-6.6,9.5c-0.3,0.9-1.2,1.1-1.6,1.8C23.5,38,23.4,37.9,23.4,37.8z M28,43.8c-1.6,0.5-3.3-0.4-3.9-2.1
62
+ c-0.6-1.7,0.2-3.6,1.8-4.3c0.2-0.1,0.4-0.2,0.6-0.2c0.5-0.2,0.9-0.2,1.4,0c1,0.4,1.1,0.6,1.5,1.9c0.3,0,0.1-0.4,0.3-0.5
63
+ c0.2,0.3,0.2,0.6,0.2,0.9c0,0.3,0,0.6,0,0.9c0.3,0,0.2-0.2,0.3-0.3C30.7,41.5,29.6,43.3,28,43.8z M32.4,30.4
64
+ c-0.3,0.3-0.5,0.6-0.8,0.8c0.1-0.4,0.3-0.7,0.6-1c0.8-1,1.8-1.8,2.9-2.6c-0.1-0.1-0.2-0.2-0.4-0.3c0.5-0.2,0.9-0.4,1.3-0.6
65
+ c-0.2-0.1-0.2-0.2,0-0.3c0.2-0.5,0.8-0.3,1.1-0.5c0.4-0.3,0.9-0.1,1.3-0.2c0-0.1-0.2-0.2,0-0.2c0.2,0,0.5,0,0.8,0
66
+ c0.3,0,0.7,0.5,0.9-0.1c0,0,0,0,0.1,0c0.8,0.4,2.1,0.2,2.6,1.3c-0.4-0.1-0.8-0.1-1.2-0.2c-0.5,0.2-0.9,0.2-1.4,0
67
+ c-2.9,0.3-5.2,1.7-7.4,3.5C32.7,30.2,32.5,30.3,32.4,30.4z M50.2,41.7c-0.7,2-1.7,3.9-3.6,5.2c-1.4,1-2.9,1.4-4.5,1.7
68
+ c-0.4,0.3-0.8,0.1-1.2,0.1c0,0,0,0,0-0.1c0,0,0,0,0-0.1c-0.3-0.1-0.7-0.1-1-0.2c-1.2-0.3-2.1-0.9-2.7-2c-0.1-0.1-0.1-0.6-0.5-0.2
69
+ c-0.1,0.1-0.1,0-0.2-0.2c-0.2-0.5-0.3-1.1-0.5-1.6c-0.1,0.2-0.2,0.4-0.3,0.5c-0.3-0.1-0.1-0.5-0.3-0.7c-0.3-0.3-0.1-0.8-0.2-1.2
70
+ c-0.4-0.6-0.1-1.3,0-1.9c0.2-1,0.8-1.8,1.6-2.6c-1.2-0.5-1.6-1.7-2.3-2.7c-0.1-0.2-0.2-0.4,0.1-0.5c0.3-0.1,0.1-0.4,0.1-0.7
71
+ c0-1.5,0.4-2.6,1.8-3.3c0.2-0.1,0.5-0.2,0.8-0.3c0.3-0.3,0.7-0.2,1.1-0.2c0.6,0,1.3-0.1,1.9,0.1c0.7-0.1,1.2-0.5,1.7-0.9
72
+ c1.1-1,2.2-0.6,2.6,0.8c0.2,0.8,0.3,1.7,0.3,2.5c0,0.9,0.3,1.5,1.2,1.8c0.7,0.2,1.4,0.7,2,1.3c0,0,0.1,0.1,0.2,0.1
73
+ c1.1,0.6,1.1,0.6,0.2,1.5c-1.5,1.6-3.4,2.6-5.6,3c-0.9,0.2-1.8,0.4-2.8,0.3c-0.7,0-1.1,0.3-1.3,1c0.2,0.3,0.1,0.6,0.1,0.8
74
+ c0.4-0.1,0.1-0.6,0.5-0.7c0,0.1,0,0.1,0,0.2c0-0.1,0-0.1,0-0.2c0.2-0.4,0.6-0.4,0.9-0.6c0.4-0.3,0.8-0.2,1.2,0c2.7-0.2,5-1.2,7.1-3
75
+ c0.3,0.3,0.4,0.8,0.5,1.2c0.1,0.4,0.2,0.6,0.6,0.6C50.1,40.9,50.3,41.3,50.2,41.7z"/>
76
+ <path class="st1" d="M40.2,35.9c-0.8-1.3-2.6-1.3-3.5,0C37.9,35.3,39,35.3,40.2,35.9z"/>
77
+ <path class="st1" d="M43.8,35.8c0,0.2,0,0.4,0.3,0.4c0.3,0,0.3-0.2,0.4-0.4c0-0.2,0-0.4-0.3-0.4C43.8,35.3,43.8,35.5,43.8,35.8z"/>
78
+ <path class="st1" d="M44.8,42.7c-1.1,0.4-2,0.6-3.1,0.8c0,0,0,0.1-0.1,0.2c1.2-0.2,2.4-0.4,3.5-1.1c-1.2,0.3-2.5,0.6-3.7,0.7
79
+ c0.1,0.1,0.2,0.1,0.3,0.1C42.8,43.3,43.8,43.1,44.8,42.7z"/>
80
+ <path class="st1" d="M41.8,43.4C41.8,43.4,41.7,43.4,41.8,43.4c-0.1,0-0.1,0-0.2,0c0,0,0,0,0,0c0,0,0,0,0,0
81
+ C41.7,43.5,41.7,43.4,41.8,43.4z"/>
82
+ </g>
83
+ </svg>
images/addons/pdf_integration.svg ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#2E3243;}
7
+ .st1{fill:#2D3142;}
8
+ </style>
9
+ <path class="st0" d="M36,72C16.1,72,0,55.9,0,36S16.1,0,36,0s36,16.1,36,36S55.9,72,36,72z M36,2C17.3,2,2,17.3,2,36s15.3,34,34,34
10
+ s34-15.3,34-34S54.7,2,36,2z"/>
11
+ <g>
12
+ <g>
13
+ <g>
14
+ <path class="st1" d="M51.6,28.3l-8.5-8.9c-0.1-0.1-0.3-0.2-0.5-0.2H29.9c-1.4,0-2.6,1.2-2.6,2.6v9h-5.2c-1.1,0-1.9,0.9-1.9,1.9
15
+ v9.7c0,1.1,0.9,1.9,1.9,1.9h5.2v5.8c0,1.4,1.2,2.6,2.6,2.6h19.3c1.4,0,2.6-1.2,2.6-2.6V28.8C51.8,28.6,51.7,28.4,51.6,28.3z
16
+ M42.8,21l7,7.3h-7V21z M22.2,43.1c-0.4,0-0.6-0.3-0.6-0.6v-9.7c0-0.4,0.3-0.6,0.6-0.6h17.4c0.4,0,0.6,0.3,0.6,0.6v9.7
17
+ c0,0.4-0.3,0.6-0.6,0.6H22.2z M50.5,50.2c0,0.7-0.6,1.3-1.3,1.3H29.9c-0.7,0-1.3-0.6-1.3-1.3v-5.8h10.9c1.1,0,1.9-0.9,1.9-1.9
18
+ v-9.7c0-1.1-0.9-1.9-1.9-1.9H28.6v-9c0-0.7,0.6-1.3,1.3-1.3h11.6v8.4c0,0.4,0.3,0.6,0.6,0.6h8.4V50.2L50.5,50.2z"/>
19
+ </g>
20
+ </g>
21
+ <g>
22
+ <g>
23
+ <path class="st1" d="M27.3,35.6c-0.2-0.3-0.5-0.5-0.8-0.5C26.3,35,25.8,35,25.1,35h-1.8v5.5h1.1v-2.1h0.7c0.5,0,0.9,0,1.2-0.1
24
+ c0.2,0,0.4-0.1,0.6-0.3c0.2-0.1,0.3-0.3,0.5-0.5s0.2-0.5,0.2-0.9C27.6,36.2,27.5,35.9,27.3,35.6z M26.3,37.1
25
+ c-0.1,0.1-0.2,0.2-0.3,0.3c-0.1,0.1-0.4,0.1-0.9,0.1h-0.6v-1.6H25c0.4,0,0.7,0,0.8,0c0.2,0,0.3,0.1,0.4,0.2
26
+ c0.1,0.1,0.2,0.3,0.2,0.5C26.4,36.9,26.4,37,26.3,37.1z"/>
27
+ </g>
28
+ </g>
29
+ <g>
30
+ <g>
31
+ <path class="st1" d="M32.9,36.5c-0.1-0.4-0.3-0.7-0.5-0.9c-0.2-0.2-0.5-0.4-0.8-0.5C31.3,35,31,35,30.5,35h-2v5.5h2.1
32
+ c0.4,0,0.7,0,1-0.1c0.3-0.1,0.6-0.3,0.8-0.4c0.3-0.2,0.5-0.6,0.6-1c0.1-0.3,0.2-0.7,0.2-1.2C33.1,37.3,33.1,36.8,32.9,36.5z
33
+ M31.9,38.8c-0.1,0.2-0.2,0.4-0.3,0.5c-0.1,0.1-0.3,0.2-0.5,0.2c-0.1,0-0.4,0.1-0.7,0.1h-0.8l0,0v-3.7h0.5c0.5,0,0.8,0,0.9,0.1
34
+ c0.2,0,0.4,0.1,0.5,0.3c0.1,0.1,0.2,0.3,0.3,0.5c0.1,0.2,0.1,0.6,0.1,1C32,38.2,31.9,38.5,31.9,38.8z"/>
35
+ </g>
36
+ </g>
37
+ <g>
38
+ <g>
39
+ <polygon class="st1" points="37.9,35.9 37.9,35 34.1,35 34.1,40.5 35.2,40.5 35.2,38.2 37.5,38.2 37.5,37.2 35.2,37.2 35.2,35.9
40
+ "/>
41
+ </g>
42
+ </g>
43
+ </g>
44
+ </svg>
images/addons/post_generation.svg ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#2E3243;}
7
+ </style>
8
+ <g>
9
+ <path class="st0" d="M36,72C16.1,72,0,55.9,0,36S16.1,0,36,0s36,16.1,36,36S55.9,72,36,72z M36,2C17.3,2,2,17.3,2,36s15.3,34,34,34
10
+ s34-15.3,34-34S54.7,2,36,2z"/>
11
+ <g>
12
+ <g>
13
+ <path class="st0" d="M40.5,31.3h-4h-2.9h-4c-0.3,0-0.6,0.3-0.6,0.6s0.3,0.6,0.6,0.6h4h2.9h4c0.3,0,0.6-0.3,0.6-0.6
14
+ C41.1,31.6,40.8,31.3,40.5,31.3z"/>
15
+ <path class="st0" d="M40.5,38.1h-4h-2.9h-4c-0.3,0-0.6,0.3-0.6,0.6s0.3,0.6,0.6,0.6h4h2.9h4c0.3,0,0.6-0.3,0.6-0.6
16
+ C41.1,38.4,40.8,38.1,40.5,38.1z"/>
17
+ <path class="st0" d="M40.5,34.7h-4h-2.9h-4c-0.3,0-0.6,0.3-0.6,0.6s0.3,0.6,0.6,0.6h4h2.9h4c0.3,0,0.6-0.3,0.6-0.6
18
+ S40.8,34.7,40.5,34.7z"/>
19
+ </g>
20
+ <g id="Page-1_2_">
21
+ <g>
22
+ <g id="Icons-AV_9_" transform="translate(-212.000000, 0.000000)">
23
+ <g id="loop_9_" transform="translate(212.000000, 0.000000)">
24
+ <path id="Shape_9_" class="st0" d="M44,42.1v-1.8l-2.4,2.4l2.4,2.4v-1.8c1.9,0,3.5,1.6,3.5,3.5c0,0.6-0.2,1.2-0.4,1.6l0.9,0.9
25
+ c0.4-0.8,0.7-1.6,0.7-2.5C48.7,44.2,46.5,42.1,44,42.1L44,42.1z M44,50.3c-1.9,0-3.5-1.6-3.5-3.5c0-0.6,0.2-1.2,0.4-1.6
26
+ L40,44.3c-0.4,0.8-0.7,1.6-0.7,2.5c0,2.6,2.1,4.7,4.7,4.7v1.8l2.4-2.4L44,48.6V50.3L44,50.3z"/>
27
+ </g>
28
+ </g>
29
+ </g>
30
+ </g>
31
+ <path class="st0" d="M26,52c-0.7,0-1.3-0.6-1.3-1.3V21.3c0-0.7,0.6-1.3,1.3-1.3h12v8.7c0,0.4,0.3,0.7,0.7,0.7h8.7v10h1.3V28.5
32
+ c0-0.2-0.1-0.3-0.2-0.5l-8.8-9.2c-0.1-0.1-0.3-0.2-0.5-0.2H26c-1.5,0-2.7,1.2-2.7,2.7v29.4c0,1.5,1.2,2.7,2.7,2.7h12.2V52H26z
33
+ M39.3,20.4l7.3,7.5h-7.3V20.4z"/>
34
+ </g>
35
+ </g>
36
+ </svg>
images/addons/pushover.svg ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#2E3243;}
7
+ .st1{fill:none;}
8
+ </style>
9
+ <path class="st0" d="M36,72C16.1,72,0,55.9,0,36S16.1,0,36,0s36,16.1,36,36S55.9,72,36,72z M36,2C17.3,2,2,17.3,2,36s15.3,34,34,34
10
+ s34-15.3,34-34S54.7,2,36,2z"/>
11
+ <path class="st1" d="M132.7,6.3L130,6.7l-5.3,11.9c-2.6,6-4.8,10.8-5.3,11.8c0.4,0,1.2,0,2.4,0l2.6,0l1.4-3.1
12
+ c0.8-1.7,1.9-4.2,2.4-5.4l1-2.3l1.1-0.1c1.7-0.1,3.1-0.5,4.9-1.3c1.7-0.8,3.1-1.8,4.4-3.3c1.6-1.7,2.8-4.1,3.1-6
13
+ c0.1-0.7,0.1-2.1-0.1-2.7c-0.5-1.8-2-3.1-4.3-3.7c-0.8-0.2-3-0.3-4.2-0.1c-3.5,0.4-7.1,1.9-9.9,4.1c-1.1,0.8-2.3,2.1-3,3.1
14
+ c-1.3,1.9-1.7,4.2-1,5c0.4,0.5,1.4,0.8,2.3,0.8l0.2,0l0,0c-0.2-0.7,0-2.2,0.5-3.6c1.3-4,4.6-7,8.9-7.9c0.7-0.1,1.1-0.2,2.2-0.2
15
+ c1.5,0,2,0.1,2.8,0.5c1.5,0.7,2.1,2.1,1.8,4.2c-0.8,4.5-4.6,9.2-8.2,10.1c-0.4,0.1-0.9,0.2-1.1,0.1l-0.1-0.1l0-0.1
16
+ c0,0,0-0.1,2.8-6.4c1.4-3.1,2.3-5.3,2.6-6C134.9,6,133.9,6.2,132.7,6.3z"/>
17
+ <path class="st0" d="M48.3,25.7c-0.6-2.1-2.2-3.5-4.8-4.2c-0.9-0.2-3.2-0.3-4.4-0.2c-3.6,0.4-7.3,2-10.2,4.2
18
+ c-1.1,0.9-2.4,2.3-3.1,3.3c-1.5,2.3-1.9,4.8-0.9,5.9c0.6,0.6,1.7,1.1,2.9,1.1l1.2,0l-0.3-0.9c-0.1-0.5,0-1.8,0.5-3.2
19
+ c1.2-3.8,4.4-6.6,8.4-7.4c0.6-0.1,1-0.2,2.1-0.2h0.1c1.3,0,1.7,0.1,2.4,0.4c1.3,0.6,1.7,1.6,1.4,3.4c-0.7,4.2-4.3,8.7-7.6,9.5
20
+ c0.5-1,1.3-3,2.4-5.5c2.9-6.6,2.9-6.6,2.6-6.9c-0.2-0.2-0.2-0.2-3.3,0.2l-3.1,0.4L28.5,39c-4.3,9.6-4.9,10.9-4.9,11l-0.1,0.3
21
+ l0.2,0.2c0.2,0.3,0.3,0.3,2.1,0.3c0.3,0,0.6,0,1,0l3.1,0l1.6-3.5c0.8-1.7,1.9-4.2,2.4-5.4l0.9-1.9l0.7,0c1.8-0.1,3.3-0.5,5.2-1.4
22
+ c1.8-0.9,3.2-1.9,4.6-3.4c1.7-1.9,3-4.3,3.3-6.4C48.6,27.8,48.5,26.4,48.3,25.7z M24.9,49.6c0.7-1.7,2.7-6.1,5-11.3l5.2-11.7
23
+ l2.5-0.3c0.8-0.1,1.5-0.2,1.9-0.2c-0.4,1-1.2,2.8-2.4,5.4c-2.8,6.4-2.8,6.4-2.8,6.5l0,0.3l0.2,0.2c0.2,0.1,0.5,0.2,1.4,0
24
+ c3.7-0.9,7.6-5.8,8.5-10.4c0.4-2.3-0.2-3.8-2-4.6C41.6,23,41.1,23,39.7,23h-0.1c-1.2,0-1.6,0-2.3,0.2c-4.4,0.9-7.8,4-9.2,8.2
25
+ c-0.4,1.3-0.6,2.5-0.6,3.4c-0.7,0-1.5-0.3-1.8-0.7c-0.6-0.6-0.3-2.7,1-4.6c0.6-0.9,1.8-2.2,2.9-3c2.8-2.1,6.3-3.6,9.7-4
26
+ c1.1-0.1,3.3-0.1,4,0.1c2.2,0.6,3.6,1.7,4,3.4c0.2,0.6,0.2,1.9,0.1,2.5c-0.3,1.8-1.4,4.1-3,5.8c-1.3,1.4-2.6,2.4-4.3,3.2
27
+ c-1.7,0.8-3.1,1.2-4.8,1.3l-1.4,0.1l-1.1,2.5c-0.5,1.2-1.6,3.6-2.4,5.4l-1.3,2.8l-2.4,0C25.9,49.7,25.3,49.7,24.9,49.6z"/>
28
+ </svg>
images/addons/registration.svg ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#2E3243;}
7
+ .st1{fill:#2E3243;stroke:#2E3243;stroke-width:0.5;stroke-miterlimit:10;}
8
+ .st2{clip-path:url(#SVGID_2_);fill:#2E3243;}
9
+ </style>
10
+ <path class="st0" d="M36,72C16.1,72,0,55.9,0,36S16.1,0,36,0s36,16.1,36,36S55.9,72,36,72z M36,2C17.3,2,2,17.3,2,36s15.3,34,34,34
11
+ s34-15.3,34-34S54.7,2,36,2z"/>
12
+ <g>
13
+ <path class="st1" d="M50.5,46.8H38.9c-0.4,0-0.7-0.3-0.7-0.7s0.3-0.7,0.7-0.7h11.5c0.4,0,0.7,0.3,0.7,0.7S50.9,46.8,50.5,46.8z"/>
14
+ <path class="st1" d="M44.7,52.6c-0.4,0-0.7-0.3-0.7-0.7V40.3c0-0.4,0.3-0.7,0.7-0.7c0.4,0,0.7,0.3,0.7,0.7v11.5
15
+ C45.4,52.3,45.1,52.6,44.7,52.6z"/>
16
+ </g>
17
+ <g>
18
+ <defs>
19
+ <polygon id="SVGID_1_" points="38.2,35.2 -3.8,35.2 -3.8,56.7 -3.8,59.7 -3.8,81.3 16.7,81.3 16.7,59.7 38.2,59.7 "/>
20
+ </defs>
21
+ <clipPath id="SVGID_2_">
22
+ <use xlink:href="#SVGID_1_" style="overflow:visible;"/>
23
+ </clipPath>
24
+ <path class="st2" d="M53.9,53.6c-0.5,0-1-0.4-1-0.9c0-8.2-6.8-14.8-15.1-14.8c-8.3,0-15.1,6.6-15.1,14.8c0,0.5-0.4,0.9-1,0.9
25
+ c-0.5,0-1-0.4-1-0.9c0-9.2,7.6-16.7,17-16.7s17,7.5,17,16.7C54.8,53.1,54.4,53.6,53.9,53.6z"/>
26
+ </g>
27
+ <path class="st0" d="M39,37.9c-5.3,0-9.7-4.3-9.7-9.7s4.3-9.7,9.7-9.7s9.7,4.3,9.7,9.7S44.3,37.9,39,37.9z M39,20.5
28
+ c-4.3,0-7.7,3.5-7.7,7.7S34.7,36,39,36s7.7-3.5,7.7-7.7S43.2,20.5,39,20.5z"/>
29
+ </svg>
images/addons/save_progress.svg ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#2E3243;}
7
+ </style>
8
+ <path class="st0" d="M36,72C16.1,72,0,55.9,0,36S16.1,0,36,0s36,16.1,36,36S55.9,72,36,72z M36,2C17.3,2,2,17.3,2,36s15.3,34,34,34
9
+ s34-15.3,34-34S54.7,2,36,2z"/>
10
+ <g>
11
+ <path class="st0" d="M35.4,42.9c0,0,0.1,0.1,0.1,0.1l0.1,0c0.1,0,0.1,0.1,0.2,0.1l0.1,0c0.1,0,0.1,0,0.2,0c0.1,0,0.1,0,0.2,0
12
+ l0.2-0.1c0,0,0.1,0,0.1,0l0.1,0c0,0,0.1-0.1,0.1-0.1l5.7-5.7c0.4-0.3,0.5-0.9,0.2-1.2c-0.1-0.2-0.4-0.3-0.6-0.3
13
+ c-0.2,0-0.5,0-0.7,0.2c-0.1,0-0.1,0.1-0.1,0.1l-4.2,4.2V23.7c0-0.5-0.4-0.9-0.9-0.9s-0.9,0.4-0.9,0.9v16.5l-4.2-4.2
14
+ c-0.4-0.3-0.9-0.2-1.2,0.2c-0.2,0.3-0.2,0.8,0,1.1L35.4,42.9z"/>
15
+ <path class="st0" d="M48.9,40.3c-0.5,0-0.9,0.4-0.9,0.9v4.7c0,0.9-0.7,1.7-1.7,1.7H25.6c-0.9,0-1.7-0.7-1.7-1.7v-4.7
16
+ c0-0.5-0.4-0.9-0.9-0.9s-0.9,0.4-0.9,0.9v4.7c0,1.9,1.5,3.4,3.4,3.4h20.7c1.9,0,3.4-1.5,3.4-3.4v-4.7
17
+ C49.8,40.7,49.4,40.3,48.9,40.3z"/>
18
+ </g>
19
+ </svg>
images/addons/stripe.svg ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 21.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#2E3243;}
7
+ </style>
8
+ <path class="st0" d="M36,72C16.1,72,0,55.9,0,36S16.1,0,36,0s36,16.1,36,36S55.9,72,36,72z M36,2C17.3,2,2,17.3,2,36s15.3,34,34,34
9
+ s34-15.3,34-34S54.7,2,36,2z"/>
10
+ <g>
11
+ <g id="Layer_1_copy_2_">
12
+ <path class="st0" d="M46,33.5c-0.2-0.5-0.6-0.9-1.2-1c-0.9-0.2-1.7-0.2-2.4,0.4c-0.1,0-0.1,0.1-0.2,0.2c-0.2-0.6-0.7-0.5-1.1-0.5
13
+ c-0.1,0-0.1,0-0.2,0c-0.4,0-0.9,0-1.4,0c0,0.1,0,0.2,0,0.3c0,3.4,0,6.9,0,10.3c0,0.1,0,0.2,0,0.3c1,0,1.9,0,2.9,0
14
+ c0-0.9,0-1.9,0-2.8c0.4,0,0.8,0.1,1.2,0.1c1.4,0,2.2-0.6,2.6-2c0-0.1,0-0.1,0-0.2c0.3-1.1,0.3-2.1,0.2-3.2
15
+ C46.4,34.7,46.2,34.1,46,33.5z M43.5,38c-0.1,0.6-0.5,0.8-1.1,0.6c0-0.2,0-0.4,0-0.5c0-1,0-2.1,0-3.1c0-0.2,0.1-0.3,0.2-0.3
16
+ c0.1,0,0.2-0.1,0.3-0.1c0.4-0.1,0.6,0,0.7,0.4C43.6,35.9,43.7,37,43.5,38z M34.7,32.7c0,0.7,0,1.4,0,2.1c-0.3,0-0.6-0.1-0.9-0.1
17
+ c-0.1,0-0.3,0-0.4,0c-0.6,0.1-0.7,0.2-0.7,0.8c0,1.6,0,3.1,0,4.7c0,0.1,0,0.2,0,0.3c-1,0-1.9,0-2.8,0c0-2.6,0-5.3,0-8
18
+ c0.1,0,0.1,0,0.2,0c0.6,0,1.2,0,1.8,0c0.2,0,0.3,0,0.3,0.2c0.1,0.2,0.2,0.4,0.3,0.6c0.5-0.8,1.1-1,1.9-0.8
19
+ C34.6,32.5,34.7,32.5,34.7,32.7z M38.3,30.1c0,0.8-0.6,1.4-1.4,1.4c0,0,0,0,0,0c-0.1,0-0.2,0-0.3,0c-0.3-0.1-0.5-0.2-0.7-0.4
20
+ c-0.3-0.3-0.4-0.6-0.4-1c0-0.7,0.5-1.3,1.2-1.4c0,0,0,0,0.1,0c0.1,0,0.2,0,0.3,0c0,0,0,0,0,0C37.7,28.7,38.3,29.3,38.3,30.1z
21
+ M35.4,32.5c1,0,1.9,0,2.8,0c0,2.7,0,5.3,0,8c-0.9,0-1.9,0-2.8,0C35.4,37.8,35.4,35.2,35.4,32.5z M53.8,34.9
22
+ c-0.1-0.7-0.4-1.4-0.9-1.9c-0.7-0.6-1.5-0.7-2.3-0.7c-1.7,0.1-2.7,0.8-3.1,2.3c-0.3,1.2-0.3,2.5,0,3.7c0.3,1.2,1.1,1.9,2.3,2.2
23
+ c1.1,0.2,2.2,0.2,3.2-0.1c0.6-0.2,0.6-0.2,0.6-0.8c0-0.5,0-1,0-1.5c-0.3,0-0.5,0.1-0.7,0.1c-0.7,0.1-1.3,0.3-2,0.1
24
+ c-0.5-0.1-0.8-0.4-0.7-1c1.3,0,2.5,0,3.9,0C53.9,36.6,53.9,35.8,53.8,34.9z M50.1,35.9c0-0.4,0.1-0.9,0.1-1.3
25
+ c0-0.1,0.1-0.2,0.2-0.3c0.3-0.3,0.7-0.2,0.8,0.2c0.1,0.5,0.1,1,0.2,1.5C50.9,35.9,50.5,35.9,50.1,35.9z M27.7,34.6
26
+ c0,1.1,0,2.1,0,3.2c0,0.1,0,0.2,0,0.3c0,0.4,0.2,0.5,0.5,0.5c0.3,0,0.6-0.1,1-0.1c0,0.7,0,1.3,0,2c-1,0.2-2,0.4-3,0.1
27
+ c-0.9-0.2-1.4-0.9-1.4-2c0-1.3,0-2.6,0-3.9c0-0.1,0-0.2,0-0.3c-0.4,0-0.7,0-1,0c0-0.6,0-1.2,0-1.8c0.3,0,0.7,0,1,0
28
+ c0.1-0.5,0.2-1,0.3-1.6c0-0.2,0.1-0.3,0.3-0.3c0.8-0.2,1.5-0.4,2.3-0.5c0,0.8,0,1.6,0,2.4c0.5,0,1,0,1.5,0
29
+ c-0.1,0.6-0.3,1.2-0.4,1.8c-0.4,0-0.7,0-1.1,0C27.7,34.4,27.7,34.5,27.7,34.6z M23.5,38.3c-0.2,1.4-1,2.2-2.4,2.3
30
+ c-0.9,0.1-1.8,0-2.7-0.3c-0.1,0-0.2-0.1-0.2-0.2c0-0.6,0-1.3,0-1.9c0.5,0.1,0.9,0.2,1.3,0.3c0.3,0,0.6,0.1,0.8,0
31
+ c0.1,0,0.3-0.2,0.4-0.3c0.1-0.2,0-0.4-0.2-0.5c-0.2-0.1-0.5-0.3-0.7-0.4c-0.3-0.2-0.6-0.3-0.8-0.5c-0.5-0.4-0.8-0.9-0.9-1.5
32
+ c0-0.1,0-0.1,0-0.2c0-0.2,0-0.3,0-0.5c0-0.2,0.1-0.4,0.1-0.6c0.3-1,1-1.5,1.9-1.6c1-0.2,2-0.1,2.9,0.2c0.2,0,0.2,0.1,0.2,0.3
33
+ c0,0.6,0,1.2,0,1.8c-0.5-0.1-1-0.2-1.4-0.3c-0.2,0-0.4,0-0.6,0c-0.1,0-0.3,0.2-0.3,0.3c0,0.1,0.1,0.4,0.2,0.4
34
+ c0.2,0.2,0.5,0.3,0.7,0.4c0.3,0.2,0.6,0.3,0.9,0.5C23.4,36.6,23.6,37.4,23.5,38.3z"/>
35
+ </g>
36
+ </g>
37
+ </svg>
images/support.png DELETED
Binary file
images/wd_logo.png DELETED
Binary file
js/add_field.js CHANGED
@@ -81,7 +81,7 @@ jQuery(document).on('keydown', function (e) {
81
  function fm_check_something_really_important() {
82
  is7 = jQuery('.wdform_field:not([type=type_section_break])').length;
83
  if (is7 >= 9) {
84
- alert(form_maker.important_message);
85
  return true;
86
  }
87
  return false;
@@ -178,7 +178,7 @@ function enable2() {
178
 
179
  // Hide field types container.
180
  jQuery(".field_types").hide();
181
- jQuery(".field_options").addClass("field_options-large");
182
  }
183
 
184
  function edit(id) {
@@ -2179,6 +2179,7 @@ function popup_ready() {
2179
  // Change button name.
2180
  jQuery(".popup-title").html(form_maker.add_field);
2181
  jQuery('#add-button-cont').html('');
 
2182
  // Reset filter.
2183
  jQuery(".field-types-filter").val("");
2184
  filter(jQuery(".field-types-filter"));
@@ -2188,7 +2189,7 @@ function popup_ready() {
2188
 
2189
  // Show field types container.
2190
  jQuery(".field_types").show();
2191
- jQuery(".field_options").removeClass("field_options-large");
2192
 
2193
  jQuery(".add-popup").slideToggle(200);
2194
  }
@@ -2245,22 +2246,34 @@ function fm_add_field_button(that, subtype) {
2245
  jQuery('#edit_main_table input').attr('disabled', 'disabled');
2246
  jQuery('#edit_main_table textarea').attr('disabled', 'disabled');
2247
  jQuery('#edit_main_table .fm-input-container span.dashicons').attr('onclick', '');
2248
- jQuery('#add-button-cont').removeClass('add-button-cont').html('<div class="error"><p>' + form_maker.disabled1 + '</p><p><a href="https://web-dorado.com/files/fromFormMaker.php" target="_blank">' + form_maker.disabled2 + '</a></p></div>');
 
 
 
2249
  }
2250
  else {
2251
  if (subtype == 'stripe' && (is_addon_stripe_active == 0 || is_stripe_enabled == 0)) {
2252
  jQuery('#edit_main_table input').attr('disabled', 'disabled');
2253
  jQuery('#edit_main_table textarea').attr('disabled', 'disabled');
2254
  jQuery('#edit_main_table .fm-input-container span.dashicons').attr('onclick', '');
2255
- if (is_addon_stripe_active == 0) {
2256
- jQuery('#add-button-cont').removeClass('add-button-cont').html('<div class="error"><p>' + form_maker.stripe1 + '<a href="https://web-dorado.com/products/wordpress-form/add-ons/stripe.html" target="_blank">Form Maker Stripe Integration</a>' + form_maker.stripe2 + '</p></div>');
2257
- }
2258
- else if (is_stripe_enabled == 0) {
2259
  jQuery('#add-button-cont').removeClass('add-button-cont').html('<div class="error"><p>' + form_maker.stripe3 + '</p></div>');
 
 
 
 
 
 
 
 
 
2260
  }
2261
  }
2262
  else {
2263
  jQuery('#add-button-cont').addClass('add-button-cont').html('<button class="button button-primary button-hero wd-add-button" onclick="add(0, false); return false;">' + form_maker.add + '</button>');
 
 
 
2264
  }
2265
  }
2266
  }
@@ -4824,7 +4837,7 @@ function refresh_rowcol(num, type) {
4824
  var adding = document.createElement('input');
4825
  adding.setAttribute("type", type);
4826
  adding.setAttribute("id", num + "_elementform_id_temp" + index);
4827
- if (jQuery(this).find('#el_choices' + index)[0].getAttribute("checked") == "true")
4828
  adding.setAttribute("checked", "checked");
4829
  if (document.getElementById(num + "_option_left_right").value == "right")
4830
  adding.style.cssText = "float: left !important";
@@ -4901,7 +4914,7 @@ function refresh_rowcol(num, type) {
4901
  var adding = document.createElement('input');
4902
  adding.setAttribute("type", type);
4903
  adding.setAttribute("id", num + "_elementform_id_temp" + index);
4904
- if (jQuery(this).find('#el_choices' + index)[0].getAttribute("checked") == "true")
4905
  adding.setAttribute("checked", "checked");
4906
  if (document.getElementById(num + "_option_left_right").value == "right")
4907
  adding.style.cssText = "float: left !important";
81
  function fm_check_something_really_important() {
82
  is7 = jQuery('.wdform_field:not([type=type_section_break])').length;
83
  if (is7 >= 9) {
84
+ fm_limitation_alert(true);
85
  return true;
86
  }
87
  return false;
178
 
179
  // Hide field types container.
180
  jQuery(".field_types").hide();
181
+ jQuery("#field_container").addClass('field_container_full');
182
  }
183
 
184
  function edit(id) {
2179
  // Change button name.
2180
  jQuery(".popup-title").html(form_maker.add_field);
2181
  jQuery('#add-button-cont').html('');
2182
+ jQuery('#field_container .fm-free-message').addClass('fm-hidden');
2183
  // Reset filter.
2184
  jQuery(".field-types-filter").val("");
2185
  filter(jQuery(".field-types-filter"));
2189
 
2190
  // Show field types container.
2191
  jQuery(".field_types").show();
2192
+ jQuery("#field_container").removeClass('field_container_full');
2193
 
2194
  jQuery(".add-popup").slideToggle(200);
2195
  }
2246
  jQuery('#edit_main_table input').attr('disabled', 'disabled');
2247
  jQuery('#edit_main_table textarea').attr('disabled', 'disabled');
2248
  jQuery('#edit_main_table .fm-input-container span.dashicons').attr('onclick', '');
2249
+ jQuery('#add-button-cont').removeClass('add-button-cont').html('');
2250
+ jQuery('#premium_message').removeClass('fm-hidden');
2251
+ jQuery('#stripe_message').addClass('fm-hidden');
2252
+ jQuery('#field_container .popup-body-col').addClass('fm-opacity-40');
2253
  }
2254
  else {
2255
  if (subtype == 'stripe' && (is_addon_stripe_active == 0 || is_stripe_enabled == 0)) {
2256
  jQuery('#edit_main_table input').attr('disabled', 'disabled');
2257
  jQuery('#edit_main_table textarea').attr('disabled', 'disabled');
2258
  jQuery('#edit_main_table .fm-input-container span.dashicons').attr('onclick', '');
2259
+ if (!jQuery(that).hasClass('wd-pro-fields') && is_stripe_enabled == 0 && is_addon_stripe_active == 1) {
 
 
 
2260
  jQuery('#add-button-cont').removeClass('add-button-cont').html('<div class="error"><p>' + form_maker.stripe3 + '</p></div>');
2261
+ jQuery( '#premium_message' ).addClass( 'fm-hidden' );
2262
+ jQuery( '#stripe_message' ).addClass( 'fm-hidden' );
2263
+ jQuery('#field_container .popup-body-col').removeClass('fm-opacity-40');
2264
+ }
2265
+ else {
2266
+ jQuery('#add-button-cont').removeClass('add-button-cont').html('');
2267
+ jQuery( '#premium_message' ).addClass( 'fm-hidden' );
2268
+ jQuery( '#stripe_message' ).removeClass( 'fm-hidden' );
2269
+ jQuery('#field_container .popup-body-col').addClass('fm-opacity-40');
2270
  }
2271
  }
2272
  else {
2273
  jQuery('#add-button-cont').addClass('add-button-cont').html('<button class="button button-primary button-hero wd-add-button" onclick="add(0, false); return false;">' + form_maker.add + '</button>');
2274
+ jQuery('#premium_message').addClass('fm-hidden');
2275
+ jQuery('#stripe_message').addClass('fm-hidden');
2276
+ jQuery('#field_container .popup-body-col').removeClass('fm-opacity-40');
2277
  }
2278
  }
2279
  }
4837
  var adding = document.createElement('input');
4838
  adding.setAttribute("type", type);
4839
  adding.setAttribute("id", num + "_elementform_id_temp" + index);
4840
+ if ( jQuery("#"+num + "_elementform_id_temp" + index).attr("checked") == "checked" )
4841
  adding.setAttribute("checked", "checked");
4842
  if (document.getElementById(num + "_option_left_right").value == "right")
4843
  adding.style.cssText = "float: left !important";
4914
  var adding = document.createElement('input');
4915
  adding.setAttribute("type", type);
4916
  adding.setAttribute("id", num + "_elementform_id_temp" + index);
4917
+ if ( jQuery("#"+num + "_elementform_id_temp" + index).attr("checked") == "checked" )
4918
  adding.setAttribute("checked", "checked");
4919
  if (document.getElementById(num + "_option_left_right").value == "right")
4920
  adding.style.cssText = "float: left !important";
js/form_maker_admin.js CHANGED
@@ -1,6 +1,6 @@
1
  jQuery(document).ready(function () {
2
  jQuery('#fm_loading').hide();
3
- jQuery('#fm_admin_container').show();
4
  // Set click action to add new buttons.
5
  jQuery(".wd-header a").on("click", function () {
6
  jQuery("input[name='task']").val("add");
@@ -16,14 +16,46 @@ jQuery(document).ready(function () {
16
  });
17
 
18
  // Open/close section container on its header click.
19
- jQuery(".hndle, .handlediv").each(function () {
20
  jQuery(this).on("click", function () {
21
  fm_toggle_postbox(this);
22
  });
23
  });
24
-
 
 
 
 
 
 
25
  });
26
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  function fm_toggle_postbox(that) {
28
  jQuery(that).parent(".postbox").toggleClass("closed");
29
  }
@@ -908,3 +940,10 @@ function show_stats() {
908
  select_error.show();
909
  }
910
  }
 
 
 
 
 
 
 
1
  jQuery(document).ready(function () {
2
  jQuery('#fm_loading').hide();
3
+ jQuery('#fm_admin_container').removeClass('hidden');
4
  // Set click action to add new buttons.
5
  jQuery(".wd-header a").on("click", function () {
6
  jQuery("input[name='task']").val("add");
16
  });
17
 
18
  // Open/close section container on its header click.
19
+ jQuery(".hndle:not(.readonly), .handlediv").each(function () {
20
  jQuery(this).on("click", function () {
21
  fm_toggle_postbox(this);
22
  });
23
  });
24
+
25
+ jQuery(".wd-has-placeholder .dashicons.dashicons-list-view, .wd-editor-placeholder .dashicons.dashicons-list-view").each(function () {
26
+ jQuery(this).attr("title", form_maker.add_placeholder);
27
+ jQuery(this).on("click", function () {
28
+ fm_placeholders_popup(jQuery(this).data("id"));
29
+ });
30
+ });
31
  });
32
 
33
+ function wd_insert_placeholder(id, placeholder) {
34
+ var field = document.getElementById(id);
35
+ if (tinyMCE.get(id)) {
36
+ tinyMCE.get(id).focus();
37
+ }
38
+ if (field.style.display == "none") {
39
+ tinyMCE.execCommand('mceInsertContent', false, "{" + placeholder + "}");
40
+ return;
41
+ }
42
+ field.focus();
43
+ if (document.selection) {
44
+ sel = document.selection.createRange();
45
+ sel.text = placeholder;
46
+ }
47
+ else if (field.selectionStart || field.selectionStart == '0') {
48
+ var startPos = field.selectionStart;
49
+ var endPos = field.selectionEnd;
50
+ field.value = field.value.substring(0, startPos)
51
+ + "{" + placeholder + "}"
52
+ + field.value.substring(endPos, field.value.length);
53
+ }
54
+ else {
55
+ field.value += "{" + placeholder + "}";
56
+ }
57
+ }
58
+
59
  function fm_toggle_postbox(that) {
60
  jQuery(that).parent(".postbox").toggleClass("closed");
61
  }
940
  select_error.show();
941
  }
942
  }
943
+
944
+ function fm_loading_show() {
945
+ jQuery('#fm_loading').show();
946
+ }
947
+ function fm_loading_hide() {
948
+ jQuery('#fm_loading').hide();
949
+ }
js/form_maker_form_options.js CHANGED
@@ -23,7 +23,20 @@ jQuery(document).ready(function () {
23
  jQuery('.stats_filed_label').prop("checked" , this.checked);
24
  });
25
  fm_toggle_email_options(jQuery('input[name=sendemail]:checked').val() == '1' ? true : false);
26
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
  jQuery(window).load(function () {
29
  var fieldset_id = jQuery("#fieldset_id").val();
@@ -66,7 +79,41 @@ jQuery(window).load(function () {
66
  if(document.getElementById('dbox_upload_dir_labels')) {
67
  document.getElementById('dbox_upload_dir_labels').addEventListener('mouseout',hide_email_labels,true);
68
  }
69
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
 
71
  function wd_fm_apply_options(task) {
72
  var submit = fm_option_tabs_mail_validation();
@@ -78,6 +125,31 @@ function wd_fm_apply_options(task) {
78
  return false;
79
  }
80
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
81
  function set_condition() {
82
  field_condition = '';
83
  for(i=0;i<500;i++) {
23
  jQuery('.stats_filed_label').prop("checked" , this.checked);
24
  });
25
  fm_toggle_email_options(jQuery('input[name=sendemail]:checked').val() == '1' ? true : false);
26
+
27
+ // Bind filter action on entering search key and when the user cancel the input.
28
+ jQuery(".placeholders-filter").on("keyup input", function() { filter_placeholders(this); });
29
+ jQuery('#placeholders_overlay').on("click", function() { fm_placeholders_popup_close(); });
30
+
31
+ // Close popup on escape.
32
+ jQuery(document).on('keydown', function (e) {
33
+ if (e.keyCode === 27) { /* Esc.*/
34
+ if (jQuery("#placeholders_overlay").is(":visible")) {
35
+ fm_placeholders_popup_close();
36
+ }
37
+ }
38
+ });
39
+ });
40
 
41
  jQuery(window).load(function () {
42
  var fieldset_id = jQuery("#fieldset_id").val();
79
  if(document.getElementById('dbox_upload_dir_labels')) {
80
  document.getElementById('dbox_upload_dir_labels').addEventListener('mouseout',hide_email_labels,true);
81
  }
82
+ });
83
+
84
+ /**
85
+ * Filter placeholders.
86
+ *
87
+ * @param that
88
+ */
89
+ function filter_placeholders(that) {
90
+ // Get search key.
91
+ var search = jQuery(that).val().toLowerCase();
92
+ // Remove previous serach results from filtered fields section.
93
+ jQuery(".filtered-placeholders .inside").html("");
94
+ if (search != "") {
95
+ var found = false;
96
+ // Hide all field sections.
97
+ jQuery(".placeholders_cont .postbox").addClass("hide");
98
+ jQuery(".placeholders .postbox:not(.filtered-placeholders) .wd-button").each(function () {
99
+ var field_name = jQuery(this).html().toLowerCase();
100
+ if (field_name.indexOf(search) != '-1') {
101
+ jQuery(".filtered-placeholders .inside").append(jQuery(this).clone());
102
+ found = true;
103
+ }
104
+ });
105
+ // If nothing found.
106
+ if (!found) {
107
+ jQuery(".filtered-placeholders .inside").html(form_maker.nothing_found);
108
+ }
109
+ // Show search results in filtered fields section.
110
+ jQuery(".placeholders_cont .filtered-placeholders").removeClass("hide");
111
+ }
112
+ else {
113
+ jQuery(".placeholders_cont .postbox").removeClass("hide");
114
+ jQuery(".placeholders_cont .filtered-placeholders").addClass("hide");
115
+ }
116
+ }
117
 
118
  function wd_fm_apply_options(task) {
119
  var submit = fm_option_tabs_mail_validation();
125
  return false;
126
  }
127
 
128
+ function fm_placeholders_popup(input_id) {
129
+ var active_input = jQuery('#' + input_id);
130
+ var active_input_container = active_input.closest('.wd-group');
131
+ active_input_container.addClass('placeholders-active');
132
+ jQuery('html').animate({scrollTop: active_input_container.offset().top - 50}, 500);
133
+ var popup = jQuery('.placeholder-popup');
134
+ active_input_container.prepend(jQuery('#placeholders_overlay'));
135
+ if (active_input_container.find('.wp-editor-wrap').length) {
136
+ active_input_container.find('.wp-editor-wrap').append(popup);
137
+ }
138
+ else {
139
+ active_input.after( popup );
140
+ var orig_val = active_input.val();
141
+ active_input.focus().val('').val(orig_val);
142
+ }
143
+ popup.show();
144
+ }
145
+
146
+ function fm_placeholders_popup_close() {
147
+ var active_input = jQuery('#placeholders_overlay').closest('.wd-group');
148
+ active_input.removeClass('placeholders-active');
149
+ var popup = jQuery('.placeholder-popup');
150
+ popup.hide();
151
+ }
152
+
153
  function set_condition() {
154
  field_condition = '';
155
  for(i=0;i<500;i++) {
js/form_maker_manage.js CHANGED
@@ -50,6 +50,7 @@ function sortable_columns() {
50
  stop: function(event, ui) {
51
  jQuery('.wdform_empty_row').remove();
52
  if (ui.item.attr("id") == "add_field" && ui.item.parent().attr("id") != "add_field_cont") {
 
53
  nextID = jQuery("#add_field").next(".wdform_row").attr("wdid"); //find next row id for position
54
  jQuery("#add_field").parent().attr("id", "cur_column"); // add id cur_column to this column
55
 
@@ -205,32 +206,6 @@ function set_type(type) {
205
  }
206
  }
207
 
208
- function insertAtCursor(myField, myValue) {
209
- if ( tinyMCE.get(myField) ) {
210
- tinyMCE.get(myField).focus();
211
- }
212
- var myField = document.getElementById(myField);
213
- if (myField.style.display == "none") {
214
- tinyMCE.execCommand('mceInsertContent', false, "%" + myValue + "%");
215
- return;
216
- }
217
- if (document.selection) {
218
- myField.focus();
219
- sel = document.selection.createRange();
220
- sel.text = myValue;
221
- }
222
- else if (myField.selectionStart || myField.selectionStart == '0') {
223
- var startPos = myField.selectionStart;
224
- var endPos = myField.selectionEnd;
225
- myField.value = myField.value.substring(0, startPos)
226
- + "%" + myValue + "%"
227
- + myField.value.substring(endPos, myField.value.length);
228
- }
229
- else {
230
- myField.value += "%" + myValue + "%";
231
- }
232
- }
233
-
234
  function check_isnum(e) {
235
  var chCode1 = e.which || e.keyCode;
236
  if ( chCode1 > 31
@@ -247,10 +222,10 @@ function check_isnum(e) {
247
  function fm_check_email(id) {
248
  if (document.getElementById(id) && jQuery('#' + id).val() != '') {
249
  var email_array = jQuery('#' + id).val().split(',');
250
- var re = /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,61}$/;
251
  for (var email_id = 0; email_id < email_array.length; email_id++) {
252
  var email = email_array[email_id].replace(/^\s+|\s+$/g, '');
253
- if ( ! re.test( email ) ) {
254
  alert('This is not a valid email address.');
255
  jQuery('#' + id).css('border', '1px solid #FF0000');
256
  jQuery('#' + id).focus();
@@ -260,8 +235,9 @@ function fm_check_email(id) {
260
  return true;
261
  }
262
  }
263
- jQuery('#' + id).css('border', '1px solid #ddd');
264
  }
 
265
  return false;
266
  }
267
 
50
  stop: function(event, ui) {
51
  jQuery('.wdform_empty_row').remove();
52
  if (ui.item.attr("id") == "add_field" && ui.item.parent().attr("id") != "add_field_cont") {
53
+ if (fm_check_something_really_important()) return false;
54
  nextID = jQuery("#add_field").next(".wdform_row").attr("wdid"); //find next row id for position
55
  jQuery("#add_field").parent().attr("id", "cur_column"); // add id cur_column to this column
56
 
206
  }
207
  }
208
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
209
  function check_isnum(e) {
210
  var chCode1 = e.which || e.keyCode;
211
  if ( chCode1 > 31
222
  function fm_check_email(id) {
223
  if (document.getElementById(id) && jQuery('#' + id).val() != '') {
224
  var email_array = jQuery('#' + id).val().split(',');
225
+ var re = /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,61}$/;
226
  for (var email_id = 0; email_id < email_array.length; email_id++) {
227
  var email = email_array[email_id].replace(/^\s+|\s+$/g, '');
228
+ if ( ! re.test( email ) && jQuery('#' + id).val().indexOf('{') === -1 ) {
229
  alert('This is not a valid email address.');
230
  jQuery('#' + id).css('border', '1px solid #FF0000');
231
  jQuery('#' + id).focus();
235
  return true;
236
  }
237
  }
238
+ jQuery('#' + id).css('border', '1px solid #ddd');
239
  }
240
+
241
  return false;
242
  }
243
 
js/main_div_front_end.js CHANGED
@@ -37,33 +37,36 @@ function set_total_value(form_id) {
37
  div_paypal_tax.html('');
38
  n = parseInt(jQuery('#counter'+form_id).val());
39
  jQuery("#form" +form_id+ " div[type='type_paypal_checkbox'], #form" +form_id+ " div[type='type_paypal_radio']").each(function() {
40
- id=jQuery(this).parent().attr('wdid');
 
41
  jQuery(this).find('input:checked').each(
42
  function() {
43
  label= jQuery("label[for='"+jQuery(this).attr('id')+"']").html();
44
- span_value = FormCurrency + jQuery(this).val()+(jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? ' x'+jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : '');
45
- total =total + jQuery(this).val() * parseInt((jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : 1));
46
  div_paypal_products.html(div_paypal_products.html()+"<div>"+label+ ' - '+ span_value+"</div>");
47
  }
48
  );
49
  });
50
  jQuery("#form" +form_id+ " div[type='type_paypal_shipping']").each(function() {
51
- id=jQuery(this).parent().attr('wdid');
 
52
  jQuery(this).find('input:checked').each(
53
  function() {
54
  label= jQuery("label[for='"+jQuery(this).attr('id')+"']").html();
55
- span_value = FormCurrency + jQuery(this).val()+(jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? ' x'+jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : '');
56
- total_shipping =total_shipping + jQuery(this).val() * parseInt((jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : 1));
57
  div_paypal_products.html(div_paypal_products.html()+"<div>"+label+ ' - '+ span_value+"</div>");
58
  }
59
  );
60
  });
61
  jQuery("#form" +form_id+ " div[type='type_paypal_select']").each(function() {
62
- id=jQuery(this).parent().attr('wdid');
 
63
  if(jQuery(this).find('select').val()!='') {
64
  label = jQuery(this).find('select option:selected').html();
65
- span_value = FormCurrency + jQuery(this).find('select').val()+(jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? ' x'+jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : '');
66
- total =total + jQuery(this).find('select').val() * parseInt((jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : 1));
67
  div_paypal_products.html(div_paypal_products.html()+"<div>"+label+ ' - '+ span_value+"</div>");
68
  }
69
  });
@@ -287,6 +290,11 @@ function wd_validate(that, ids) {
287
  reg_exp = /^\-{0,1}\d+(.\d+){0,1}$/;
288
  break;
289
  }
 
 
 
 
 
290
  case "day": {
291
  error_message = fm_objectL10n.date_validation;
292
  reg_exp = /^(0?[0-2]?[0-9]|3[0-1])?$/;
@@ -1988,17 +1996,19 @@ function formOnload(form_id) {
1988
 
1989
  function fm_document_ready(form_id) {
1990
  var pagebreak_count = jQuery("#form"+form_id+" .wdform-page-and-images").length;
1991
- window['form_view_count' + form_id] = pagebreak_count;
1992
- var maxid = jQuery("#form"+form_id+" .wdform_page").last().attr("id");
1993
- maxid = maxid.split("form_view");
1994
- window['form_view_max' + form_id] = maxid[1];
1995
-
 
 
1996
 
1997
  if (window['form_view_count' + form_id] > 1) {
1998
- firstid = jQuery("#form"+form_id+" .wdform_page").first().attr("id");
1999
- firstid = firstid.split("form_view");
2000
- window['first_form_view' + form_id] = firstid[1];
2001
- generate_page_nav(window['first_form_view' + form_id], form_id, window['form_view_count' + form_id], window['form_view_max' + form_id]);
2002
  }
2003
  fm_initilize_form(form_id);
2004
  }
37
  div_paypal_tax.html('');
38
  n = parseInt(jQuery('#counter'+form_id).val());
39
  jQuery("#form" +form_id+ " div[type='type_paypal_checkbox'], #form" +form_id+ " div[type='type_paypal_radio']").each(function() {
40
+ id = jQuery(this).parent().attr('wdid');
41
+ paypal_checkbox_qty = ( jQuery('#wdform_'+id+"_element_quantity"+form_id).val() ) ? jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : 0;
42
  jQuery(this).find('input:checked').each(
43
  function() {
44
  label= jQuery("label[for='"+jQuery(this).attr('id')+"']").html();
45
+ span_value = FormCurrency + jQuery(this).val()+(jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? ' x ' + paypal_checkbox_qty : '');
46
+ total =total + jQuery(this).val() * parseInt((jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? paypal_checkbox_qty : 1));
47
  div_paypal_products.html(div_paypal_products.html()+"<div>"+label+ ' - '+ span_value+"</div>");
48
  }
49
  );
50
  });
51
  jQuery("#form" +form_id+ " div[type='type_paypal_shipping']").each(function() {
52
+ id = jQuery(this).parent().attr('wdid');
53
+ paypal_shipping_qty = ( jQuery('#wdform_'+id+"_element_quantity"+form_id).val() ) ? jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : 0;
54
  jQuery(this).find('input:checked').each(
55
  function() {
56
  label= jQuery("label[for='"+jQuery(this).attr('id')+"']").html();
57
+ span_value = FormCurrency + jQuery(this).val()+(jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? ' x '+ paypal_shipping_qty : '');
58
+ total_shipping =total_shipping + jQuery(this).val() * parseInt((jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? paypal_shipping_qty : 1));
59
  div_paypal_products.html(div_paypal_products.html()+"<div>"+label+ ' - '+ span_value+"</div>");
60
  }
61
  );
62
  });
63
  jQuery("#form" +form_id+ " div[type='type_paypal_select']").each(function() {
64
+ id = jQuery(this).parent().attr('wdid');
65
+ paypal_select_qty = ( jQuery('#wdform_'+id+"_element_quantity"+form_id).val() ) ? jQuery('#wdform_'+id+"_element_quantity"+form_id).val() : 0;
66
  if(jQuery(this).find('select').val()!='') {
67
  label = jQuery(this).find('select option:selected').html();
68
+ span_value = FormCurrency + jQuery(this).find('select').val()+(jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? ' x ' + paypal_select_qty : '');
69
+ total =total + jQuery(this).find('select').val() * parseInt((jQuery('#wdform_'+id+"_element_quantity"+form_id).length!=0 ? paypal_select_qty : 1));
70
  div_paypal_products.html(div_paypal_products.html()+"<div>"+label+ ' - '+ span_value+"</div>");
71
  }
72
  });
290
  reg_exp = /^\-{0,1}\d+(.\d+){0,1}$/;
291
  break;
292
  }
293
+ case "quantity": {
294
+ error_message = fm_objectL10n.number_validation;
295
+ reg_exp = /^[+]?\d+([.]\d+)?$/;
296
+ break;
297
+ }
298
  case "day": {
299
  error_message = fm_objectL10n.date_validation;
300
  reg_exp = /^(0?[0-2]?[0-9]|3[0-1])?$/;
1996
 
1997
  function fm_document_ready(form_id) {
1998
  var pagebreak_count = jQuery("#form"+form_id+" .wdform-page-and-images").length;
1999
+ window['form_view_count' + form_id] = pagebreak_count;
2000
+ var maxid = jQuery("#form"+form_id+" .wdform_page").last().attr("id");
2001
+ if ( typeof maxid == "undefined" ) {
2002
+ return;
2003
+ }
2004
+ maxid = maxid.split("form_view");
2005
+ window['form_view_max' + form_id] = maxid[1];
2006
 
2007
  if (window['form_view_count' + form_id] > 1) {
2008
+ firstid = jQuery("#form"+form_id+" .wdform_page").first().attr("id");
2009
+ firstid = firstid.split("form_view");
2010
+ window['first_form_view' + form_id] = firstid[1];
2011
+ generate_page_nav(window['first_form_view' + form_id], form_id, window['form_view_count' + form_id], window['form_view_max' + form_id]);
2012
  }
2013
  fm_initilize_form(form_id);
2014
  }
js/shortcode.js CHANGED
@@ -8,9 +8,11 @@ jQuery(document).ready(function () {
8
  var short_code = get_params("Form");
9
  var form = jQuery("select[name='form_maker_id']");
10
 
11
- // Add datepicker to start date and end date.
12
- jQuery(".wd-datepicker").datepicker();
13
- jQuery(".wd-datepicker").datepicker("option", "dateFormat", "yy-mm-dd");
 
 
14
 
15
  if (short_code) {
16
  form.val(short_code['id']);
8
  var short_code = get_params("Form");
9
  var form = jQuery("select[name='form_maker_id']");
10
 
11
+ if ( typeof jQuery().datepicker !== 'undefined' ) {
12
+ // Add datepicker to start date and end date.
13
+ jQuery(".wd-datepicker").datepicker();
14
+ jQuery(".wd-datepicker").datepicker("option", "dateFormat", "yy-mm-dd");
15
+ }
16
 
17
  if (short_code) {
18
  form.val(short_code['id']);
js/themes.js CHANGED
@@ -44,13 +44,13 @@ angular.module('ThemeParams', []).controller('FMTheme', function($scope) {
44
  $scope.DefaultVar = DefaultVar;
45
  });
46
 
47
- function submitbutton(version) {
48
  var all_params = '';
49
  if (version == 1) {
50
  all_params = jQuery('textarea[name=CUPCSS]').serializeObject();
51
  }
52
  else {
53
- all_params = jQuery('#form_maker_themes').serializeObject();
54
  }
55
  jQuery('#params').val(JSON.stringify(all_params).replace(plugin_url, '[SITE_ROOT]'));
56
  return true;
44
  $scope.DefaultVar = DefaultVar;
45
  });
46
 
47
+ function fm_theme_submit_button(form_id, version) {
48
  var all_params = '';
49
  if (version == 1) {
50
  all_params = jQuery('textarea[name=CUPCSS]').serializeObject();
51
  }
52
  else {
53
+ all_params = jQuery('#' + form_id).serializeObject();
54
  }
55
  jQuery('#params').val(JSON.stringify(all_params).replace(plugin_url, '[SITE_ROOT]'));
56
  return true;
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: webdorado,10web,wdsupport,formmakersupport
3
  Tags: form, form builder, contact form, custom form, feedback, contact, web contact form, captcha, email, form manager, forms, survey
4
  Requires at least: 3.4
5
  Tested up to: 4.9
6
- Stable tag: 1.12.22
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -446,9 +446,19 @@ Where **{{field_id}}** is the ID of the field you wish to prefill. Also, **{{par
446
 
447
  == Changelog ==
448
 
 
 
 
 
 
 
 
 
 
 
449
  = 1.12.22 =
450
- * Fixed: security issue with CSV export.
451
-
452
  = 1.12.21 =
453
  * Changed: DB field length.
454
 
3
  Tags: form, form builder, contact form, custom form, feedback, contact, web contact form, captcha, email, form manager, forms, survey
4
  Requires at least: 3.4
5
  Tested up to: 4.9
6
+ Stable tag: 1.12.24
7
  License: GPLv2 or later
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
446
 
447
  == Changelog ==
448
 
449
+ = 1.12.24 =
450
+ * Improved: Insert placeholder functionality.
451
+ * Fixed: Action after submission text for popup forms.
452
+ * Fixed: Do not allow negative numbers as quantity.
453
+ * Added: Loading for add-ons options.
454
+ * Added: Premium version page new style.
455
+ * Added: Add-ons page new style.
456
+ * Fixed: Submission id bug.
457
+ * Fixed: Security issue reported by Sairam Jetty.
458
+
459
  = 1.12.22 =
460
+ * Fixed: Security issue with CSV export.
461
+
462
  = 1.12.21 =
463
  * Changed: DB field length.
464