Version Description
- Improved: CSV, XML export.
- Improved: default email design
- Improved: Minor improvements in email options
- Fixed: PHP validation for email.
- Fixed: Preserve the list of columns displayed when changing the page.
- Fixed: Do not display ScrollBox form after Successful submission.
Download this release
Release Info
Developer | webdorado |
Plugin | Contact Form by WD – responsive drag & drop contact form builder tool |
Version | 1.12.31 |
Comparing to | |
See all releases |
Code changes from version 1.12.30 to 1.12.31
- admin/controllers/Blocked_ips_fm.php +26 -8
- admin/controllers/FMShortocde.php +4 -2
- admin/controllers/FormMakerSQLMapping.php +10 -4
- admin/controllers/Generete_csv.php +92 -91
- admin/controllers/Generete_xml.php +53 -40
- admin/controllers/Manage_fm.php +76 -51
- admin/controllers/Pricing_fm.php +5 -5
- admin/controllers/Select_data_from_db.php +3 -3
- admin/controllers/Submissions_fm.php +17 -14
- admin/controllers/Themes_fm.php +30 -18
- admin/controllers/Widget.php +21 -4
- admin/models/Blocked_ips_fm.php +11 -9
- admin/models/Checkpaypal.php +6 -9
- admin/models/FMPaypalInfo.php +1 -2
- admin/models/FMSelectDataFromDb.php +3 -4
- admin/models/FMSqlMapping.php +2 -4
- admin/models/FormMakerSubmits.php +14 -2
- admin/models/Manage_fm.php +148 -49
- admin/models/Options_fm.php +4 -1
- admin/models/Submissions_fm.php +216 -49
- admin/models/Themes_fm.php +18 -14
- admin/views/Addons_fm.php +6 -1
- admin/views/Blocked_ips_fm.php +5 -3
- admin/views/Checkpaypal.php +1 -2
- admin/views/FMCaptcha.php +2 -2
- admin/views/FMEditCountryinPopup.php +1 -1
- admin/views/FMIpinfoinPopup.php +1 -1
- admin/views/FMMapEditinPopup.php +1 -1
- admin/views/FMMathCaptcha.php +15 -3
- admin/views/FMPaypalInfo.php +16 -16
- admin/views/FMProductOption.php +1 -1
- admin/views/FMSelectDataFromDb.php +3 -3
- admin/views/FMShortocde.php +2 -2
- admin/views/FMShowMatrix.php +1 -1
- admin/views/FMSqlMapping.php +24 -4
- admin/views/FormMakerSubmits.php +6 -1
- admin/views/Manage_fm.php +125 -87
- admin/views/Options_fm.php +10 -2
- admin/views/Pricing_fm.php +7 -2
- admin/views/Submissions_fm.php +242 -191
- admin/views/Themes_fm.php +6 -4
- admin/views/Uninstall_fm.php +18 -5
- admin/views/Widget.php +18 -3
- admin/views/view.php +10 -4
- contact-form-maker.php +36 -11
- css/form_maker_tables.css +28 -7
- css/style.css +20 -16
- css/style_submissions.css +4 -0
- form_maker_insert.php +8 -6
- form_maker_update.php +5 -0
- framework/WDW_FM_Library.php +159 -60
- frontend/controllers/form_maker.php +24 -9
- frontend/models/form_maker.php +229 -197
- frontend/models/verify_email.php +4 -4
- frontend/views/form_maker.php +284 -100
- frontend/views/verify_email.php +2 -2
- js/add_field.js +28 -28
- js/form_maker_admin.js +77 -3
- js/form_maker_form_options.js +4 -4
- js/form_maker_manage.js +42 -9
- js/form_maker_submissions.js +135 -9
- js/frontend/.gitignore +0 -0
- js/main_div_front_end.js +2 -2
- readme.txt +13 -19
admin/controllers/Blocked_ips_fm.php
CHANGED
@@ -73,9 +73,9 @@ class FMControllerBlocked_ips_fmc extends CFMAdminController {
|
|
73 |
/**
|
74 |
* Bulk actions.
|
75 |
*
|
76 |
-
* @param $task
|
77 |
*/
|
78 |
-
public function bulk_action($task) {
|
79 |
$message = 0;
|
80 |
$successfully_updated = 0;
|
81 |
$check = WDW_FM_Library(self::PLUGIN)->get('check', '');
|
@@ -101,6 +101,9 @@ class FMControllerBlocked_ips_fmc extends CFMAdminController {
|
|
101 |
), admin_url('admin.php')));
|
102 |
}
|
103 |
|
|
|
|
|
|
|
104 |
public function insert_blocked_ip() {
|
105 |
|
106 |
$page = WDW_FM_Library(self::PLUGIN)->get('page');
|
@@ -118,7 +121,12 @@ class FMControllerBlocked_ips_fmc extends CFMAdminController {
|
|
118 |
}
|
119 |
}
|
120 |
|
121 |
-
|
|
|
|
|
|
|
|
|
|
|
122 |
$page = WDW_FM_Library(self::PLUGIN)->get('page');
|
123 |
// check id for db
|
124 |
if(isset($id) && $id != "") {
|
@@ -149,11 +157,14 @@ class FMControllerBlocked_ips_fmc extends CFMAdminController {
|
|
149 |
|
150 |
echo '<div id="total_for_paging">'.$total/$this->items_per_page.'</div>'; // send to JS page number
|
151 |
}
|
152 |
-
|
153 |
-
|
154 |
}
|
155 |
|
156 |
-
|
|
|
|
|
|
|
|
|
|
|
157 |
$page = WDW_FM_Library(self::PLUGIN)->get('page');
|
158 |
|
159 |
// check id for db
|
@@ -180,10 +191,17 @@ class FMControllerBlocked_ips_fmc extends CFMAdminController {
|
|
180 |
'message' => $message,
|
181 |
), admin_url('admin.php')));
|
182 |
}
|
183 |
-
|
184 |
}
|
185 |
|
186 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
187 |
if ( $this->model->delete_data($id) ) {
|
188 |
$message = 3;
|
189 |
}
|
73 |
/**
|
74 |
* Bulk actions.
|
75 |
*
|
76 |
+
* @param string $task
|
77 |
*/
|
78 |
+
public function bulk_action( $task = '' ) {
|
79 |
$message = 0;
|
80 |
$successfully_updated = 0;
|
81 |
$check = WDW_FM_Library(self::PLUGIN)->get('check', '');
|
101 |
), admin_url('admin.php')));
|
102 |
}
|
103 |
|
104 |
+
/**
|
105 |
+
* Insert blocked ip
|
106 |
+
*/
|
107 |
public function insert_blocked_ip() {
|
108 |
|
109 |
$page = WDW_FM_Library(self::PLUGIN)->get('page');
|
121 |
}
|
122 |
}
|
123 |
|
124 |
+
/**
|
125 |
+
* Delete blocked ip.
|
126 |
+
*
|
127 |
+
* @param int $id
|
128 |
+
*/
|
129 |
+
public function delete_blocked_ip( $id = 0 ) {
|
130 |
$page = WDW_FM_Library(self::PLUGIN)->get('page');
|
131 |
// check id for db
|
132 |
if(isset($id) && $id != "") {
|
157 |
|
158 |
echo '<div id="total_for_paging">'.$total/$this->items_per_page.'</div>'; // send to JS page number
|
159 |
}
|
|
|
|
|
160 |
}
|
161 |
|
162 |
+
/**
|
163 |
+
* Update blocked ip.
|
164 |
+
*
|
165 |
+
* @param int $id
|
166 |
+
*/
|
167 |
+
public function update_blocked_ip( $id = 0 ) {
|
168 |
$page = WDW_FM_Library(self::PLUGIN)->get('page');
|
169 |
|
170 |
// check id for db
|
191 |
'message' => $message,
|
192 |
), admin_url('admin.php')));
|
193 |
}
|
|
|
194 |
}
|
195 |
|
196 |
+
/**
|
197 |
+
*
|
198 |
+
* Delete.
|
199 |
+
*
|
200 |
+
* @param int $id
|
201 |
+
* @param bool $bulk
|
202 |
+
* @return int
|
203 |
+
*/
|
204 |
+
public function delete( $id = 0, $bulk = FALSE ) {
|
205 |
if ( $this->model->delete_data($id) ) {
|
206 |
$message = 3;
|
207 |
}
|
admin/controllers/FMShortocde.php
CHANGED
@@ -28,8 +28,10 @@ class FMControllerFMShortocde_fmc extends CFMAdminController {
|
|
28 |
|
29 |
/**
|
30 |
* Display.
|
|
|
|
|
31 |
*/
|
32 |
-
public function display($task) {
|
33 |
// Get forms.
|
34 |
$forms = $this->model->get_form_data();
|
35 |
|
@@ -37,7 +39,7 @@ class FMControllerFMShortocde_fmc extends CFMAdminController {
|
|
37 |
$this->view->$task($forms);
|
38 |
}
|
39 |
else {
|
40 |
-
$this->view->
|
41 |
}
|
42 |
}
|
43 |
}
|
28 |
|
29 |
/**
|
30 |
* Display.
|
31 |
+
*
|
32 |
+
* @param string $task
|
33 |
*/
|
34 |
+
public function display( $task = '' ) {
|
35 |
// Get forms.
|
36 |
$forms = $this->model->get_form_data();
|
37 |
|
39 |
$this->view->$task($forms);
|
40 |
}
|
41 |
else {
|
42 |
+
$this->view->forms($forms);
|
43 |
}
|
44 |
}
|
45 |
}
|
admin/controllers/FormMakerSQLMapping.php
CHANGED
@@ -50,7 +50,7 @@ class FMControllerFormMakerSQLMapping_fmc extends CFMAdminController {
|
|
50 |
*
|
51 |
* @param int $form_id
|
52 |
*/
|
53 |
-
public function add_query( $form_id ) {
|
54 |
// Get labels by form id.
|
55 |
$label = $this->model->get_labels($form_id);
|
56 |
// Set params for view.
|
@@ -66,7 +66,7 @@ class FMControllerFormMakerSQLMapping_fmc extends CFMAdminController {
|
|
66 |
* @param int $id
|
67 |
* @param int $form_id
|
68 |
*/
|
69 |
-
public function edit_query( $id, $form_id ) {
|
70 |
// Get labels by form id.
|
71 |
$label = $this->model->get_labels($form_id);
|
72 |
// Get query by id.
|
@@ -106,7 +106,7 @@ class FMControllerFormMakerSQLMapping_fmc extends CFMAdminController {
|
|
106 |
*
|
107 |
* @param int $form_id
|
108 |
*/
|
109 |
-
public function db_tables( $form_id ) {
|
110 |
// Get all tables.
|
111 |
$tables = $this->model->get_tables();
|
112 |
// Set params for view.
|
@@ -121,7 +121,7 @@ class FMControllerFormMakerSQLMapping_fmc extends CFMAdminController {
|
|
121 |
*
|
122 |
* @param int $form_id
|
123 |
*/
|
124 |
-
public function db_table_struct( $form_id ) {
|
125 |
$con_method = WDW_FM_Library(self::PLUGIN)->get('con_method', '');
|
126 |
// Get labels by form id.
|
127 |
$label = $this->model->get_labels($form_id);
|
@@ -136,6 +136,9 @@ class FMControllerFormMakerSQLMapping_fmc extends CFMAdminController {
|
|
136 |
$this->view->db_table_struct($params);
|
137 |
}
|
138 |
|
|
|
|
|
|
|
139 |
public function save_query() {
|
140 |
global $wpdb;
|
141 |
$form_id = ((isset($_GET['form_id'])) ? (int) $_GET['form_id'] : 0);
|
@@ -152,6 +155,9 @@ class FMControllerFormMakerSQLMapping_fmc extends CFMAdminController {
|
|
152 |
));
|
153 |
}
|
154 |
|
|
|
|
|
|
|
155 |
public function update_query() {
|
156 |
global $wpdb;
|
157 |
$id = ((isset($_GET['id'])) ? (int) $_GET['id'] : 0);
|
50 |
*
|
51 |
* @param int $form_id
|
52 |
*/
|
53 |
+
public function add_query( $form_id = 0 ) {
|
54 |
// Get labels by form id.
|
55 |
$label = $this->model->get_labels($form_id);
|
56 |
// Set params for view.
|
66 |
* @param int $id
|
67 |
* @param int $form_id
|
68 |
*/
|
69 |
+
public function edit_query( $id = 0, $form_id = 0 ) {
|
70 |
// Get labels by form id.
|
71 |
$label = $this->model->get_labels($form_id);
|
72 |
// Get query by id.
|
106 |
*
|
107 |
* @param int $form_id
|
108 |
*/
|
109 |
+
public function db_tables( $form_id = 0 ) {
|
110 |
// Get all tables.
|
111 |
$tables = $this->model->get_tables();
|
112 |
// Set params for view.
|
121 |
*
|
122 |
* @param int $form_id
|
123 |
*/
|
124 |
+
public function db_table_struct( $form_id = 0 ) {
|
125 |
$con_method = WDW_FM_Library(self::PLUGIN)->get('con_method', '');
|
126 |
// Get labels by form id.
|
127 |
$label = $this->model->get_labels($form_id);
|
136 |
$this->view->db_table_struct($params);
|
137 |
}
|
138 |
|
139 |
+
/**
|
140 |
+
* Save query.
|
141 |
+
*/
|
142 |
public function save_query() {
|
143 |
global $wpdb;
|
144 |
$form_id = ((isset($_GET['form_id'])) ? (int) $_GET['form_id'] : 0);
|
155 |
));
|
156 |
}
|
157 |
|
158 |
+
/**
|
159 |
+
* Update query.
|
160 |
+
*/
|
161 |
public function update_query() {
|
162 |
global $wpdb;
|
163 |
$id = ((isset($_GET['id'])) ? (int) $_GET['id'] : 0);
|
admin/controllers/Generete_csv.php
CHANGED
@@ -4,115 +4,116 @@
|
|
4 |
* Class FMControllerGenerete_csv_fmc
|
5 |
*/
|
6 |
class FMControllerGenerete_csv_fmc extends CFMAdminController {
|
|
|
7 |
/**
|
8 |
* Execute.
|
9 |
*/
|
10 |
public function execute() {
|
11 |
-
|
|
|
12 |
}
|
13 |
|
14 |
/**
|
15 |
-
*
|
16 |
*/
|
17 |
public function display() {
|
18 |
// Get form maker settings
|
19 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
$csv_delimiter = isset($fm_settings['csv_delimiter']) ? $fm_settings['csv_delimiter'] : ',';
|
21 |
$form_id = (int) $_REQUEST['form_id'];
|
22 |
$limitstart = (int) $_REQUEST['limitstart'];
|
23 |
$send_header = (int) $_REQUEST['send_header'];
|
24 |
$params = WDW_FM_Library(self::PLUGIN)->get_submissions_to_export();
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
$sorted_label_names_original = $labels_parameters[4];
|
31 |
-
$sorted_label_names_original = array_merge(array(
|
32 |
-
'ID',
|
33 |
-
"Submit date",
|
34 |
-
"Submitter's IP",
|
35 |
-
"Submitter's Username",
|
36 |
-
"Submitter's Email Address",
|
37 |
-
), $sorted_label_names_original);
|
38 |
-
|
39 |
-
if (($key = array_search('stripe', $sorted_label_names_original)) !== false) {
|
40 |
-
unset($sorted_label_names_original[$key]);
|
41 |
-
}
|
42 |
-
|
43 |
-
$sorted_label_names = array();
|
44 |
-
function unique_label($sorted_label_names, $label) {
|
45 |
-
if ( in_array($label, $sorted_label_names) ) {
|
46 |
-
return unique_label($sorted_label_names, $label . '(1)');
|
47 |
-
}
|
48 |
-
else {
|
49 |
-
return $label;
|
50 |
-
}
|
51 |
-
}
|
52 |
-
foreach ( $sorted_label_names_original as $key => $label ) {
|
53 |
-
$sorted_label_names[] = unique_label($sorted_label_names, $label);
|
54 |
-
}
|
55 |
-
|
56 |
-
foreach ( $data as $key => $row ) {
|
57 |
-
$sorted_data = array();
|
58 |
-
foreach ( $sorted_label_names as $label ) {
|
59 |
-
if ( !array_key_exists($label, $row) ) {
|
60 |
-
$sorted_data[$label] = '';
|
61 |
-
}
|
62 |
-
else {
|
63 |
-
$sorted_data[$label] = $row[$label];
|
64 |
-
}
|
65 |
-
}
|
66 |
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
}
|
76 |
-
|
77 |
-
$upload_dir = wp_upload_dir();
|
78 |
-
$file_path = $upload_dir['basedir'] . '/form-maker';
|
79 |
-
if ( !is_dir($file_path) ) {
|
80 |
-
mkdir($file_path, 0777);
|
81 |
-
}
|
82 |
-
$tempfile = $file_path . '/export' . $form_id . '.txt';
|
83 |
-
if ( $limitstart == 0 && file_exists($tempfile) ) {
|
84 |
-
unlink($tempfile);
|
85 |
-
}
|
86 |
-
$output = fopen($tempfile, "a");
|
87 |
|
88 |
-
|
89 |
-
|
90 |
-
|
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 |
-
}
|
100 |
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
}
|
118 |
}
|
4 |
* Class FMControllerGenerete_csv_fmc
|
5 |
*/
|
6 |
class FMControllerGenerete_csv_fmc extends CFMAdminController {
|
7 |
+
|
8 |
/**
|
9 |
* Execute.
|
10 |
*/
|
11 |
public function execute() {
|
12 |
+
$this->display();
|
13 |
+
die();
|
14 |
}
|
15 |
|
16 |
/**
|
17 |
+
* Display.
|
18 |
*/
|
19 |
public function display() {
|
20 |
// Get form maker settings
|
21 |
+
$option_key = WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings';
|
22 |
+
$fm_settings = get_option($option_key);
|
23 |
+
// Update export per_page.
|
24 |
+
$page_num_update = WDW_FM_Library(self::PLUGIN)->get('page_num_update');
|
25 |
+
if ( $page_num_update ) {
|
26 |
+
$fm_settings['ajax_export_per_page'] = WDW_FM_Library(self::PLUGIN)->get('page_num');
|
27 |
+
update_option( $option_key, $fm_settings );
|
28 |
+
}
|
29 |
$csv_delimiter = isset($fm_settings['csv_delimiter']) ? $fm_settings['csv_delimiter'] : ',';
|
30 |
$form_id = (int) $_REQUEST['form_id'];
|
31 |
$limitstart = (int) $_REQUEST['limitstart'];
|
32 |
$send_header = (int) $_REQUEST['send_header'];
|
33 |
$params = WDW_FM_Library(self::PLUGIN)->get_submissions_to_export();
|
34 |
+
if ( !empty($params) ) {
|
35 |
+
$data = $params[0];
|
36 |
+
$title = $params[1];
|
37 |
+
if ( !empty( $data ) ) {
|
38 |
+
$labels_parameters = WDW_FM_Library(self::PLUGIN)->get_labels_parameters( $form_id );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
+
$sorted_label_names_original = $labels_parameters[4];
|
41 |
+
$sorted_label_names_original = array_merge(array(
|
42 |
+
'ID',
|
43 |
+
"Submit date",
|
44 |
+
"Submitter's IP",
|
45 |
+
"Submitter's Username",
|
46 |
+
"Submitter's Email Address",
|
47 |
+
), $sorted_label_names_original);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
|
49 |
+
if (($key = array_search('stripe', $sorted_label_names_original)) !== false) {
|
50 |
+
unset($sorted_label_names_original[$key]);
|
51 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
+
$sorted_label_names = array();
|
54 |
+
function unique_label($sorted_label_names, $label) {
|
55 |
+
if ( in_array($label, $sorted_label_names) ) {
|
56 |
+
return unique_label($sorted_label_names, $label . '(1)');
|
57 |
+
}
|
58 |
+
else {
|
59 |
+
return $label;
|
60 |
+
}
|
61 |
+
}
|
62 |
+
foreach ( $sorted_label_names_original as $key => $label ) {
|
63 |
+
$sorted_label_names[] = unique_label($sorted_label_names, $label);
|
64 |
+
}
|
65 |
|
66 |
+
foreach ( $data as $key => $row ) {
|
67 |
+
$sorted_data = array();
|
68 |
+
foreach ( $sorted_label_names as $label ) {
|
69 |
+
if ( !array_key_exists($label, $row) ) {
|
70 |
+
$sorted_data[$label] = '';
|
71 |
+
}
|
72 |
+
else {
|
73 |
+
$sorted_data[$label] = $row[$label];
|
74 |
+
}
|
75 |
+
}
|
76 |
+
$data[$key] = $sorted_data;
|
77 |
+
}
|
78 |
+
$upload_dir = wp_upload_dir();
|
79 |
+
$file_path = $upload_dir['basedir'] . '/form-maker';
|
80 |
+
if ( !is_dir($file_path) ) {
|
81 |
+
mkdir($file_path, 0777);
|
82 |
+
}
|
83 |
+
$tempfile = $file_path . '/export' . $form_id . '.txt';
|
84 |
+
if ( $limitstart == 0 && file_exists($tempfile) ) {
|
85 |
+
unlink($tempfile);
|
86 |
+
}
|
87 |
+
$output = fopen($tempfile, "a");
|
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 $index => $record ) {
|
95 |
+
foreach ( $record as $i => $rec ) {
|
96 |
+
$record[$i] = ltrim($rec, '=+-@');
|
97 |
+
}
|
98 |
+
if ( !empty($index) ) {
|
99 |
+
fputcsv($output, $record, $csv_delimiter);
|
100 |
+
}
|
101 |
+
}
|
102 |
+
fclose($output);
|
103 |
+
if ( $send_header == 1 ) {
|
104 |
+
$txtfile = fopen($tempfile, "r");
|
105 |
+
$txtfilecontent = fread($txtfile, filesize($tempfile));
|
106 |
+
fclose($txtfile);
|
107 |
+
$filename = $title . "_" . date('Ymd') . ".csv";
|
108 |
+
header('Content-Encoding: UTF-8');
|
109 |
+
header('content-type: application/csv; charset=UTF-8');
|
110 |
+
header("Content-Disposition: attachment; filename=\"$filename\"");
|
111 |
+
// Set UTF-8 BOM
|
112 |
+
echo "\xEF\xBB\xBF";
|
113 |
+
echo $txtfilecontent;
|
114 |
+
unlink($tempfile);
|
115 |
+
}
|
116 |
+
}
|
117 |
+
}
|
118 |
}
|
119 |
}
|
admin/controllers/Generete_xml.php
CHANGED
@@ -4,58 +4,71 @@
|
|
4 |
* Class FMControllerGenerete_xml_fmc
|
5 |
*/
|
6 |
class FMControllerGenerete_xml_fmc extends CFMAdminController {
|
|
|
7 |
/**
|
8 |
* Execute.
|
9 |
*/
|
10 |
public function execute() {
|
11 |
$this->display();
|
|
|
12 |
}
|
13 |
|
14 |
public function display() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
$form_id = (int) $_REQUEST['form_id'];
|
16 |
$limitstart = (int) $_REQUEST['limitstart'];
|
17 |
$send_header = (int) $_REQUEST['send_header'];
|
18 |
$params = WDW_FM_Library(self::PLUGIN)->get_submissions_to_export();
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
}
|
36 |
-
foreach ( $data as $key1 => $value1 ) {
|
37 |
-
fwrite($output, PHP_TAB . '<submission id="' . $key1 . '">' . PHP_EOL);
|
38 |
-
foreach ( $value1 as $key => $value ) {
|
39 |
-
fwrite($output, PHP_TAB . PHP_TAB . '<field title="' . $key . '">' . PHP_EOL);
|
40 |
-
fwrite($output, PHP_TAB . PHP_TAB . PHP_TAB . '<![CDATA[' . $value . ']]>' . PHP_EOL);
|
41 |
-
fwrite($output, PHP_TAB . PHP_TAB . '</field>' . PHP_EOL);
|
42 |
-
}
|
43 |
-
fwrite($output, PHP_TAB . '</submission>' . PHP_EOL);
|
44 |
-
}
|
45 |
-
if ( $send_header == 1 ) {
|
46 |
-
fwrite($output, '</form>');
|
47 |
-
fclose($output);
|
48 |
-
$txtfile = fopen($tempfile, "r");
|
49 |
-
$txtfilecontent = fread($txtfile, filesize($tempfile));
|
50 |
-
fclose($txtfile);
|
51 |
-
$filename = $title . "_" . date('Ymd') . ".xml";
|
52 |
-
header('Content-Encoding: Windows-1252');
|
53 |
-
header('Content-type: text/xml; charset=utf-8');
|
54 |
-
header("Content-Disposition: attachment; filename=\"$filename\"");
|
55 |
-
echo $txtfilecontent;
|
56 |
-
unlink($tempfile);
|
57 |
-
}
|
58 |
-
|
59 |
-
die();
|
60 |
}
|
61 |
}
|
4 |
* Class FMControllerGenerete_xml_fmc
|
5 |
*/
|
6 |
class FMControllerGenerete_xml_fmc extends CFMAdminController {
|
7 |
+
|
8 |
/**
|
9 |
* Execute.
|
10 |
*/
|
11 |
public function execute() {
|
12 |
$this->display();
|
13 |
+
die();
|
14 |
}
|
15 |
|
16 |
public function display() {
|
17 |
+
// Get form maker settings
|
18 |
+
$option_key = WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings';
|
19 |
+
$fm_settings = get_option($option_key);
|
20 |
+
// Update export per_page.
|
21 |
+
$page_num_update = WDW_FM_Library(self::PLUGIN)->get('page_num_update');
|
22 |
+
if ( $page_num_update ) {
|
23 |
+
$fm_settings['ajax_export_per_page'] = WDW_FM_Library(self::PLUGIN)->get('page_num');
|
24 |
+
update_option( $option_key, $fm_settings );
|
25 |
+
}
|
26 |
$form_id = (int) $_REQUEST['form_id'];
|
27 |
$limitstart = (int) $_REQUEST['limitstart'];
|
28 |
$send_header = (int) $_REQUEST['send_header'];
|
29 |
$params = WDW_FM_Library(self::PLUGIN)->get_submissions_to_export();
|
30 |
+
if (!empty($params) ) {
|
31 |
+
$data = $params[0];
|
32 |
+
$title = $params[1];
|
33 |
+
define('PHP_TAB', "\t");
|
34 |
+
$upload_dir = wp_upload_dir();
|
35 |
+
$file_path = $upload_dir['basedir'] . '/form-maker';
|
36 |
+
if ( !is_dir($file_path) ) {
|
37 |
+
mkdir($file_path, 0777);
|
38 |
+
}
|
39 |
+
$tempfile = $file_path . '/export' . $form_id . '.txt';
|
40 |
+
if ( $limitstart == 0 && file_exists($tempfile) ) {
|
41 |
+
unlink($tempfile);
|
42 |
+
}
|
43 |
+
$output = fopen($tempfile, "a");
|
44 |
+
if ( $limitstart == 0 ) {
|
45 |
+
fwrite($output, '<?xml version="1.0" encoding="utf-8" ?>' . PHP_EOL);
|
46 |
+
fwrite($output, '<form title="' . $title . '">' . PHP_EOL);
|
47 |
+
}
|
48 |
+
foreach ( $data as $key1 => $value1 ) {
|
49 |
+
if ( !empty($key1) ) {
|
50 |
+
fwrite($output, PHP_TAB . '<submission id="' . $key1 . '">' . PHP_EOL);
|
51 |
+
foreach ( $value1 as $key => $value ) {
|
52 |
+
fwrite($output, PHP_TAB . PHP_TAB . '<field title="' . $key . '">' . PHP_EOL);
|
53 |
+
fwrite($output, PHP_TAB . PHP_TAB . PHP_TAB . '<![CDATA[' . $value . ']]>' . PHP_EOL);
|
54 |
+
fwrite($output, PHP_TAB . PHP_TAB . '</field>' . PHP_EOL);
|
55 |
+
}
|
56 |
+
fwrite($output, PHP_TAB . '</submission>' . PHP_EOL);
|
57 |
+
}
|
58 |
+
}
|
59 |
+
if ( $send_header == 1 ) {
|
60 |
+
fwrite($output, '</form>');
|
61 |
+
fclose($output);
|
62 |
+
$txtfile = fopen($tempfile, "r");
|
63 |
+
$txtfilecontent = fread($txtfile, filesize($tempfile));
|
64 |
+
fclose($txtfile);
|
65 |
+
$filename = $title . "_" . date('Ymd') . ".xml";
|
66 |
+
header('Content-Encoding: Windows-1252');
|
67 |
+
header('Content-type: text/xml; charset=utf-8');
|
68 |
+
header("Content-Disposition: attachment; filename=\"$filename\"");
|
69 |
+
echo $txtfilecontent;
|
70 |
+
unlink($tempfile);
|
71 |
+
}
|
72 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
73 |
}
|
74 |
}
|
admin/controllers/Manage_fm.php
CHANGED
@@ -132,9 +132,9 @@ class FMControllerManage_fmc extends CFMAdminController {
|
|
132 |
/**
|
133 |
* Bulk actions.
|
134 |
*
|
135 |
-
* @param $task
|
136 |
*/
|
137 |
-
public function bulk_action($task) {
|
138 |
$message = 0;
|
139 |
$successfully_updated = 0;
|
140 |
|
@@ -167,12 +167,12 @@ class FMControllerManage_fmc extends CFMAdminController {
|
|
167 |
/**
|
168 |
* Delete form by id.
|
169 |
*
|
170 |
-
* @param $id
|
171 |
* @param bool $bulk
|
172 |
*
|
173 |
* @return int
|
174 |
*/
|
175 |
-
public function delete( $id, $bulk = FALSE ) {
|
176 |
if ( $this->model->delete_rows(array( "table" => "formmaker", "where" => "id = " . $id )) ) {
|
177 |
$this->model->delete_rows(array( "table" => "formmaker_views", "where" => "form_id = " . $id ));
|
178 |
$this->model->delete_rows(array( "table" => "formmaker_submits", "where" => "form_id = " . $id ));
|
@@ -210,12 +210,12 @@ class FMControllerManage_fmc extends CFMAdminController {
|
|
210 |
/**
|
211 |
* Publish by id.
|
212 |
*
|
213 |
-
* @param $id
|
214 |
* @param bool $bulk
|
215 |
*
|
216 |
* @return int
|
217 |
*/
|
218 |
-
public function publish( $id, $bulk = FALSE ) {
|
219 |
$updated = $this->model->update_data("formmaker", array('published' => 1), array('id' => $id));
|
220 |
if ( $updated !== FALSE ) {
|
221 |
$message = 9;
|
@@ -239,12 +239,12 @@ class FMControllerManage_fmc extends CFMAdminController {
|
|
239 |
/**
|
240 |
* Unpublish by id.
|
241 |
*
|
242 |
-
* @param $id
|
243 |
* @param bool $bulk
|
244 |
*
|
245 |
* @return int
|
246 |
*/
|
247 |
-
public function unpublish( $id, $bulk = FALSE ) {
|
248 |
$updated = $this->model->update_data("formmaker", array('published' => 0), array('id' => $id));
|
249 |
if ( $updated !== FALSE ) {
|
250 |
$message = 10;
|
@@ -268,12 +268,12 @@ class FMControllerManage_fmc extends CFMAdminController {
|
|
268 |
/**
|
269 |
* Duplicate by id.
|
270 |
*
|
271 |
-
* @param $id
|
272 |
* @param bool $bulk
|
273 |
*
|
274 |
* @return int
|
275 |
*/
|
276 |
-
public function duplicate( $id, $bulk = FALSE ) {
|
277 |
$message = 2;
|
278 |
$row = $this->model->select_rows("get_row", array(
|
279 |
"selection" => "*",
|
@@ -350,7 +350,13 @@ class FMControllerManage_fmc extends CFMAdminController {
|
|
350 |
$this->view->edit($params);
|
351 |
}
|
352 |
|
353 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
354 |
$fm_settings = get_option(WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
|
355 |
$fm_advanced_layout = isset($fm_settings['fm_advanced_layout']) && $fm_settings['fm_advanced_layout'] == '1' ? 1 : 0;
|
356 |
if ( $id && !$fm_advanced_layout ) {
|
@@ -453,7 +459,7 @@ class FMControllerManage_fmc extends CFMAdminController {
|
|
453 |
*
|
454 |
* @param int $id
|
455 |
*/
|
456 |
-
public function form_options( $id ) {
|
457 |
// Set params for view.
|
458 |
$params = array();
|
459 |
$params[ 'id' ] = $id;
|
@@ -578,10 +584,9 @@ class FMControllerManage_fmc extends CFMAdminController {
|
|
578 |
* Get active addons.
|
579 |
*
|
580 |
* @param $params
|
581 |
-
*
|
582 |
* @return mixed|void
|
583 |
*/
|
584 |
-
private function get_addon_tabs( $params ) {
|
585 |
$addons = array('tabs' => array(), 'html' => array());
|
586 |
if (WDFMInstance(self::PLUGIN)->is_free != 2) {
|
587 |
$addons = apply_filters('fm_get_addon_init', $addons, $params);
|
@@ -594,7 +599,7 @@ class FMControllerManage_fmc extends CFMAdminController {
|
|
594 |
*
|
595 |
* @param int $id
|
596 |
*/
|
597 |
-
public function apply_form_options( $id ) {
|
598 |
$fieldset_id = WDW_FM_Library(self::PLUGIN)->get('fieldset_id', 'general');
|
599 |
$message = $this->save_db_form_options( $id );
|
600 |
WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
|
@@ -610,10 +615,9 @@ class FMControllerManage_fmc extends CFMAdminController {
|
|
610 |
* Save db Form options.
|
611 |
*
|
612 |
* @param int $id
|
613 |
-
*
|
614 |
* @return int $id_message
|
615 |
*/
|
616 |
-
public function save_db_form_options( $id ) {
|
617 |
$javascript = "// Occurs before the form is loaded
|
618 |
function before_load() {
|
619 |
|
@@ -633,15 +637,12 @@ function after_submit() {
|
|
633 |
|
634 |
$published = stripslashes(WDW_FM_Library(self::PLUGIN)->get('published', ''));
|
635 |
$savedb = stripslashes(WDW_FM_Library(self::PLUGIN)->get('savedb', ''));
|
636 |
-
|
637 |
-
|
638 |
$requiredmark = stripslashes(WDW_FM_Library(self::PLUGIN)->get('requiredmark', '*'));
|
639 |
$sendemail = stripslashes(WDW_FM_Library(self::PLUGIN)->get('sendemail', ''));
|
640 |
$save_uploads = stripslashes(WDW_FM_Library(self::PLUGIN)->get('save_uploads', ''));
|
641 |
$mail = stripslashes(WDW_FM_Library(self::PLUGIN)->get('mail', ''));
|
642 |
-
if ( isset($_POST['mailToAdd']) && esc_html(stripslashes($_POST['mailToAdd'])) != '' ) {
|
643 |
-
$mail .= esc_html(stripslashes($_POST['mailToAdd'])) . ',';
|
644 |
-
}
|
645 |
$from_mail = stripslashes(WDW_FM_Library(self::PLUGIN)->get('from_mail', ''));
|
646 |
$from_name = stripslashes(WDW_FM_Library(self::PLUGIN)->get('from_name', ''));
|
647 |
$reply_to = stripslashes(WDW_FM_Library(self::PLUGIN)->get('reply_to', ''));
|
@@ -716,6 +717,14 @@ function after_submit() {
|
|
716 |
$article_id = 0;
|
717 |
}
|
718 |
$mail_verification_post_id = (int) $this->model->get_mail_verification_post_id();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
719 |
if ( $mail_verify ) {
|
720 |
$email_verification_post = array(
|
721 |
'post_title' => 'Email Verification',
|
@@ -729,7 +738,7 @@ function after_submit() {
|
|
729 |
}
|
730 |
}
|
731 |
|
732 |
-
|
733 |
'published' => $published,
|
734 |
'savedb' => $savedb,
|
735 |
'theme' => $theme,
|
@@ -774,9 +783,10 @@ function after_submit() {
|
|
774 |
'mail_verify' => $mail_verify,
|
775 |
'mail_verify_expiretime' => $mail_verify_expiretime,
|
776 |
'mail_verification_post_id' => $mail_verification_post_id,
|
|
|
777 |
);
|
778 |
|
779 |
-
|
780 |
$save = $this->model->update_data('formmaker', $data, array( 'id' => $id ));
|
781 |
if ( $save !== FALSE ) {
|
782 |
$this->model->update_data("formmaker_backup", array(
|
@@ -786,25 +796,26 @@ function after_submit() {
|
|
786 |
if (WDFMInstance(self::PLUGIN)->is_free != 2) {
|
787 |
$save_addon = do_action('fm_save_addon_init', $id);
|
788 |
}
|
789 |
-
|
790 |
-
}
|
791 |
-
|
|
|
792 |
}
|
793 |
-
|
794 |
/**
|
795 |
* Form layout.
|
796 |
*
|
797 |
-
* @param
|
798 |
*/
|
799 |
-
public function form_layout( $id ) {
|
800 |
$ids = array();
|
801 |
$types = array();
|
802 |
$labels = array();
|
803 |
-
|
804 |
$row = $this->model->get_row_data( $id );
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
$fields = explode('*:*new_field*:*', $row->form_fields);
|
809 |
$fields = array_slice($fields, 0, count($fields) - 1);
|
810 |
foreach ( $fields as $field ) {
|
@@ -815,7 +826,7 @@ function after_submit() {
|
|
815 |
$temp = explode('*:*w_field_label*:*', $temp[1]);
|
816 |
array_push($labels, $temp[0]);
|
817 |
}
|
818 |
-
|
819 |
// Set params for view.
|
820 |
$params = array();
|
821 |
$params['id'] = $id;
|
@@ -830,8 +841,13 @@ function after_submit() {
|
|
830 |
$this->view->form_layout($params);
|
831 |
}
|
832 |
|
833 |
-
|
834 |
-
|
|
|
|
|
|
|
|
|
|
|
835 |
WDW_FM_Library(self::PLUGIN)->fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'form_layout', 'current_id' => $id, 'message' => $message), admin_url('admin.php') ) );
|
836 |
}
|
837 |
|
@@ -839,10 +855,9 @@ function after_submit() {
|
|
839 |
* Save db layout.
|
840 |
*
|
841 |
* @param int $id
|
842 |
-
*
|
843 |
* @return int $id_message
|
844 |
*/
|
845 |
-
public function save_db_layout( $id ) {
|
846 |
$custom_front = WDW_FM_Library(self::PLUGIN)->get('custom_front', '', false);
|
847 |
$autogen_layout = WDW_FM_Library(self::PLUGIN)->get('autogen_layout', '');
|
848 |
|
@@ -868,7 +883,8 @@ function after_submit() {
|
|
868 |
$params['row'] = $this->model->get_display_options($id);
|
869 |
$params['page_title'] = '"'. $params['row_form']->title . '" ' . __('display options', WDFMInstance(self::PLUGIN)->prefix);
|
870 |
$params['animation_effects'] = $this->animation_effects;
|
871 |
-
|
|
|
872 |
$params['categories'] = $this->model->fm_categories_query();
|
873 |
$params['selected_categories'] = explode(',', $params['row']->display_on_categories);
|
874 |
$params['current_categories_array'] = explode(',', $params['row']->current_categories);
|
@@ -915,9 +931,9 @@ function after_submit() {
|
|
915 |
|
916 |
/**
|
917 |
* Remove query for MySQL Mapping.
|
918 |
-
* @param
|
919 |
*/
|
920 |
-
public function remove_query( $id ) {
|
921 |
$fieldset_id = WDW_FM_Library(self::PLUGIN)->get('fieldset_id', 'general');
|
922 |
$query_id = WDW_FM_Library(self::PLUGIN)->get('query_id',0);
|
923 |
$message = 2;
|
@@ -938,10 +954,9 @@ function after_submit() {
|
|
938 |
* Check if loading_delay or frequency is positive numbers
|
939 |
*
|
940 |
* @param int $delay
|
941 |
-
*
|
942 |
* @return int
|
943 |
*/
|
944 |
-
public function set_delay_freq_positive_val( $delay ) {
|
945 |
if( $delay < 0 ) return 0;
|
946 |
return $delay;
|
947 |
}
|
@@ -1121,13 +1136,13 @@ function after_submit() {
|
|
1121 |
'savedb' => 1,
|
1122 |
'sendemail' => 1,
|
1123 |
'requiredmark' => '*',
|
1124 |
-
'from_mail' => '',
|
1125 |
'from_name' => '',
|
1126 |
'reply_to' => '',
|
1127 |
'send_to' => '',
|
1128 |
'autogen_layout' => 1,
|
1129 |
'custom_front' => '',
|
1130 |
-
'mail_from_user' => '',
|
1131 |
'mail_from_name_user' => '',
|
1132 |
'reply_to_user' => '',
|
1133 |
'condition' => '',
|
@@ -1151,6 +1166,7 @@ function after_submit() {
|
|
1151 |
'header_image_url' => $header_image_url,
|
1152 |
'header_image_animation' => $header_image_animation,
|
1153 |
'header_hide_image' => $header_hide_image,
|
|
|
1154 |
));
|
1155 |
$id = (int) $this->model->get_max_row('formmaker', 'id');
|
1156 |
if (WDFMInstance(self::PLUGIN)->is_free == 2) {
|
@@ -1297,6 +1313,7 @@ function after_submit() {
|
|
1297 |
'header_image_url' => $header_image_url,
|
1298 |
'header_image_animation' => $header_image_animation,
|
1299 |
'header_hide_image' => $header_hide_image,
|
|
|
1300 |
));
|
1301 |
|
1302 |
$backup_count = $this->model->get_count(array(
|
@@ -1340,6 +1357,11 @@ function after_submit() {
|
|
1340 |
die($output);
|
1341 |
}
|
1342 |
|
|
|
|
|
|
|
|
|
|
|
1343 |
public function fm_posts_query( $args = array(), $include_post_type = '' ) {
|
1344 |
if ( 'only_pages' === $include_post_type ) {
|
1345 |
$pt_names = array( 'page' );
|
@@ -1388,7 +1410,11 @@ function after_submit() {
|
|
1388 |
return $results;
|
1389 |
}
|
1390 |
|
1391 |
-
|
|
|
|
|
|
|
|
|
1392 |
$page = WDW_FM_Library(self::PLUGIN)->get('page');
|
1393 |
$form_name = WDW_FM_Library(self::PLUGIN)->get('form_name', '');
|
1394 |
|
@@ -1417,15 +1443,14 @@ function after_submit() {
|
|
1417 |
|
1418 |
return $message = 1;
|
1419 |
}
|
|
|
1420 |
/**
|
1421 |
* Get stripe addon.
|
1422 |
*
|
1423 |
* @param int $id
|
1424 |
-
|
1425 |
-
* @return array $data
|
1426 |
*/
|
1427 |
-
private function get_stripe_addon($id) {
|
1428 |
return apply_filters('fm_stripe_display_init', array('form_id' => $id) );
|
1429 |
}
|
1430 |
-
|
1431 |
}
|
132 |
/**
|
133 |
* Bulk actions.
|
134 |
*
|
135 |
+
* @param string $task
|
136 |
*/
|
137 |
+
public function bulk_action( $task = '' ) {
|
138 |
$message = 0;
|
139 |
$successfully_updated = 0;
|
140 |
|
167 |
/**
|
168 |
* Delete form by id.
|
169 |
*
|
170 |
+
* @param int $id
|
171 |
* @param bool $bulk
|
172 |
*
|
173 |
* @return int
|
174 |
*/
|
175 |
+
public function delete( $id = 0, $bulk = FALSE ) {
|
176 |
if ( $this->model->delete_rows(array( "table" => "formmaker", "where" => "id = " . $id )) ) {
|
177 |
$this->model->delete_rows(array( "table" => "formmaker_views", "where" => "form_id = " . $id ));
|
178 |
$this->model->delete_rows(array( "table" => "formmaker_submits", "where" => "form_id = " . $id ));
|
210 |
/**
|
211 |
* Publish by id.
|
212 |
*
|
213 |
+
* @param int $id
|
214 |
* @param bool $bulk
|
215 |
*
|
216 |
* @return int
|
217 |
*/
|
218 |
+
public function publish( $id = 0, $bulk = FALSE ) {
|
219 |
$updated = $this->model->update_data("formmaker", array('published' => 1), array('id' => $id));
|
220 |
if ( $updated !== FALSE ) {
|
221 |
$message = 9;
|
239 |
/**
|
240 |
* Unpublish by id.
|
241 |
*
|
242 |
+
* @param int $id
|
243 |
* @param bool $bulk
|
244 |
*
|
245 |
* @return int
|
246 |
*/
|
247 |
+
public function unpublish( $id = 0, $bulk = FALSE ) {
|
248 |
$updated = $this->model->update_data("formmaker", array('published' => 0), array('id' => $id));
|
249 |
if ( $updated !== FALSE ) {
|
250 |
$message = 10;
|
268 |
/**
|
269 |
* Duplicate by id.
|
270 |
*
|
271 |
+
* @param int $id
|
272 |
* @param bool $bulk
|
273 |
*
|
274 |
* @return int
|
275 |
*/
|
276 |
+
public function duplicate( $id = 0, $bulk = FALSE ) {
|
277 |
$message = 2;
|
278 |
$row = $this->model->select_rows("get_row", array(
|
279 |
"selection" => "*",
|
350 |
$this->view->edit($params);
|
351 |
}
|
352 |
|
353 |
+
/**
|
354 |
+
* Edit.
|
355 |
+
*
|
356 |
+
* @param int $id
|
357 |
+
* @param int $backup_id
|
358 |
+
*/
|
359 |
+
public function edit( $id = 0, $backup_id = 0 ) {
|
360 |
$fm_settings = get_option(WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
|
361 |
$fm_advanced_layout = isset($fm_settings['fm_advanced_layout']) && $fm_settings['fm_advanced_layout'] == '1' ? 1 : 0;
|
362 |
if ( $id && !$fm_advanced_layout ) {
|
459 |
*
|
460 |
* @param int $id
|
461 |
*/
|
462 |
+
public function form_options( $id = 0 ) {
|
463 |
// Set params for view.
|
464 |
$params = array();
|
465 |
$params[ 'id' ] = $id;
|
584 |
* Get active addons.
|
585 |
*
|
586 |
* @param $params
|
|
|
587 |
* @return mixed|void
|
588 |
*/
|
589 |
+
private function get_addon_tabs( $params = array() ) {
|
590 |
$addons = array('tabs' => array(), 'html' => array());
|
591 |
if (WDFMInstance(self::PLUGIN)->is_free != 2) {
|
592 |
$addons = apply_filters('fm_get_addon_init', $addons, $params);
|
599 |
*
|
600 |
* @param int $id
|
601 |
*/
|
602 |
+
public function apply_form_options( $id = 0 ) {
|
603 |
$fieldset_id = WDW_FM_Library(self::PLUGIN)->get('fieldset_id', 'general');
|
604 |
$message = $this->save_db_form_options( $id );
|
605 |
WDW_FM_Library(self::PLUGIN)->fm_redirect(add_query_arg(array(
|
615 |
* Save db Form options.
|
616 |
*
|
617 |
* @param int $id
|
|
|
618 |
* @return int $id_message
|
619 |
*/
|
620 |
+
public function save_db_form_options( $id = 0 ) {
|
621 |
$javascript = "// Occurs before the form is loaded
|
622 |
function before_load() {
|
623 |
|
637 |
|
638 |
$published = stripslashes(WDW_FM_Library(self::PLUGIN)->get('published', ''));
|
639 |
$savedb = stripslashes(WDW_FM_Library(self::PLUGIN)->get('savedb', ''));
|
640 |
+
$theme = (int) WDW_FM_Library(self::PLUGIN)->get('theme', 0);
|
641 |
+
$theme = ($theme) ? $theme : $this->model->get_default_theme_id();
|
642 |
$requiredmark = stripslashes(WDW_FM_Library(self::PLUGIN)->get('requiredmark', '*'));
|
643 |
$sendemail = stripslashes(WDW_FM_Library(self::PLUGIN)->get('sendemail', ''));
|
644 |
$save_uploads = stripslashes(WDW_FM_Library(self::PLUGIN)->get('save_uploads', ''));
|
645 |
$mail = stripslashes(WDW_FM_Library(self::PLUGIN)->get('mail', ''));
|
|
|
|
|
|
|
646 |
$from_mail = stripslashes(WDW_FM_Library(self::PLUGIN)->get('from_mail', ''));
|
647 |
$from_name = stripslashes(WDW_FM_Library(self::PLUGIN)->get('from_name', ''));
|
648 |
$reply_to = stripslashes(WDW_FM_Library(self::PLUGIN)->get('reply_to', ''));
|
717 |
$article_id = 0;
|
718 |
}
|
719 |
$mail_verification_post_id = (int) $this->model->get_mail_verification_post_id();
|
720 |
+
|
721 |
+
$privacy_arr = array(
|
722 |
+
'save_ip' => WDW_FM_Library(self::PLUGIN)->get('save_ip', 1),
|
723 |
+
'save_user_id' => WDW_FM_Library(self::PLUGIN)->get('save_user_id', 1),
|
724 |
+
);
|
725 |
+
|
726 |
+
$privacy = json_encode($privacy_arr);
|
727 |
+
|
728 |
if ( $mail_verify ) {
|
729 |
$email_verification_post = array(
|
730 |
'post_title' => 'Email Verification',
|
738 |
}
|
739 |
}
|
740 |
|
741 |
+
$data = array(
|
742 |
'published' => $published,
|
743 |
'savedb' => $savedb,
|
744 |
'theme' => $theme,
|
783 |
'mail_verify' => $mail_verify,
|
784 |
'mail_verify_expiretime' => $mail_verify_expiretime,
|
785 |
'mail_verification_post_id' => $mail_verification_post_id,
|
786 |
+
'privacy' => $privacy,
|
787 |
);
|
788 |
|
789 |
+
$message_id = 2;
|
790 |
$save = $this->model->update_data('formmaker', $data, array( 'id' => $id ));
|
791 |
if ( $save !== FALSE ) {
|
792 |
$this->model->update_data("formmaker_backup", array(
|
796 |
if (WDFMInstance(self::PLUGIN)->is_free != 2) {
|
797 |
$save_addon = do_action('fm_save_addon_init', $id);
|
798 |
}
|
799 |
+
$message_id = 8;
|
800 |
+
}
|
801 |
+
|
802 |
+
return $message_id;
|
803 |
}
|
804 |
+
|
805 |
/**
|
806 |
* Form layout.
|
807 |
*
|
808 |
+
* @param int $id
|
809 |
*/
|
810 |
+
public function form_layout( $id = 0 ) {
|
811 |
$ids = array();
|
812 |
$types = array();
|
813 |
$labels = array();
|
814 |
+
|
815 |
$row = $this->model->get_row_data( $id );
|
816 |
+
if ( empty($row) ) {
|
817 |
+
WDW_FM_Library(self::PLUGIN)->fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'display'), admin_url('admin.php') ) );
|
818 |
+
}
|
819 |
$fields = explode('*:*new_field*:*', $row->form_fields);
|
820 |
$fields = array_slice($fields, 0, count($fields) - 1);
|
821 |
foreach ( $fields as $field ) {
|
826 |
$temp = explode('*:*w_field_label*:*', $temp[1]);
|
827 |
array_push($labels, $temp[0]);
|
828 |
}
|
829 |
+
|
830 |
// Set params for view.
|
831 |
$params = array();
|
832 |
$params['id'] = $id;
|
841 |
$this->view->form_layout($params);
|
842 |
}
|
843 |
|
844 |
+
/**
|
845 |
+
* Apply layout.
|
846 |
+
*
|
847 |
+
* @param int $id
|
848 |
+
*/
|
849 |
+
public function apply_layout( $id = 0 ) {
|
850 |
+
$message = $this->save_db_layout( $id );
|
851 |
WDW_FM_Library(self::PLUGIN)->fm_redirect( add_query_arg( array('page' => $this->page, 'task' => 'form_layout', 'current_id' => $id, 'message' => $message), admin_url('admin.php') ) );
|
852 |
}
|
853 |
|
855 |
* Save db layout.
|
856 |
*
|
857 |
* @param int $id
|
|
|
858 |
* @return int $id_message
|
859 |
*/
|
860 |
+
public function save_db_layout( $id = 0 ) {
|
861 |
$custom_front = WDW_FM_Library(self::PLUGIN)->get('custom_front', '', false);
|
862 |
$autogen_layout = WDW_FM_Library(self::PLUGIN)->get('autogen_layout', '');
|
863 |
|
883 |
$params['row'] = $this->model->get_display_options($id);
|
884 |
$params['page_title'] = '"'. $params['row_form']->title . '" ' . __('display options', WDFMInstance(self::PLUGIN)->prefix);
|
885 |
$params['animation_effects'] = $this->animation_effects;
|
886 |
+
$params['posts_and_pages'] = $this->model->fm_posts_query();
|
887 |
+
$params['all_display_posts'] = $this->model->get_all_display_posts();
|
888 |
$params['categories'] = $this->model->fm_categories_query();
|
889 |
$params['selected_categories'] = explode(',', $params['row']->display_on_categories);
|
890 |
$params['current_categories_array'] = explode(',', $params['row']->current_categories);
|
931 |
|
932 |
/**
|
933 |
* Remove query for MySQL Mapping.
|
934 |
+
* @param int $id
|
935 |
*/
|
936 |
+
public function remove_query( $id = 0 ) {
|
937 |
$fieldset_id = WDW_FM_Library(self::PLUGIN)->get('fieldset_id', 'general');
|
938 |
$query_id = WDW_FM_Library(self::PLUGIN)->get('query_id',0);
|
939 |
$message = 2;
|
954 |
* Check if loading_delay or frequency is positive numbers
|
955 |
*
|
956 |
* @param int $delay
|
|
|
957 |
* @return int
|
958 |
*/
|
959 |
+
public function set_delay_freq_positive_val( $delay = 0 ) {
|
960 |
if( $delay < 0 ) return 0;
|
961 |
return $delay;
|
962 |
}
|
1136 |
'savedb' => 1,
|
1137 |
'sendemail' => 1,
|
1138 |
'requiredmark' => '*',
|
1139 |
+
'from_mail' => '{adminemail}',
|
1140 |
'from_name' => '',
|
1141 |
'reply_to' => '',
|
1142 |
'send_to' => '',
|
1143 |
'autogen_layout' => 1,
|
1144 |
'custom_front' => '',
|
1145 |
+
'mail_from_user' => '{adminemail}',
|
1146 |
'mail_from_name_user' => '',
|
1147 |
'reply_to_user' => '',
|
1148 |
'condition' => '',
|
1166 |
'header_image_url' => $header_image_url,
|
1167 |
'header_image_animation' => $header_image_animation,
|
1168 |
'header_hide_image' => $header_hide_image,
|
1169 |
+
'privacy' => '',
|
1170 |
));
|
1171 |
$id = (int) $this->model->get_max_row('formmaker', 'id');
|
1172 |
if (WDFMInstance(self::PLUGIN)->is_free == 2) {
|
1313 |
'header_image_url' => $header_image_url,
|
1314 |
'header_image_animation' => $header_image_animation,
|
1315 |
'header_hide_image' => $header_hide_image,
|
1316 |
+
'privacy' => '',
|
1317 |
));
|
1318 |
|
1319 |
$backup_count = $this->model->get_count(array(
|
1357 |
die($output);
|
1358 |
}
|
1359 |
|
1360 |
+
/**
|
1361 |
+
* @param array $args
|
1362 |
+
* @param string $include_post_type
|
1363 |
+
* @return array|bool
|
1364 |
+
*/
|
1365 |
public function fm_posts_query( $args = array(), $include_post_type = '' ) {
|
1366 |
if ( 'only_pages' === $include_post_type ) {
|
1367 |
$pt_names = array( 'page' );
|
1410 |
return $results;
|
1411 |
}
|
1412 |
|
1413 |
+
/**
|
1414 |
+
* @param int $id
|
1415 |
+
* @return int
|
1416 |
+
*/
|
1417 |
+
public function update_form_title( $id = 0 ) {
|
1418 |
$page = WDW_FM_Library(self::PLUGIN)->get('page');
|
1419 |
$form_name = WDW_FM_Library(self::PLUGIN)->get('form_name', '');
|
1420 |
|
1443 |
|
1444 |
return $message = 1;
|
1445 |
}
|
1446 |
+
|
1447 |
/**
|
1448 |
* Get stripe addon.
|
1449 |
*
|
1450 |
* @param int $id
|
1451 |
+
* @return array $data
|
|
|
1452 |
*/
|
1453 |
+
private function get_stripe_addon( $id = 0 ) {
|
1454 |
return apply_filters('fm_stripe_display_init', array('form_id' => $id) );
|
1455 |
}
|
|
|
1456 |
}
|
admin/controllers/Pricing_fm.php
CHANGED
@@ -45,10 +45,10 @@ class FMControllerPricing_fmc extends CFMAdminController {
|
|
45 |
* Display.
|
46 |
*/
|
47 |
public function display() {
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
}
|
54 |
}
|
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/controllers/Select_data_from_db.php
CHANGED
@@ -49,7 +49,7 @@ class FMControllerSelect_data_from_db_fmc extends CFMAdminController {
|
|
49 |
* @param string $field_type
|
50 |
* @param int $value_disabled
|
51 |
*/
|
52 |
-
public function display( $id, $form_id, $field_id, $field_type, $value_disabled ) {
|
53 |
// Set params for view.
|
54 |
$params = array();
|
55 |
$params['id'] = $id;
|
@@ -66,7 +66,7 @@ class FMControllerSelect_data_from_db_fmc extends CFMAdminController {
|
|
66 |
* @param int $form_id
|
67 |
* @param string $field_type
|
68 |
*/
|
69 |
-
public function db_tables( $form_id, $field_type ) {
|
70 |
// Get tables.
|
71 |
$tables = $this->model->get_tables();
|
72 |
// Set params for view.
|
@@ -77,7 +77,7 @@ class FMControllerSelect_data_from_db_fmc extends CFMAdminController {
|
|
77 |
$this->view->db_tables($params);
|
78 |
}
|
79 |
|
80 |
-
public function db_table_struct_select( $form_id, $field_type ) {
|
81 |
// Get labels by form id.
|
82 |
$label = $this->model->get_labels($form_id);
|
83 |
// Get table struct.
|
49 |
* @param string $field_type
|
50 |
* @param int $value_disabled
|
51 |
*/
|
52 |
+
public function display( $id = 0, $form_id = 0, $field_id = 0, $field_type = '', $value_disabled = 0 ) {
|
53 |
// Set params for view.
|
54 |
$params = array();
|
55 |
$params['id'] = $id;
|
66 |
* @param int $form_id
|
67 |
* @param string $field_type
|
68 |
*/
|
69 |
+
public function db_tables( $form_id = 0, $field_type = '' ) {
|
70 |
// Get tables.
|
71 |
$tables = $this->model->get_tables();
|
72 |
// Set params for view.
|
77 |
$this->view->db_tables($params);
|
78 |
}
|
79 |
|
80 |
+
public function db_table_struct_select( $form_id = 0, $field_type = '' ) {
|
81 |
// Get labels by form id.
|
82 |
$label = $this->model->get_labels($form_id);
|
83 |
// Get table struct.
|
admin/controllers/Submissions_fm.php
CHANGED
@@ -101,9 +101,9 @@ class FMControllerSubmissions_fmc extends CFMAdminController {
|
|
101 |
/**
|
102 |
* Bulk actions.
|
103 |
*
|
104 |
-
* @param $task
|
105 |
*/
|
106 |
-
public function bulk_action($task) {
|
107 |
$form_id = WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
|
108 |
$check = WDW_FM_Library(self::PLUGIN)->get('check', '');
|
109 |
|
@@ -132,7 +132,7 @@ class FMControllerSubmissions_fmc extends CFMAdminController {
|
|
132 |
* Forms.
|
133 |
* @param int $id
|
134 |
*/
|
135 |
-
public function forms($id) {
|
136 |
// Set params for view.
|
137 |
$params = array();
|
138 |
$params['id'] = $id;
|
@@ -163,7 +163,7 @@ class FMControllerSubmissions_fmc extends CFMAdminController {
|
|
163 |
$page = (int) WDW_FM_Library(self::PLUGIN)->get('paged', 1);
|
164 |
$page_num = $page ? ($page - 1) * $params['page_per_num'] : 0;
|
165 |
|
166 |
-
$params['forms'] = $this->model->get_forms();
|
167 |
$params['statistics'] = $this->model->get_statistics( $id );
|
168 |
$params['blocked_ips'] = $this->model->blocked_ips();
|
169 |
|
@@ -182,8 +182,8 @@ class FMControllerSubmissions_fmc extends CFMAdminController {
|
|
182 |
$params['group_id_s'] = $this->model->sort_group_ids(count($params['sorted_label_names']), $group_ids);
|
183 |
$params['where_choices'] = $labels_parameters[7];
|
184 |
$params['searched_ids'] = $labels_parameters[8] ? implode(',', $labels_parameters[8]) : '';
|
185 |
-
|
186 |
-
$params['order_by']
|
187 |
$params['asc_or_desc'] = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'asc') ? 'asc' : 'desc');
|
188 |
|
189 |
$lists = $labels_parameters[2];
|
@@ -212,6 +212,9 @@ class FMControllerSubmissions_fmc extends CFMAdminController {
|
|
212 |
$params['rows'] = $labels_parameters[5];
|
213 |
$params['subs_count'] = $labels_parameters[2]['total'];
|
214 |
|
|
|
|
|
|
|
215 |
// Check is active pdf-integration add-on.
|
216 |
$params['pdf_data'] = array();
|
217 |
if ( defined('WD_FM_PDF') && is_plugin_active(constant('WD_FM_PDF')) ) {
|
@@ -276,7 +279,7 @@ class FMControllerSubmissions_fmc extends CFMAdminController {
|
|
276 |
* Edit.
|
277 |
* @param int $id
|
278 |
*/
|
279 |
-
public function edit( $id=0 ) {
|
280 |
$form_id = WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
|
281 |
$data = $this->model->get_data_of_group_id( $id );
|
282 |
if ( empty($data[0]) ) {
|
@@ -330,7 +333,7 @@ class FMControllerSubmissions_fmc extends CFMAdminController {
|
|
330 |
* @param int $id
|
331 |
* @param int $form_id
|
332 |
*/
|
333 |
-
public function save_db( $id, $form_id) {
|
334 |
$id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes($_POST['current_id'])) : 0);
|
335 |
$date = esc_html($_POST['date']);
|
336 |
$ip = esc_html($_POST['ip']);
|
@@ -456,12 +459,12 @@ class FMControllerSubmissions_fmc extends CFMAdminController {
|
|
456 |
/**
|
457 |
* Delete form by id.
|
458 |
*
|
459 |
-
* @param
|
460 |
* @param bool $bulk
|
461 |
*
|
462 |
* @return int
|
463 |
*/
|
464 |
-
public function delete( $id, $bulk = FALSE ) {
|
465 |
$form_id = (int) WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
|
466 |
$delete = $this->model->delete_row($id);
|
467 |
$message = 2;
|
@@ -484,12 +487,12 @@ class FMControllerSubmissions_fmc extends CFMAdminController {
|
|
484 |
/**
|
485 |
* Block IP form by id.
|
486 |
*
|
487 |
-
* @param
|
488 |
* @param bool $bulk
|
489 |
*
|
490 |
* @return int
|
491 |
*/
|
492 |
-
public function block_ip( $id, $bulk = FALSE ) {
|
493 |
global $wpdb;
|
494 |
|
495 |
$form_id = (int) WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
|
@@ -521,12 +524,12 @@ class FMControllerSubmissions_fmc extends CFMAdminController {
|
|
521 |
/**
|
522 |
* Unblock IP form by id.
|
523 |
*
|
524 |
-
* @param
|
525 |
* @param bool $bulk
|
526 |
*
|
527 |
* @return int
|
528 |
*/
|
529 |
-
public function unblock_ip( $id, $bulk = FALSE ) {
|
530 |
global $wpdb;
|
531 |
|
532 |
$form_id = (int) WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
|
101 |
/**
|
102 |
* Bulk actions.
|
103 |
*
|
104 |
+
* @param string $task
|
105 |
*/
|
106 |
+
public function bulk_action( $task = '' ) {
|
107 |
$form_id = WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
|
108 |
$check = WDW_FM_Library(self::PLUGIN)->get('check', '');
|
109 |
|
132 |
* Forms.
|
133 |
* @param int $id
|
134 |
*/
|
135 |
+
public function forms( $id = 0 ) {
|
136 |
// Set params for view.
|
137 |
$params = array();
|
138 |
$params['id'] = $id;
|
163 |
$page = (int) WDW_FM_Library(self::PLUGIN)->get('paged', 1);
|
164 |
$page_num = $page ? ($page - 1) * $params['page_per_num'] : 0;
|
165 |
|
166 |
+
$params['forms'] = $this->model->get_forms();
|
167 |
$params['statistics'] = $this->model->get_statistics( $id );
|
168 |
$params['blocked_ips'] = $this->model->blocked_ips();
|
169 |
|
182 |
$params['group_id_s'] = $this->model->sort_group_ids(count($params['sorted_label_names']), $group_ids);
|
183 |
$params['where_choices'] = $labels_parameters[7];
|
184 |
$params['searched_ids'] = $labels_parameters[8] ? implode(',', $labels_parameters[8]) : '';
|
185 |
+
$params['groupids'] = $labels_parameters[8] ? array_reverse($labels_parameters[8]) : array();
|
186 |
+
$params['order_by'] = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'group_id');
|
187 |
$params['asc_or_desc'] = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'asc') ? 'asc' : 'desc');
|
188 |
|
189 |
$lists = $labels_parameters[2];
|
212 |
$params['rows'] = $labels_parameters[5];
|
213 |
$params['subs_count'] = $labels_parameters[2]['total'];
|
214 |
|
215 |
+
$option_key = (WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
|
216 |
+
$params['fm_settings'] = get_option($option_key);
|
217 |
+
|
218 |
// Check is active pdf-integration add-on.
|
219 |
$params['pdf_data'] = array();
|
220 |
if ( defined('WD_FM_PDF') && is_plugin_active(constant('WD_FM_PDF')) ) {
|
279 |
* Edit.
|
280 |
* @param int $id
|
281 |
*/
|
282 |
+
public function edit( $id = 0 ) {
|
283 |
$form_id = WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
|
284 |
$data = $this->model->get_data_of_group_id( $id );
|
285 |
if ( empty($data[0]) ) {
|
333 |
* @param int $id
|
334 |
* @param int $form_id
|
335 |
*/
|
336 |
+
public function save_db( $id = 0, $form_id = 0 ) {
|
337 |
$id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes($_POST['current_id'])) : 0);
|
338 |
$date = esc_html($_POST['date']);
|
339 |
$ip = esc_html($_POST['ip']);
|
459 |
/**
|
460 |
* Delete form by id.
|
461 |
*
|
462 |
+
* @param int $id
|
463 |
* @param bool $bulk
|
464 |
*
|
465 |
* @return int
|
466 |
*/
|
467 |
+
public function delete( $id = 0, $bulk = FALSE ) {
|
468 |
$form_id = (int) WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
|
469 |
$delete = $this->model->delete_row($id);
|
470 |
$message = 2;
|
487 |
/**
|
488 |
* Block IP form by id.
|
489 |
*
|
490 |
+
* @param int $id
|
491 |
* @param bool $bulk
|
492 |
*
|
493 |
* @return int
|
494 |
*/
|
495 |
+
public function block_ip( $id = 0, $bulk = FALSE ) {
|
496 |
global $wpdb;
|
497 |
|
498 |
$form_id = (int) WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
|
524 |
/**
|
525 |
* Unblock IP form by id.
|
526 |
*
|
527 |
+
* @param int $id
|
528 |
* @param bool $bulk
|
529 |
*
|
530 |
* @return int
|
531 |
*/
|
532 |
+
public function unblock_ip( $id = 0, $bulk = FALSE ) {
|
533 |
global $wpdb;
|
534 |
|
535 |
$form_id = (int) WDW_FM_Library(self::PLUGIN)->get('form_id', 0);
|
admin/controllers/Themes_fm.php
CHANGED
@@ -102,9 +102,9 @@ class FMControllerThemes_fmc extends CFMAdminController {
|
|
102 |
/**
|
103 |
* Bulk actions.
|
104 |
*
|
105 |
-
* @param $task
|
106 |
*/
|
107 |
-
public function bulk_action($task) {
|
108 |
$message = 0;
|
109 |
$successfully_updated = 0;
|
110 |
|
@@ -112,17 +112,17 @@ class FMControllerThemes_fmc extends CFMAdminController {
|
|
112 |
|
113 |
if ( $check ) {
|
114 |
foreach ( $check as $form_id => $item ) {
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
}
|
123 |
if ( $successfully_updated ) {
|
124 |
-
|
125 |
-
|
126 |
}
|
127 |
}
|
128 |
|
@@ -137,12 +137,12 @@ class FMControllerThemes_fmc extends CFMAdminController {
|
|
137 |
/**
|
138 |
* Delete form by id.
|
139 |
*
|
140 |
-
* @param
|
141 |
* @param bool $bulk
|
142 |
*
|
143 |
* @return int
|
144 |
*/
|
145 |
-
public function delete( $id, $bulk = FALSE ) {
|
146 |
$isDefault = $this->model->get_default($id);
|
147 |
if ( $isDefault ) {
|
148 |
$message = 4;
|
@@ -169,12 +169,12 @@ class FMControllerThemes_fmc extends CFMAdminController {
|
|
169 |
/**
|
170 |
* Duplicate by id.
|
171 |
*
|
172 |
-
* @param
|
173 |
* @param bool $bulk
|
174 |
*
|
175 |
* @return int
|
176 |
*/
|
177 |
-
public function duplicate( $id, $bulk = FALSE ) {
|
178 |
$message = 2;
|
179 |
$table = 'formmaker_themes';
|
180 |
$row = $this->model->select_rows("get_row", array(
|
@@ -208,7 +208,7 @@ class FMControllerThemes_fmc extends CFMAdminController {
|
|
208 |
*
|
209 |
* @param int $id
|
210 |
*/
|
211 |
-
public function edit($id = 0) {
|
212 |
$params = array();
|
213 |
$params['id'] = (int) $id;
|
214 |
$params['row'] = $this->model->get_row_data($params['id'], FALSE);
|
@@ -300,8 +300,20 @@ class FMControllerThemes_fmc extends CFMAdminController {
|
|
300 |
$this->view->edit($params);
|
301 |
}
|
302 |
|
303 |
-
|
304 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
$all_params = array(
|
306 |
'global' => array(
|
307 |
array(
|
102 |
/**
|
103 |
* Bulk actions.
|
104 |
*
|
105 |
+
* @param string $task
|
106 |
*/
|
107 |
+
public function bulk_action( $task = '' ) {
|
108 |
$message = 0;
|
109 |
$successfully_updated = 0;
|
110 |
|
112 |
|
113 |
if ( $check ) {
|
114 |
foreach ( $check as $form_id => $item ) {
|
115 |
+
if ( method_exists($this, $task) ) {
|
116 |
+
$message = $this->$task($form_id, TRUE);
|
117 |
+
if ( $message != 2 ) {
|
118 |
+
// Increase successfully updated items count, if action doesn't failed.
|
119 |
+
$successfully_updated++;
|
120 |
+
}
|
121 |
+
}
|
122 |
}
|
123 |
if ( $successfully_updated ) {
|
124 |
+
$block_action = $this->bulk_action_name;
|
125 |
+
$message = sprintf(_n('%s item successfully %s.', '%s items successfully %s.', $successfully_updated, WDFMInstance(self::PLUGIN)->prefix), $successfully_updated, $this->actions[$task][$block_action]);
|
126 |
}
|
127 |
}
|
128 |
|
137 |
/**
|
138 |
* Delete form by id.
|
139 |
*
|
140 |
+
* @param int $id
|
141 |
* @param bool $bulk
|
142 |
*
|
143 |
* @return int
|
144 |
*/
|
145 |
+
public function delete( $id = 0, $bulk = FALSE ) {
|
146 |
$isDefault = $this->model->get_default($id);
|
147 |
if ( $isDefault ) {
|
148 |
$message = 4;
|
169 |
/**
|
170 |
* Duplicate by id.
|
171 |
*
|
172 |
+
* @param int $id
|
173 |
* @param bool $bulk
|
174 |
*
|
175 |
* @return int
|
176 |
*/
|
177 |
+
public function duplicate( $id = 0, $bulk = FALSE ) {
|
178 |
$message = 2;
|
179 |
$table = 'formmaker_themes';
|
180 |
$row = $this->model->select_rows("get_row", array(
|
208 |
*
|
209 |
* @param int $id
|
210 |
*/
|
211 |
+
public function edit( $id = 0 ) {
|
212 |
$params = array();
|
213 |
$params['id'] = (int) $id;
|
214 |
$params['row'] = $this->model->get_row_data($params['id'], FALSE);
|
300 |
$this->view->edit($params);
|
301 |
}
|
302 |
|
303 |
+
/**
|
304 |
+
* all params.
|
305 |
+
*
|
306 |
+
* @param array $param_values
|
307 |
+
* @param array $borders
|
308 |
+
* @param array $border_types
|
309 |
+
* @param array $font_weights
|
310 |
+
* @param array $position_types
|
311 |
+
* @param array $aligns
|
312 |
+
* @param array $bg_repeats
|
313 |
+
* @param array $font_families
|
314 |
+
* @return array
|
315 |
+
*/
|
316 |
+
public function all_params( $param_values = array(), $borders = array(), $border_types = array(), $font_weights = array(), $position_types = array(), $aligns = array(), $bg_repeats = array(), $font_families = array() ) {
|
317 |
$all_params = array(
|
318 |
'global' => array(
|
319 |
array(
|
admin/controllers/Widget.php
CHANGED
@@ -27,7 +27,13 @@ class FMControllerWidget_fmc extends WP_Widget {
|
|
27 |
$this->view = new FMViewWidget_fmc($this->model);
|
28 |
}
|
29 |
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
if( get_the_title() == 'Preview' && get_post_type() == 'form-maker' . WDFMInstance(self::PLUGIN)->plugin_postfix ) {
|
32 |
return;
|
33 |
}
|
@@ -55,13 +61,24 @@ class FMControllerWidget_fmc extends WP_Widget {
|
|
55 |
$this->view->widget($args, $instance, $execute);
|
56 |
}
|
57 |
|
58 |
-
|
|
|
|
|
|
|
|
|
|
|
59 |
$ids_FM = $this->model->get_gallery_rows_data(); // ids_Form_Maker
|
60 |
$this->view->form($instance, $ids_FM, parent::get_field_id('title'), parent::get_field_name('title'), parent::get_field_id('form_id'), parent::get_field_name('form_id'));
|
61 |
}
|
62 |
|
63 |
-
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
$instance['title'] = $new_instance['title'];
|
66 |
$instance['form_id'] = $new_instance['form_id'];
|
67 |
|
27 |
$this->view = new FMViewWidget_fmc($this->model);
|
28 |
}
|
29 |
|
30 |
+
/**
|
31 |
+
* Widget.
|
32 |
+
*
|
33 |
+
* @param array $args
|
34 |
+
* @param array $instance
|
35 |
+
*/
|
36 |
+
public function widget( $args = array(), $instance = array() ) {
|
37 |
if( get_the_title() == 'Preview' && get_post_type() == 'form-maker' . WDFMInstance(self::PLUGIN)->plugin_postfix ) {
|
38 |
return;
|
39 |
}
|
61 |
$this->view->widget($args, $instance, $execute);
|
62 |
}
|
63 |
|
64 |
+
/**
|
65 |
+
* Form.
|
66 |
+
*
|
67 |
+
* @param array $instance
|
68 |
+
*/
|
69 |
+
public function form( $instance = array() ) {
|
70 |
$ids_FM = $this->model->get_gallery_rows_data(); // ids_Form_Maker
|
71 |
$this->view->form($instance, $ids_FM, parent::get_field_id('title'), parent::get_field_name('title'), parent::get_field_id('form_id'), parent::get_field_name('form_id'));
|
72 |
}
|
73 |
|
74 |
+
/**
|
75 |
+
* Update.
|
76 |
+
*
|
77 |
+
* @param $new_instance
|
78 |
+
* @param $old_instance
|
79 |
+
* @return mixed
|
80 |
+
*/
|
81 |
+
public function update( $new_instance = array(), $old_instance = array() ) {
|
82 |
$instance['title'] = $new_instance['title'];
|
83 |
$instance['form_id'] = $new_instance['form_id'];
|
84 |
|
admin/models/Blocked_ips_fm.php
CHANGED
@@ -8,10 +8,9 @@ class FMModelBlocked_ips_fmc extends CFMAdminModel {
|
|
8 |
* Get blocked Ips.
|
9 |
*
|
10 |
* @param $params
|
11 |
-
*
|
12 |
* @return array|null|object
|
13 |
*/
|
14 |
-
public function get_rows_data($params) {
|
15 |
$order = $params['order'];
|
16 |
$orderby = $params['orderby'];
|
17 |
$items_per_page = $params['items_per_page'];
|
@@ -31,7 +30,13 @@ class FMModelBlocked_ips_fmc extends CFMAdminModel {
|
|
31 |
return $rows;
|
32 |
}
|
33 |
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
global $wpdb;
|
36 |
if ( $id != 0 ) {
|
37 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE id="%d"', $id));
|
@@ -68,10 +73,9 @@ class FMModelBlocked_ips_fmc extends CFMAdminModel {
|
|
68 |
*
|
69 |
* @param array $params
|
70 |
* @param array $where
|
71 |
-
*
|
72 |
* @return bool
|
73 |
*/
|
74 |
-
public function update_fm_blocked( $params, $where ) {
|
75 |
global $wpdb;
|
76 |
return $wpdb->update($wpdb->prefix . 'formmaker_blocked', $params, $where);
|
77 |
}
|
@@ -81,10 +85,9 @@ class FMModelBlocked_ips_fmc extends CFMAdminModel {
|
|
81 |
*
|
82 |
* @param array $param_ins
|
83 |
* @param array $param_type
|
84 |
-
*
|
85 |
* @return bool
|
86 |
*/
|
87 |
-
public function insert_fm_blocked( $param_ins, $param_type ) {
|
88 |
global $wpdb;
|
89 |
return $wpdb->insert($wpdb->prefix . 'formmaker_blocked', $param_ins, $param_type);
|
90 |
}
|
@@ -103,10 +106,9 @@ class FMModelBlocked_ips_fmc extends CFMAdminModel {
|
|
103 |
* Delete blocked IP.
|
104 |
*
|
105 |
* @param int $id
|
106 |
-
*
|
107 |
* @return array
|
108 |
*/
|
109 |
-
public function delete_data( $id ) {
|
110 |
global $wpdb;
|
111 |
return $wpdb->query($wpdb->prepare('DELETE FROM `' . $wpdb->prefix . 'formmaker_blocked` WHERE id="%d"', $id));
|
112 |
}
|
8 |
* Get blocked Ips.
|
9 |
*
|
10 |
* @param $params
|
|
|
11 |
* @return array|null|object
|
12 |
*/
|
13 |
+
public function get_rows_data( $params = array() ) {
|
14 |
$order = $params['order'];
|
15 |
$orderby = $params['orderby'];
|
16 |
$items_per_page = $params['items_per_page'];
|
30 |
return $rows;
|
31 |
}
|
32 |
|
33 |
+
/**
|
34 |
+
* Get row data.
|
35 |
+
*
|
36 |
+
* @param int $id
|
37 |
+
* @return stdClass
|
38 |
+
*/
|
39 |
+
public function get_row_data( $id = 0 ) {
|
40 |
global $wpdb;
|
41 |
if ( $id != 0 ) {
|
42 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE id="%d"', $id));
|
73 |
*
|
74 |
* @param array $params
|
75 |
* @param array $where
|
|
|
76 |
* @return bool
|
77 |
*/
|
78 |
+
public function update_fm_blocked( $params = array(), $where = array() ) {
|
79 |
global $wpdb;
|
80 |
return $wpdb->update($wpdb->prefix . 'formmaker_blocked', $params, $where);
|
81 |
}
|
85 |
*
|
86 |
* @param array $param_ins
|
87 |
* @param array $param_type
|
|
|
88 |
* @return bool
|
89 |
*/
|
90 |
+
public function insert_fm_blocked( $param_ins = array(), $param_type = array() ) {
|
91 |
global $wpdb;
|
92 |
return $wpdb->insert($wpdb->prefix . 'formmaker_blocked', $param_ins, $param_type);
|
93 |
}
|
106 |
* Delete blocked IP.
|
107 |
*
|
108 |
* @param int $id
|
|
|
109 |
* @return array
|
110 |
*/
|
111 |
+
public function delete_data( $id = 0 ) {
|
112 |
global $wpdb;
|
113 |
return $wpdb->query($wpdb->prepare('DELETE FROM `' . $wpdb->prefix . 'formmaker_blocked` WHERE id="%d"', $id));
|
114 |
}
|
admin/models/Checkpaypal.php
CHANGED
@@ -8,10 +8,9 @@ class FMModelCheckpaypal extends FMAdminModel {
|
|
8 |
* Get form by id.
|
9 |
*
|
10 |
* @param int $id
|
11 |
-
*
|
12 |
* @return object $row
|
13 |
*/
|
14 |
-
public function get_form_by_id( $id ) {
|
15 |
global $wpdb;
|
16 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
|
17 |
|
@@ -22,10 +21,9 @@ class FMModelCheckpaypal extends FMAdminModel {
|
|
22 |
* Get form session by group id.
|
23 |
*
|
24 |
* @param int $id
|
25 |
-
*
|
26 |
* @return object $row
|
27 |
*/
|
28 |
-
public function get_form_session_by_group_id( $id ) {
|
29 |
global $wpdb;
|
30 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_sessions WHERE group_id="%d"', $id));
|
31 |
|
@@ -38,7 +36,7 @@ class FMModelCheckpaypal extends FMAdminModel {
|
|
38 |
* @param int $payment_status
|
39 |
* @param int $group_id
|
40 |
*/
|
41 |
-
public function update_submission_status( $payment_status, $group_id ) {
|
42 |
global $wpdb;
|
43 |
$wpdb->update($wpdb->prefix . "formmaker_submits", array(
|
44 |
'element_value' => $payment_status,
|
@@ -54,10 +52,9 @@ class FMModelCheckpaypal extends FMAdminModel {
|
|
54 |
* Connect PayPal.
|
55 |
*
|
56 |
* @param array $params
|
57 |
-
*
|
58 |
* @return array $response
|
59 |
*/
|
60 |
-
public function connect_to_paypal( $params ) {
|
61 |
// Set paypal action, default connect to sandbox.
|
62 |
if ( $params['checkout_mode'] == 1 || $params['checkout_mode'] == 'production' ) {
|
63 |
$action = "https://www.paypal.com/cgi-bin/webscr";
|
@@ -81,7 +78,7 @@ class FMModelCheckpaypal extends FMAdminModel {
|
|
81 |
*
|
82 |
* @param array $data
|
83 |
*/
|
84 |
-
public function add_formmaker_sessions( $data ) {
|
85 |
global $wpdb;
|
86 |
$wpdb->insert($wpdb->prefix . "formmaker_sessions", $data);
|
87 |
|
@@ -94,7 +91,7 @@ class FMModelCheckpaypal extends FMAdminModel {
|
|
94 |
* @param int $group_id
|
95 |
* @param array $data
|
96 |
*/
|
97 |
-
public function update_formmaker_sessions_by_group_id( $group_id, $data ) {
|
98 |
global $wpdb;
|
99 |
$wpdb->update($wpdb->prefix . "formmaker_sessions", $data, array( 'group_id' => $group_id ));
|
100 |
|
8 |
* Get form by id.
|
9 |
*
|
10 |
* @param int $id
|
|
|
11 |
* @return object $row
|
12 |
*/
|
13 |
+
public function get_form_by_id( $id = 0 ) {
|
14 |
global $wpdb;
|
15 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
|
16 |
|
21 |
* Get form session by group id.
|
22 |
*
|
23 |
* @param int $id
|
|
|
24 |
* @return object $row
|
25 |
*/
|
26 |
+
public function get_form_session_by_group_id( $id = 0 ) {
|
27 |
global $wpdb;
|
28 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_sessions WHERE group_id="%d"', $id));
|
29 |
|
36 |
* @param int $payment_status
|
37 |
* @param int $group_id
|
38 |
*/
|
39 |
+
public function update_submission_status( $payment_status = 0, $group_id = 0 ) {
|
40 |
global $wpdb;
|
41 |
$wpdb->update($wpdb->prefix . "formmaker_submits", array(
|
42 |
'element_value' => $payment_status,
|
52 |
* Connect PayPal.
|
53 |
*
|
54 |
* @param array $params
|
|
|
55 |
* @return array $response
|
56 |
*/
|
57 |
+
public function connect_to_paypal( $params = array() ) {
|
58 |
// Set paypal action, default connect to sandbox.
|
59 |
if ( $params['checkout_mode'] == 1 || $params['checkout_mode'] == 'production' ) {
|
60 |
$action = "https://www.paypal.com/cgi-bin/webscr";
|
78 |
*
|
79 |
* @param array $data
|
80 |
*/
|
81 |
+
public function add_formmaker_sessions( $data = array() ) {
|
82 |
global $wpdb;
|
83 |
$wpdb->insert($wpdb->prefix . "formmaker_sessions", $data);
|
84 |
|
91 |
* @param int $group_id
|
92 |
* @param array $data
|
93 |
*/
|
94 |
+
public function update_formmaker_sessions_by_group_id( $group_id = 0, $data = array() ) {
|
95 |
global $wpdb;
|
96 |
$wpdb->update($wpdb->prefix . "formmaker_sessions", $data, array( 'group_id' => $group_id ));
|
97 |
|
admin/models/FMPaypalInfo.php
CHANGED
@@ -8,10 +8,9 @@ class FMModelPaypal_info extends FMAdminModel {
|
|
8 |
* Get form session.
|
9 |
*
|
10 |
* @param int $id
|
11 |
-
*
|
12 |
* @return object $row
|
13 |
*/
|
14 |
-
public function get_form_session( $id ) {
|
15 |
global $wpdb;
|
16 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_sessions WHERE group_id="%d"', $id));
|
17 |
|
8 |
* Get form session.
|
9 |
*
|
10 |
* @param int $id
|
|
|
11 |
* @return object $row
|
12 |
*/
|
13 |
+
public function get_form_session( $id = 0 ) {
|
14 |
global $wpdb;
|
15 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_sessions WHERE group_id="%d"', $id));
|
16 |
|
admin/models/FMSelectDataFromDb.php
CHANGED
@@ -11,7 +11,7 @@ class FMModelSelect_data_from_db_fmc extends CFMAdminModel {
|
|
11 |
*
|
12 |
* @return (string|null) $rows
|
13 |
*/
|
14 |
-
function get_labels( $id ) {
|
15 |
global $wpdb;
|
16 |
$rows = $wpdb->get_var("SELECT label_order_current FROM " . $wpdb->prefix . "formmaker where id=" . $id);
|
17 |
|
@@ -56,7 +56,7 @@ class FMModelSelect_data_from_db_fmc extends CFMAdminModel {
|
|
56 |
*
|
57 |
* @return object $tables
|
58 |
*/
|
59 |
-
function get_tables_saved( $con_type, $username, $password, $database, $host ) {
|
60 |
global $wpdb;
|
61 |
if ( $con_type == 'local' ) {
|
62 |
$query = "SHOW TABLES";
|
@@ -112,10 +112,9 @@ class FMModelSelect_data_from_db_fmc extends CFMAdminModel {
|
|
112 |
* @param string $host
|
113 |
* @param string $name
|
114 |
* @param string $con_method
|
115 |
-
*
|
116 |
* @return object $table_struct
|
117 |
*/
|
118 |
-
function get_table_struct_saved( $con_type, $username, $password, $database, $host, $name, $con_method ) {
|
119 |
global $wpdb;
|
120 |
if ( !$name ) {
|
121 |
return array();
|
11 |
*
|
12 |
* @return (string|null) $rows
|
13 |
*/
|
14 |
+
function get_labels( $id = 0 ) {
|
15 |
global $wpdb;
|
16 |
$rows = $wpdb->get_var("SELECT label_order_current FROM " . $wpdb->prefix . "formmaker where id=" . $id);
|
17 |
|
56 |
*
|
57 |
* @return object $tables
|
58 |
*/
|
59 |
+
function get_tables_saved( $con_type = '', $username = '', $password = '', $database = '', $host = '' ) {
|
60 |
global $wpdb;
|
61 |
if ( $con_type == 'local' ) {
|
62 |
$query = "SHOW TABLES";
|
112 |
* @param string $host
|
113 |
* @param string $name
|
114 |
* @param string $con_method
|
|
|
115 |
* @return object $table_struct
|
116 |
*/
|
117 |
+
function get_table_struct_saved( $con_type = '', $username = '', $password = '', $database = '', $host = '', $name = '', $con_method = '' ) {
|
118 |
global $wpdb;
|
119 |
if ( !$name ) {
|
120 |
return array();
|
admin/models/FMSqlMapping.php
CHANGED
@@ -8,10 +8,9 @@ class FMModelFormMakerSQLMapping_fmc extends CFMAdminModel {
|
|
8 |
* Get query by id.
|
9 |
*
|
10 |
* @param $id
|
11 |
-
*
|
12 |
* @return array|null|object|void
|
13 |
*/
|
14 |
-
function get_query( $id ) {
|
15 |
global $wpdb;
|
16 |
$rows = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "formmaker_query where id=" . $id);
|
17 |
|
@@ -22,10 +21,9 @@ class FMModelFormMakerSQLMapping_fmc extends CFMAdminModel {
|
|
22 |
* Get labels by id.
|
23 |
*
|
24 |
* @param int $id
|
25 |
-
*
|
26 |
* @return (string|null) $rows
|
27 |
*/
|
28 |
-
function get_labels( $id ) {
|
29 |
global $wpdb;
|
30 |
$rows = $wpdb->get_var("SELECT label_order_current FROM " . $wpdb->prefix . "formmaker where id=" . $id);
|
31 |
|
8 |
* Get query by id.
|
9 |
*
|
10 |
* @param $id
|
|
|
11 |
* @return array|null|object|void
|
12 |
*/
|
13 |
+
function get_query( $id = 0 ) {
|
14 |
global $wpdb;
|
15 |
$rows = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "formmaker_query where id=" . $id);
|
16 |
|
21 |
* Get labels by id.
|
22 |
*
|
23 |
* @param int $id
|
|
|
24 |
* @return (string|null) $rows
|
25 |
*/
|
26 |
+
function get_labels( $id = 0 ) {
|
27 |
global $wpdb;
|
28 |
$rows = $wpdb->get_var("SELECT label_order_current FROM " . $wpdb->prefix . "formmaker where id=" . $id);
|
29 |
|
admin/models/FormMakerSubmits.php
CHANGED
@@ -4,14 +4,26 @@
|
|
4 |
* Class FMModelFormMakerSubmits_fmc
|
5 |
*/
|
6 |
class FMModelFormMakerSubmits_fmc extends CFMAdminModel {
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
global $wpdb;
|
9 |
$label_order = $wpdb->get_var($wpdb->prepare('SELECT `label_order` FROM `' . $wpdb->prefix . 'formmaker` WHERE id="%d"', $form_id));
|
10 |
|
11 |
return $label_order;
|
12 |
}
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
global $wpdb;
|
16 |
$row = $wpdb->get_results($wpdb->prepare('SELECT * FROM `' . $wpdb->prefix . 'formmaker_submits` WHERE group_id="%d"', $group_id));
|
17 |
|
4 |
* Class FMModelFormMakerSubmits_fmc
|
5 |
*/
|
6 |
class FMModelFormMakerSubmits_fmc extends CFMAdminModel {
|
7 |
+
/**
|
8 |
+
* Get from label order.
|
9 |
+
*
|
10 |
+
* @param int $form_id
|
11 |
+
* @return mixed
|
12 |
+
*/
|
13 |
+
public function get_from_label_order( $form_id = 0 ) {
|
14 |
global $wpdb;
|
15 |
$label_order = $wpdb->get_var($wpdb->prepare('SELECT `label_order` FROM `' . $wpdb->prefix . 'formmaker` WHERE id="%d"', $form_id));
|
16 |
|
17 |
return $label_order;
|
18 |
}
|
19 |
|
20 |
+
/**
|
21 |
+
* Get submissions.
|
22 |
+
*
|
23 |
+
* @param int $group_id
|
24 |
+
* @return mixed
|
25 |
+
*/
|
26 |
+
public function get_submissions( $group_id = 0 ) {
|
27 |
global $wpdb;
|
28 |
$row = $wpdb->get_results($wpdb->prepare('SELECT * FROM `' . $wpdb->prefix . 'formmaker_submits` WHERE group_id="%d"', $group_id));
|
29 |
|
admin/models/Manage_fm.php
CHANGED
@@ -4,6 +4,7 @@
|
|
4 |
* Class FMModelManage_fmc
|
5 |
*/
|
6 |
class FMModelManage_fmc extends CFMAdminModel {
|
|
|
7 |
/**
|
8 |
* Get forms.
|
9 |
*
|
@@ -11,7 +12,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
11 |
*
|
12 |
* @return array|null|object
|
13 |
*/
|
14 |
-
public function get_rows_data($params) {
|
15 |
$order = $params['order'];
|
16 |
$orderby = $params['orderby'];
|
17 |
$items_per_page = $params['items_per_page'];
|
@@ -38,10 +39,27 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
38 |
return $rows;
|
39 |
}
|
40 |
|
41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
global $wpdb;
|
43 |
if ( $id != 0 ) {
|
44 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
}
|
46 |
else {
|
47 |
// Add "Submit" button to new forms.
|
@@ -97,15 +115,34 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
97 |
$row->header_image_url = '';
|
98 |
$row->header_image_animation = '';
|
99 |
$row->header_hide_image = '';
|
|
|
|
|
100 |
}
|
101 |
|
102 |
return $row;
|
103 |
}
|
104 |
|
105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
global $wpdb;
|
107 |
if ( $id != 0 ) {
|
108 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_backup WHERE backup_id="%d"', $id));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
}
|
110 |
else {
|
111 |
// Add "Submit" button to new forms.
|
@@ -180,7 +217,9 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
180 |
$row->mail_emptyfields = 0;
|
181 |
$row->mail_verify = 0;
|
182 |
$row->mail_verify_expiretime = 0;
|
183 |
-
$row->mail_verification_post_id
|
|
|
|
|
184 |
}
|
185 |
|
186 |
$labels2 = array();
|
@@ -248,7 +287,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
248 |
case 'type_recaptcha': {
|
249 |
$arrows = '<div id="wdform_arrows' . $id . '" class="wdform_arrows" style="display: none;">
|
250 |
<div class="wdform_arrows_basic wdform_arrows_container">
|
251 |
-
|
252 |
<span title="Edit the field" class="page_toolbar dashicons dashicons-edit" onclick="edit("' . $id . '")"></span>
|
253 |
</span>
|
254 |
<span id="duplicate_' . $id . '" valign="middle" class="element_toolbar"></span>
|
@@ -256,7 +295,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
256 |
<span title="Remove the field" class="page_toolbar dashicons dashicons-no-alt" onclick="remove_row("' . $id . '")"></span>
|
257 |
</span>
|
258 |
</div>
|
259 |
-
|
260 |
<span id="left_' . $id . '" valign="middle" class="element_toolbar">
|
261 |
<span title="Move the field to the left" class="page_toolbar dashicons dashicons-arrow-left-alt" onclick="left_row("' . $id . '")"></span>
|
262 |
</span>
|
@@ -291,7 +330,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
291 |
<span title="Remove the field" class="page_toolbar dashicons dashicons-no-alt" onclick="remove_row("' . $id . '")"></span>
|
292 |
</span>
|
293 |
</div>
|
294 |
-
|
295 |
<span id="left_' . $id . '" valign="middle" class="element_toolbar">
|
296 |
<span title="Move the field to the left" class="page_toolbar dashicons dashicons-arrow-left-alt" onclick="left_row("' . $id . '")"></span>
|
297 |
</span>
|
@@ -454,7 +493,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
454 |
$param['w_readonly'] = (isset($param['w_readonly']) ? $param['w_readonly'] : "no");
|
455 |
$param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
|
456 |
$display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
|
457 |
-
$rep = '<div id="wdform_field' . $id . '" type="type_text" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" style="display: ' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span><span id="' . $id . '_required_elementform_id_temp" class="required" style="vertical-align: top;">' . $required_sym . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" style="display: ' . $param['w_field_label_pos'] . '"><input type="hidden" value="type_text" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp" /><input type="hidden" value="' . $param['w_required'] . '" name="' . $id . '_requiredform_id_temp" id="' . $id . '_requiredform_id_temp" /><input type="hidden" value="' . $param['w_readonly'] . '" name="' . $id . '_readonlyform_id_temp" id="' . $id . '_readonlyform_id_temp"/><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/><input type="hidden" value="' . $param['w_regExp_status'] . '" name="' . $id . '_regExpStatusform_id_temp" id="' . $id . '_regExpStatusform_id_temp"><input type="hidden" value="' . $param['w_regExp_value'] . '" name="' . $id . '_regExp_valueform_id_temp" id="' . $id . '_regExp_valueform_id_temp"><input type="hidden" value="' . $param['w_regExp_common'] . '" name="' . $id . '_regExp_commonform_id_temp" id="' . $id . '_regExp_commonform_id_temp"><input type="hidden" value="' . $param['w_regExp_alert'] . '" name="' . $id . '_regExp_alertform_id_temp" id="' . $id . '_regExp_alertform_id_temp"><input type="hidden" value="' . $param['w_regExp_arg'] . '" name="' . $id . '_regArgumentform_id_temp" id="' . $id . '_regArgumentform_id_temp"><input type="hidden" value="' . $param['w_unique'] . '" name="' . $id . '_uniqueform_id_temp" id="' . $id . '_uniqueform_id_temp" /><input type="text" id="' . $id . '_elementform_id_temp" name="' . $id . '_elementform_id_temp" value="' . $param['w_first_val'] . '" title="' . $param['w_title'] . '" placeholder="' . $param['w_title'] . '" style="width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' disabled /></div></div>';
|
458 |
break;
|
459 |
}
|
460 |
case 'type_number': {
|
@@ -483,7 +522,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
483 |
}
|
484 |
$param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "table-cell" : "block");
|
485 |
$required_sym = ($param['w_required'] == "yes" ? " *" : "");
|
486 |
-
$rep = '<div id="wdform_field' . $id . '" type="type_number" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span><span id="' . $id . '_required_elementform_id_temp" class="required" style="vertical-align: top;">' . $required_sym . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . '"><input type="hidden" value="type_number" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><input type="hidden" value="' . $param['w_required'] . '" name="' . $id . '_requiredform_id_temp" id="' . $id . '_requiredform_id_temp"><input type="hidden" value="' . $param['w_unique'] . '" name="' . $id . '_uniqueform_id_temp" id="' . $id . '_uniqueform_id_temp"><input type="text" id="' . $id . '_elementform_id_temp" name="' . $id . '_elementform_id_temp" value="' . $param['w_first_val'] . '" title="' . $param['w_title'] . '" onkeypress="return check_isnum(event)" style="width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' disabled /></div></div>';
|
487 |
break;
|
488 |
}
|
489 |
case 'type_password': {
|
@@ -607,7 +646,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
607 |
$required_sym = ($param['w_required'] == "yes" ? " *" : "");
|
608 |
$param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
|
609 |
$display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
|
610 |
-
$rep = '<div id="wdform_field' . $id . '" type="type_textarea" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span><span id="' . $id . '_required_elementform_id_temp" class="required" style="vertical-align: top;">' . $required_sym . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . '"><input type="hidden" value="type_textarea" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><input type="hidden" value="' . $param['w_required'] . '" name="' . $id . '_requiredform_id_temp" id="' . $id . '_requiredform_id_temp"><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/><input type="hidden" value="' . $param['w_unique'] . '" name="' . $id . '_uniqueform_id_temp" id="' . $id . '_uniqueform_id_temp"><textarea id="' . $id . '_elementform_id_temp" name="' . $id . '_elementform_id_temp" title="' . $param['w_title'] . '" placeholder="' . $param['w_title'] . '" style="width: ' . $param['w_size_w'] . 'px; height: ' . $param['w_size_h'] . 'px;" ' . $param['attributes'] . ' disabled>' . $param['w_first_val'] . '</textarea></div></div>';
|
611 |
break;
|
612 |
}
|
613 |
case 'type_phone': {
|
@@ -656,7 +695,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
656 |
$param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
|
657 |
$display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
|
658 |
$required_sym = ($param['w_required'] == "yes" ? " *" : "");
|
659 |
-
$rep = '<div id="wdform_field' . $id . '" type="type_phone" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span><span id="' . $id . '_required_elementform_id_temp" class="required">' . $required_sym . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_phone" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><input type="hidden" value="' . $param['w_required'] . '" name="' . $id . '_requiredform_id_temp" id="' . $id . '_requiredform_id_temp"><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/><input type="hidden" value="' . $param['w_unique'] . '" name="' . $id . '_uniqueform_id_temp" id="' . $id . '_uniqueform_id_temp"><div id="' . $id . '_table_name" style="display: table;"><div id="' . $id . '_tr_name1" style="display: table-row;"><div id="' . $id . '_td_name_input_first" style="display: table-cell;"><input type="text" id="' . $id . '_element_firstform_id_temp" name="' . $id . '_element_firstform_id_temp" value="' . $w_first_val[0] . '" title="' . $w_title[0] . '" placeholder="' . $w_title[0] . '" onkeypress="return check_isnum(event)"style="width: 50px;" ' . $param['attributes'] . ' disabled /><span class="wdform_line" style="margin: 0px 4px; padding: 0px;">-</span></div><div id="' . $id . '_td_name_input_last" style="display: table-cell;"><input type="text" id="' . $id . '_element_lastform_id_temp" name="' . $id . '_element_lastform_id_temp" value="' . $w_first_val[1] . '" title="' . $w_title[1] . '" placeholder="' . $w_title[1] . '" onkeypress="return check_isnum(event)"style="width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' disabled /></div></div><div id="' . $id . '_tr_name2" style="display: table-row;"><div id="' . $id . '_td_name_label_first" align="left" style="display: table-cell;"><label class="mini_label" id="' . $id . '_mini_label_area_code">' . $w_mini_labels[0] . '</label></div><div id="' . $id . '_td_name_label_last" align="left" style="display: table-cell;"><label class="mini_label" id="' . $id . '_mini_label_phone_number">' . $w_mini_labels[1] . '</label></div></div></div></div></div>';
|
660 |
break;
|
661 |
}
|
662 |
case 'type_phone_new': {
|
@@ -688,7 +727,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
688 |
$param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
|
689 |
$display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
|
690 |
$required_sym = ($param['w_required'] == "yes" ? " *" : "");
|
691 |
-
$rep = '<div id="wdform_field' . $id . '" type="type_phone_new" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span><span id="' . $id . '_required_elementform_id_temp" class="required">' . $required_sym . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_phone_new" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><input type="hidden" value="' . $param['w_required'] . '" name="' . $id . '_requiredform_id_temp" id="' . $id . '_requiredform_id_temp"><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"><input type="hidden" value="' . $param['w_unique'] . '" name="' . $id . '_uniqueform_id_temp" id="' . $id . '_uniqueform_id_temp"><div id="' . $id . '_table_name" style="display: table;"><div id="' . $id . '_tr_name1" style="display: table-row;"><div id="' . $id . '_td_name_input_first" style="display: table-cell;"><input type="text" id="' . $id . '_elementform_id_temp" name="' . $id . '_elementform_id_temp" value="' . $param['w_first_val'] . '" top-country = "' . $param['w_top_country'] . '" onkeypress="return check_isnum("' . $id . '_elementform_id_temp")" style="width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' disabled></div></div></div></div></div>';
|
692 |
break;
|
693 |
}
|
694 |
case 'type_name': {
|
@@ -775,14 +814,14 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
775 |
$param['w_name_fields'] = isset($param['w_name_fields']) ? $param['w_name_fields'] : ($param['w_name_format'] == 'normal' ? 'no***no' : 'yes***yes');
|
776 |
$w_name_fields = explode('***', $param['w_name_fields']);
|
777 |
$param['w_autofill'] = isset($param['w_autofill']) ? $param['w_autofill'] : 'no';
|
778 |
-
$w_name_format = '<div id="' . $id . '_td_name_input_first" style="display: table-cell;"><input type="text" id="' . $id . '_element_firstform_id_temp" name="' . $id . '_element_firstform_id_temp" value="' . $w_first_val[0] . '" title="' . $w_title[0] . '" placeholder="' . $w_title[0] . '" style="margin-right: 10px; width: ' . $param['w_size'] . 'px;"' . $param['attributes'] . ' disabled /></div><div id="' . $id . '_td_name_input_last" style="display: table-cell;"><input type="text" id="' . $id . '_element_lastform_id_temp" name="' . $id . '_element_lastform_id_temp" value="' . $w_first_val[1] . '" title="' . $w_title[1] . '" placeholder="' . $w_title[1] . '" style="margin-right: 10px; width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' disabled /></div>';
|
779 |
$w_name_format_mini_labels = '<div id="' . $id . '_td_name_label_first" align="left" style="display: table-cell;"><label class="mini_label" id="' . $id . '_mini_label_first">' . $w_mini_labels[1] . '</label></div><div id="' . $id . '_td_name_label_last" align="left" style="display: table-cell;"><label class="mini_label" id="' . $id . '_mini_label_last">' . $w_mini_labels[2] . '</label></div>';
|
780 |
if ( $w_name_fields[0] == 'yes' ) {
|
781 |
-
$w_name_format = '<div id="' . $id . '_td_name_input_title" style="display: table-cell;"><input type="text" id="' . $id . '_element_titleform_id_temp" name="' . $id . '_element_titleform_id_temp" value="' . $w_first_val[2] . '" title="' . $w_title[2] . '" style="margin: 0px 10px 0px 0px; width: 40px;" disabled /></div>' . $w_name_format;
|
782 |
$w_name_format_mini_labels = '<div id="' . $id . '_td_name_label_title" align="left" style="display: table-cell;"><label class="mini_label" id="' . $id . '_mini_label_title">' . $w_mini_labels[0] . '</label></div>' . $w_name_format_mini_labels;
|
783 |
}
|
784 |
if ( $w_name_fields[1] == 'yes' ) {
|
785 |
-
$w_name_format = $w_name_format . '<div id="' . $id . '_td_name_input_middle" style="display: table-cell;"><input type="text" id="' . $id . '_element_middleform_id_temp" name="' . $id . '_element_middleform_id_temp" value="' . $w_first_val[3] . '" title="' . $w_title[3] . '" style="width: ' . $param['w_size'] . 'px;" disabled /></div>';
|
786 |
$w_name_format_mini_labels = $w_name_format_mini_labels . '<div id="' . $id . '_td_name_label_middle" align="left" style="display: table-cell;"><label class="mini_label" id="' . $id . '_mini_label_middle">' . $w_mini_labels[3] . '</label></div>';
|
787 |
}
|
788 |
$rep = '<div id="wdform_field' . $id . '" type="type_name" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span><span id="' . $id . '_required_elementform_id_temp" class="required" style="vertical-align: top;">' . $required_sym . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_name" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><input type="hidden" value="' . $param['w_required'] . '" name="' . $id . '_requiredform_id_temp" id="' . $id . '_requiredform_id_temp"><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/><input type="hidden" value="' . $param['w_unique'] . '" name="' . $id . '_uniqueform_id_temp" id="' . $id . '_uniqueform_id_temp"><input type="hidden" value="' . $param['w_autofill'] . '" name="' . $id . '_autofillform_id_temp" id="' . $id . '_autofillform_id_temp"><input type="hidden" name="' . $id . '_enable_fieldsform_id_temp" id="' . $id . '_enable_fieldsform_id_temp" title="' . $w_name_fields[0] . '" first="yes" last="yes" middle="' . $w_name_fields[1] . '"><div id="' . $id . '_table_name" cellpadding="0" cellspacing="0" style="display: table;"><div id="' . $id . '_tr_name1" style="display: table-row;">' . $w_name_format . '</div><div id="' . $id . '_tr_name2" style="display: table-row;">' . $w_name_format_mini_labels . '</div></div></div></div>';
|
@@ -968,7 +1007,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
968 |
$param['w_verification_label'] = isset($param['w_verification_label']) ? $param['w_verification_label'] : "E-mail confirmation:";
|
969 |
$param['w_verification_placeholder'] = isset($param['w_verification_placeholder']) ? $param['w_verification_placeholder'] : "";
|
970 |
$confirm_emeil = '<br><div align="left" id="' . $id . '_1_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $display_label_confirm . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_1_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $param['w_verification_label'] . '</span><span id="' . $id . '_required_elementform_id_temp" class="required" style="vertical-align: top;">' . $required_sym . '</span></div><div align="left" id="' . $id . '_1_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $display_element_confirm . ';"><input type="hidden" value="' . $param['w_verification'] . '" name="' . $id . '_verification_id_temp" id="' . $id . '_verification_id_temp"><input type="text" id="' . $id . '_1_elementform_id_temp" name="' . $id . '_1_elementform_id_temp" value="' . $param['w_verification_placeholder'] . '" title="' . $param['w_verification_placeholder'] . '" style="width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' disabled /></div>';
|
971 |
-
$rep = '<div id="wdform_field' . $id . '" type="type_submitter_mail" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span><span id="' . $id . '_required_elementform_id_temp" class="required" style="vertical-align: top;">' . $required_sym . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_submitter_mail" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><input type="hidden" value="' . $param['w_required'] . '" name="' . $id . '_requiredform_id_temp" id="' . $id . '_requiredform_id_temp"><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/><input type="hidden" value="' . $param['w_unique'] . '" name="' . $id . '_uniqueform_id_temp" id="' . $id . '_uniqueform_id_temp"><input type="hidden" value="' . $param['w_autofill'] . '" name="' . $id . '_autofillform_id_temp" id="' . $id . '_autofillform_id_temp"><input type="hidden" value="' . $param['w_verification'] . '" name="' . $id . '_verification_id_temp" id="' . $id . '_verification_id_temp"><input type="text" id="' . $id . '_elementform_id_temp" name="' . $id . '_elementform_id_temp" value="' . $param['w_first_val'] . '" title="' . $param['w_title'] . '" placeholder="' . $param['w_title'] . '" style="width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' disabled /></div>' . $confirm_emeil . '</div>';
|
972 |
break;
|
973 |
}
|
974 |
case 'type_checkbox': {
|
@@ -1083,6 +1122,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
1083 |
else {
|
1084 |
$choise_value = $param['w_choices'][(int) $param['w_rowcol'] * $l + $i];
|
1085 |
}
|
|
|
1086 |
if ( isset($param['w_choices_params']) && $param['w_choices_params'][(int) $param['w_rowcol'] * $l + $i] ) {
|
1087 |
$w_choices_params = explode('[where_order_by]', $param['w_choices_params'][(int) $param['w_rowcol'] * $l + $i]);
|
1088 |
$where = 'where="' . $w_choices_params[0] . '"';
|
@@ -1115,6 +1155,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
1115 |
else {
|
1116 |
$choise_value = $param['w_choices'][(int) $param['w_rowcol'] * $i + $l];
|
1117 |
}
|
|
|
1118 |
if ( isset($param['w_choices_params']) && $param['w_choices_params'][(int) $param['w_rowcol'] * $i + $l] ) {
|
1119 |
$w_choices_params = explode('[where_order_by]', $param['w_choices_params'][(int) $param['w_rowcol'] * $i + $l]);
|
1120 |
$where = 'where="' . $w_choices_params[0] . '"';
|
@@ -1142,6 +1183,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
1142 |
else {
|
1143 |
$choise_value = $param['w_choices'][(int) $param['w_rowcol'] * $i + $l];
|
1144 |
}
|
|
|
1145 |
if ( isset($param['w_choices_params']) && $param['w_choices_params'][(int) $param['w_rowcol'] * $i + $l] ) {
|
1146 |
$w_choices_params = explode('[where_order_by]', $param['w_choices_params'][(int) $param['w_rowcol'] * $i + $l]);
|
1147 |
$where = 'where="' . $w_choices_params[0] . '"';
|
@@ -1172,6 +1214,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
1172 |
else {
|
1173 |
$choise_value = $param['w_choices'][$l];
|
1174 |
}
|
|
|
1175 |
if ( isset($param['w_choices_params']) && $param['w_choices_params'][$l] ) {
|
1176 |
$w_choices_params = explode('[where_order_by]', $param['w_choices_params'][$l]);
|
1177 |
$where = 'where="' . $w_choices_params[0] . '"';
|
@@ -1300,6 +1343,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
1300 |
else {
|
1301 |
$choise_value = $param['w_choices'][(int) $param['w_rowcol'] * $l + $i];
|
1302 |
}
|
|
|
1303 |
if ( isset($param['w_choices_params']) && $param['w_choices_params'][(int) $param['w_rowcol'] * $l + $i] ) {
|
1304 |
$w_choices_params = explode('[where_order_by]', $param['w_choices_params'][(int) $param['w_rowcol'] * $l + $i]);
|
1305 |
$where = 'where="' . $w_choices_params[0] . '"';
|
@@ -1332,6 +1376,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
1332 |
else {
|
1333 |
$choise_value = $param['w_choices'][(int) $param['w_rowcol'] * $i + $l];
|
1334 |
}
|
|
|
1335 |
if ( isset($param['w_choices_params']) && $param['w_choices_params'][(int) $param['w_rowcol'] * $i + $l] ) {
|
1336 |
$w_choices_params = explode('[where_order_by]', $param['w_choices_params'][(int) $param['w_rowcol'] * $i + $l]);
|
1337 |
$where = 'where="' . $w_choices_params[0] . '"';
|
@@ -1358,6 +1403,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
1358 |
else {
|
1359 |
$choise_value = $param['w_choices'][(int) $param['w_rowcol'] * $i + $l];
|
1360 |
}
|
|
|
1361 |
if ( isset($param['w_choices_params']) && $param['w_choices_params'][(int) $param['w_rowcol'] * $i + $l] ) {
|
1362 |
$w_choices_params = explode('[where_order_by]', $param['w_choices_params'][(int) $param['w_rowcol'] * $i + $l]);
|
1363 |
$where = 'where="' . $w_choices_params[0] . '"';
|
@@ -1388,6 +1434,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
1388 |
else {
|
1389 |
$choise_value = $param['w_choices'][$l];
|
1390 |
}
|
|
|
1391 |
if ( isset($param['w_choices_params']) && $param['w_choices_params'][$l] ) {
|
1392 |
$w_choices_params = explode('[where_order_by]', $param['w_choices_params'][$l]);
|
1393 |
$where = 'where="' . $w_choices_params[0] . '"';
|
@@ -2289,7 +2336,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
2289 |
$w_first_val = explode('***', $param['w_first_val']);
|
2290 |
$w_title = explode('***', $param['w_title']);
|
2291 |
$w_mini_labels = explode('***', $param['w_mini_labels']);
|
2292 |
-
$rep = '<div id="wdform_field' . $id . '" type="type_paypal_price" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span><span id="' . $id . '_required_elementform_id_temp" class="required"style="vertical-align: top;">' . $required_sym . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_paypal_price" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><input type="hidden" value="' . $param['w_required'] . '" name="' . $id . '_requiredform_id_temp" id="' . $id . '_requiredform_id_temp"><input type="hidden" value="' . $param['w_range_min'] . '" name="' . $id . '_range_minform_id_temp" id="' . $id . '_range_minform_id_temp"><input type="hidden" value="' . $param['w_range_max'] . '" name="' . $id . '_range_maxform_id_temp" id="' . $id . '_range_maxform_id_temp"><div id="' . $id . '_table_price" style="display: table;"><div id="' . $id . '_tr_price1" style="display: table-row;"><div id="' . $id . '_td_name_currency" style="display: table-cell;"><span class="wdform_colon" style="vertical-align: middle;"><!--repstart--> $ <!--repend--></span></div><div id="' . $id . '_td_name_dollars" style="display: table-cell;"><input type="text" id="' . $id . '_element_dollarsform_id_temp" name="' . $id . '_element_dollarsform_id_temp" value="' . $w_first_val[0] . '" title="' . $w_title[0] . '" onkeypress="return check_isnum(event)" style="width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' disabled/></div><div id="' . $id . '_td_name_divider" style="display: ' . $hide_cents . ';"><span class="wdform_colon" style="vertical-align: middle;"> . </span></div><div id="' . $id . '_td_name_cents" style="display: ' . $hide_cents . '"><input type="text" id="' . $id . '_element_centsform_id_temp" name="' . $id . '_element_centsform_id_temp" value="' . $w_first_val[1] . '" title="' . $w_title[1] . '" onblur="add_0("' . $id . '_element_centsform_id_temp")" onkeypress="return check_isnum_interval(event,"' . $id . '_element_centsform_id_temp",0,99)"style="width: 30px;" ' . $param['attributes'] . ' disabled/></div></div><div id="' . $id . '_tr_price2" style="display: table-row;"><div style="display: table-cell;"><label class="mini_label"></label></div><div align="left" style="display: table-cell;"><label class="mini_label" id="' . $id . '_mini_label_dollars">' . $w_mini_labels[0] . '</label></div><div id="' . $id . '_td_name_label_divider" style="display: ' . $hide_cents . '"><label class="mini_label"></label></div><div align="left" id="' . $id . '_td_name_label_cents" style="display: ' . $hide_cents . '"><label class="mini_label" id="' . $id . '_mini_label_cents">' . $w_mini_labels[1] . '</label></div></div></div></div></div>';
|
2293 |
break;
|
2294 |
}
|
2295 |
case 'type_paypal_price_new': {
|
@@ -2341,7 +2388,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
2341 |
$required_sym = ($param['w_required'] == "yes" ? " *" : "");
|
2342 |
$currency_sumbol = ($param['w_currency'] == "yes" ? "display:none;" : "display: table-cell;");
|
2343 |
$param['w_readonly'] = (isset($param['w_readonly']) ? $param['w_readonly'] : "no");
|
2344 |
-
$rep = '<div id="wdform_field' . $id . '" type="type_paypal_price_new" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span><span id="' . $id . '_required_elementform_id_temp" class="required"style="vertical-align: top;">' . $required_sym . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_paypal_price_new" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><input type="hidden" value="' . $param['w_required'] . '" name="' . $id . '_requiredform_id_temp" id="' . $id . '_requiredform_id_temp"><input type="hidden" value="' . $param['w_readonly'] . '" name="' . $id . '_readonlyform_id_temp" id="' . $id . '_readonlyform_id_temp"><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/><input type="hidden" value="' . $param['w_range_min'] . '" name="' . $id . '_range_minform_id_temp" id="' . $id . '_range_minform_id_temp"><input type="hidden" value="' . $param['w_range_max'] . '" name="' . $id . '_range_maxform_id_temp" id="' . $id . '_range_maxform_id_temp"><div id="' . $id . '_table_price" style="display: table;"><div id="' . $id . '_tr_price1" style="display: table-row;"><div id="' . $id . '_td_name_currency" style="' . $currency_sumbol . '"><span class="wdform_colon" style="vertical-align: middle;"><!--repstart--> $ <!--repend--></span></div><div id="' . $id . '_td_name_dollars" style="display: table-cell;"><input type="text" id="' . $id . '_elementform_id_temp" name="' . $id . '_elementform_id_temp" value="' . $param['w_first_val'] . '" title="' . $param['w_title'] . '" placeholder="' . $param['w_title'] . '" onkeypress="return check_isnum(event)" style="width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' disabled/></div></div></div></div></div>';
|
2345 |
break;
|
2346 |
}
|
2347 |
case 'type_paypal_select': {
|
@@ -3347,7 +3394,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3347 |
$param['w_func'] = explode('***', $param['w_func']);
|
3348 |
$rep .= '<div id="wdform_field' . $id . '" type="type_button" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: table-cell;"><span id="' . $id . '_element_labelform_id_temp" style="display: none;">button_' . $id . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: table-cell;"><input type="hidden" value="type_button" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp">';
|
3349 |
foreach ( $param['w_title'] as $key => $title ) {
|
3350 |
-
$rep .= '<button type="button" class="button button-secondary button-large" id="' . $id . '_elementform_id_temp' . $key . '" name="' . $id . '_elementform_id_temp' . $key . '" value="' . $title . '" onclick="' . $param['w_func'][$key] . '" ' . $param['attributes'] . '>' . $title . '</button>';
|
3351 |
}
|
3352 |
$rep .= '</div></div>';
|
3353 |
break;
|
@@ -3362,6 +3409,12 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3362 |
return $row;
|
3363 |
}
|
3364 |
|
|
|
|
|
|
|
|
|
|
|
|
|
3365 |
public function get_theme_rows_data( $old = '' ) {
|
3366 |
global $wpdb;
|
3367 |
$rows = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "formmaker_themes ORDER BY `default` DESC, `version` DESC, `id` ASC");
|
@@ -3369,21 +3422,39 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3369 |
return $rows;
|
3370 |
}
|
3371 |
|
3372 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3373 |
global $wpdb;
|
3374 |
$rows = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "formmaker_query WHERE form_id=" . $id . " ORDER BY id ASC");
|
3375 |
|
3376 |
return $rows;
|
3377 |
}
|
3378 |
|
3379 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3380 |
global $wpdb;
|
3381 |
$rows = $wpdb->get_col("SELECT DISTINCT `element_label` FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id=" . $id);
|
3382 |
|
3383 |
return $rows;
|
3384 |
}
|
3385 |
|
3386 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
3387 |
global $wpdb;
|
3388 |
$rows = $wpdb->get_var("SELECT COUNT(*) FROM " . $wpdb->prefix . "formmaker_sessions WHERE form_id=" . $id);
|
3389 |
|
@@ -3418,7 +3489,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3418 |
*
|
3419 |
* @return string
|
3420 |
*/
|
3421 |
-
public function get_display_options( $id ) {
|
3422 |
global $wpdb;
|
3423 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_display_options WHERE form_id="%d"', $id));
|
3424 |
if ( !$row ) {
|
@@ -3441,7 +3512,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3441 |
$row->scrollbox_closing = 1;
|
3442 |
$row->scrollbox_minimize = 1;
|
3443 |
$row->scrollbox_minimize_text = '';
|
3444 |
-
$row->display_on = '
|
3445 |
$row->posts_include = '';
|
3446 |
$row->pages_include = '';
|
3447 |
$row->display_on_categories = '';
|
@@ -3452,6 +3523,29 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3452 |
return $row;
|
3453 |
}
|
3454 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3455 |
public function fm_posts_query() {
|
3456 |
$default_post_types = array( 'post', 'page' );
|
3457 |
$custom_post_types = get_post_types(array(
|
@@ -3475,13 +3569,15 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3475 |
}
|
3476 |
$results = array();
|
3477 |
foreach ( $posts as $post ) {
|
3478 |
-
|
3479 |
-
|
3480 |
-
|
3481 |
-
|
|
|
|
|
|
|
3482 |
}
|
3483 |
wp_reset_postdata();
|
3484 |
-
|
3485 |
return $results;
|
3486 |
}
|
3487 |
|
@@ -3507,7 +3603,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3507 |
*
|
3508 |
* @return int
|
3509 |
*/
|
3510 |
-
public function get_undo_redo_id( $backup_id, $id, $type ) {
|
3511 |
global $wpdb;
|
3512 |
if ( $type == 1 ) {
|
3513 |
$query = "SELECT backup_id FROM " . $wpdb->prefix . "formmaker_backup WHERE backup_id > $backup_id AND id = $id ORDER BY backup_id ASC LIMIT 0 , 1 ";
|
@@ -3527,7 +3623,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3527 |
*
|
3528 |
* @return int
|
3529 |
*/
|
3530 |
-
public function get_max_row( $table, $column ) {
|
3531 |
global $wpdb;
|
3532 |
$query = "SELECT max(" . $column . ") FROM " . $wpdb->prefix . $table;
|
3533 |
|
@@ -3541,7 +3637,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3541 |
*
|
3542 |
* @return bool
|
3543 |
*/
|
3544 |
-
public function delete_formmaker_query( $id ) {
|
3545 |
global $wpdb;
|
3546 |
$query = 'DELETE FROM ' . $wpdb->prefix . 'formmaker_query WHERE id =' . $id;
|
3547 |
return $wpdb->query($query);
|
@@ -3564,7 +3660,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3564 |
*
|
3565 |
* @return bool
|
3566 |
*/
|
3567 |
-
public function update_data( $table, $data_params = array(), $where_data_params = array() ) {
|
3568 |
global $wpdb;
|
3569 |
return $wpdb->update($wpdb->prefix . $table, $data_params, $where_data_params);
|
3570 |
}
|
@@ -3573,11 +3669,11 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3573 |
* Get request value.
|
3574 |
*
|
3575 |
* @param string $table
|
3576 |
-
* @param array
|
3577 |
*
|
3578 |
-
* @return
|
3579 |
*/
|
3580 |
-
public function insert_data_to_db( $table, $data ) {
|
3581 |
global $wpdb;
|
3582 |
$query = $wpdb->insert($wpdb->prefix . $table, $data);
|
3583 |
$wpdb->show_errors();
|
@@ -3603,7 +3699,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3603 |
*
|
3604 |
* @return bool
|
3605 |
*/
|
3606 |
-
public function replace_display_options( $data ) {
|
3607 |
global $wpdb;
|
3608 |
|
3609 |
return $wpdb->replace($wpdb->prefix . 'formmaker_display_options', $data);
|
@@ -3617,7 +3713,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3617 |
*
|
3618 |
* @return int
|
3619 |
*/
|
3620 |
-
public function get_prev_backup_id( $backup_id, $id ) {
|
3621 |
global $wpdb;
|
3622 |
$query = "SELECT backup_id FROM " . $wpdb->prefix . "formmaker_backup WHERE backup_id < " . $backup_id . " AND id = " . $id . " ORDER BY backup_id DESC LIMIT 0 , 1 ";
|
3623 |
|
@@ -3632,14 +3728,14 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3632 |
*
|
3633 |
* @return int
|
3634 |
*/
|
3635 |
-
public function get_backup_id( $backup_id, $id ) {
|
3636 |
global $wpdb;
|
3637 |
$query = "SELECT backup_id FROM " . $wpdb->prefix . "formmaker_backup WHERE backup_id > " . $backup_id . " AND id = " . $id . " ORDER BY backup_id ASC LIMIT 0 , 1 ";
|
3638 |
|
3639 |
return $wpdb->get_var($query);
|
3640 |
}
|
3641 |
|
3642 |
-
public function get_autogen_layout( $id ) {
|
3643 |
global $wpdb;
|
3644 |
$autogen_layout = $wpdb->get_var($wpdb->prepare('SELECT autogen_layout FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
|
3645 |
return $autogen_layout == '1';
|
@@ -3653,7 +3749,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3653 |
*
|
3654 |
* @return int
|
3655 |
*/
|
3656 |
-
public function get_count( $params ) {
|
3657 |
global $wpdb;
|
3658 |
$query = "SELECT count(" . $params['selection'] . ") FROM " . $wpdb->prefix . $params['table'];
|
3659 |
if ( isset($params['where']) ) {
|
@@ -3671,7 +3767,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3671 |
*
|
3672 |
* @return array
|
3673 |
*/
|
3674 |
-
public function delete_rows( $params ) {
|
3675 |
global $wpdb;
|
3676 |
$query = "DELETE FROM " . $wpdb->prefix . $params['table'];
|
3677 |
if ( isset($params['where']) ) {
|
@@ -3691,12 +3787,12 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3691 |
* Get row(s) from db.
|
3692 |
*
|
3693 |
* @param string $get_type
|
3694 |
-
* @param array
|
3695 |
* params = [selection, table, where, order_by, limit]
|
3696 |
*
|
3697 |
* @return array
|
3698 |
*/
|
3699 |
-
public function select_rows( $get_type, $params ) {
|
3700 |
global $wpdb;
|
3701 |
$query = "SELECT " . $params['selection'] . " FROM " . $wpdb->prefix . $params['table'];
|
3702 |
if ( isset($params['where']) ) {
|
@@ -3718,7 +3814,10 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3718 |
return $wpdb->get_row($query);
|
3719 |
}
|
3720 |
|
3721 |
-
|
|
|
|
|
|
|
3722 |
WDW_FM_Library(self::PLUGIN)->create_js($form_id, true);
|
3723 |
$jsversion = rand();
|
3724 |
global $wpdb;
|
@@ -3735,9 +3834,9 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3735 |
*
|
3736 |
* @return bool
|
3737 |
*/
|
3738 |
-
public function insert_formmaker_backup( $backup_id, $id ) {
|
3739 |
global $wpdb;
|
3740 |
-
$query = "INSERT INTO " . $wpdb->prefix . "formmaker_backup (backup_id, cur, 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) SELECT " . $backup_id . ", 1, formmakerbkup.id, formmakerbkup.title, formmakerbkup.type, formmakerbkup.mail, formmakerbkup.form_front, formmakerbkup.theme, formmakerbkup.javascript, formmakerbkup.submit_text, formmakerbkup.url, formmakerbkup.submit_text_type, formmakerbkup.script_mail, formmakerbkup.script_mail_user, formmakerbkup.counter, formmakerbkup.published, formmakerbkup.label_order, formmakerbkup.label_order_current, formmakerbkup.article_id, formmakerbkup.pagination, formmakerbkup.show_title, formmakerbkup.show_numbers, formmakerbkup.public_key, formmakerbkup.private_key, formmakerbkup.recaptcha_theme, formmakerbkup.paypal_mode, formmakerbkup.checkout_mode, formmakerbkup.paypal_email, formmakerbkup.payment_currency, formmakerbkup.tax, formmakerbkup.form_fields, formmakerbkup.savedb, formmakerbkup.sendemail, formmakerbkup.requiredmark, formmakerbkup.from_mail, formmakerbkup.from_name, formmakerbkup.reply_to, formmakerbkup.send_to, formmakerbkup.autogen_layout, formmakerbkup.custom_front, formmakerbkup.mail_from_user, formmakerbkup.mail_from_name_user, formmakerbkup.reply_to_user, formmakerbkup.condition, formmakerbkup.mail_cc, formmakerbkup.mail_cc_user, formmakerbkup.mail_bcc, formmakerbkup.mail_bcc_user, formmakerbkup.mail_subject, formmakerbkup.mail_subject_user, formmakerbkup.mail_mode, formmakerbkup.mail_mode_user, formmakerbkup.mail_attachment, formmakerbkup.mail_attachment_user, formmakerbkup.user_id_wd, formmakerbkup.sortable, formmakerbkup.frontend_submit_fields, formmakerbkup.frontend_submit_stat_fields, formmakerbkup.mail_emptyfields, formmakerbkup.mail_verify, formmakerbkup.mail_verify_expiretime, formmakerbkup.mail_verification_post_id, formmakerbkup.save_uploads, formmakerbkup.header_title, formmakerbkup.header_description, formmakerbkup.header_image_url, formmakerbkup.header_image_animation, formmakerbkup.header_hide_image FROM " . $wpdb->prefix . "formmaker as formmakerbkup WHERE id=" . $id;
|
3741 |
|
3742 |
return $wpdb->query($query);
|
3743 |
}
|
@@ -3749,7 +3848,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3749 |
*
|
3750 |
* @return bool
|
3751 |
*/
|
3752 |
-
public function update_emailverification_id( $id ) {
|
3753 |
global $wpdb;
|
3754 |
$sql = "UPDATE " . $wpdb->prefix . "formmaker SET mail_verification_post_id = " . $id . " WHERE mail_verification_post_id != 0";
|
3755 |
|
@@ -3763,7 +3862,7 @@ class FMModelManage_fmc extends CFMAdminModel {
|
|
3763 |
*
|
3764 |
* @return bool
|
3765 |
*/
|
3766 |
-
public function check_mailverification_id_posts_vs_fm( $id ) {
|
3767 |
global $wpdb;
|
3768 |
$rows = $wpdb->get_results('SELECT mail_verification_post_id FROM ' . $wpdb->prefix . 'formmaker WHERE mail_verification_post_id = ' . $id);
|
3769 |
if ( $rows ) {
|
4 |
* Class FMModelManage_fmc
|
5 |
*/
|
6 |
class FMModelManage_fmc extends CFMAdminModel {
|
7 |
+
|
8 |
/**
|
9 |
* Get forms.
|
10 |
*
|
12 |
*
|
13 |
* @return array|null|object
|
14 |
*/
|
15 |
+
public function get_rows_data( $params = array() ) {
|
16 |
$order = $params['order'];
|
17 |
$orderby = $params['orderby'];
|
18 |
$items_per_page = $params['items_per_page'];
|
39 |
return $rows;
|
40 |
}
|
41 |
|
42 |
+
/**
|
43 |
+
* Get row data.
|
44 |
+
*
|
45 |
+
* @param int $id
|
46 |
+
* @return stdClass
|
47 |
+
*/
|
48 |
+
public function get_row_data( $id = 0 ) {
|
49 |
global $wpdb;
|
50 |
if ( $id != 0 ) {
|
51 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
|
52 |
+
if ( $row ) {
|
53 |
+
$row->save_ip = 1;
|
54 |
+
$row->save_user_id = 1;
|
55 |
+
if ( isset($row->privacy) ) {
|
56 |
+
if ( $row->privacy ) {
|
57 |
+
$privacy = json_decode($row->privacy);
|
58 |
+
$row->save_ip = isset($privacy->save_ip) ? $privacy->save_ip : 1;
|
59 |
+
$row->save_user_id = isset($privacy->save_user_id) ? $privacy->save_user_id : 1;
|
60 |
+
}
|
61 |
+
}
|
62 |
+
}
|
63 |
}
|
64 |
else {
|
65 |
// Add "Submit" button to new forms.
|
115 |
$row->header_image_url = '';
|
116 |
$row->header_image_animation = '';
|
117 |
$row->header_hide_image = '';
|
118 |
+
$row->save_ip = 1;
|
119 |
+
$row->save_user_id = 1;
|
120 |
}
|
121 |
|
122 |
return $row;
|
123 |
}
|
124 |
|
125 |
+
/**
|
126 |
+
* get row data new.
|
127 |
+
*
|
128 |
+
* @param int $id
|
129 |
+
* @return stdClass
|
130 |
+
*/
|
131 |
+
public function get_row_data_new( $id = 0 ) {
|
132 |
global $wpdb;
|
133 |
if ( $id != 0 ) {
|
134 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_backup WHERE backup_id="%d"', $id));
|
135 |
+
if ( $row ) {
|
136 |
+
$row->save_ip = 1;
|
137 |
+
$row->save_user_id = 1;
|
138 |
+
if ( isset($row->privacy) ) {
|
139 |
+
if ( $row->privacy ) {
|
140 |
+
$privacy = json_decode($row->privacy);
|
141 |
+
$row->save_ip = isset($privacy->save_ip) ? $privacy->save_ip : 1;
|
142 |
+
$row->save_user_id = isset($privacy->save_user_id) ? $privacy->save_user_id : 1;
|
143 |
+
}
|
144 |
+
}
|
145 |
+
}
|
146 |
}
|
147 |
else {
|
148 |
// Add "Submit" button to new forms.
|
217 |
$row->mail_emptyfields = 0;
|
218 |
$row->mail_verify = 0;
|
219 |
$row->mail_verify_expiretime = 0;
|
220 |
+
$row->mail_verification_post_id = 0;
|
221 |
+
$row->save_ip = 1;
|
222 |
+
$row->save_user_id = 1;
|
223 |
}
|
224 |
|
225 |
$labels2 = array();
|
287 |
case 'type_recaptcha': {
|
288 |
$arrows = '<div id="wdform_arrows' . $id . '" class="wdform_arrows" style="display: none;">
|
289 |
<div class="wdform_arrows_basic wdform_arrows_container">
|
290 |
+
<span id="edit_' . $id . '" valign="middle" class="element_toolbar">
|
291 |
<span title="Edit the field" class="page_toolbar dashicons dashicons-edit" onclick="edit("' . $id . '")"></span>
|
292 |
</span>
|
293 |
<span id="duplicate_' . $id . '" valign="middle" class="element_toolbar"></span>
|
295 |
<span title="Remove the field" class="page_toolbar dashicons dashicons-no-alt" onclick="remove_row("' . $id . '")"></span>
|
296 |
</span>
|
297 |
</div>
|
298 |
+
<div class="wdform_arrows_advanced wdform_arrows_container" style="display: none;">
|
299 |
<span id="left_' . $id . '" valign="middle" class="element_toolbar">
|
300 |
<span title="Move the field to the left" class="page_toolbar dashicons dashicons-arrow-left-alt" onclick="left_row("' . $id . '")"></span>
|
301 |
</span>
|
330 |
<span title="Remove the field" class="page_toolbar dashicons dashicons-no-alt" onclick="remove_row("' . $id . '")"></span>
|
331 |
</span>
|
332 |
</div>
|
333 |
+
<div class="wdform_arrows_advanced wdform_arrows_container" style="display: none;">
|
334 |
<span id="left_' . $id . '" valign="middle" class="element_toolbar">
|
335 |
<span title="Move the field to the left" class="page_toolbar dashicons dashicons-arrow-left-alt" onclick="left_row("' . $id . '")"></span>
|
336 |
</span>
|
493 |
$param['w_readonly'] = (isset($param['w_readonly']) ? $param['w_readonly'] : "no");
|
494 |
$param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
|
495 |
$display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
|
496 |
+
$rep = '<div id="wdform_field' . $id . '" type="type_text" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" style="display: ' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span><span id="' . $id . '_required_elementform_id_temp" class="required" style="vertical-align: top;">' . $required_sym . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" style="display: ' . $param['w_field_label_pos'] . '"><input type="hidden" value="type_text" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp" /><input type="hidden" value="' . $param['w_required'] . '" name="' . $id . '_requiredform_id_temp" id="' . $id . '_requiredform_id_temp" /><input type="hidden" value="' . $param['w_readonly'] . '" name="' . $id . '_readonlyform_id_temp" id="' . $id . '_readonlyform_id_temp"/><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/><input type="hidden" value="' . $param['w_regExp_status'] . '" name="' . $id . '_regExpStatusform_id_temp" id="' . $id . '_regExpStatusform_id_temp"><input type="hidden" value="' . $param['w_regExp_value'] . '" name="' . $id . '_regExp_valueform_id_temp" id="' . $id . '_regExp_valueform_id_temp"><input type="hidden" value="' . $param['w_regExp_common'] . '" name="' . $id . '_regExp_commonform_id_temp" id="' . $id . '_regExp_commonform_id_temp"><input type="hidden" value="' . $param['w_regExp_alert'] . '" name="' . $id . '_regExp_alertform_id_temp" id="' . $id . '_regExp_alertform_id_temp"><input type="hidden" value="' . $param['w_regExp_arg'] . '" name="' . $id . '_regArgumentform_id_temp" id="' . $id . '_regArgumentform_id_temp"><input type="hidden" value="' . $param['w_unique'] . '" name="' . $id . '_uniqueform_id_temp" id="' . $id . '_uniqueform_id_temp" /><input type="text" id="' . $id . '_elementform_id_temp" name="' . $id . '_elementform_id_temp" value="' . htmlentities($param['w_first_val'], ENT_COMPAT) . '" title="' . htmlentities($param['w_title'], ENT_COMPAT) . '" placeholder="' . htmlentities($param['w_title'], ENT_COMPAT) . '" style="width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' disabled /></div></div>';
|
497 |
break;
|
498 |
}
|
499 |
case 'type_number': {
|
522 |
}
|
523 |
$param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "table-cell" : "block");
|
524 |
$required_sym = ($param['w_required'] == "yes" ? " *" : "");
|
525 |
+
$rep = '<div id="wdform_field' . $id . '" type="type_number" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span><span id="' . $id . '_required_elementform_id_temp" class="required" style="vertical-align: top;">' . $required_sym . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . '"><input type="hidden" value="type_number" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><input type="hidden" value="' . $param['w_required'] . '" name="' . $id . '_requiredform_id_temp" id="' . $id . '_requiredform_id_temp"><input type="hidden" value="' . $param['w_unique'] . '" name="' . $id . '_uniqueform_id_temp" id="' . $id . '_uniqueform_id_temp"><input type="text" id="' . $id . '_elementform_id_temp" name="' . $id . '_elementform_id_temp" value="' . htmlentities($param['w_first_val'], ENT_COMPAT) . '" title="' . htmlentities($param['w_title'], ENT_COMPAT) . '" onkeypress="return check_isnum(event)" style="width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' disabled /></div></div>';
|
526 |
break;
|
527 |
}
|
528 |
case 'type_password': {
|
646 |
$required_sym = ($param['w_required'] == "yes" ? " *" : "");
|
647 |
$param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
|
648 |
$display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
|
649 |
+
$rep = '<div id="wdform_field' . $id . '" type="type_textarea" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span><span id="' . $id . '_required_elementform_id_temp" class="required" style="vertical-align: top;">' . $required_sym . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . '"><input type="hidden" value="type_textarea" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><input type="hidden" value="' . $param['w_required'] . '" name="' . $id . '_requiredform_id_temp" id="' . $id . '_requiredform_id_temp"><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/><input type="hidden" value="' . $param['w_unique'] . '" name="' . $id . '_uniqueform_id_temp" id="' . $id . '_uniqueform_id_temp"><textarea id="' . $id . '_elementform_id_temp" name="' . $id . '_elementform_id_temp" title="' . htmlentities($param['w_title'], ENT_COMPAT) . '" placeholder="' . htmlentities($param['w_title'], ENT_COMPAT) . '" style="width: ' . $param['w_size_w'] . 'px; height: ' . $param['w_size_h'] . 'px;" ' . $param['attributes'] . ' disabled>' . htmlentities($param['w_first_val'], ENT_COMPAT) . '</textarea></div></div>';
|
650 |
break;
|
651 |
}
|
652 |
case 'type_phone': {
|
695 |
$param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
|
696 |
$display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
|
697 |
$required_sym = ($param['w_required'] == "yes" ? " *" : "");
|
698 |
+
$rep = '<div id="wdform_field' . $id . '" type="type_phone" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span><span id="' . $id . '_required_elementform_id_temp" class="required">' . $required_sym . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_phone" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><input type="hidden" value="' . $param['w_required'] . '" name="' . $id . '_requiredform_id_temp" id="' . $id . '_requiredform_id_temp"><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/><input type="hidden" value="' . $param['w_unique'] . '" name="' . $id . '_uniqueform_id_temp" id="' . $id . '_uniqueform_id_temp"><div id="' . $id . '_table_name" style="display: table;"><div id="' . $id . '_tr_name1" style="display: table-row;"><div id="' . $id . '_td_name_input_first" style="display: table-cell;"><input type="text" id="' . $id . '_element_firstform_id_temp" name="' . $id . '_element_firstform_id_temp" value="' . htmlentities($w_first_val[0], ENT_COMPAT) . '" title="' . htmlentities($w_title[0], ENT_COMPAT) . '" placeholder="' . htmlentities($w_title[0], ENT_COMPAT) . '" onkeypress="return check_isnum(event)"style="width: 50px;" ' . $param['attributes'] . ' disabled /><span class="wdform_line" style="margin: 0px 4px; padding: 0px;">-</span></div><div id="' . $id . '_td_name_input_last" style="display: table-cell;"><input type="text" id="' . $id . '_element_lastform_id_temp" name="' . $id . '_element_lastform_id_temp" value="' . htmlentities($w_first_val[1], ENT_COMPAT) . '" title="' . htmlentities($w_title[1], ENT_COMPAT) . '" placeholder="' . htmlentities($w_title[1], ENT_COMPAT) . '" onkeypress="return check_isnum(event)"style="width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' disabled /></div></div><div id="' . $id . '_tr_name2" style="display: table-row;"><div id="' . $id . '_td_name_label_first" align="left" style="display: table-cell;"><label class="mini_label" id="' . $id . '_mini_label_area_code">' . $w_mini_labels[0] . '</label></div><div id="' . $id . '_td_name_label_last" align="left" style="display: table-cell;"><label class="mini_label" id="' . $id . '_mini_label_phone_number">' . $w_mini_labels[1] . '</label></div></div></div></div></div>';
|
699 |
break;
|
700 |
}
|
701 |
case 'type_phone_new': {
|
727 |
$param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
|
728 |
$display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
|
729 |
$required_sym = ($param['w_required'] == "yes" ? " *" : "");
|
730 |
+
$rep = '<div id="wdform_field' . $id . '" type="type_phone_new" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span><span id="' . $id . '_required_elementform_id_temp" class="required">' . $required_sym . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_phone_new" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><input type="hidden" value="' . $param['w_required'] . '" name="' . $id . '_requiredform_id_temp" id="' . $id . '_requiredform_id_temp"><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"><input type="hidden" value="' . $param['w_unique'] . '" name="' . $id . '_uniqueform_id_temp" id="' . $id . '_uniqueform_id_temp"><div id="' . $id . '_table_name" style="display: table;"><div id="' . $id . '_tr_name1" style="display: table-row;"><div id="' . $id . '_td_name_input_first" style="display: table-cell;"><input type="text" id="' . $id . '_elementform_id_temp" name="' . $id . '_elementform_id_temp" value="' . htmlentities($param['w_first_val'], ENT_COMPAT) . '" top-country = "' . $param['w_top_country'] . '" onkeypress="return check_isnum("' . $id . '_elementform_id_temp")" style="width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' disabled></div></div></div></div></div>';
|
731 |
break;
|
732 |
}
|
733 |
case 'type_name': {
|
814 |
$param['w_name_fields'] = isset($param['w_name_fields']) ? $param['w_name_fields'] : ($param['w_name_format'] == 'normal' ? 'no***no' : 'yes***yes');
|
815 |
$w_name_fields = explode('***', $param['w_name_fields']);
|
816 |
$param['w_autofill'] = isset($param['w_autofill']) ? $param['w_autofill'] : 'no';
|
817 |
+
$w_name_format = '<div id="' . $id . '_td_name_input_first" style="display: table-cell;"><input type="text" id="' . $id . '_element_firstform_id_temp" name="' . $id . '_element_firstform_id_temp" value="' . htmlentities($w_first_val[0], ENT_COMPAT) . '" title="' . htmlentities($w_title[0], ENT_COMPAT) . '" placeholder="' . htmlentities($w_title[0], ENT_COMPAT) . '" style="margin-right: 10px; width: ' . $param['w_size'] . 'px;"' . $param['attributes'] . ' disabled /></div><div id="' . $id . '_td_name_input_last" style="display: table-cell;"><input type="text" id="' . $id . '_element_lastform_id_temp" name="' . $id . '_element_lastform_id_temp" value="' . htmlentities($w_first_val[1], ENT_COMPAT) . '" title="' . htmlentities($w_title[1], ENT_COMPAT) . '" placeholder="' . htmlentities($w_title[1], ENT_COMPAT) . '" style="margin-right: 10px; width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' disabled /></div>';
|
818 |
$w_name_format_mini_labels = '<div id="' . $id . '_td_name_label_first" align="left" style="display: table-cell;"><label class="mini_label" id="' . $id . '_mini_label_first">' . $w_mini_labels[1] . '</label></div><div id="' . $id . '_td_name_label_last" align="left" style="display: table-cell;"><label class="mini_label" id="' . $id . '_mini_label_last">' . $w_mini_labels[2] . '</label></div>';
|
819 |
if ( $w_name_fields[0] == 'yes' ) {
|
820 |
+
$w_name_format = '<div id="' . $id . '_td_name_input_title" style="display: table-cell;"><input type="text" id="' . $id . '_element_titleform_id_temp" name="' . $id . '_element_titleform_id_temp" value="' . htmlentities($w_first_val[2], ENT_COMPAT) . '" title="' . htmlentities($w_title[2], ENT_COMPAT) . '" style="margin: 0px 10px 0px 0px; width: 40px;" disabled /></div>' . $w_name_format;
|
821 |
$w_name_format_mini_labels = '<div id="' . $id . '_td_name_label_title" align="left" style="display: table-cell;"><label class="mini_label" id="' . $id . '_mini_label_title">' . $w_mini_labels[0] . '</label></div>' . $w_name_format_mini_labels;
|
822 |
}
|
823 |
if ( $w_name_fields[1] == 'yes' ) {
|
824 |
+
$w_name_format = $w_name_format . '<div id="' . $id . '_td_name_input_middle" style="display: table-cell;"><input type="text" id="' . $id . '_element_middleform_id_temp" name="' . $id . '_element_middleform_id_temp" value="' . htmlentities($w_first_val[3], ENT_COMPAT) . '" title="' . htmlentities($w_title[3], ENT_COMPAT) . '" style="width: ' . $param['w_size'] . 'px;" disabled /></div>';
|
825 |
$w_name_format_mini_labels = $w_name_format_mini_labels . '<div id="' . $id . '_td_name_label_middle" align="left" style="display: table-cell;"><label class="mini_label" id="' . $id . '_mini_label_middle">' . $w_mini_labels[3] . '</label></div>';
|
826 |
}
|
827 |
$rep = '<div id="wdform_field' . $id . '" type="type_name" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span><span id="' . $id . '_required_elementform_id_temp" class="required" style="vertical-align: top;">' . $required_sym . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_name" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><input type="hidden" value="' . $param['w_required'] . '" name="' . $id . '_requiredform_id_temp" id="' . $id . '_requiredform_id_temp"><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/><input type="hidden" value="' . $param['w_unique'] . '" name="' . $id . '_uniqueform_id_temp" id="' . $id . '_uniqueform_id_temp"><input type="hidden" value="' . $param['w_autofill'] . '" name="' . $id . '_autofillform_id_temp" id="' . $id . '_autofillform_id_temp"><input type="hidden" name="' . $id . '_enable_fieldsform_id_temp" id="' . $id . '_enable_fieldsform_id_temp" title="' . $w_name_fields[0] . '" first="yes" last="yes" middle="' . $w_name_fields[1] . '"><div id="' . $id . '_table_name" cellpadding="0" cellspacing="0" style="display: table;"><div id="' . $id . '_tr_name1" style="display: table-row;">' . $w_name_format . '</div><div id="' . $id . '_tr_name2" style="display: table-row;">' . $w_name_format_mini_labels . '</div></div></div></div>';
|
1007 |
$param['w_verification_label'] = isset($param['w_verification_label']) ? $param['w_verification_label'] : "E-mail confirmation:";
|
1008 |
$param['w_verification_placeholder'] = isset($param['w_verification_placeholder']) ? $param['w_verification_placeholder'] : "";
|
1009 |
$confirm_emeil = '<br><div align="left" id="' . $id . '_1_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $display_label_confirm . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_1_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $param['w_verification_label'] . '</span><span id="' . $id . '_required_elementform_id_temp" class="required" style="vertical-align: top;">' . $required_sym . '</span></div><div align="left" id="' . $id . '_1_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $display_element_confirm . ';"><input type="hidden" value="' . $param['w_verification'] . '" name="' . $id . '_verification_id_temp" id="' . $id . '_verification_id_temp"><input type="text" id="' . $id . '_1_elementform_id_temp" name="' . $id . '_1_elementform_id_temp" value="' . $param['w_verification_placeholder'] . '" title="' . $param['w_verification_placeholder'] . '" style="width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' disabled /></div>';
|
1010 |
+
$rep = '<div id="wdform_field' . $id . '" type="type_submitter_mail" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span><span id="' . $id . '_required_elementform_id_temp" class="required" style="vertical-align: top;">' . $required_sym . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_submitter_mail" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><input type="hidden" value="' . $param['w_required'] . '" name="' . $id . '_requiredform_id_temp" id="' . $id . '_requiredform_id_temp"><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/><input type="hidden" value="' . $param['w_unique'] . '" name="' . $id . '_uniqueform_id_temp" id="' . $id . '_uniqueform_id_temp"><input type="hidden" value="' . $param['w_autofill'] . '" name="' . $id . '_autofillform_id_temp" id="' . $id . '_autofillform_id_temp"><input type="hidden" value="' . $param['w_verification'] . '" name="' . $id . '_verification_id_temp" id="' . $id . '_verification_id_temp"><input type="text" id="' . $id . '_elementform_id_temp" name="' . $id . '_elementform_id_temp" value="' . htmlentities($param['w_first_val'], ENT_COMPAT) . '" title="' . htmlentities($param['w_title'], ENT_COMPAT) . '" placeholder="' . htmlentities($param['w_title'], ENT_COMPAT) . '" style="width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' disabled /></div>' . $confirm_emeil . '</div>';
|
1011 |
break;
|
1012 |
}
|
1013 |
case 'type_checkbox': {
|
1122 |
else {
|
1123 |
$choise_value = $param['w_choices'][(int) $param['w_rowcol'] * $l + $i];
|
1124 |
}
|
1125 |
+
$choise_value = htmlentities($choise_value, ENT_COMPAT);
|
1126 |
if ( isset($param['w_choices_params']) && $param['w_choices_params'][(int) $param['w_rowcol'] * $l + $i] ) {
|
1127 |
$w_choices_params = explode('[where_order_by]', $param['w_choices_params'][(int) $param['w_rowcol'] * $l + $i]);
|
1128 |
$where = 'where="' . $w_choices_params[0] . '"';
|
1155 |
else {
|
1156 |
$choise_value = $param['w_choices'][(int) $param['w_rowcol'] * $i + $l];
|
1157 |
}
|
1158 |
+
$choise_value = htmlentities($choise_value, ENT_COMPAT);
|
1159 |
if ( isset($param['w_choices_params']) && $param['w_choices_params'][(int) $param['w_rowcol'] * $i + $l] ) {
|
1160 |
$w_choices_params = explode('[where_order_by]', $param['w_choices_params'][(int) $param['w_rowcol'] * $i + $l]);
|
1161 |
$where = 'where="' . $w_choices_params[0] . '"';
|
1183 |
else {
|
1184 |
$choise_value = $param['w_choices'][(int) $param['w_rowcol'] * $i + $l];
|
1185 |
}
|
1186 |
+
$choise_value = htmlentities($choise_value, ENT_COMPAT);
|
1187 |
if ( isset($param['w_choices_params']) && $param['w_choices_params'][(int) $param['w_rowcol'] * $i + $l] ) {
|
1188 |
$w_choices_params = explode('[where_order_by]', $param['w_choices_params'][(int) $param['w_rowcol'] * $i + $l]);
|
1189 |
$where = 'where="' . $w_choices_params[0] . '"';
|
1214 |
else {
|
1215 |
$choise_value = $param['w_choices'][$l];
|
1216 |
}
|
1217 |
+
$choise_value = htmlentities($choise_value, ENT_COMPAT);
|
1218 |
if ( isset($param['w_choices_params']) && $param['w_choices_params'][$l] ) {
|
1219 |
$w_choices_params = explode('[where_order_by]', $param['w_choices_params'][$l]);
|
1220 |
$where = 'where="' . $w_choices_params[0] . '"';
|
1343 |
else {
|
1344 |
$choise_value = $param['w_choices'][(int) $param['w_rowcol'] * $l + $i];
|
1345 |
}
|
1346 |
+
$choise_value = htmlentities($choise_value, ENT_COMPAT);
|
1347 |
if ( isset($param['w_choices_params']) && $param['w_choices_params'][(int) $param['w_rowcol'] * $l + $i] ) {
|
1348 |
$w_choices_params = explode('[where_order_by]', $param['w_choices_params'][(int) $param['w_rowcol'] * $l + $i]);
|
1349 |
$where = 'where="' . $w_choices_params[0] . '"';
|
1376 |
else {
|
1377 |
$choise_value = $param['w_choices'][(int) $param['w_rowcol'] * $i + $l];
|
1378 |
}
|
1379 |
+
$choise_value = htmlentities($choise_value, ENT_COMPAT);
|
1380 |
if ( isset($param['w_choices_params']) && $param['w_choices_params'][(int) $param['w_rowcol'] * $i + $l] ) {
|
1381 |
$w_choices_params = explode('[where_order_by]', $param['w_choices_params'][(int) $param['w_rowcol'] * $i + $l]);
|
1382 |
$where = 'where="' . $w_choices_params[0] . '"';
|
1403 |
else {
|
1404 |
$choise_value = $param['w_choices'][(int) $param['w_rowcol'] * $i + $l];
|
1405 |
}
|
1406 |
+
$choise_value = htmlentities($choise_value, ENT_COMPAT);
|
1407 |
if ( isset($param['w_choices_params']) && $param['w_choices_params'][(int) $param['w_rowcol'] * $i + $l] ) {
|
1408 |
$w_choices_params = explode('[where_order_by]', $param['w_choices_params'][(int) $param['w_rowcol'] * $i + $l]);
|
1409 |
$where = 'where="' . $w_choices_params[0] . '"';
|
1434 |
else {
|
1435 |
$choise_value = $param['w_choices'][$l];
|
1436 |
}
|
1437 |
+
$choise_value = htmlentities($choise_value, ENT_COMPAT);
|
1438 |
if ( isset($param['w_choices_params']) && $param['w_choices_params'][$l] ) {
|
1439 |
$w_choices_params = explode('[where_order_by]', $param['w_choices_params'][$l]);
|
1440 |
$where = 'where="' . $w_choices_params[0] . '"';
|
2336 |
$w_first_val = explode('***', $param['w_first_val']);
|
2337 |
$w_title = explode('***', $param['w_title']);
|
2338 |
$w_mini_labels = explode('***', $param['w_mini_labels']);
|
2339 |
+
$rep = '<div id="wdform_field' . $id . '" type="type_paypal_price" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span><span id="' . $id . '_required_elementform_id_temp" class="required"style="vertical-align: top;">' . $required_sym . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_paypal_price" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><input type="hidden" value="' . $param['w_required'] . '" name="' . $id . '_requiredform_id_temp" id="' . $id . '_requiredform_id_temp"><input type="hidden" value="' . $param['w_range_min'] . '" name="' . $id . '_range_minform_id_temp" id="' . $id . '_range_minform_id_temp"><input type="hidden" value="' . $param['w_range_max'] . '" name="' . $id . '_range_maxform_id_temp" id="' . $id . '_range_maxform_id_temp"><div id="' . $id . '_table_price" style="display: table;"><div id="' . $id . '_tr_price1" style="display: table-row;"><div id="' . $id . '_td_name_currency" style="display: table-cell;"><span class="wdform_colon" style="vertical-align: middle;"><!--repstart--> $ <!--repend--></span></div><div id="' . $id . '_td_name_dollars" style="display: table-cell;"><input type="text" id="' . $id . '_element_dollarsform_id_temp" name="' . $id . '_element_dollarsform_id_temp" value="' . htmlentities($w_first_val[0], ENT_COMPAT) . '" title="' . htmlentities($w_title[0], ENT_COMPAT) . '" onkeypress="return check_isnum(event)" style="width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' disabled/></div><div id="' . $id . '_td_name_divider" style="display: ' . $hide_cents . ';"><span class="wdform_colon" style="vertical-align: middle;"> . </span></div><div id="' . $id . '_td_name_cents" style="display: ' . $hide_cents . '"><input type="text" id="' . $id . '_element_centsform_id_temp" name="' . $id . '_element_centsform_id_temp" value="' . htmlentities($w_first_val[1], ENT_COMPAT) . '" title="' . htmlentities($w_title[1], ENT_COMPAT) . '" onblur="add_0("' . $id . '_element_centsform_id_temp")" onkeypress="return check_isnum_interval(event,"' . $id . '_element_centsform_id_temp",0,99)"style="width: 30px;" ' . $param['attributes'] . ' disabled/></div></div><div id="' . $id . '_tr_price2" style="display: table-row;"><div style="display: table-cell;"><label class="mini_label"></label></div><div align="left" style="display: table-cell;"><label class="mini_label" id="' . $id . '_mini_label_dollars">' . $w_mini_labels[0] . '</label></div><div id="' . $id . '_td_name_label_divider" style="display: ' . $hide_cents . '"><label class="mini_label"></label></div><div align="left" id="' . $id . '_td_name_label_cents" style="display: ' . $hide_cents . '"><label class="mini_label" id="' . $id . '_mini_label_cents">' . $w_mini_labels[1] . '</label></div></div></div></div></div>';
|
2340 |
break;
|
2341 |
}
|
2342 |
case 'type_paypal_price_new': {
|
2388 |
$required_sym = ($param['w_required'] == "yes" ? " *" : "");
|
2389 |
$currency_sumbol = ($param['w_currency'] == "yes" ? "display:none;" : "display: table-cell;");
|
2390 |
$param['w_readonly'] = (isset($param['w_readonly']) ? $param['w_readonly'] : "no");
|
2391 |
+
$rep = '<div id="wdform_field' . $id . '" type="type_paypal_price_new" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $display_label . '; width: ' . $param['w_field_label_size'] . 'px;"><span id="' . $id . '_element_labelform_id_temp" class="label" style="vertical-align: top;">' . $label . '</span><span id="' . $id . '_required_elementform_id_temp" class="required"style="vertical-align: top;">' . $required_sym . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: ' . $param['w_field_label_pos'] . ';"><input type="hidden" value="type_paypal_price_new" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp"><input type="hidden" value="' . $param['w_required'] . '" name="' . $id . '_requiredform_id_temp" id="' . $id . '_requiredform_id_temp"><input type="hidden" value="' . $param['w_readonly'] . '" name="' . $id . '_readonlyform_id_temp" id="' . $id . '_readonlyform_id_temp"><input type="hidden" value="' . $param['w_hide_label'] . '" name="' . $id . '_hide_labelform_id_temp" id="' . $id . '_hide_labelform_id_temp"/><input type="hidden" value="' . $param['w_range_min'] . '" name="' . $id . '_range_minform_id_temp" id="' . $id . '_range_minform_id_temp"><input type="hidden" value="' . $param['w_range_max'] . '" name="' . $id . '_range_maxform_id_temp" id="' . $id . '_range_maxform_id_temp"><div id="' . $id . '_table_price" style="display: table;"><div id="' . $id . '_tr_price1" style="display: table-row;"><div id="' . $id . '_td_name_currency" style="' . $currency_sumbol . '"><span class="wdform_colon" style="vertical-align: middle;"><!--repstart--> $ <!--repend--></span></div><div id="' . $id . '_td_name_dollars" style="display: table-cell;"><input type="text" id="' . $id . '_elementform_id_temp" name="' . $id . '_elementform_id_temp" value="' . htmlentities($param['w_first_val'], ENT_COMPAT) . '" title="' . htmlentities($param['w_title'], ENT_COMPAT) . '" placeholder="' . htmlentities($param['w_title'], ENT_COMPAT) . '" onkeypress="return check_isnum(event)" style="width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' disabled/></div></div></div></div></div>';
|
2392 |
break;
|
2393 |
}
|
2394 |
case 'type_paypal_select': {
|
3394 |
$param['w_func'] = explode('***', $param['w_func']);
|
3395 |
$rep .= '<div id="wdform_field' . $id . '" type="type_button" class="wdform_field" style="display: table-cell;">' . $arrows . '<div align="left" id="' . $id . '_label_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: table-cell;"><span id="' . $id . '_element_labelform_id_temp" style="display: none;">button_' . $id . '</span></div><div align="left" id="' . $id . '_element_sectionform_id_temp" class="' . $param['w_class'] . '" style="display: table-cell;"><input type="hidden" value="type_button" name="' . $id . '_typeform_id_temp" id="' . $id . '_typeform_id_temp">';
|
3396 |
foreach ( $param['w_title'] as $key => $title ) {
|
3397 |
+
$rep .= '<button type="button" class="button button-secondary button-large" id="' . $id . '_elementform_id_temp' . $key . '" name="' . $id . '_elementform_id_temp' . $key . '" value="' . htmlentities($title, ENT_COMPAT) . '" onclick="' . $param['w_func'][$key] . '" ' . $param['attributes'] . '>' . $title . '</button>';
|
3398 |
}
|
3399 |
$rep .= '</div></div>';
|
3400 |
break;
|
3409 |
return $row;
|
3410 |
}
|
3411 |
|
3412 |
+
/**
|
3413 |
+
* Get theme rows data.
|
3414 |
+
*
|
3415 |
+
* @param string $old
|
3416 |
+
* @return mixed
|
3417 |
+
*/
|
3418 |
public function get_theme_rows_data( $old = '' ) {
|
3419 |
global $wpdb;
|
3420 |
$rows = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "formmaker_themes ORDER BY `default` DESC, `version` DESC, `id` ASC");
|
3422 |
return $rows;
|
3423 |
}
|
3424 |
|
3425 |
+
/**
|
3426 |
+
* Get queries rows data.
|
3427 |
+
*
|
3428 |
+
* @param int $id
|
3429 |
+
* @return mixed
|
3430 |
+
*/
|
3431 |
+
public function get_queries_rows_data( $id = 0 ) {
|
3432 |
global $wpdb;
|
3433 |
$rows = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "formmaker_query WHERE form_id=" . $id . " ORDER BY id ASC");
|
3434 |
|
3435 |
return $rows;
|
3436 |
}
|
3437 |
|
3438 |
+
/**
|
3439 |
+
* Get labels.
|
3440 |
+
*
|
3441 |
+
* @param $id
|
3442 |
+
* @return mixed
|
3443 |
+
*/
|
3444 |
+
public function get_labels( $id = 0 ) {
|
3445 |
global $wpdb;
|
3446 |
$rows = $wpdb->get_col("SELECT DISTINCT `element_label` FROM " . $wpdb->prefix . "formmaker_submits WHERE form_id=" . $id);
|
3447 |
|
3448 |
return $rows;
|
3449 |
}
|
3450 |
|
3451 |
+
/**
|
3452 |
+
* Is paypal.
|
3453 |
+
*
|
3454 |
+
* @param int $id
|
3455 |
+
* @return mixed
|
3456 |
+
*/
|
3457 |
+
public function is_paypal( $id = 0 ) {
|
3458 |
global $wpdb;
|
3459 |
$rows = $wpdb->get_var("SELECT COUNT(*) FROM " . $wpdb->prefix . "formmaker_sessions WHERE form_id=" . $id);
|
3460 |
|
3489 |
*
|
3490 |
* @return string
|
3491 |
*/
|
3492 |
+
public function get_display_options( $id = 0 ) {
|
3493 |
global $wpdb;
|
3494 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_display_options WHERE form_id="%d"', $id));
|
3495 |
if ( !$row ) {
|
3512 |
$row->scrollbox_closing = 1;
|
3513 |
$row->scrollbox_minimize = 1;
|
3514 |
$row->scrollbox_minimize_text = '';
|
3515 |
+
$row->display_on = 'home,post,page';
|
3516 |
$row->posts_include = '';
|
3517 |
$row->pages_include = '';
|
3518 |
$row->display_on_categories = '';
|
3523 |
return $row;
|
3524 |
}
|
3525 |
|
3526 |
+
/**
|
3527 |
+
* Get all display posts.
|
3528 |
+
*
|
3529 |
+
* @return $post_types array
|
3530 |
+
*/
|
3531 |
+
public function get_all_display_posts() {
|
3532 |
+
$def_post_types = array('everything' => 'All', 'home' => 'Homepage', 'archive' => 'Archives', 'post' => 'Post', 'page' => 'Page');
|
3533 |
+
$custom_post_types = get_post_types( array(
|
3534 |
+
'public' => true,
|
3535 |
+
'_builtin' => false,
|
3536 |
+
) );
|
3537 |
+
|
3538 |
+
if ( !empty($custom_post_types) ) {
|
3539 |
+
foreach ( WDW_FM_Library(self::PLUGIN)->not_display_posts() as $key ) {
|
3540 |
+
if ( isset($custom_post_types[$key]) ) {
|
3541 |
+
unset($custom_post_types[$key]);
|
3542 |
+
}
|
3543 |
+
}
|
3544 |
+
}
|
3545 |
+
$post_types = array_merge($def_post_types, $custom_post_types);
|
3546 |
+
return $post_types;
|
3547 |
+
}
|
3548 |
+
|
3549 |
public function fm_posts_query() {
|
3550 |
$default_post_types = array( 'post', 'page' );
|
3551 |
$custom_post_types = get_post_types(array(
|
3569 |
}
|
3570 |
$results = array();
|
3571 |
foreach ( $posts as $post ) {
|
3572 |
+
$post_id = (int) $post->ID;
|
3573 |
+
$post_type = $post->post_type;
|
3574 |
+
$post_title = trim(esc_html(strip_tags(get_the_title($post))));
|
3575 |
+
$results[$post_id] = array(
|
3576 |
+
'title' => $post_title,
|
3577 |
+
'post_type' => $post->post_type,
|
3578 |
+
);
|
3579 |
}
|
3580 |
wp_reset_postdata();
|
|
|
3581 |
return $results;
|
3582 |
}
|
3583 |
|
3603 |
*
|
3604 |
* @return int
|
3605 |
*/
|
3606 |
+
public function get_undo_redo_id( $backup_id = 0, $id = 0, $type = '' ) {
|
3607 |
global $wpdb;
|
3608 |
if ( $type == 1 ) {
|
3609 |
$query = "SELECT backup_id FROM " . $wpdb->prefix . "formmaker_backup WHERE backup_id > $backup_id AND id = $id ORDER BY backup_id ASC LIMIT 0 , 1 ";
|
3623 |
*
|
3624 |
* @return int
|
3625 |
*/
|
3626 |
+
public function get_max_row( $table = '', $column = '' ) {
|
3627 |
global $wpdb;
|
3628 |
$query = "SELECT max(" . $column . ") FROM " . $wpdb->prefix . $table;
|
3629 |
|
3637 |
*
|
3638 |
* @return bool
|
3639 |
*/
|
3640 |
+
public function delete_formmaker_query( $id = 0 ) {
|
3641 |
global $wpdb;
|
3642 |
$query = 'DELETE FROM ' . $wpdb->prefix . 'formmaker_query WHERE id =' . $id;
|
3643 |
return $wpdb->query($query);
|
3660 |
*
|
3661 |
* @return bool
|
3662 |
*/
|
3663 |
+
public function update_data( $table = '', $data_params = array(), $where_data_params = array() ) {
|
3664 |
global $wpdb;
|
3665 |
return $wpdb->update($wpdb->prefix . $table, $data_params, $where_data_params);
|
3666 |
}
|
3669 |
* Get request value.
|
3670 |
*
|
3671 |
* @param string $table
|
3672 |
+
* @param array $data
|
3673 |
*
|
3674 |
+
* @return false|int
|
3675 |
*/
|
3676 |
+
public function insert_data_to_db( $table = '', $data = array() ) {
|
3677 |
global $wpdb;
|
3678 |
$query = $wpdb->insert($wpdb->prefix . $table, $data);
|
3679 |
$wpdb->show_errors();
|
3699 |
*
|
3700 |
* @return bool
|
3701 |
*/
|
3702 |
+
public function replace_display_options( $data = array() ) {
|
3703 |
global $wpdb;
|
3704 |
|
3705 |
return $wpdb->replace($wpdb->prefix . 'formmaker_display_options', $data);
|
3713 |
*
|
3714 |
* @return int
|
3715 |
*/
|
3716 |
+
public function get_prev_backup_id( $backup_id = 0, $id = 0 ) {
|
3717 |
global $wpdb;
|
3718 |
$query = "SELECT backup_id FROM " . $wpdb->prefix . "formmaker_backup WHERE backup_id < " . $backup_id . " AND id = " . $id . " ORDER BY backup_id DESC LIMIT 0 , 1 ";
|
3719 |
|
3728 |
*
|
3729 |
* @return int
|
3730 |
*/
|
3731 |
+
public function get_backup_id( $backup_id = 0, $id = 0 ) {
|
3732 |
global $wpdb;
|
3733 |
$query = "SELECT backup_id FROM " . $wpdb->prefix . "formmaker_backup WHERE backup_id > " . $backup_id . " AND id = " . $id . " ORDER BY backup_id ASC LIMIT 0 , 1 ";
|
3734 |
|
3735 |
return $wpdb->get_var($query);
|
3736 |
}
|
3737 |
|
3738 |
+
public function get_autogen_layout( $id = 0 ) {
|
3739 |
global $wpdb;
|
3740 |
$autogen_layout = $wpdb->get_var($wpdb->prepare('SELECT autogen_layout FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
|
3741 |
return $autogen_layout == '1';
|
3749 |
*
|
3750 |
* @return int
|
3751 |
*/
|
3752 |
+
public function get_count( $params = array() ) {
|
3753 |
global $wpdb;
|
3754 |
$query = "SELECT count(" . $params['selection'] . ") FROM " . $wpdb->prefix . $params['table'];
|
3755 |
if ( isset($params['where']) ) {
|
3767 |
*
|
3768 |
* @return array
|
3769 |
*/
|
3770 |
+
public function delete_rows( $params = array() ) {
|
3771 |
global $wpdb;
|
3772 |
$query = "DELETE FROM " . $wpdb->prefix . $params['table'];
|
3773 |
if ( isset($params['where']) ) {
|
3787 |
* Get row(s) from db.
|
3788 |
*
|
3789 |
* @param string $get_type
|
3790 |
+
* @param array $params
|
3791 |
* params = [selection, table, where, order_by, limit]
|
3792 |
*
|
3793 |
* @return array
|
3794 |
*/
|
3795 |
+
public function select_rows( $get_type = '', $params = array() ) {
|
3796 |
global $wpdb;
|
3797 |
$query = "SELECT " . $params['selection'] . " FROM " . $wpdb->prefix . $params['table'];
|
3798 |
if ( isset($params['where']) ) {
|
3814 |
return $wpdb->get_row($query);
|
3815 |
}
|
3816 |
|
3817 |
+
/**
|
3818 |
+
* @param int $form_id
|
3819 |
+
*/
|
3820 |
+
public function create_js( $form_id = 0) {
|
3821 |
WDW_FM_Library(self::PLUGIN)->create_js($form_id, true);
|
3822 |
$jsversion = rand();
|
3823 |
global $wpdb;
|
3834 |
*
|
3835 |
* @return bool
|
3836 |
*/
|
3837 |
+
public function insert_formmaker_backup( $backup_id = 0, $id = 0 ) {
|
3838 |
global $wpdb;
|
3839 |
+
$query = "INSERT INTO " . $wpdb->prefix . "formmaker_backup (backup_id, cur, 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, privacy) SELECT " . $backup_id . ", 1, formmakerbkup.id, formmakerbkup.title, formmakerbkup.type, formmakerbkup.mail, formmakerbkup.form_front, formmakerbkup.theme, formmakerbkup.javascript, formmakerbkup.submit_text, formmakerbkup.url, formmakerbkup.submit_text_type, formmakerbkup.script_mail, formmakerbkup.script_mail_user, formmakerbkup.counter, formmakerbkup.published, formmakerbkup.label_order, formmakerbkup.label_order_current, formmakerbkup.article_id, formmakerbkup.pagination, formmakerbkup.show_title, formmakerbkup.show_numbers, formmakerbkup.public_key, formmakerbkup.private_key, formmakerbkup.recaptcha_theme, formmakerbkup.paypal_mode, formmakerbkup.checkout_mode, formmakerbkup.paypal_email, formmakerbkup.payment_currency, formmakerbkup.tax, formmakerbkup.form_fields, formmakerbkup.savedb, formmakerbkup.sendemail, formmakerbkup.requiredmark, formmakerbkup.from_mail, formmakerbkup.from_name, formmakerbkup.reply_to, formmakerbkup.send_to, formmakerbkup.autogen_layout, formmakerbkup.custom_front, formmakerbkup.mail_from_user, formmakerbkup.mail_from_name_user, formmakerbkup.reply_to_user, formmakerbkup.condition, formmakerbkup.mail_cc, formmakerbkup.mail_cc_user, formmakerbkup.mail_bcc, formmakerbkup.mail_bcc_user, formmakerbkup.mail_subject, formmakerbkup.mail_subject_user, formmakerbkup.mail_mode, formmakerbkup.mail_mode_user, formmakerbkup.mail_attachment, formmakerbkup.mail_attachment_user, formmakerbkup.user_id_wd, formmakerbkup.sortable, formmakerbkup.frontend_submit_fields, formmakerbkup.frontend_submit_stat_fields, formmakerbkup.mail_emptyfields, formmakerbkup.mail_verify, formmakerbkup.mail_verify_expiretime, formmakerbkup.mail_verification_post_id, formmakerbkup.save_uploads, formmakerbkup.header_title, formmakerbkup.header_description, formmakerbkup.header_image_url, formmakerbkup.header_image_animation, formmakerbkup.header_hide_image, formmakerbkup.privacy FROM " . $wpdb->prefix . "formmaker as formmakerbkup WHERE id=" . $id;
|
3840 |
|
3841 |
return $wpdb->query($query);
|
3842 |
}
|
3848 |
*
|
3849 |
* @return bool
|
3850 |
*/
|
3851 |
+
public function update_emailverification_id( $id = 0 ) {
|
3852 |
global $wpdb;
|
3853 |
$sql = "UPDATE " . $wpdb->prefix . "formmaker SET mail_verification_post_id = " . $id . " WHERE mail_verification_post_id != 0";
|
3854 |
|
3862 |
*
|
3863 |
* @return bool
|
3864 |
*/
|
3865 |
+
public function check_mailverification_id_posts_vs_fm( $id = 0 ) {
|
3866 |
global $wpdb;
|
3867 |
$rows = $wpdb->get_results('SELECT mail_verification_post_id FROM ' . $wpdb->prefix . 'formmaker WHERE mail_verification_post_id = ' . $id);
|
3868 |
if ( $rows ) {
|
admin/models/Options_fm.php
CHANGED
@@ -8,19 +8,22 @@ class FMModelOptions_fmc extends CFMAdminModel {
|
|
8 |
* Save data to DB.
|
9 |
*/
|
10 |
public function save_db() {
|
|
|
|
|
11 |
$public_key = WDW_FM_Library(self::PLUGIN)->get('public_key', '');
|
12 |
$private_key = WDW_FM_Library(self::PLUGIN)->get('private_key', '');
|
13 |
$csv_delimiter = (isset($_POST['csv_delimiter']) && $_POST['csv_delimiter'] != '' ? esc_html(stripslashes($_POST['csv_delimiter'])) : ',');
|
14 |
$fm_shortcode = (isset($_POST['fm_shortcode']) ? "old" : '');
|
15 |
$fm_advanced_layout = WDW_FM_Library(self::PLUGIN)->get('fm_advanced_layout', '0');
|
16 |
$map_key = WDW_FM_Library(self::PLUGIN)->get('map_key', '');
|
17 |
-
update_option(
|
18 |
'public_key' => $public_key,
|
19 |
'private_key' => $private_key,
|
20 |
'csv_delimiter' => $csv_delimiter,
|
21 |
'map_key' => $map_key,
|
22 |
'fm_shortcode' => $fm_shortcode,
|
23 |
'fm_advanced_layout' => $fm_advanced_layout,
|
|
|
24 |
));
|
25 |
return 8;
|
26 |
}
|
8 |
* Save data to DB.
|
9 |
*/
|
10 |
public function save_db() {
|
11 |
+
$option_key = (WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
|
12 |
+
$fm_settings = get_option($option_key);
|
13 |
$public_key = WDW_FM_Library(self::PLUGIN)->get('public_key', '');
|
14 |
$private_key = WDW_FM_Library(self::PLUGIN)->get('private_key', '');
|
15 |
$csv_delimiter = (isset($_POST['csv_delimiter']) && $_POST['csv_delimiter'] != '' ? esc_html(stripslashes($_POST['csv_delimiter'])) : ',');
|
16 |
$fm_shortcode = (isset($_POST['fm_shortcode']) ? "old" : '');
|
17 |
$fm_advanced_layout = WDW_FM_Library(self::PLUGIN)->get('fm_advanced_layout', '0');
|
18 |
$map_key = WDW_FM_Library(self::PLUGIN)->get('map_key', '');
|
19 |
+
update_option( $option_key, array(
|
20 |
'public_key' => $public_key,
|
21 |
'private_key' => $private_key,
|
22 |
'csv_delimiter' => $csv_delimiter,
|
23 |
'map_key' => $map_key,
|
24 |
'fm_shortcode' => $fm_shortcode,
|
25 |
'fm_advanced_layout' => $fm_advanced_layout,
|
26 |
+
'ajax_export_per_page' => !empty($fm_settings['ajax_export_per_page']) ? $fm_settings['export_per_page'] : 1000
|
27 |
));
|
28 |
return 8;
|
29 |
}
|
admin/models/Submissions_fm.php
CHANGED
@@ -36,7 +36,7 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
36 |
*
|
37 |
* @return object $form
|
38 |
*/
|
39 |
-
public function get_form( $id ) {
|
40 |
global $wpdb;
|
41 |
$query = 'SELECT `id`, `title` FROM ' . $wpdb->prefix .'formmaker WHERE id = ' . $id ;
|
42 |
$form = $wpdb->get_row( $query );
|
@@ -47,10 +47,9 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
47 |
* Get subs count.
|
48 |
*
|
49 |
* @param int $id
|
50 |
-
*
|
51 |
* @return int $count
|
52 |
*/
|
53 |
-
public function get_subs_count( $id ) {
|
54 |
global $wpdb;
|
55 |
$query = $wpdb->prepare("SELECT distinct group_id FROM " . $wpdb->prefix . "formmaker_submits where form_id=%d", $id);
|
56 |
$group_id_s = $wpdb->get_col($query);
|
@@ -62,10 +61,9 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
62 |
* Get statistics.
|
63 |
*
|
64 |
* @param int $id
|
65 |
-
*
|
66 |
* @return object $statistics
|
67 |
*/
|
68 |
-
public function get_statistics( $id ) {
|
69 |
global $wpdb;
|
70 |
$statistics = array();
|
71 |
$query = $wpdb->prepare('SELECT count(distinct group_id) FROM ' . $wpdb->prefix . 'formmaker_submits WHERE form_id ="%d"', $id);
|
@@ -81,16 +79,17 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
81 |
}
|
82 |
return $statistics;
|
83 |
}
|
|
|
84 |
/*
|
85 |
* Get labels parameters.
|
86 |
*
|
87 |
* @param int $form_id
|
88 |
* @param int $page_num
|
89 |
* @param int $per_num
|
90 |
-
*
|
91 |
* @return array $labels_parameters
|
92 |
*/
|
93 |
-
|
|
|
94 |
global $wpdb;
|
95 |
$labels = array();
|
96 |
$labels_id = array();
|
@@ -129,9 +128,9 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
129 |
$where_labels = array();
|
130 |
$where2 = array();
|
131 |
$order_by = ((isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) != '') ? esc_html(stripslashes($_POST['order_by'])) : 'group_id');
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
$lists['startdate'] = ((isset($_POST['startdate'])) ? esc_html(stripslashes($_POST['startdate'])) : '');
|
136 |
$lists['enddate'] = ((isset($_POST['enddate'])) ? esc_html(stripslashes($_POST['enddate'])) : '');
|
137 |
$lists['ip_search'] = ((isset($_POST['ip_search'])) ? esc_html(stripslashes($_POST['ip_search'])) : '');
|
@@ -306,8 +305,8 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
306 |
}
|
307 |
$total = $wpdb->get_var($query);
|
308 |
$query_sub_count = "SELECT count(distinct group_id) from " . $wpdb->prefix . "formmaker_submits";
|
309 |
-
|
310 |
-
|
311 |
$results = $wpdb->get_results($query);
|
312 |
for ( $i = 0; $i < count($results); $i++ ) {
|
313 |
array_push($rows_ord, $results[$i]->group_id);
|
@@ -344,7 +343,14 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
344 |
return $labels_parameters;
|
345 |
}
|
346 |
|
347 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
348 |
if ( $sorted_label_type == 'type_address' ) {
|
349 |
switch ( $sorted_label_name_original ) {
|
350 |
case 'Street Line':
|
@@ -377,7 +383,14 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
377 |
return $field_title;
|
378 |
}
|
379 |
|
380 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
381 |
if ( strpos($hide_string, '@') === FALSE ) {
|
382 |
if ( strpos($hide_strings, '@' . $hide_string . '@') === FALSE ) {
|
383 |
$style = '';
|
@@ -398,7 +411,14 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
398 |
return $style;
|
399 |
}
|
400 |
|
401 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
402 |
$count_labe = $sorted_label_names_count;
|
403 |
$group_id_s = array();
|
404 |
$l = 0;
|
@@ -409,11 +429,17 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
409 |
}
|
410 |
}
|
411 |
}
|
412 |
-
|
413 |
return $group_id_s;
|
414 |
}
|
415 |
|
416 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
417 |
$i = $group;
|
418 |
$count_rows = count($rows);
|
419 |
$temp = array();
|
@@ -427,7 +453,13 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
427 |
return $temp;
|
428 |
}
|
429 |
|
430 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
431 |
if ( $sorted_label_type == "type_checkbox" || $sorted_label_type == "type_radio" || $sorted_label_type == "type_own_select" || $sorted_label_type == "type_country" || $sorted_label_type == "type_paypal_select" || $sorted_label_type == "type_paypal_radio" || $sorted_label_type == "type_paypal_checkbox" || $sorted_label_type == "type_paypal_shipping" ) {
|
432 |
return TRUE;
|
433 |
}
|
@@ -436,7 +468,14 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
436 |
}
|
437 |
}
|
438 |
|
439 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
440 |
global $wpdb;
|
441 |
$choices_params = array();
|
442 |
$query = "SELECT element_value FROM " . $wpdb->prefix . "formmaker_submits WHERE " . $where_choices . " AND element_label='" . $sorted_label_id . "'";
|
@@ -469,7 +508,13 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
469 |
return $choices_params;
|
470 |
}
|
471 |
|
472 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
473 |
global $wpdb;
|
474 |
$query = "SELECT * FROM " . $wpdb->prefix . "formmaker_submits WHERE group_id=" . $id;
|
475 |
$rows = $wpdb->get_results($query);
|
@@ -506,7 +551,13 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
506 |
return $params;
|
507 |
}
|
508 |
|
509 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
510 |
if ( $label_type != 'type_editor' and $label_type != 'type_submit_reset' and $label_type != 'type_map' and $label_type != 'type_mark_map' and $label_type != 'type_captcha' and $label_type != 'type_recaptcha' and $label_type != 'type_button' ) {
|
511 |
return TRUE;
|
512 |
}
|
@@ -515,7 +566,14 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
515 |
}
|
516 |
}
|
517 |
|
518 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
519 |
foreach ( $rows as $row ) {
|
520 |
if ( $row->element_label == $label_id ) {
|
521 |
$element_value = $row->element_value;
|
@@ -533,11 +591,11 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
533 |
* Create array of group by key.
|
534 |
*
|
535 |
* @param array $array
|
536 |
-
* @param string
|
537 |
*
|
538 |
* @return array $data
|
539 |
*/
|
540 |
-
public function _group_by($array, $key) {
|
541 |
$data = array();
|
542 |
foreach($array as $val) {
|
543 |
$by_key = '';
|
@@ -555,7 +613,14 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
555 |
return $data;
|
556 |
}
|
557 |
|
558 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
559 |
$view_star_rating_array = array();
|
560 |
$new_filename = str_replace("***star_rating***", '', $element_value);
|
561 |
$stars = "";
|
@@ -571,7 +636,13 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
571 |
return $view_star_rating_array;
|
572 |
}
|
573 |
|
574 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
575 |
$view_grading_array = array();
|
576 |
$new_filename = str_replace("***grading***", '', $element_value);
|
577 |
$grading = explode(":", $new_filename);
|
@@ -588,7 +659,14 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
588 |
return $view_grading_array;
|
589 |
}
|
590 |
|
591 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
592 |
$edit_stars = "";
|
593 |
$star_rating_array = array();
|
594 |
$element_value1 = str_replace("***star_rating***", '', $element_value);
|
@@ -605,7 +683,14 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
605 |
return $star_rating_array;
|
606 |
}
|
607 |
|
608 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
609 |
$scale_rating_array = array();
|
610 |
$scale_radio = explode('/', $element_value);
|
611 |
$scale_value = $scale_radio[0];
|
@@ -631,14 +716,28 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
631 |
return $scale_rating_array;
|
632 |
}
|
633 |
|
634 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
635 |
$range_value = explode('-', $element_value);
|
636 |
$range = '<input name="' . $label_id . '_element0" id="' . $label_id . '_element0" type="text" value="' . $range_value[0] . '" onChange="edit_range(this.value,' . $label_id . ',0)" size="8"/> - <input name="' . $label_id . '_element1" id="' . $label_id . '_element1" type="text" value="' . $range_value[1] . '" onChange="edit_range(this.value,' . $label_id . ',1)" size="8"/>';
|
637 |
|
638 |
return $range;
|
639 |
}
|
640 |
|
641 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
642 |
$type_grading_array = array();
|
643 |
$element_value1 = str_replace("***grading***", '', $element_value);
|
644 |
$garding_value = explode(':', $element_value1);
|
@@ -659,7 +758,14 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
659 |
return $type_grading_array;
|
660 |
}
|
661 |
|
662 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
663 |
$type_matrix_array = array();
|
664 |
$new_filename = str_replace("***matrix***", '', $element_value);
|
665 |
$matrix_value = explode('***', $new_filename);
|
@@ -757,7 +863,17 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
757 |
return $type_matrix_array;
|
758 |
}
|
759 |
|
760 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
761 |
global $wpdb;
|
762 |
$query = "SELECT `" . $label_column . "` FROM " . $table . $where . " ORDER BY " . $order_by;
|
763 |
$db_info = trim($db_info, '[]');
|
@@ -782,7 +898,17 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
782 |
return $choices_labels;
|
783 |
}
|
784 |
|
785 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
786 |
global $wpdb;
|
787 |
$query = "SELECT `" . $value_column . "` FROM " . $table . $where . " ORDER BY " . $order_by;
|
788 |
$db_info = trim($db_info, '[]');
|
@@ -807,28 +933,51 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
807 |
return $choices_values;
|
808 |
}
|
809 |
|
810 |
-
|
|
|
|
|
|
|
|
|
|
|
811 |
global $wpdb;
|
812 |
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id="%d"', $id);
|
813 |
return $wpdb->query($query);
|
814 |
}
|
815 |
|
816 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
817 |
global $wpdb;
|
818 |
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_sessions WHERE form_id="%d" AND group_id="%d"', $form_id, $id);
|
819 |
|
820 |
return $wpdb->query($query);
|
821 |
}
|
822 |
|
823 |
-
|
824 |
-
|
|
|
|
|
|
|
|
|
825 |
global $wpdb;
|
826 |
$query = 'DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id IN ( ' . $params . ' )';
|
827 |
|
828 |
return $wpdb->query($query);
|
829 |
}
|
830 |
|
831 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
832 |
global $wpdb;
|
833 |
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_sessions WHERE form_id="%d" AND group_id IN ( "%s" )', $form_id, $cids);
|
834 |
|
@@ -842,7 +991,7 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
842 |
*
|
843 |
* @return array
|
844 |
*/
|
845 |
-
public function get_rows( $cids ) {
|
846 |
global $wpdb;
|
847 |
$query = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id IN ( ' . $cids . ' )';
|
848 |
|
@@ -856,7 +1005,7 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
856 |
*
|
857 |
* @return string
|
858 |
*/
|
859 |
-
public function get_ips( $ip ) {
|
860 |
global $wpdb;
|
861 |
$q = $wpdb->prepare('SELECT ip FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE ip="%s"', $ip);
|
862 |
return $wpdb->get_var($q);
|
@@ -868,7 +1017,7 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
868 |
* @params array $params_set
|
869 |
* @params array $params_type
|
870 |
*/
|
871 |
-
public function set_ips( $params_set, $params_type ) {
|
872 |
global $wpdb;
|
873 |
return $wpdb->insert($wpdb->prefix . 'formmaker_blocked', $params_set, $params_type);
|
874 |
}
|
@@ -880,18 +1029,30 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
880 |
*
|
881 |
* @return bool
|
882 |
*/
|
883 |
-
public function delete_by_ip( $ip ) {
|
884 |
global $wpdb;
|
885 |
return $wpdb->query( $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE ip="%s"', $ip) );
|
886 |
}
|
887 |
|
888 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
889 |
global $wpdb;
|
890 |
-
|
891 |
return $wpdb->get_var("SELECT form_id FROM " . $wpdb->prefix . "formmaker_submits WHERE group_id='" . $id . "'");
|
892 |
}
|
893 |
|
894 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
895 |
global $wpdb;
|
896 |
$query = "SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE group_id='" . $id . "' AND element_label='" . $label_id . "'";
|
897 |
|
@@ -899,7 +1060,7 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
899 |
}
|
900 |
|
901 |
/**
|
902 |
-
*
|
903 |
*
|
904 |
* @params array $params_set
|
905 |
* @params array $params_where
|
@@ -908,7 +1069,7 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
908 |
*
|
909 |
* @return bool
|
910 |
*/
|
911 |
-
public function update_fm_submits( $params_set, $params_where, $params_set_type, $params_where_type ) {
|
912 |
global $wpdb;
|
913 |
|
914 |
return $wpdb->update($wpdb->prefix . "formmaker_submits", $params_set, $params_where, $params_set_type, $params_where_type);
|
@@ -922,13 +1083,19 @@ class FMModelSubmissions_fmc extends CFMAdminModel {
|
|
922 |
*
|
923 |
* @return bool
|
924 |
*/
|
925 |
-
public function insert_fm_submits( $params_set, $params_set_type ) {
|
926 |
global $wpdb;
|
927 |
|
928 |
return $wpdb->insert($wpdb->prefix . "formmaker_submits", $params_set, $params_set_type);
|
929 |
}
|
930 |
|
931 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
932 |
global $wpdb;
|
933 |
|
934 |
return $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id='" . $id . "'");
|
36 |
*
|
37 |
* @return object $form
|
38 |
*/
|
39 |
+
public function get_form( $id = 0 ) {
|
40 |
global $wpdb;
|
41 |
$query = 'SELECT `id`, `title` FROM ' . $wpdb->prefix .'formmaker WHERE id = ' . $id ;
|
42 |
$form = $wpdb->get_row( $query );
|
47 |
* Get subs count.
|
48 |
*
|
49 |
* @param int $id
|
|
|
50 |
* @return int $count
|
51 |
*/
|
52 |
+
public function get_subs_count( $id = 0 ) {
|
53 |
global $wpdb;
|
54 |
$query = $wpdb->prepare("SELECT distinct group_id FROM " . $wpdb->prefix . "formmaker_submits where form_id=%d", $id);
|
55 |
$group_id_s = $wpdb->get_col($query);
|
61 |
* Get statistics.
|
62 |
*
|
63 |
* @param int $id
|
|
|
64 |
* @return object $statistics
|
65 |
*/
|
66 |
+
public function get_statistics( $id = 0 ) {
|
67 |
global $wpdb;
|
68 |
$statistics = array();
|
69 |
$query = $wpdb->prepare('SELECT count(distinct group_id) FROM ' . $wpdb->prefix . 'formmaker_submits WHERE form_id ="%d"', $id);
|
79 |
}
|
80 |
return $statistics;
|
81 |
}
|
82 |
+
|
83 |
/*
|
84 |
* Get labels parameters.
|
85 |
*
|
86 |
* @param int $form_id
|
87 |
* @param int $page_num
|
88 |
* @param int $per_num
|
|
|
89 |
* @return array $labels_parameters
|
90 |
*/
|
91 |
+
|
92 |
+
public function get_labels_parameters( $form_id = 0, $page_num = 0, $per_num = 0 ) {
|
93 |
global $wpdb;
|
94 |
$labels = array();
|
95 |
$labels_id = array();
|
128 |
$where_labels = array();
|
129 |
$where2 = array();
|
130 |
$order_by = ((isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) != '') ? esc_html(stripslashes($_POST['order_by'])) : 'group_id');
|
131 |
+
$asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'asc') ? 'asc' : 'desc');
|
132 |
+
|
133 |
+
$lists['hide_label_list'] = ((isset($_POST['hide_label_list'])) ? esc_html(stripslashes($_POST['hide_label_list'])) : '');
|
134 |
$lists['startdate'] = ((isset($_POST['startdate'])) ? esc_html(stripslashes($_POST['startdate'])) : '');
|
135 |
$lists['enddate'] = ((isset($_POST['enddate'])) ? esc_html(stripslashes($_POST['enddate'])) : '');
|
136 |
$lists['ip_search'] = ((isset($_POST['ip_search'])) ? esc_html(stripslashes($_POST['ip_search'])) : '');
|
305 |
}
|
306 |
$total = $wpdb->get_var($query);
|
307 |
$query_sub_count = "SELECT count(distinct group_id) from " . $wpdb->prefix . "formmaker_submits";
|
308 |
+
$sub_count = (int) $wpdb->get_var($query_sub_count);
|
309 |
+
$query = $join . ' ' . $orderby . ' LIMIT ' . $page_num . ', '. $per_num;
|
310 |
$results = $wpdb->get_results($query);
|
311 |
for ( $i = 0; $i < count($results); $i++ ) {
|
312 |
array_push($rows_ord, $results[$i]->group_id);
|
343 |
return $labels_parameters;
|
344 |
}
|
345 |
|
346 |
+
/**
|
347 |
+
* Get type address.
|
348 |
+
*
|
349 |
+
* @param string $sorted_label_type
|
350 |
+
* @param string $sorted_label_name_original
|
351 |
+
* @return mixed|string
|
352 |
+
*/
|
353 |
+
public function get_type_address( $sorted_label_type = '', $sorted_label_name_original = '' ) {
|
354 |
if ( $sorted_label_type == 'type_address' ) {
|
355 |
switch ( $sorted_label_name_original ) {
|
356 |
case 'Street Line':
|
383 |
return $field_title;
|
384 |
}
|
385 |
|
386 |
+
/**
|
387 |
+
* Hide or not.
|
388 |
+
*
|
389 |
+
* @param string $hide_strings
|
390 |
+
* @param string $hide_string
|
391 |
+
* @return string
|
392 |
+
*/
|
393 |
+
public function hide_or_not( $hide_strings = '', $hide_string = '' ) {
|
394 |
if ( strpos($hide_string, '@') === FALSE ) {
|
395 |
if ( strpos($hide_strings, '@' . $hide_string . '@') === FALSE ) {
|
396 |
$style = '';
|
411 |
return $style;
|
412 |
}
|
413 |
|
414 |
+
/**
|
415 |
+
* Sort group ids.
|
416 |
+
*
|
417 |
+
* @param int $sorted_label_names_count
|
418 |
+
* @param array $group_ids
|
419 |
+
* @return array
|
420 |
+
*/
|
421 |
+
public function sort_group_ids( $sorted_label_names_count = 0, $group_ids = array() ) {
|
422 |
$count_labe = $sorted_label_names_count;
|
423 |
$group_id_s = array();
|
424 |
$l = 0;
|
429 |
}
|
430 |
}
|
431 |
}
|
|
|
432 |
return $group_id_s;
|
433 |
}
|
434 |
|
435 |
+
/**
|
436 |
+
* Array for group id.
|
437 |
+
*
|
438 |
+
* @param int $group
|
439 |
+
* @param array $rows
|
440 |
+
* @return array
|
441 |
+
*/
|
442 |
+
public function array_for_group_id( $group = 0, $rows = array() ) {
|
443 |
$i = $group;
|
444 |
$count_rows = count($rows);
|
445 |
$temp = array();
|
453 |
return $temp;
|
454 |
}
|
455 |
|
456 |
+
/**
|
457 |
+
* Sorted label type.
|
458 |
+
*
|
459 |
+
* @param string $sorted_label_type
|
460 |
+
* @return bool
|
461 |
+
*/
|
462 |
+
public function check_radio_type( $sorted_label_type = '' ) {
|
463 |
if ( $sorted_label_type == "type_checkbox" || $sorted_label_type == "type_radio" || $sorted_label_type == "type_own_select" || $sorted_label_type == "type_country" || $sorted_label_type == "type_paypal_select" || $sorted_label_type == "type_paypal_radio" || $sorted_label_type == "type_paypal_checkbox" || $sorted_label_type == "type_paypal_shipping" ) {
|
464 |
return TRUE;
|
465 |
}
|
468 |
}
|
469 |
}
|
470 |
|
471 |
+
/**
|
472 |
+
* Statistic for radio.
|
473 |
+
*
|
474 |
+
* @param string $where_choices
|
475 |
+
* @param string $sorted_label_id
|
476 |
+
* @return array
|
477 |
+
*/
|
478 |
+
public function statistic_for_radio( $where_choices = '', $sorted_label_id = '' ) {
|
479 |
global $wpdb;
|
480 |
$choices_params = array();
|
481 |
$query = "SELECT element_value FROM " . $wpdb->prefix . "formmaker_submits WHERE " . $where_choices . " AND element_label='" . $sorted_label_id . "'";
|
508 |
return $choices_params;
|
509 |
}
|
510 |
|
511 |
+
/**
|
512 |
+
* Get data of group id.
|
513 |
+
*
|
514 |
+
* @param int $id
|
515 |
+
* @return array
|
516 |
+
*/
|
517 |
+
public function get_data_of_group_id( $id = 0 ) {
|
518 |
global $wpdb;
|
519 |
$query = "SELECT * FROM " . $wpdb->prefix . "formmaker_submits WHERE group_id=" . $id;
|
520 |
$rows = $wpdb->get_results($query);
|
551 |
return $params;
|
552 |
}
|
553 |
|
554 |
+
/**
|
555 |
+
* Check type for edit function.
|
556 |
+
*
|
557 |
+
* @param string $label_type
|
558 |
+
* @return bool
|
559 |
+
*/
|
560 |
+
public function check_type_for_edit_function( $label_type = '' ) {
|
561 |
if ( $label_type != 'type_editor' and $label_type != 'type_submit_reset' and $label_type != 'type_map' and $label_type != 'type_mark_map' and $label_type != 'type_captcha' and $label_type != 'type_recaptcha' and $label_type != 'type_button' ) {
|
562 |
return TRUE;
|
563 |
}
|
566 |
}
|
567 |
}
|
568 |
|
569 |
+
/**
|
570 |
+
* Check for submited label.
|
571 |
+
*
|
572 |
+
* @param array $rows
|
573 |
+
* @param string $label_id
|
574 |
+
* @return string
|
575 |
+
*/
|
576 |
+
public function check_for_submited_label( $rows = array(), $label_id = '' ) {
|
577 |
foreach ( $rows as $row ) {
|
578 |
if ( $row->element_label == $label_id ) {
|
579 |
$element_value = $row->element_value;
|
591 |
* Create array of group by key.
|
592 |
*
|
593 |
* @param array $array
|
594 |
+
* @param string $key
|
595 |
*
|
596 |
* @return array $data
|
597 |
*/
|
598 |
+
public function _group_by( $array = array(), $key = '' ) {
|
599 |
$data = array();
|
600 |
foreach($array as $val) {
|
601 |
$by_key = '';
|
613 |
return $data;
|
614 |
}
|
615 |
|
616 |
+
/**
|
617 |
+
* View for star rating.
|
618 |
+
*
|
619 |
+
* @param string $element_value
|
620 |
+
* @param string $element_label
|
621 |
+
* @return array
|
622 |
+
*/
|
623 |
+
public function view_for_star_rating( $element_value = '', $element_label = '' ) {
|
624 |
$view_star_rating_array = array();
|
625 |
$new_filename = str_replace("***star_rating***", '', $element_value);
|
626 |
$stars = "";
|
636 |
return $view_star_rating_array;
|
637 |
}
|
638 |
|
639 |
+
/**
|
640 |
+
* View for grading.
|
641 |
+
*
|
642 |
+
* @param string $element_value
|
643 |
+
* @return array
|
644 |
+
*/
|
645 |
+
public function view_for_grading( $element_value = '' ) {
|
646 |
$view_grading_array = array();
|
647 |
$new_filename = str_replace("***grading***", '', $element_value);
|
648 |
$grading = explode(":", $new_filename);
|
659 |
return $view_grading_array;
|
660 |
}
|
661 |
|
662 |
+
/**
|
663 |
+
* Images for star rating.
|
664 |
+
*
|
665 |
+
* @param string $element_value
|
666 |
+
* @param string $label_id
|
667 |
+
* @return array
|
668 |
+
*/
|
669 |
+
public function images_for_star_rating( $element_value = '', $label_id = '' ) {
|
670 |
$edit_stars = "";
|
671 |
$star_rating_array = array();
|
672 |
$element_value1 = str_replace("***star_rating***", '', $element_value);
|
683 |
return $star_rating_array;
|
684 |
}
|
685 |
|
686 |
+
/**
|
687 |
+
* Params for scale rating.
|
688 |
+
*
|
689 |
+
* @param string $element_value
|
690 |
+
* @param string $label_id
|
691 |
+
* @return array
|
692 |
+
*/
|
693 |
+
public function params_for_scale_rating( $element_value = '', $label_id = '' ) {
|
694 |
$scale_rating_array = array();
|
695 |
$scale_radio = explode('/', $element_value);
|
696 |
$scale_value = $scale_radio[0];
|
716 |
return $scale_rating_array;
|
717 |
}
|
718 |
|
719 |
+
/**
|
720 |
+
* Params for type range.
|
721 |
+
*
|
722 |
+
* @param string $element_value
|
723 |
+
* @param string $label_id
|
724 |
+
* @return string
|
725 |
+
*/
|
726 |
+
public function params_for_type_range( $element_value = '', $label_id = '' ) {
|
727 |
$range_value = explode('-', $element_value);
|
728 |
$range = '<input name="' . $label_id . '_element0" id="' . $label_id . '_element0" type="text" value="' . $range_value[0] . '" onChange="edit_range(this.value,' . $label_id . ',0)" size="8"/> - <input name="' . $label_id . '_element1" id="' . $label_id . '_element1" type="text" value="' . $range_value[1] . '" onChange="edit_range(this.value,' . $label_id . ',1)" size="8"/>';
|
729 |
|
730 |
return $range;
|
731 |
}
|
732 |
|
733 |
+
/**
|
734 |
+
* Params for type grading.
|
735 |
+
*
|
736 |
+
* @param string $element_value
|
737 |
+
* @param string $label_id
|
738 |
+
* @return array
|
739 |
+
*/
|
740 |
+
public function params_for_type_grading( $element_value = '', $label_id = '' ) {
|
741 |
$type_grading_array = array();
|
742 |
$element_value1 = str_replace("***grading***", '', $element_value);
|
743 |
$garding_value = explode(':', $element_value1);
|
758 |
return $type_grading_array;
|
759 |
}
|
760 |
|
761 |
+
/**
|
762 |
+
* Params for type matrix.
|
763 |
+
*
|
764 |
+
* @param string $element_value
|
765 |
+
* @param string $label_id
|
766 |
+
* @return array
|
767 |
+
*/
|
768 |
+
public function params_for_type_matrix( $element_value = '', $label_id = '' ) {
|
769 |
$type_matrix_array = array();
|
770 |
$new_filename = str_replace("***matrix***", '', $element_value);
|
771 |
$matrix_value = explode('***', $new_filename);
|
863 |
return $type_matrix_array;
|
864 |
}
|
865 |
|
866 |
+
/**
|
867 |
+
* select data from db for labels.
|
868 |
+
*
|
869 |
+
* @param string $db_info
|
870 |
+
* @param string $label_column
|
871 |
+
* @param string $table
|
872 |
+
* @param string $where
|
873 |
+
* @param string $order_by
|
874 |
+
* @return mixed
|
875 |
+
*/
|
876 |
+
public function select_data_from_db_for_labels( $db_info = '', $label_column = '', $table = '', $where = '', $order_by = '' ) {
|
877 |
global $wpdb;
|
878 |
$query = "SELECT `" . $label_column . "` FROM " . $table . $where . " ORDER BY " . $order_by;
|
879 |
$db_info = trim($db_info, '[]');
|
898 |
return $choices_labels;
|
899 |
}
|
900 |
|
901 |
+
/**
|
902 |
+
* Select data from db for values.
|
903 |
+
*
|
904 |
+
* @param string $db_info
|
905 |
+
* @param string $value_column
|
906 |
+
* @param string $table
|
907 |
+
* @param string $where
|
908 |
+
* @param string $order_by
|
909 |
+
* @return mixed
|
910 |
+
*/
|
911 |
+
public function select_data_from_db_for_values( $db_info = '', $value_column = '', $table = '', $where = '', $order_by = '' ) {
|
912 |
global $wpdb;
|
913 |
$query = "SELECT `" . $value_column . "` FROM " . $table . $where . " ORDER BY " . $order_by;
|
914 |
$db_info = trim($db_info, '[]');
|
933 |
return $choices_values;
|
934 |
}
|
935 |
|
936 |
+
/**
|
937 |
+
* Delete row.
|
938 |
+
* @param int $id
|
939 |
+
* @return mixed
|
940 |
+
*/
|
941 |
+
public function delete_row( $id = 0 ) {
|
942 |
global $wpdb;
|
943 |
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id="%d"', $id);
|
944 |
return $wpdb->query($query);
|
945 |
}
|
946 |
|
947 |
+
/**
|
948 |
+
* Delete from session.
|
949 |
+
*
|
950 |
+
* @param int $form_id
|
951 |
+
* @param int $id
|
952 |
+
* @return mixed
|
953 |
+
*/
|
954 |
+
public function delete_from_session( $form_id = 0, $id = 0 ) {
|
955 |
global $wpdb;
|
956 |
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_sessions WHERE form_id="%d" AND group_id="%d"', $form_id, $id);
|
957 |
|
958 |
return $wpdb->query($query);
|
959 |
}
|
960 |
|
961 |
+
/**
|
962 |
+
* Delete rows.
|
963 |
+
* @param array $params
|
964 |
+
* @return mixed
|
965 |
+
*/
|
966 |
+
public function delete_rows( $params = array() ) {
|
967 |
global $wpdb;
|
968 |
$query = 'DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id IN ( ' . $params . ' )';
|
969 |
|
970 |
return $wpdb->query($query);
|
971 |
}
|
972 |
|
973 |
+
/**
|
974 |
+
* Delete rows from session.
|
975 |
+
*
|
976 |
+
* @param int $form_id
|
977 |
+
* @param string $cids
|
978 |
+
* @return mixed
|
979 |
+
*/
|
980 |
+
public function delete_rows_from_session( $form_id = 0, $cids = '' ) {
|
981 |
global $wpdb;
|
982 |
$query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_sessions WHERE form_id="%d" AND group_id IN ( "%s" )', $form_id, $cids);
|
983 |
|
991 |
*
|
992 |
* @return array
|
993 |
*/
|
994 |
+
public function get_rows( $cids = array() ) {
|
995 |
global $wpdb;
|
996 |
$query = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id IN ( ' . $cids . ' )';
|
997 |
|
1005 |
*
|
1006 |
* @return string
|
1007 |
*/
|
1008 |
+
public function get_ips( $ip = '' ) {
|
1009 |
global $wpdb;
|
1010 |
$q = $wpdb->prepare('SELECT ip FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE ip="%s"', $ip);
|
1011 |
return $wpdb->get_var($q);
|
1017 |
* @params array $params_set
|
1018 |
* @params array $params_type
|
1019 |
*/
|
1020 |
+
public function set_ips( $params_set = array(), $params_type = array() ) {
|
1021 |
global $wpdb;
|
1022 |
return $wpdb->insert($wpdb->prefix . 'formmaker_blocked', $params_set, $params_type);
|
1023 |
}
|
1029 |
*
|
1030 |
* @return bool
|
1031 |
*/
|
1032 |
+
public function delete_by_ip( $ip = '' ) {
|
1033 |
global $wpdb;
|
1034 |
return $wpdb->query( $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_blocked WHERE ip="%s"', $ip) );
|
1035 |
}
|
1036 |
|
1037 |
+
/**
|
1038 |
+
* Get col.
|
1039 |
+
*
|
1040 |
+
* @param int $id
|
1041 |
+
* @return mixed
|
1042 |
+
*/
|
1043 |
+
public function get_col( $id = 0 ) {
|
1044 |
global $wpdb;
|
|
|
1045 |
return $wpdb->get_var("SELECT form_id FROM " . $wpdb->prefix . "formmaker_submits WHERE group_id='" . $id . "'");
|
1046 |
}
|
1047 |
|
1048 |
+
/**
|
1049 |
+
* Get id.
|
1050 |
+
*
|
1051 |
+
* @param $id
|
1052 |
+
* @param $label_id
|
1053 |
+
* @return mixed
|
1054 |
+
*/
|
1055 |
+
public function get_id( $id = 0, $label_id = '' ) {
|
1056 |
global $wpdb;
|
1057 |
$query = "SELECT id FROM " . $wpdb->prefix . "formmaker_submits WHERE group_id='" . $id . "' AND element_label='" . $label_id . "'";
|
1058 |
|
1060 |
}
|
1061 |
|
1062 |
/**
|
1063 |
+
* Update formmaker_submits
|
1064 |
*
|
1065 |
* @params array $params_set
|
1066 |
* @params array $params_where
|
1069 |
*
|
1070 |
* @return bool
|
1071 |
*/
|
1072 |
+
public function update_fm_submits( $params_set = array(), $params_where = array(), $params_set_type = array(), $params_where_type = array() ) {
|
1073 |
global $wpdb;
|
1074 |
|
1075 |
return $wpdb->update($wpdb->prefix . "formmaker_submits", $params_set, $params_where, $params_set_type, $params_where_type);
|
1083 |
*
|
1084 |
* @return bool
|
1085 |
*/
|
1086 |
+
public function insert_fm_submits( $params_set = array(), $params_set_type = array() ) {
|
1087 |
global $wpdb;
|
1088 |
|
1089 |
return $wpdb->insert($wpdb->prefix . "formmaker_submits", $params_set, $params_set_type);
|
1090 |
}
|
1091 |
|
1092 |
+
/**
|
1093 |
+
* Get all.
|
1094 |
+
*
|
1095 |
+
* @param int $id
|
1096 |
+
* @return mixed
|
1097 |
+
*/
|
1098 |
+
public function get_all( $id = 0 ) {
|
1099 |
global $wpdb;
|
1100 |
|
1101 |
return $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id='" . $id . "'");
|
admin/models/Themes_fm.php
CHANGED
@@ -8,7 +8,7 @@ class FMModelThemes_fmc extends CFMAdminModel {
|
|
8 |
*
|
9 |
* @return array $rows
|
10 |
*/
|
11 |
-
public function get_rows_data( $params ) {
|
12 |
global $wpdb;
|
13 |
$order = $params['order'];
|
14 |
$orderby = $params['orderby'];
|
@@ -26,7 +26,14 @@ class FMModelThemes_fmc extends CFMAdminModel {
|
|
26 |
return $rows;
|
27 |
}
|
28 |
|
29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
global $wpdb;
|
31 |
if ( $id != 0 ) {
|
32 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $id));
|
@@ -62,7 +69,6 @@ class FMModelThemes_fmc extends CFMAdminModel {
|
|
62 |
$row->css = array( "CUPCSS" => $row->css );
|
63 |
}
|
64 |
}
|
65 |
-
|
66 |
return $row;
|
67 |
}
|
68 |
|
@@ -73,7 +79,7 @@ class FMModelThemes_fmc extends CFMAdminModel {
|
|
73 |
*
|
74 |
* @return null|string
|
75 |
*/
|
76 |
-
public function total($search = '') {
|
77 |
global $wpdb;
|
78 |
$query = 'SELECT COUNT(*) FROM `' . $wpdb->prefix . 'formmaker_themes`';
|
79 |
if ( $search ) {
|
@@ -92,7 +98,7 @@ class FMModelThemes_fmc extends CFMAdminModel {
|
|
92 |
*
|
93 |
* @return array
|
94 |
*/
|
95 |
-
public function delete_rows( $params ) {
|
96 |
global $wpdb;
|
97 |
$query = 'DELETE FROM ' . $wpdb->prefix . $params['table'];
|
98 |
if ( isset($params['where']) ) {
|
@@ -118,7 +124,7 @@ class FMModelThemes_fmc extends CFMAdminModel {
|
|
118 |
*
|
119 |
* @return array
|
120 |
*/
|
121 |
-
public function select_rows( $get_type, $params ) {
|
122 |
global $wpdb;
|
123 |
$query = "SELECT " . $params['selection'] . " FROM " . $wpdb->prefix . $params['table'];
|
124 |
if ( isset($params['where']) ) {
|
@@ -148,7 +154,7 @@ class FMModelThemes_fmc extends CFMAdminModel {
|
|
148 |
*
|
149 |
* @return array
|
150 |
*/
|
151 |
-
public function insert_data_to_db( $table, $data ) {
|
152 |
global $wpdb;
|
153 |
$query = $wpdb->insert($wpdb->prefix . $table, $data);
|
154 |
$wpdb->show_errors();
|
@@ -159,9 +165,10 @@ class FMModelThemes_fmc extends CFMAdminModel {
|
|
159 |
/**
|
160 |
* @params array $params
|
161 |
*
|
|
|
162 |
* @return bool
|
163 |
*/
|
164 |
-
public function insert_theme( $params ) {
|
165 |
global $wpdb;
|
166 |
|
167 |
$wpdb->insert($wpdb->prefix . 'formmaker_themes', $params);
|
@@ -176,9 +183,8 @@ class FMModelThemes_fmc extends CFMAdminModel {
|
|
176 |
*
|
177 |
* @return bool
|
178 |
*/
|
179 |
-
public function update_formmaker_themes( $params, $where ) {
|
180 |
global $wpdb;
|
181 |
-
|
182 |
return $wpdb->update($wpdb->prefix . 'formmaker_themes', $params, $where);
|
183 |
}
|
184 |
|
@@ -189,9 +195,8 @@ class FMModelThemes_fmc extends CFMAdminModel {
|
|
189 |
*
|
190 |
* @return string
|
191 |
*/
|
192 |
-
public function get_theme_version( $id ) {
|
193 |
global $wpdb;
|
194 |
-
|
195 |
return $wpdb->get_var($wpdb->prepare("SELECT version FROM " . $wpdb->prefix . "formmaker_themes WHERE id=%d", $id));
|
196 |
}
|
197 |
|
@@ -202,9 +207,8 @@ class FMModelThemes_fmc extends CFMAdminModel {
|
|
202 |
*
|
203 |
* @return string
|
204 |
*/
|
205 |
-
public function get_default( $id ) {
|
206 |
global $wpdb;
|
207 |
-
|
208 |
return $wpdb->get_var($wpdb->prepare('SELECT `default` FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $id));
|
209 |
}
|
210 |
}
|
8 |
*
|
9 |
* @return array $rows
|
10 |
*/
|
11 |
+
public function get_rows_data( $params = array() ) {
|
12 |
global $wpdb;
|
13 |
$order = $params['order'];
|
14 |
$orderby = $params['orderby'];
|
26 |
return $rows;
|
27 |
}
|
28 |
|
29 |
+
/**
|
30 |
+
* Get row data.
|
31 |
+
*
|
32 |
+
* @param int $id
|
33 |
+
* @param $reset
|
34 |
+
* @return stdClass
|
35 |
+
*/
|
36 |
+
public function get_row_data( $id = 0 , $reset = false ) {
|
37 |
global $wpdb;
|
38 |
if ( $id != 0 ) {
|
39 |
$row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $id));
|
69 |
$row->css = array( "CUPCSS" => $row->css );
|
70 |
}
|
71 |
}
|
|
|
72 |
return $row;
|
73 |
}
|
74 |
|
79 |
*
|
80 |
* @return null|string
|
81 |
*/
|
82 |
+
public function total( $search = '' ) {
|
83 |
global $wpdb;
|
84 |
$query = 'SELECT COUNT(*) FROM `' . $wpdb->prefix . 'formmaker_themes`';
|
85 |
if ( $search ) {
|
98 |
*
|
99 |
* @return array
|
100 |
*/
|
101 |
+
public function delete_rows( $params = array() ) {
|
102 |
global $wpdb;
|
103 |
$query = 'DELETE FROM ' . $wpdb->prefix . $params['table'];
|
104 |
if ( isset($params['where']) ) {
|
124 |
*
|
125 |
* @return array
|
126 |
*/
|
127 |
+
public function select_rows( $get_type = '', $params = array() ) {
|
128 |
global $wpdb;
|
129 |
$query = "SELECT " . $params['selection'] . " FROM " . $wpdb->prefix . $params['table'];
|
130 |
if ( isset($params['where']) ) {
|
154 |
*
|
155 |
* @return array
|
156 |
*/
|
157 |
+
public function insert_data_to_db( $table = '', $data = array() ) {
|
158 |
global $wpdb;
|
159 |
$query = $wpdb->insert($wpdb->prefix . $table, $data);
|
160 |
$wpdb->show_errors();
|
165 |
/**
|
166 |
* @params array $params
|
167 |
*
|
168 |
+
* @param array $params
|
169 |
* @return bool
|
170 |
*/
|
171 |
+
public function insert_theme( $params = array() ) {
|
172 |
global $wpdb;
|
173 |
|
174 |
$wpdb->insert($wpdb->prefix . 'formmaker_themes', $params);
|
183 |
*
|
184 |
* @return bool
|
185 |
*/
|
186 |
+
public function update_formmaker_themes( $params = array(), $where = array() ) {
|
187 |
global $wpdb;
|
|
|
188 |
return $wpdb->update($wpdb->prefix . 'formmaker_themes', $params, $where);
|
189 |
}
|
190 |
|
195 |
*
|
196 |
* @return string
|
197 |
*/
|
198 |
+
public function get_theme_version( $id = 0 ) {
|
199 |
global $wpdb;
|
|
|
200 |
return $wpdb->get_var($wpdb->prepare("SELECT version FROM " . $wpdb->prefix . "formmaker_themes WHERE id=%d", $id));
|
201 |
}
|
202 |
|
207 |
*
|
208 |
* @return string
|
209 |
*/
|
210 |
+
public function get_default( $id = 0 ) {
|
211 |
global $wpdb;
|
|
|
212 |
return $wpdb->get_var($wpdb->prepare('SELECT `default` FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $id));
|
213 |
}
|
214 |
}
|
admin/views/Addons_fm.php
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
/**
|
4 |
* Class FMViewAddons_fmc
|
5 |
*/
|
@@ -13,6 +12,11 @@ class FMViewAddons_fmc extends FMAdminView_fmc {
|
|
13 |
wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-admin');
|
14 |
}
|
15 |
|
|
|
|
|
|
|
|
|
|
|
16 |
public function display( $params = array() ) {
|
17 |
$page = $params['page'];
|
18 |
$page_url = $params['page_url'];
|
@@ -31,6 +35,7 @@ class FMViewAddons_fmc extends FMAdminView_fmc {
|
|
31 |
/**
|
32 |
* Generate page body.
|
33 |
*
|
|
|
34 |
* @return string Body html.
|
35 |
*/
|
36 |
public function body( $params = array() ) {
|
1 |
<?php
|
|
|
2 |
/**
|
3 |
* Class FMViewAddons_fmc
|
4 |
*/
|
12 |
wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-admin');
|
13 |
}
|
14 |
|
15 |
+
/**
|
16 |
+
* Display.
|
17 |
+
*
|
18 |
+
* @param array $params
|
19 |
+
*/
|
20 |
public function display( $params = array() ) {
|
21 |
$page = $params['page'];
|
22 |
$page_url = $params['page_url'];
|
35 |
/**
|
36 |
* Generate page body.
|
37 |
*
|
38 |
+
* @param array $params
|
39 |
* @return string Body html.
|
40 |
*/
|
41 |
public function body( $params = array() ) {
|
admin/views/Blocked_ips_fm.php
CHANGED
@@ -17,9 +17,11 @@ class FMViewBlocked_ips_fmc extends FMAdminView_fmc {
|
|
17 |
}
|
18 |
|
19 |
/**
|
|
|
|
|
20 |
* @param $params
|
21 |
*/
|
22 |
-
public function display( $params ) {
|
23 |
ob_start();
|
24 |
echo $this->body($params);
|
25 |
// Pass the content to form.
|
@@ -31,13 +33,13 @@ class FMViewBlocked_ips_fmc extends FMAdminView_fmc {
|
|
31 |
echo $this->form(ob_get_clean(), $form_attr);
|
32 |
}
|
33 |
|
34 |
-
|
35 |
/**
|
36 |
* Generate page body.
|
37 |
*
|
|
|
38 |
* @return string Body html.
|
39 |
*/
|
40 |
-
public function body( $params ) {
|
41 |
$rows_data = $params['rows_data'];
|
42 |
$total = $params['total'];
|
43 |
$order = $params['order'];
|
17 |
}
|
18 |
|
19 |
/**
|
20 |
+
* Display.
|
21 |
+
*
|
22 |
* @param $params
|
23 |
*/
|
24 |
+
public function display( $params = array() ) {
|
25 |
ob_start();
|
26 |
echo $this->body($params);
|
27 |
// Pass the content to form.
|
33 |
echo $this->form(ob_get_clean(), $form_attr);
|
34 |
}
|
35 |
|
|
|
36 |
/**
|
37 |
* Generate page body.
|
38 |
*
|
39 |
+
* @param array $params
|
40 |
* @return string Body html.
|
41 |
*/
|
42 |
+
public function body( $params = array() ) {
|
43 |
$rows_data = $params['rows_data'];
|
44 |
$total = $params['total'];
|
45 |
$order = $params['order'];
|
admin/views/Checkpaypal.php
CHANGED
@@ -8,10 +8,9 @@ class FMViewCheckpaypal extends FMAdminView_fmc {
|
|
8 |
* Payment information template.
|
9 |
*
|
10 |
* @param array $template_params
|
11 |
-
*
|
12 |
* @return string
|
13 |
*/
|
14 |
-
public function payment_information_template( $template_params ) {
|
15 |
$form_session = $template_params['form_session'];
|
16 |
$data = $template_params['data'];
|
17 |
$tax = $data['tax'];
|
8 |
* Payment information template.
|
9 |
*
|
10 |
* @param array $template_params
|
|
|
11 |
* @return string
|
12 |
*/
|
13 |
+
public function payment_information_template( $template_params = array() ) {
|
14 |
$form_session = $template_params['form_session'];
|
15 |
$data = $template_params['data'];
|
16 |
$tax = $data['tax'];
|
admin/views/FMCaptcha.php
CHANGED
@@ -7,7 +7,7 @@ class FMViewFormmakerwdcaptcha_fmc extends FMAdminView_fmc {
|
|
7 |
*
|
8 |
* @param array $params
|
9 |
*/
|
10 |
-
public function display( $params ) {
|
11 |
if (isset($_GET['action']) && esc_html($_GET['action']) == 'formmakerwdcaptcha' . WDFMInstance(self::PLUGIN)->plugin_postfix) {
|
12 |
$i = (isset($_GET["i"]) ? esc_html($_GET["i"]) : '');
|
13 |
$r2 = (isset($_GET["r2"]) ? (int) $_GET["r2"] : 0);
|
@@ -38,7 +38,7 @@ class FMViewFormmakerwdcaptcha_fmc extends FMAdminView_fmc {
|
|
38 |
|
39 |
$l = rand($cap_length_min, $cap_length_max);
|
40 |
$code = code_generic($l, $cap_digital, $cap_latin_char);
|
41 |
-
|
42 |
$_SESSION[$i . '_wd_captcha_code'] = md5($code);
|
43 |
$canvas = imagecreatetruecolor($cap_width, $cap_height);
|
44 |
$c = imagecolorallocate($canvas, rand(150, 255), rand(150, 255), rand(150, 255));
|
7 |
*
|
8 |
* @param array $params
|
9 |
*/
|
10 |
+
public function display( $params = array() ) {
|
11 |
if (isset($_GET['action']) && esc_html($_GET['action']) == 'formmakerwdcaptcha' . WDFMInstance(self::PLUGIN)->plugin_postfix) {
|
12 |
$i = (isset($_GET["i"]) ? esc_html($_GET["i"]) : '');
|
13 |
$r2 = (isset($_GET["r2"]) ? (int) $_GET["r2"] : 0);
|
38 |
|
39 |
$l = rand($cap_length_min, $cap_length_max);
|
40 |
$code = code_generic($l, $cap_digital, $cap_latin_char);
|
41 |
+
WDW_FM_Library(self::PLUGIN)->start_session();
|
42 |
$_SESSION[$i . '_wd_captcha_code'] = md5($code);
|
43 |
$canvas = imagecreatetruecolor($cap_width, $cap_height);
|
44 |
$c = imagecolorallocate($canvas, rand(150, 255), rand(150, 255), rand(150, 255));
|
admin/views/FMEditCountryinPopup.php
CHANGED
@@ -9,7 +9,7 @@ class FMViewFromeditcountryinpopup_fmc extends FMAdminView_fmc {
|
|
9 |
*
|
10 |
* @param array $params
|
11 |
*/
|
12 |
-
public function display( $params ) {
|
13 |
$field_id = $params['field_id'];
|
14 |
wp_print_scripts('jquery');
|
15 |
wp_print_scripts('jquery-ui-core');
|
9 |
*
|
10 |
* @param array $params
|
11 |
*/
|
12 |
+
public function display( $params = array() ) {
|
13 |
$field_id = $params['field_id'];
|
14 |
wp_print_scripts('jquery');
|
15 |
wp_print_scripts('jquery-ui-core');
|
admin/views/FMIpinfoinPopup.php
CHANGED
@@ -9,7 +9,7 @@ class FMViewFromipinfoinpopup_fmc extends FMAdminView_fmc {
|
|
9 |
*
|
10 |
* @param array $params
|
11 |
*/
|
12 |
-
public function display( $params ) {
|
13 |
$ip = $params['ip'];
|
14 |
$city = $params['city'];
|
15 |
$country = $params['country'];
|
9 |
*
|
10 |
* @param array $params
|
11 |
*/
|
12 |
+
public function display( $params = array() ) {
|
13 |
$ip = $params['ip'];
|
14 |
$city = $params['city'];
|
15 |
$country = $params['country'];
|
admin/views/FMMapEditinPopup.php
CHANGED
@@ -9,7 +9,7 @@ class FMViewFrommapeditinpopup_fmc extends FMAdminView_fmc {
|
|
9 |
*
|
10 |
* @param array $params
|
11 |
*/
|
12 |
-
public function display( $params ) {
|
13 |
wp_print_scripts('google-maps');
|
14 |
wp_print_scripts(WDFMInstance(self::PLUGIN)->handle_prefix . '-gmap_form');
|
15 |
$long = $params['long'];
|
9 |
*
|
10 |
* @param array $params
|
11 |
*/
|
12 |
+
public function display( $params = array() ) {
|
13 |
wp_print_scripts('google-maps');
|
14 |
wp_print_scripts(WDFMInstance(self::PLUGIN)->handle_prefix . '-gmap_form');
|
15 |
$long = $params['long'];
|
admin/views/FMMathCaptcha.php
CHANGED
@@ -48,7 +48,14 @@ class FMViewFormmakerwdmathcaptcha_fmc extends FMAdminView_fmc {
|
|
48 |
die('');
|
49 |
}
|
50 |
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
$cap = '';
|
53 |
$dig = array( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 );
|
54 |
$valid_oprations = array( '+', '-', '*', '/' );
|
@@ -81,7 +88,13 @@ class FMViewFormmakerwdmathcaptcha_fmc extends FMAdminView_fmc {
|
|
81 |
return array( $cap, $pass );
|
82 |
}
|
83 |
|
84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
$divisors = array();
|
86 |
if ( $x == 0 ) {
|
87 |
$divisors[] = rand(1, 9);
|
@@ -91,7 +104,6 @@ class FMViewFormmakerwdmathcaptcha_fmc extends FMAdminView_fmc {
|
|
91 |
$divisors [] = $i;
|
92 |
}
|
93 |
}
|
94 |
-
|
95 |
return $divisors;
|
96 |
}
|
97 |
}
|
48 |
die('');
|
49 |
}
|
50 |
|
51 |
+
/**
|
52 |
+
* Code generic.
|
53 |
+
*
|
54 |
+
* @param array $_length
|
55 |
+
* @param array $_operations
|
56 |
+
* @return array
|
57 |
+
*/
|
58 |
+
private function code_generic( $_length = array(), $_operations = array() ) {
|
59 |
$cap = '';
|
60 |
$dig = array( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 );
|
61 |
$valid_oprations = array( '+', '-', '*', '/' );
|
88 |
return array( $cap, $pass );
|
89 |
}
|
90 |
|
91 |
+
/**
|
92 |
+
* array Of Number Divisors.
|
93 |
+
*
|
94 |
+
* @param int $x
|
95 |
+
* @return array
|
96 |
+
*/
|
97 |
+
public function arrayOfNumberDivisors( $x = 0 ) {
|
98 |
$divisors = array();
|
99 |
if ( $x == 0 ) {
|
100 |
$divisors[] = rand(1, 9);
|
104 |
$divisors [] = $i;
|
105 |
}
|
106 |
}
|
|
|
107 |
return $divisors;
|
108 |
}
|
109 |
}
|
admin/views/FMPaypalInfo.php
CHANGED
@@ -9,12 +9,12 @@ class FMViewPaypal_info extends FMAdminView {
|
|
9 |
*
|
10 |
* @param array $params
|
11 |
*/
|
12 |
-
public function display( $params ) {
|
13 |
$row = $params['row'];
|
14 |
if ( !isset($row->ipn) ) {
|
15 |
?>
|
16 |
<div style="width:100%; text-align: center; height: 70%; vertical-align: middle;">
|
17 |
-
<h1 style="vertical-align: middle; margin: auto; color: #000"><p
|
18 |
</div>
|
19 |
<?php
|
20 |
}
|
@@ -32,7 +32,7 @@ class FMViewPaypal_info extends FMAdminView {
|
|
32 |
width: 140px;
|
33 |
}
|
34 |
</style>
|
35 |
-
<h2
|
36 |
<table class="admintable">
|
37 |
<?php
|
38 |
if ( $row->currency ) {
|
@@ -48,7 +48,7 @@ class FMViewPaypal_info extends FMAdminView {
|
|
48 |
if ( $row->ord_last_modified ) {
|
49 |
?>
|
50 |
<tr>
|
51 |
-
<td class="key"
|
52 |
<td><?php echo $row->ord_last_modified; ?></td>
|
53 |
</tr>
|
54 |
<?php
|
@@ -58,7 +58,7 @@ class FMViewPaypal_info extends FMAdminView {
|
|
58 |
if ( $row->status ) {
|
59 |
?>
|
60 |
<tr>
|
61 |
-
<td class="key"
|
62 |
<td><?php echo $row->status; ?></td>
|
63 |
</tr>
|
64 |
<?php
|
@@ -68,7 +68,7 @@ class FMViewPaypal_info extends FMAdminView {
|
|
68 |
if ( $row->full_name ) {
|
69 |
?>
|
70 |
<tr>
|
71 |
-
<td class="key"
|
72 |
<td><?php echo $row->full_name; ?></td>
|
73 |
</tr>
|
74 |
<?php
|
@@ -78,7 +78,7 @@ class FMViewPaypal_info extends FMAdminView {
|
|
78 |
if ( $row->email ) {
|
79 |
?>
|
80 |
<tr>
|
81 |
-
<td class="key"
|
82 |
<td><?php echo $row->email; ?></td>
|
83 |
</tr>
|
84 |
<?php
|
@@ -88,7 +88,7 @@ class FMViewPaypal_info extends FMAdminView {
|
|
88 |
if ( $row->phone ) {
|
89 |
?>
|
90 |
<tr>
|
91 |
-
<td class="key"
|
92 |
<td><?php echo $row->phone; ?></td>
|
93 |
</tr>
|
94 |
<?php
|
@@ -98,7 +98,7 @@ class FMViewPaypal_info extends FMAdminView {
|
|
98 |
if ( $row->mobile_phone ) {
|
99 |
?>
|
100 |
<tr>
|
101 |
-
<td class="key"
|
102 |
<td><?php echo $row->mobile_phone; ?></td>
|
103 |
</tr>
|
104 |
<?php
|
@@ -108,7 +108,7 @@ class FMViewPaypal_info extends FMAdminView {
|
|
108 |
if ( $row->fax ) {
|
109 |
?>
|
110 |
<tr>
|
111 |
-
<td class="key"
|
112 |
<td><?php echo $row->fax; ?></td>
|
113 |
</tr>
|
114 |
<?php
|
@@ -118,7 +118,7 @@ class FMViewPaypal_info extends FMAdminView {
|
|
118 |
if ( $row->address ) {
|
119 |
?>
|
120 |
<tr>
|
121 |
-
<td class="key"
|
122 |
<td><?php echo $row->address; ?></td>
|
123 |
</tr>
|
124 |
<?php
|
@@ -128,7 +128,7 @@ class FMViewPaypal_info extends FMAdminView {
|
|
128 |
if ( $row->paypal_info ) {
|
129 |
?>
|
130 |
<tr>
|
131 |
-
<td class="key"
|
132 |
<td><?php echo $row->paypal_info; ?></td>
|
133 |
</tr>
|
134 |
<?php
|
@@ -138,7 +138,7 @@ class FMViewPaypal_info extends FMAdminView {
|
|
138 |
if ( $row->ipn ) {
|
139 |
?>
|
140 |
<tr>
|
141 |
-
<td class="key"
|
142 |
<td><?php echo $row->ipn; ?></td>
|
143 |
</tr>
|
144 |
<?php
|
@@ -148,7 +148,7 @@ class FMViewPaypal_info extends FMAdminView {
|
|
148 |
if ( $row->tax ) {
|
149 |
?>
|
150 |
<tr>
|
151 |
-
<td class="key"
|
152 |
<td><?php echo $row->tax; ?></td>
|
153 |
</tr>
|
154 |
<?php
|
@@ -158,7 +158,7 @@ class FMViewPaypal_info extends FMAdminView {
|
|
158 |
if ( $row->shipping ) {
|
159 |
?>
|
160 |
<tr>
|
161 |
-
<td class="key"
|
162 |
<td><?php echo $row->shipping; ?></td>
|
163 |
</tr>
|
164 |
<?php
|
@@ -168,7 +168,7 @@ class FMViewPaypal_info extends FMAdminView {
|
|
168 |
if ( $row->read ) {
|
169 |
?>
|
170 |
<tr>
|
171 |
-
<td class="key"
|
172 |
<td><?php echo $row->read; ?></td>
|
173 |
</tr>
|
174 |
<?php
|
9 |
*
|
10 |
* @param array $params
|
11 |
*/
|
12 |
+
public function display( $params = array() ) {
|
13 |
$row = $params['row'];
|
14 |
if ( !isset($row->ipn) ) {
|
15 |
?>
|
16 |
<div style="width:100%; text-align: center; height: 70%; vertical-align: middle;">
|
17 |
+
<h1 style="vertical-align: middle; margin: auto; color: #000"><p><?php _e('No information yet', WDFMInstance(self::PLUGIN)->prefix); ?></p></h1>
|
18 |
</div>
|
19 |
<?php
|
20 |
}
|
32 |
width: 140px;
|
33 |
}
|
34 |
</style>
|
35 |
+
<h2><?php _e('Payment Info', WDFMInstance(self::PLUGIN)->prefix); ?></h2>
|
36 |
<table class="admintable">
|
37 |
<?php
|
38 |
if ( $row->currency ) {
|
48 |
if ( $row->ord_last_modified ) {
|
49 |
?>
|
50 |
<tr>
|
51 |
+
<td class="key"><?php _e('Last modified', WDFMInstance(self::PLUGIN)->prefix); ?></td>
|
52 |
<td><?php echo $row->ord_last_modified; ?></td>
|
53 |
</tr>
|
54 |
<?php
|
58 |
if ( $row->status ) {
|
59 |
?>
|
60 |
<tr>
|
61 |
+
<td class="key"><?php _e('Status', WDFMInstance(self::PLUGIN)->prefix); ?></td>
|
62 |
<td><?php echo $row->status; ?></td>
|
63 |
</tr>
|
64 |
<?php
|
68 |
if ( $row->full_name ) {
|
69 |
?>
|
70 |
<tr>
|
71 |
+
<td class="key"><?php _e('Full name', WDFMInstance(self::PLUGIN)->prefix); ?></td>
|
72 |
<td><?php echo $row->full_name; ?></td>
|
73 |
</tr>
|
74 |
<?php
|
78 |
if ( $row->email ) {
|
79 |
?>
|
80 |
<tr>
|
81 |
+
<td class="key"><?php _e('Email', WDFMInstance(self::PLUGIN)->prefix); ?></td>
|
82 |
<td><?php echo $row->email; ?></td>
|
83 |
</tr>
|
84 |
<?php
|
88 |
if ( $row->phone ) {
|
89 |
?>
|
90 |
<tr>
|
91 |
+
<td class="key"><?php _e('Phone', WDFMInstance(self::PLUGIN)->prefix); ?></td>
|
92 |
<td><?php echo $row->phone; ?></td>
|
93 |
</tr>
|
94 |
<?php
|
98 |
if ( $row->mobile_phone ) {
|
99 |
?>
|
100 |
<tr>
|
101 |
+
<td class="key"><?php _e('Mobile phone', WDFMInstance(self::PLUGIN)->prefix); ?></td>
|
102 |
<td><?php echo $row->mobile_phone; ?></td>
|
103 |
</tr>
|
104 |
<?php
|
108 |
if ( $row->fax ) {
|
109 |
?>
|
110 |
<tr>
|
111 |
+
<td class="key"><?php _e('Fax', WDFMInstance(self::PLUGIN)->prefix); ?></td>
|
112 |
<td><?php echo $row->fax; ?></td>
|
113 |
</tr>
|
114 |
<?php
|
118 |
if ( $row->address ) {
|
119 |
?>
|
120 |
<tr>
|
121 |
+
<td class="key"><?php _e('Address', WDFMInstance(self::PLUGIN)->prefix); ?></td>
|
122 |
<td><?php echo $row->address; ?></td>
|
123 |
</tr>
|
124 |
<?php
|
128 |
if ( $row->paypal_info ) {
|
129 |
?>
|
130 |
<tr>
|
131 |
+
<td class="key"><?php _e('Info', WDFMInstance(self::PLUGIN)->prefix); ?></td>
|
132 |
<td><?php echo $row->paypal_info; ?></td>
|
133 |
</tr>
|
134 |
<?php
|
138 |
if ( $row->ipn ) {
|
139 |
?>
|
140 |
<tr>
|
141 |
+
<td class="key"><?php _e('IPN', WDFMInstance(self::PLUGIN)->prefix); ?></td>
|
142 |
<td><?php echo $row->ipn; ?></td>
|
143 |
</tr>
|
144 |
<?php
|
148 |
if ( $row->tax ) {
|
149 |
?>
|
150 |
<tr>
|
151 |
+
<td class="key"><?php _e('Tax', WDFMInstance(self::PLUGIN)->prefix); ?></td>
|
152 |
<td><?php echo $row->tax; ?></td>
|
153 |
</tr>
|
154 |
<?php
|
158 |
if ( $row->shipping ) {
|
159 |
?>
|
160 |
<tr>
|
161 |
+
<td class="key"><?php _e('Shipping', WDFMInstance(self::PLUGIN)->prefix); ?></td>
|
162 |
<td><?php echo $row->shipping; ?></td>
|
163 |
</tr>
|
164 |
<?php
|
168 |
if ( $row->read ) {
|
169 |
?>
|
170 |
<tr>
|
171 |
+
<td class="key"><?php _e('Read', WDFMInstance(self::PLUGIN)->prefix); ?></td>
|
172 |
<td><?php echo $row->read; ?></td>
|
173 |
</tr>
|
174 |
<?php
|
admin/views/FMProductOption.php
CHANGED
@@ -9,7 +9,7 @@ class FMViewProduct_option extends FMAdminView {
|
|
9 |
*
|
10 |
* @param array $params
|
11 |
*/
|
12 |
-
public function display( $params ) {
|
13 |
$field_id = $params['field_id'];
|
14 |
$property_id = $params['property_id'];
|
15 |
$url_for_ajax = $params['url_for_ajax'];
|
9 |
*
|
10 |
* @param array $params
|
11 |
*/
|
12 |
+
public function display( $params = array() ) {
|
13 |
$field_id = $params['field_id'];
|
14 |
$property_id = $params['property_id'];
|
15 |
$url_for_ajax = $params['url_for_ajax'];
|
admin/views/FMSelectDataFromDb.php
CHANGED
@@ -9,7 +9,7 @@ class FMViewSelect_data_from_db_fmc extends FMAdminView_fmc {
|
|
9 |
*
|
10 |
* @param array $params
|
11 |
*/
|
12 |
-
public function display( $params ) {
|
13 |
wp_print_scripts('jquery');
|
14 |
wp_print_styles(WDFMInstance(self::PLUGIN)->handle_prefix . '-style');
|
15 |
wp_print_styles(WDFMInstance(self::PLUGIN)->handle_prefix . '-jquery-ui');
|
@@ -223,7 +223,7 @@ class FMViewSelect_data_from_db_fmc extends FMAdminView_fmc {
|
|
223 |
*
|
224 |
* @param array $params
|
225 |
*/
|
226 |
-
public function db_table_struct_select( $params ) {
|
227 |
$form_id = $params['form_id'];
|
228 |
$field_type = $params['field_type'];
|
229 |
$table_struct = $params['table_struct'];
|
@@ -553,7 +553,7 @@ class FMViewSelect_data_from_db_fmc extends FMAdminView_fmc {
|
|
553 |
*
|
554 |
* @param array $params
|
555 |
*/
|
556 |
-
public function db_tables( $params ) {
|
557 |
$form_id = $params['form_id'];
|
558 |
$field_type = $params['field_type'];
|
559 |
$tables = $params['tables'];
|
9 |
*
|
10 |
* @param array $params
|
11 |
*/
|
12 |
+
public function display( $params = array() ) {
|
13 |
wp_print_scripts('jquery');
|
14 |
wp_print_styles(WDFMInstance(self::PLUGIN)->handle_prefix . '-style');
|
15 |
wp_print_styles(WDFMInstance(self::PLUGIN)->handle_prefix . '-jquery-ui');
|
223 |
*
|
224 |
* @param array $params
|
225 |
*/
|
226 |
+
public function db_table_struct_select( $params = array() ) {
|
227 |
$form_id = $params['form_id'];
|
228 |
$field_type = $params['field_type'];
|
229 |
$table_struct = $params['table_struct'];
|
553 |
*
|
554 |
* @param array $params
|
555 |
*/
|
556 |
+
public function db_tables( $params = array() ) {
|
557 |
$form_id = $params['form_id'];
|
558 |
$field_type = $params['field_type'];
|
559 |
$tables = $params['tables'];
|
admin/views/FMShortocde.php
CHANGED
@@ -31,7 +31,7 @@ class FMViewFMShortocde_fmc extends FMAdminView_fmc {
|
|
31 |
*
|
32 |
* @param array $forms
|
33 |
*/
|
34 |
-
public function
|
35 |
?>
|
36 |
<body class="wp-core-ui" data-width="400" data-height="140">
|
37 |
<div class="wd-table">
|
@@ -67,7 +67,7 @@ class FMViewFMShortocde_fmc extends FMAdminView_fmc {
|
|
67 |
*
|
68 |
* @param array $forms
|
69 |
*/
|
70 |
-
public function submissions( $forms ) {
|
71 |
?>
|
72 |
<body class="wp-core-ui" data-width="520" data-height="570" <?php echo (WDFMInstance(self::PLUGIN)->is_free ? 'style="overflow: hidden;"' : ''); ?>>
|
73 |
<?php
|
31 |
*
|
32 |
* @param array $forms
|
33 |
*/
|
34 |
+
public function forms( $forms = array() ) {
|
35 |
?>
|
36 |
<body class="wp-core-ui" data-width="400" data-height="140">
|
37 |
<div class="wd-table">
|
67 |
*
|
68 |
* @param array $forms
|
69 |
*/
|
70 |
+
public function submissions( $forms = array() ) {
|
71 |
?>
|
72 |
<body class="wp-core-ui" data-width="520" data-height="570" <?php echo (WDFMInstance(self::PLUGIN)->is_free ? 'style="overflow: hidden;"' : ''); ?>>
|
73 |
<?php
|
admin/views/FMShowMatrix.php
CHANGED
@@ -9,7 +9,7 @@ class FMViewShow_matrix_fmc extends FMAdminView_fmc {
|
|
9 |
*
|
10 |
* @param array $params
|
11 |
*/
|
12 |
-
public function display( $params ) {
|
13 |
$matrix_params = ((isset($_GET['matrix_params'])) ? esc_html(stripslashes($_GET['matrix_params'])) : 0);
|
14 |
$new_filename = str_replace("***matrix***", '', $matrix_params);
|
15 |
$new_filename = explode('***', $matrix_params);
|
9 |
*
|
10 |
* @param array $params
|
11 |
*/
|
12 |
+
public function display( $params = array() ) {
|
13 |
$matrix_params = ((isset($_GET['matrix_params'])) ? esc_html(stripslashes($_GET['matrix_params'])) : 0);
|
14 |
$new_filename = str_replace("***matrix***", '', $matrix_params);
|
15 |
$new_filename = explode('***', $matrix_params);
|
admin/views/FMSqlMapping.php
CHANGED
@@ -9,7 +9,12 @@ class FMViewFormMakerSQLMapping_fmc extends FMAdminView_fmc {
|
|
9 |
wp_print_styles('dashicons');
|
10 |
}
|
11 |
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
13 |
$id = $params['id'];
|
14 |
$form_id = $params['form_id'];
|
15 |
$label = $params['label'];
|
@@ -911,7 +916,12 @@ class FMViewFormMakerSQLMapping_fmc extends FMAdminView_fmc {
|
|
911 |
die();
|
912 |
}
|
913 |
|
914 |
-
|
|
|
|
|
|
|
|
|
|
|
915 |
$label = $params['label'];
|
916 |
$form_id = $params['form_id'];
|
917 |
$filter_types = array(
|
@@ -1154,7 +1164,12 @@ class FMViewFormMakerSQLMapping_fmc extends FMAdminView_fmc {
|
|
1154 |
die();
|
1155 |
}
|
1156 |
|
1157 |
-
|
|
|
|
|
|
|
|
|
|
|
1158 |
$tables = $params['tables'];
|
1159 |
$form_id = $params['form_id'];
|
1160 |
?>
|
@@ -1196,7 +1211,12 @@ class FMViewFormMakerSQLMapping_fmc extends FMAdminView_fmc {
|
|
1196 |
die();
|
1197 |
}
|
1198 |
|
1199 |
-
|
|
|
|
|
|
|
|
|
|
|
1200 |
$label = $params['label'];
|
1201 |
$form_id = $params['form_id'];
|
1202 |
$con_method = $params['con_method'];
|
9 |
wp_print_styles('dashicons');
|
10 |
}
|
11 |
|
12 |
+
/**
|
13 |
+
* Edit query.
|
14 |
+
*
|
15 |
+
* @param array $params
|
16 |
+
*/
|
17 |
+
public function edit_query( $params = array() ) {
|
18 |
$id = $params['id'];
|
19 |
$form_id = $params['form_id'];
|
20 |
$label = $params['label'];
|
916 |
die();
|
917 |
}
|
918 |
|
919 |
+
/**
|
920 |
+
* Add query.
|
921 |
+
*
|
922 |
+
* @param array $params
|
923 |
+
*/
|
924 |
+
public function add_query( $params = array() ) {
|
925 |
$label = $params['label'];
|
926 |
$form_id = $params['form_id'];
|
927 |
$filter_types = array(
|
1164 |
die();
|
1165 |
}
|
1166 |
|
1167 |
+
/**
|
1168 |
+
* db tables.
|
1169 |
+
*
|
1170 |
+
* @param array $params
|
1171 |
+
*/
|
1172 |
+
public function db_tables( $params = array() ) {
|
1173 |
$tables = $params['tables'];
|
1174 |
$form_id = $params['form_id'];
|
1175 |
?>
|
1211 |
die();
|
1212 |
}
|
1213 |
|
1214 |
+
/**
|
1215 |
+
* db table struct.
|
1216 |
+
*
|
1217 |
+
* @param array $params
|
1218 |
+
*/
|
1219 |
+
public function db_table_struct( $params = array() ) {
|
1220 |
$label = $params['label'];
|
1221 |
$form_id = $params['form_id'];
|
1222 |
$con_method = $params['con_method'];
|
admin/views/FormMakerSubmits.php
CHANGED
@@ -4,7 +4,12 @@
|
|
4 |
* Class FMViewFormMakerSubmits_fmc
|
5 |
*/
|
6 |
class FMViewFormMakerSubmits_fmc extends FMAdminView_fmc {
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
8 |
if ( isset($_GET['form_id']) && isset($_GET['group_id']) ) {
|
9 |
$rows = $params['rows'];
|
10 |
$labels_id = $params['labels_id'];
|
4 |
* Class FMViewFormMakerSubmits_fmc
|
5 |
*/
|
6 |
class FMViewFormMakerSubmits_fmc extends FMAdminView_fmc {
|
7 |
+
/**
|
8 |
+
* Display.
|
9 |
+
*
|
10 |
+
* @param array $params
|
11 |
+
*/
|
12 |
+
public function display( $params = array() ) {
|
13 |
if ( isset($_GET['form_id']) && isset($_GET['group_id']) ) {
|
14 |
$rows = $params['rows'];
|
15 |
$labels_id = $params['labels_id'];
|
admin/views/Manage_fm.php
CHANGED
@@ -22,8 +22,10 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
22 |
|
23 |
/**
|
24 |
* Display page.
|
|
|
|
|
25 |
*/
|
26 |
-
public function display($params) {
|
27 |
$this->import_popup_div();
|
28 |
ob_start();
|
29 |
echo $this->body($params);
|
@@ -39,9 +41,10 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
39 |
/**
|
40 |
* Generate page body.
|
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'];
|
@@ -73,7 +76,6 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
73 |
echo $this->pagination($page_url, $total, $items_per_page);
|
74 |
?>
|
75 |
</div>
|
76 |
-
|
77 |
<table class="adminlist table table-striped wp-list-table widefat fixed pages">
|
78 |
<thead>
|
79 |
<tr>
|
@@ -187,10 +189,10 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
187 |
?>
|
188 |
</td>
|
189 |
<td data-colname="<?php _e('Shortcode', WDFMInstance(self::PLUGIN)->prefix); ?>">
|
190 |
-
<input type="text" value='<?php echo (WDFMInstance(self::PLUGIN)->is_free == 2 ? '[wd_contact_form id="' . $row_data->id . '"]' : '[Form id="' . $row_data->id . '"]'); ?>' onclick="fm_select_value(this)" size="12" readonly="readonly" />
|
191 |
</td>
|
192 |
<td data-colname="<?php _e('PHP function', WDFMInstance(self::PLUGIN)->prefix); ?>">
|
193 |
-
<input type="text" value='<?php echo (WDFMInstance(self::PLUGIN)->is_free == 2 ? '<?php wd_contact_form_maker(' . $row_data->id . ', "' . $row_data->type . '"); ?>' : '<?php wd_form_maker(' . $row_data->id . ', "' . $row_data->type . '"); ?>'); ?>' onclick="fm_select_value(this)" readonly="readonly" />
|
194 |
</td>
|
195 |
</tr>
|
196 |
<?php
|
@@ -216,7 +218,12 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
216 |
return $list;
|
217 |
}
|
218 |
|
219 |
-
|
|
|
|
|
|
|
|
|
|
|
220 |
// TODO: Change this function to standard.
|
221 |
echo $this->topbar();
|
222 |
|
@@ -512,7 +519,13 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
512 |
<?php
|
513 |
}
|
514 |
|
515 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
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(
|
@@ -683,8 +696,13 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
683 |
<?php
|
684 |
return ob_get_clean();
|
685 |
}
|
686 |
-
|
687 |
-
|
|
|
|
|
|
|
|
|
|
|
688 |
wp_enqueue_style('thickbox');
|
689 |
wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-phone_field_css');
|
690 |
wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-jquery-ui');
|
@@ -739,10 +757,9 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
739 |
* Generate page body form options.
|
740 |
*
|
741 |
* @param array $params
|
742 |
-
*
|
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'];
|
@@ -818,6 +835,9 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
818 |
<li>
|
819 |
<a id="mapping" class="fm_fieldset_tab" onclick="form_maker_options_tabs('mapping')" href="#"><?php _e('MySQL Mapping', WDFMInstance(self::PLUGIN)->prefix); ?></a>
|
820 |
</li>
|
|
|
|
|
|
|
821 |
<?php
|
822 |
if ( !empty($addons['tabs']) ) {
|
823 |
foreach ( $addons['tabs'] as $addon => $name ) {
|
@@ -877,7 +897,7 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
877 |
WDFMInstance(self::PLUGIN)->nonce => wp_create_nonce(WDFMInstance(self::PLUGIN)->nonce)
|
878 |
), admin_url('admin.php?page=themes' . WDFMInstance(self::PLUGIN)->menu_postfix . '&task=edit')); ?>'); return false;"><?php _e('Edit', WDFMInstance(self::PLUGIN)->prefix); ?></a>
|
879 |
<div id="old_theme_notice" class="error inline" style="display: none;"><p><?php _e('The theme you have selected is outdated. Please choose one from New Themes section.', WDFMInstance(self::PLUGIN)->prefix); ?></p></div>
|
880 |
-
|
881 |
|
882 |
</span>
|
883 |
<span class="wd-group">
|
@@ -996,24 +1016,9 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
996 |
</div>
|
997 |
<div class="wd-box-content">
|
998 |
<div class="wd-group wd-has-placeholder">
|
999 |
-
<label class="wd-label" for="
|
1000 |
-
<input type="text" id="
|
1001 |
-
<
|
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);
|
1006 |
-
foreach ( $mail_array as $mail ) {
|
1007 |
-
if ( $mail && $mail != ',' ) {
|
1008 |
-
?>
|
1009 |
-
<p class="fm_mail_input">
|
1010 |
-
<span class="mail_name"><?php echo $mail; ?></span><span class="dashicons dashicons-trash" onclick="fm_delete_mail(this, '<?php echo $mail; ?>')" title="<?php _e('Delete Email', WDFMInstance(self::PLUGIN)->prefix); ?>"></span>
|
1011 |
-
</p>
|
1012 |
-
<?php
|
1013 |
-
}
|
1014 |
-
}
|
1015 |
-
?>
|
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.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
|
1018 |
</div>
|
1019 |
<div class="wd-group wd-has-placeholder">
|
@@ -1863,10 +1868,36 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
1863 |
</div>
|
1864 |
</div>
|
1865 |
</div>
|
1866 |
-
|
1867 |
}
|
1868 |
-
|
1869 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1870 |
<?php
|
1871 |
if ( !empty ($addons['html']) ){
|
1872 |
foreach($addons['html'] as $addon => $html) {
|
@@ -1889,7 +1920,13 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
1889 |
<?php
|
1890 |
}
|
1891 |
|
1892 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
1893 |
ob_start();
|
1894 |
?>
|
1895 |
<div id="placeholders_overlay"></div>
|
@@ -1947,7 +1984,7 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
1947 |
* @param array $params
|
1948 |
*
|
1949 |
*/
|
1950 |
-
public function form_layout( $params ) {
|
1951 |
wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-codemirror');
|
1952 |
wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-colorpicker');
|
1953 |
|
@@ -2013,7 +2050,7 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
2013 |
* @param array $params
|
2014 |
* @return string Body html.
|
2015 |
*/
|
2016 |
-
private function body_form_layout( $params ) {
|
2017 |
$id = $params['id'];
|
2018 |
$row = $params['row'];
|
2019 |
$ids = $params['ids'];
|
@@ -2063,12 +2100,17 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
2063 |
<?php
|
2064 |
}
|
2065 |
|
2066 |
-
|
2067 |
-
|
|
|
|
|
|
|
|
|
2068 |
$id = $params['id'];
|
2069 |
-
$
|
2070 |
$page = $params['page'];
|
2071 |
$page_url = $params['page_url'];
|
|
|
2072 |
|
2073 |
if($fieldset_id != "embedded") $row->type = $fieldset_id;
|
2074 |
|
@@ -2084,13 +2126,18 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
2084 |
'action' => add_query_arg( array('page' => $page, 'current_id' => $id ), $page_url),
|
2085 |
);
|
2086 |
echo $this->form(ob_get_clean(), $form_attr);
|
2087 |
-
|
2088 |
-
|
2089 |
}
|
2090 |
|
2091 |
-
|
|
|
|
|
|
|
|
|
|
|
2092 |
$row = $params['row'];
|
2093 |
$page_title = $params['page_title'];
|
|
|
|
|
2094 |
$animation_effects = $params['animation_effects'];
|
2095 |
$back_url = $params['back_url'];
|
2096 |
|
@@ -2121,39 +2168,38 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
2121 |
<div class="fm-clear"></div>
|
2122 |
<div class="display-options-container">
|
2123 |
<div id="type_settings_fieldset" class="adminform">
|
2124 |
-
|
2125 |
<div class="wd-table">
|
2126 |
<div class="wd-table-col-70 wd-table-col-left">
|
2127 |
<div class="wd-box-section">
|
2128 |
<div class="wd-box-content">
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
2137 |
-
|
2138 |
-
|
2139 |
-
|
2140 |
-
|
2141 |
-
|
2142 |
-
|
2143 |
-
|
2144 |
-
|
2145 |
-
|
2146 |
-
|
2147 |
-
|
2148 |
-
|
2149 |
-
|
2150 |
-
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
|
2157 |
</div>
|
2158 |
</div>
|
2159 |
</div>
|
@@ -2167,7 +2213,7 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
2167 |
<label class="wd-label"><?php _e('Form Placement', WDFMInstance(self::PLUGIN)->prefix); ?></label>
|
2168 |
<div id="fm-embedded-element">
|
2169 |
<p><?php _e('Use', WDFMInstance(self::PLUGIN)->prefix); ?></p>
|
2170 |
-
<input type="text" value='<?php echo (WDFMInstance(self::PLUGIN)->is_free == 2 ? '[wd_contact_form id="' . $row->form_id . '"]' : '[Form id="' . $row->form_id . '"]'); ?>' onclick="fm_select_value(this)" readonly="readonly" style="width:
|
2171 |
<p><?php _e('shortcode to display the form.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
|
2172 |
</div>
|
2173 |
</span>
|
@@ -2296,25 +2342,16 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
2296 |
</span>
|
2297 |
<span class="wd-group fm-popover fm-topbar fm-scrollbox <?php echo $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
|
2298 |
<label class="wd-label"><?php _e('Display on', WDFMInstance(self::PLUGIN)->prefix); ?></label>
|
2299 |
-
<ul class="pp_display pp_display_on"
|
2300 |
-
|
2301 |
-
$stat_types = array('everything' => 'All', 'home' => 'Homepage', 'archive' => 'Archives');
|
2302 |
-
|
2303 |
$def_post_types = array('post' => 'Post', 'page' => 'Page');
|
2304 |
-
$custom_post_types = get_post_types( array(
|
2305 |
-
'public' => true,
|
2306 |
-
'_builtin' => false,
|
2307 |
-
) );
|
2308 |
-
|
2309 |
-
$post_types = array_merge($def_post_types, $custom_post_types);
|
2310 |
-
$all_types = $stat_types + $post_types;
|
2311 |
$selected_types = explode(',', $row->display_on);
|
2312 |
$show_cats = in_array('post', $selected_types);
|
2313 |
$m = 0;
|
2314 |
-
foreach($
|
2315 |
$checked = in_array('everything', $selected_types) || in_array($post_key, $selected_types) ? 'checked="checked"' : '';
|
2316 |
$postclass = $post_key != 'page' && in_array($post_key, array_keys($def_post_types)) ? 'class="catpost"' : '';
|
2317 |
-
echo '<li><input id="pt'
|
2318 |
$m++;
|
2319 |
}
|
2320 |
?>
|
@@ -2329,7 +2366,6 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
2329 |
$m = 0;
|
2330 |
foreach($categories as $cat_key => $category){
|
2331 |
$checked = ((!$row->current_categories && !$row->display_on_categories) || in_array($cat_key, $selected_categories) || (in_array('auto_check_new', $selected_categories) && !in_array($cat_key, $current_categories_array))) ? 'checked="checked"' : '';
|
2332 |
-
|
2333 |
echo '<li><input id="cat'.$m.'" type="checkbox" name="display_on_categories[]" value="'.$cat_key.'" '.$checked.'/><label for="cat'.$m.'">'.$category.'</label></li>';
|
2334 |
$m++;
|
2335 |
}
|
@@ -2348,7 +2384,9 @@ class FMViewManage_fmc extends FMAdminView_fmc {
|
|
2348 |
</div>
|
2349 |
<p><?php _e('Posts defined below will override all settings above.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
|
2350 |
<ul class="fm-pp">
|
2351 |
-
<li class="pp_selected"
|
|
|
|
|
2352 |
$posts_include = explode(',', $row->posts_include);
|
2353 |
foreach($posts_include as $post_exclude){
|
2354 |
if(isset($posts_and_pages[$post_exclude])){
|
22 |
|
23 |
/**
|
24 |
* Display page.
|
25 |
+
*
|
26 |
+
* @param array $params
|
27 |
*/
|
28 |
+
public function display( $params = array() ) {
|
29 |
$this->import_popup_div();
|
30 |
ob_start();
|
31 |
echo $this->body($params);
|
41 |
/**
|
42 |
* Generate page body.
|
43 |
*
|
44 |
+
* @param array $params
|
45 |
* @return string Body html.
|
46 |
*/
|
47 |
+
public function body( $params = array() ) {
|
48 |
$page = $params['page'];
|
49 |
$actions = $params['actions'];
|
50 |
$form_preview_link = $params['form_preview_link'];
|
76 |
echo $this->pagination($page_url, $total, $items_per_page);
|
77 |
?>
|
78 |
</div>
|
|
|
79 |
<table class="adminlist table table-striped wp-list-table widefat fixed pages">
|
80 |
<thead>
|
81 |
<tr>
|
189 |
?>
|
190 |
</td>
|
191 |
<td data-colname="<?php _e('Shortcode', WDFMInstance(self::PLUGIN)->prefix); ?>">
|
192 |
+
<input type="text" value='<?php echo (WDFMInstance(self::PLUGIN)->is_free == 2 ? '[wd_contact_form id="' . $row_data->id . '"]' : '[Form id="' . $row_data->id . '"]'); ?>' onclick="fm_select_value(this)" size="12" readonly="readonly" class="fm_shortcode" />
|
193 |
</td>
|
194 |
<td data-colname="<?php _e('PHP function', WDFMInstance(self::PLUGIN)->prefix); ?>">
|
195 |
+
<input type="text" value='<?php echo (WDFMInstance(self::PLUGIN)->is_free == 2 ? '<?php wd_contact_form_maker(' . $row_data->id . ', "' . $row_data->type . '"); ?>' : '<?php wd_form_maker(' . $row_data->id . ', "' . $row_data->type . '"); ?>'); ?>' onclick="fm_select_value(this)" readonly="readonly" class="fm_php_function" />
|
196 |
</td>
|
197 |
</tr>
|
198 |
<?php
|
218 |
return $list;
|
219 |
}
|
220 |
|
221 |
+
/**
|
222 |
+
* Edit.
|
223 |
+
*
|
224 |
+
* @param array $params
|
225 |
+
*/
|
226 |
+
public function edit( $params = array() ) {
|
227 |
// TODO: Change this function to standard.
|
228 |
echo $this->topbar();
|
229 |
|
519 |
<?php
|
520 |
}
|
521 |
|
522 |
+
/**
|
523 |
+
* add fields.
|
524 |
+
*
|
525 |
+
* @param array $params
|
526 |
+
* @return string
|
527 |
+
*/
|
528 |
+
public function add_fields( $params = array() ) {
|
529 |
$pro_fields1 = array('file_upload', 'map', 'paypal');
|
530 |
$pro_fields2 = array('file_upload', 'paypal', 'checkbox', 'radio', 'survey', 'time_and_date', 'select');
|
531 |
$fields = array(
|
696 |
<?php
|
697 |
return ob_get_clean();
|
698 |
}
|
699 |
+
|
700 |
+
/**
|
701 |
+
* Form options.
|
702 |
+
*
|
703 |
+
* @param array $params
|
704 |
+
*/
|
705 |
+
public function form_options( $params = array() ) {
|
706 |
wp_enqueue_style('thickbox');
|
707 |
wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-phone_field_css');
|
708 |
wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-jquery-ui');
|
757 |
* Generate page body form options.
|
758 |
*
|
759 |
* @param array $params
|
|
|
760 |
* @return string Body html.
|
761 |
*/
|
762 |
+
private function body_form_options( $params = array() ) {
|
763 |
$id = $params['id'];
|
764 |
$page = $params['page'];
|
765 |
$page_title = $params['page_title'];
|
835 |
<li>
|
836 |
<a id="mapping" class="fm_fieldset_tab" onclick="form_maker_options_tabs('mapping')" href="#"><?php _e('MySQL Mapping', WDFMInstance(self::PLUGIN)->prefix); ?></a>
|
837 |
</li>
|
838 |
+
<li>
|
839 |
+
<a id="privacy" class="fm_fieldset_tab" onclick="form_maker_options_tabs('privacy')" href="#"><?php _e('Privacy', WDFMInstance(self::PLUGIN)->prefix); ?></a>
|
840 |
+
</li>
|
841 |
<?php
|
842 |
if ( !empty($addons['tabs']) ) {
|
843 |
foreach ( $addons['tabs'] as $addon => $name ) {
|
897 |
WDFMInstance(self::PLUGIN)->nonce => wp_create_nonce(WDFMInstance(self::PLUGIN)->nonce)
|
898 |
), admin_url('admin.php?page=themes' . WDFMInstance(self::PLUGIN)->menu_postfix . '&task=edit')); ?>'); return false;"><?php _e('Edit', WDFMInstance(self::PLUGIN)->prefix); ?></a>
|
899 |
<div id="old_theme_notice" class="error inline" style="display: none;"><p><?php _e('The theme you have selected is outdated. Please choose one from New Themes section.', WDFMInstance(self::PLUGIN)->prefix); ?></p></div>
|
900 |
+
<p class="description"><?php _e('The appearance of your forms is controlled by the theme you select with this option. Press Edit button to open and modify your form theme.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
|
901 |
|
902 |
</span>
|
903 |
<span class="wd-group">
|
1016 |
</div>
|
1017 |
<div class="wd-box-content">
|
1018 |
<div class="wd-group wd-has-placeholder">
|
1019 |
+
<label class="wd-label" for="mail"><?php _e('Email to send submissions to', WDFMInstance(self::PLUGIN)->prefix); ?></label>
|
1020 |
+
<input type="text" id="mail" name="mail" value="<?php echo $row->mail; ?>" />
|
1021 |
+
<span class="dashicons dashicons-list-view" data-id="mail"></span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1022 |
<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.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
|
1023 |
</div>
|
1024 |
<div class="wd-group wd-has-placeholder">
|
1868 |
</div>
|
1869 |
</div>
|
1870 |
</div>
|
1871 |
+
<?php
|
1872 |
}
|
1873 |
+
?>
|
1874 |
+
</div>
|
1875 |
+
<div id="privacy_fieldset" class="adminform fm_fieldset_deactive">
|
1876 |
+
<div class="wd-table">
|
1877 |
+
<div class="wd-table-col-70">
|
1878 |
+
<div class="wd-box-section">
|
1879 |
+
<div class="wd-box-content">
|
1880 |
+
<div class="wd-group">
|
1881 |
+
<label class="wd-label"><?php _e('Save User IP Address to Database', WDFMInstance(self::PLUGIN)->prefix); ?></label>
|
1882 |
+
<input type="radio" name="save_ip" <?php echo $row->save_ip == 1 ? 'checked="checked"' : '' ?> id="fm_go-save_ip-1" class="wd-radio" value="1">
|
1883 |
+
<label class="wd-label-radio" for="fm_go-save_ip-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
|
1884 |
+
<input type="radio" name="save_ip" <?php echo $row->save_ip == 0 ? 'checked="checked"' : '' ?> id="fm_go-save_ip-0" class="wd-radio" value="0">
|
1885 |
+
<label class="wd-label-radio" for="fm_go-save_ip-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
|
1886 |
+
<p class="description"><?php _e('Use this setting to disable storing submitter IP address to the database of your website.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
|
1887 |
+
</div>
|
1888 |
+
<div class="wd-group">
|
1889 |
+
<label class="wd-label"><?php _e('Save User Data to Database', WDFMInstance(self::PLUGIN)->prefix); ?></label>
|
1890 |
+
<input type="radio" name="save_user_id" <?php echo $row->save_user_id == 1 ? 'checked="checked"' : '' ?> id="fm_go-save_user_id-1" class="wd-radio" value="1">
|
1891 |
+
<label class="wd-label-radio" for="fm_go-save_user_id-1"><?php _e('Yes', WDFMInstance(self::PLUGIN)->prefix); ?></label>
|
1892 |
+
<input type="radio" name="save_user_id" <?php echo $row->save_user_id == 0 ? 'checked="checked"' : '' ?> id="fm_go-save_user_id-0" class="wd-radio" value="0">
|
1893 |
+
<label class="wd-label-radio" for="fm_go-save_user_id-0"><?php _e('No', WDFMInstance(self::PLUGIN)->prefix); ?></label>
|
1894 |
+
<p class="description"><?php _e('Disable this option to stop saving logged in username and email address to the database of your website.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
|
1895 |
+
</div>
|
1896 |
+
</div>
|
1897 |
+
</div>
|
1898 |
+
</div>
|
1899 |
+
</div>
|
1900 |
+
</div>
|
1901 |
<?php
|
1902 |
if ( !empty ($addons['html']) ){
|
1903 |
foreach($addons['html'] as $addon => $html) {
|
1920 |
<?php
|
1921 |
}
|
1922 |
|
1923 |
+
/**
|
1924 |
+
* Placeholders popup.
|
1925 |
+
*
|
1926 |
+
* @param array $placeholders
|
1927 |
+
* @return string
|
1928 |
+
*/
|
1929 |
+
public function placeholders_popup( $placeholders = array() ) {
|
1930 |
ob_start();
|
1931 |
?>
|
1932 |
<div id="placeholders_overlay"></div>
|
1984 |
* @param array $params
|
1985 |
*
|
1986 |
*/
|
1987 |
+
public function form_layout( $params = array() ) {
|
1988 |
wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-codemirror');
|
1989 |
wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-colorpicker');
|
1990 |
|
2050 |
* @param array $params
|
2051 |
* @return string Body html.
|
2052 |
*/
|
2053 |
+
private function body_form_layout( $params = array() ) {
|
2054 |
$id = $params['id'];
|
2055 |
$row = $params['row'];
|
2056 |
$ids = $params['ids'];
|
2100 |
<?php
|
2101 |
}
|
2102 |
|
2103 |
+
/**
|
2104 |
+
* Display options.
|
2105 |
+
*
|
2106 |
+
* @param array $params
|
2107 |
+
*/
|
2108 |
+
public function display_options( $params = array() ) {
|
2109 |
$id = $params['id'];
|
2110 |
+
$row = $params['row'];
|
2111 |
$page = $params['page'];
|
2112 |
$page_url = $params['page_url'];
|
2113 |
+
$fieldset_id = $params['fieldset_id'];
|
2114 |
|
2115 |
if($fieldset_id != "embedded") $row->type = $fieldset_id;
|
2116 |
|
2126 |
'action' => add_query_arg( array('page' => $page, 'current_id' => $id ), $page_url),
|
2127 |
);
|
2128 |
echo $this->form(ob_get_clean(), $form_attr);
|
|
|
|
|
2129 |
}
|
2130 |
|
2131 |
+
/**
|
2132 |
+
* Body display options.
|
2133 |
+
*
|
2134 |
+
* @param array $params
|
2135 |
+
*/
|
2136 |
+
public function body_display_options( $params = array() ) {
|
2137 |
$row = $params['row'];
|
2138 |
$page_title = $params['page_title'];
|
2139 |
+
$posts_and_pages = $params['posts_and_pages'];
|
2140 |
+
$all_display_posts = $params['all_display_posts'];
|
2141 |
$animation_effects = $params['animation_effects'];
|
2142 |
$back_url = $params['back_url'];
|
2143 |
|
2168 |
<div class="fm-clear"></div>
|
2169 |
<div class="display-options-container">
|
2170 |
<div id="type_settings_fieldset" class="adminform">
|
|
|
2171 |
<div class="wd-table">
|
2172 |
<div class="wd-table-col-70 wd-table-col-left">
|
2173 |
<div class="wd-box-section">
|
2174 |
<div class="wd-box-content">
|
2175 |
+
<span>
|
2176 |
+
<div class="fm-row fm-form-types">
|
2177 |
+
<label class="wd-label"><?php _e('Form Type', WDFMInstance(self::PLUGIN)->prefix); ?></label>
|
2178 |
+
<label>
|
2179 |
+
<input type="radio" name="form_type" value="embedded" onclick="change_form_type('embedded'); change_hide_show('fm-embedded');"
|
2180 |
+
<?php echo $row->type == 'embedded' ? 'checked="checked"' : '' ?>>
|
2181 |
+
<span class="fm-embedded <?php echo $row->type == 'embedded' ? ' active' : '' ?>"></span>
|
2182 |
+
<p><?php _e('Embedded', WDFMInstance(self::PLUGIN)->prefix); ?></p>
|
2183 |
+
</label>
|
2184 |
+
<label>
|
2185 |
+
<input type="radio" name="form_type" value="popover" onclick="change_form_type('popover'); change_hide_show('fm-popover');"
|
2186 |
+
<?php echo $row->type == 'popover' ? 'checked="checked"' : '' ?>>
|
2187 |
+
<span class="fm-popover <?php echo $row->type == 'popover' ? ' active' : '' ?>"></span>
|
2188 |
+
<p><?php _e('Popup', WDFMInstance(self::PLUGIN)->prefix); ?></p>
|
2189 |
+
</label>
|
2190 |
+
<label>
|
2191 |
+
<input type="radio" name="form_type" value="topbar" onclick="change_form_type('topbar'); change_hide_show('fm-topbar');"
|
2192 |
+
<?php echo $row->type == 'topbar' ? 'checked="checked"' : '' ?>>
|
2193 |
+
<span class="fm-topbar <?php echo $row->type == 'topbar' ? ' active' : '' ?>"></span>
|
2194 |
+
<p><?php _e('Topbar', WDFMInstance(self::PLUGIN)->prefix); ?></p>
|
2195 |
+
</label>
|
2196 |
+
<label>
|
2197 |
+
<input type="radio" name="form_type" value="scrollbox" onclick="change_form_type('scrollbox'); change_hide_show('fm-scrollbox');"<?php echo $row->type == 'scrollbox' ? 'checked="checked"' : '' ?>>
|
2198 |
+
<span class="fm-scrollbox <?php echo $row->type == 'scrollbox' ? ' active' : '' ?>"></span>
|
2199 |
+
<p><?php _e('Scrollbox', WDFMInstance(self::PLUGIN)->prefix); ?></p>
|
2200 |
+
</label>
|
2201 |
+
</div>
|
2202 |
+
</span>
|
2203 |
</div>
|
2204 |
</div>
|
2205 |
</div>
|
2213 |
<label class="wd-label"><?php _e('Form Placement', WDFMInstance(self::PLUGIN)->prefix); ?></label>
|
2214 |
<div id="fm-embedded-element">
|
2215 |
<p><?php _e('Use', WDFMInstance(self::PLUGIN)->prefix); ?></p>
|
2216 |
+
<input type="text" value='<?php echo (WDFMInstance(self::PLUGIN)->is_free == 2 ? '[wd_contact_form id="' . $row->form_id . '"]' : '[Form id="' . $row->form_id . '"]'); ?>' onclick="fm_select_value(this)" readonly="readonly" style="width:190px !important;"/>
|
2217 |
<p><?php _e('shortcode to display the form.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
|
2218 |
</div>
|
2219 |
</span>
|
2342 |
</span>
|
2343 |
<span class="wd-group fm-popover fm-topbar fm-scrollbox <?php echo $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
|
2344 |
<label class="wd-label"><?php _e('Display on', WDFMInstance(self::PLUGIN)->prefix); ?></label>
|
2345 |
+
<ul class="pp_display pp_display_on">
|
2346 |
+
<?php
|
|
|
|
|
2347 |
$def_post_types = array('post' => 'Post', 'page' => 'Page');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2348 |
$selected_types = explode(',', $row->display_on);
|
2349 |
$show_cats = in_array('post', $selected_types);
|
2350 |
$m = 0;
|
2351 |
+
foreach($all_display_posts as $post_key => $post_type){
|
2352 |
$checked = in_array('everything', $selected_types) || in_array($post_key, $selected_types) ? 'checked="checked"' : '';
|
2353 |
$postclass = $post_key != 'page' && in_array($post_key, array_keys($def_post_types)) ? 'class="catpost"' : '';
|
2354 |
+
echo '<li><input id="pt' . $m . '" type="checkbox" name="display_on[]" value="' . $post_key . '" ' . $checked . ' ' . $postclass . '/><label for="pt'.$m.'">'.$post_type.'</label></li>';
|
2355 |
$m++;
|
2356 |
}
|
2357 |
?>
|
2366 |
$m = 0;
|
2367 |
foreach($categories as $cat_key => $category){
|
2368 |
$checked = ((!$row->current_categories && !$row->display_on_categories) || in_array($cat_key, $selected_categories) || (in_array('auto_check_new', $selected_categories) && !in_array($cat_key, $current_categories_array))) ? 'checked="checked"' : '';
|
|
|
2369 |
echo '<li><input id="cat'.$m.'" type="checkbox" name="display_on_categories[]" value="'.$cat_key.'" '.$checked.'/><label for="cat'.$m.'">'.$category.'</label></li>';
|
2370 |
$m++;
|
2371 |
}
|
2384 |
</div>
|
2385 |
<p><?php _e('Posts defined below will override all settings above.', WDFMInstance(self::PLUGIN)->prefix); ?></p>
|
2386 |
<ul class="fm-pp">
|
2387 |
+
<li class="pp_selected">
|
2388 |
+
<?php
|
2389 |
+
if($row->posts_include){
|
2390 |
$posts_include = explode(',', $row->posts_include);
|
2391 |
foreach($posts_include as $post_exclude){
|
2392 |
if(isset($posts_and_pages[$post_exclude])){
|
admin/views/Options_fm.php
CHANGED
@@ -16,8 +16,10 @@ class FMViewOptions_fmc extends FMAdminView_fmc {
|
|
16 |
|
17 |
/**
|
18 |
* Display page.
|
|
|
|
|
19 |
*/
|
20 |
-
public function display($params) {
|
21 |
ob_start();
|
22 |
echo $this->title(array(
|
23 |
'title' => __('Options', WDFMInstance(self::PLUGIN)->prefix),
|
@@ -42,7 +44,13 @@ class FMViewOptions_fmc extends FMAdminView_fmc {
|
|
42 |
echo $this->form(ob_get_clean(), $form_attr);
|
43 |
}
|
44 |
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
$public_key = isset($fm_settings['public_key']) ? $fm_settings['public_key'] : '';
|
47 |
$private_key = isset($fm_settings['private_key']) ? $fm_settings['private_key'] : '';
|
48 |
$csv_delimiter = isset($fm_settings['csv_delimiter']) ? $fm_settings['csv_delimiter'] : ',';
|
16 |
|
17 |
/**
|
18 |
* Display page.
|
19 |
+
*
|
20 |
+
* @param array $params
|
21 |
*/
|
22 |
+
public function display( $params = array() ) {
|
23 |
ob_start();
|
24 |
echo $this->title(array(
|
25 |
'title' => __('Options', WDFMInstance(self::PLUGIN)->prefix),
|
44 |
echo $this->form(ob_get_clean(), $form_attr);
|
45 |
}
|
46 |
|
47 |
+
/**
|
48 |
+
* Generate page body.
|
49 |
+
*
|
50 |
+
* @param array $fm_settings
|
51 |
+
* @return string Body html.
|
52 |
+
*/
|
53 |
+
public function body( $fm_settings = array() ) {
|
54 |
$public_key = isset($fm_settings['public_key']) ? $fm_settings['public_key'] : '';
|
55 |
$private_key = isset($fm_settings['private_key']) ? $fm_settings['private_key'] : '';
|
56 |
$csv_delimiter = isset($fm_settings['csv_delimiter']) ? $fm_settings['csv_delimiter'] : ',';
|
admin/views/Pricing_fm.php
CHANGED
@@ -13,7 +13,12 @@ class FMViewPricing_fmc extends FMAdminView_fmc {
|
|
13 |
wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-admin');
|
14 |
}
|
15 |
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
17 |
$page = $params['page'];
|
18 |
$page_url = $params['page_url'];
|
19 |
ob_start();
|
@@ -165,7 +170,7 @@ class FMViewPricing_fmc extends FMAdminView_fmc {
|
|
165 |
</div>
|
166 |
<div class="fm-prices-more">
|
167 |
<div>
|
168 |
-
<?php _e('Learn more about Form Maker plugin.', WDFMInstance(self::PLUGIN)->prefix); ?> <a href="https://web-dorado.com/files/
|
169 |
</div>
|
170 |
</div>
|
171 |
</div>
|
13 |
wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-admin');
|
14 |
}
|
15 |
|
16 |
+
/**
|
17 |
+
* Display page.
|
18 |
+
*
|
19 |
+
* @param array $params
|
20 |
+
*/
|
21 |
+
public function display ( $params = array() ) {
|
22 |
$page = $params['page'];
|
23 |
$page_url = $params['page_url'];
|
24 |
ob_start();
|
170 |
</div>
|
171 |
<div class="fm-prices-more">
|
172 |
<div>
|
173 |
+
<?php _e('Learn more about Form Maker plugin.', WDFMInstance(self::PLUGIN)->prefix); ?> <a href="https://web-dorado.com/files/fromContactForm.php" target="_blank"><?php _e('Learn More', WDFMInstance(self::PLUGIN)->prefix); ?></a>
|
174 |
</div>
|
175 |
</div>
|
176 |
</div>
|
admin/views/Submissions_fm.php
CHANGED
@@ -5,7 +5,7 @@
|
|
5 |
class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
6 |
private $model;
|
7 |
|
8 |
-
public function __construct( $model ) {
|
9 |
$this->model = $model;
|
10 |
wp_enqueue_style('thickbox');
|
11 |
wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-tables');
|
@@ -37,14 +37,15 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
37 |
|
38 |
/**
|
39 |
* Forms page.
|
|
|
40 |
* @param $params
|
41 |
*/
|
42 |
-
public function forms( $params ) {
|
43 |
// TODO: Change this function to standard.
|
44 |
echo $this->topbar();
|
45 |
|
46 |
-
$id
|
47 |
-
$page
|
48 |
$page_title = $params['page_title'];
|
49 |
$page_url = $params['page_url'];
|
50 |
$forms = $params['forms'];
|
@@ -68,7 +69,7 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
68 |
<table class="wp-list-table widefat fixed striped posts">
|
69 |
<body id="the-list">
|
70 |
<tr class="no-items">
|
71 |
-
<td class="colspanchange" colspan="0"><?php _e('Please select a form to view submissions', WDFMInstance(self::PLUGIN)->prefix); ?></td>
|
72 |
</tr>
|
73 |
</body>
|
74 |
</table>
|
@@ -76,14 +77,18 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
76 |
echo '</div>';
|
77 |
}
|
78 |
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
|
|
|
|
83 |
$id = $params['id'];
|
84 |
$page = $params['page'];
|
85 |
$page_url = $params['page_url'];
|
86 |
ob_start();
|
|
|
|
|
87 |
echo $this->body($params);
|
88 |
|
89 |
// Pass the content to form.
|
@@ -91,7 +96,7 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
91 |
// 'id' => WDFMInstance(self::PLUGIN)->prefix . '_submissions',
|
92 |
'id' => 'admin_form',
|
93 |
'name' => WDFMInstance(self::PLUGIN)->prefix . '_submissions',
|
94 |
-
'class' => WDFMInstance(self::PLUGIN)->prefix . '_submissions wd-form',
|
95 |
'action' => add_query_arg( array('page' => $page, 'task' => 'display', 'current_id' => $id ), $page_url),
|
96 |
);
|
97 |
echo $this->form(ob_get_clean(), $form_attr);
|
@@ -100,9 +105,10 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
100 |
/**
|
101 |
* Generate page body.
|
102 |
*
|
|
|
103 |
* @return string Body html.
|
104 |
*/
|
105 |
-
public function body( $params ) {
|
106 |
global $wpdb;
|
107 |
$form_id = $params['id'];
|
108 |
$page = $params['page'];
|
@@ -141,7 +147,9 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
141 |
$oder_class = $params['oder_class'];
|
142 |
$m = $params['m'];
|
143 |
|
|
|
144 |
$group_id_s = $params['group_id_s'];
|
|
|
145 |
$is_search = $params['is_search'];
|
146 |
$is_stats = $params['is_stats'];
|
147 |
|
@@ -159,7 +167,6 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
159 |
'title' => $page_title,
|
160 |
'title_class' => 'wd-header',
|
161 |
));
|
162 |
-
|
163 |
?>
|
164 |
<br>
|
165 |
<div>
|
@@ -198,21 +205,18 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
198 |
<input type="button" class="button action <?php echo ($is_search) ? '' : 'hide'; ?>" onclick="remove_all(); fm_set_input_value('order_by', 'group_id'); fm_set_input_value('asc_or_desc', 'desc'); fm_form_submit(event, 'admin_form'); return false;" value="<?php echo _e('Reset', WDFMInstance(self::PLUGIN)->prefix);?>">
|
199 |
</span>
|
200 |
</div>
|
201 |
-
|
202 |
-
echo $this->pagination($pagination_url, $subs_count, $page_per_num);
|
203 |
-
?>
|
204 |
</div>
|
205 |
<div style="width: 100%;">
|
206 |
-
|
207 |
<div class="table-wrapper-1 <?php echo ($m == 0) ? 'no-scroll' : ''; ?>">
|
208 |
<div class="table-scroll-1"></div>
|
209 |
</div>
|
210 |
<div class="table-wrapper-2 <?php echo ($m == 0) ? 'no-scroll' : ''; ?>">
|
211 |
<div class="table-scroll-2 submit_content" id="fm-scroll">
|
212 |
-
<table class="adminlist table table-striped wp-list-table widefat fixed pages">
|
213 |
<thead>
|
214 |
<tr class="fm_table_head">
|
215 |
-
<td id="cb" class="column-cb check-column">
|
216 |
<label class="screen-reader-text" for="cb-select-all-1"><?php _e('Select all', WDFMInstance(self::PLUGIN)->prefix);?></label>
|
217 |
<input type="checkbox" id="check_all">
|
218 |
</td>
|
@@ -221,7 +225,7 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
221 |
}
|
222 |
else {
|
223 |
echo $oder_class_default;
|
224 |
-
} ?> col_id" <?php echo $style_id; ?> data-colname="<?php _e('ID', WDFMInstance(self::PLUGIN)->prefix);?>">
|
225 |
<a href="" class="sub_id" onclick="fm_set_input_value('order_by', 'group_id');
|
226 |
fm_set_input_value('asc_or_desc', '<?php echo(($order_by == 'group_id' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
|
227 |
fm_form_submit(event, 'admin_form')">
|
@@ -229,7 +233,7 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
229 |
<span class="sorting-indicator"></span>
|
230 |
</a>
|
231 |
</th>
|
232 |
-
<th id="submitsubmitdate_fc" class="column-primary col-submit-date <?php if ( $order_by == "date" ) {
|
233 |
echo $oder_class;
|
234 |
}
|
235 |
else {
|
@@ -281,7 +285,7 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
281 |
<span class="sorting-indicator"></span>
|
282 |
</a>
|
283 |
</th>
|
284 |
-
|
285 |
$stripe_paypal = false;
|
286 |
for ( $i = 0; $i < count($sorted_label_names); $i++ ) {
|
287 |
$styleStr = $this->model->hide_or_not($lists['hide_label_list'], $sorted_labels_id[$i]);
|
@@ -292,13 +296,13 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
292 |
$stripe_paypal = true;
|
293 |
if ( $sorted_label_types[$i] != 'type_stripe' ) {
|
294 |
?>
|
295 |
-
<th
|
296 |
if ( $order_by == $sorted_labels_id[$i] . "_field" ) {
|
297 |
echo $oder_class . '"';
|
298 |
}
|
299 |
else {
|
300 |
echo $oder_class_default . '"';
|
301 |
-
} ?>" data-colname="<?php echo $field_title; ?>">
|
302 |
<a href="" onclick="fm_set_input_value('order_by', '<?php echo $sorted_labels_id[$i] . '_field'; ?>'); fm_set_input_value('asc_or_desc', '<?php echo(($order_by == $sorted_labels_id[$i] . '_field' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>'); fm_form_submit(event, 'admin_form')">
|
303 |
<span><?php echo $textdata['text']; ?></span>
|
304 |
<span class="sorting-indicator"></span>
|
@@ -310,7 +314,7 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
310 |
else {
|
311 |
?>
|
312 |
<th <?php echo $styleStr; ?> id="<?php echo $sorted_labels_id[$i] . '_fc'; ?>" class="<?php echo ($sorted_label_types[$i] == 'type_mark_map' || $sorted_label_types[$i] == 'type_matrix') ? 'table_large_col ' : '';
|
313 |
-
echo $sorted_labels_id[$i] . '_fc';
|
314 |
if ( $order_by == $sorted_labels_id[$i] . "_field" ) {
|
315 |
echo $oder_class . '"';
|
316 |
}
|
@@ -330,25 +334,25 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
330 |
<?php } ?>
|
331 |
</tr>
|
332 |
<tr id="fm-fields-filter" style="display: none;">
|
333 |
-
<th></th>
|
334 |
<th class="submitid_fc" <?php echo $style_id; ?> >
|
335 |
<input type="text" name="id_search" id="id_search" value="<?php echo $lists['id_search'] ?>" style="width:30px" />
|
336 |
</th>
|
337 |
-
<th class="submitdate_fc" <?php echo $style_date; ?>>
|
338 |
<table align="center" style="margin:auto" class="simple_table">
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
</th>
|
353 |
<th class="submitterip_fc" <?php echo $style_ip; ?>>
|
354 |
<input type="text" name="ip_search" id="ip_search" value="<?php echo $lists['ip_search']; ?>" />
|
@@ -453,13 +457,13 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
453 |
$username = $userinfo ? $userinfo->display_name : "";
|
454 |
?>
|
455 |
<tr id="tr_<?php echo $data->group_id; ?>" class="<?php echo $alternate; ?>">
|
456 |
-
<th class="check-column">
|
457 |
<input type="checkbox" id="check_<?php echo $data->group_id; ?>" name="check[<?php echo $data->group_id; ?>]">
|
458 |
</th>
|
459 |
-
<td id="submitid_fc" class="col-id" data-colname="<?php _e('ID', WDFMInstance(self::PLUGIN)->prefix);?>" <?php echo $style_id; ?>>
|
460 |
<a href="" onclick="fm_set_input_value('task', 'edit'); fm_set_input_value('current_id',<?php echo $data->group_id; ?>); fm_form_submit(event, 'admin_form');"><?php echo $data->group_id; ?></a>
|
461 |
</td>
|
462 |
-
<td class="column-primary col-submit-date" data-colname="<?php _e('Submit date', WDFMInstance(self::PLUGIN)->prefix);?>" <?php echo $style_date; ?>>
|
463 |
<?php
|
464 |
$view_url = add_query_arg( array(
|
465 |
'action' => 'FormMakerSubmits' . WDFMInstance(self::PLUGIN)->plugin_postfix,
|
@@ -496,21 +500,23 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
496 |
<button class="toggle-row" type="button"><span class="screen-reader-text"><?php _e("Show more details", WDFMInstance(self::PLUGIN)->prefix); ?></span></button>
|
497 |
</div>
|
498 |
</td>
|
499 |
-
<td class="submitterip_fc sub-align"
|
|
|
500 |
<p><a class="thickbox-preview" href="<?php echo $ip_infoin_popup_url; ?>" title="<?php _e("Show submitter information", WDFMInstance(self::PLUGIN)->prefix); ?>" <?php echo (!in_array($data->ip, $blocked_ips)) ? '' : 'style="color: #FF0000;"'; ?>><?php echo $data->ip; ?></a></p>
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
|
|
|
|
506 |
<?php } ?>
|
507 |
-
</div>
|
508 |
</td>
|
509 |
-
<td class="table_large_col submitterusername_fc sub-align"
|
510 |
<p><?php echo $username; ?></p>
|
511 |
</td>
|
512 |
-
<td class="table_large_col submitteremail_fc sub-align"
|
513 |
-
|
514 |
</td>
|
515 |
<?php
|
516 |
for ( $h = 0; $h < $m; $h++ ) {
|
@@ -529,7 +535,7 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
529 |
if ( strpos($temp[$g]->element_value, "***map***") ) {
|
530 |
$map_params = explode('***map***', $temp[$g]->element_value);
|
531 |
?>
|
532 |
-
<td
|
533 |
<a class="thickbox-preview" href="<?php echo add_query_arg(array(
|
534 |
'action' => 'FormMakerMapEditinPopup' . WDFMInstance(self::PLUGIN)->plugin_postfix,
|
535 |
'long' => $map_params[0],
|
@@ -543,7 +549,7 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
543 |
}
|
544 |
elseif ( strpos($temp[$g]->element_value, "*@@url@@*") ) {
|
545 |
?>
|
546 |
-
<td
|
547 |
<?php
|
548 |
$new_files = explode("*@@url@@*", $temp[$g]->element_value);
|
549 |
foreach ( $new_files as $new_file ) {
|
@@ -564,12 +570,12 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
564 |
$view_star_rating_array = $this->model->view_for_star_rating($temp[$g]->element_value, $temp[$g]->element_label);
|
565 |
$stars = $view_star_rating_array[0];
|
566 |
?>
|
567 |
-
<td
|
568 |
<?php
|
569 |
}
|
570 |
elseif ( strpos($temp[$g]->element_value, "***matrix***") ) {
|
571 |
?>
|
572 |
-
<td
|
573 |
<a class="thickbox-preview" href="<?php echo add_query_arg(array(
|
574 |
'action' => 'show_matrix' . WDFMInstance(self::PLUGIN)->plugin_postfix,
|
575 |
'matrix_params' => str_replace('#', '%23', urlencode($temp[$g]->element_value)),
|
@@ -582,7 +588,7 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
582 |
}
|
583 |
elseif ( strpos($temp[$g]->element_value, "@@@") !== FALSE || $temp[$g]->element_value == "@@@" || $temp[$g]->element_value == "@@@@@@@@@" ) {
|
584 |
?>
|
585 |
-
<td class="<?php echo $sorted_labels_id[$h]; ?>_fc sub-align" <?php echo $styleStr; ?> data-colname="<?php echo !empty($label_name_ids[$sorted_labels_id[$h]]) ? $label_name_ids[$sorted_labels_id[$h]] : ''; ?>">
|
586 |
<p><?php echo str_replace("@@@", " ", $temp[$g]->element_value); ?></p>
|
587 |
</td>
|
588 |
<?php
|
@@ -591,7 +597,7 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
591 |
$view_grading_array = $this->model->view_for_grading($temp[$g]->element_value);
|
592 |
$items = $view_grading_array[0];
|
593 |
?>
|
594 |
-
<td
|
595 |
<p><?php echo $items; ?></p>
|
596 |
</td>
|
597 |
<?php
|
@@ -624,16 +630,16 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
624 |
</td>
|
625 |
<?php }
|
626 |
else { ?>
|
627 |
-
<td
|
628 |
<p><?php echo $temp[$g]->element_value; ?></p>
|
629 |
</td>
|
630 |
<?php }
|
631 |
}
|
632 |
else {
|
633 |
$element_value = str_replace("***br***", '<br>', stripslashes($temp[$g]->element_value));
|
634 |
-
|
635 |
?>
|
636 |
-
<td
|
637 |
<p><?php echo $textdata['text']; ?></p>
|
638 |
</td>
|
639 |
<?php
|
@@ -645,7 +651,7 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
645 |
|
646 |
if ( $not_label ) {
|
647 |
?>
|
648 |
-
<td
|
649 |
<p> </p>
|
650 |
</td>
|
651 |
<?php
|
@@ -653,7 +659,7 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
653 |
}
|
654 |
if ( $ispaypal ) {
|
655 |
?>
|
656 |
-
<td class="payment_info_fc sub-align"
|
657 |
<a class="thickbox-preview" href="<?php echo add_query_arg(array(
|
658 |
'action' => 'paypal_info' . WDFMInstance(self::PLUGIN)->plugin_postfix,
|
659 |
'id' => $i,
|
@@ -681,6 +687,9 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
681 |
</div>
|
682 |
</div>
|
683 |
</div>
|
|
|
|
|
|
|
684 |
<?php
|
685 |
if ( $sorted_label_types ) {
|
686 |
foreach ( $sorted_label_types as $key => $sorted_label_type ) {
|
@@ -709,7 +718,7 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
709 |
}
|
710 |
?>
|
711 |
</select>
|
712 |
-
|
713 |
</td>
|
714 |
</tr>
|
715 |
<tr>
|
@@ -722,7 +731,7 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
722 |
<input class="inputbox" type="text" name="endstats" id="endstats" size="9" maxlength="9" />
|
723 |
</td>
|
724 |
<td>
|
725 |
-
|
726 |
<button class="button" onclick="show_stats(); return false;"><?php _e('Show', WDFMInstance(self::PLUGIN)->prefix); ?></button>
|
727 |
</td>
|
728 |
</tr>
|
@@ -730,7 +739,7 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
730 |
<div id="div_stats"></div>
|
731 |
</div>
|
732 |
<script>
|
733 |
-
|
734 |
</script>
|
735 |
<?php
|
736 |
}
|
@@ -776,18 +785,18 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
776 |
);
|
777 |
}
|
778 |
?>
|
779 |
-
|
780 |
-
|
781 |
-
if (ChBAll.checked) {
|
782 |
document.forms.admin_form.hide_label_list.value = '';
|
783 |
var ChBDivInputs = document.getElementById('ChBDiv').getElementsByTagName('input');
|
784 |
for (var i = 1, input; input = ChBDivInputs[i++]; ) {
|
785 |
-
if(input.id != 'ChBAll'){
|
786 |
input.checked = ChBAll.checked;
|
787 |
}
|
788 |
}
|
789 |
}
|
790 |
-
else {
|
791 |
document.forms.admin_form.hide_label_list.value = '@<?php echo implode($templabels, '@@') ?>@' + '@payment_info@';
|
792 |
for (i = 0; i <= ChBAll.form.length; i++) {
|
793 |
if (typeof(ChBAll.form[i]) != "undefined") {
|
@@ -801,27 +810,25 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
801 |
}
|
802 |
</script>
|
803 |
<div id="ChBDiv">
|
804 |
-
|
805 |
-
|
806 |
<input type="checkbox" <?php echo ( !$lists['hide_label_list'] ) ? 'checked="checked"' : ''; ?> onclick="clickLabChBAll(this)" id="ChBAll" />
|
807 |
<label for="ChBAll"><?php _e('All', WDFMInstance(self::PLUGIN)->prefix); ?></label>
|
808 |
</div>
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
|
818 |
-
|
819 |
-
|
820 |
-
|
821 |
-
|
822 |
-
|
823 |
-
<label for="fm_check_id_<?php echo $curlabel; ?>"> <?php echo stripslashes($sorted_label_names_for_check[$key]); ?></label>
|
824 |
-
</div>
|
825 |
<?php
|
826 |
}
|
827 |
}
|
@@ -845,60 +852,139 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
845 |
</div>
|
846 |
</div>
|
847 |
<script type="text/javascript">
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
854 |
jQuery.ajax({
|
855 |
type: "POST",
|
|
|
856 |
url: "<?php echo add_query_arg(array(
|
857 |
'form_id' => $form_id,
|
858 |
'send_header' => 0,
|
859 |
-
), admin_url('admin-ajax.php')); ?>&action=generete_" + type + "<?php echo WDFMInstance(self::PLUGIN)->plugin_postfix; ?>&limitstart=" +
|
860 |
-
data: {
|
861 |
-
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
jQuery('.fm_modal').show();
|
866 |
},
|
867 |
-
|
868 |
-
if (
|
869 |
-
|
870 |
-
export_submissions(type, limit);
|
871 |
-
progressbar.progressbar("value", limit);
|
872 |
-
loaded_percent = Math.round((progressbar.progressbar("value") * 100) / parseInt(<?php echo $subs_count; ?>));
|
873 |
-
progressLabel.text(loaded_percent + ' %');
|
874 |
-
progressbarValue = progressbar.find(".fm-progress-label");
|
875 |
-
if (loaded_percent >= 46) {
|
876 |
-
progressbarValue.css({
|
877 |
-
"color": '#fff',
|
878 |
-
});
|
879 |
-
}
|
880 |
-
else {
|
881 |
-
progressbarValue.css({
|
882 |
-
"color": '#444',
|
883 |
-
});
|
884 |
-
}
|
885 |
-
}
|
886 |
-
else {
|
887 |
-
jQuery('.fm_modal').hide();
|
888 |
-
progressbar.progressbar("value", 0);
|
889 |
-
progressLabel.text('Loading ...');
|
890 |
-
progressbarValue = progressbar.find(".fm-progress-label");
|
891 |
-
progressbarValue.css({
|
892 |
-
"color": '#444',
|
893 |
-
});
|
894 |
-
window.location = "<?php echo add_query_arg(array(
|
895 |
-
'form_id' => $form_id,
|
896 |
-
'send_header' => 1,
|
897 |
-
), admin_url('admin-ajax.php')); ?>&action=generete_" + type + "<?php echo WDFMInstance(self::PLUGIN)->plugin_postfix; ?>&limitstart=" + limit;
|
898 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
899 |
}
|
900 |
});
|
901 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
902 |
function remove_all() {
|
903 |
if (document.getElementById('startdate')) {
|
904 |
document.getElementById('startdate').value = '';
|
@@ -919,7 +1005,7 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
919 |
document.getElementById('useremail_search').value = '';
|
920 |
}
|
921 |
<?php
|
922 |
-
foreach($sorted_label_types as $slt_index => $slt_val){
|
923 |
if ($slt_val != "type_mark_map" && $slt_val != "type_stripe") {
|
924 |
?>
|
925 |
document.getElementById('<?php echo $form_id . '_' . $sorted_labels_id[$slt_index] . '_search'; ?>').value = '';
|
@@ -934,67 +1020,25 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
934 |
}
|
935 |
}
|
936 |
?>
|
937 |
-
|
938 |
-
|
939 |
-
function show_hide_filter() {
|
940 |
-
jQuery(".show-filter").toggle();
|
941 |
-
jQuery(".hide-filter").toggle();
|
942 |
-
if (document.getElementById('fm-fields-filter').style.display == "none") {
|
943 |
-
document.getElementById('fm-fields-filter').style.display = '';
|
944 |
-
jQuery('.fm-bulk-actions .search_reset_button').show();
|
945 |
-
}
|
946 |
-
else {
|
947 |
-
document.getElementById('fm-fields-filter').style.display = "none";
|
948 |
-
jQuery('.fm-bulk-actions .search_reset_button').hide();
|
949 |
-
}
|
950 |
-
add_scroll_width();
|
951 |
-
return false;
|
952 |
-
}
|
953 |
|
954 |
-
|
955 |
-
jQuery('.theme-detail').click(function () {
|
956 |
-
jQuery(this).siblings('.themedetaildiv').toggle();
|
957 |
-
return false;
|
958 |
-
});
|
959 |
-
jQuery("#startdate, #startstats, #enddate, #endstats").datepicker({
|
960 |
-
dateFormat: "yy-mm-dd",
|
961 |
-
changeMonth: true,
|
962 |
-
changeYear: true
|
963 |
-
});
|
964 |
-
});
|
965 |
-
jQuery(window).on("resize", function () {
|
966 |
-
var width = jQuery(window).width();
|
967 |
-
if (width <= 765) {
|
968 |
-
document.getElementById('fm-fields-filter').style.display = 'none';
|
969 |
-
remove_scroll_width();
|
970 |
-
}
|
971 |
-
else {
|
972 |
-
if ( jQuery('.hide-filter.hide').is(":visible") ) {
|
973 |
document.getElementById('fm-fields-filter').style.display = '';
|
974 |
-
}
|
975 |
-
add_scroll_width();
|
976 |
-
}
|
977 |
-
});
|
978 |
-
jQuery(window).on('load', function (e) {
|
979 |
-
fm_popup();
|
980 |
-
if (typeof jQuery().fancybox !== 'undefined' && jQuery.isFunction(jQuery().fancybox)) {
|
981 |
-
jQuery(".fm_fancybox").fancybox({
|
982 |
-
'maxWidth ': 600,
|
983 |
-
'maxHeight': 500
|
984 |
-
});
|
985 |
-
}
|
986 |
-
});
|
987 |
-
<?php if ($is_search) { ?>
|
988 |
-
document.getElementById('fm-fields-filter').style.display = '';
|
989 |
<?php } ?>
|
990 |
-
|
991 |
<input id="form_id" name="form_id" type="hidden" value="<?php echo $form_id; ?>">
|
992 |
<input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php echo $asc_or_desc; ?>"/>
|
993 |
<input type="hidden" name="order_by" id="order_by" value="<?php echo $order_by; ?>"/>
|
994 |
<?php
|
995 |
}
|
996 |
|
997 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
998 |
ob_start();
|
999 |
$sorted_label_name_original = $params['sorted_label_name_original'];
|
1000 |
$choices_labels = $params['choices_labels'];
|
@@ -1067,7 +1111,12 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
1067 |
die();
|
1068 |
}
|
1069 |
|
1070 |
-
|
|
|
|
|
|
|
|
|
|
|
1071 |
// TODO: Change this function to standard.
|
1072 |
echo $this->topbar();
|
1073 |
|
@@ -1299,9 +1348,10 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
1299 |
|
1300 |
/**
|
1301 |
* Print saelect form.
|
1302 |
-
|
|
|
1303 |
*/
|
1304 |
-
private function saelect_form( $params ) {
|
1305 |
if ( !empty($params['forms']) ) {
|
1306 |
$page = $params['page'];
|
1307 |
$page_url = $params['page_url'];
|
@@ -1333,11 +1383,12 @@ class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
|
1333 |
/**
|
1334 |
* Generate short text.
|
1335 |
*
|
1336 |
-
* @param $text
|
|
|
1337 |
*
|
1338 |
* @return array.
|
1339 |
*/
|
1340 |
-
public function gen_shorter_text( $text, $chars_limit ) {
|
1341 |
$data = array();
|
1342 |
// Check if length is larger than the character limit.
|
1343 |
if ( strlen($text) > $chars_limit && $text == strip_tags($text) ) {
|
5 |
class FMViewSubmissions_fmc extends FMAdminView_fmc {
|
6 |
private $model;
|
7 |
|
8 |
+
public function __construct( $model = array() ) {
|
9 |
$this->model = $model;
|
10 |
wp_enqueue_style('thickbox');
|
11 |
wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-tables');
|
37 |
|
38 |
/**
|
39 |
* Forms page.
|
40 |
+
*
|
41 |
* @param $params
|
42 |
*/
|
43 |
+
public function forms( $params = array() ) {
|
44 |
// TODO: Change this function to standard.
|
45 |
echo $this->topbar();
|
46 |
|
47 |
+
$id = $params['id'];
|
48 |
+
$page = $params['page'];
|
49 |
$page_title = $params['page_title'];
|
50 |
$page_url = $params['page_url'];
|
51 |
$forms = $params['forms'];
|
69 |
<table class="wp-list-table widefat fixed striped posts">
|
70 |
<body id="the-list">
|
71 |
<tr class="no-items">
|
72 |
+
<td class="colspanchange fm-column-not-hide" colspan="0"><?php _e('Please select a form to view submissions', WDFMInstance(self::PLUGIN)->prefix); ?></td>
|
73 |
</tr>
|
74 |
</body>
|
75 |
</table>
|
77 |
echo '</div>';
|
78 |
}
|
79 |
|
80 |
+
/**
|
81 |
+
* Display page.
|
82 |
+
*
|
83 |
+
* @param array $params
|
84 |
+
*/
|
85 |
+
public function display( $params = array() ) {
|
86 |
$id = $params['id'];
|
87 |
$page = $params['page'];
|
88 |
$page_url = $params['page_url'];
|
89 |
ob_start();
|
90 |
+
$unexpected_error_message = sprintf( __('An unexpected error occurred while exporting data. %s Please contact Web-Dorado (10Web) Customer Care. %s', WDFMInstance(self::PLUGIN)->prefix), '<a href="https://web-dorado.com/support/contact-us.html" target="_blank">','</a>');
|
91 |
+
echo '<div class="fm-unexpected_error_message fm-hide">' . WDW_FM_Library(self::PLUGIN)->message_id('', $unexpected_error_message, 'error') . '</div>';
|
92 |
echo $this->body($params);
|
93 |
|
94 |
// Pass the content to form.
|
96 |
// 'id' => WDFMInstance(self::PLUGIN)->prefix . '_submissions',
|
97 |
'id' => 'admin_form',
|
98 |
'name' => WDFMInstance(self::PLUGIN)->prefix . '_submissions',
|
99 |
+
'class' => WDFMInstance(self::PLUGIN)->prefix . '_submissions fm-table-submissions wd-form',
|
100 |
'action' => add_query_arg( array('page' => $page, 'task' => 'display', 'current_id' => $id ), $page_url),
|
101 |
);
|
102 |
echo $this->form(ob_get_clean(), $form_attr);
|
105 |
/**
|
106 |
* Generate page body.
|
107 |
*
|
108 |
+
* @param array $params
|
109 |
* @return string Body html.
|
110 |
*/
|
111 |
+
public function body( $params = array() ) {
|
112 |
global $wpdb;
|
113 |
$form_id = $params['id'];
|
114 |
$page = $params['page'];
|
147 |
$oder_class = $params['oder_class'];
|
148 |
$m = $params['m'];
|
149 |
|
150 |
+
$fm_settings = $params['fm_settings'];
|
151 |
$group_id_s = $params['group_id_s'];
|
152 |
+
$groupids = $params['groupids'];
|
153 |
$is_search = $params['is_search'];
|
154 |
$is_stats = $params['is_stats'];
|
155 |
|
167 |
'title' => $page_title,
|
168 |
'title_class' => 'wd-header',
|
169 |
));
|
|
|
170 |
?>
|
171 |
<br>
|
172 |
<div>
|
205 |
<input type="button" class="button action <?php echo ($is_search) ? '' : 'hide'; ?>" onclick="remove_all(); fm_set_input_value('order_by', 'group_id'); fm_set_input_value('asc_or_desc', 'desc'); fm_form_submit(event, 'admin_form'); return false;" value="<?php echo _e('Reset', WDFMInstance(self::PLUGIN)->prefix);?>">
|
206 |
</span>
|
207 |
</div>
|
208 |
+
<?php echo $this->pagination($pagination_url, $subs_count, $page_per_num); ?>
|
|
|
|
|
209 |
</div>
|
210 |
<div style="width: 100%;">
|
|
|
211 |
<div class="table-wrapper-1 <?php echo ($m == 0) ? 'no-scroll' : ''; ?>">
|
212 |
<div class="table-scroll-1"></div>
|
213 |
</div>
|
214 |
<div class="table-wrapper-2 <?php echo ($m == 0) ? 'no-scroll' : ''; ?>">
|
215 |
<div class="table-scroll-2 submit_content" id="fm-scroll">
|
216 |
+
<table id="fm-submission-lists" class="adminlist table table-striped wp-list-table widefat fixed pages">
|
217 |
<thead>
|
218 |
<tr class="fm_table_head">
|
219 |
+
<td id="cb" class="column-cb check-column fm-column-not-hide">
|
220 |
<label class="screen-reader-text" for="cb-select-all-1"><?php _e('Select all', WDFMInstance(self::PLUGIN)->prefix);?></label>
|
221 |
<input type="checkbox" id="check_all">
|
222 |
</td>
|
225 |
}
|
226 |
else {
|
227 |
echo $oder_class_default;
|
228 |
+
} ?> submitid_fc col_id" <?php echo $style_id; ?> data-colname="<?php _e('ID', WDFMInstance(self::PLUGIN)->prefix);?>">
|
229 |
<a href="" class="sub_id" onclick="fm_set_input_value('order_by', 'group_id');
|
230 |
fm_set_input_value('asc_or_desc', '<?php echo(($order_by == 'group_id' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>');
|
231 |
fm_form_submit(event, 'admin_form')">
|
233 |
<span class="sorting-indicator"></span>
|
234 |
</a>
|
235 |
</th>
|
236 |
+
<th id="submitsubmitdate_fc" class="column-primary col-submit-date fm-column-not-hide <?php if ( $order_by == "date" ) {
|
237 |
echo $oder_class;
|
238 |
}
|
239 |
else {
|
285 |
<span class="sorting-indicator"></span>
|
286 |
</a>
|
287 |
</th>
|
288 |
+
<?php
|
289 |
$stripe_paypal = false;
|
290 |
for ( $i = 0; $i < count($sorted_label_names); $i++ ) {
|
291 |
$styleStr = $this->model->hide_or_not($lists['hide_label_list'], $sorted_labels_id[$i]);
|
296 |
$stripe_paypal = true;
|
297 |
if ( $sorted_label_types[$i] != 'type_stripe' ) {
|
298 |
?>
|
299 |
+
<th id="<?php echo $sorted_labels_id[$i] . '_fc'; ?>" class="table_large_col <?php echo $sorted_labels_id[$i] . '_fc ';
|
300 |
if ( $order_by == $sorted_labels_id[$i] . "_field" ) {
|
301 |
echo $oder_class . '"';
|
302 |
}
|
303 |
else {
|
304 |
echo $oder_class_default . '"';
|
305 |
+
} ?>" <?php echo $styleStr; ?> data-colname="<?php echo $field_title; ?>">
|
306 |
<a href="" onclick="fm_set_input_value('order_by', '<?php echo $sorted_labels_id[$i] . '_field'; ?>'); fm_set_input_value('asc_or_desc', '<?php echo(($order_by == $sorted_labels_id[$i] . '_field' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>'); fm_form_submit(event, 'admin_form')">
|
307 |
<span><?php echo $textdata['text']; ?></span>
|
308 |
<span class="sorting-indicator"></span>
|
314 |
else {
|
315 |
?>
|
316 |
<th <?php echo $styleStr; ?> id="<?php echo $sorted_labels_id[$i] . '_fc'; ?>" class="<?php echo ($sorted_label_types[$i] == 'type_mark_map' || $sorted_label_types[$i] == 'type_matrix') ? 'table_large_col ' : '';
|
317 |
+
echo $sorted_labels_id[$i] . '_fc ';
|
318 |
if ( $order_by == $sorted_labels_id[$i] . "_field" ) {
|
319 |
echo $oder_class . '"';
|
320 |
}
|
334 |
<?php } ?>
|
335 |
</tr>
|
336 |
<tr id="fm-fields-filter" style="display: none;">
|
337 |
+
<th class="fm-column-not-hide"></th>
|
338 |
<th class="submitid_fc" <?php echo $style_id; ?> >
|
339 |
<input type="text" name="id_search" id="id_search" value="<?php echo $lists['id_search'] ?>" style="width:30px" />
|
340 |
</th>
|
341 |
+
<th class="submitdate_fc fm-column-not-hide" <?php echo $style_date; ?>>
|
342 |
<table align="center" style="margin:auto" class="simple_table">
|
343 |
+
<tr class="simple_table">
|
344 |
+
<td class="simple_table fm-column-not-hide" style="text-align: left;">From:</td>
|
345 |
+
<td class="simple_table fm-column-not-hide" style="text-align: center;">
|
346 |
+
<input class="inputbox" type="text" name="startdate" id="startdate" size="10" maxlength="10" value="<?php echo $lists['startdate']; ?>" />
|
347 |
+
</td>
|
348 |
+
</tr>
|
349 |
+
<tr class="simple_table">
|
350 |
+
<td class="simple_table fm-column-not-hide" style="text-align: left;">To:</td>
|
351 |
+
<td class="simple_table fm-column-not-hide" style="text-align: center;">
|
352 |
+
<input class="inputbox" type="text" name="enddate" id="enddate" size="10" maxlength="10" value="<?php echo $lists['enddate']; ?>" />
|
353 |
+
</td>
|
354 |
+
</tr>
|
355 |
+
</table>
|
356 |
</th>
|
357 |
<th class="submitterip_fc" <?php echo $style_ip; ?>>
|
358 |
<input type="text" name="ip_search" id="ip_search" value="<?php echo $lists['ip_search']; ?>" />
|
457 |
$username = $userinfo ? $userinfo->display_name : "";
|
458 |
?>
|
459 |
<tr id="tr_<?php echo $data->group_id; ?>" class="<?php echo $alternate; ?>">
|
460 |
+
<th class="check-column fm-column-not-hide">
|
461 |
<input type="checkbox" id="check_<?php echo $data->group_id; ?>" name="check[<?php echo $data->group_id; ?>]">
|
462 |
</th>
|
463 |
+
<td id="submitid_fc" class="submitid_fc col-id" data-colname="<?php _e('ID', WDFMInstance(self::PLUGIN)->prefix);?>" <?php echo $style_id; ?>>
|
464 |
<a href="" onclick="fm_set_input_value('task', 'edit'); fm_set_input_value('current_id',<?php echo $data->group_id; ?>); fm_form_submit(event, 'admin_form');"><?php echo $data->group_id; ?></a>
|
465 |
</td>
|
466 |
+
<td class="column-primary col-submit-date fm-column-not-hide" data-colname="<?php _e('Submit date', WDFMInstance(self::PLUGIN)->prefix);?>" <?php echo $style_date; ?>>
|
467 |
<?php
|
468 |
$view_url = add_query_arg( array(
|
469 |
'action' => 'FormMakerSubmits' . WDFMInstance(self::PLUGIN)->plugin_postfix,
|
500 |
<button class="toggle-row" type="button"><span class="screen-reader-text"><?php _e("Show more details", WDFMInstance(self::PLUGIN)->prefix); ?></span></button>
|
501 |
</div>
|
502 |
</td>
|
503 |
+
<td id="submitterip_fc" class="submitterip_fc sub-align" <?php echo $style_ip; ?> data-colname="<?php _e('Show submitter information', WDFMInstance(self::PLUGIN)->prefix);?>">
|
504 |
+
<?php if ( $data->ip ) { ?>
|
505 |
<p><a class="thickbox-preview" href="<?php echo $ip_infoin_popup_url; ?>" title="<?php _e("Show submitter information", WDFMInstance(self::PLUGIN)->prefix); ?>" <?php echo (!in_array($data->ip, $blocked_ips)) ? '' : 'style="color: #FF0000;"'; ?>><?php echo $data->ip; ?></a></p>
|
506 |
+
<div class="row-actions">
|
507 |
+
<?php if( !in_array($data->ip, $blocked_ips) ){ ?>
|
508 |
+
<span><a href="<?php echo $block_url; ?>" title="<?php _e("Block IP", WDFMInstance(self::PLUGIN)->prefix); ?>"><?php _e('Block IP', WDFMInstance(self::PLUGIN)->prefix); ?></a></span>
|
509 |
+
<?php } else { ?>
|
510 |
+
<span><a href="<?php echo $unblock_url; ?>" title="<?php _e("Unblock IP ", WDFMInstance(self::PLUGIN)->prefix); ?>"><?php _e('Unblock IP', WDFMInstance(self::PLUGIN)->prefix); ?></a></span>
|
511 |
+
<?php } ?>
|
512 |
+
</div>
|
513 |
<?php } ?>
|
|
|
514 |
</td>
|
515 |
+
<td id="submitterusername_fc" class="table_large_col submitterusername_fc sub-align" <?php echo $style_username; ?> data-colname="<?php _e('Submitter\'s Username', WDFMInstance(self::PLUGIN)->prefix);?>">
|
516 |
<p><?php echo $username; ?></p>
|
517 |
</td>
|
518 |
+
<td id="submitteremail_fc" class="table_large_col submitteremail_fc sub-align" <?php echo $style_useremail; ?> data-colname="<?php _e('Submitter\'s Email Address', WDFMInstance(self::PLUGIN)->prefix);?>">
|
519 |
+
<p><?php echo $useremail; ?></p>
|
520 |
</td>
|
521 |
<?php
|
522 |
for ( $h = 0; $h < $m; $h++ ) {
|
535 |
if ( strpos($temp[$g]->element_value, "***map***") ) {
|
536 |
$map_params = explode('***map***', $temp[$g]->element_value);
|
537 |
?>
|
538 |
+
<td id="<?php echo $sorted_labels_id[$h]; ?>_fc" class="table_large_col <?php echo $sorted_labels_id[$h]; ?>_fc sub-align" <?php echo $styleStr; ?> data-colname="<?php _e('Show on Map', WDFMInstance(self::PLUGIN)->prefix);?>">
|
539 |
<a class="thickbox-preview" href="<?php echo add_query_arg(array(
|
540 |
'action' => 'FormMakerMapEditinPopup' . WDFMInstance(self::PLUGIN)->plugin_postfix,
|
541 |
'long' => $map_params[0],
|
549 |
}
|
550 |
elseif ( strpos($temp[$g]->element_value, "*@@url@@*") ) {
|
551 |
?>
|
552 |
+
<td id="<?php echo $sorted_labels_id[$h]; ?>_fc" class="<?php echo $sorted_labels_id[$h]; ?>_fc sub-align" <?php echo $styleStr; ?> data-colname="<?php _e('URL', WDFMInstance(self::PLUGIN)->prefix);?>">
|
553 |
<?php
|
554 |
$new_files = explode("*@@url@@*", $temp[$g]->element_value);
|
555 |
foreach ( $new_files as $new_file ) {
|
570 |
$view_star_rating_array = $this->model->view_for_star_rating($temp[$g]->element_value, $temp[$g]->element_label);
|
571 |
$stars = $view_star_rating_array[0];
|
572 |
?>
|
573 |
+
<td id="<?php echo $sorted_labels_id[$h]; ?>_fc" align="center" class="<?php echo $sorted_labels_id[$h]; ?>_fc sub-align" <?php echo $styleStr; ?> data-colname="<?php _e('Star rating', WDFMInstance(self::PLUGIN)->prefix);?>"><?php echo $stars; ?></td>
|
574 |
<?php
|
575 |
}
|
576 |
elseif ( strpos($temp[$g]->element_value, "***matrix***") ) {
|
577 |
?>
|
578 |
+
<td id="<?php echo $sorted_labels_id[$h]; ?>_fc" class="table_large_col <?php echo $sorted_labels_id[$h]; ?>_fc sub-align" <?php echo $styleStr; ?> data-colname="<?php _e('Matrix', WDFMInstance(self::PLUGIN)->prefix);?>">
|
579 |
<a class="thickbox-preview" href="<?php echo add_query_arg(array(
|
580 |
'action' => 'show_matrix' . WDFMInstance(self::PLUGIN)->plugin_postfix,
|
581 |
'matrix_params' => str_replace('#', '%23', urlencode($temp[$g]->element_value)),
|
588 |
}
|
589 |
elseif ( strpos($temp[$g]->element_value, "@@@") !== FALSE || $temp[$g]->element_value == "@@@" || $temp[$g]->element_value == "@@@@@@@@@" ) {
|
590 |
?>
|
591 |
+
<td id="<?php echo $sorted_labels_id[$h]; ?>_fc" class="<?php echo $sorted_labels_id[$h]; ?>_fc sub-align" <?php echo $styleStr; ?> data-colname="<?php echo !empty($label_name_ids[$sorted_labels_id[$h]]) ? $label_name_ids[$sorted_labels_id[$h]] : ''; ?>">
|
592 |
<p><?php echo str_replace("@@@", " ", $temp[$g]->element_value); ?></p>
|
593 |
</td>
|
594 |
<?php
|
597 |
$view_grading_array = $this->model->view_for_grading($temp[$g]->element_value);
|
598 |
$items = $view_grading_array[0];
|
599 |
?>
|
600 |
+
<td id="<?php echo $sorted_labels_id[$h]; ?>_fc" class="<?php echo $sorted_labels_id[$h]; ?>_fc sub-align" <?php echo $styleStr; ?> data-colname="<?php _e('Grading', WDFMInstance(self::PLUGIN)->prefix);?>">
|
601 |
<p><?php echo $items; ?></p>
|
602 |
</td>
|
603 |
<?php
|
630 |
</td>
|
631 |
<?php }
|
632 |
else { ?>
|
633 |
+
<td id="<?php echo $sorted_labels_id[$h]; ?>_fc" class="<?php echo $sorted_labels_id[$h]; ?>_fc sub-align" <?php echo $styleStr; ?> data-colname="<?php echo !empty($label_name_ids[$sorted_labels_id[$h]]) ? $label_name_ids[$sorted_labels_id[$h]] : ''; ?>">
|
634 |
<p><?php echo $temp[$g]->element_value; ?></p>
|
635 |
</td>
|
636 |
<?php }
|
637 |
}
|
638 |
else {
|
639 |
$element_value = str_replace("***br***", '<br>', stripslashes($temp[$g]->element_value));
|
640 |
+
$textdata = $this->gen_shorter_text($element_value, 100);
|
641 |
?>
|
642 |
+
<td id="<?php echo $sorted_labels_id[$h]; ?>_fc" class="<?php echo $sorted_labels_id[$h]; ?>_fc sub-align" <?php echo $styleStr; ?> data-colname="<?php echo !empty($label_name_ids[$sorted_labels_id[$h]]) ? $label_name_ids[$sorted_labels_id[$h]] : ''; ?>">
|
643 |
<p><?php echo $textdata['text']; ?></p>
|
644 |
</td>
|
645 |
<?php
|
651 |
|
652 |
if ( $not_label ) {
|
653 |
?>
|
654 |
+
<td id="<?php echo $sorted_labels_id[$h]; ?>_fc" class="<?php echo $sorted_labels_id[$h]; ?>_fc sub-align" <?php echo $styleStr; ?>>
|
655 |
<p> </p>
|
656 |
</td>
|
657 |
<?php
|
659 |
}
|
660 |
if ( $ispaypal ) {
|
661 |
?>
|
662 |
+
<td id="payment_info_fc" class="payment_info_fc sub-align" <?php echo $style_payment_info; ?> data-colname="<?php _e('Paypal information', WDFMInstance(self::PLUGIN)->prefix); ?>">
|
663 |
<a class="thickbox-preview" href="<?php echo add_query_arg(array(
|
664 |
'action' => 'paypal_info' . WDFMInstance(self::PLUGIN)->plugin_postfix,
|
665 |
'id' => $i,
|
687 |
</div>
|
688 |
</div>
|
689 |
</div>
|
690 |
+
<div class="tablenav bottom">
|
691 |
+
<?php echo $this->pagination($pagination_url, $subs_count, $page_per_num); ?>
|
692 |
+
</div>
|
693 |
<?php
|
694 |
if ( $sorted_label_types ) {
|
695 |
foreach ( $sorted_label_types as $key => $sorted_label_type ) {
|
718 |
}
|
719 |
?>
|
720 |
</select>
|
721 |
+
<p class="fm_error_sorted_label_key"><?php echo _e('Please select the field!', WDFMInstance(self::PLUGIN)->prefix);?></p>
|
722 |
</td>
|
723 |
</tr>
|
724 |
<tr>
|
731 |
<input class="inputbox" type="text" name="endstats" id="endstats" size="9" maxlength="9" />
|
732 |
</td>
|
733 |
<td>
|
734 |
+
<span class="fm-div_stats-loading spinner"></span>
|
735 |
<button class="button" onclick="show_stats(); return false;"><?php _e('Show', WDFMInstance(self::PLUGIN)->prefix); ?></button>
|
736 |
</td>
|
737 |
</tr>
|
739 |
<div id="div_stats"></div>
|
740 |
</div>
|
741 |
<script>
|
742 |
+
show_stats_url = "<?php echo add_query_arg( array('action' => 'get_stats' . WDFMInstance(self::PLUGIN)->plugin_postfix, 'task' => 'show_stats', 'current_id' => $form_id ), $page_url); ?>";
|
743 |
</script>
|
744 |
<?php
|
745 |
}
|
785 |
);
|
786 |
}
|
787 |
?>
|
788 |
+
function clickLabChBAll( ChBAll ) {
|
789 |
+
ChBAll.classList.remove("fm-remove_before");
|
790 |
+
if ( ChBAll.checked ) {
|
791 |
document.forms.admin_form.hide_label_list.value = '';
|
792 |
var ChBDivInputs = document.getElementById('ChBDiv').getElementsByTagName('input');
|
793 |
for (var i = 1, input; input = ChBDivInputs[i++]; ) {
|
794 |
+
if ( input.id != 'ChBAll') {
|
795 |
input.checked = ChBAll.checked;
|
796 |
}
|
797 |
}
|
798 |
}
|
799 |
+
else {
|
800 |
document.forms.admin_form.hide_label_list.value = '@<?php echo implode($templabels, '@@') ?>@' + '@payment_info@';
|
801 |
for (i = 0; i <= ChBAll.form.length; i++) {
|
802 |
if (typeof(ChBAll.form[i]) != "undefined") {
|
810 |
}
|
811 |
</script>
|
812 |
<div id="ChBDiv">
|
813 |
+
<p class="add-col-header"><?php _e('Select columns', WDFMInstance(self::PLUGIN)->prefix); ?></p>
|
814 |
+
<div class="fm_check_labels">
|
815 |
<input type="checkbox" <?php echo ( !$lists['hide_label_list'] ) ? 'checked="checked"' : ''; ?> onclick="clickLabChBAll(this)" id="ChBAll" />
|
816 |
<label for="ChBAll"><?php _e('All', WDFMInstance(self::PLUGIN)->prefix); ?></label>
|
817 |
</div>
|
818 |
+
<?php foreach ( $templabels as $key => $curlabel ) {
|
819 |
+
if ( strpos($lists['hide_label_list'], '@' . $curlabel . '@') === FALSE ) {
|
820 |
+
?>
|
821 |
+
<div class="fm_check_labels">
|
822 |
+
<input type="checkbox" checked="checked" onclick="clickLabChB('<?php echo $curlabel; ?>', this)" id="fm_check_id_<?php echo $curlabel; ?>" />
|
823 |
+
<label for="fm_check_id_<?php echo $curlabel; ?>"> <?php echo stripslashes($sorted_label_names_for_check[$key]); ?></label>
|
824 |
+
</div>
|
825 |
+
<?php }
|
826 |
+
else {
|
827 |
+
?>
|
828 |
+
<div class="fm_check_labels">
|
829 |
+
<input type="checkbox" onclick="clickLabChB('<?php echo $curlabel; ?>', this)" id="fm_check_id_<?php echo $curlabel; ?>" />
|
830 |
+
<label for="fm_check_id_<?php echo $curlabel; ?>"> <?php echo stripslashes($sorted_label_names_for_check[$key]); ?></label>
|
831 |
+
</div>
|
|
|
|
|
832 |
<?php
|
833 |
}
|
834 |
}
|
852 |
</div>
|
853 |
</div>
|
854 |
<script type="text/javascript">
|
855 |
+
var index = 1;
|
856 |
+
var minLimit = 60;
|
857 |
+
var total_count = <?php echo $subs_count; ?>;
|
858 |
+
var page_num_update = false;
|
859 |
+
var page_num = <?php echo !empty($fm_settings['ajax_export_per_page']) ? $fm_settings['ajax_export_per_page'] : 1000; ?>;
|
860 |
+
var groupids = <?php echo json_encode($groupids);?>;
|
861 |
+
var groupids_string = '';
|
862 |
+
|
863 |
+
/**
|
864 |
+
* Export submissions.
|
865 |
+
*
|
866 |
+
* @param string type
|
867 |
+
* @param int limitstart
|
868 |
+
* @param null ids
|
869 |
+
*/
|
870 |
+
function export_submissions(type, limitstart, ids) {
|
871 |
+
var verified_emails = jQuery('#verified_emails').val();
|
872 |
+
if ( limitstart == 0) {
|
873 |
+
jQuery('.fm_modal').show();
|
874 |
+
loading_progress(total_count, limitstart);
|
875 |
+
if( typeof ids == "undefined" || ids === null ) {
|
876 |
+
var ids = groupids.slice(limitstart, page_num);
|
877 |
+
groupids_string = ids.toString();
|
878 |
+
}
|
879 |
+
}
|
880 |
jQuery.ajax({
|
881 |
type: "POST",
|
882 |
+
dataType: "json",
|
883 |
url: "<?php echo add_query_arg(array(
|
884 |
'form_id' => $form_id,
|
885 |
'send_header' => 0,
|
886 |
+
), admin_url('admin-ajax.php')); ?>&action=generete_" + type + "<?php echo WDFMInstance(self::PLUGIN)->plugin_postfix; ?>&limitstart=" + limitstart,
|
887 |
+
data: {
|
888 |
+
page_num: page_num,
|
889 |
+
page_num_update: page_num_update,
|
890 |
+
groupids: groupids_string,
|
891 |
+
verified_emails: verified_emails
|
|
|
892 |
},
|
893 |
+
beforeSend: function () {
|
894 |
+
if ( page_num <= total_count ) {
|
895 |
+
jQuery('.fm_modal').show();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
896 |
}
|
897 |
+
},
|
898 |
+
success: function (response, textStatus, xhr) {
|
899 |
+
if ( limitstart < total_count ) {
|
900 |
+
limitstart += page_num;
|
901 |
+
++index;
|
902 |
+
if ( index <= total_count ) {
|
903 |
+
end = index*page_num;
|
904 |
+
start = end - page_num;
|
905 |
+
ids = groupids.slice(start, end);
|
906 |
+
groupids_string = ids.toString();
|
907 |
+
}
|
908 |
+
if ( limitstart >= total_count ) {
|
909 |
+
ids = '';
|
910 |
+
index = 1;
|
911 |
+
start = page_num;
|
912 |
+
}
|
913 |
+
if ( ids ) {
|
914 |
+
export_submissions(type, limitstart, ids);
|
915 |
+
}
|
916 |
+
else {
|
917 |
+
ajax_export_end(total_count, type, limitstart);
|
918 |
+
}
|
919 |
+
loading_progress(total_count, limitstart);
|
920 |
+
}
|
921 |
+
else {
|
922 |
+
ajax_export_end(total_count, type, limitstart);
|
923 |
+
}
|
924 |
+
},
|
925 |
+
error: function (xhr, ajaxOptions, thrownError) {
|
926 |
+
limitstart = 0;
|
927 |
+
index = 1;
|
928 |
+
page_num = parseInt(page_num / 2);
|
929 |
+
if ( page_num > minLimit ) {
|
930 |
+
page_num_update = true;
|
931 |
+
export_submissions(type, 0, null);
|
932 |
+
}
|
933 |
+
if ( page_num < minLimit ) {
|
934 |
+
page_num = parseInt(page_num * 2);
|
935 |
+
page_num_update = false;
|
936 |
+
jQuery('.fm_modal').hide();
|
937 |
+
jQuery('.fm-unexpected_error_message').show();
|
938 |
+
return false;
|
939 |
+
}
|
940 |
}
|
941 |
});
|
942 |
}
|
943 |
+
|
944 |
+
/**
|
945 |
+
* Ajax export end.
|
946 |
+
*
|
947 |
+
* @param int total_count
|
948 |
+
* @param string type
|
949 |
+
* @param int limitstart
|
950 |
+
*/
|
951 |
+
function ajax_export_end(total_count, type, limitstart) {
|
952 |
+
jQuery('.fm_modal').hide();
|
953 |
+
jQuery('.fm-unexpected_error_message').hide();
|
954 |
+
loading_progress(total_count, 0);
|
955 |
+
|
956 |
+
window.location = "<?php echo add_query_arg(array(
|
957 |
+
'form_id' => $form_id,
|
958 |
+
'send_header' => 1,
|
959 |
+
), admin_url('admin-ajax.php')); ?>&action=generete_" + type + "<?php echo WDFMInstance(self::PLUGIN)->plugin_postfix; ?>&limitstart=" + limitstart;
|
960 |
+
|
961 |
+
}
|
962 |
+
|
963 |
+
/**
|
964 |
+
* Loading progress.
|
965 |
+
*
|
966 |
+
* @param int count
|
967 |
+
* @param int start
|
968 |
+
*/
|
969 |
+
function loading_progress(count, start) {
|
970 |
+
var text = 'Loading ...';
|
971 |
+
var progressbar = jQuery("#fm-progressbar");
|
972 |
+
var progressLabel = jQuery(".fm-progress-label");
|
973 |
+
progressbar.progressbar({
|
974 |
+
max: count
|
975 |
+
});
|
976 |
+
if ( start != 0 ) {
|
977 |
+
var interval = Math.round( (progressbar.progressbar("value") * 100) / parseInt(count) );
|
978 |
+
text = interval + ' %';
|
979 |
+
}
|
980 |
+
progressbar.progressbar("value", start);
|
981 |
+
progressLabel.text(text);
|
982 |
+
progressbarValue = progressbar.find(".fm-progress-label");
|
983 |
+
progressbarValue.css({
|
984 |
+
"color": '#444',
|
985 |
+
});
|
986 |
+
}
|
987 |
+
|
988 |
function remove_all() {
|
989 |
if (document.getElementById('startdate')) {
|
990 |
document.getElementById('startdate').value = '';
|
1005 |
document.getElementById('useremail_search').value = '';
|
1006 |
}
|
1007 |
<?php
|
1008 |
+
foreach( $sorted_label_types as $slt_index => $slt_val ) {
|
1009 |
if ($slt_val != "type_mark_map" && $slt_val != "type_stripe") {
|
1010 |
?>
|
1011 |
document.getElementById('<?php echo $form_id . '_' . $sorted_labels_id[$slt_index] . '_search'; ?>').value = '';
|
1020 |
}
|
1021 |
}
|
1022 |
?>
|
1023 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1024 |
|
1025 |
+
<?php if ( $is_search ) { ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1026 |
document.getElementById('fm-fields-filter').style.display = '';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1027 |
<?php } ?>
|
1028 |
+
</script>
|
1029 |
<input id="form_id" name="form_id" type="hidden" value="<?php echo $form_id; ?>">
|
1030 |
<input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php echo $asc_or_desc; ?>"/>
|
1031 |
<input type="hidden" name="order_by" id="order_by" value="<?php echo $order_by; ?>"/>
|
1032 |
<?php
|
1033 |
}
|
1034 |
|
1035 |
+
/**
|
1036 |
+
* Show stats.
|
1037 |
+
*
|
1038 |
+
* @param array $params
|
1039 |
+
* @return string
|
1040 |
+
*/
|
1041 |
+
public function show_stats( $params = array() ) {
|
1042 |
ob_start();
|
1043 |
$sorted_label_name_original = $params['sorted_label_name_original'];
|
1044 |
$choices_labels = $params['choices_labels'];
|
1111 |
die();
|
1112 |
}
|
1113 |
|
1114 |
+
/**
|
1115 |
+
* Edit page.
|
1116 |
+
*
|
1117 |
+
* @param array $params
|
1118 |
+
*/
|
1119 |
+
public function edit( $params = array() ) {
|
1120 |
// TODO: Change this function to standard.
|
1121 |
echo $this->topbar();
|
1122 |
|
1348 |
|
1349 |
/**
|
1350 |
* Print saelect form.
|
1351 |
+
*
|
1352 |
+
* @param array $params
|
1353 |
*/
|
1354 |
+
private function saelect_form( $params = array() ) {
|
1355 |
if ( !empty($params['forms']) ) {
|
1356 |
$page = $params['page'];
|
1357 |
$page_url = $params['page_url'];
|
1383 |
/**
|
1384 |
* Generate short text.
|
1385 |
*
|
1386 |
+
* @param string $text
|
1387 |
+
* @param int $chars_limit
|
1388 |
*
|
1389 |
* @return array.
|
1390 |
*/
|
1391 |
+
public function gen_shorter_text( $text = '', $chars_limit = 0 ) {
|
1392 |
$data = array();
|
1393 |
// Check if length is larger than the character limit.
|
1394 |
if ( strlen($text) > $chars_limit && $text == strip_tags($text) ) {
|
admin/views/Themes_fm.php
CHANGED
@@ -15,7 +15,7 @@ class FMViewThemes_fmc extends FMAdminView_fmc {
|
|
15 |
*
|
16 |
* @param $params
|
17 |
*/
|
18 |
-
public function display( $params ) {
|
19 |
ob_start();
|
20 |
echo $this->body($params);
|
21 |
// Pass the content to form.
|
@@ -32,8 +32,9 @@ class FMViewThemes_fmc extends FMAdminView_fmc {
|
|
32 |
* Generate page body.
|
33 |
*
|
34 |
* @param $params
|
|
|
35 |
*/
|
36 |
-
public function body( $params ) {
|
37 |
$order = $params['order'];
|
38 |
$orderby = $params['orderby'];
|
39 |
$actions = $params['actions'];
|
@@ -136,7 +137,7 @@ class FMViewThemes_fmc extends FMAdminView_fmc {
|
|
136 |
*
|
137 |
* @param $params
|
138 |
*/
|
139 |
-
public function edit( $params ) {
|
140 |
ob_start();
|
141 |
$buttons = array(
|
142 |
'save' => array(
|
@@ -171,8 +172,9 @@ class FMViewThemes_fmc extends FMAdminView_fmc {
|
|
171 |
* Generate edit page body.
|
172 |
*
|
173 |
* @param $params
|
|
|
174 |
*/
|
175 |
-
public function edit_body( $params ) {
|
176 |
wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-bootstrap');
|
177 |
wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-style');
|
178 |
wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-colorpicker');
|
15 |
*
|
16 |
* @param $params
|
17 |
*/
|
18 |
+
public function display( $params = array() ) {
|
19 |
ob_start();
|
20 |
echo $this->body($params);
|
21 |
// Pass the content to form.
|
32 |
* Generate page body.
|
33 |
*
|
34 |
* @param $params
|
35 |
+
* @return string Body html.
|
36 |
*/
|
37 |
+
public function body( $params = array() ) {
|
38 |
$order = $params['order'];
|
39 |
$orderby = $params['orderby'];
|
40 |
$actions = $params['actions'];
|
137 |
*
|
138 |
* @param $params
|
139 |
*/
|
140 |
+
public function edit( $params = array() ) {
|
141 |
ob_start();
|
142 |
$buttons = array(
|
143 |
'save' => array(
|
172 |
* Generate edit page body.
|
173 |
*
|
174 |
* @param $params
|
175 |
+
* @return string edit body html.
|
176 |
*/
|
177 |
+
public function edit_body( $params = array() ) {
|
178 |
wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-bootstrap');
|
179 |
wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-style');
|
180 |
wp_enqueue_style(WDFMInstance(self::PLUGIN)->handle_prefix . '-colorpicker');
|
admin/views/Uninstall_fm.php
CHANGED
@@ -13,7 +13,12 @@ class FMViewUninstall_fmc extends FMAdminView_fmc {
|
|
13 |
}
|
14 |
}
|
15 |
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
17 |
global $wpdb;
|
18 |
$prefix = $wpdb->prefix;
|
19 |
$addons = $params['addons'];
|
@@ -98,7 +103,12 @@ class FMViewUninstall_fmc extends FMAdminView_fmc {
|
|
98 |
<?php
|
99 |
}
|
100 |
|
101 |
-
|
|
|
|
|
|
|
|
|
|
|
102 |
$prefix = $params['prefix'];
|
103 |
$addons = $params['addons']; //array
|
104 |
$deactivate_url = add_query_arg(array(
|
@@ -135,10 +145,13 @@ class FMViewUninstall_fmc extends FMAdminView_fmc {
|
|
135 |
?>
|
136 |
</div>
|
137 |
<div class="wrap">
|
138 |
-
<h2
|
139 |
<p>
|
140 |
-
<strong
|
141 |
-
|
|
|
|
|
|
|
142 |
<input id="task" name="task" type="hidden" value="" />
|
143 |
</div>
|
144 |
<?php
|
13 |
}
|
14 |
}
|
15 |
|
16 |
+
/**
|
17 |
+
* Display page.
|
18 |
+
*
|
19 |
+
* @param array $params
|
20 |
+
*/
|
21 |
+
public function display( $params = array() ) {
|
22 |
global $wpdb;
|
23 |
$prefix = $wpdb->prefix;
|
24 |
$addons = $params['addons'];
|
103 |
<?php
|
104 |
}
|
105 |
|
106 |
+
/**
|
107 |
+
* Uninstall.
|
108 |
+
*
|
109 |
+
* @param array $params
|
110 |
+
*/
|
111 |
+
public function uninstall( $params = array() ) {
|
112 |
$prefix = $params['prefix'];
|
113 |
$addons = $params['addons']; //array
|
114 |
$deactivate_url = add_query_arg(array(
|
145 |
?>
|
146 |
</div>
|
147 |
<div class="wrap">
|
148 |
+
<h2><?php _e('Uninstall', WDFMInstance(self::PLUGIN)->prefix); ?> <?php echo WDFMInstance(self::PLUGIN)->nicename; ?></h2>
|
149 |
<p>
|
150 |
+
<strong>
|
151 |
+
<a href="<?php echo $deactivate_url; ?>" class="fm_deactivate_link" data-uninstall="1"><?php _e('Click Here', WDFMInstance(self::PLUGIN)->prefix); ?></a>
|
152 |
+
<?php _e('To Finish the Uninstallation and Form Maker will be Deactivated Automatically.', WDFMInstance(self::PLUGIN)->prefix); ?></a>
|
153 |
+
</strong>
|
154 |
+
</p>
|
155 |
<input id="task" name="task" type="hidden" value="" />
|
156 |
</div>
|
157 |
<?php
|
admin/views/Widget.php
CHANGED
@@ -4,7 +4,14 @@
|
|
4 |
* Class FMViewWidget_fmc
|
5 |
*/
|
6 |
class FMViewWidget_fmc {
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
extract($args);
|
9 |
$title = $instance['title'];
|
10 |
$form_id = (isset($instance['form_id']) ? $instance['form_id'] : 0);
|
@@ -20,8 +27,16 @@ class FMViewWidget_fmc {
|
|
20 |
echo $after_widget;
|
21 |
}
|
22 |
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
$defaults = array(
|
26 |
'title' => '',
|
27 |
'form_id' => 0,
|
4 |
* Class FMViewWidget_fmc
|
5 |
*/
|
6 |
class FMViewWidget_fmc {
|
7 |
+
/**
|
8 |
+
* Widget.
|
9 |
+
*
|
10 |
+
* @param array $args
|
11 |
+
* @param array $instance
|
12 |
+
* @param string $execute
|
13 |
+
*/
|
14 |
+
function widget( $args = array(), $instance = array(), $execute = '' ) {
|
15 |
extract($args);
|
16 |
$title = $instance['title'];
|
17 |
$form_id = (isset($instance['form_id']) ? $instance['form_id'] : 0);
|
27 |
echo $after_widget;
|
28 |
}
|
29 |
|
30 |
+
/**
|
31 |
+
* Form.
|
32 |
+
* @param $instance
|
33 |
+
* @param $ids_FM
|
34 |
+
* @param $id_title
|
35 |
+
* @param $name_title
|
36 |
+
* @param $id_form_id
|
37 |
+
* @param $name_form_id
|
38 |
+
*/
|
39 |
+
function form( $instance = array(), $ids_FM = array(), $id_title = 0, $name_title = '', $id_form_id = 0, $name_form_id = 0 ) {
|
40 |
$defaults = array(
|
41 |
'title' => '',
|
42 |
'form_id' => 0,
|
admin/views/view.php
CHANGED
@@ -178,7 +178,7 @@ class FMAdminView_fmc {
|
|
178 |
*
|
179 |
* @return string
|
180 |
*/
|
181 |
-
protected function pagination($page_url, $total, $items_per_page = 20) {
|
182 |
$page_number = WDW_FM_Library(self::PLUGIN)->get('paged', 1);
|
183 |
$search = WDW_FM_Library(self::PLUGIN)->get('s', '');
|
184 |
$orderby = WDW_FM_Library(self::PLUGIN)->get('orderby', '');
|
@@ -262,7 +262,13 @@ class FMAdminView_fmc {
|
|
262 |
return ob_get_clean();
|
263 |
}
|
264 |
|
265 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
266 |
ob_start();
|
267 |
?>
|
268 |
<div class="alignleft actions bulkactions">
|
@@ -463,7 +469,7 @@ class FMAdminView_fmc {
|
|
463 |
* @param string $premium_link_text
|
464 |
* @return string
|
465 |
*/
|
466 |
-
protected function free_message($message, $premium_link = '', $premium_link_text = '', $id = '') {
|
467 |
$upgrade = false;
|
468 |
if ('' == $premium_link) {
|
469 |
$premium_link = $this->premium_link;
|
@@ -495,7 +501,7 @@ class FMAdminView_fmc {
|
|
495 |
*
|
496 |
* @return string Stripe promo box html.
|
497 |
*/
|
498 |
-
protected function promo_box($message, $addon_message, $addon_link, $id =
|
499 |
$premium_link = $this->premium_link;
|
500 |
ob_start();
|
501 |
?>
|
178 |
*
|
179 |
* @return string
|
180 |
*/
|
181 |
+
protected function pagination($page_url = '', $total = 0, $items_per_page = 20) {
|
182 |
$page_number = WDW_FM_Library(self::PLUGIN)->get('paged', 1);
|
183 |
$search = WDW_FM_Library(self::PLUGIN)->get('s', '');
|
184 |
$orderby = WDW_FM_Library(self::PLUGIN)->get('orderby', '');
|
262 |
return ob_get_clean();
|
263 |
}
|
264 |
|
265 |
+
/**
|
266 |
+
* Bulk actions.
|
267 |
+
*
|
268 |
+
* @param array $actions
|
269 |
+
* @return string
|
270 |
+
*/
|
271 |
+
protected function bulk_actions( $actions = array() ) {
|
272 |
ob_start();
|
273 |
?>
|
274 |
<div class="alignleft actions bulkactions">
|
469 |
* @param string $premium_link_text
|
470 |
* @return string
|
471 |
*/
|
472 |
+
protected function free_message($message = '', $premium_link = '', $premium_link_text = '', $id = '') {
|
473 |
$upgrade = false;
|
474 |
if ('' == $premium_link) {
|
475 |
$premium_link = $this->premium_link;
|
501 |
*
|
502 |
* @return string Stripe promo box html.
|
503 |
*/
|
504 |
+
protected function promo_box( $message = '', $addon_message = '', $addon_link = '', $id = 0 ) {
|
505 |
$premium_link = $this->premium_link;
|
506 |
ob_start();
|
507 |
?>
|
contact-form-maker.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: Contact Form Maker
|
4 |
* Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
|
5 |
* Description: WordPress Contact Form Maker is a simple contact form builder, which allows the user with almost no knowledge of programming to create and edit different type of contact forms.
|
6 |
-
* Version: 1.12.
|
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
|
@@ -95,8 +95,8 @@ final class WDCFM {
|
|
95 |
$this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
|
96 |
$this->front_urls = $this->get_front_urls();
|
97 |
$this->main_file = plugin_basename(__FILE__);
|
98 |
-
$this->plugin_version = '1.12.
|
99 |
-
$this->db_version = '2.12.
|
100 |
$this->menu_postfix = ($this->is_free == 2 ? '_fmc' : '_fm');
|
101 |
$this->plugin_postfix = ($this->is_free == 2 ? '_fmc' : '');
|
102 |
$this->menu_slug = 'manage' . $this->menu_postfix;
|
@@ -105,6 +105,7 @@ final class WDCFM {
|
|
105 |
$this->js_prefix = 'fm_';
|
106 |
$this->handle_prefix = ($this->is_free == 2 ? 'fmc' : 'fm');
|
107 |
$this->nicename = ($this->is_free == 2 ? __('Contact Form', $this->prefix) : __('Form Maker', $this->prefix));
|
|
|
108 |
}
|
109 |
|
110 |
/**
|
@@ -208,16 +209,24 @@ final class WDCFM {
|
|
208 |
// Enqueue block editor assets for Gutenberg.
|
209 |
add_filter('tw_get_block_editor_assets', array($this, 'register_block_editor_assets'));
|
210 |
add_action( 'enqueue_block_editor_assets', array($this, 'enqueue_block_editor_assets') );
|
|
|
211 |
// Privacy policy.
|
212 |
add_action( 'admin_init', array($this, 'add_privacy_policy_content') );
|
|
|
|
|
|
|
|
|
|
|
213 |
}
|
214 |
-
|
215 |
function add_privacy_policy_content() {
|
216 |
if ( ! function_exists( 'wp_add_privacy_policy_content' ) ) {
|
217 |
return;
|
218 |
}
|
219 |
|
220 |
-
$content = __( '
|
|
|
|
|
221 |
|
222 |
wp_add_privacy_policy_content(
|
223 |
WDFMInstance(self::PLUGIN)->nicename,
|
@@ -225,6 +234,22 @@ final class WDCFM {
|
|
225 |
);
|
226 |
}
|
227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
public function register_block_editor_assets($assets) {
|
229 |
$version = '2.0.0';
|
230 |
$js_path = $this->plugin_url . '/js/tw-gb/block.js';
|
@@ -923,13 +948,14 @@ final class WDCFM {
|
|
923 |
* Activate plugin.
|
924 |
*/
|
925 |
public function form_maker_activate() {
|
|
|
926 |
if (!$this->is_free) {
|
927 |
deactivate_plugins("contact-form-maker/contact-form-maker.php");
|
928 |
delete_transient('fm_update_check');
|
929 |
}
|
930 |
$version = get_option("wd_form_maker_version");
|
931 |
$new_version = $this->db_version;
|
932 |
-
|
933 |
require_once $this->plugin_dir . "/form_maker_insert.php";
|
934 |
if (!$version) {
|
935 |
if ($wpdb->get_var("SHOW TABLES LIKE '" . $wpdb->prefix . "formmaker'") == $wpdb->prefix . "formmaker") {
|
@@ -952,8 +978,7 @@ final class WDCFM {
|
|
952 |
'post_type' => ($this->is_free == 2 ? 'cfmemailverification' : 'fmemailverification'),
|
953 |
);
|
954 |
$mail_verification_post_id = wp_insert_post($email_verification_post);
|
955 |
-
|
956 |
-
add_option(($this->is_free == 2 ? 'fmc_settings' : 'fm_settings'), array('public_key' => '', 'private_key' => '', 'csv_delimiter' => ',', 'map_key' => ''));
|
957 |
$wpdb->update($wpdb->prefix . "formmaker", array(
|
958 |
'mail_verification_post_id' => $mail_verification_post_id,
|
959 |
), array('id' => 1), array(
|
@@ -982,11 +1007,11 @@ final class WDCFM {
|
|
982 |
}
|
983 |
update_option("wd_form_maker_version", $new_version);
|
984 |
|
985 |
-
if (FALSE === $fm_settings = get_option($
|
986 |
$recaptcha_keys = $wpdb->get_row('SELECT `public_key`, `private_key` FROM ' . $wpdb->prefix . 'formmaker WHERE public_key!="" and private_key!=""', ARRAY_A);
|
987 |
$public_key = isset($recaptcha_keys['public_key']) ? $recaptcha_keys['public_key'] : '';
|
988 |
$private_key = isset($recaptcha_keys['private_key']) ? $recaptcha_keys['private_key'] : '';
|
989 |
-
add_option(
|
990 |
}
|
991 |
}
|
992 |
}
|
@@ -1106,7 +1131,7 @@ final class WDCFM {
|
|
1106 |
*/
|
1107 |
function media_button($context) {
|
1108 |
ob_start();
|
1109 |
-
$url = add_query_arg(array('action' => 'FMShortocde' . $this->plugin_postfix, 'task' => '
|
1110 |
?>
|
1111 |
<a onclick="tb_click.call(this); fm_set_shortcode_popup_dimensions(400, 140); return false;" href="<?php echo $url; ?>" class="button" title="<?php _e('Insert Form', $this->prefix); ?>">
|
1112 |
<span class="wp-media-buttons-icon" style="background: url('<?php echo $this->plugin_url; ?>/images/fm-media-form-button.png') no-repeat scroll left top rgba(0, 0, 0, 0);"></span>
|
3 |
* Plugin Name: Contact Form Maker
|
4 |
* Plugin URI: https://web-dorado.com/products/form-maker-wordpress.html
|
5 |
* Description: WordPress Contact Form Maker is a simple contact form builder, which allows the user with almost no knowledge of programming to create and edit different type of contact forms.
|
6 |
+
* Version: 1.12.31
|
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
|
95 |
$this->plugin_url = plugins_url(plugin_basename(dirname(__FILE__)));
|
96 |
$this->front_urls = $this->get_front_urls();
|
97 |
$this->main_file = plugin_basename(__FILE__);
|
98 |
+
$this->plugin_version = '1.12.31';
|
99 |
+
$this->db_version = '2.12.31';
|
100 |
$this->menu_postfix = ($this->is_free == 2 ? '_fmc' : '_fm');
|
101 |
$this->plugin_postfix = ($this->is_free == 2 ? '_fmc' : '');
|
102 |
$this->menu_slug = 'manage' . $this->menu_postfix;
|
105 |
$this->js_prefix = 'fm_';
|
106 |
$this->handle_prefix = ($this->is_free == 2 ? 'fmc' : 'fm');
|
107 |
$this->nicename = ($this->is_free == 2 ? __('Contact Form', $this->prefix) : __('Form Maker', $this->prefix));
|
108 |
+
$this->slug = ($this->is_free == 2 ? 'contact-form-maker' : 'form-maker');
|
109 |
}
|
110 |
|
111 |
/**
|
209 |
// Enqueue block editor assets for Gutenberg.
|
210 |
add_filter('tw_get_block_editor_assets', array($this, 'register_block_editor_assets'));
|
211 |
add_action( 'enqueue_block_editor_assets', array($this, 'enqueue_block_editor_assets') );
|
212 |
+
|
213 |
// Privacy policy.
|
214 |
add_action( 'admin_init', array($this, 'add_privacy_policy_content') );
|
215 |
+
|
216 |
+
// Personal data export.
|
217 |
+
add_filter( 'wp_privacy_personal_data_exporters', array($this, 'register_privacy_personal_data_exporter') );
|
218 |
+
// Personal data erase.
|
219 |
+
add_filter( 'wp_privacy_personal_data_erasers', array($this, 'register_privacy_personal_data_eraser') );
|
220 |
}
|
221 |
+
|
222 |
function add_privacy_policy_content() {
|
223 |
if ( ! function_exists( 'wp_add_privacy_policy_content' ) ) {
|
224 |
return;
|
225 |
}
|
226 |
|
227 |
+
$content = __( 'When you leave a comment on this site, we send your name, email
|
228 |
+
address, IP address and comment text to example.com. Example.com does
|
229 |
+
not retain your personal data.', WDFMInstance(self::PLUGIN)->prefix );
|
230 |
|
231 |
wp_add_privacy_policy_content(
|
232 |
WDFMInstance(self::PLUGIN)->nicename,
|
234 |
);
|
235 |
}
|
236 |
|
237 |
+
public function register_privacy_personal_data_exporter( $exporters ) {
|
238 |
+
$exporters[ $this->slug ] = array(
|
239 |
+
'exporter_friendly_name' => $this->nicename,
|
240 |
+
'callback' => array( WDW_FM_Library(self::PLUGIN), 'privacy_personal_data_export' ),
|
241 |
+
);
|
242 |
+
return $exporters;
|
243 |
+
}
|
244 |
+
|
245 |
+
public function register_privacy_personal_data_eraser( $erasers ) {
|
246 |
+
$erasers[ $this->slug ] = array(
|
247 |
+
'eraser_friendly_name' => $this->nicename,
|
248 |
+
'callback' => array( WDW_FM_Library(self::PLUGIN), 'privacy_personal_data_erase' ),
|
249 |
+
);
|
250 |
+
return $erasers;
|
251 |
+
}
|
252 |
+
|
253 |
public function register_block_editor_assets($assets) {
|
254 |
$version = '2.0.0';
|
255 |
$js_path = $this->plugin_url . '/js/tw-gb/block.js';
|
948 |
* Activate plugin.
|
949 |
*/
|
950 |
public function form_maker_activate() {
|
951 |
+
global $wpdb;
|
952 |
if (!$this->is_free) {
|
953 |
deactivate_plugins("contact-form-maker/contact-form-maker.php");
|
954 |
delete_transient('fm_update_check');
|
955 |
}
|
956 |
$version = get_option("wd_form_maker_version");
|
957 |
$new_version = $this->db_version;
|
958 |
+
$option_key = ($this->is_free == 2 ? 'fmc_settings' : 'fm_settings');
|
959 |
require_once $this->plugin_dir . "/form_maker_insert.php";
|
960 |
if (!$version) {
|
961 |
if ($wpdb->get_var("SHOW TABLES LIKE '" . $wpdb->prefix . "formmaker'") == $wpdb->prefix . "formmaker") {
|
978 |
'post_type' => ($this->is_free == 2 ? 'cfmemailverification' : 'fmemailverification'),
|
979 |
);
|
980 |
$mail_verification_post_id = wp_insert_post($email_verification_post);
|
981 |
+
add_option($option_key, array('public_key' => '', 'private_key' => '', 'csv_delimiter' => ',', 'map_key' => '', 'ajax_export_per_page' => 1000));
|
|
|
982 |
$wpdb->update($wpdb->prefix . "formmaker", array(
|
983 |
'mail_verification_post_id' => $mail_verification_post_id,
|
984 |
), array('id' => 1), array(
|
1007 |
}
|
1008 |
update_option("wd_form_maker_version", $new_version);
|
1009 |
|
1010 |
+
if ( FALSE === $fm_settings = get_option($option_key) ) {
|
1011 |
$recaptcha_keys = $wpdb->get_row('SELECT `public_key`, `private_key` FROM ' . $wpdb->prefix . 'formmaker WHERE public_key!="" and private_key!=""', ARRAY_A);
|
1012 |
$public_key = isset($recaptcha_keys['public_key']) ? $recaptcha_keys['public_key'] : '';
|
1013 |
$private_key = isset($recaptcha_keys['private_key']) ? $recaptcha_keys['private_key'] : '';
|
1014 |
+
add_option($option_key, array('public_key' => $public_key, 'private_key' => $private_key, 'csv_delimiter' => ',', 'map_key' => '', 'ajax_export_per_page' => 1000));
|
1015 |
}
|
1016 |
}
|
1017 |
}
|
1131 |
*/
|
1132 |
function media_button($context) {
|
1133 |
ob_start();
|
1134 |
+
$url = add_query_arg(array('action' => 'FMShortocde' . $this->plugin_postfix, 'task' => 'forms', 'TB_iframe' => '1'), admin_url('admin-ajax.php'));
|
1135 |
?>
|
1136 |
<a onclick="tb_click.call(this); fm_set_shortcode_popup_dimensions(400, 140); return false;" href="<?php echo $url; ?>" class="button" title="<?php _e('Insert Form', $this->prefix); ?>">
|
1137 |
<span class="wp-media-buttons-icon" style="background: url('<?php echo $this->plugin_url; ?>/images/fm-media-form-button.png') no-repeat scroll left top rgba(0, 0, 0, 0);"></span>
|
css/form_maker_tables.css
CHANGED
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
#fm_admin_container {
|
2 |
display: inline-block;
|
3 |
width: 100%;
|
@@ -642,6 +645,20 @@ p.description {
|
|
642 |
width: 100px;
|
643 |
}
|
644 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
645 |
.col_id {
|
646 |
width: 130px;
|
647 |
}
|
@@ -1442,8 +1459,8 @@ table.admintable {
|
|
1442 |
max-width: 200px;
|
1443 |
}
|
1444 |
|
1445 |
-
.
|
1446 |
-
min-width: 55px;
|
1447 |
}
|
1448 |
.submit_content #submitsubmitdate_fc,
|
1449 |
.submit_content #submitterusername_fc,
|
@@ -1456,7 +1473,11 @@ table.admintable {
|
|
1456 |
max-width: 30px !important;
|
1457 |
text-align: left !important;
|
1458 |
}
|
1459 |
-
|
|
|
|
|
|
|
|
|
1460 |
.submitid_fc a {
|
1461 |
padding-left: 2px;
|
1462 |
}
|
@@ -2494,8 +2515,8 @@ button:focus {
|
|
2494 |
word-break: break-all;
|
2495 |
}
|
2496 |
|
2497 |
-
.
|
2498 |
-
.
|
2499 |
max-width: 200px;
|
2500 |
word-break: break-all;
|
2501 |
}
|
@@ -2564,14 +2585,14 @@ button:focus {
|
|
2564 |
|
2565 |
#field_container {
|
2566 |
display: inline-block;
|
2567 |
-
width: calc(60% +
|
2568 |
height: 100%;
|
2569 |
}
|
2570 |
#field_container.field_container_full {
|
2571 |
width: 100%;
|
2572 |
}
|
2573 |
#field_container .popup-body-col {
|
2574 |
-
width: calc(50% -
|
2575 |
}
|
2576 |
#field_container .popup-body-col:last-child {
|
2577 |
margin-right: 0;
|
1 |
+
.fm-remove_before:before {
|
2 |
+
content: "" !important;
|
3 |
+
}
|
4 |
#fm_admin_container {
|
5 |
display: inline-block;
|
6 |
width: 100%;
|
645 |
width: 100px;
|
646 |
}
|
647 |
|
648 |
+
@media screen and ( min-width: 1100px ), screen and ( max-width: 782px ) {
|
649 |
+
.wp-list-table .col_id {
|
650 |
+
width: 190px;
|
651 |
+
}
|
652 |
+
|
653 |
+
.wp-list-table .col_function {
|
654 |
+
width: 340px;
|
655 |
+
}
|
656 |
+
|
657 |
+
.wp-list-table .fm_php_function, .fm_shortcode {
|
658 |
+
width: 100%;
|
659 |
+
}
|
660 |
+
}
|
661 |
+
|
662 |
.col_id {
|
663 |
width: 130px;
|
664 |
}
|
1459 |
max-width: 200px;
|
1460 |
}
|
1461 |
|
1462 |
+
.fm-table-submissions #submitid_fc.submitid_fc {
|
1463 |
+
min-width: 55px !important;
|
1464 |
}
|
1465 |
.submit_content #submitsubmitdate_fc,
|
1466 |
.submit_content #submitterusername_fc,
|
1473 |
max-width: 30px !important;
|
1474 |
text-align: left !important;
|
1475 |
}
|
1476 |
+
#fm-submission-lists .fm-show-column {
|
1477 |
+
}
|
1478 |
+
#fm-submission-lists .fm-hide-column {
|
1479 |
+
display:none;
|
1480 |
+
}
|
1481 |
.submitid_fc a {
|
1482 |
padding-left: 2px;
|
1483 |
}
|
2515 |
word-break: break-all;
|
2516 |
}
|
2517 |
|
2518 |
+
.fm-table-submissions td,
|
2519 |
+
.fm-table-submissions th {
|
2520 |
max-width: 200px;
|
2521 |
word-break: break-all;
|
2522 |
}
|
2585 |
|
2586 |
#field_container {
|
2587 |
display: inline-block;
|
2588 |
+
width: calc(60% + 15px);
|
2589 |
height: 100%;
|
2590 |
}
|
2591 |
#field_container.field_container_full {
|
2592 |
width: 100%;
|
2593 |
}
|
2594 |
#field_container .popup-body-col {
|
2595 |
+
width: calc(50% - 8px);
|
2596 |
}
|
2597 |
#field_container .popup-body-col:last-child {
|
2598 |
margin-right: 0;
|
css/style.css
CHANGED
@@ -1368,21 +1368,25 @@ li.pp_selected > span {
|
|
1368 |
.fm-bulk-actions span.show-filter.hide {
|
1369 |
display: none;
|
1370 |
}
|
1371 |
-
.
|
1372 |
color: #0073aa;
|
1373 |
}
|
1374 |
-
.
|
1375 |
-
.
|
1376 |
width: 100%;
|
1377 |
overflow-x: scroll;
|
1378 |
overflow-y:hidden;
|
1379 |
-
|
1380 |
-
.
|
1381 |
-
|
|
|
|
|
|
|
|
|
1382 |
overflow:hidden;
|
1383 |
}
|
1384 |
-
.
|
1385 |
-
.
|
1386 |
width:150px;
|
1387 |
}
|
1388 |
.table-wrapper-1.no-scroll,
|
@@ -1395,8 +1399,8 @@ li.pp_selected > span {
|
|
1395 |
display: none !important;
|
1396 |
}
|
1397 |
|
1398 |
-
.
|
1399 |
-
.
|
1400 |
overflow-x: hidden !important;
|
1401 |
}
|
1402 |
}
|
@@ -1412,28 +1416,28 @@ li.pp_selected > span {
|
|
1412 |
margin: 0 0 5px 0;
|
1413 |
}
|
1414 |
|
1415 |
-
.
|
1416 |
display: inline-block;
|
1417 |
width: 70px;
|
1418 |
}
|
1419 |
-
.
|
1420 |
display: inline-block;
|
1421 |
width: 70px;
|
1422 |
}
|
1423 |
-
.
|
1424 |
display: inline-block;
|
1425 |
width: 70px;
|
1426 |
}
|
1427 |
-
.
|
1428 |
display:inline-block;
|
1429 |
min-width:200px;
|
1430 |
}
|
1431 |
-
.
|
1432 |
display: inline-block;
|
1433 |
line-height: 20px;
|
1434 |
vertical-align: top;
|
1435 |
}
|
1436 |
-
.
|
1437 |
font-size: 16px;
|
1438 |
font-weight: 400;
|
1439 |
margin: 0;
|
1368 |
.fm-bulk-actions span.show-filter.hide {
|
1369 |
display: none;
|
1370 |
}
|
1371 |
+
.fm-table-submissions .payment_info_fc {
|
1372 |
color: #0073aa;
|
1373 |
}
|
1374 |
+
.fm-table-submissions .table-wrapper-1,
|
1375 |
+
.fm-table-submissions .table-wrapper-2 {
|
1376 |
width: 100%;
|
1377 |
overflow-x: scroll;
|
1378 |
overflow-y:hidden;
|
1379 |
+
}
|
1380 |
+
.fm-table-submissions .table-wrapper-1.fixed {
|
1381 |
+
position: fixed;
|
1382 |
+
top:15px;
|
1383 |
+
}
|
1384 |
+
.fm-table-submissions .table-scroll-1 { height: 20px; }
|
1385 |
+
.fm-table-submissions .submit_content {
|
1386 |
overflow:hidden;
|
1387 |
}
|
1388 |
+
.fm-table-submissions th.col_id a { min-width: 40px; }
|
1389 |
+
.fm-table-submissions .col-submit-date {
|
1390 |
width:150px;
|
1391 |
}
|
1392 |
.table-wrapper-1.no-scroll,
|
1399 |
display: none !important;
|
1400 |
}
|
1401 |
|
1402 |
+
.fm-table-submissions .table-wrapper-1,
|
1403 |
+
.fm-table-submissions .table-wrapper-2 {
|
1404 |
overflow-x: hidden !important;
|
1405 |
}
|
1406 |
}
|
1416 |
margin: 0 0 5px 0;
|
1417 |
}
|
1418 |
|
1419 |
+
.fm-table-submissions_edit .wd-table .type_range input {
|
1420 |
display: inline-block;
|
1421 |
width: 70px;
|
1422 |
}
|
1423 |
+
.fm-table-submissions_edit .wd-table .type_grading .grading-inputs label {
|
1424 |
display: inline-block;
|
1425 |
width: 70px;
|
1426 |
}
|
1427 |
+
.fm-table-submissions_edit .wd-table .type_grading .grading-inputs input {
|
1428 |
display: inline-block;
|
1429 |
width: 70px;
|
1430 |
}
|
1431 |
+
.fm-table-submissions_edit .non-editable label {
|
1432 |
display:inline-block;
|
1433 |
min-width:200px;
|
1434 |
}
|
1435 |
+
.fm-table-submissions_edit .non-editable span {
|
1436 |
display: inline-block;
|
1437 |
line-height: 20px;
|
1438 |
vertical-align: top;
|
1439 |
}
|
1440 |
+
.fm-table-submissions_edit .form-title {
|
1441 |
font-size: 16px;
|
1442 |
font-weight: 400;
|
1443 |
margin: 0;
|
css/style_submissions.css
CHANGED
@@ -105,6 +105,10 @@
|
|
105 |
font-size: 12px;
|
106 |
font-style: italic;
|
107 |
}
|
|
|
|
|
|
|
|
|
108 |
.tablenav .tablenav-pages a.disabled,
|
109 |
.tablenav .tablenav-pages a.disabled:active,
|
110 |
.tablenav .tablenav-pages a.disabled:focus,
|
105 |
font-size: 12px;
|
106 |
font-style: italic;
|
107 |
}
|
108 |
+
.tablenav .tablenav-pages .current_page {
|
109 |
+
width:15%;
|
110 |
+
text-align: center;
|
111 |
+
}
|
112 |
.tablenav .tablenav-pages a.disabled,
|
113 |
.tablenav .tablenav-pages a.disabled:active,
|
114 |
.tablenav .tablenav-pages a.disabled:focus,
|
form_maker_insert.php
CHANGED
@@ -80,6 +80,7 @@ class WDCFMInsert {
|
|
80 |
`header_image_animation` varchar(200) NOT NULL,
|
81 |
`header_hide_image` tinyint(4) NOT NULL DEFAULT '1',
|
82 |
`jsversion` int(11) NOT NULL,
|
|
|
83 |
PRIMARY KEY (`id`)
|
84 |
) " . $charset_collate . ";";
|
85 |
$wpdb->query($formmaker);
|
@@ -277,12 +278,13 @@ class WDCFMInsert {
|
|
277 |
`mail_verify` tinyint(4) NOT NULL DEFAULT '0',
|
278 |
`mail_verify_expiretime` float NOT NULL,
|
279 |
`mail_verification_post_id` int(11) NOT NULL,
|
280 |
-
|
281 |
`header_title` varchar(255) NOT NULL,
|
282 |
`header_description` text NOT NULL,
|
283 |
`header_image_url` varchar(255) NOT NULL,
|
284 |
`header_image_animation` varchar(200) NOT NULL,
|
285 |
`header_hide_image` tinyint(4) NOT NULL DEFAULT '1',
|
|
|
286 |
PRIMARY KEY (`backup_id`)
|
287 |
) " . $charset_collate . ";";
|
288 |
$wpdb->query($formmaker_backup);
|
@@ -294,17 +296,17 @@ class WDCFMInsert {
|
|
294 |
$form_maker_row = $wpdb->get_var('SELECT * FROM ' . $wpdb->prefix . 'formmaker' . (!WDFMInstance(self::PLUGIN)->is_free ? '' : ' WHERE id' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')'));
|
295 |
if ( !$form_maker_row ) {
|
296 |
$insert_form_id = array();
|
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, '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=\"true\" 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}\r\n// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \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');");
|
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, '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=\"true\" 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}// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \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');");
|
300 |
$insert_form_id[] = $wpdb->insert_id;
|
301 |
|
302 |
if ( WDFMInstance(self::PLUGIN)->is_free != 2 ) {
|
303 |
-
$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=\"true\" 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}// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \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.', '" . WDFMInstance(self::PLUGIN)->plugin_url . "/images/demo/2.png', 'flash', '0', '0');");
|
304 |
$insert_form_id[] = $wpdb->insert_id;
|
305 |
-
$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=\"true\" 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}// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \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');");
|
306 |
$insert_form_id[] = $wpdb->insert_id;
|
307 |
-
$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=\"true\" 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}// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \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');");
|
308 |
$insert_form_id[] = $wpdb->insert_id;
|
309 |
}
|
310 |
else {
|
80 |
`header_image_animation` varchar(200) NOT NULL,
|
81 |
`header_hide_image` tinyint(4) NOT NULL DEFAULT '1',
|
82 |
`jsversion` int(11) NOT NULL,
|
83 |
+
`privacy` longtext NOT NULL,
|
84 |
PRIMARY KEY (`id`)
|
85 |
) " . $charset_collate . ";";
|
86 |
$wpdb->query($formmaker);
|
278 |
`mail_verify` tinyint(4) NOT NULL DEFAULT '0',
|
279 |
`mail_verify_expiretime` float NOT NULL,
|
280 |
`mail_verification_post_id` int(11) NOT NULL,
|
281 |
+
`save_uploads` tinyint(4) NOT NULL DEFAULT '1',
|
282 |
`header_title` varchar(255) NOT NULL,
|
283 |
`header_description` text NOT NULL,
|
284 |
`header_image_url` varchar(255) NOT NULL,
|
285 |
`header_image_animation` varchar(200) NOT NULL,
|
286 |
`header_hide_image` tinyint(4) NOT NULL DEFAULT '1',
|
287 |
+
`privacy` longtext NOT NULL,
|
288 |
PRIMARY KEY (`backup_id`)
|
289 |
) " . $charset_collate . ";";
|
290 |
$wpdb->query($formmaker_backup);
|
296 |
$form_maker_row = $wpdb->get_var('SELECT * FROM ' . $wpdb->prefix . 'formmaker' . (!WDFMInstance(self::PLUGIN)->is_free ? '' : ' WHERE id' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')'));
|
297 |
if ( !$form_maker_row ) {
|
298 |
$insert_form_id = array();
|
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`, `privacy`) 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=\"true\" 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}\r\n// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \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', '*', '{adminemail}', '', '', '', '1', '', '{adminemail}', '', '', '', '', '', '', '', '', '', '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', '');");
|
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`, `privacy`) 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=\"true\" 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}// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \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', '*', '{adminemail}', '', '', '', '1', '', '{adminemail}', '', '', '', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '0', '1', '', '', '', 'none', '0', '0', '');");
|
302 |
$insert_form_id[] = $wpdb->insert_id;
|
303 |
|
304 |
if ( WDFMInstance(self::PLUGIN)->is_free != 2 ) {
|
305 |
+
$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`, `privacy`) 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=\"true\" 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}// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \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', '*', '{adminemail}', '', '', '', '1', '', '{adminemail}', '', '', '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.', '" . WDFMInstance(self::PLUGIN)->plugin_url . "/images/demo/2.png', 'flash', '0', '0', '');");
|
306 |
$insert_form_id[] = $wpdb->insert_id;
|
307 |
+
$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`, `privacy`) 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=\"true\" 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}// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \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', '*', '{adminemail}', '', '', '', '1', '', '{adminemail}', '', '', '', '', '', '', '', '', '', '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', '');");
|
308 |
$insert_form_id[] = $wpdb->insert_id;
|
309 |
+
$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`, `privacy`) 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=\"true\" 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}// Occurs after form is submitted and reloaded\r\nfunction after_submit() {\r\n \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', '*', '{adminemail}', '', '', '', '1', '', '{adminemail}', '', '', '', '', '', '', '', '', '', '1', '1', '1', '1', 'administrator,', '1', '', '', '0', '0', '0', '0', '1', 'Cupcake Order Form', '', '', 'none', '1', '0', '');");
|
310 |
$insert_form_id[] = $wpdb->insert_id;
|
311 |
}
|
312 |
else {
|
form_maker_update.php
CHANGED
@@ -9,6 +9,7 @@ class WDCFMUpdate {
|
|
9 |
*
|
10 |
* @param $version
|
11 |
*/
|
|
|
12 |
public static function form_maker_update($version) {
|
13 |
global $wpdb;
|
14 |
if (version_compare($version, '1.7.0') == -1) {
|
@@ -254,6 +255,10 @@ class WDCFMUpdate {
|
|
254 |
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=" . $group_id;
|
255 |
$wpdb->query($formmaker_groups);
|
256 |
}
|
|
|
|
|
|
|
|
|
257 |
return;
|
258 |
}
|
259 |
}
|
9 |
*
|
10 |
* @param $version
|
11 |
*/
|
12 |
+
//TODO. $version is undefine need set default value.
|
13 |
public static function form_maker_update($version) {
|
14 |
global $wpdb;
|
15 |
if (version_compare($version, '1.7.0') == -1) {
|
255 |
) DEFAULT CHARSET=utf8 AUTO_INCREMENT=" . $group_id;
|
256 |
$wpdb->query($formmaker_groups);
|
257 |
}
|
258 |
+
if (version_compare($version, '1.12.31') == -1) {
|
259 |
+
$wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker` ADD `privacy` longtext NOT NULL DEFAULT ''");
|
260 |
+
$wpdb->query("ALTER TABLE `" . $wpdb->prefix . "formmaker_backup` ADD `privacy` longtext NOT NULL DEFAULT ''");
|
261 |
+
}
|
262 |
return;
|
263 |
}
|
264 |
}
|
framework/WDW_FM_Library.php
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
class WDW_FMC_Library {
|
4 |
/**
|
5 |
* PLUGIN = 2 points to Contact Form Maker
|
@@ -916,7 +915,7 @@ class WDW_FMC_Library {
|
|
916 |
$row->scrollbox_closing = 1;
|
917 |
$row->scrollbox_minimize = 1;
|
918 |
$row->scrollbox_minimize_text = '';
|
919 |
-
$row->display_on = '
|
920 |
$row->posts_include = '';
|
921 |
$row->pages_include = '';
|
922 |
$row->display_on_categories = '';
|
@@ -3896,12 +3895,16 @@ class WDW_FMC_Library {
|
|
3896 |
function onsubmit_js<?php echo $form_id ?>() {
|
3897 |
<?php echo $onsubmit_js; ?>
|
3898 |
}
|
3899 |
-
jQuery(window).load
|
3900 |
-
|
|
|
|
|
3901 |
});
|
3902 |
form_view_count<?php echo $form_id ?> = 0;
|
3903 |
jQuery(document).ready(function () {
|
3904 |
-
|
|
|
|
|
3905 |
});
|
3906 |
<?php
|
3907 |
$js_content = ob_get_clean();
|
@@ -3917,48 +3920,29 @@ class WDW_FMC_Library {
|
|
3917 |
* @return array
|
3918 |
*/
|
3919 |
public static function get_submissions_to_export() {
|
3920 |
-
|
3921 |
-
|
3922 |
-
|
3923 |
-
|
3924 |
-
|
3925 |
-
|
3926 |
-
|
3927 |
-
|
3928 |
-
|
3929 |
-
|
3930 |
-
|
3931 |
-
|
3932 |
-
|
3933 |
-
|
3934 |
-
|
3935 |
-
|
3936 |
-
|
3937 |
-
|
3938 |
-
|
3939 |
-
|
3940 |
-
|
3941 |
-
|
3942 |
-
|
3943 |
-
$paypal_info_labels = array(
|
3944 |
-
'Currency',
|
3945 |
-
'Last modified',
|
3946 |
-
'Status',
|
3947 |
-
'Full Name',
|
3948 |
-
'Fax',
|
3949 |
-
'Mobile phone',
|
3950 |
-
'Email',
|
3951 |
-
'Phone',
|
3952 |
-
'Address',
|
3953 |
-
'Paypal info',
|
3954 |
-
'IPN',
|
3955 |
-
'Tax',
|
3956 |
-
'Shipping',
|
3957 |
-
);
|
3958 |
-
if ( $search_labels ) {
|
3959 |
-
$query = $wpdb->prepare("SELECT distinct group_id FROM " . $wpdb->prefix . "formmaker_submits where form_id=%d and group_id IN(" . $search_labels . ")", $form_id);
|
3960 |
-
$group_id_s = $wpdb->get_col($query);
|
3961 |
-
}
|
3962 |
$query = $wpdb->prepare("SELECT distinct element_label FROM " . $wpdb->prefix . "formmaker_submits where form_id=%d", $form_id);
|
3963 |
$labels = $wpdb->get_col($query);
|
3964 |
$query_lable = $wpdb->prepare("SELECT label_order,title FROM " . $wpdb->prefix . "formmaker where id=%d", $form_id);
|
@@ -3999,15 +3983,14 @@ class WDW_FMC_Library {
|
|
3999 |
$m = count($sorted_labels);
|
4000 |
$wpdb->query("SET SESSION group_concat_max_len = 1000000");
|
4001 |
$rows = array();
|
4002 |
-
if ( $
|
4003 |
-
|
4004 |
-
|
4005 |
}
|
4006 |
$data = array();
|
4007 |
-
|
4008 |
-
|
4009 |
-
|
4010 |
-
$i = $group_id_s[$www];
|
4011 |
$field_key = array_search($i, $label_id);
|
4012 |
if ( $label_type[$field_key] != 'type_arithmetic_captcha'
|
4013 |
&& $label_type[$field_key] != 'type_stripe' ) {
|
@@ -4177,19 +4160,19 @@ class WDW_FMC_Library {
|
|
4177 |
if ( $is_paypal_info ) {
|
4178 |
foreach ( $paypal_info_fields as $key => $paypal_info_field ) {
|
4179 |
if ( $paypal_info ) {
|
4180 |
-
$data_temp['PAYPAL_' . $
|
4181 |
}
|
4182 |
else {
|
4183 |
-
$data_temp['PAYPAL_' . $
|
4184 |
}
|
4185 |
}
|
4186 |
}
|
4187 |
$data[$i] = $data_temp;
|
4188 |
}
|
4189 |
}
|
4190 |
-
|
4191 |
-
|
4192 |
-
|
4193 |
|
4194 |
return $params;
|
4195 |
}
|
@@ -4205,7 +4188,7 @@ class WDW_FMC_Library {
|
|
4205 |
$title = ($title != '') ? strtolower($title) : 'items';
|
4206 |
ob_start();
|
4207 |
?><tr class="no-items">
|
4208 |
-
<td class="colspanchange" colspan="0"><?php echo sprintf(__('No %s found.', WDFMInstance(self::PLUGIN)->prefix), $title); ?></td>
|
4209 |
</tr><?php
|
4210 |
return ob_get_clean();
|
4211 |
}
|
@@ -5101,6 +5084,122 @@ class WDW_FMC_Library {
|
|
5101 |
@session_start();
|
5102 |
}
|
5103 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5104 |
}
|
5105 |
|
5106 |
/*
|
1 |
<?php
|
|
|
2 |
class WDW_FMC_Library {
|
3 |
/**
|
4 |
* PLUGIN = 2 points to Contact Form Maker
|
915 |
$row->scrollbox_closing = 1;
|
916 |
$row->scrollbox_minimize = 1;
|
917 |
$row->scrollbox_minimize_text = '';
|
918 |
+
$row->display_on = 'home,post,page';
|
919 |
$row->posts_include = '';
|
920 |
$row->pages_include = '';
|
921 |
$row->display_on_categories = '';
|
3895 |
function onsubmit_js<?php echo $form_id ?>() {
|
3896 |
<?php echo $onsubmit_js; ?>
|
3897 |
}
|
3898 |
+
jQuery(window).on('load', function () {
|
3899 |
+
if (jQuery('form#form<?php echo $form_id ?> .wdform_section').length > 0) {
|
3900 |
+
formOnload(<?php echo $form_id ?>);
|
3901 |
+
}
|
3902 |
});
|
3903 |
form_view_count<?php echo $form_id ?> = 0;
|
3904 |
jQuery(document).ready(function () {
|
3905 |
+
if (jQuery('form#form<?php echo $form_id ?> .wdform_section').length > 0) {
|
3906 |
+
fm_document_ready(<?php echo $form_id ?>);
|
3907 |
+
}
|
3908 |
});
|
3909 |
<?php
|
3910 |
$js_content = ob_get_clean();
|
3920 |
* @return array
|
3921 |
*/
|
3922 |
public static function get_submissions_to_export() {
|
3923 |
+
global $wpdb;
|
3924 |
+
$params = array();
|
3925 |
+
$form_id = (int) $_REQUEST['form_id'];
|
3926 |
+
$limitstart = (int) $_REQUEST['limitstart'];
|
3927 |
+
$page_num = (int) $_REQUEST['page_num'];
|
3928 |
+
$search_labels = isset($_REQUEST['search_labels']) ? $_REQUEST['search_labels'] : '';
|
3929 |
+
$groupids = !empty($_REQUEST['groupids']) ? explode(',', $_REQUEST['groupids']) : '';
|
3930 |
+
$verified_emails = isset($_REQUEST['verified_emails']) ? json_decode(stripslashes($_REQUEST['verified_emails']), TRUE) : array();
|
3931 |
+
$paypal_info_fields = array(
|
3932 |
+
'currency' => 'Currency',
|
3933 |
+
'ord_last_modified' => 'Last modified',
|
3934 |
+
'status' => 'Status',
|
3935 |
+
'full_name' => 'Full Name',
|
3936 |
+
'fax' => 'Fax',
|
3937 |
+
'mobile_phone' => 'Mobile phone',
|
3938 |
+
'email' => 'Email',
|
3939 |
+
'phone' => 'Phone',
|
3940 |
+
'address' => 'Address',
|
3941 |
+
'paypal_info' => 'Paypal info',
|
3942 |
+
'ipn' => 'IPN',
|
3943 |
+
'tax' => 'Tax',
|
3944 |
+
'shipping' => 'Shipping'
|
3945 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3946 |
$query = $wpdb->prepare("SELECT distinct element_label FROM " . $wpdb->prefix . "formmaker_submits where form_id=%d", $form_id);
|
3947 |
$labels = $wpdb->get_col($query);
|
3948 |
$query_lable = $wpdb->prepare("SELECT label_order,title FROM " . $wpdb->prefix . "formmaker where id=%d", $form_id);
|
3983 |
$m = count($sorted_labels);
|
3984 |
$wpdb->query("SET SESSION group_concat_max_len = 1000000");
|
3985 |
$rows = array();
|
3986 |
+
if ( !empty($groupids) ) {
|
3987 |
+
$query = $wpdb->prepare("SELECT `group_id`, `ip`, `date`, `user_id_wd`, GROUP_CONCAT( element_label SEPARATOR ',') AS `element_label`, GROUP_CONCAT( element_value SEPARATOR '*:*el_value*:*') AS `element_value` FROM " . $wpdb->prefix . "formmaker_submits WHERE `form_id` = %d and `group_id` IN(" . implode($groupids,',') . ") GROUP BY `group_id` ORDER BY `date` ASC", $form_id);
|
3988 |
+
$rows = $wpdb->get_results($query, OBJECT_K);
|
3989 |
}
|
3990 |
$data = array();
|
3991 |
+
$is_paypal_info = FALSE;
|
3992 |
+
for ( $www = 0; $www < count($groupids); $www++ ) {
|
3993 |
+
$i = $groupids[$www];
|
|
|
3994 |
$field_key = array_search($i, $label_id);
|
3995 |
if ( $label_type[$field_key] != 'type_arithmetic_captcha'
|
3996 |
&& $label_type[$field_key] != 'type_stripe' ) {
|
4160 |
if ( $is_paypal_info ) {
|
4161 |
foreach ( $paypal_info_fields as $key => $paypal_info_field ) {
|
4162 |
if ( $paypal_info ) {
|
4163 |
+
$data_temp['PAYPAL_' . $paypal_info_field ] = $paypal_info[0]->$key;
|
4164 |
}
|
4165 |
else {
|
4166 |
+
$data_temp['PAYPAL_' . $paypal_info_field ] = '';
|
4167 |
}
|
4168 |
}
|
4169 |
}
|
4170 |
$data[$i] = $data_temp;
|
4171 |
}
|
4172 |
}
|
4173 |
+
array_push($params, $data);
|
4174 |
+
array_push($params, $title);
|
4175 |
+
array_push($params, $is_paypal_info);
|
4176 |
|
4177 |
return $params;
|
4178 |
}
|
4188 |
$title = ($title != '') ? strtolower($title) : 'items';
|
4189 |
ob_start();
|
4190 |
?><tr class="no-items">
|
4191 |
+
<td class="colspanchange fm-column-not-hide" colspan="0"><?php echo sprintf(__('No %s found.', WDFMInstance(self::PLUGIN)->prefix), $title); ?></td>
|
4192 |
</tr><?php
|
4193 |
return ob_get_clean();
|
4194 |
}
|
5084 |
@session_start();
|
5085 |
}
|
5086 |
}
|
5087 |
+
|
5088 |
+
public static function not_display_posts() {
|
5089 |
+
return array('fmemailverification','cfmemailverification','form-maker','form-maker_fmc');
|
5090 |
+
}
|
5091 |
+
|
5092 |
+
public static function get_user_submission_ids( $email_address ) {
|
5093 |
+
global $wpdb;
|
5094 |
+
$user = get_user_by( 'email', $email_address );
|
5095 |
+
$query = 'SELECT DISTINCT submits.`form_id`, form.`title`, submits.`group_id` FROM ' . $wpdb->prefix . 'formmaker_submits as submits INNER JOIN ' . $wpdb->prefix . 'formmaker as form ON submits.form_id=form.id WHERE submits.`element_value`=\'' . $email_address . '\'' . ($user ? ' OR submits.`user_id_wd`=' . $user->ID : '') . (!WDFMInstance(self::PLUGIN)->is_free ? '' : ' AND submits.form_id' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option( 'contact_form_forms', '' ) != '' ? get_option( 'contact_form_forms' ) : 0) . ')') . ' ORDER BY submits.`form_id`';
|
5096 |
+
$results = $wpdb->get_results($query);
|
5097 |
+
return $results;
|
5098 |
+
}
|
5099 |
+
|
5100 |
+
public static function get_submission_by_id( $group_id ) {
|
5101 |
+
global $wpdb;
|
5102 |
+
$query = 'SELECT * FROM ' . $wpdb->prefix . 'formmaker_submits WHERE `group_id`=' . (int) $group_id;
|
5103 |
+
$results = $wpdb->get_results($query);
|
5104 |
+
return $results;
|
5105 |
+
}
|
5106 |
+
|
5107 |
+
public static function delete_user_submissions( $email_address ) {
|
5108 |
+
global $wpdb;
|
5109 |
+
$submission_ids = self::get_user_submission_ids( $email_address );
|
5110 |
+
$ids = array();
|
5111 |
+
foreach ($submission_ids as $id) {
|
5112 |
+
$ids[] = $id->group_id;
|
5113 |
+
}
|
5114 |
+
$ids = implode(',', $ids);
|
5115 |
+
$query = 'DELETE FROM ' . $wpdb->prefix . 'formmaker_sessions WHERE group_id IN (' . $ids . ')';
|
5116 |
+
$deleted = $wpdb->query($query);
|
5117 |
+
$query = 'DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id IN (' . $ids . ')';
|
5118 |
+
$deleted = $deleted || $wpdb->query($query);
|
5119 |
+
return $deleted;
|
5120 |
+
}
|
5121 |
+
|
5122 |
+
public static function privacy_personal_data_export ( $email_address, $page = 1 ) {
|
5123 |
+
$export_items = array();
|
5124 |
+
|
5125 |
+
$submission_ids = self::get_user_submission_ids( $email_address );
|
5126 |
+
if ($submission_ids) {
|
5127 |
+
require_once WDFMInstance(self::PLUGIN)->plugin_dir . '/admin/models/model.php';
|
5128 |
+
require_once WDFMInstance(self::PLUGIN)->plugin_dir . '/admin/models/Submissions_fm.php';
|
5129 |
+
$model_class = self::PLUGIN == 2 ? 'FMModelSubmissions_fmc' : 'FMModelSubmissions_fm';
|
5130 |
+
$model = new $model_class();
|
5131 |
+
$form_id = 0;
|
5132 |
+
$label_parameters = array();
|
5133 |
+
foreach ($submission_ids as $submission_id) {
|
5134 |
+
if ($submission_id->form_id != $form_id) {
|
5135 |
+
$form_id = $submission_id->form_id;
|
5136 |
+
$label_parameters = $model->get_labels_parameters($form_id);
|
5137 |
+
}
|
5138 |
+
$data = array();
|
5139 |
+
$submission = self::get_submission_by_id($submission_id->group_id);
|
5140 |
+
if ( $submission ) {
|
5141 |
+
$data[] = array(
|
5142 |
+
'name' => __( 'Form Title', WDFMInstance(self::PLUGIN)->prefix ),
|
5143 |
+
'value' => $submission_id->title
|
5144 |
+
);
|
5145 |
+
// Selecting this each time as any user could submit a data containing $email_address.
|
5146 |
+
$user = get_user_by( 'id', $submission[0]->user_id_wd );
|
5147 |
+
if ($user) {
|
5148 |
+
$data[] = array(
|
5149 |
+
'name' => __( 'Submitter Name', WDFMInstance( self::PLUGIN )->prefix ),
|
5150 |
+
'value' => $user->display_name
|
5151 |
+
);
|
5152 |
+
$data[] = array(
|
5153 |
+
'name' => __( 'Submitter Email', WDFMInstance( self::PLUGIN )->prefix ),
|
5154 |
+
'value' => $user->user_email
|
5155 |
+
);
|
5156 |
+
}
|
5157 |
+
$data[] = array(
|
5158 |
+
'name' => __( 'Submitter IP', WDFMInstance(self::PLUGIN)->prefix ),
|
5159 |
+
'value' => $submission[0]->ip
|
5160 |
+
);
|
5161 |
+
$data[] = array(
|
5162 |
+
'name' => __( 'Submission Date', WDFMInstance(self::PLUGIN)->prefix ),
|
5163 |
+
'value' => $submission[0]->date
|
5164 |
+
);
|
5165 |
+
foreach ( $submission as $row ) {
|
5166 |
+
$element_label = $label_parameters[3][array_search($row->element_label, $label_parameters[0])];
|
5167 |
+
$data[] = array(
|
5168 |
+
'name' => $element_label,
|
5169 |
+
'value' => $row->element_value
|
5170 |
+
);
|
5171 |
+
}
|
5172 |
+
}
|
5173 |
+
|
5174 |
+
$item_id = WDFMInstance(self::PLUGIN)->slug . '-submission-' . $submission_id->group_id;
|
5175 |
+
// This is nor submission group_id.
|
5176 |
+
$group_id = WDFMInstance(self::PLUGIN)->slug;
|
5177 |
+
$group_label = WDFMInstance(self::PLUGIN)->nicename . __( ' Submissions', WDFMInstance(self::PLUGIN)->prefix );
|
5178 |
+
$export_items[] = array(
|
5179 |
+
'group_id' => $group_id,
|
5180 |
+
'group_label' => $group_label,
|
5181 |
+
'item_id' => $item_id,
|
5182 |
+
'data' => $data,
|
5183 |
+
);
|
5184 |
+
}
|
5185 |
+
}
|
5186 |
+
|
5187 |
+
return array(
|
5188 |
+
'data' => $export_items,
|
5189 |
+
'done' => true,
|
5190 |
+
);
|
5191 |
+
}
|
5192 |
+
|
5193 |
+
public static function privacy_personal_data_erase( $email_address, $page = 1 ) {
|
5194 |
+
$items_removed = self::delete_user_submissions( $email_address );
|
5195 |
+
|
5196 |
+
return array(
|
5197 |
+
'items_removed' => $items_removed,
|
5198 |
+
'items_retained' => false,
|
5199 |
+
'messages' => array(sprintf(__('All personal data and submissions of this user found in %s plugin were removed.', WDFMInstance(self::PLUGIN)->prefix), WDFMInstance(self::PLUGIN)->nicename)),
|
5200 |
+
'done' => true,
|
5201 |
+
);
|
5202 |
+
}
|
5203 |
}
|
5204 |
|
5205 |
/*
|
frontend/controllers/form_maker.php
CHANGED
@@ -33,24 +33,24 @@ class FMControllerForm_maker_fmc {
|
|
33 |
/**
|
34 |
* Execute.
|
35 |
*
|
36 |
-
* @param
|
37 |
* @param string $type
|
38 |
*
|
39 |
* @return string|void
|
40 |
*/
|
41 |
-
public function execute( $id, $type = 'embedded' ) {
|
42 |
return $this->display($id, $type);
|
43 |
}
|
44 |
|
45 |
/**
|
46 |
* Display.
|
47 |
*
|
48 |
-
* @param $id
|
49 |
-
* @param $type
|
50 |
*
|
51 |
* @return string|void
|
52 |
*/
|
53 |
-
public function display( $id, $type ) {
|
54 |
$fm_settings = get_option(WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
|
55 |
if ( $type == 'embedded' ) {
|
56 |
$result = $this->model->showform($id, $type);
|
@@ -72,7 +72,14 @@ class FMControllerForm_maker_fmc {
|
|
72 |
}
|
73 |
}
|
74 |
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
$fm_forms = array();
|
77 |
|
78 |
foreach ($forms as $key => $form) {
|
@@ -191,9 +198,17 @@ class FMControllerForm_maker_fmc {
|
|
191 |
$this->model->remove($ok);
|
192 |
}
|
193 |
$this->model->increment_views_count($id);
|
194 |
-
|
195 |
-
|
196 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
197 |
}
|
198 |
|
199 |
return implode($fm_forms);
|
33 |
/**
|
34 |
* Execute.
|
35 |
*
|
36 |
+
* @param int $id
|
37 |
* @param string $type
|
38 |
*
|
39 |
* @return string|void
|
40 |
*/
|
41 |
+
public function execute( $id = 0, $type = 'embedded' ) {
|
42 |
return $this->display($id, $type);
|
43 |
}
|
44 |
|
45 |
/**
|
46 |
* Display.
|
47 |
*
|
48 |
+
* @param int $id
|
49 |
+
* @param string $type
|
50 |
*
|
51 |
* @return string|void
|
52 |
*/
|
53 |
+
public function display( $id = 0, $type = '' ) {
|
54 |
$fm_settings = get_option(WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
|
55 |
if ( $type == 'embedded' ) {
|
56 |
$result = $this->model->showform($id, $type);
|
72 |
}
|
73 |
}
|
74 |
|
75 |
+
/**
|
76 |
+
* Autoload form.
|
77 |
+
*
|
78 |
+
* @param array $forms
|
79 |
+
* @param array $fm_settings
|
80 |
+
* @return string
|
81 |
+
*/
|
82 |
+
public function autoload_form( $forms = array(), $fm_settings = array() ) {
|
83 |
$fm_forms = array();
|
84 |
|
85 |
foreach ($forms as $key => $form) {
|
198 |
$this->model->remove($ok);
|
199 |
}
|
200 |
$this->model->increment_views_count($id);
|
201 |
+
$params = array();
|
202 |
+
$params['id'] = $id;
|
203 |
+
$params['type'] = $type;
|
204 |
+
$params['form'] = $form;
|
205 |
+
$params['display_on_this'] = $display_on_this;
|
206 |
+
$params['show_for_admin'] = $show_for_admin;
|
207 |
+
$params['form_result'] = $form_result;
|
208 |
+
$params['fm_settings'] = $fm_settings;
|
209 |
+
$params['error'] = $error;
|
210 |
+
$params['message'] = $message;
|
211 |
+
$fm_forms[$id] = $this->view->autoload_form( $params );
|
212 |
}
|
213 |
|
214 |
return implode($fm_forms);
|
frontend/models/form_maker.php
CHANGED
@@ -19,7 +19,7 @@ class FMModelForm_maker_fmc {
|
|
19 |
*
|
20 |
* @return array
|
21 |
*/
|
22 |
-
public function showform( $id, $type = 'embedded' ) {
|
23 |
global $wpdb;
|
24 |
$row = $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"' . (!WDFMInstance(self::PLUGIN)->is_free ? '' : ' AND id' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option( 'contact_form_forms', '' ) != '' ? get_option( 'contact_form_forms' ) : 0) . ')'), $id ) );
|
25 |
|
@@ -101,7 +101,7 @@ class FMModelForm_maker_fmc {
|
|
101 |
* @param $value
|
102 |
* @param $key
|
103 |
*/
|
104 |
-
public static function set_empty_values_transparent( &$value, $key ) {
|
105 |
if ( strpos( $key, 'Color' ) > -1 ) {
|
106 |
/*
|
107 |
* New themes colorpicker conflict with others.
|
@@ -117,12 +117,12 @@ class FMModelForm_maker_fmc {
|
|
117 |
}
|
118 |
|
119 |
/**
|
120 |
-
* @param
|
121 |
-
* @param
|
122 |
* @param bool $old
|
123 |
* @param bool $force_rewrite
|
124 |
*/
|
125 |
-
public function create_css( $theme_id, $form_theme, $old = TRUE, $force_rewrite = FALSE ) {
|
126 |
$wp_upload_dir = wp_upload_dir();
|
127 |
$frontend_dir = '/form-maker-frontend/';
|
128 |
if ( !is_dir( $wp_upload_dir[ 'basedir' ] . $frontend_dir ) ) {
|
@@ -137,6 +137,10 @@ class FMModelForm_maker_fmc {
|
|
137 |
if ( $theme_id && !$force_rewrite && file_exists( $frontend_css ) ) {
|
138 |
return;
|
139 |
}
|
|
|
|
|
|
|
|
|
140 |
$prefixes = array(
|
141 |
'HP',
|
142 |
'AGP',
|
@@ -575,7 +579,7 @@ class FMModelForm_maker_fmc {
|
|
575 |
'}';
|
576 |
|
577 |
$css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .file-picker {' .
|
578 |
-
(!empty( $form_theme[ 'OPFBgUrl' ] ) ? 'display: inline-block; width: 22px; height: 22px; background: url("' .
|
579 |
(!empty( $form_theme[ 'OPFBGRepeat' ] ) ? 'background-repeat:' . $form_theme[ 'OPFBGRepeat' ] . ';' : '') .
|
580 |
(!empty( $form_theme[ 'OPFPos1' ] ) ? 'background-position-x:' . $form_theme[ 'OPFPos1' ] . ';' : '') .
|
581 |
(!empty( $form_theme[ 'OPFPos2' ] ) ? 'background-position-y:' . $form_theme[ 'OPFPos2' ] . ';' : '') .
|
@@ -689,7 +693,7 @@ class FMModelForm_maker_fmc {
|
|
689 |
}
|
690 |
$css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form select {' .
|
691 |
(!empty( $form_theme[ 'IPBGColor' ] ) ? 'background-color:' . $form_theme[ 'IPBGColor' ] . ';' : '') .
|
692 |
-
(!empty( $form_theme[ 'SBPBackground' ] ) ? 'background-image: url("' .
|
693 |
(!empty( $form_theme[ 'SBPBGRepeat' ] ) ? 'background-repeat:' . $form_theme[ 'SBPBGRepeat' ] . ';' : '') .
|
694 |
(!empty( $form_theme[ 'SBPBackground' ] ) ? 'background-position-x: calc(100% - 8px);' : '') .
|
695 |
(!empty( $form_theme[ 'SBPBackground' ] ) ? 'background-position-y: 50%;' : '') .
|
@@ -749,7 +753,7 @@ class FMModelForm_maker_fmc {
|
|
749 |
(!empty( $form_theme[ 'MCCPHeight' ] ) ? 'height:' . $form_theme[ 'MCCPHeight' ] . 'px;' : '') .
|
750 |
(!empty( $form_theme[ 'MCPMargin' ] ) ? 'margin:' . $form_theme[ 'MCCPMargin' ] . 'px;' : '') .
|
751 |
(!empty( $form_theme[ 'MCCPBGColor' ] ) ? 'background-color:' . $form_theme[ 'MCCPBGColor' ] . ';' : '') .
|
752 |
-
(!empty( $form_theme[ 'MCCPBackground' ] ) ? 'background-image: url("' .
|
753 |
(!empty( $form_theme[ 'MCCPBGRepeat' ] ) ? 'background-repeat:' . $form_theme[ 'MCCPBGRepeat' ] . ';' : '') .
|
754 |
(!empty( $form_theme[ 'MCCPBGPos1' ] ) ? 'background-position-x:' . $form_theme[ 'MCCPBGPos1' ] . ';' : '') .
|
755 |
(!empty( $form_theme[ 'MCCPBGPos2' ] ) ? 'background-position-y:' . $form_theme[ 'MCCPBGPos2' ] . ';' : '') .
|
@@ -1008,7 +1012,7 @@ class FMModelForm_maker_fmc {
|
|
1008 |
content: \'\';
|
1009 |
width: 16px;
|
1010 |
height: 16px;
|
1011 |
-
background:transparent url(
|
1012 |
background-size: 100%;
|
1013 |
border-radius: 0px;
|
1014 |
margin: 0px;
|
@@ -1054,19 +1058,19 @@ class FMModelForm_maker_fmc {
|
|
1054 |
}
|
1055 |
$theme = implode( '{', $body_or_classes_implode );
|
1056 |
$theme = preg_replace( $pattern, ' ', $theme );
|
1057 |
-
$css_content .=
|
1058 |
}
|
1059 |
$this->fm_css_content = $css_content;
|
1060 |
file_put_contents( $frontend_css, $css_content );
|
1061 |
}
|
1062 |
|
1063 |
/**
|
1064 |
-
* @param $form
|
1065 |
-
* @param $id
|
1066 |
*
|
1067 |
* @return array|mixed
|
1068 |
*/
|
1069 |
-
public function savedata( $form, $id ) {
|
1070 |
$fm_settings = get_option(WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
|
1071 |
$all_files = array();
|
1072 |
$correct = FALSE;
|
@@ -1212,15 +1216,16 @@ class FMModelForm_maker_fmc {
|
|
1212 |
}
|
1213 |
|
1214 |
/**
|
1215 |
-
*
|
1216 |
-
* @param $label_column
|
1217 |
-
* @param $table
|
1218 |
-
* @param $where
|
1219 |
-
* @param $order_by
|
1220 |
*
|
1221 |
-
* @
|
|
|
|
|
|
|
|
|
|
|
1222 |
*/
|
1223 |
-
public function select_data_from_db_for_labels( $db_info, $label_column, $table, $where, $order_by ) {
|
1224 |
global $wpdb;
|
1225 |
$query = "SELECT `" . $label_column . "` FROM " . $table . $where . " ORDER BY " . $order_by;
|
1226 |
$db_info = trim($db_info, '[]');
|
@@ -1244,15 +1249,17 @@ class FMModelForm_maker_fmc {
|
|
1244 |
}
|
1245 |
|
1246 |
/**
|
1247 |
-
*
|
1248 |
-
*
|
1249 |
-
* @param $
|
1250 |
-
* @param $
|
1251 |
-
* @param $
|
|
|
|
|
1252 |
*
|
1253 |
* @return array|null|object
|
1254 |
*/
|
1255 |
-
public function select_data_from_db_for_values( $db_info, $value_column, $table, $where, $order_by ) {
|
1256 |
global $wpdb;
|
1257 |
$query = "SELECT `" . $value_column . "` FROM " . $table . $where . " ORDER BY " . $order_by;
|
1258 |
$db_info = trim($db_info, '[]');
|
@@ -1276,11 +1283,12 @@ class FMModelForm_maker_fmc {
|
|
1276 |
}
|
1277 |
|
1278 |
/**
|
1279 |
-
*
|
1280 |
*
|
|
|
1281 |
* @return array( 'error' => true, 'group_id' => $max, 'message' => '' ); in case of error | array('group_id' => $max, 'all_files' => '', 'redirect_url' => '')
|
1282 |
*/
|
1283 |
-
public function save_db( $id ) {
|
1284 |
global $wpdb;
|
1285 |
$wp_userid = '';
|
1286 |
$wp_username = '';
|
@@ -1306,6 +1314,17 @@ class FMModelForm_maker_fmc {
|
|
1306 |
$adminemail = get_option('admin_email');
|
1307 |
$current_page_url = WDW_FM_Library(self::PLUGIN)->get_current_page_url();
|
1308 |
$form = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id= %d", $id ) );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1309 |
$formtitle = $form->title;
|
1310 |
if ( !$form->form_front ) {
|
1311 |
$id = '';
|
@@ -1357,13 +1376,13 @@ class FMModelForm_maker_fmc {
|
|
1357 |
$i = $label_id[ $key ];
|
1358 |
|
1359 |
$missing_required_field = FALSE;
|
|
|
1360 |
$required = (isset($params[$i]) && strpos($params[$i], '*:*yes*:*w_required*:*') !== FALSE ? 1 : 0);
|
1361 |
|
1362 |
if ( !in_array( $i, $disabled_fields ) ) {
|
1363 |
switch ( $type ) {
|
1364 |
case 'type_text':
|
1365 |
case 'type_password':
|
1366 |
-
case "type_submitter_mail":
|
1367 |
case "type_own_select":
|
1368 |
case "type_country":
|
1369 |
case "type_number":
|
@@ -1378,6 +1397,16 @@ class FMModelForm_maker_fmc {
|
|
1378 |
}
|
1379 |
break;
|
1380 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1381 |
case "type_date": {
|
1382 |
$value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "";
|
1383 |
$date_format = isset( $_POST[ 'wdform_' . $i . "_date_format" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_date_format" . $id ] ) : "";
|
@@ -2025,6 +2054,9 @@ class FMModelForm_maker_fmc {
|
|
2025 |
if ( $missing_required_field ) {
|
2026 |
return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( addslashes( sprintf( __( '%s field is required.', WDFMInstance(self::PLUGIN)->prefix ), $label_label[ $key ] ) ) ) );
|
2027 |
}
|
|
|
|
|
|
|
2028 |
|
2029 |
if ( $type == "type_address" ) {
|
2030 |
if ( $value == '*#*#*#' ) {
|
@@ -2072,23 +2104,21 @@ class FMModelForm_maker_fmc {
|
|
2072 |
}
|
2073 |
|
2074 |
if ( $form->savedb ) {
|
2075 |
-
$
|
2076 |
'form_id' => $id,
|
2077 |
'element_label' => $i,
|
2078 |
'element_value' => stripslashes( $value ),
|
2079 |
'group_id' => $group_id,
|
2080 |
'date' => date( 'Y-m-d H:i:s' ),
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
'
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
'%d',
|
2091 |
-
) );
|
2092 |
}
|
2093 |
if ( !$save_or_no ) {
|
2094 |
return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFMInstance(self::PLUGIN)->prefix ) ) );
|
@@ -2164,23 +2194,23 @@ class FMModelForm_maker_fmc {
|
|
2164 |
$business = $form->paypal_email;
|
2165 |
$ip = $_SERVER[ 'REMOTE_ADDR' ];
|
2166 |
$total2 = round( $total, 2 );
|
2167 |
-
|
2168 |
-
|
2169 |
-
|
2170 |
-
|
2171 |
-
|
2172 |
-
|
2173 |
-
|
2174 |
-
|
2175 |
-
)
|
2176 |
-
'
|
2177 |
-
|
2178 |
-
|
2179 |
-
'
|
2180 |
-
|
2181 |
-
|
2182 |
-
|
2183 |
-
|
2184 |
if ( !$save_or_no ) {
|
2185 |
return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFMInstance(self::PLUGIN)->prefix ) ) );
|
2186 |
}
|
@@ -2189,43 +2219,21 @@ class FMModelForm_maker_fmc {
|
|
2189 |
$total = $total + $paypal[ 'shipping' ];
|
2190 |
}
|
2191 |
$total = round( $total, 2 );
|
2192 |
-
|
2193 |
-
|
2194 |
-
|
2195 |
-
|
2196 |
-
|
2197 |
-
|
2198 |
-
'ip' => $ip,
|
2199 |
-
'user_id_wd' => $current_user->ID,
|
2200 |
-
), array(
|
2201 |
-
'%d',
|
2202 |
-
'%s',
|
2203 |
-
'%s',
|
2204 |
-
'%d',
|
2205 |
-
'%s',
|
2206 |
-
'%s',
|
2207 |
-
'%d',
|
2208 |
-
) );
|
2209 |
if ( !$save_or_no ) {
|
2210 |
return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFMInstance(self::PLUGIN)->prefix ) ) );
|
2211 |
}
|
2212 |
-
|
2213 |
-
|
2214 |
-
|
2215 |
-
|
2216 |
-
|
2217 |
-
|
2218 |
-
'ip' => $ip,
|
2219 |
-
'user_id_wd' => $current_user->ID,
|
2220 |
-
), array(
|
2221 |
-
'%d',
|
2222 |
-
'%s',
|
2223 |
-
'%s',
|
2224 |
-
'%d',
|
2225 |
-
'%s',
|
2226 |
-
'%s',
|
2227 |
-
'%d',
|
2228 |
-
) );
|
2229 |
if ( !$save_or_no ) {
|
2230 |
return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFMInstance(self::PLUGIN)->prefix ) ) );
|
2231 |
}
|
@@ -2279,23 +2287,23 @@ class FMModelForm_maker_fmc {
|
|
2279 |
foreach ( $send_tos as $send_index => $send_to ) {
|
2280 |
$_SESSION[ 'hash' ][] = md5( $ip . time() . rand() );
|
2281 |
$send_to = str_replace( '*', '', $send_to );
|
2282 |
-
|
|
|
2283 |
'form_id' => $id,
|
2284 |
'element_label' => 'verifyInfo@' . $send_to,
|
2285 |
'element_value' => $_SESSION[ 'hash' ][ $send_index ] . "**" . $form->mail_verify_expiretime . "**" . $send_to,
|
2286 |
'group_id' => $group_id,
|
2287 |
'date' => date( 'Y-m-d H:i:s' ),
|
2288 |
-
|
2289 |
-
|
2290 |
-
|
2291 |
-
|
2292 |
-
|
2293 |
-
'
|
2294 |
-
|
2295 |
-
|
2296 |
-
|
2297 |
-
|
2298 |
-
) );
|
2299 |
if ( !$save_or_no ) {
|
2300 |
return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFMInstance(self::PLUGIN)->prefix ) ) );
|
2301 |
}
|
@@ -2331,7 +2339,9 @@ class FMModelForm_maker_fmc {
|
|
2331 |
|
2332 |
do_action( 'fm_addon_frontend_init', $frontend_parmas );
|
2333 |
}
|
2334 |
-
|
|
|
|
|
2335 |
}
|
2336 |
|
2337 |
/**
|
@@ -2357,20 +2367,24 @@ class FMModelForm_maker_fmc {
|
|
2357 |
}
|
2358 |
|
2359 |
/**
|
2360 |
-
*
|
|
|
|
|
2361 |
*/
|
2362 |
-
public function remove( $group_id ) {
|
2363 |
global $wpdb;
|
2364 |
$wpdb->query( $wpdb->prepare( 'DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id= %d', $group_id ) );
|
2365 |
}
|
2366 |
|
2367 |
/**
|
2368 |
-
*
|
2369 |
-
*
|
|
|
|
|
2370 |
*
|
2371 |
* @return mixed|null|string
|
2372 |
*/
|
2373 |
-
public function get_after_submission_text( $form_id, $group_id ) {
|
2374 |
global $wpdb;
|
2375 |
$submit_text = $wpdb->get_var( "SELECT submit_text FROM " . $wpdb->prefix . "formmaker WHERE id='" . $form_id . "'" );
|
2376 |
$current_user = wp_get_current_user();
|
@@ -2437,9 +2451,11 @@ class FMModelForm_maker_fmc {
|
|
2437 |
}
|
2438 |
|
2439 |
/**
|
|
|
|
|
2440 |
* @param $id
|
2441 |
*/
|
2442 |
-
public function increment_views_count( $id ) {
|
2443 |
global $wpdb;
|
2444 |
$vives_form = $wpdb->get_var( $wpdb->prepare( "SELECT views FROM " . $wpdb->prefix . "formmaker_views WHERE form_id=%d", $id ) );
|
2445 |
if ( isset( $vives_form ) ) {
|
@@ -2461,14 +2477,15 @@ class FMModelForm_maker_fmc {
|
|
2461 |
}
|
2462 |
|
2463 |
/**
|
2464 |
-
*
|
2465 |
-
* @param $all_files
|
2466 |
-
* @param $id
|
2467 |
-
* @param $str
|
2468 |
*
|
|
|
|
|
|
|
|
|
2469 |
* @return array
|
2470 |
*/
|
2471 |
-
public function gen_mail( $group_id, $all_files, $id, $str ) {
|
2472 |
global $wpdb;
|
2473 |
WDW_FM_Library(self::PLUGIN)->start_session();
|
2474 |
// checking save uploads option
|
@@ -2534,8 +2551,9 @@ class FMModelForm_maker_fmc {
|
|
2534 |
}
|
2535 |
$disabled_fields = explode( ',', WDW_FM_Library(self::PLUGIN)->get('disabled_fields', '') );
|
2536 |
$disabled_fields = array_slice( $disabled_fields, 0, count( $disabled_fields ) - 1 );
|
2537 |
-
$list = '<table
|
2538 |
$list_text_mode = '';
|
|
|
2539 |
foreach ( $label_order_ids as $key => $label_order_id ) {
|
2540 |
$i = $label_order_id;
|
2541 |
$type = $label_type[ $i ];
|
@@ -2553,7 +2571,7 @@ class FMModelForm_maker_fmc {
|
|
2553 |
case "type_phone_new": {
|
2554 |
$element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : NULL;
|
2555 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2556 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>' . $element . '</td></tr>';
|
2557 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2558 |
}
|
2559 |
break;
|
@@ -2563,7 +2581,7 @@ class FMModelForm_maker_fmc {
|
|
2563 |
$element1 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . "1" ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . "1" ] : NULL;
|
2564 |
if ( isset( $element0 ) && $this->empty_field( $element0, $row->mail_emptyfields ) && $this->empty_field( $element1, $row->mail_emptyfields ) ) {
|
2565 |
$element = $element0 . ' - ' . $element1;
|
2566 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>' . $element . '</td></tr>';
|
2567 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2568 |
}
|
2569 |
break;
|
@@ -2571,7 +2589,7 @@ class FMModelForm_maker_fmc {
|
|
2571 |
case 'type_textarea': {
|
2572 |
$element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? wpautop( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : NULL;
|
2573 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2574 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>' . $element . '</td></tr>';
|
2575 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2576 |
}
|
2577 |
break;
|
@@ -2579,7 +2597,7 @@ class FMModelForm_maker_fmc {
|
|
2579 |
case "type_hidden": {
|
2580 |
$element = isset( $_POST[ $element_label ] ) ? $_POST[ $element_label ] : NULL;
|
2581 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2582 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td>' . $element . '</td></tr>';
|
2583 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2584 |
}
|
2585 |
break;
|
@@ -2587,7 +2605,7 @@ class FMModelForm_maker_fmc {
|
|
2587 |
case "type_mark_map": {
|
2588 |
$element = isset( $_POST[ 'wdform_' . $i . "_long" . $id ] ) ? $_POST[ 'wdform_' . $i . "_long" . $id ] : NULL;
|
2589 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2590 |
-
$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>';
|
2591 |
$list_text_mode = $list_text_mode . $element_label . ' - Longitude:' . $element . ' Latitude:' . (isset( $_POST[ 'wdform_' . $i . "_lat" . $id ] ) ? $_POST[ 'wdform_' . $i . "_lat" . $id ] : "") . "\r\n";
|
2592 |
}
|
2593 |
break;
|
@@ -2595,7 +2613,7 @@ class FMModelForm_maker_fmc {
|
|
2595 |
case "type_submitter_mail": {
|
2596 |
$element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : NULL;
|
2597 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2598 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
|
2599 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2600 |
}
|
2601 |
break;
|
@@ -2605,10 +2623,10 @@ class FMModelForm_maker_fmc {
|
|
2605 |
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 )) ) {
|
2606 |
$ss = isset( $_POST[ 'wdform_' . $i . "_ss" . $id ] ) ? $_POST[ 'wdform_' . $i . "_ss" . $id ] : NULL;
|
2607 |
if ( isset( $ss ) ) {
|
2608 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $hh . ':' . (isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ? $_POST[ 'wdform_' . $i . "_mm" . $id ] : "") . ':' . $ss;
|
2609 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $hh . ':' . (isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ? $_POST[ 'wdform_' . $i . "_mm" . $id ] : "") . ':' . $ss;
|
2610 |
} else {
|
2611 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $hh . ':' . (isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ? $_POST[ 'wdform_' . $i . "_mm" . $id ] : "");
|
2612 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $hh . ':' . (isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ? $_POST[ 'wdform_' . $i . "_mm" . $id ] : "");
|
2613 |
}
|
2614 |
$am_pm = isset( $_POST[ 'wdform_' . $i . "_am_pm" . $id ] ) ? $_POST[ 'wdform_' . $i . "_am_pm" . $id ] : NULL;
|
@@ -2625,7 +2643,7 @@ class FMModelForm_maker_fmc {
|
|
2625 |
case "type_phone": {
|
2626 |
$element_first = isset( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_first" . $id ] : NULL;
|
2627 |
if ( isset( $element_first ) && $this->empty_field( $element_first, $row->mail_emptyfields ) ) {
|
2628 |
-
$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>';
|
2629 |
$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";
|
2630 |
}
|
2631 |
break;
|
@@ -2636,11 +2654,11 @@ class FMModelForm_maker_fmc {
|
|
2636 |
$element_title = isset( $_POST[ 'wdform_' . $i . "_element_title" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_title" . $id ] : NULL;
|
2637 |
$element_middle = isset( $_POST[ 'wdform_' . $i . "_element_middle" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_middle" . $id ] ) : NULL;
|
2638 |
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 )) ) {
|
2639 |
-
$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>';
|
2640 |
$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";
|
2641 |
} else {
|
2642 |
if ( $this->empty_field( $element_first, $row->mail_emptyfields ) || $this->empty_field( $_POST[ 'wdform_' . $i . "_element_last" . $id ], $row->mail_emptyfields ) ) {
|
2643 |
-
$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>';
|
2644 |
$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";
|
2645 |
}
|
2646 |
}
|
@@ -2650,37 +2668,37 @@ class FMModelForm_maker_fmc {
|
|
2650 |
case "type_address": {
|
2651 |
$element = isset( $_POST[ 'wdform_' . $i . "_street1" . $id ] ) ? $_POST[ 'wdform_' . $i . "_street1" . $id ] : NULL;
|
2652 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2653 |
-
$list = $list . '<tr valign="top"><td >' . $label_order_original[ $i ] . '</td><td >' . $element . '</td></tr>';
|
2654 |
$list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
|
2655 |
break;
|
2656 |
}
|
2657 |
$element = isset( $_POST[ 'wdform_' . $i . "_street2" . $id ] ) ? $_POST[ 'wdform_' . $i . "_street2" . $id ] : NULL;
|
2658 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2659 |
-
$list = $list . '<tr valign="top"><td >' . $label_order_original[ $i ] . '</td><td >' . $element . '</td></tr>';
|
2660 |
$list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
|
2661 |
break;
|
2662 |
}
|
2663 |
$element = isset( $_POST[ 'wdform_' . $i . "_city" . $id ] ) ? $_POST[ 'wdform_' . $i . "_city" . $id ] : NULL;
|
2664 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2665 |
-
$list = $list . '<tr valign="top"><td >' . $label_order_original[ $i ] . '</td><td >' . $element . '</td></tr>';
|
2666 |
$list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
|
2667 |
break;
|
2668 |
}
|
2669 |
$element = isset( $_POST[ 'wdform_' . $i . "_state" . $id ] ) ? $_POST[ 'wdform_' . $i . "_state" . $id ] : NULL;
|
2670 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2671 |
-
$list = $list . '<tr valign="top"><td >' . $label_order_original[ $i ] . '</td><td >' . $element . '</td></tr>';
|
2672 |
$list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
|
2673 |
break;
|
2674 |
}
|
2675 |
$element = isset( $_POST[ 'wdform_' . $i . "_postal" . $id ] ) ? $_POST[ 'wdform_' . $i . "_postal" . $id ] : NULL;
|
2676 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2677 |
-
$list = $list . '<tr valign="top"><td >' . $label_order_original[ $i ] . '</td><td >' . $element . '</td></tr>';
|
2678 |
$list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
|
2679 |
break;
|
2680 |
}
|
2681 |
$element = isset( $_POST[ 'wdform_' . $i . "_country" . $id ] ) ? $_POST[ 'wdform_' . $i . "_country" . $id ] : NULL;
|
2682 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2683 |
-
$list = $list . '<tr valign="top"><td >' . $label_order_original[ $i ] . '</td><td >' . $element . '</td></tr>';
|
2684 |
$list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
|
2685 |
break;
|
2686 |
}
|
@@ -2691,7 +2709,7 @@ class FMModelForm_maker_fmc {
|
|
2691 |
$month = isset( $_POST[ 'wdform_' . $i . "_month" . $id ] ) ? $_POST[ 'wdform_' . $i . "_month" . $id ] : "";
|
2692 |
$year = isset( $_POST[ 'wdform_' . $i . "_year" . $id ] ) ? $_POST[ 'wdform_' . $i . "_year" . $id ] : "";
|
2693 |
if ( isset( $day ) && $this->empty_field( $day, $row->mail_emptyfields ) ) {
|
2694 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . (($day || $month || $year) ? $day . '-' . $month . '-' . $year : '') . '</td></tr>';
|
2695 |
$list_text_mode = $list_text_mode . $element_label . (($day || $month || $year) ? $day . '-' . $month . '-' . $year : '') . "\r\n";
|
2696 |
}
|
2697 |
break;
|
@@ -2699,13 +2717,13 @@ class FMModelForm_maker_fmc {
|
|
2699 |
case "type_radio": {
|
2700 |
$element = isset( $_POST[ 'wdform_' . $i . "_other_input" . $id ] ) ? $_POST[ 'wdform_' . $i . "_other_input" . $id ] : NULL;
|
2701 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2702 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
|
2703 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2704 |
break;
|
2705 |
}
|
2706 |
$element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : NULL;
|
2707 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2708 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
|
2709 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2710 |
}
|
2711 |
break;
|
@@ -2725,7 +2743,7 @@ class FMModelForm_maker_fmc {
|
|
2725 |
$other_element_id = isset( $_POST[ 'wdform_' . $i . "_allow_other_num" . $id ] ) ? $_POST[ 'wdform_' . $i . "_allow_other_num" . $id ] : "";
|
2726 |
}
|
2727 |
if ( $start != -1 || ($start == -1 && $row->mail_emptyfields) ) {
|
2728 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >';
|
2729 |
$list_text_mode = $list_text_mode . $element_label . ' - ';
|
2730 |
}
|
2731 |
if ( $start != -1 ) {
|
@@ -2757,7 +2775,7 @@ class FMModelForm_maker_fmc {
|
|
2757 |
$value = $value . '.' . $_POST[ 'wdform_' . $i . "_element_cents" . $id ];
|
2758 |
}
|
2759 |
if ( $this->empty_field( $value, $row->mail_emptyfields ) && $value != '.' ) {
|
2760 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $value . $form_currency . '</td></tr>';
|
2761 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $value . $form_currency . "\r\n";
|
2762 |
}
|
2763 |
break;
|
@@ -2768,7 +2786,7 @@ class FMModelForm_maker_fmc {
|
|
2768 |
$value = $_POST[ 'wdform_' . $i . "_element" . $id ];
|
2769 |
}
|
2770 |
if ( $this->empty_field( $value, $row->mail_emptyfields ) && $value != '.' ) {
|
2771 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . ($value == '' ? '' : $form_currency) . $value . '</td></tr>';
|
2772 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $value . $form_currency . "\r\n";
|
2773 |
}
|
2774 |
break;
|
@@ -2782,10 +2800,10 @@ class FMModelForm_maker_fmc {
|
|
2782 |
$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;
|
2783 |
$element_quantity = (isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $i . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] : NULL;
|
2784 |
if ( $value != '' ) {
|
2785 |
-
|
2786 |
-
|
2787 |
-
|
2788 |
-
|
2789 |
$temp_val = isset( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_property" . $id . $k ] : NULL;
|
2790 |
if ( isset( $temp_val ) ) {
|
2791 |
$value .= '<br/>' . (isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] : "") . ': ' . $temp_val;
|
@@ -2793,7 +2811,7 @@ class FMModelForm_maker_fmc {
|
|
2793 |
}
|
2794 |
}
|
2795 |
if ( $this->empty_field( $value, $row->mail_emptyfields ) ) {
|
2796 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $value . '</td></tr>';
|
2797 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . str_replace( '<br/>', ', ', $value ) . "\r\n";
|
2798 |
}
|
2799 |
break;
|
@@ -2805,9 +2823,9 @@ class FMModelForm_maker_fmc {
|
|
2805 |
$is_element_quantity = isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) ? TRUE : FALSE;
|
2806 |
$element_quantity_label = isset( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] : NULL;
|
2807 |
$element_quantity = (isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $i . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] : NULL;
|
2808 |
-
|
2809 |
-
|
2810 |
-
|
2811 |
for ( $k = 0; $k < 50; $k++ ) {
|
2812 |
$temp_val = isset( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_property" . $id . $k ] : NULL;
|
2813 |
if ( isset( $temp_val ) ) {
|
@@ -2816,7 +2834,7 @@ class FMModelForm_maker_fmc {
|
|
2816 |
}
|
2817 |
}
|
2818 |
if ( $this->empty_field( $value, $row->mail_emptyfields ) ) {
|
2819 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $value . '</td></tr>';
|
2820 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . str_replace( '<br/>', ', ', $value ) . "\r\n";
|
2821 |
}
|
2822 |
break;
|
@@ -2825,7 +2843,7 @@ class FMModelForm_maker_fmc {
|
|
2825 |
if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
|
2826 |
$value = $_POST[ 'wdform_' . $i . "_element_label" . $id ] . ' : ' . $form_currency . (isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : "");
|
2827 |
if ( $this->empty_field( $value, $row->mail_emptyfields ) ) {
|
2828 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $value . '</td></tr>';
|
2829 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $value . "\r\n";
|
2830 |
}
|
2831 |
} else {
|
@@ -2843,7 +2861,7 @@ class FMModelForm_maker_fmc {
|
|
2843 |
}
|
2844 |
}
|
2845 |
if ( $start != -1 || ($start == -1 && $row->mail_emptyfields) ) {
|
2846 |
-
$list = $list . '<tr valign="top"><td>' . $element_label . '</td><td>';
|
2847 |
$list_text_mode = $list_text_mode . $element_label . ' - ';
|
2848 |
}
|
2849 |
if ( $start != -1 ) {
|
@@ -2860,9 +2878,9 @@ class FMModelForm_maker_fmc {
|
|
2860 |
$element_quantity_label = isset( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] : NULL;
|
2861 |
$element_quantity = (isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $i . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] : NULL;
|
2862 |
if ( $is_element_quantity ) {
|
2863 |
-
|
2864 |
-
|
2865 |
-
|
2866 |
}
|
2867 |
if ( $start != -1 ) {
|
2868 |
for ( $k = 0; $k < 50; $k++ ) {
|
@@ -2882,7 +2900,7 @@ class FMModelForm_maker_fmc {
|
|
2882 |
case "type_paypal_total": {
|
2883 |
$element = isset( $_POST[ 'wdform_' . $i . "_paypal_total" . $id ] ) ? $_POST[ 'wdform_' . $i . "_paypal_total" . $id ] : "";
|
2884 |
if ( $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2885 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
|
2886 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2887 |
}
|
2888 |
break;
|
@@ -2891,7 +2909,7 @@ class FMModelForm_maker_fmc {
|
|
2891 |
$element = isset( $_POST[ 'wdform_' . $i . "_star_amount" . $id ] ) ? $_POST[ 'wdform_' . $i . "_star_amount" . $id ] : NULL;
|
2892 |
$selected = isset( $_POST[ 'wdform_' . $i . "_selected_star_amount" . $id ] ) ? $_POST[ 'wdform_' . $i . "_selected_star_amount" . $id ] : 0;
|
2893 |
if ( isset( $element ) && $this->empty_field( $selected, $row->mail_emptyfields ) ) {
|
2894 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $selected . '/' . $element . '</td></tr>';
|
2895 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $selected . '/' . $element . "\r\n";
|
2896 |
}
|
2897 |
break;
|
@@ -2900,7 +2918,7 @@ class FMModelForm_maker_fmc {
|
|
2900 |
$element = isset( $_POST[ 'wdform_' . $i . "_scale_amount" . $id ] ) ? $_POST[ 'wdform_' . $i . "_scale_amount" . $id ] : NULL;
|
2901 |
$selected = isset( $_POST[ 'wdform_' . $i . "_scale_radio" . $id ] ) ? $_POST[ 'wdform_' . $i . "_scale_radio" . $id ] : 0;
|
2902 |
if ( isset( $element ) && $this->empty_field( $selected, $row->mail_emptyfields ) ) {
|
2903 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $selected . '/' . $element . '</td></tr>';
|
2904 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $selected . '/' . $element . "\r\n";
|
2905 |
}
|
2906 |
break;
|
@@ -2908,7 +2926,7 @@ class FMModelForm_maker_fmc {
|
|
2908 |
case "type_spinner": {
|
2909 |
$element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : NULL;
|
2910 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2911 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
|
2912 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2913 |
}
|
2914 |
break;
|
@@ -2916,7 +2934,7 @@ class FMModelForm_maker_fmc {
|
|
2916 |
case "type_slider": {
|
2917 |
$element = isset( $_POST[ 'wdform_' . $i . "_slider_value" . $id ] ) ? $_POST[ 'wdform_' . $i . "_slider_value" . $id ] : NULL;
|
2918 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2919 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $element . '</td></tr>';
|
2920 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2921 |
}
|
2922 |
break;
|
@@ -2925,7 +2943,7 @@ class FMModelForm_maker_fmc {
|
|
2925 |
$element0 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . '0' ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . '0' ] : NULL;
|
2926 |
$element1 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . '1' ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . '1' ] : NULL;
|
2927 |
if ( (isset( $element0 ) && $this->empty_field( $element0, $row->mail_emptyfields )) || (isset( $element1 ) && $this->empty_field( $element1, $row->mail_emptyfields )) ) {
|
2928 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >From: ' . $element0 . '<span style="margin-left:6px"> To </span>:' . $element1 . '</td></tr>';
|
2929 |
$list_text_mode = $list_text_mode . $element_label . ' - From: ' . $element0 . ' To: ' . $element1 . "\r\n";
|
2930 |
}
|
2931 |
break;
|
@@ -2946,7 +2964,7 @@ class FMModelForm_maker_fmc {
|
|
2946 |
}
|
2947 |
$element .= "Total: " . $total;
|
2948 |
if ( isset( $element ) && $this->empty_field( $form_empty_field, $row->mail_emptyfields ) ) {
|
2949 |
-
$list = $list . '<tr valign="top"><td>' . $element_label . '</td><td >' . $element . '</td></tr>';
|
2950 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2951 |
}
|
2952 |
break;
|
@@ -2958,15 +2976,15 @@ class FMModelForm_maker_fmc {
|
|
2958 |
$rows_count = sizeof( $mat_rows ) - 1;
|
2959 |
$mat_columns = explode( "***", isset( $_POST[ 'wdform_' . $i . "_hidden_column" . $id ] ) ? $_POST[ 'wdform_' . $i . "_hidden_column" . $id ] : "" );
|
2960 |
$columns_count = sizeof( $mat_columns ) - 1;
|
2961 |
-
$matrix =
|
2962 |
-
$matrix .= '<tr><td></td>';
|
2963 |
for ( $k = 1; $k < count( $mat_columns ); $k++ ) {
|
2964 |
-
$matrix .= '<td style="background-color
|
2965 |
}
|
2966 |
$matrix .= '</tr>';
|
2967 |
$aaa = Array();
|
2968 |
for ( $k = 1; $k <= $rows_count; $k++ ) {
|
2969 |
-
$matrix .= '<tr><td style="background-color
|
2970 |
if ( $input_type == "radio" ) {
|
2971 |
$mat_radio = isset( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_input_element" . $id . $k ] : 0;
|
2972 |
if ( $mat_radio == 0 ) {
|
@@ -2983,7 +3001,7 @@ class FMModelForm_maker_fmc {
|
|
2983 |
$checked = "";
|
2984 |
}
|
2985 |
$sign = $checked == 'checked' ? '✔' : '';
|
2986 |
-
$matrix .= '<td style="text-align:center">' . $sign . '</td>';
|
2987 |
}
|
2988 |
} else {
|
2989 |
if ( $input_type == "checkbox" ) {
|
@@ -2996,7 +3014,7 @@ class FMModelForm_maker_fmc {
|
|
2996 |
$checked = "";
|
2997 |
}
|
2998 |
$sign = $checked == 'checked' ? '✔' : '';
|
2999 |
-
$matrix .= '<td style="text-align:center">' . $sign . '</td>';
|
3000 |
}
|
3001 |
} else {
|
3002 |
if ( $input_type == "text" ) {
|
@@ -3005,7 +3023,7 @@ class FMModelForm_maker_fmc {
|
|
3005 |
if ( $checked ) {
|
3006 |
$form_empty_field = 1;
|
3007 |
}
|
3008 |
-
$matrix .= '<td style="text-align:center">' . $checked . '</td>';
|
3009 |
}
|
3010 |
} else {
|
3011 |
for ( $j = 1; $j <= $columns_count; $j++ ) {
|
@@ -3013,7 +3031,7 @@ class FMModelForm_maker_fmc {
|
|
3013 |
if ( $checked ) {
|
3014 |
$form_empty_field = 1;
|
3015 |
}
|
3016 |
-
$matrix .= '<td style="text-align:center">' . $checked . '</td>';
|
3017 |
}
|
3018 |
}
|
3019 |
}
|
@@ -3022,7 +3040,7 @@ class FMModelForm_maker_fmc {
|
|
3022 |
}
|
3023 |
$matrix .= '</table>';
|
3024 |
if ( isset( $matrix ) && $this->empty_field( $form_empty_field, $row->mail_emptyfields ) ) {
|
3025 |
-
$list = $list . '<tr valign="top"><td >' . $element_label . '</td><td >' . $matrix . '</td></tr>';
|
3026 |
}
|
3027 |
break;
|
3028 |
}
|
@@ -3033,9 +3051,11 @@ class FMModelForm_maker_fmc {
|
|
3033 |
}
|
3034 |
}
|
3035 |
$list = $list . '</table>';
|
3036 |
-
|
|
|
3037 |
if ( $row->sendemail ) {
|
3038 |
$fromname = $row->mail_from_name_user;
|
|
|
3039 |
$subject = !empty( $row->mail_subject_user ) ? $row->mail_subject_user : $row->title;
|
3040 |
$attachment_user = array();
|
3041 |
if ( !WDFMInstance(self::PLUGIN)->is_demo ) {
|
@@ -3101,12 +3121,16 @@ class FMModelForm_maker_fmc {
|
|
3101 |
foreach ( $this->custom_fields as $key => $custom_field ) {
|
3102 |
$new_script = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $new_script );
|
3103 |
$fromname = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $fromname );
|
|
|
3104 |
$subject = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $subject );
|
3105 |
}
|
|
|
|
|
|
|
3106 |
|
3107 |
$header_arr = array();
|
3108 |
if ( $row->mail_from_user != '' ) {
|
3109 |
-
$header_arr[ 'from' ] = $
|
3110 |
}
|
3111 |
$header_arr['from_name'] = $fromname;
|
3112 |
$header_arr['content_type'] = $content_type;
|
@@ -3129,7 +3153,8 @@ class FMModelForm_maker_fmc {
|
|
3129 |
$send_copy = isset( $_POST[ "wdform_send_copy_" . $id ] ) ? $_POST[ "wdform_send_copy_" . $id ] : NULL;
|
3130 |
if ( isset( $send_copy ) ) {
|
3131 |
$send = TRUE;
|
3132 |
-
}
|
|
|
3133 |
$mail_verification_post_id = (int)$wpdb->get_var( $wpdb->prepare( 'SELECT mail_verification_post_id FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id ) );
|
3134 |
$verification_link = get_post( $mail_verification_post_id );
|
3135 |
|
@@ -3166,12 +3191,14 @@ class FMModelForm_maker_fmc {
|
|
3166 |
}
|
3167 |
}
|
3168 |
}
|
3169 |
-
|
|
|
3170 |
if ( $row->sendemail ) {
|
3171 |
$recipient = $row->mail ? $row->mail : '';
|
3172 |
$subject = !empty( $row->mail_subject ) ? $row->mail_subject : $row->title;
|
3173 |
|
3174 |
$fromname = $row->from_name;
|
|
|
3175 |
$attachment = array();
|
3176 |
if ( !WDFMInstance(self::PLUGIN)->is_demo ) {
|
3177 |
for ( $k = 0; $k < count( $all_files ); $k++ ) {
|
@@ -3238,14 +3265,18 @@ class FMModelForm_maker_fmc {
|
|
3238 |
}
|
3239 |
$this->custom_fields['all'] = $list;
|
3240 |
|
3241 |
-
|
3242 |
$new_script = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $new_script );
|
3243 |
$recipient = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $recipient);
|
3244 |
$fromname = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $fromname );
|
|
|
3245 |
$subject = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $subject );
|
3246 |
}
|
|
|
|
|
|
|
3247 |
if ( $row->from_mail ) {
|
3248 |
-
$header_arr[ 'from' ] = isset( $_POST['wdform_' . $row->from_mail . "_element" . $id] ) ? $_POST['wdform_' . $row->from_mail . "_element" . $id] : $
|
3249 |
}
|
3250 |
$header_arr['from_name'] = $fromname;
|
3251 |
$header_arr['content_type'] = $content_type;
|
@@ -3348,16 +3379,17 @@ class FMModelForm_maker_fmc {
|
|
3348 |
}
|
3349 |
|
3350 |
/**
|
3351 |
-
*
|
3352 |
-
* @param $key
|
3353 |
-
* @param $id
|
3354 |
-
* @param $attachment
|
3355 |
-
* @param $form_currency
|
3356 |
-
* @param int $file_upload_link
|
3357 |
*
|
3358 |
-
* @
|
|
|
|
|
|
|
|
|
|
|
|
|
3359 |
*/
|
3360 |
-
public static function custom_fields_mail( $type, $key, $id, $attachment, $form_currency, $file_upload_link = 0 ) {
|
3361 |
$new_value = "";
|
3362 |
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" ) {
|
3363 |
switch ( $type ) {
|
@@ -3586,10 +3618,10 @@ class FMModelForm_maker_fmc {
|
|
3586 |
$is_element_quantity = isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) ? TRUE : FALSE;
|
3587 |
$element_quantity_label = isset( $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] : NULL;
|
3588 |
$element_quantity = (isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $key . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] : NULL;
|
3589 |
-
|
3590 |
-
|
3591 |
}
|
3592 |
-
|
3593 |
$temp_val = isset( $_POST[ 'wdform_' . $key . "_property" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_property" . $id . $k ] : NULL;
|
3594 |
if ( isset( $temp_val ) ) {
|
3595 |
$new_value .= '<br/>' . (isset( $_POST[ 'wdform_' . $key . "_element_property_label" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_element_property_label" . $id . $k ] : "") . ': ' . $temp_val;
|
@@ -3603,9 +3635,9 @@ class FMModelForm_maker_fmc {
|
|
3603 |
$is_element_quantity = isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) ? TRUE : FALSE;
|
3604 |
$element_quantity_label = isset( $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] : NULL;
|
3605 |
$element_quantity = ( isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $key . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] : NULL;
|
3606 |
-
|
3607 |
-
|
3608 |
-
|
3609 |
for ( $k = 0; $k < 50; $k++ ) {
|
3610 |
$temp_val = isset( $_POST[ 'wdform_' . $key . "_property" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_property" . $id . $k ] : NULL;
|
3611 |
if ( isset( $temp_val ) ) {
|
@@ -3639,8 +3671,8 @@ class FMModelForm_maker_fmc {
|
|
3639 |
$element_quantity_label = isset( $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] : NULL;
|
3640 |
$element_quantity = (isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $key . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] : NULL;
|
3641 |
if ( $is_element_quantity ) {
|
3642 |
-
|
3643 |
-
|
3644 |
for ( $k = 0; $k < 50; $k++ ) {
|
3645 |
$temp_val = isset( $_POST[ 'wdform_' . $key . "_property" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_property" . $id . $k ] : NULL;
|
3646 |
if ( isset( $temp_val ) ) {
|
@@ -3781,12 +3813,12 @@ class FMModelForm_maker_fmc {
|
|
3781 |
}
|
3782 |
|
3783 |
/**
|
3784 |
-
* @param $element
|
3785 |
-
* @param $mail_emptyfields
|
3786 |
*
|
3787 |
* @return int
|
3788 |
*/
|
3789 |
-
public function empty_field( $element, $mail_emptyfields ) {
|
3790 |
if ( !$mail_emptyfields ) {
|
3791 |
if ( empty( $element ) ) {
|
3792 |
return 0;
|
@@ -3797,12 +3829,12 @@ class FMModelForm_maker_fmc {
|
|
3797 |
}
|
3798 |
|
3799 |
/**
|
3800 |
-
* @param
|
3801 |
* @param string $format
|
3802 |
*
|
3803 |
* @return bool
|
3804 |
*/
|
3805 |
-
public function fm_validateDate( $date, $format = 'Y-m-d H:i:s' ) {
|
3806 |
$d = DateTime::createFromFormat( $format, $date );
|
3807 |
|
3808 |
return $d && $d->format( $format ) == $date;
|
19 |
*
|
20 |
* @return array
|
21 |
*/
|
22 |
+
public function showform( $id = 0, $type = 'embedded' ) {
|
23 |
global $wpdb;
|
24 |
$row = $wpdb->get_row( $wpdb->prepare( 'SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"' . (!WDFMInstance(self::PLUGIN)->is_free ? '' : ' AND id' . (WDFMInstance(self::PLUGIN)->is_free == 1 ? ' NOT ' : ' ') . 'IN (' . (get_option( 'contact_form_forms', '' ) != '' ? get_option( 'contact_form_forms' ) : 0) . ')'), $id ) );
|
25 |
|
101 |
* @param $value
|
102 |
* @param $key
|
103 |
*/
|
104 |
+
public static function set_empty_values_transparent( &$value = '', $key = '' ) {
|
105 |
if ( strpos( $key, 'Color' ) > -1 ) {
|
106 |
/*
|
107 |
* New themes colorpicker conflict with others.
|
117 |
}
|
118 |
|
119 |
/**
|
120 |
+
* @param int $theme_id
|
121 |
+
* @param array $form_theme
|
122 |
* @param bool $old
|
123 |
* @param bool $force_rewrite
|
124 |
*/
|
125 |
+
public function create_css( $theme_id = 0, $form_theme = array(), $old = TRUE, $force_rewrite = FALSE ) {
|
126 |
$wp_upload_dir = wp_upload_dir();
|
127 |
$frontend_dir = '/form-maker-frontend/';
|
128 |
if ( !is_dir( $wp_upload_dir[ 'basedir' ] . $frontend_dir ) ) {
|
137 |
if ( $theme_id && !$force_rewrite && file_exists( $frontend_css ) ) {
|
138 |
return;
|
139 |
}
|
140 |
+
|
141 |
+
$plugin_relative_url = trim(str_replace(site_url(), '', WDFMInstance(self::PLUGIN)->plugin_url), '/');
|
142 |
+
$plugin_relative_url = '../../../../' . $plugin_relative_url . '/';
|
143 |
+
|
144 |
$prefixes = array(
|
145 |
'HP',
|
146 |
'AGP',
|
579 |
'}';
|
580 |
|
581 |
$css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form .file-picker {' .
|
582 |
+
(!empty( $form_theme[ 'OPFBgUrl' ] ) ? 'display: inline-block; width: 22px; height: 22px; background: url("' . $plugin_relative_url . $form_theme[ 'OPFBgUrl' ] . '");' : '') .
|
583 |
(!empty( $form_theme[ 'OPFBGRepeat' ] ) ? 'background-repeat:' . $form_theme[ 'OPFBGRepeat' ] . ';' : '') .
|
584 |
(!empty( $form_theme[ 'OPFPos1' ] ) ? 'background-position-x:' . $form_theme[ 'OPFPos1' ] . ';' : '') .
|
585 |
(!empty( $form_theme[ 'OPFPos2' ] ) ? 'background-position-y:' . $form_theme[ 'OPFPos2' ] . ';' : '') .
|
693 |
}
|
694 |
$css_content .= '.fm-form-container.fm-theme' . $theme_id . ' .fm-form select {' .
|
695 |
(!empty( $form_theme[ 'IPBGColor' ] ) ? 'background-color:' . $form_theme[ 'IPBGColor' ] . ';' : '') .
|
696 |
+
(!empty( $form_theme[ 'SBPBackground' ] ) ? 'background-image: url("' . $plugin_relative_url . $form_theme[ 'SBPBackground' ] . '");' : '') .
|
697 |
(!empty( $form_theme[ 'SBPBGRepeat' ] ) ? 'background-repeat:' . $form_theme[ 'SBPBGRepeat' ] . ';' : '') .
|
698 |
(!empty( $form_theme[ 'SBPBackground' ] ) ? 'background-position-x: calc(100% - 8px);' : '') .
|
699 |
(!empty( $form_theme[ 'SBPBackground' ] ) ? 'background-position-y: 50%;' : '') .
|
753 |
(!empty( $form_theme[ 'MCCPHeight' ] ) ? 'height:' . $form_theme[ 'MCCPHeight' ] . 'px;' : '') .
|
754 |
(!empty( $form_theme[ 'MCPMargin' ] ) ? 'margin:' . $form_theme[ 'MCCPMargin' ] . 'px;' : '') .
|
755 |
(!empty( $form_theme[ 'MCCPBGColor' ] ) ? 'background-color:' . $form_theme[ 'MCCPBGColor' ] . ';' : '') .
|
756 |
+
(!empty( $form_theme[ 'MCCPBackground' ] ) ? 'background-image: url("' . $plugin_relative_url . $form_theme[ 'MCCPBackground' ] . '");' : '') .
|
757 |
(!empty( $form_theme[ 'MCCPBGRepeat' ] ) ? 'background-repeat:' . $form_theme[ 'MCCPBGRepeat' ] . ';' : '') .
|
758 |
(!empty( $form_theme[ 'MCCPBGPos1' ] ) ? 'background-position-x:' . $form_theme[ 'MCCPBGPos1' ] . ';' : '') .
|
759 |
(!empty( $form_theme[ 'MCCPBGPos2' ] ) ? 'background-position-y:' . $form_theme[ 'MCCPBGPos2' ] . ';' : '') .
|
1012 |
content: \'\';
|
1013 |
width: 16px;
|
1014 |
height: 16px;
|
1015 |
+
background:transparent url("' . $plugin_relative_url . 'images/themes/checkboxes/1.png") no-repeat;
|
1016 |
background-size: 100%;
|
1017 |
border-radius: 0px;
|
1018 |
margin: 0px;
|
1058 |
}
|
1059 |
$theme = implode( '{', $body_or_classes_implode );
|
1060 |
$theme = preg_replace( $pattern, ' ', $theme );
|
1061 |
+
$css_content .= $theme;
|
1062 |
}
|
1063 |
$this->fm_css_content = $css_content;
|
1064 |
file_put_contents( $frontend_css, $css_content );
|
1065 |
}
|
1066 |
|
1067 |
/**
|
1068 |
+
* @param int $form
|
1069 |
+
* @param int $id
|
1070 |
*
|
1071 |
* @return array|mixed
|
1072 |
*/
|
1073 |
+
public function savedata( $form = 0, $id = 0 ) {
|
1074 |
$fm_settings = get_option(WDFMInstance(self::PLUGIN)->is_free == 2 ? 'fmc_settings' : 'fm_settings');
|
1075 |
$all_files = array();
|
1076 |
$correct = FALSE;
|
1216 |
}
|
1217 |
|
1218 |
/**
|
1219 |
+
* Select data from db for labels.
|
|
|
|
|
|
|
|
|
1220 |
*
|
1221 |
+
* @param string $db_info
|
1222 |
+
* @param string $label_column
|
1223 |
+
* @param string $table
|
1224 |
+
* @param string $where
|
1225 |
+
* @param string $order_by
|
1226 |
+
* @return mixed
|
1227 |
*/
|
1228 |
+
public function select_data_from_db_for_labels( $db_info = '', $label_column = '', $table = '', $where = '', $order_by = '' ) {
|
1229 |
global $wpdb;
|
1230 |
$query = "SELECT `" . $label_column . "` FROM " . $table . $where . " ORDER BY " . $order_by;
|
1231 |
$db_info = trim($db_info, '[]');
|
1249 |
}
|
1250 |
|
1251 |
/**
|
1252 |
+
* Select data from db for values.
|
1253 |
+
*
|
1254 |
+
* @param string $db_info
|
1255 |
+
* @param string $value_column
|
1256 |
+
* @param string $table
|
1257 |
+
* @param string $where
|
1258 |
+
* @param string $order_by
|
1259 |
*
|
1260 |
* @return array|null|object
|
1261 |
*/
|
1262 |
+
public function select_data_from_db_for_values( $db_info = '', $value_column = '', $table = '', $where = '', $order_by = '' ) {
|
1263 |
global $wpdb;
|
1264 |
$query = "SELECT `" . $value_column . "` FROM " . $table . $where . " ORDER BY " . $order_by;
|
1265 |
$db_info = trim($db_info, '[]');
|
1283 |
}
|
1284 |
|
1285 |
/**
|
1286 |
+
* Save DB.
|
1287 |
*
|
1288 |
+
* @param int $id
|
1289 |
* @return array( 'error' => true, 'group_id' => $max, 'message' => '' ); in case of error | array('group_id' => $max, 'all_files' => '', 'redirect_url' => '')
|
1290 |
*/
|
1291 |
+
public function save_db( $id = 0 ) {
|
1292 |
global $wpdb;
|
1293 |
$wp_userid = '';
|
1294 |
$wp_username = '';
|
1314 |
$adminemail = get_option('admin_email');
|
1315 |
$current_page_url = WDW_FM_Library(self::PLUGIN)->get_current_page_url();
|
1316 |
$form = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id= %d", $id ) );
|
1317 |
+
|
1318 |
+
$form->save_ip = 1;
|
1319 |
+
$form->save_user_id = 1;
|
1320 |
+
if ( $form && isset($form->privacy) ) {
|
1321 |
+
if ( $form->privacy ) {
|
1322 |
+
$privacy = json_decode($form->privacy);
|
1323 |
+
$form->save_ip = isset($privacy->save_ip) ? $privacy->save_ip : 1;
|
1324 |
+
$form->save_user_id = isset($privacy->save_user_id) ? $privacy->save_user_id : 1;
|
1325 |
+
}
|
1326 |
+
}
|
1327 |
+
|
1328 |
$formtitle = $form->title;
|
1329 |
if ( !$form->form_front ) {
|
1330 |
$id = '';
|
1376 |
$i = $label_id[ $key ];
|
1377 |
|
1378 |
$missing_required_field = FALSE;
|
1379 |
+
$invalid_email_address = FALSE;
|
1380 |
$required = (isset($params[$i]) && strpos($params[$i], '*:*yes*:*w_required*:*') !== FALSE ? 1 : 0);
|
1381 |
|
1382 |
if ( !in_array( $i, $disabled_fields ) ) {
|
1383 |
switch ( $type ) {
|
1384 |
case 'type_text':
|
1385 |
case 'type_password':
|
|
|
1386 |
case "type_own_select":
|
1387 |
case "type_country":
|
1388 |
case "type_number":
|
1397 |
}
|
1398 |
break;
|
1399 |
}
|
1400 |
+
case "type_submitter_mail": {
|
1401 |
+
$value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "";
|
1402 |
+
if ( $required && !isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
|
1403 |
+
$missing_required_field = TRUE;
|
1404 |
+
}
|
1405 |
+
if ( $value !== '' && is_email($value) === FALSE ) {
|
1406 |
+
$invalid_email_address = TRUE;
|
1407 |
+
}
|
1408 |
+
break;
|
1409 |
+
}
|
1410 |
case "type_date": {
|
1411 |
$value = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : "";
|
1412 |
$date_format = isset( $_POST[ 'wdform_' . $i . "_date_format" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_date_format" . $id ] ) : "";
|
2054 |
if ( $missing_required_field ) {
|
2055 |
return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( addslashes( sprintf( __( '%s field is required.', WDFMInstance(self::PLUGIN)->prefix ), $label_label[ $key ] ) ) ) );
|
2056 |
}
|
2057 |
+
if ( $invalid_email_address ) {
|
2058 |
+
return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( addslashes( __( 'Enter a valid email address.', WDFMInstance(self::PLUGIN)->prefix ) ) ) );
|
2059 |
+
}
|
2060 |
|
2061 |
if ( $type == "type_address" ) {
|
2062 |
if ( $value == '*#*#*#' ) {
|
2104 |
}
|
2105 |
|
2106 |
if ( $form->savedb ) {
|
2107 |
+
$submition_data = array(
|
2108 |
'form_id' => $id,
|
2109 |
'element_label' => $i,
|
2110 |
'element_value' => stripslashes( $value ),
|
2111 |
'group_id' => $group_id,
|
2112 |
'date' => date( 'Y-m-d H:i:s' ),
|
2113 |
+
);
|
2114 |
+
if ( $form->save_ip ) {
|
2115 |
+
$submition_data['ip'] = $_SERVER['REMOTE_ADDR'];
|
2116 |
+
}
|
2117 |
+
if ( $form->save_user_id ) {
|
2118 |
+
$submition_data['user_id_wd'] = $current_user->ID;
|
2119 |
+
}
|
2120 |
+
|
2121 |
+
$save_or_no = $wpdb->insert( $wpdb->prefix . "formmaker_submits", $submition_data );
|
|
|
|
|
2122 |
}
|
2123 |
if ( !$save_or_no ) {
|
2124 |
return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFMInstance(self::PLUGIN)->prefix ) ) );
|
2194 |
$business = $form->paypal_email;
|
2195 |
$ip = $_SERVER[ 'REMOTE_ADDR' ];
|
2196 |
$total2 = round( $total, 2 );
|
2197 |
+
|
2198 |
+
$submition_data = array();
|
2199 |
+
|
2200 |
+
$submition_data['form_id'] = $id;
|
2201 |
+
$submition_data['element_label'] = 'item_total';
|
2202 |
+
$submition_data['element_value'] = $form_currency . $total2;
|
2203 |
+
$submition_data['group_id'] = $group_id;
|
2204 |
+
$submition_data['date'] = date( 'Y-m-d H:i:s' );
|
2205 |
+
if ( $form->save_ip ) {
|
2206 |
+
$submition_data['ip'] = $ip;
|
2207 |
+
}
|
2208 |
+
if ( $form->save_user_id ) {
|
2209 |
+
$submition_data['user_id_wd'] = $current_user->ID;
|
2210 |
+
}
|
2211 |
+
|
2212 |
+
$save_or_no = $wpdb->insert( $wpdb->prefix . "formmaker_submits", $submition_data );
|
2213 |
+
|
2214 |
if ( !$save_or_no ) {
|
2215 |
return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFMInstance(self::PLUGIN)->prefix ) ) );
|
2216 |
}
|
2219 |
$total = $total + $paypal[ 'shipping' ];
|
2220 |
}
|
2221 |
$total = round( $total, 2 );
|
2222 |
+
|
2223 |
+
$submition_data['element_label'] = 'total';
|
2224 |
+
$submition_data['element_value'] = $form_currency . $total;
|
2225 |
+
|
2226 |
+
$save_or_no = $wpdb->insert( $wpdb->prefix . "formmaker_submits", $submition_data );
|
2227 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2228 |
if ( !$save_or_no ) {
|
2229 |
return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFMInstance(self::PLUGIN)->prefix ) ) );
|
2230 |
}
|
2231 |
+
|
2232 |
+
$submition_data['element_label'] = '0';
|
2233 |
+
$submition_data['element_value'] = 'In progress';
|
2234 |
+
|
2235 |
+
$save_or_no = $wpdb->insert( $wpdb->prefix . "formmaker_submits", $submition_data );
|
2236 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2237 |
if ( !$save_or_no ) {
|
2238 |
return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFMInstance(self::PLUGIN)->prefix ) ) );
|
2239 |
}
|
2287 |
foreach ( $send_tos as $send_index => $send_to ) {
|
2288 |
$_SESSION[ 'hash' ][] = md5( $ip . time() . rand() );
|
2289 |
$send_to = str_replace( '*', '', $send_to );
|
2290 |
+
|
2291 |
+
$submition_data = array(
|
2292 |
'form_id' => $id,
|
2293 |
'element_label' => 'verifyInfo@' . $send_to,
|
2294 |
'element_value' => $_SESSION[ 'hash' ][ $send_index ] . "**" . $form->mail_verify_expiretime . "**" . $send_to,
|
2295 |
'group_id' => $group_id,
|
2296 |
'date' => date( 'Y-m-d H:i:s' ),
|
2297 |
+
);
|
2298 |
+
if ( $form->save_ip ) {
|
2299 |
+
$submition_data['ip'] = $ip;
|
2300 |
+
}
|
2301 |
+
if ( $form->save_user_id ) {
|
2302 |
+
$submition_data['user_id_wd'] = $current_user->ID;
|
2303 |
+
}
|
2304 |
+
|
2305 |
+
$save_or_no = $wpdb->insert( $wpdb->prefix . "formmaker_submits", $submition_data );
|
2306 |
+
|
|
|
2307 |
if ( !$save_or_no ) {
|
2308 |
return array( 'error' => true, 'group_id' => $group_id, 'message' => addslashes( __( 'Database error occurred. Please try again.', WDFMInstance(self::PLUGIN)->prefix ) ) );
|
2309 |
}
|
2339 |
|
2340 |
do_action( 'fm_addon_frontend_init', $frontend_parmas );
|
2341 |
}
|
2342 |
+
$return_value = array( 'group_id' => $group_id, 'all_files' => $all_files, 'redirect_url' => $str );
|
2343 |
+
$return_value = apply_filters('fm_save_submission_return_value', $return_value);
|
2344 |
+
return $return_value;
|
2345 |
}
|
2346 |
|
2347 |
/**
|
2367 |
}
|
2368 |
|
2369 |
/**
|
2370 |
+
* Remove.
|
2371 |
+
*
|
2372 |
+
* @param int $group_id
|
2373 |
*/
|
2374 |
+
public function remove( $group_id = 0 ) {
|
2375 |
global $wpdb;
|
2376 |
$wpdb->query( $wpdb->prepare( 'DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id= %d', $group_id ) );
|
2377 |
}
|
2378 |
|
2379 |
/**
|
2380 |
+
* Get after submission text.
|
2381 |
+
*
|
2382 |
+
* @param int $form_id
|
2383 |
+
* @param int $group_id
|
2384 |
*
|
2385 |
* @return mixed|null|string
|
2386 |
*/
|
2387 |
+
public function get_after_submission_text( $form_id = 0, $group_id = 0 ) {
|
2388 |
global $wpdb;
|
2389 |
$submit_text = $wpdb->get_var( "SELECT submit_text FROM " . $wpdb->prefix . "formmaker WHERE id='" . $form_id . "'" );
|
2390 |
$current_user = wp_get_current_user();
|
2451 |
}
|
2452 |
|
2453 |
/**
|
2454 |
+
* Increment views count.
|
2455 |
+
*
|
2456 |
* @param $id
|
2457 |
*/
|
2458 |
+
public function increment_views_count( $id = 0 ) {
|
2459 |
global $wpdb;
|
2460 |
$vives_form = $wpdb->get_var( $wpdb->prepare( "SELECT views FROM " . $wpdb->prefix . "formmaker_views WHERE form_id=%d", $id ) );
|
2461 |
if ( isset( $vives_form ) ) {
|
2477 |
}
|
2478 |
|
2479 |
/**
|
2480 |
+
* Gen mail.
|
|
|
|
|
|
|
2481 |
*
|
2482 |
+
* @param int $group_id
|
2483 |
+
* @param array $all_files
|
2484 |
+
* @param int $id
|
2485 |
+
* @param string $str
|
2486 |
* @return array
|
2487 |
*/
|
2488 |
+
public function gen_mail( $group_id = 0, $all_files = array(), $id = 0, $str = '' ) {
|
2489 |
global $wpdb;
|
2490 |
WDW_FM_Library(self::PLUGIN)->start_session();
|
2491 |
// checking save uploads option
|
2551 |
}
|
2552 |
$disabled_fields = explode( ',', WDW_FM_Library(self::PLUGIN)->get('disabled_fields', '') );
|
2553 |
$disabled_fields = array_slice( $disabled_fields, 0, count( $disabled_fields ) - 1 );
|
2554 |
+
$list = '<table cellpadding="3" cellspacing="0" style="width: 600px; border-bottom: 1px solid #CCC; border-right: 1px solid #CCC;">';
|
2555 |
$list_text_mode = '';
|
2556 |
+
$td_style = ' style="border-top: 1px solid #CCC; border-left: 1px solid #CCC; padding: 10px; color: #3D3D3D;"';
|
2557 |
foreach ( $label_order_ids as $key => $label_order_id ) {
|
2558 |
$i = $label_order_id;
|
2559 |
$type = $label_type[ $i ];
|
2571 |
case "type_phone_new": {
|
2572 |
$element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : NULL;
|
2573 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2574 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . '>' . $element_label . '</td><td ' . $td_style . '>' . $element . '</td></tr>';
|
2575 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2576 |
}
|
2577 |
break;
|
2581 |
$element1 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . "1" ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . "1" ] : NULL;
|
2582 |
if ( isset( $element0 ) && $this->empty_field( $element0, $row->mail_emptyfields ) && $this->empty_field( $element1, $row->mail_emptyfields ) ) {
|
2583 |
$element = $element0 . ' - ' . $element1;
|
2584 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . '>' . $element_label . '</td><td ' . $td_style . '>' . $element . '</td></tr>';
|
2585 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2586 |
}
|
2587 |
break;
|
2589 |
case 'type_textarea': {
|
2590 |
$element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? wpautop( $_POST[ 'wdform_' . $i . "_element" . $id ] ) : NULL;
|
2591 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2592 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . '>' . $element_label . '</td><td ' . $td_style . '>' . $element . '</td></tr>';
|
2593 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2594 |
}
|
2595 |
break;
|
2597 |
case "type_hidden": {
|
2598 |
$element = isset( $_POST[ $element_label ] ) ? $_POST[ $element_label ] : NULL;
|
2599 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2600 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . '>' . $element_label . '</td><td ' . $td_style . '>' . $element . '</td></tr>';
|
2601 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2602 |
}
|
2603 |
break;
|
2605 |
case "type_mark_map": {
|
2606 |
$element = isset( $_POST[ 'wdform_' . $i . "_long" . $id ] ) ? $_POST[ 'wdform_' . $i . "_long" . $id ] : NULL;
|
2607 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2608 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . '>' . $element_label . '</td><td ' . $td_style . '>Longitude:' . $element . '<br/>Latitude:' . (isset( $_POST[ 'wdform_' . $i . "_lat" . $id ] ) ? $_POST[ 'wdform_' . $i . "_lat" . $id ] : "") . '</td></tr>';
|
2609 |
$list_text_mode = $list_text_mode . $element_label . ' - Longitude:' . $element . ' Latitude:' . (isset( $_POST[ 'wdform_' . $i . "_lat" . $id ] ) ? $_POST[ 'wdform_' . $i . "_lat" . $id ] : "") . "\r\n";
|
2610 |
}
|
2611 |
break;
|
2613 |
case "type_submitter_mail": {
|
2614 |
$element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : NULL;
|
2615 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2616 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
|
2617 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2618 |
}
|
2619 |
break;
|
2623 |
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 )) ) {
|
2624 |
$ss = isset( $_POST[ 'wdform_' . $i . "_ss" . $id ] ) ? $_POST[ 'wdform_' . $i . "_ss" . $id ] : NULL;
|
2625 |
if ( isset( $ss ) ) {
|
2626 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $hh . ':' . (isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ? $_POST[ 'wdform_' . $i . "_mm" . $id ] : "") . ':' . $ss;
|
2627 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $hh . ':' . (isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ? $_POST[ 'wdform_' . $i . "_mm" . $id ] : "") . ':' . $ss;
|
2628 |
} else {
|
2629 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $hh . ':' . (isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ? $_POST[ 'wdform_' . $i . "_mm" . $id ] : "");
|
2630 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $hh . ':' . (isset( $_POST[ 'wdform_' . $i . "_mm" . $id ] ) ? $_POST[ 'wdform_' . $i . "_mm" . $id ] : "");
|
2631 |
}
|
2632 |
$am_pm = isset( $_POST[ 'wdform_' . $i . "_am_pm" . $id ] ) ? $_POST[ 'wdform_' . $i . "_am_pm" . $id ] : NULL;
|
2643 |
case "type_phone": {
|
2644 |
$element_first = isset( $_POST[ 'wdform_' . $i . "_element_first" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_first" . $id ] : NULL;
|
2645 |
if ( isset( $element_first ) && $this->empty_field( $element_first, $row->mail_emptyfields ) ) {
|
2646 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element_first . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_last" . $id ] : "") . '</td></tr>';
|
2647 |
$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";
|
2648 |
}
|
2649 |
break;
|
2654 |
$element_title = isset( $_POST[ 'wdform_' . $i . "_element_title" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_title" . $id ] : NULL;
|
2655 |
$element_middle = isset( $_POST[ 'wdform_' . $i . "_element_middle" . $id ] ) ? esc_html( $_POST[ 'wdform_' . $i . "_element_middle" . $id ] ) : NULL;
|
2656 |
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 )) ) {
|
2657 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . (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>';
|
2658 |
$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";
|
2659 |
} else {
|
2660 |
if ( $this->empty_field( $element_first, $row->mail_emptyfields ) || $this->empty_field( $_POST[ 'wdform_' . $i . "_element_last" . $id ], $row->mail_emptyfields ) ) {
|
2661 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element_first . ' ' . (isset( $_POST[ 'wdform_' . $i . "_element_last" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_last" . $id ] : "") . '</td></tr>';
|
2662 |
$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";
|
2663 |
}
|
2664 |
}
|
2668 |
case "type_address": {
|
2669 |
$element = isset( $_POST[ 'wdform_' . $i . "_street1" . $id ] ) ? $_POST[ 'wdform_' . $i . "_street1" . $id ] : NULL;
|
2670 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2671 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $label_order_original[ $i ] . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
|
2672 |
$list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
|
2673 |
break;
|
2674 |
}
|
2675 |
$element = isset( $_POST[ 'wdform_' . $i . "_street2" . $id ] ) ? $_POST[ 'wdform_' . $i . "_street2" . $id ] : NULL;
|
2676 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2677 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $label_order_original[ $i ] . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
|
2678 |
$list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
|
2679 |
break;
|
2680 |
}
|
2681 |
$element = isset( $_POST[ 'wdform_' . $i . "_city" . $id ] ) ? $_POST[ 'wdform_' . $i . "_city" . $id ] : NULL;
|
2682 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2683 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $label_order_original[ $i ] . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
|
2684 |
$list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
|
2685 |
break;
|
2686 |
}
|
2687 |
$element = isset( $_POST[ 'wdform_' . $i . "_state" . $id ] ) ? $_POST[ 'wdform_' . $i . "_state" . $id ] : NULL;
|
2688 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2689 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $label_order_original[ $i ] . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
|
2690 |
$list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
|
2691 |
break;
|
2692 |
}
|
2693 |
$element = isset( $_POST[ 'wdform_' . $i . "_postal" . $id ] ) ? $_POST[ 'wdform_' . $i . "_postal" . $id ] : NULL;
|
2694 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2695 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $label_order_original[ $i ] . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
|
2696 |
$list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
|
2697 |
break;
|
2698 |
}
|
2699 |
$element = isset( $_POST[ 'wdform_' . $i . "_country" . $id ] ) ? $_POST[ 'wdform_' . $i . "_country" . $id ] : NULL;
|
2700 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2701 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $label_order_original[ $i ] . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
|
2702 |
$list_text_mode = $list_text_mode . $label_order_original[ $i ] . ' - ' . $element . "\r\n";
|
2703 |
break;
|
2704 |
}
|
2709 |
$month = isset( $_POST[ 'wdform_' . $i . "_month" . $id ] ) ? $_POST[ 'wdform_' . $i . "_month" . $id ] : "";
|
2710 |
$year = isset( $_POST[ 'wdform_' . $i . "_year" . $id ] ) ? $_POST[ 'wdform_' . $i . "_year" . $id ] : "";
|
2711 |
if ( isset( $day ) && $this->empty_field( $day, $row->mail_emptyfields ) ) {
|
2712 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . (($day || $month || $year) ? $day . '-' . $month . '-' . $year : '') . '</td></tr>';
|
2713 |
$list_text_mode = $list_text_mode . $element_label . (($day || $month || $year) ? $day . '-' . $month . '-' . $year : '') . "\r\n";
|
2714 |
}
|
2715 |
break;
|
2717 |
case "type_radio": {
|
2718 |
$element = isset( $_POST[ 'wdform_' . $i . "_other_input" . $id ] ) ? $_POST[ 'wdform_' . $i . "_other_input" . $id ] : NULL;
|
2719 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2720 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
|
2721 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2722 |
break;
|
2723 |
}
|
2724 |
$element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : NULL;
|
2725 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2726 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
|
2727 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2728 |
}
|
2729 |
break;
|
2743 |
$other_element_id = isset( $_POST[ 'wdform_' . $i . "_allow_other_num" . $id ] ) ? $_POST[ 'wdform_' . $i . "_allow_other_num" . $id ] : "";
|
2744 |
}
|
2745 |
if ( $start != -1 || ($start == -1 && $row->mail_emptyfields) ) {
|
2746 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >';
|
2747 |
$list_text_mode = $list_text_mode . $element_label . ' - ';
|
2748 |
}
|
2749 |
if ( $start != -1 ) {
|
2775 |
$value = $value . '.' . $_POST[ 'wdform_' . $i . "_element_cents" . $id ];
|
2776 |
}
|
2777 |
if ( $this->empty_field( $value, $row->mail_emptyfields ) && $value != '.' ) {
|
2778 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $value . $form_currency . '</td></tr>';
|
2779 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $value . $form_currency . "\r\n";
|
2780 |
}
|
2781 |
break;
|
2786 |
$value = $_POST[ 'wdform_' . $i . "_element" . $id ];
|
2787 |
}
|
2788 |
if ( $this->empty_field( $value, $row->mail_emptyfields ) && $value != '.' ) {
|
2789 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . ($value == '' ? '' : $form_currency) . $value . '</td></tr>';
|
2790 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $value . $form_currency . "\r\n";
|
2791 |
}
|
2792 |
break;
|
2800 |
$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;
|
2801 |
$element_quantity = (isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $i . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] : NULL;
|
2802 |
if ( $value != '' ) {
|
2803 |
+
if ( $is_element_quantity ) {
|
2804 |
+
$value .= '<br/>' . $element_quantity_label . ': ' . (($element_quantity == NULL) ? 0 : $element_quantity);
|
2805 |
+
}
|
2806 |
+
for ( $k = 0; $k < 50; $k++ ) {
|
2807 |
$temp_val = isset( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_property" . $id . $k ] : NULL;
|
2808 |
if ( isset( $temp_val ) ) {
|
2809 |
$value .= '<br/>' . (isset( $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_element_property_label" . $id . $k ] : "") . ': ' . $temp_val;
|
2811 |
}
|
2812 |
}
|
2813 |
if ( $this->empty_field( $value, $row->mail_emptyfields ) ) {
|
2814 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $value . '</td></tr>';
|
2815 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . str_replace( '<br/>', ', ', $value ) . "\r\n";
|
2816 |
}
|
2817 |
break;
|
2823 |
$is_element_quantity = isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) ? TRUE : FALSE;
|
2824 |
$element_quantity_label = isset( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] : NULL;
|
2825 |
$element_quantity = (isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $i . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] : NULL;
|
2826 |
+
if ( !empty($is_element_quantity) ) {
|
2827 |
+
$value .= '<br/>' . $element_quantity_label . ': ' . (($element_quantity == NULL) ? 0 : $element_quantity);
|
2828 |
+
}
|
2829 |
for ( $k = 0; $k < 50; $k++ ) {
|
2830 |
$temp_val = isset( $_POST[ 'wdform_' . $i . "_property" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_property" . $id . $k ] : NULL;
|
2831 |
if ( isset( $temp_val ) ) {
|
2834 |
}
|
2835 |
}
|
2836 |
if ( $this->empty_field( $value, $row->mail_emptyfields ) ) {
|
2837 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $value . '</td></tr>';
|
2838 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . str_replace( '<br/>', ', ', $value ) . "\r\n";
|
2839 |
}
|
2840 |
break;
|
2843 |
if ( isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ) {
|
2844 |
$value = $_POST[ 'wdform_' . $i . "_element_label" . $id ] . ' : ' . $form_currency . (isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : "");
|
2845 |
if ( $this->empty_field( $value, $row->mail_emptyfields ) ) {
|
2846 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $value . '</td></tr>';
|
2847 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $value . "\r\n";
|
2848 |
}
|
2849 |
} else {
|
2861 |
}
|
2862 |
}
|
2863 |
if ( $start != -1 || ($start == -1 && $row->mail_emptyfields) ) {
|
2864 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . '>' . $element_label . '</td><td ' . $td_style . '>';
|
2865 |
$list_text_mode = $list_text_mode . $element_label . ' - ';
|
2866 |
}
|
2867 |
if ( $start != -1 ) {
|
2878 |
$element_quantity_label = isset( $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element_quantity_label" . $id ] : NULL;
|
2879 |
$element_quantity = (isset( $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $i . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $i . "_element_quantity" . $id ] : NULL;
|
2880 |
if ( $is_element_quantity ) {
|
2881 |
+
$list = $list . $element_quantity_label . ': ' . (($element_quantity == NULL) ? 0 : $element_quantity);
|
2882 |
+
$list_text_mode = $list_text_mode . $element_quantity_label . ': ' . (($element_quantity == NULL) ? 0 : $element_quantity) . ', ';
|
2883 |
+
}
|
2884 |
}
|
2885 |
if ( $start != -1 ) {
|
2886 |
for ( $k = 0; $k < 50; $k++ ) {
|
2900 |
case "type_paypal_total": {
|
2901 |
$element = isset( $_POST[ 'wdform_' . $i . "_paypal_total" . $id ] ) ? $_POST[ 'wdform_' . $i . "_paypal_total" . $id ] : "";
|
2902 |
if ( $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2903 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
|
2904 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2905 |
}
|
2906 |
break;
|
2909 |
$element = isset( $_POST[ 'wdform_' . $i . "_star_amount" . $id ] ) ? $_POST[ 'wdform_' . $i . "_star_amount" . $id ] : NULL;
|
2910 |
$selected = isset( $_POST[ 'wdform_' . $i . "_selected_star_amount" . $id ] ) ? $_POST[ 'wdform_' . $i . "_selected_star_amount" . $id ] : 0;
|
2911 |
if ( isset( $element ) && $this->empty_field( $selected, $row->mail_emptyfields ) ) {
|
2912 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $selected . '/' . $element . '</td></tr>';
|
2913 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $selected . '/' . $element . "\r\n";
|
2914 |
}
|
2915 |
break;
|
2918 |
$element = isset( $_POST[ 'wdform_' . $i . "_scale_amount" . $id ] ) ? $_POST[ 'wdform_' . $i . "_scale_amount" . $id ] : NULL;
|
2919 |
$selected = isset( $_POST[ 'wdform_' . $i . "_scale_radio" . $id ] ) ? $_POST[ 'wdform_' . $i . "_scale_radio" . $id ] : 0;
|
2920 |
if ( isset( $element ) && $this->empty_field( $selected, $row->mail_emptyfields ) ) {
|
2921 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $selected . '/' . $element . '</td></tr>';
|
2922 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $selected . '/' . $element . "\r\n";
|
2923 |
}
|
2924 |
break;
|
2926 |
case "type_spinner": {
|
2927 |
$element = isset( $_POST[ 'wdform_' . $i . "_element" . $id ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id ] : NULL;
|
2928 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2929 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
|
2930 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2931 |
}
|
2932 |
break;
|
2934 |
case "type_slider": {
|
2935 |
$element = isset( $_POST[ 'wdform_' . $i . "_slider_value" . $id ] ) ? $_POST[ 'wdform_' . $i . "_slider_value" . $id ] : NULL;
|
2936 |
if ( isset( $element ) && $this->empty_field( $element, $row->mail_emptyfields ) ) {
|
2937 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
|
2938 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2939 |
}
|
2940 |
break;
|
2943 |
$element0 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . '0' ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . '0' ] : NULL;
|
2944 |
$element1 = isset( $_POST[ 'wdform_' . $i . "_element" . $id . '1' ] ) ? $_POST[ 'wdform_' . $i . "_element" . $id . '1' ] : NULL;
|
2945 |
if ( (isset( $element0 ) && $this->empty_field( $element0, $row->mail_emptyfields )) || (isset( $element1 ) && $this->empty_field( $element1, $row->mail_emptyfields )) ) {
|
2946 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >From: ' . $element0 . '<span style="margin-left:6px"> To </span>:' . $element1 . '</td></tr>';
|
2947 |
$list_text_mode = $list_text_mode . $element_label . ' - From: ' . $element0 . ' To: ' . $element1 . "\r\n";
|
2948 |
}
|
2949 |
break;
|
2964 |
}
|
2965 |
$element .= "Total: " . $total;
|
2966 |
if ( isset( $element ) && $this->empty_field( $form_empty_field, $row->mail_emptyfields ) ) {
|
2967 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . '>' . $element_label . '</td><td ' . $td_style . ' >' . $element . '</td></tr>';
|
2968 |
$list_text_mode = $list_text_mode . $element_label . ' - ' . $element . "\r\n";
|
2969 |
}
|
2970 |
break;
|
2976 |
$rows_count = sizeof( $mat_rows ) - 1;
|
2977 |
$mat_columns = explode( "***", isset( $_POST[ 'wdform_' . $i . "_hidden_column" . $id ] ) ? $_POST[ 'wdform_' . $i . "_hidden_column" . $id ] : "" );
|
2978 |
$columns_count = sizeof( $mat_columns ) - 1;
|
2979 |
+
$matrix = '<table cellpadding="3" cellspacing="0" style="width: 600px; border-bottom: 1px solid #CCC; border-right: 1px solid #CCC;">';
|
2980 |
+
$matrix .= '<tr><td ' . $td_style . '></td>';
|
2981 |
for ( $k = 1; $k < count( $mat_columns ); $k++ ) {
|
2982 |
+
$matrix .= '<td style="border-top: 1px solid #CCC; border-left: 1px solid #CCC; padding: 10px; color: #3D3D3D; background-color: #EEEEEE; padding: 5px; ">' . $mat_columns[ $k ] . '</td>';
|
2983 |
}
|
2984 |
$matrix .= '</tr>';
|
2985 |
$aaa = Array();
|
2986 |
for ( $k = 1; $k <= $rows_count; $k++ ) {
|
2987 |
+
$matrix .= '<tr><td style="border-top: 1px solid #CCC; border-left: 1px solid #CCC; padding: 10px; color: #3D3D3D; background-color: #EEEEEE; padding: 5px;">' . $mat_rows[ $k ] . '</td>';
|
2988 |
if ( $input_type == "radio" ) {
|
2989 |
$mat_radio = isset( $_POST[ 'wdform_' . $i . "_input_element" . $id . $k ] ) ? $_POST[ 'wdform_' . $i . "_input_element" . $id . $k ] : 0;
|
2990 |
if ( $mat_radio == 0 ) {
|
3001 |
$checked = "";
|
3002 |
}
|
3003 |
$sign = $checked == 'checked' ? '✔' : '';
|
3004 |
+
$matrix .= '<td style="border-top: 1px solid #CCC; border-left: 1px solid #CCC; padding: 10px; color: #3D3D3D; text-align: center;">' . $sign . '</td>';
|
3005 |
}
|
3006 |
} else {
|
3007 |
if ( $input_type == "checkbox" ) {
|
3014 |
$checked = "";
|
3015 |
}
|
3016 |
$sign = $checked == 'checked' ? '✔' : '';
|
3017 |
+
$matrix .= '<td style="border-top: 1px solid #CCC; border-left: 1px solid #CCC; padding: 10px; color: #3D3D3D; text-align: center;">' . $sign . '</td>';
|
3018 |
}
|
3019 |
} else {
|
3020 |
if ( $input_type == "text" ) {
|
3023 |
if ( $checked ) {
|
3024 |
$form_empty_field = 1;
|
3025 |
}
|
3026 |
+
$matrix .= '<td style="border-top: 1px solid #CCC; border-left: 1px solid #CCC; padding: 10px; color: #3D3D3D; text-align: center;">' . $checked . '</td>';
|
3027 |
}
|
3028 |
} else {
|
3029 |
for ( $j = 1; $j <= $columns_count; $j++ ) {
|
3031 |
if ( $checked ) {
|
3032 |
$form_empty_field = 1;
|
3033 |
}
|
3034 |
+
$matrix .= '<td style="border-top: 1px solid #CCC; border-left: 1px solid #CCC; padding: 10px; color: #3D3D3D; text-align: center;">' . $checked . '</td>';
|
3035 |
}
|
3036 |
}
|
3037 |
}
|
3040 |
}
|
3041 |
$matrix .= '</table>';
|
3042 |
if ( isset( $matrix ) && $this->empty_field( $form_empty_field, $row->mail_emptyfields ) ) {
|
3043 |
+
$list = $list . '<tr valign="top"><td ' . $td_style . ' >' . $element_label . '</td><td ' . $td_style . ' >' . $matrix . '</td></tr>';
|
3044 |
}
|
3045 |
break;
|
3046 |
}
|
3051 |
}
|
3052 |
}
|
3053 |
$list = $list . '</table>';
|
3054 |
+
|
3055 |
+
// User part.
|
3056 |
if ( $row->sendemail ) {
|
3057 |
$fromname = $row->mail_from_name_user;
|
3058 |
+
$from_email = $row->mail_from_user;
|
3059 |
$subject = !empty( $row->mail_subject_user ) ? $row->mail_subject_user : $row->title;
|
3060 |
$attachment_user = array();
|
3061 |
if ( !WDFMInstance(self::PLUGIN)->is_demo ) {
|
3121 |
foreach ( $this->custom_fields as $key => $custom_field ) {
|
3122 |
$new_script = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $new_script );
|
3123 |
$fromname = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $fromname );
|
3124 |
+
$from_email = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $from_email );
|
3125 |
$subject = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $subject );
|
3126 |
}
|
3127 |
+
if ( $fromname === '' ) {
|
3128 |
+
$fromname = get_bloginfo('name');
|
3129 |
+
}
|
3130 |
|
3131 |
$header_arr = array();
|
3132 |
if ( $row->mail_from_user != '' ) {
|
3133 |
+
$header_arr[ 'from' ] = $from_email;
|
3134 |
}
|
3135 |
$header_arr['from_name'] = $fromname;
|
3136 |
$header_arr['content_type'] = $content_type;
|
3153 |
$send_copy = isset( $_POST[ "wdform_send_copy_" . $id ] ) ? $_POST[ "wdform_send_copy_" . $id ] : NULL;
|
3154 |
if ( isset( $send_copy ) ) {
|
3155 |
$send = TRUE;
|
3156 |
+
}
|
3157 |
+
else {
|
3158 |
$mail_verification_post_id = (int)$wpdb->get_var( $wpdb->prepare( 'SELECT mail_verification_post_id FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id ) );
|
3159 |
$verification_link = get_post( $mail_verification_post_id );
|
3160 |
|
3191 |
}
|
3192 |
}
|
3193 |
}
|
3194 |
+
|
3195 |
+
// Admin part.
|
3196 |
if ( $row->sendemail ) {
|
3197 |
$recipient = $row->mail ? $row->mail : '';
|
3198 |
$subject = !empty( $row->mail_subject ) ? $row->mail_subject : $row->title;
|
3199 |
|
3200 |
$fromname = $row->from_name;
|
3201 |
+
$from_mail = $row->from_mail;
|
3202 |
$attachment = array();
|
3203 |
if ( !WDFMInstance(self::PLUGIN)->is_demo ) {
|
3204 |
for ( $k = 0; $k < count( $all_files ); $k++ ) {
|
3265 |
}
|
3266 |
$this->custom_fields['all'] = $list;
|
3267 |
|
3268 |
+
foreach ( $this->custom_fields as $key => $custom_field ) {
|
3269 |
$new_script = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $new_script );
|
3270 |
$recipient = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $recipient);
|
3271 |
$fromname = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $fromname );
|
3272 |
+
$from_mail = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $from_mail );
|
3273 |
$subject = str_replace( array( '%' . $key . '%', '{' . $key . '}' ), $custom_field, $subject );
|
3274 |
}
|
3275 |
+
if ( $fromname === '' ) {
|
3276 |
+
$fromname = get_bloginfo('name');
|
3277 |
+
}
|
3278 |
if ( $row->from_mail ) {
|
3279 |
+
$header_arr[ 'from' ] = isset( $_POST['wdform_' . $row->from_mail . "_element" . $id] ) ? $_POST['wdform_' . $row->from_mail . "_element" . $id] : $from_mail;
|
3280 |
}
|
3281 |
$header_arr['from_name'] = $fromname;
|
3282 |
$header_arr['content_type'] = $content_type;
|
3379 |
}
|
3380 |
|
3381 |
/**
|
3382 |
+
* Custom fields mail.
|
|
|
|
|
|
|
|
|
|
|
3383 |
*
|
3384 |
+
* @param string $type
|
3385 |
+
* @param string $key
|
3386 |
+
* @param int $id
|
3387 |
+
* @param array $attachment
|
3388 |
+
* @param string $form_currency
|
3389 |
+
* @param int $file_upload_link
|
3390 |
+
* @return null|string $new_value
|
3391 |
*/
|
3392 |
+
public static function custom_fields_mail( $type = '', $key = '', $id = 0, $attachment = array(), $form_currency = '', $file_upload_link = 0 ) {
|
3393 |
$new_value = "";
|
3394 |
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" ) {
|
3395 |
switch ( $type ) {
|
3618 |
$is_element_quantity = isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) ? TRUE : FALSE;
|
3619 |
$element_quantity_label = isset( $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] : NULL;
|
3620 |
$element_quantity = (isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $key . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] : NULL;
|
3621 |
+
if ( $is_element_quantity ) {
|
3622 |
+
$new_value .= '<br/>' . $element_quantity_label . ': ' . ( !(empty($element_quantity)) ? $element_quantity : 0);
|
3623 |
}
|
3624 |
+
for ( $k = 0; $k < 50; $k++ ) {
|
3625 |
$temp_val = isset( $_POST[ 'wdform_' . $key . "_property" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_property" . $id . $k ] : NULL;
|
3626 |
if ( isset( $temp_val ) ) {
|
3627 |
$new_value .= '<br/>' . (isset( $_POST[ 'wdform_' . $key . "_element_property_label" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_element_property_label" . $id . $k ] : "") . ': ' . $temp_val;
|
3635 |
$is_element_quantity = isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) ? TRUE : FALSE;
|
3636 |
$element_quantity_label = isset( $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] : NULL;
|
3637 |
$element_quantity = ( isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $key . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] : NULL;
|
3638 |
+
if ( $is_element_quantity ) {
|
3639 |
+
$new_value .= '<br/>'. $element_quantity_label . ': ' . ( (!empty($element_quantity)) ? $element_quantity : 0 );
|
3640 |
+
}
|
3641 |
for ( $k = 0; $k < 50; $k++ ) {
|
3642 |
$temp_val = isset( $_POST[ 'wdform_' . $key . "_property" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_property" . $id . $k ] : NULL;
|
3643 |
if ( isset( $temp_val ) ) {
|
3671 |
$element_quantity_label = isset( $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] ) ? $_POST[ 'wdform_' . $key . "_element_quantity_label" . $id ] : NULL;
|
3672 |
$element_quantity = (isset( $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] ) && $_POST[ 'wdform_' . $key . "_element_quantity" . $id ]) ? $_POST[ 'wdform_' . $key . "_element_quantity" . $id ] : NULL;
|
3673 |
if ( $is_element_quantity ) {
|
3674 |
+
$new_value .= $element_quantity_label . ': ' . ( (!empty($element_quantity)) ? $element_quantity : 0 );
|
3675 |
+
}
|
3676 |
for ( $k = 0; $k < 50; $k++ ) {
|
3677 |
$temp_val = isset( $_POST[ 'wdform_' . $key . "_property" . $id . $k ] ) ? $_POST[ 'wdform_' . $key . "_property" . $id . $k ] : NULL;
|
3678 |
if ( isset( $temp_val ) ) {
|
3813 |
}
|
3814 |
|
3815 |
/**
|
3816 |
+
* @param string $element
|
3817 |
+
* @param string $mail_emptyfields
|
3818 |
*
|
3819 |
* @return int
|
3820 |
*/
|
3821 |
+
public function empty_field( $element = '', $mail_emptyfields = '' ) {
|
3822 |
if ( !$mail_emptyfields ) {
|
3823 |
if ( empty( $element ) ) {
|
3824 |
return 0;
|
3829 |
}
|
3830 |
|
3831 |
/**
|
3832 |
+
* @param string $date
|
3833 |
* @param string $format
|
3834 |
*
|
3835 |
* @return bool
|
3836 |
*/
|
3837 |
+
public function fm_validateDate( $date = '', $format = 'Y-m-d H:i:s' ) {
|
3838 |
$d = DateTime::createFromFormat( $format, $date );
|
3839 |
|
3840 |
return $d && $d->format( $format ) == $date;
|
frontend/models/verify_email.php
CHANGED
@@ -12,13 +12,13 @@ class FMModelVerify_email_fmc {
|
|
12 |
/**
|
13 |
* Set given email as validated and return message.
|
14 |
*
|
15 |
-
* @param $gid
|
16 |
-
* @param $md5
|
17 |
-
* @param $email
|
18 |
*
|
19 |
* @return bool|mixed|string|void
|
20 |
*/
|
21 |
-
function set_validation( $gid, $md5, $email ) {
|
22 |
global $wpdb;
|
23 |
$query = $wpdb->prepare("SELECT * FROM `" . $wpdb->prefix . "formmaker_submits` WHERE group_id='%d' AND element_label REGEXP 'verifyInfo'", $gid);
|
24 |
$submissions = $wpdb->get_results($query);
|
12 |
/**
|
13 |
* Set given email as validated and return message.
|
14 |
*
|
15 |
+
* @param int $gid
|
16 |
+
* @param string $md5
|
17 |
+
* @param string $email
|
18 |
*
|
19 |
* @return bool|mixed|string|void
|
20 |
*/
|
21 |
+
function set_validation( $gid = 0, $md5 = '', $email = '' ) {
|
22 |
global $wpdb;
|
23 |
$query = $wpdb->prepare("SELECT * FROM `" . $wpdb->prefix . "formmaker_submits` WHERE group_id='%d' AND element_label REGEXP 'verifyInfo'", $gid);
|
24 |
$submissions = $wpdb->get_results($query);
|
frontend/views/form_maker.php
CHANGED
@@ -15,7 +15,7 @@ class FMViewForm_maker_fmc {
|
|
15 |
*
|
16 |
* @param $model
|
17 |
*/
|
18 |
-
public function __construct( $model ) {
|
19 |
$this->model = $model;
|
20 |
|
21 |
wp_enqueue_script('jquery');
|
@@ -33,14 +33,14 @@ class FMViewForm_maker_fmc {
|
|
33 |
/**
|
34 |
* Display.
|
35 |
*
|
36 |
-
* @param
|
37 |
-
* @param
|
38 |
-
* @param
|
39 |
* @param string $formType
|
40 |
*
|
41 |
* @return string
|
42 |
*/
|
43 |
-
public function display( $result, $fm_settings, $form_id, $formType = 'embedded' ) {
|
44 |
$current_user = wp_get_current_user();
|
45 |
if ( $current_user->ID != 0 ) {
|
46 |
$wp_username = $current_user->display_name;
|
@@ -381,9 +381,9 @@ class FMViewForm_maker_fmc {
|
|
381 |
class="wd-width-100"
|
382 |
id="wdform_' . $id1 . '_element' . $form_id . '"
|
383 |
name="wdform_' . $id1 . '_element' . $form_id . '"
|
384 |
-
value="' . $param['w_first_val'] . '"
|
385 |
-
title="' . $param['w_title'] . '"
|
386 |
-
placeholder="' . $param['w_title'] . '"
|
387 |
' . $readonly . '
|
388 |
' . $param['attributes'] . ' />';
|
389 |
if ( isset($symbol_end[$id1]) ) {
|
@@ -440,8 +440,8 @@ class FMViewForm_maker_fmc {
|
|
440 |
class="wd-width-100"
|
441 |
id="wdform_' . $id1 . '_element' . $form_id . '"
|
442 |
name="wdform_' . $id1 . '_element' . $form_id . '"
|
443 |
-
value="' . $param['w_first_val'] . '"
|
444 |
-
title="' . $param['w_title'] . '"
|
445 |
' . $param['attributes'] . '>
|
446 |
</div>';
|
447 |
$rep .= '</div>';
|
@@ -570,7 +570,7 @@ class FMViewForm_maker_fmc {
|
|
570 |
$html = '<textarea class="wd-width-100"
|
571 |
id="wdform_' . $id1 . '_element' . $form_id . '"
|
572 |
name="wdform_' . $id1 . '_element' . $form_id . '"
|
573 |
-
placeholder="' . $param['w_title'] . '"
|
574 |
style="height: ' . $param['w_size_h'] . 'px;"
|
575 |
' . $param['attributes'] . '>' . $textarea_value . '</textarea>';
|
576 |
|
@@ -628,14 +628,14 @@ class FMViewForm_maker_fmc {
|
|
628 |
$param['w_class'] .= ' wd-flex-row';
|
629 |
|
630 |
$html = '<div class="wd-flex wd-flex-column wd-width-20">
|
631 |
-
<input type="text" class="wd-phone-first" id="wdform_' . $id1 . '_element_first' . $form_id . '" name="wdform_' . $id1 . '_element_first' . $form_id . '" value="' . $w_first_val[0] . '" title="' . $w_title[0] . '" placeholder="' . $w_title[0] . '" ' . $param['attributes'] . '>
|
632 |
<label for="wdform_' . $id1 . '_element_first' . $form_id . '" class="mini_label wd-flex-column">' . $w_mini_labels[0] . '</label>
|
633 |
</div>
|
634 |
<div>
|
635 |
<div class="wd-flex wd-flex-column "> - </div>
|
636 |
</div>
|
637 |
<div class="wd-flex wd-flex-column wd-width-80">
|
638 |
-
<input type="text" class="wd-flex-column wd-width-100" id="wdform_' . $id1 . '_element_last' . $form_id . '" name="wdform_' . $id1 . '_element_last' . $form_id . '" value="' . $w_first_val[1] . '" title="' . $w_title[1] . '" placeholder="' . $w_title[1] . '" ' . $param['attributes'] . ' />
|
639 |
<label for="wdform_' . $id1 . '_element_last' . $form_id . '" class="wd-flex-column mini_label">' . $w_mini_labels[1] . '</label>
|
640 |
</div>';
|
641 |
|
@@ -679,8 +679,8 @@ class FMViewForm_maker_fmc {
|
|
679 |
class="wd-width-100"
|
680 |
id="wdform_' . $id1 . '_element' . $form_id . '"
|
681 |
name="wdform_' . $id1 . '_element' . $form_id . '"
|
682 |
-
value="' . $param['w_first_val'] . '"
|
683 |
-
placeholder="" ' . $param['attributes'] . ' />';
|
684 |
|
685 |
// Generate field.
|
686 |
$rep = $this->wdform_field($type, $param, $row, $html);
|
@@ -790,25 +790,25 @@ class FMViewForm_maker_fmc {
|
|
790 |
if ( $w_name_fields[0] == 'yes' ) {
|
791 |
$first_field_id = 'wdform_' . $id1 . '_element_title' . $form_id;
|
792 |
$html .= '<div class="wd-flex wd-flex-column wd-width-10">';
|
793 |
-
$html .= '<input type="text" id="wdform_' . $id1 . '_element_title' . $form_id . '" name="wdform_' . $id1 . '_element_title' . $form_id . '" value="' . $w_first_val[2] . '" title="' . $w_title[2] . '" placeholder="' . $w_title[2] . '" />';
|
794 |
$html .= '<label class="mini_label" for="wdform_' . $id1 . '_element_title' . $form_id . '">' . $w_mini_labels[0] . '</label>';
|
795 |
$html .= '</div>';
|
796 |
$html .= '<div class="wd-flex wd-flex-column wd-name-separator"></div>';
|
797 |
}
|
798 |
$html .= '<div class="wd-flex wd-flex-column wd-width-50">';
|
799 |
-
$html .= '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_element_first' . $form_id . '" name="wdform_' . $id1 . '_element_first' . $form_id . '" value="' . $w_first_val[0] . '" title="' . $w_title[0] . '" placeholder="' . $w_title[0] . '" ' . $param['attributes'] . ' />';
|
800 |
$html .= '<label class="mini_label" for="wdform_' . $id1 . '_element_first' . $form_id . '">' . $w_mini_labels[1] . '</label>';
|
801 |
$html .= '</div>';
|
802 |
$html .= '<div class="wd-flex wd-flex-column wd-name-separator"></div>';
|
803 |
$html .= '<div class="wd-flex wd-flex-column wd-width-50">';
|
804 |
-
$html .= '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_element_last' . $form_id . '" name="wdform_' . $id1 . '_element_last' . $form_id . '" value="' . $w_first_val[1] . '" title="' . $w_title[1] . '" placeholder="' . $w_title[1] . '" ' . $param['attributes'] . ' />';
|
805 |
$html .= '<label class="mini_label" for="wdform_' . $id1 . '_element_last' . $form_id . '">' . $w_mini_labels[2] . '</label>';
|
806 |
$html .= '</div>';
|
807 |
|
808 |
if ( $w_name_fields[1] == 'yes' ) {
|
809 |
$html .= '<div class="wd-flex wd-flex-column wd-name-separator"></div>';
|
810 |
$html .= '<div class="wd-flex wd-flex-column wd-width-50">';
|
811 |
-
$html .= '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_element_middle' . $form_id . '" name="wdform_' . $id1 . '_element_middle' . $form_id . '" value="' . $w_first_val[3] . '" title="' . $w_title[3] . '" placeholder="' . $w_title[3] . '" />';
|
812 |
$html .= '<label class="mini_label" for="wdform_' . $id1 . '_element_middle' . $form_id . '">' . $w_mini_labels[3] . '</label>';
|
813 |
$html .= '</div>';
|
814 |
}
|
@@ -1018,7 +1018,7 @@ class FMViewForm_maker_fmc {
|
|
1018 |
$message_check_email = addslashes(__('This is not a valid email address.', WDFMInstance(self::PLUGIN)->prefix));
|
1019 |
$onchange = (isset($param['w_verification']) && $param['w_verification'] == "yes") ? '; wd_check_confirmation_email(\'' . $id1 . '\', \'' . $form_id . '\', \'' . $message_confirm . '\')' : '';
|
1020 |
|
1021 |
-
$html = '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_element' . $form_id . '" name="wdform_' . $id1 . '_element' . $form_id . '" value="' . $param['w_first_val'] . '" title="' . $param['w_title'] . '" placeholder="' . $param['w_title'] . '" ' . $param['attributes'] . ' onchange="wd_check_email(\'' . $id1 . '\', \'' . $form_id . '\', \'' . $message_check_email . '\')' . $onchange . '" />';
|
1022 |
|
1023 |
// Generate field.
|
1024 |
$rep = $this->wdform_field($type, $param, $row, $html);
|
@@ -1028,7 +1028,7 @@ class FMViewForm_maker_fmc {
|
|
1028 |
$param['label'] = $param['w_verification_label'];
|
1029 |
$param['id'] = 'wdform_' . $id1 . '_1_element' . $form_id;
|
1030 |
|
1031 |
-
$html = '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_1_element' . $form_id . '" name="wdform_' . $id1 . '_1_element' . $form_id . '" placeholder="' . $param['w_verification_placeholder'] . '" title="' . $param['w_verification_placeholder'] . '" ' . $param['attributes'] . 'onchange="wd_check_confirmation_email(\'' . $id1 . '\', \'' . $form_id . '\', \'' . $message_confirm . '\')" />';
|
1032 |
|
1033 |
// Generate field.
|
1034 |
$rep .= $this->wdform_field($type, $param, $row, $html);
|
@@ -1451,13 +1451,13 @@ class FMViewForm_maker_fmc {
|
|
1451 |
$rep .= '<span class="wdform_colon wd-vertical-middle"> ' . $form_currency . ' </span>';
|
1452 |
$rep .= '</div>';
|
1453 |
$rep .= '<div id="wdform_' . $id1 . '_td_name_dollars" class="wd-table-cell">';
|
1454 |
-
$rep .= '<input type="text" id="wdform_' . $id1 . '_element_dollars' . $form_id . '" name="wdform_' . $id1 . '_element_dollars' . $form_id . '" value="' . $w_first_val[0] . '" title="' . $w_title[0] . '" onkeypress="return check_isnum(event)" style="width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' />';
|
1455 |
$rep .= '</div>';
|
1456 |
$rep .= '<div id="wdform_' . $id1 . '_td_name_divider" class="' . $hide_cents . '">';
|
1457 |
$rep .= '<span class="wdform_colon wd-vertical-middle"> . </span>';
|
1458 |
$rep .= '</div>';
|
1459 |
$rep .= '<div id="wdform_' . $id1 . '_td_name_cents" class="' . $hide_cents . '">';
|
1460 |
-
$rep .= '<input type="text" class="wd-paypal-cent" id="wdform_' . $id1 . '_element_cents' . $form_id . '" name="wdform_' . $id1 . '_element_cents' . $form_id . '" value="' . $w_first_val[1] . '" title="' . $w_title[1] . '" ' . $param['attributes'] . ' />';
|
1461 |
$rep .= '</div></div>';
|
1462 |
$rep .= '<div id="wdform_' . $id1 . '_tr_price2" class="wd-table-row">';
|
1463 |
$rep .= '<div class="wd-table-cell"><label class="mini_label"></label></div>';
|
@@ -1669,10 +1669,20 @@ class FMViewForm_maker_fmc {
|
|
1669 |
/**
|
1670 |
* Autoload form.
|
1671 |
*
|
|
|
1672 |
* @return string
|
1673 |
*/
|
1674 |
-
public function autoload_form(
|
1675 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1676 |
$fm_form = '';
|
1677 |
switch ($type) {
|
1678 |
case 'topbar': {
|
@@ -1711,7 +1721,7 @@ class FMViewForm_maker_fmc {
|
|
1711 |
}
|
1712 |
|
1713 |
$fm_form .= '<div id="fm-topbar' . $id . '" class="fm-topbar" style="position: ' . $fixed_relative . '; ' . $top_bottom . ': 0px; visibility:hidden;">';
|
1714 |
-
$fm_form .= $
|
1715 |
$fm_form .= '<div id="fm-action-buttons' . $id . '" class="fm-action-buttons">';
|
1716 |
if ($closing) {
|
1717 |
$fm_form .= '<span id="closing-form' . $id . '" class="closing-form dashicons dashicons-no" onclick="fm_hide_form(' . $id . ', ' . $hide_duration . ', function(){
|
@@ -1737,26 +1747,23 @@ class FMViewForm_maker_fmc {
|
|
1737 |
$left_right_class = $form->scrollbox_position ? 'float-right' : 'float-left';
|
1738 |
if ($display_on_this && $hide_mobile) {
|
1739 |
WDW_FM_Library(self::PLUGIN)->start_session();
|
1740 |
-
if (isset($_SESSION['fm_hide_form_after_submit' . $id]) && $_SESSION['fm_hide_form_after_submit' . $id] == 1) {
|
1741 |
-
if ($error == 'success') {
|
1742 |
-
if ($message) {
|
1743 |
$onload_js .= '
|
1744 |
jQuery("#fm-form' . $id . ', #fm-pages' . $id . '").addClass("fm-hide");
|
1745 |
-
fm_hide_form(' . $id . ', ' . $hide_duration . ');
|
1746 |
jQuery("#fm-scrollbox' . $id . '").removeClass("fm-animated fadeOutDown").addClass("fm-animated fadeInUp");
|
1747 |
jQuery("#fm-scrollbox' . $id . '").css("visibility", "");
|
1748 |
jQuery("#minimize-form' . $id . '").css("visibility", "hidden");
|
1749 |
';
|
1750 |
}
|
1751 |
-
|
1752 |
-
$onload_js .= 'fm_hide_form(' . $id . ', ' . $hide_duration . ');';
|
1753 |
-
}
|
1754 |
}
|
1755 |
}
|
1756 |
else {
|
1757 |
-
if (isset($_SESSION['error_occurred' . $id]) && $_SESSION['error_occurred' . $id] == 1) {
|
1758 |
$_SESSION['error_occurred' . $id] = 0;
|
1759 |
-
if ($message) {
|
1760 |
$onload_js .= '
|
1761 |
jQuery("#fm-scrollbox' . $id . '").removeClass("fm-animated fadeOutDown").addClass("fm-animated fadeInUp");
|
1762 |
jQuery("#fm-scrollbox' . $id . '").removeClass("fm-animated fadeOutDown").addClass("fm-animated fadeInUp");
|
@@ -1766,7 +1773,7 @@ class FMViewForm_maker_fmc {
|
|
1766 |
}
|
1767 |
else {
|
1768 |
$onload_js .= '
|
1769 |
-
if(' . $hide_duration . ' == 0){
|
1770 |
localStorage.removeItem("hide-"+' . $id . ');
|
1771 |
}
|
1772 |
var hide_scrollbox = localStorage.getItem("hide-"+' . $id . ');';
|
@@ -1794,7 +1801,7 @@ class FMViewForm_maker_fmc {
|
|
1794 |
|
1795 |
$fm_form .= '<div id="fm-scrollbox' . $id . '" class="fm-scrollbox ' . $hide_mobile_class . '" style="' . $left_right . ': 0px; visibility:hidden;">';
|
1796 |
$fm_form .= '<div class="fm-scrollbox-form ' . $left_right_class . '">';
|
1797 |
-
$fm_form .= $
|
1798 |
$fm_form .= '<div id="fm-action-buttons' . $id . '" class="fm-action-buttons">';
|
1799 |
if ($minimize) {
|
1800 |
$fm_form .= '<span id="minimize-form' . $id . '" class="minimize-form dashicons dashicons-minus" onclick="minimize_form(' . $id . ')"></span>';
|
@@ -1883,8 +1890,8 @@ class FMViewForm_maker_fmc {
|
|
1883 |
<div class="fm-popover-container" id="fm-popover-container' . $id . '">
|
1884 |
<div class="fm-popover-inner-background" id="fm-popover-inner-background' . $id . '"></div>
|
1885 |
<div class="fm-popover-content">';
|
1886 |
-
|
1887 |
-
|
1888 |
$fm_form .= '<span id="closing-form' . $id . '" class="closing-form dashicons dashicons-no" onclick="fm_hide_form(' . $id . ', ' . $frequency . ', function(){
|
1889 |
jQuery(\'#fm-popover-background' . $id . '\').css(\'display\', \'none\');
|
1890 |
jQuery(\'#fm-popover' . $id . '\').css(\'display\', \'none\');
|
@@ -1902,7 +1909,7 @@ class FMViewForm_maker_fmc {
|
|
1902 |
$onload_js = 'jQuery(document).ready(function () {' . $onload_js . '})';
|
1903 |
}
|
1904 |
if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
|
1905 |
-
wp_add_inline_script('
|
1906 |
}
|
1907 |
else {
|
1908 |
echo '<script>' . $onload_js . '</script>';
|
@@ -1912,58 +1919,116 @@ class FMViewForm_maker_fmc {
|
|
1912 |
}
|
1913 |
|
1914 |
/**
|
1915 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1916 |
*/
|
1917 |
-
private function type_file_upload($params, $row, $id1, $form_id, $param) {
|
1918 |
return '';
|
1919 |
}
|
1920 |
|
1921 |
/**
|
1922 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1923 |
*/
|
1924 |
-
private function type_paypal_price_new($params, $row, $id1, $form_id, $param, $form_currency, $symbol_begin, $symbol_end) {
|
1925 |
return '';
|
1926 |
}
|
1927 |
|
1928 |
/**
|
1929 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1930 |
*/
|
1931 |
-
private function type_paypal_select($params, $row, $id1, $form_id, $param) {
|
1932 |
return '';
|
1933 |
}
|
1934 |
|
1935 |
/**
|
1936 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1937 |
*/
|
1938 |
-
private function type_paypal_radio($params, $row, $id1, $form_id, $param) {
|
1939 |
return '';
|
1940 |
}
|
1941 |
|
1942 |
/**
|
1943 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1944 |
*/
|
1945 |
-
private function type_paypal_checkbox($params, $row, $id1, $form_id, $param) {
|
1946 |
return '';
|
1947 |
}
|
1948 |
|
1949 |
/**
|
1950 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1951 |
*/
|
1952 |
-
private function type_paypal_shipping($params, $row, $id1, $form_id, $param) {
|
1953 |
return '';
|
1954 |
}
|
1955 |
|
1956 |
/**
|
1957 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1958 |
*/
|
1959 |
-
private function type_paypal_total($params, $row, $id1, $form_id, $param) {
|
1960 |
return '';
|
1961 |
}
|
1962 |
|
1963 |
/**
|
1964 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
1965 |
*/
|
1966 |
-
private function type_map($params, $id1, $row, $param) {
|
1967 |
wp_enqueue_script('google-maps');
|
1968 |
wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-gmap_form');
|
1969 |
|
@@ -2012,122 +2077,241 @@ class FMViewForm_maker_fmc {
|
|
2012 |
}
|
2013 |
|
2014 |
/**
|
2015 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016 |
*/
|
2017 |
-
private function type_checkbox($params, $row, $form_id, $id1, $type, $param) {
|
2018 |
return '';
|
2019 |
}
|
2020 |
|
2021 |
/**
|
2022 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023 |
*/
|
2024 |
-
private function type_radio($params, $row, $form_id, $id1, $type, $param) {
|
2025 |
return '';
|
2026 |
}
|
2027 |
|
2028 |
/**
|
2029 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2030 |
*/
|
2031 |
-
private function type_own_select($params, $row, $form_id, $id1, $type, $param) {
|
2032 |
return '';
|
2033 |
}
|
2034 |
|
2035 |
/**
|
2036 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2037 |
*/
|
2038 |
-
private function type_date_new($params, $row, $form_id, $id1, $type, $param) {
|
2039 |
return '';
|
2040 |
}
|
2041 |
|
2042 |
/**
|
2043 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2044 |
*/
|
2045 |
-
private function type_date_fields($params, $row, $form_id, $id1, $type, $param) {
|
2046 |
return '';
|
2047 |
}
|
2048 |
|
2049 |
/**
|
2050 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2051 |
*/
|
2052 |
-
private function type_date_range($params, $row, $form_id, $id1, $type, $param) {
|
2053 |
return '';
|
2054 |
}
|
2055 |
|
2056 |
/**
|
2057 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2058 |
*/
|
2059 |
-
private function type_spinner($params, $row, $form_id, $id1, $type, $param) {
|
2060 |
return '';
|
2061 |
}
|
2062 |
|
2063 |
/**
|
2064 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2065 |
*/
|
2066 |
-
private function type_star_rating($params, $row, $form_id, $id1, $type, $param) {
|
2067 |
return '';
|
2068 |
}
|
2069 |
|
2070 |
/**
|
2071 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2072 |
*/
|
2073 |
-
private function type_scale_rating($params, $row, $form_id, $id1, $type, $param) {
|
2074 |
return '';
|
2075 |
}
|
2076 |
|
2077 |
/**
|
2078 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2079 |
*/
|
2080 |
-
private function type_slider($params, $row, $form_id, $id1, $type, $param) {
|
2081 |
return '';
|
2082 |
}
|
2083 |
|
2084 |
/**
|
2085 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2086 |
*/
|
2087 |
-
private function type_range($params, $row, $form_id, $id1, $type, $param) {
|
2088 |
return '';
|
2089 |
}
|
2090 |
|
2091 |
/**
|
2092 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2093 |
*/
|
2094 |
-
private function type_grading($params, $row, $form_id, $id1, $type, $param) {
|
2095 |
return '';
|
2096 |
}
|
2097 |
|
2098 |
/**
|
2099 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2100 |
*/
|
2101 |
-
private function type_matrix($params, $row, $form_id, $id1, $type, $param) {
|
2102 |
return '';
|
2103 |
}
|
2104 |
|
2105 |
/**
|
2106 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2107 |
*/
|
2108 |
-
private function type_time($params, $row, $form_id, $id1, $type, $param) {
|
2109 |
return '';
|
2110 |
}
|
2111 |
|
2112 |
/**
|
2113 |
-
*
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2114 |
*/
|
2115 |
-
private function type_country($params, $row, $form_id, $id1, $type, $param) {
|
2116 |
return '';
|
2117 |
}
|
2118 |
|
2119 |
/**
|
2120 |
* Return form field HTML.
|
2121 |
*
|
2122 |
-
* @param $type
|
2123 |
-
* @param $param
|
2124 |
-
* @param $row
|
2125 |
-
* @param $html
|
2126 |
-
* @param $label
|
2127 |
-
*
|
2128 |
* @return string
|
2129 |
*/
|
2130 |
-
public function wdform_field($type, $param, $row, $html, $label = TRUE) {
|
2131 |
ob_start();
|
2132 |
$param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
|
2133 |
$param['w_size'] = (isset($param['w_size']) ? $param['w_size'] : "");
|
@@ -2150,12 +2334,12 @@ class FMViewForm_maker_fmc {
|
|
2150 |
/**
|
2151 |
* Return form field label HTML.
|
2152 |
*
|
2153 |
-
* @param $param
|
2154 |
-
* @param $form
|
2155 |
*
|
2156 |
* @return string
|
2157 |
*/
|
2158 |
-
private function field_label($param, $form) {
|
2159 |
ob_start();
|
2160 |
$label = isset($param['label']) ? $param['label'] : '';
|
2161 |
$field_id = $param['id'];
|
@@ -2175,7 +2359,7 @@ class FMViewForm_maker_fmc {
|
|
2175 |
}
|
2176 |
$label_width = (isset($param['w_field_label_size']) && $param['w_field_label_size'] != '') ? ' style="max-width: ' . $param['w_field_label_size'] . 'px;"' : '';
|
2177 |
?><div class="<?php echo implode(' ', $classes); ?>"<?php echo $label_width; ?>>
|
2178 |
-
<label<?php echo ($field_id ? ' for="' . $field_id . '"' : ''); ?> class="wdform-label"><?php echo $label; ?></label><?php
|
2179 |
if ( isset($param['w_required']) && $param['w_required'] == "yes" ) {
|
2180 |
$requiredmark = isset($form->requiredmark) ? $form->requiredmark : '';
|
2181 |
?><span class="wdform-required"><?php echo $requiredmark; ?></span><?php
|
@@ -2188,12 +2372,12 @@ class FMViewForm_maker_fmc {
|
|
2188 |
/**
|
2189 |
* Return form field section HTML.
|
2190 |
*
|
2191 |
-
* @param $html
|
2192 |
-
* @param $param
|
2193 |
*
|
2194 |
* @return string
|
2195 |
*/
|
2196 |
-
private function field_section($html, $param) {
|
2197 |
ob_start();
|
2198 |
$classes = array( 'wdform-element-section', 'wd-flex' );
|
2199 |
if ( isset($param['w_class']) ) {
|
15 |
*
|
16 |
* @param $model
|
17 |
*/
|
18 |
+
public function __construct( $model = array() ) {
|
19 |
$this->model = $model;
|
20 |
|
21 |
wp_enqueue_script('jquery');
|
33 |
/**
|
34 |
* Display.
|
35 |
*
|
36 |
+
* @param array $result
|
37 |
+
* @param array $fm_settings
|
38 |
+
* @param int $form_id
|
39 |
* @param string $formType
|
40 |
*
|
41 |
* @return string
|
42 |
*/
|
43 |
+
public function display( $result = array(), $fm_settings = array(), $form_id = 0, $formType = 'embedded' ) {
|
44 |
$current_user = wp_get_current_user();
|
45 |
if ( $current_user->ID != 0 ) {
|
46 |
$wp_username = $current_user->display_name;
|
381 |
class="wd-width-100"
|
382 |
id="wdform_' . $id1 . '_element' . $form_id . '"
|
383 |
name="wdform_' . $id1 . '_element' . $form_id . '"
|
384 |
+
value="' . htmlentities($param['w_first_val'], ENT_COMPAT) . '"
|
385 |
+
title="' . htmlentities($param['w_title'], ENT_COMPAT) . '"
|
386 |
+
placeholder="' . htmlentities($param['w_title'], ENT_COMPAT) . '"
|
387 |
' . $readonly . '
|
388 |
' . $param['attributes'] . ' />';
|
389 |
if ( isset($symbol_end[$id1]) ) {
|
440 |
class="wd-width-100"
|
441 |
id="wdform_' . $id1 . '_element' . $form_id . '"
|
442 |
name="wdform_' . $id1 . '_element' . $form_id . '"
|
443 |
+
value="' . htmlentities($param['w_first_val'], ENT_COMPAT) . '"
|
444 |
+
title="' . htmlentities($param['w_title'], ENT_COMPAT) . '"
|
445 |
' . $param['attributes'] . '>
|
446 |
</div>';
|
447 |
$rep .= '</div>';
|
570 |
$html = '<textarea class="wd-width-100"
|
571 |
id="wdform_' . $id1 . '_element' . $form_id . '"
|
572 |
name="wdform_' . $id1 . '_element' . $form_id . '"
|
573 |
+
placeholder="' . htmlentities($param['w_title'], ENT_COMPAT) . '"
|
574 |
style="height: ' . $param['w_size_h'] . 'px;"
|
575 |
' . $param['attributes'] . '>' . $textarea_value . '</textarea>';
|
576 |
|
628 |
$param['w_class'] .= ' wd-flex-row';
|
629 |
|
630 |
$html = '<div class="wd-flex wd-flex-column wd-width-20">
|
631 |
+
<input type="text" class="wd-phone-first" id="wdform_' . $id1 . '_element_first' . $form_id . '" name="wdform_' . $id1 . '_element_first' . $form_id . '" value="' . htmlentities($w_first_val[0], ENT_COMPAT) . '" title="' . htmlentities($w_title[0], ENT_COMPAT) . '" placeholder="' . htmlentities($w_title[0], ENT_COMPAT) . '" ' . $param['attributes'] . '>
|
632 |
<label for="wdform_' . $id1 . '_element_first' . $form_id . '" class="mini_label wd-flex-column">' . $w_mini_labels[0] . '</label>
|
633 |
</div>
|
634 |
<div>
|
635 |
<div class="wd-flex wd-flex-column "> - </div>
|
636 |
</div>
|
637 |
<div class="wd-flex wd-flex-column wd-width-80">
|
638 |
+
<input type="text" class="wd-flex-column wd-width-100" id="wdform_' . $id1 . '_element_last' . $form_id . '" name="wdform_' . $id1 . '_element_last' . $form_id . '" value="' . htmlentities($w_first_val[1], ENT_COMPAT) . '" title="' . htmlentities($w_title[1], ENT_COMPAT) . '" placeholder="' . htmlentities($w_title[1], ENT_COMPAT) . '" ' . $param['attributes'] . ' />
|
639 |
<label for="wdform_' . $id1 . '_element_last' . $form_id . '" class="wd-flex-column mini_label">' . $w_mini_labels[1] . '</label>
|
640 |
</div>';
|
641 |
|
679 |
class="wd-width-100"
|
680 |
id="wdform_' . $id1 . '_element' . $form_id . '"
|
681 |
name="wdform_' . $id1 . '_element' . $form_id . '"
|
682 |
+
value="' . htmlentities($param['w_first_val'], ENT_COMPAT) . '"
|
683 |
+
placeholder="" ' . htmlentities($param['attributes'], ENT_COMPAT) . ' />';
|
684 |
|
685 |
// Generate field.
|
686 |
$rep = $this->wdform_field($type, $param, $row, $html);
|
790 |
if ( $w_name_fields[0] == 'yes' ) {
|
791 |
$first_field_id = 'wdform_' . $id1 . '_element_title' . $form_id;
|
792 |
$html .= '<div class="wd-flex wd-flex-column wd-width-10">';
|
793 |
+
$html .= '<input type="text" id="wdform_' . $id1 . '_element_title' . $form_id . '" name="wdform_' . $id1 . '_element_title' . $form_id . '" value="' . htmlentities($w_first_val[2], ENT_COMPAT) . '" title="' . htmlentities($w_title[2], ENT_COMPAT) . '" placeholder="' . htmlentities($w_title[2], ENT_COMPAT) . '" />';
|
794 |
$html .= '<label class="mini_label" for="wdform_' . $id1 . '_element_title' . $form_id . '">' . $w_mini_labels[0] . '</label>';
|
795 |
$html .= '</div>';
|
796 |
$html .= '<div class="wd-flex wd-flex-column wd-name-separator"></div>';
|
797 |
}
|
798 |
$html .= '<div class="wd-flex wd-flex-column wd-width-50">';
|
799 |
+
$html .= '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_element_first' . $form_id . '" name="wdform_' . $id1 . '_element_first' . $form_id . '" value="' . htmlentities($w_first_val[0], ENT_COMPAT) . '" title="' . htmlentities($w_title[0], ENT_COMPAT) . '" placeholder="' . htmlentities($w_title[0], ENT_COMPAT) . '" ' . $param['attributes'] . ' />';
|
800 |
$html .= '<label class="mini_label" for="wdform_' . $id1 . '_element_first' . $form_id . '">' . $w_mini_labels[1] . '</label>';
|
801 |
$html .= '</div>';
|
802 |
$html .= '<div class="wd-flex wd-flex-column wd-name-separator"></div>';
|
803 |
$html .= '<div class="wd-flex wd-flex-column wd-width-50">';
|
804 |
+
$html .= '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_element_last' . $form_id . '" name="wdform_' . $id1 . '_element_last' . $form_id . '" value="' . htmlentities($w_first_val[1], ENT_COMPAT) . '" title="' . htmlentities($w_title[1], ENT_COMPAT) . '" placeholder="' . htmlentities($w_title[1], ENT_COMPAT) . '" ' . $param['attributes'] . ' />';
|
805 |
$html .= '<label class="mini_label" for="wdform_' . $id1 . '_element_last' . $form_id . '">' . $w_mini_labels[2] . '</label>';
|
806 |
$html .= '</div>';
|
807 |
|
808 |
if ( $w_name_fields[1] == 'yes' ) {
|
809 |
$html .= '<div class="wd-flex wd-flex-column wd-name-separator"></div>';
|
810 |
$html .= '<div class="wd-flex wd-flex-column wd-width-50">';
|
811 |
+
$html .= '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_element_middle' . $form_id . '" name="wdform_' . $id1 . '_element_middle' . $form_id . '" value="' . htmlentities($w_first_val[3], ENT_COMPAT) . '" title="' . htmlentities($w_title[3], ENT_COMPAT) . '" placeholder="' . htmlentities($w_title[3], ENT_COMPAT) . '" />';
|
812 |
$html .= '<label class="mini_label" for="wdform_' . $id1 . '_element_middle' . $form_id . '">' . $w_mini_labels[3] . '</label>';
|
813 |
$html .= '</div>';
|
814 |
}
|
1018 |
$message_check_email = addslashes(__('This is not a valid email address.', WDFMInstance(self::PLUGIN)->prefix));
|
1019 |
$onchange = (isset($param['w_verification']) && $param['w_verification'] == "yes") ? '; wd_check_confirmation_email(\'' . $id1 . '\', \'' . $form_id . '\', \'' . $message_confirm . '\')' : '';
|
1020 |
|
1021 |
+
$html = '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_element' . $form_id . '" name="wdform_' . $id1 . '_element' . $form_id . '" value="' . htmlentities($param['w_first_val'], ENT_COMPAT) . '" title="' . htmlentities($param['w_title'], ENT_COMPAT) . '" placeholder="' . htmlentities($param['w_title'], ENT_COMPAT) . '" ' . $param['attributes'] . ' onchange="wd_check_email(\'' . $id1 . '\', \'' . $form_id . '\', \'' . $message_check_email . '\')' . $onchange . '" />';
|
1022 |
|
1023 |
// Generate field.
|
1024 |
$rep = $this->wdform_field($type, $param, $row, $html);
|
1028 |
$param['label'] = $param['w_verification_label'];
|
1029 |
$param['id'] = 'wdform_' . $id1 . '_1_element' . $form_id;
|
1030 |
|
1031 |
+
$html = '<input type="text" class="wd-width-100" id="wdform_' . $id1 . '_1_element' . $form_id . '" name="wdform_' . $id1 . '_1_element' . $form_id . '" placeholder="' . htmlentities($param['w_verification_placeholder'], ENT_COMPAT) . '" title="' . htmlentities($param['w_verification_placeholder'], ENT_COMPAT) . '" ' . $param['attributes'] . 'onchange="wd_check_confirmation_email(\'' . $id1 . '\', \'' . $form_id . '\', \'' . $message_confirm . '\')" />';
|
1032 |
|
1033 |
// Generate field.
|
1034 |
$rep .= $this->wdform_field($type, $param, $row, $html);
|
1451 |
$rep .= '<span class="wdform_colon wd-vertical-middle"> ' . $form_currency . ' </span>';
|
1452 |
$rep .= '</div>';
|
1453 |
$rep .= '<div id="wdform_' . $id1 . '_td_name_dollars" class="wd-table-cell">';
|
1454 |
+
$rep .= '<input type="text" id="wdform_' . $id1 . '_element_dollars' . $form_id . '" name="wdform_' . $id1 . '_element_dollars' . $form_id . '" value="' . htmlentities($w_first_val[0], ENT_COMPAT) . '" title="' . $w_title[0] . '" onkeypress="return check_isnum(event)" style="width: ' . $param['w_size'] . 'px;" ' . $param['attributes'] . ' />';
|
1455 |
$rep .= '</div>';
|
1456 |
$rep .= '<div id="wdform_' . $id1 . '_td_name_divider" class="' . $hide_cents . '">';
|
1457 |
$rep .= '<span class="wdform_colon wd-vertical-middle"> . </span>';
|
1458 |
$rep .= '</div>';
|
1459 |
$rep .= '<div id="wdform_' . $id1 . '_td_name_cents" class="' . $hide_cents . '">';
|
1460 |
+
$rep .= '<input type="text" class="wd-paypal-cent" id="wdform_' . $id1 . '_element_cents' . $form_id . '" name="wdform_' . $id1 . '_element_cents' . $form_id . '" value="' . htmlentities($w_first_val[1], ENT_COMPAT) . '" title="' . $w_title[1] . '" ' . $param['attributes'] . ' />';
|
1461 |
$rep .= '</div></div>';
|
1462 |
$rep .= '<div id="wdform_' . $id1 . '_tr_price2" class="wd-table-row">';
|
1463 |
$rep .= '<div class="wd-table-cell"><label class="mini_label"></label></div>';
|
1669 |
/**
|
1670 |
* Autoload form.
|
1671 |
*
|
1672 |
+
* @param array $params
|
1673 |
* @return string
|
1674 |
*/
|
1675 |
+
public function autoload_form( $params = array() ) {
|
1676 |
+
$id = $params['id'];
|
1677 |
+
$type = $params['type'];
|
1678 |
+
$form = $params['form'];
|
1679 |
+
$display_on_this = $params['display_on_this'];
|
1680 |
+
$show_for_admin = $params['show_for_admin'];
|
1681 |
+
$form_result = $params['form_result'];
|
1682 |
+
$fm_settings = $params['fm_settings'];
|
1683 |
+
$error = $params['error'];
|
1684 |
+
$message = $params['message'];
|
1685 |
+
$onload_js = '';
|
1686 |
$fm_form = '';
|
1687 |
switch ($type) {
|
1688 |
case 'topbar': {
|
1721 |
}
|
1722 |
|
1723 |
$fm_form .= '<div id="fm-topbar' . $id . '" class="fm-topbar" style="position: ' . $fixed_relative . '; ' . $top_bottom . ': 0px; visibility:hidden;">';
|
1724 |
+
$fm_form .= $this->display($form_result, $fm_settings, $id, $type);
|
1725 |
$fm_form .= '<div id="fm-action-buttons' . $id . '" class="fm-action-buttons">';
|
1726 |
if ($closing) {
|
1727 |
$fm_form .= '<span id="closing-form' . $id . '" class="closing-form dashicons dashicons-no" onclick="fm_hide_form(' . $id . ', ' . $hide_duration . ', function(){
|
1747 |
$left_right_class = $form->scrollbox_position ? 'float-right' : 'float-left';
|
1748 |
if ($display_on_this && $hide_mobile) {
|
1749 |
WDW_FM_Library(self::PLUGIN)->start_session();
|
1750 |
+
if ( isset($_SESSION['fm_hide_form_after_submit' . $id]) && $_SESSION['fm_hide_form_after_submit' . $id] == 1 ) {
|
1751 |
+
if ( $error == 'success' ) {
|
1752 |
+
if ( $message ) {
|
1753 |
$onload_js .= '
|
1754 |
jQuery("#fm-form' . $id . ', #fm-pages' . $id . '").addClass("fm-hide");
|
|
|
1755 |
jQuery("#fm-scrollbox' . $id . '").removeClass("fm-animated fadeOutDown").addClass("fm-animated fadeInUp");
|
1756 |
jQuery("#fm-scrollbox' . $id . '").css("visibility", "");
|
1757 |
jQuery("#minimize-form' . $id . '").css("visibility", "hidden");
|
1758 |
';
|
1759 |
}
|
1760 |
+
$onload_js .= 'fm_hide_form(' . $id . ', ' . $hide_duration . ');';
|
|
|
|
|
1761 |
}
|
1762 |
}
|
1763 |
else {
|
1764 |
+
if ( isset($_SESSION['error_occurred' . $id]) && $_SESSION['error_occurred' . $id] == 1 ) {
|
1765 |
$_SESSION['error_occurred' . $id] = 0;
|
1766 |
+
if ( $message ) {
|
1767 |
$onload_js .= '
|
1768 |
jQuery("#fm-scrollbox' . $id . '").removeClass("fm-animated fadeOutDown").addClass("fm-animated fadeInUp");
|
1769 |
jQuery("#fm-scrollbox' . $id . '").removeClass("fm-animated fadeOutDown").addClass("fm-animated fadeInUp");
|
1773 |
}
|
1774 |
else {
|
1775 |
$onload_js .= '
|
1776 |
+
if (' . $hide_duration . ' == 0) {
|
1777 |
localStorage.removeItem("hide-"+' . $id . ');
|
1778 |
}
|
1779 |
var hide_scrollbox = localStorage.getItem("hide-"+' . $id . ');';
|
1801 |
|
1802 |
$fm_form .= '<div id="fm-scrollbox' . $id . '" class="fm-scrollbox ' . $hide_mobile_class . '" style="' . $left_right . ': 0px; visibility:hidden;">';
|
1803 |
$fm_form .= '<div class="fm-scrollbox-form ' . $left_right_class . '">';
|
1804 |
+
$fm_form .= $this->display($form_result, $fm_settings, $id, $type);
|
1805 |
$fm_form .= '<div id="fm-action-buttons' . $id . '" class="fm-action-buttons">';
|
1806 |
if ($minimize) {
|
1807 |
$fm_form .= '<span id="minimize-form' . $id . '" class="minimize-form dashicons dashicons-minus" onclick="minimize_form(' . $id . ')"></span>';
|
1890 |
<div class="fm-popover-container" id="fm-popover-container' . $id . '">
|
1891 |
<div class="fm-popover-inner-background" id="fm-popover-inner-background' . $id . '"></div>
|
1892 |
<div class="fm-popover-content">';
|
1893 |
+
$fm_form .= $this->display($form_result, $fm_settings, $id, $type);
|
1894 |
+
$fm_form .= '<div id="fm-action-buttons' . $id . '" class="fm-action-buttons">';
|
1895 |
$fm_form .= '<span id="closing-form' . $id . '" class="closing-form dashicons dashicons-no" onclick="fm_hide_form(' . $id . ', ' . $frequency . ', function(){
|
1896 |
jQuery(\'#fm-popover-background' . $id . '\').css(\'display\', \'none\');
|
1897 |
jQuery(\'#fm-popover' . $id . '\').css(\'display\', \'none\');
|
1909 |
$onload_js = 'jQuery(document).ready(function () {' . $onload_js . '})';
|
1910 |
}
|
1911 |
if ( function_exists('wp_add_inline_script') ) { // Since Wordpress 4.5.0
|
1912 |
+
wp_add_inline_script( WDFMInstance(self::PLUGIN)->handle_prefix . '-script-' . $id, $onload_js);
|
1913 |
}
|
1914 |
else {
|
1915 |
echo '<script>' . $onload_js . '</script>';
|
1919 |
}
|
1920 |
|
1921 |
/**
|
1922 |
+
* Type file upload.
|
1923 |
+
*
|
1924 |
+
* @param array $params
|
1925 |
+
* @param array $row
|
1926 |
+
* @param int $id1
|
1927 |
+
* @param int $form_id
|
1928 |
+
* @param array $param
|
1929 |
+
* @return string
|
1930 |
*/
|
1931 |
+
private function type_file_upload( $params = array(), $row = array(), $id1 = 0, $form_id = 0, $param = array() ) {
|
1932 |
return '';
|
1933 |
}
|
1934 |
|
1935 |
/**
|
1936 |
+
* Type paypal price new.
|
1937 |
+
*
|
1938 |
+
* @param array $params
|
1939 |
+
* @param array $row
|
1940 |
+
* @param int $id1
|
1941 |
+
* @param int $form_id
|
1942 |
+
* @param array $param
|
1943 |
+
* @param string $form_currency
|
1944 |
+
* @param string $symbol_begin
|
1945 |
+
* @param string $symbol_end
|
1946 |
+
* @return string
|
1947 |
*/
|
1948 |
+
private function type_paypal_price_new( $params = array(), $row = array(), $id1 = 0, $form_id = 0, $param = array(), $form_currency = '', $symbol_begin = '', $symbol_end = '' ) {
|
1949 |
return '';
|
1950 |
}
|
1951 |
|
1952 |
/**
|
1953 |
+
* Type paypal select.
|
1954 |
+
*
|
1955 |
+
* @param array $params
|
1956 |
+
* @param array $row
|
1957 |
+
* @param int $id1
|
1958 |
+
* @param int $form_id
|
1959 |
+
* @param array $param
|
1960 |
+
* @return string
|
1961 |
*/
|
1962 |
+
private function type_paypal_select( $params = array(), $row = array(), $id1 = 0, $form_id = 0, $param = array() ) {
|
1963 |
return '';
|
1964 |
}
|
1965 |
|
1966 |
/**
|
1967 |
+
* Type paypal radio.
|
1968 |
+
*
|
1969 |
+
* @param array $params
|
1970 |
+
* @param array $row
|
1971 |
+
* @param int $id1
|
1972 |
+
* @param int $form_id
|
1973 |
+
* @param array $param
|
1974 |
+
* @return string
|
1975 |
*/
|
1976 |
+
private function type_paypal_radio( $params = array(), $row = array(), $id1 = 0, $form_id = 0, $param = array() ) {
|
1977 |
return '';
|
1978 |
}
|
1979 |
|
1980 |
/**
|
1981 |
+
* Type paypal checkbox.
|
1982 |
+
*
|
1983 |
+
* @param array $params
|
1984 |
+
* @param array $row
|
1985 |
+
* @param int $id1
|
1986 |
+
* @param int $form_id
|
1987 |
+
* @param array $param
|
1988 |
+
* @return string
|
1989 |
*/
|
1990 |
+
private function type_paypal_checkbox( $params = array(), $row = array(), $id1 = 0, $form_id = 0, $param = array() ) {
|
1991 |
return '';
|
1992 |
}
|
1993 |
|
1994 |
/**
|
1995 |
+
* Type paypal shipping.
|
1996 |
+
*
|
1997 |
+
* @param array $params
|
1998 |
+
* @param array $row
|
1999 |
+
* @param int $id1
|
2000 |
+
* @param int $form_id
|
2001 |
+
* @param array $param
|
2002 |
+
* @return string
|
2003 |
*/
|
2004 |
+
private function type_paypal_shipping( $params = array(), $row = array(), $id1 = 0, $form_id = 0, $param = array() ) {
|
2005 |
return '';
|
2006 |
}
|
2007 |
|
2008 |
/**
|
2009 |
+
* Type paypal total.
|
2010 |
+
*
|
2011 |
+
* @param array $params
|
2012 |
+
* @param array $row
|
2013 |
+
* @param int $id1
|
2014 |
+
* @param int $form_id
|
2015 |
+
* @param array $param
|
2016 |
+
* @return string
|
2017 |
*/
|
2018 |
+
private function type_paypal_total( $params = array(), $row = array(), $id1 = 0, $form_id = 0, $param = array() ) {
|
2019 |
return '';
|
2020 |
}
|
2021 |
|
2022 |
/**
|
2023 |
+
* Type map.
|
2024 |
+
*
|
2025 |
+
* @param array $params
|
2026 |
+
* @param int $id1
|
2027 |
+
* @param array $row
|
2028 |
+
* @param array $param
|
2029 |
+
* @return string
|
2030 |
*/
|
2031 |
+
private function type_map( $params = array(), $id1 = 0, $row = array(), $param = array() ) {
|
2032 |
wp_enqueue_script('google-maps');
|
2033 |
wp_enqueue_script(WDFMInstance(self::PLUGIN)->handle_prefix . '-gmap_form');
|
2034 |
|
2077 |
}
|
2078 |
|
2079 |
/**
|
2080 |
+
* Type checkbox.
|
2081 |
+
*
|
2082 |
+
* @param array $params
|
2083 |
+
* @param array $row
|
2084 |
+
* @param int $form_id
|
2085 |
+
* @param int $id1
|
2086 |
+
* @param string $type
|
2087 |
+
* @param array $param
|
2088 |
+
* @return string
|
2089 |
*/
|
2090 |
+
private function type_checkbox( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
|
2091 |
return '';
|
2092 |
}
|
2093 |
|
2094 |
/**
|
2095 |
+
* Type radio.
|
2096 |
+
*
|
2097 |
+
* @param array $params
|
2098 |
+
* @param array $row
|
2099 |
+
* @param int $form_id
|
2100 |
+
* @param int $id1
|
2101 |
+
* @param string $type
|
2102 |
+
* @param array $param
|
2103 |
+
* @return string
|
2104 |
*/
|
2105 |
+
private function type_radio( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
|
2106 |
return '';
|
2107 |
}
|
2108 |
|
2109 |
/**
|
2110 |
+
* Type own select.
|
2111 |
+
*
|
2112 |
+
* @param array $params
|
2113 |
+
* @param array $row
|
2114 |
+
* @param int $form_id
|
2115 |
+
* @param int $id1
|
2116 |
+
* @param string $type
|
2117 |
+
* @param array $param
|
2118 |
+
* @return string
|
2119 |
*/
|
2120 |
+
private function type_own_select( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
|
2121 |
return '';
|
2122 |
}
|
2123 |
|
2124 |
/**
|
2125 |
+
* Type date new.
|
2126 |
+
*
|
2127 |
+
* @param array $params
|
2128 |
+
* @param array $row
|
2129 |
+
* @param int $form_id
|
2130 |
+
* @param int $id1
|
2131 |
+
* @param string $type
|
2132 |
+
* @param array $param
|
2133 |
+
* @return string
|
2134 |
*/
|
2135 |
+
private function type_date_new( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
|
2136 |
return '';
|
2137 |
}
|
2138 |
|
2139 |
/**
|
2140 |
+
* Type date fields.
|
2141 |
+
*
|
2142 |
+
* @param array $params
|
2143 |
+
* @param array $row
|
2144 |
+
* @param int $form_id
|
2145 |
+
* @param int $id1
|
2146 |
+
* @param string $type
|
2147 |
+
* @param array $param
|
2148 |
+
* @return string
|
2149 |
*/
|
2150 |
+
private function type_date_fields( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
|
2151 |
return '';
|
2152 |
}
|
2153 |
|
2154 |
/**
|
2155 |
+
* Type date range
|
2156 |
+
*
|
2157 |
+
* @param array $params
|
2158 |
+
* @param array $row
|
2159 |
+
* @param int $form_id
|
2160 |
+
* @param int $id1
|
2161 |
+
* @param string $type
|
2162 |
+
* @param array $param
|
2163 |
+
* @return string
|
2164 |
*/
|
2165 |
+
private function type_date_range( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
|
2166 |
return '';
|
2167 |
}
|
2168 |
|
2169 |
/**
|
2170 |
+
* Type spinner
|
2171 |
+
*
|
2172 |
+
* @param array $params
|
2173 |
+
* @param array $row
|
2174 |
+
* @param int $form_id
|
2175 |
+
* @param int $id1
|
2176 |
+
* @param string $type
|
2177 |
+
* @param array $param
|
2178 |
+
* @return string
|
2179 |
*/
|
2180 |
+
private function type_spinner( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
|
2181 |
return '';
|
2182 |
}
|
2183 |
|
2184 |
/**
|
2185 |
+
* Type star rating
|
2186 |
+
*
|
2187 |
+
* @param array $params
|
2188 |
+
* @param array $row
|
2189 |
+
* @param int $form_id
|
2190 |
+
* @param int $id1
|
2191 |
+
* @param string $type
|
2192 |
+
* @param array $param
|
2193 |
+
* @return string
|
2194 |
*/
|
2195 |
+
private function type_star_rating( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
|
2196 |
return '';
|
2197 |
}
|
2198 |
|
2199 |
/**
|
2200 |
+
* Type scale rating
|
2201 |
+
*
|
2202 |
+
* @param array $params
|
2203 |
+
* @param array $row
|
2204 |
+
* @param int $form_id
|
2205 |
+
* @param int $id1
|
2206 |
+
* @param string $type
|
2207 |
+
* @param array $param
|
2208 |
+
* @return string
|
2209 |
*/
|
2210 |
+
private function type_scale_rating( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
|
2211 |
return '';
|
2212 |
}
|
2213 |
|
2214 |
/**
|
2215 |
+
* Type slider
|
2216 |
+
*
|
2217 |
+
* @param array $params
|
2218 |
+
* @param array $row
|
2219 |
+
* @param int $form_id
|
2220 |
+
* @param int $id1
|
2221 |
+
* @param string $type
|
2222 |
+
* @param array $param
|
2223 |
+
* @return string
|
2224 |
*/
|
2225 |
+
private function type_slider( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
|
2226 |
return '';
|
2227 |
}
|
2228 |
|
2229 |
/**
|
2230 |
+
* Type range
|
2231 |
+
*
|
2232 |
+
* @param array $params
|
2233 |
+
* @param array $row
|
2234 |
+
* @param int $form_id
|
2235 |
+
* @param int $id1
|
2236 |
+
* @param string $type
|
2237 |
+
* @param array $param
|
2238 |
+
* @return string
|
2239 |
*/
|
2240 |
+
private function type_range( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
|
2241 |
return '';
|
2242 |
}
|
2243 |
|
2244 |
/**
|
2245 |
+
* Type grading
|
2246 |
+
*
|
2247 |
+
* @param array $params
|
2248 |
+
* @param array $row
|
2249 |
+
* @param int $form_id
|
2250 |
+
* @param int $id1
|
2251 |
+
* @param string $type
|
2252 |
+
* @param array $param
|
2253 |
+
* @return string
|
2254 |
*/
|
2255 |
+
private function type_grading( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
|
2256 |
return '';
|
2257 |
}
|
2258 |
|
2259 |
/**
|
2260 |
+
* Type matrix
|
2261 |
+
*
|
2262 |
+
* @param array $params
|
2263 |
+
* @param array $row
|
2264 |
+
* @param int $form_id
|
2265 |
+
* @param int $id1
|
2266 |
+
* @param string $type
|
2267 |
+
* @param array $param
|
2268 |
+
* @return string
|
2269 |
*/
|
2270 |
+
private function type_matrix( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
|
2271 |
return '';
|
2272 |
}
|
2273 |
|
2274 |
/**
|
2275 |
+
* Type time
|
2276 |
+
*
|
2277 |
+
* @param array $params
|
2278 |
+
* @param array $row
|
2279 |
+
* @param int $form_id
|
2280 |
+
* @param int $id1
|
2281 |
+
* @param string $type
|
2282 |
+
* @param array $param
|
2283 |
+
* @return string
|
2284 |
*/
|
2285 |
+
private function type_time( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
|
2286 |
return '';
|
2287 |
}
|
2288 |
|
2289 |
/**
|
2290 |
+
* Type country
|
2291 |
+
*
|
2292 |
+
* @param array $params
|
2293 |
+
* @param array $row
|
2294 |
+
* @param int $form_id
|
2295 |
+
* @param int $id1
|
2296 |
+
* @param string $type
|
2297 |
+
* @param array $param
|
2298 |
+
* @return string
|
2299 |
*/
|
2300 |
+
private function type_country( $params = array(), $row = array(), $form_id = 0, $id1 = 0, $type = '', $param = array() ) {
|
2301 |
return '';
|
2302 |
}
|
2303 |
|
2304 |
/**
|
2305 |
* Return form field HTML.
|
2306 |
*
|
2307 |
+
* @param string $type
|
2308 |
+
* @param array $param
|
2309 |
+
* @param array $row
|
2310 |
+
* @param string $html
|
2311 |
+
* @param bool $label
|
|
|
2312 |
* @return string
|
2313 |
*/
|
2314 |
+
public function wdform_field( $type = '', $param = array(), $row = array(), $html = '', $label = TRUE) {
|
2315 |
ob_start();
|
2316 |
$param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
|
2317 |
$param['w_size'] = (isset($param['w_size']) ? $param['w_size'] : "");
|
2334 |
/**
|
2335 |
* Return form field label HTML.
|
2336 |
*
|
2337 |
+
* @param array $param
|
2338 |
+
* @param array $form
|
2339 |
*
|
2340 |
* @return string
|
2341 |
*/
|
2342 |
+
private function field_label( $param = array(), $form = array() ) {
|
2343 |
ob_start();
|
2344 |
$label = isset($param['label']) ? $param['label'] : '';
|
2345 |
$field_id = $param['id'];
|
2359 |
}
|
2360 |
$label_width = (isset($param['w_field_label_size']) && $param['w_field_label_size'] != '') ? ' style="max-width: ' . $param['w_field_label_size'] . 'px;"' : '';
|
2361 |
?><div class="<?php echo implode(' ', $classes); ?>"<?php echo $label_width; ?>>
|
2362 |
+
<label <?php echo ($field_id ? ' for="' . $field_id . '"' : ''); ?> class="wdform-label"><?php echo $label; ?></label><?php
|
2363 |
if ( isset($param['w_required']) && $param['w_required'] == "yes" ) {
|
2364 |
$requiredmark = isset($form->requiredmark) ? $form->requiredmark : '';
|
2365 |
?><span class="wdform-required"><?php echo $requiredmark; ?></span><?php
|
2372 |
/**
|
2373 |
* Return form field section HTML.
|
2374 |
*
|
2375 |
+
* @param string $html
|
2376 |
+
* @param array $param
|
2377 |
*
|
2378 |
* @return string
|
2379 |
*/
|
2380 |
+
private function field_section( $html = '', $param = array() ) {
|
2381 |
ob_start();
|
2382 |
$classes = array( 'wdform-element-section', 'wd-flex' );
|
2383 |
if ( isset($param['w_class']) ) {
|
frontend/views/verify_email.php
CHANGED
@@ -12,9 +12,9 @@ class FMViewVerify_email_fmc {
|
|
12 |
/**
|
13 |
* Display message.
|
14 |
*
|
15 |
-
* @param $message
|
16 |
*/
|
17 |
-
public function display($message) {
|
18 |
echo WDW_FM_Library(self::PLUGIN)->message($message, 'fm-notice-success');
|
19 |
}
|
20 |
}
|
12 |
/**
|
13 |
* Display message.
|
14 |
*
|
15 |
+
* @param string $message
|
16 |
*/
|
17 |
+
public function display( $message = '' ) {
|
18 |
echo WDW_FM_Library(self::PLUGIN)->message($message, 'fm-notice-success');
|
19 |
}
|
20 |
}
|
js/add_field.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
var nextID; // next field id
|
2 |
|
3 |
-
jQuery(window).load
|
4 |
if (!storageAvailable("localStorage")
|
5 |
|| !localStorage.getItem("wd-form-first-time-use")) {
|
6 |
jQuery(".first-time-use").show();
|
@@ -2401,13 +2401,13 @@ function create_label(i, w_field_label) {
|
|
2401 |
}
|
2402 |
|
2403 |
function change_label(id, label, type) {
|
|
|
|
|
2404 |
if (!type) {
|
2405 |
-
label = label.replace(/(<([^>]+)>)/ig, "");
|
2406 |
document.getElementById(id).innerHTML = label;
|
2407 |
document.getElementById(id).value = label;
|
2408 |
}
|
2409 |
else {
|
2410 |
-
label = label.replace(/(<([^>]+)>)/ig, "");
|
2411 |
document.getElementById(type).innerHTML = label;
|
2412 |
}
|
2413 |
}
|
@@ -2510,7 +2510,7 @@ function hide_label(id) {
|
|
2510 |
if (document.getElementById(id + "_hide_labelform_id_temp").value == "no") {
|
2511 |
document.getElementById(id + "_hide_labelform_id_temp").value = "yes";
|
2512 |
document.getElementById(id + "_label_sectionform_id_temp").style.display = "none";
|
2513 |
-
if (document.getElementById(id + "
|
2514 |
document.getElementById(id + "_1_label_sectionform_id_temp").style.display = "none";
|
2515 |
}
|
2516 |
}
|
@@ -2518,7 +2518,7 @@ function hide_label(id) {
|
|
2518 |
if (document.getElementById("edit_for_label_position_left").checked) {
|
2519 |
document.getElementById(id + "_label_sectionform_id_temp").style.display = "table-cell";
|
2520 |
document.getElementById(id + "_element_sectionform_id_temp").style.display = "table-cell";
|
2521 |
-
if (document.getElementById(id + "
|
2522 |
document.getElementById(id + "_1_label_sectionform_id_temp").style.display = "table-cell";
|
2523 |
document.getElementById(id + "_1_element_sectionform_id_temp").style.display = "table-cell";
|
2524 |
}
|
@@ -2526,7 +2526,7 @@ function hide_label(id) {
|
|
2526 |
else {
|
2527 |
document.getElementById(id + "_label_sectionform_id_temp").style.display = "block";
|
2528 |
document.getElementById(id + "_element_sectionform_id_temp").style.display = "block";
|
2529 |
-
if (document.getElementById(id + "
|
2530 |
document.getElementById(id + "_1_label_sectionform_id_temp").style.display = "block";
|
2531 |
document.getElementById(id + "_1_element_sectionform_id_temp").style.display = "block";
|
2532 |
}
|
@@ -2537,7 +2537,7 @@ function hide_label(id) {
|
|
2537 |
|
2538 |
function create_placeholder(i, w_title) {
|
2539 |
var label = jQuery('<label class="fm-field-label" for="el_first_value_input">Placeholder</label>');
|
2540 |
-
var input = jQuery('<input type="text" class="fm-width-100" id="el_first_value_input" onKeyUp="change_input_value(this.value,\'' + i + '_elementform_id_temp\')" value="' + w_title + '" />');
|
2541 |
return create_option_container(label, input);
|
2542 |
}
|
2543 |
|
@@ -3555,7 +3555,7 @@ function type_textarea(i, w_field_label, w_field_label_size, w_field_label_pos,
|
|
3555 |
|
3556 |
function create_spinner_width(i, w_field_width) {
|
3557 |
var label = jQuery('<label class="fm-field-label" for="edit_for_spinner_width">Width(px)</label>');
|
3558 |
-
var input = jQuery('<input class="fm-width-100" type="text" id="edit_for_spinner_width" onKeyPress="return check_isnum(event)" onKeyUp="change_spinner_width(this.value,' + i + ',\'form_id_temp\')" value="' + w_field_width + '"
|
3559 |
return create_option_container(label, input);
|
3560 |
}
|
3561 |
|
@@ -4463,10 +4463,10 @@ function create_select_options(i, w_value_disabled, w_choices, w_choices_params,
|
|
4463 |
for (j = 0; j < n; j++) {
|
4464 |
var attr = jQuery('<div id="' + j + '" class="change_pos fm-width-100">' +
|
4465 |
'<div class="fm-table-col fm-width-30">' +
|
4466 |
-
'<input type="text" class="fm-field-choice" id="el_option' + j + '" value="' + w_choices[j] + '" onKeyUp="change_label_name(' + j + ', \'' + i + '_option' + j + '\', this.value, \'select\')" onpaste="elem=this; change_label_name_on_paste(' + j + ', \'' + i + '_option' + j + '\', \'select\')"' + (w_choices_params[j] ? ' disabled="disabled"' : '') + ' />' +
|
4467 |
'</div>' +
|
4468 |
'<div class="fm-table-col fm-width-30">' +
|
4469 |
-
'<input type="text" class="fm-field-choice' + (!w_choices_params[j] ? ' el_option_value' : '') + '" id="el_option_value' + j + '" value="' + w_choices_value[j] + '" onKeyUp="change_label_value(\'' + i + '_option' + j + '\', this.value)" onpaste="change_label_value_on_paste(\'' + i + '_option' + j + '\', this)"' + (w_value_disabled == 'no' || w_choices_params[j] ? ' disabled="disabled"' : '') + ' />' +
|
4470 |
'</div>' +
|
4471 |
'<div class="fm-table-col fm-width-20">' +
|
4472 |
'<input type="checkbox" title="Empty value" class="el_option_dis" id="el_option' + j + '_dis" onClick="dis_option(\'' + i + '_option' + j + '\', this.checked, ' + j + ')"' + (w_value_disabled == 'yes' ? ' disabled="disabled"' : '') + (w_choices_disabled[j] ? ' checked="checked"' : '') + ' />' +
|
@@ -4733,12 +4733,12 @@ function type_own_select(i, w_field_label, w_field_label_size, w_field_label_pos
|
|
4733 |
var option = document.createElement('option');
|
4734 |
option.setAttribute("id", i + "_option" + j);
|
4735 |
if (w_value_disabled == 'yes')
|
4736 |
-
option.setAttribute("value", w_choices_value[j]);
|
4737 |
else {
|
4738 |
if (w_choices_disabled[j])
|
4739 |
option.value = "";
|
4740 |
else
|
4741 |
-
option.setAttribute("value", w_choices[j]);
|
4742 |
}
|
4743 |
|
4744 |
if (w_choices_params[j]) {
|
@@ -4749,7 +4749,7 @@ function type_own_select(i, w_field_label, w_field_label_size, w_field_label_pos
|
|
4749 |
option.setAttribute("db_info", w_params[1]);
|
4750 |
}
|
4751 |
option.setAttribute("onselect", "set_select('" + i + "_option" + j + "')");
|
4752 |
-
option.innerHTML = w_choices[j];
|
4753 |
if (w_choices_checked[j] == 1)
|
4754 |
option.setAttribute("selected", "selected");
|
4755 |
select_.appendChild(option);
|
@@ -5119,10 +5119,10 @@ function create_radio_options(i, w_value_disabled, w_choices, w_choices_params,
|
|
5119 |
for (j = 0; j < n; j++) {
|
5120 |
var attr = jQuery('<div id="' + j + '" class="change_pos fm-width-100">' +
|
5121 |
'<div class="fm-table-col fm-width-40">' +
|
5122 |
-
'<input type="text" class="fm-field-choice" id="el_choices' + j + '"' + (w_allow_other == "yes" && j == w_allow_other_num ? ' other="1"' : '') + ' value="' + w_choices[j] + '" onKeyUp="change_label(\'' + i + '_label_element' + j + '\', this.value)" onpaste="elem=this; change_label_name_on_paste(' + j + ', \'' + i + '_label_element' + j + '\', \'' + type + '\'); change_label_value_on_paste(\'' + i + '_elementform_id_temp' + j + '\', this)"' + (w_choices_params[j] ? ' disabled="disabled"' : '') + ' />' +
|
5123 |
'</div>' +
|
5124 |
'<div class="fm-table-col fm-width-40">' +
|
5125 |
-
'<input type="text" class="fm-field-choice' + (!w_choices_params[j] && (w_allow_other != "yes" || j != w_allow_other_num) ? ' el_option_value' : '') + '" id="el_option_value' + j + '" value="' + w_choices_value[j] + '" onKeyUp="change_label_value(\'' + i + '_elementform_id_temp' + j + '\', this.value)" onpaste="change_label_value_on_paste(\'' + i + '_elementform_id_temp' + j + '\', this)"' + (w_value_disabled == 'no' || w_choices_params[j] || (w_allow_other == "yes" && j == w_allow_other_num) ? ' disabled="disabled"' : '') + ' />' +
|
5126 |
'<input type="hidden" id="el_option_params' + j + '" class="el_option_params" value="' + w_choices_params[j] + '" />' +
|
5127 |
'</div>' +
|
5128 |
'<div class="fm-table-col fm-width-10">' +
|
@@ -5509,7 +5509,7 @@ function type_checkbox(i, w_field_label, w_field_label_size, w_field_label_pos,
|
|
5509 |
|
5510 |
function create_keys(i, message) {
|
5511 |
var label = jQuery('<label class="fm-field-label">Keys</label>');
|
5512 |
-
var input = jQuery('<a href="' + admin_url + '?page=
|
5513 |
return create_option_container(null, input);
|
5514 |
}
|
5515 |
|
@@ -6182,7 +6182,7 @@ function make_pagebreak_button(next_or_previous, title, type, class_, id) {
|
|
6182 |
|
6183 |
function create_placeholder_name(i, w_title) {
|
6184 |
var label = jQuery('<label class="fm-field-label" for="el_first_value_input">Placeholder</label>');
|
6185 |
-
var input = jQuery('<input type="text" class="fm-width-40" id="el_first_value_first" onKeyUp="change_input_value(this.value,\'' + i + '_element_firstform_id_temp\')" value="' + w_title[0] + '" />-<input type="text" class="fm-width-40" id="el_first_value_last" onKeyUp="change_input_value(this.value,\'' + i + '_element_lastform_id_temp\')" value="' + w_title[1] + '" />');
|
6186 |
return create_option_container(label, input);
|
6187 |
}
|
6188 |
|
@@ -6633,7 +6633,7 @@ function create_confirmation_email_label(i, w_verification, w_verification_label
|
|
6633 |
|
6634 |
function create_confirmation_email_placeholder(i, w_verification, w_verification_placeholder) {
|
6635 |
var label = jQuery('<label class="fm-field-label" for="el_first_value_verification_input">Confirmation placeholder</label>');
|
6636 |
-
var input = jQuery('<input type="text" class="fm-width-100" id="el_first_value_verification_input" onKeyUp="change_input_value(this.value,\'' + i + '_1_elementform_id_temp\')" value="' + w_verification_placeholder + '" />');
|
6637 |
return create_option_container(label, input, 'confirm_validation_empty', w_verification == 'yes');
|
6638 |
}
|
6639 |
|
@@ -8680,7 +8680,7 @@ function create_paypal_select_options(i, w_choices, w_choices_params, w_choices_
|
|
8680 |
for (j = 0; j < n; j++) {
|
8681 |
var attr = jQuery('<div id="' + j + '" class="change_pos fm-width-100">' +
|
8682 |
'<div class="fm-table-col fm-width-40">' +
|
8683 |
-
'<input type="text" class="fm-field-choice" id="el_option' + j + '" value="' + w_choices[j] + '" onKeyUp="change_label_price(\'' + i + '_option' + j + '\', this.value)"' + (w_choices_params[j] ? ' disabled="disabled"' : '') + ' />' +
|
8684 |
'</div>' +
|
8685 |
'<div class="fm-table-col fm-width-20">' +
|
8686 |
'<input type="text" class="fm-field-choice" id="el_option_price' + j + '" value="' + w_choices_price[j] + '" onKeyPress="return check_isnum_point(event)" onKeyUp="change_value_price(\'' + i + '_option' + j + '\', this.value)"' + (w_choices_params[j] ? ' disabled="disabled"' : '') + ' />' +
|
@@ -9139,7 +9139,7 @@ function type_paypal_select(i, w_field_label, w_field_label_size, w_field_label_
|
|
9139 |
}
|
9140 |
|
9141 |
option.setAttribute("onselect", "set_select('" + i + "_option" + j + "')");
|
9142 |
-
option.innerHTML = w_choices[j];
|
9143 |
if (w_choices_checked[j] == 1)
|
9144 |
option.setAttribute("selected", "selected");
|
9145 |
select_.appendChild(option);
|
@@ -9305,7 +9305,7 @@ function create_paypal_radio_options(i, w_choices, w_choices_params, w_choices_p
|
|
9305 |
for (j = 0; j < n; j++) {
|
9306 |
var attr = jQuery('<div id="' + j + '" class="change_pos fm-width-100">' +
|
9307 |
'<div class="fm-table-col fm-width-60">' +
|
9308 |
-
'<input type="text" class="fm-field-choice" id="el_choices' + j + '" value="' + w_choices[j] + '" onKeyUp="change_label(\'' + i + '_label_element' + j + '\', this.value); change_label_1(\'' + i + '_elementlabel_form_id_temp' + j + '\', this.value);"' + (w_choices_params[j] ? ' disabled="disabled"' : '') + ' />' +
|
9309 |
'</div>' +
|
9310 |
'<div class="fm-table-col fm-width-20">' +
|
9311 |
'<input type="text" class="fm-field-choice" id="el_option_price' + j + '" value="' + w_choices_price[j] + '" onKeyPress="return check_isnum_point(event)" onKeyUp="change_value_price(\'' + i + '_elementform_id_temp' + j + '\', this.value)"' + (w_choices_params[j] ? ' disabled="disabled"' : '') + ' />' +
|
@@ -9510,7 +9510,7 @@ function type_paypal_radio(i, w_field_label, w_field_label_size, w_field_label_p
|
|
9510 |
label_adding.setAttribute("id", i + "_label_element" + j);
|
9511 |
label_adding.setAttribute("class", "ch-rad-label");
|
9512 |
label_adding.setAttribute("for", i + "_elementform_id_temp" + j);
|
9513 |
-
label_adding.innerHTML = w_choices[j];
|
9514 |
if (w_field_option_pos == "right")
|
9515 |
label_adding.style.cssText = "float: none !important";
|
9516 |
if (w_choices_params[j]) {
|
@@ -9525,7 +9525,7 @@ function type_paypal_radio(i, w_field_label, w_field_label_size, w_field_label_p
|
|
9525 |
adding_ch_label.setAttribute("type", "hidden");
|
9526 |
adding_ch_label.setAttribute("id", i + "_elementlabel_form_id_temp" + j);
|
9527 |
adding_ch_label.setAttribute("name", i + "_elementform_id_temp" + j + "_label");
|
9528 |
-
adding_ch_label.setAttribute("value", w_choices[j]);
|
9529 |
|
9530 |
td_little.appendChild(adding);
|
9531 |
td_little.appendChild(label_adding);
|
@@ -9736,7 +9736,7 @@ function type_paypal_checkbox(i, w_field_label, w_field_label_size, w_field_labe
|
|
9736 |
label_adding.setAttribute("id", i + "_label_element" + j);
|
9737 |
label_adding.setAttribute("class", "ch-rad-label");
|
9738 |
label_adding.setAttribute("for", i + "_elementform_id_temp" + j);
|
9739 |
-
label_adding.innerHTML = w_choices[j];
|
9740 |
if (w_field_option_pos == "right")
|
9741 |
label_adding.style.cssText = "float: none !important";
|
9742 |
if (w_choices_params[j]) {
|
@@ -9751,7 +9751,7 @@ function type_paypal_checkbox(i, w_field_label, w_field_label_size, w_field_labe
|
|
9751 |
adding_ch_label.setAttribute("type", "hidden");
|
9752 |
adding_ch_label.setAttribute("id", i + "_elementlabel_form_id_temp" + j);
|
9753 |
adding_ch_label.setAttribute("name", i + "_elementform_id_temp" + j + "_label");
|
9754 |
-
adding_ch_label.setAttribute("value", w_choices[j]);
|
9755 |
|
9756 |
td_little.appendChild(adding);
|
9757 |
td_little.appendChild(label_adding);
|
@@ -9973,7 +9973,7 @@ function type_paypal_shipping(i, w_field_label, w_field_label_size, w_field_labe
|
|
9973 |
label_adding.setAttribute("id", i + "_label_element" + j);
|
9974 |
label_adding.setAttribute("class", "ch-rad-label");
|
9975 |
label_adding.setAttribute("for", i + "_elementform_id_temp" + j);
|
9976 |
-
label_adding.innerHTML = w_choices[j];
|
9977 |
if (w_field_option_pos == "right")
|
9978 |
label_adding.style.cssText = "float: none !important";
|
9979 |
if (w_choices_params[j]) {
|
@@ -9987,7 +9987,7 @@ function type_paypal_shipping(i, w_field_label, w_field_label_size, w_field_labe
|
|
9987 |
adding_ch_label.setAttribute("type", "hidden");
|
9988 |
adding_ch_label.setAttribute("id", i + "_elementlabel_form_id_temp" + j);
|
9989 |
adding_ch_label.setAttribute("name", i + "_elementform_id_temp" + j + "_label");
|
9990 |
-
adding_ch_label.setAttribute("value", w_choices[j]);
|
9991 |
|
9992 |
td_little.appendChild(adding);
|
9993 |
td_little.appendChild(label_adding);
|
@@ -13068,7 +13068,7 @@ function create_field_size_phone(i, w_size, fields_count) {
|
|
13068 |
|
13069 |
function create_placeholder_phone(i, w_title) {
|
13070 |
var label = jQuery('<label class="fm-field-label" for="el_first_value_area">Placeholder</label>');
|
13071 |
-
var input = jQuery('<input type="text" class="fm-width-20" id="el_first_value_area" onKeyUp="change_input_value(this.value,\'' + i + '_element_firstform_id_temp\')" value="' + w_title[0] + '" />-<input type="text" class="fm-width-60" id="el_first_value_phone" onKeyUp="change_input_value(this.value,\'' + i + '_element_lastform_id_temp\')" value="' + w_title[1] + '" />');
|
13072 |
return create_option_container(label, input);
|
13073 |
}
|
13074 |
|
1 |
var nextID; // next field id
|
2 |
|
3 |
+
jQuery(window).on('load', function () {
|
4 |
if (!storageAvailable("localStorage")
|
5 |
|| !localStorage.getItem("wd-form-first-time-use")) {
|
6 |
jQuery(".first-time-use").show();
|
2401 |
}
|
2402 |
|
2403 |
function change_label(id, label, type) {
|
2404 |
+
label = label.replace(/(<([^>]+)>)/ig, "");
|
2405 |
+
label = label.replace(/"/g, """);
|
2406 |
if (!type) {
|
|
|
2407 |
document.getElementById(id).innerHTML = label;
|
2408 |
document.getElementById(id).value = label;
|
2409 |
}
|
2410 |
else {
|
|
|
2411 |
document.getElementById(type).innerHTML = label;
|
2412 |
}
|
2413 |
}
|
2510 |
if (document.getElementById(id + "_hide_labelform_id_temp").value == "no") {
|
2511 |
document.getElementById(id + "_hide_labelform_id_temp").value = "yes";
|
2512 |
document.getElementById(id + "_label_sectionform_id_temp").style.display = "none";
|
2513 |
+
if (document.getElementById(id + "_1_elementform_id_temp") && document.getElementById(id + "_1_elementform_id_temp").offsetParent) {
|
2514 |
document.getElementById(id + "_1_label_sectionform_id_temp").style.display = "none";
|
2515 |
}
|
2516 |
}
|
2518 |
if (document.getElementById("edit_for_label_position_left").checked) {
|
2519 |
document.getElementById(id + "_label_sectionform_id_temp").style.display = "table-cell";
|
2520 |
document.getElementById(id + "_element_sectionform_id_temp").style.display = "table-cell";
|
2521 |
+
if (document.getElementById(id + "_1_elementform_id_temp") && document.getElementById(id + "_1_elementform_id_temp").offsetParent) {
|
2522 |
document.getElementById(id + "_1_label_sectionform_id_temp").style.display = "table-cell";
|
2523 |
document.getElementById(id + "_1_element_sectionform_id_temp").style.display = "table-cell";
|
2524 |
}
|
2526 |
else {
|
2527 |
document.getElementById(id + "_label_sectionform_id_temp").style.display = "block";
|
2528 |
document.getElementById(id + "_element_sectionform_id_temp").style.display = "block";
|
2529 |
+
if (document.getElementById(id + "_1_elementform_id_temp") && document.getElementById(id + "_1_elementform_id_temp").offsetParent) {
|
2530 |
document.getElementById(id + "_1_label_sectionform_id_temp").style.display = "block";
|
2531 |
document.getElementById(id + "_1_element_sectionform_id_temp").style.display = "block";
|
2532 |
}
|
2537 |
|
2538 |
function create_placeholder(i, w_title) {
|
2539 |
var label = jQuery('<label class="fm-field-label" for="el_first_value_input">Placeholder</label>');
|
2540 |
+
var input = jQuery('<input type="text" class="fm-width-100" id="el_first_value_input" onKeyUp="change_input_value(this.value,\'' + i + '_elementform_id_temp\')" value="' + w_title.replace(/"/g, """) + '" />');
|
2541 |
return create_option_container(label, input);
|
2542 |
}
|
2543 |
|
3555 |
|
3556 |
function create_spinner_width(i, w_field_width) {
|
3557 |
var label = jQuery('<label class="fm-field-label" for="edit_for_spinner_width">Width(px)</label>');
|
3558 |
+
var input = jQuery('<input class="fm-width-100" type="text" id="edit_for_spinner_width" onKeyPress="return check_isnum(event)" onKeyUp="change_spinner_width(this.value,' + i + ',\'form_id_temp\')" value="' + w_field_width + '" /><p class="description">' + form_maker.leave_empty + '</p>');
|
3559 |
return create_option_container(label, input);
|
3560 |
}
|
3561 |
|
4463 |
for (j = 0; j < n; j++) {
|
4464 |
var attr = jQuery('<div id="' + j + '" class="change_pos fm-width-100">' +
|
4465 |
'<div class="fm-table-col fm-width-30">' +
|
4466 |
+
'<input type="text" class="fm-field-choice" id="el_option' + j + '" value="' + w_choices[j].replace(/"/g, """) + '" onKeyUp="change_label_name(' + j + ', \'' + i + '_option' + j + '\', this.value, \'select\')" onpaste="elem=this; change_label_name_on_paste(' + j + ', \'' + i + '_option' + j + '\', \'select\')"' + (w_choices_params[j] ? ' disabled="disabled"' : '') + ' />' +
|
4467 |
'</div>' +
|
4468 |
'<div class="fm-table-col fm-width-30">' +
|
4469 |
+
'<input type="text" class="fm-field-choice' + (!w_choices_params[j] ? ' el_option_value' : '') + '" id="el_option_value' + j + '" value="' + w_choices_value[j].replace(/"/g, """) + '" onKeyUp="change_label_value(\'' + i + '_option' + j + '\', this.value)" onpaste="change_label_value_on_paste(\'' + i + '_option' + j + '\', this)"' + (w_value_disabled == 'no' || w_choices_params[j] ? ' disabled="disabled"' : '') + ' />' +
|
4470 |
'</div>' +
|
4471 |
'<div class="fm-table-col fm-width-20">' +
|
4472 |
'<input type="checkbox" title="Empty value" class="el_option_dis" id="el_option' + j + '_dis" onClick="dis_option(\'' + i + '_option' + j + '\', this.checked, ' + j + ')"' + (w_value_disabled == 'yes' ? ' disabled="disabled"' : '') + (w_choices_disabled[j] ? ' checked="checked"' : '') + ' />' +
|
4733 |
var option = document.createElement('option');
|
4734 |
option.setAttribute("id", i + "_option" + j);
|
4735 |
if (w_value_disabled == 'yes')
|
4736 |
+
option.setAttribute("value", w_choices_value[j].replace(/"/g, """));
|
4737 |
else {
|
4738 |
if (w_choices_disabled[j])
|
4739 |
option.value = "";
|
4740 |
else
|
4741 |
+
option.setAttribute("value", w_choices[j].replace(/"/g, """));
|
4742 |
}
|
4743 |
|
4744 |
if (w_choices_params[j]) {
|
4749 |
option.setAttribute("db_info", w_params[1]);
|
4750 |
}
|
4751 |
option.setAttribute("onselect", "set_select('" + i + "_option" + j + "')");
|
4752 |
+
option.innerHTML = w_choices[j].replace(/"/g, """);
|
4753 |
if (w_choices_checked[j] == 1)
|
4754 |
option.setAttribute("selected", "selected");
|
4755 |
select_.appendChild(option);
|
5119 |
for (j = 0; j < n; j++) {
|
5120 |
var attr = jQuery('<div id="' + j + '" class="change_pos fm-width-100">' +
|
5121 |
'<div class="fm-table-col fm-width-40">' +
|
5122 |
+
'<input type="text" class="fm-field-choice" id="el_choices' + j + '"' + (w_allow_other == "yes" && j == w_allow_other_num ? ' other="1"' : '') + ' value="' + w_choices[j].replace(/"/g, """) + '" onKeyUp="change_label(\'' + i + '_label_element' + j + '\', this.value)" onpaste="elem=this; change_label_name_on_paste(' + j + ', \'' + i + '_label_element' + j + '\', \'' + type + '\'); change_label_value_on_paste(\'' + i + '_elementform_id_temp' + j + '\', this)"' + (w_choices_params[j] ? ' disabled="disabled"' : '') + ' />' +
|
5123 |
'</div>' +
|
5124 |
'<div class="fm-table-col fm-width-40">' +
|
5125 |
+
'<input type="text" class="fm-field-choice' + (!w_choices_params[j] && (w_allow_other != "yes" || j != w_allow_other_num) ? ' el_option_value' : '') + '" id="el_option_value' + j + '" value="' + w_choices_value[j].replace(/"/g, """) + '" onKeyUp="change_label_value(\'' + i + '_elementform_id_temp' + j + '\', this.value)" onpaste="change_label_value_on_paste(\'' + i + '_elementform_id_temp' + j + '\', this)"' + (w_value_disabled == 'no' || w_choices_params[j] || (w_allow_other == "yes" && j == w_allow_other_num) ? ' disabled="disabled"' : '') + ' />' +
|
5126 |
'<input type="hidden" id="el_option_params' + j + '" class="el_option_params" value="' + w_choices_params[j] + '" />' +
|
5127 |
'</div>' +
|
5128 |
'<div class="fm-table-col fm-width-10">' +
|
5509 |
|
5510 |
function create_keys(i, message) {
|
5511 |
var label = jQuery('<label class="fm-field-label">Keys</label>');
|
5512 |
+
var input = jQuery('<a href="' + admin_url + '?page=options_fm" target="_blank" class="fm-field-recaptcha-label">' + message + '</a>');
|
5513 |
return create_option_container(null, input);
|
5514 |
}
|
5515 |
|
6182 |
|
6183 |
function create_placeholder_name(i, w_title) {
|
6184 |
var label = jQuery('<label class="fm-field-label" for="el_first_value_input">Placeholder</label>');
|
6185 |
+
var input = jQuery('<input type="text" class="fm-width-40" id="el_first_value_first" onKeyUp="change_input_value(this.value,\'' + i + '_element_firstform_id_temp\')" value="' + w_title[0].replace(/"/g, """) + '" />-<input type="text" class="fm-width-40" id="el_first_value_last" onKeyUp="change_input_value(this.value,\'' + i + '_element_lastform_id_temp\')" value="' + w_title[1].replace(/"/g, """) + '" />');
|
6186 |
return create_option_container(label, input);
|
6187 |
}
|
6188 |
|
6633 |
|
6634 |
function create_confirmation_email_placeholder(i, w_verification, w_verification_placeholder) {
|
6635 |
var label = jQuery('<label class="fm-field-label" for="el_first_value_verification_input">Confirmation placeholder</label>');
|
6636 |
+
var input = jQuery('<input type="text" class="fm-width-100" id="el_first_value_verification_input" onKeyUp="change_input_value(this.value,\'' + i + '_1_elementform_id_temp\')" value="' + w_verification_placeholder.replace(/"/g, """) + '" />');
|
6637 |
return create_option_container(label, input, 'confirm_validation_empty', w_verification == 'yes');
|
6638 |
}
|
6639 |
|
8680 |
for (j = 0; j < n; j++) {
|
8681 |
var attr = jQuery('<div id="' + j + '" class="change_pos fm-width-100">' +
|
8682 |
'<div class="fm-table-col fm-width-40">' +
|
8683 |
+
'<input type="text" class="fm-field-choice" id="el_option' + j + '" value="' + w_choices[j].replace(/"/g, """) + '" onKeyUp="change_label_price(\'' + i + '_option' + j + '\', this.value)"' + (w_choices_params[j] ? ' disabled="disabled"' : '') + ' />' +
|
8684 |
'</div>' +
|
8685 |
'<div class="fm-table-col fm-width-20">' +
|
8686 |
'<input type="text" class="fm-field-choice" id="el_option_price' + j + '" value="' + w_choices_price[j] + '" onKeyPress="return check_isnum_point(event)" onKeyUp="change_value_price(\'' + i + '_option' + j + '\', this.value)"' + (w_choices_params[j] ? ' disabled="disabled"' : '') + ' />' +
|
9139 |
}
|
9140 |
|
9141 |
option.setAttribute("onselect", "set_select('" + i + "_option" + j + "')");
|
9142 |
+
option.innerHTML = w_choices[j].replace(/"/g, """);
|
9143 |
if (w_choices_checked[j] == 1)
|
9144 |
option.setAttribute("selected", "selected");
|
9145 |
select_.appendChild(option);
|
9305 |
for (j = 0; j < n; j++) {
|
9306 |
var attr = jQuery('<div id="' + j + '" class="change_pos fm-width-100">' +
|
9307 |
'<div class="fm-table-col fm-width-60">' +
|
9308 |
+
'<input type="text" class="fm-field-choice" id="el_choices' + j + '" value="' + w_choices[j].replace(/"/g, """) + '" onKeyUp="change_label(\'' + i + '_label_element' + j + '\', this.value); change_label_1(\'' + i + '_elementlabel_form_id_temp' + j + '\', this.value);"' + (w_choices_params[j] ? ' disabled="disabled"' : '') + ' />' +
|
9309 |
'</div>' +
|
9310 |
'<div class="fm-table-col fm-width-20">' +
|
9311 |
'<input type="text" class="fm-field-choice" id="el_option_price' + j + '" value="' + w_choices_price[j] + '" onKeyPress="return check_isnum_point(event)" onKeyUp="change_value_price(\'' + i + '_elementform_id_temp' + j + '\', this.value)"' + (w_choices_params[j] ? ' disabled="disabled"' : '') + ' />' +
|
9510 |
label_adding.setAttribute("id", i + "_label_element" + j);
|
9511 |
label_adding.setAttribute("class", "ch-rad-label");
|
9512 |
label_adding.setAttribute("for", i + "_elementform_id_temp" + j);
|
9513 |
+
label_adding.innerHTML = w_choices[j].replace(/"/g, """);
|
9514 |
if (w_field_option_pos == "right")
|
9515 |
label_adding.style.cssText = "float: none !important";
|
9516 |
if (w_choices_params[j]) {
|
9525 |
adding_ch_label.setAttribute("type", "hidden");
|
9526 |
adding_ch_label.setAttribute("id", i + "_elementlabel_form_id_temp" + j);
|
9527 |
adding_ch_label.setAttribute("name", i + "_elementform_id_temp" + j + "_label");
|
9528 |
+
adding_ch_label.setAttribute("value", w_choices[j].replace(/"/g, """));
|
9529 |
|
9530 |
td_little.appendChild(adding);
|
9531 |
td_little.appendChild(label_adding);
|
9736 |
label_adding.setAttribute("id", i + "_label_element" + j);
|
9737 |
label_adding.setAttribute("class", "ch-rad-label");
|
9738 |
label_adding.setAttribute("for", i + "_elementform_id_temp" + j);
|
9739 |
+
label_adding.innerHTML = w_choices[j].replace(/"/g, """);
|
9740 |
if (w_field_option_pos == "right")
|
9741 |
label_adding.style.cssText = "float: none !important";
|
9742 |
if (w_choices_params[j]) {
|
9751 |
adding_ch_label.setAttribute("type", "hidden");
|
9752 |
adding_ch_label.setAttribute("id", i + "_elementlabel_form_id_temp" + j);
|
9753 |
adding_ch_label.setAttribute("name", i + "_elementform_id_temp" + j + "_label");
|
9754 |
+
adding_ch_label.setAttribute("value", w_choices[j].replace(/"/g, """));
|
9755 |
|
9756 |
td_little.appendChild(adding);
|
9757 |
td_little.appendChild(label_adding);
|
9973 |
label_adding.setAttribute("id", i + "_label_element" + j);
|
9974 |
label_adding.setAttribute("class", "ch-rad-label");
|
9975 |
label_adding.setAttribute("for", i + "_elementform_id_temp" + j);
|
9976 |
+
label_adding.innerHTML = w_choices[j].replace(/"/g, """);
|
9977 |
if (w_field_option_pos == "right")
|
9978 |
label_adding.style.cssText = "float: none !important";
|
9979 |
if (w_choices_params[j]) {
|
9987 |
adding_ch_label.setAttribute("type", "hidden");
|
9988 |
adding_ch_label.setAttribute("id", i + "_elementlabel_form_id_temp" + j);
|
9989 |
adding_ch_label.setAttribute("name", i + "_elementform_id_temp" + j + "_label");
|
9990 |
+
adding_ch_label.setAttribute("value", w_choices[j].replace(/"/g, """));
|
9991 |
|
9992 |
td_little.appendChild(adding);
|
9993 |
td_little.appendChild(label_adding);
|
13068 |
|
13069 |
function create_placeholder_phone(i, w_title) {
|
13070 |
var label = jQuery('<label class="fm-field-label" for="el_first_value_area">Placeholder</label>');
|
13071 |
+
var input = jQuery('<input type="text" class="fm-width-20" id="el_first_value_area" onKeyUp="change_input_value(this.value,\'' + i + '_element_firstform_id_temp\')" value="' + w_title[0].replace(/"/g, """) + '" />-<input type="text" class="fm-width-60" id="el_first_value_phone" onKeyUp="change_input_value(this.value,\'' + i + '_element_lastform_id_temp\')" value="' + w_title[1].replace(/"/g, """) + '" />');
|
13072 |
return create_option_container(label, input);
|
13073 |
}
|
13074 |
|
js/form_maker_admin.js
CHANGED
@@ -61,7 +61,7 @@ function fm_toggle_postbox(that) {
|
|
61 |
}
|
62 |
|
63 |
function fm_option_tabs_mail_validation() {
|
64 |
-
if (fm_check_email('email') || fm_check_email('fm_email_to') || fm_check_email('mail_bcc_user') || fm_check_email('mail_cc_user') || fm_check_email('reply_to_other') || fm_check_email('mail_cc') || fm_check_email('mail_bcc') || fm_check_email('
|
65 |
return false;
|
66 |
}
|
67 |
return true;
|
@@ -734,7 +734,7 @@ function fm_delete_ip( id ) {
|
|
734 |
if(!isNaN(paged)) {
|
735 |
url = url.replace(/(paged=)[^\&]+/, '$1' + paged);
|
736 |
}
|
737 |
-
jQuery('.wrap').load(url + ' #blocked_ips',function(){
|
738 |
window.history.pushState(null, null, url);
|
739 |
if (jQuery(".updated").length != 0) {
|
740 |
jQuery(" .updated p strong").html("Items Successfully Deleted");
|
@@ -785,7 +785,7 @@ function fm_insert_blocked_ip() {
|
|
785 |
"last_id" : 1
|
786 |
},
|
787 |
success: function (response) {
|
788 |
-
jQuery('#
|
789 |
window.history.pushState(null, null, url);
|
790 |
if (jQuery(".updated").length != 0) {
|
791 |
jQuery(".updated p strong").html("Items Successfully Saved");
|
@@ -946,4 +946,78 @@ function fm_loading_show() {
|
|
946 |
}
|
947 |
function fm_loading_hide() {
|
948 |
jQuery('#fm_loading').hide();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
949 |
}
|
61 |
}
|
62 |
|
63 |
function fm_option_tabs_mail_validation() {
|
64 |
+
if (fm_check_email('email') || fm_check_email('fm_email_to') || fm_check_email('mail_bcc_user') || fm_check_email('mail_cc_user') || fm_check_email('reply_to_other') || fm_check_email('mail_cc') || fm_check_email('mail_bcc') || fm_check_email('mail') || fm_check_email('from_mail') || fm_check_email('reply_to') || fm_check_email('mail_from_user') || fm_check_email('reply_to_user') || fm_check_email('mail_from_other') || fm_check_email('reply_to_other') || fm_check_email('paypal_email')) {
|
65 |
return false;
|
66 |
}
|
67 |
return true;
|
734 |
if(!isNaN(paged)) {
|
735 |
url = url.replace(/(paged=)[^\&]+/, '$1' + paged);
|
736 |
}
|
737 |
+
jQuery('#blocked_ips').parent('.wrap').load(url + ' #blocked_ips',function(){
|
738 |
window.history.pushState(null, null, url);
|
739 |
if (jQuery(".updated").length != 0) {
|
740 |
jQuery(" .updated p strong").html("Items Successfully Deleted");
|
785 |
"last_id" : 1
|
786 |
},
|
787 |
success: function (response) {
|
788 |
+
jQuery('#blocked_ips').parent('.wrap').load(url + ' #blocked_ips',function() {
|
789 |
window.history.pushState(null, null, url);
|
790 |
if (jQuery(".updated").length != 0) {
|
791 |
jQuery(".updated p strong").html("Items Successfully Saved");
|
946 |
}
|
947 |
function fm_loading_hide() {
|
948 |
jQuery('#fm_loading').hide();
|
949 |
+
}
|
950 |
+
|
951 |
+
/**
|
952 |
+
* Get form local storage.
|
953 |
+
*
|
954 |
+
* @returns object
|
955 |
+
*/
|
956 |
+
function getFormLocalStorage(){
|
957 |
+
var formStoragObj = {};
|
958 |
+
formId = getAllUrlParams().current_id;
|
959 |
+
var formStorag = localStorage.getItem('fm_form' + formId);
|
960 |
+
if ( formStorag != null ) {
|
961 |
+
formStoragObj = jQuery.parseJSON(formStorag);
|
962 |
+
}
|
963 |
+
return formStoragObj;
|
964 |
+
}
|
965 |
+
|
966 |
+
/**
|
967 |
+
* Get all Url params.
|
968 |
+
*
|
969 |
+
* @param url
|
970 |
+
* @returns object
|
971 |
+
*/
|
972 |
+
function getAllUrlParams(url) {
|
973 |
+
// get query string from url (optional) or window
|
974 |
+
var queryString = url ? url.split('?')[1] : window.location.search.slice(1);
|
975 |
+
// we'll store the parameters here
|
976 |
+
var obj = {};
|
977 |
+
// if query string exists
|
978 |
+
if (queryString) {
|
979 |
+
// stuff after # is not part of query string, so get rid of it
|
980 |
+
queryString = queryString.split('#')[0];
|
981 |
+
// split our query string into its component parts
|
982 |
+
var arr = queryString.split('&');
|
983 |
+
for (var i=0; i<arr.length; i++) {
|
984 |
+
// separate the keys and the values
|
985 |
+
var a = arr[i].split('=');
|
986 |
+
// in case params look like: list[]=thing1&list[]=thing2
|
987 |
+
var paramNum = undefined;
|
988 |
+
var paramName = a[0].replace(/\[\d*\]/, function(v) {
|
989 |
+
paramNum = v.slice(1,-1);
|
990 |
+
return '';
|
991 |
+
});
|
992 |
+
|
993 |
+
// set parameter value (use 'true' if empty)
|
994 |
+
var paramValue = typeof(a[1]) === 'undefined' ? true : a[1];
|
995 |
+
// (optional) keep case consistent
|
996 |
+
paramName = paramName.toLowerCase();
|
997 |
+
paramValue = paramValue.toLowerCase();
|
998 |
+
|
999 |
+
// if parameter name already exists
|
1000 |
+
if (obj[paramName]) {
|
1001 |
+
// convert value to array (if still string)
|
1002 |
+
if (typeof obj[paramName] === 'string') {
|
1003 |
+
obj[paramName] = [obj[paramName]];
|
1004 |
+
}
|
1005 |
+
// if no array index number specified...
|
1006 |
+
if (typeof paramNum === 'undefined') {
|
1007 |
+
// put the value on the end of the array
|
1008 |
+
obj[paramName].push(paramValue);
|
1009 |
+
}
|
1010 |
+
// if array index number specified...
|
1011 |
+
else {
|
1012 |
+
// put the value at that index number
|
1013 |
+
obj[paramName][paramNum] = paramValue;
|
1014 |
+
}
|
1015 |
+
}
|
1016 |
+
// if param name doesn't exist yet, set it
|
1017 |
+
else {
|
1018 |
+
obj[paramName] = paramValue;
|
1019 |
+
}
|
1020 |
+
}
|
1021 |
+
}
|
1022 |
+
return obj;
|
1023 |
}
|
js/form_maker_form_options.js
CHANGED
@@ -37,11 +37,11 @@ jQuery(document).ready(function () {
|
|
37 |
}
|
38 |
});
|
39 |
});
|
40 |
-
|
41 |
-
jQuery(window).load
|
42 |
var fieldset_id = jQuery("#fieldset_id").val();
|
43 |
form_maker_options_tabs(fieldset_id);
|
44 |
-
|
45 |
if ( fieldset_id == 'javascript' ) {
|
46 |
codemirror_for_javascript();
|
47 |
}
|
@@ -116,7 +116,7 @@ function filter_placeholders(that) {
|
|
116 |
}
|
117 |
|
118 |
function wd_fm_apply_options(task) {
|
119 |
-
var submit = fm_option_tabs_mail_validation();
|
120 |
if(submit === true){
|
121 |
set_condition();
|
122 |
fm_set_input_value('task', task);
|
37 |
}
|
38 |
});
|
39 |
});
|
40 |
+
|
41 |
+
jQuery(window).on('load', function () {
|
42 |
var fieldset_id = jQuery("#fieldset_id").val();
|
43 |
form_maker_options_tabs(fieldset_id);
|
44 |
+
|
45 |
if ( fieldset_id == 'javascript' ) {
|
46 |
codemirror_for_javascript();
|
47 |
}
|
116 |
}
|
117 |
|
118 |
function wd_fm_apply_options(task) {
|
119 |
+
var submit = fm_option_tabs_mail_validation();
|
120 |
if(submit === true){
|
121 |
set_condition();
|
122 |
fm_set_input_value('task', task);
|
js/form_maker_manage.js
CHANGED
@@ -159,14 +159,15 @@ function fm_delete_mail(img, value) {
|
|
159 |
}
|
160 |
|
161 |
function form_maker_options_tabs(id) {
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
|
|
170 |
return false;
|
171 |
}
|
172 |
|
@@ -224,8 +225,40 @@ function fm_check_email(id) {
|
|
224 |
var re = /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,61}$/;
|
225 |
for (var email_id = 0; email_id < email_array.length; email_id++) {
|
226 |
var email = email_array[email_id].replace(/^\s+|\s+$/g, '');
|
227 |
-
if ( ! re.test( email ) &&
|
228 |
alert('This is not a valid email address.');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
jQuery('#' + id).css('border', '1px solid #FF0000');
|
230 |
jQuery('#' + id).focus();
|
231 |
jQuery('html, body').animate({
|
159 |
}
|
160 |
|
161 |
function form_maker_options_tabs(id) {
|
162 |
+
var tab = fm_option_tabs_mail_validation();
|
163 |
+
if ( tab === true ) {
|
164 |
+
jQuery("#fieldset_id").val(id);
|
165 |
+
jQuery(".fm_fieldset_active").removeClass("fm_fieldset_active").addClass("fm_fieldset_deactive");
|
166 |
+
jQuery("#" + id + "_fieldset").removeClass("fm_fieldset_deactive").addClass("fm_fieldset_active");
|
167 |
+
jQuery(".fm_fieldset_tab").removeClass("active");
|
168 |
+
jQuery("#" + id).addClass("active");
|
169 |
+
}
|
170 |
+
|
171 |
return false;
|
172 |
}
|
173 |
|
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 ( email && ! re.test( email ) && email.indexOf('{') === -1 ) {
|
229 |
alert('This is not a valid email address.');
|
230 |
+
|
231 |
+
/* Do only if there is active class */
|
232 |
+
if( jQuery('#submenu li a').hasClass('active') ) {
|
233 |
+
var activeTabId = jQuery("#submenu .active").attr("id");
|
234 |
+
var error_cont_id = jQuery('#' + id).closest(".fm_fieldset_deactive").attr("id");
|
235 |
+
|
236 |
+
if(typeof error_cont_id != 'undefined') {
|
237 |
+
var error_tab_id = error_cont_id.split("_fieldset");
|
238 |
+
tab_id = error_tab_id[0];
|
239 |
+
|
240 |
+
/* If current active and error active tabs are the same */
|
241 |
+
if ( activeTabId != tab_id ) {
|
242 |
+
var activeContentId = activeTabId +"_fieldset";
|
243 |
+
jQuery("#"+activeContentId).removeClass("fm_fieldset_active");
|
244 |
+
jQuery("#"+activeContentId).removeClass("fm_fieldset_deactive");
|
245 |
+
jQuery("#" + error_cont_id).addClass("fm_fieldset_active");
|
246 |
+
jQuery("#submenu .active").removeClass('active');
|
247 |
+
jQuery("#" + tab_id).addClass("active");
|
248 |
+
}
|
249 |
+
}
|
250 |
+
} else {
|
251 |
+
var error_cont_id = jQuery('#' + id).closest(".fm_fieldset_deactive").attr("id");
|
252 |
+
if(typeof error_cont_id != 'undefined') {
|
253 |
+
var tab_id = error_cont_id.split("_fieldset");
|
254 |
+
tab_id = tab_id[0];
|
255 |
+
|
256 |
+
jQuery("#" + error_cont_id).removeClass("fm_fieldset_deactive");
|
257 |
+
jQuery("#" + error_cont_id).addClass("fm_fieldset_active");
|
258 |
+
jQuery("#" + tab_id).addClass("active");
|
259 |
+
}
|
260 |
+
}
|
261 |
+
|
262 |
jQuery('#' + id).css('border', '1px solid #FF0000');
|
263 |
jQuery('#' + id).focus();
|
264 |
jQuery('html, body').animate({
|
js/form_maker_submissions.js
CHANGED
@@ -1,11 +1,80 @@
|
|
1 |
-
jQuery(
|
2 |
-
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
});
|
6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
function add_scroll_width() {
|
8 |
-
var wrapFullWidth = jQuery('.
|
9 |
var scrollWidth = 0;
|
10 |
jQuery.each(jQuery("#fm-scroll table tr.fm_table_head td:visible, #fm-scroll table tr.fm_table_head th:visible"), function( index, value ) {
|
11 |
scrollWidth += jQuery(this).width();
|
@@ -75,17 +144,18 @@ function renderColumns() {
|
|
75 |
|
76 |
function clickLabChB(label, ChB) {
|
77 |
document.forms.admin_form.hide_label_list.value = document.forms.admin_form.hide_label_list.value.replace('@' + label + '@', '');
|
78 |
-
if (document.forms.admin_form.hide_label_list.value == '') {
|
79 |
document.getElementById('ChBAll').checked = true;
|
80 |
}
|
81 |
-
if (!(ChB.checked)) {
|
82 |
document.forms.admin_form.hide_label_list.value += '@' + label + '@';
|
83 |
document.getElementById('ChBAll').checked = false;
|
84 |
}
|
85 |
renderColumns();
|
|
|
86 |
}
|
87 |
|
88 |
-
function toggleChBDiv(flag) {
|
89 |
if (flag) {
|
90 |
/* sizes = window.getSize().size;*/
|
91 |
var width = jQuery(window).width();
|
@@ -96,15 +166,71 @@ function toggleChBDiv(flag) {
|
|
96 |
|
97 |
document.getElementById("ChBDiv").style.display = "block";
|
98 |
document.getElementById("sbox-overlay").style.display = "block";
|
99 |
-
|
|
|
100 |
else {
|
101 |
document.getElementById("ChBDiv").style.display = "none";
|
102 |
document.getElementById("sbox-overlay").style.display = "none";
|
|
|
|
|
103 |
}
|
104 |
add_scroll_width();
|
105 |
add_scroll_left();
|
106 |
}
|
107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
function submit_del(href_in) {
|
109 |
document.getElementById('admin_form').action = href_in;
|
110 |
document.getElementById('admin_form').submit();
|
1 |
+
jQuery(document).ready(function() {
|
2 |
+
jQuery('.theme-detail').click(function () {
|
3 |
+
jQuery(this).siblings('.themedetaildiv').toggle();
|
4 |
+
return false;
|
5 |
+
});
|
6 |
+
jQuery("#startdate, #startstats, #enddate, #endstats").datepicker({
|
7 |
+
dateFormat: "yy-mm-dd",
|
8 |
+
changeMonth: true,
|
9 |
+
changeYear: true
|
10 |
+
});
|
11 |
+
|
12 |
+
show_hide_columns_history();
|
13 |
+
add_scroll_width();
|
14 |
+
add_scroll_left();
|
15 |
+
fm_Tooltip();
|
16 |
+
filter_fields_submit();
|
17 |
});
|
18 |
|
19 |
+
jQuery(window).scroll(function () {
|
20 |
+
var scrollTop = jQuery(this).scrollTop();
|
21 |
+
var wrapperTop = jQuery('.tablenav').offset().top;
|
22 |
+
if ( scrollTop > wrapperTop ) {
|
23 |
+
jQuery('.table-wrapper-1').addClass('fixed').css({'width': jQuery('#admin_form').width() + 'px' });
|
24 |
+
} else {
|
25 |
+
jQuery('.table-wrapper-1').removeClass('fixed')
|
26 |
+
}
|
27 |
+
});
|
28 |
+
|
29 |
+
jQuery(window).on('load', function (e) {
|
30 |
+
fm_popup();
|
31 |
+
if (typeof jQuery().fancybox !== 'undefined' && jQuery.isFunction(jQuery().fancybox)) {
|
32 |
+
jQuery(".fm_fancybox").fancybox({
|
33 |
+
'maxWidth ': 600,
|
34 |
+
'maxHeight': 500
|
35 |
+
});
|
36 |
+
}
|
37 |
+
});
|
38 |
+
|
39 |
+
jQuery(window).on("resize", function () {
|
40 |
+
var width = jQuery(window).width();
|
41 |
+
if ( width <= 765 ) {
|
42 |
+
document.getElementById('fm-fields-filter').style.display = 'none';
|
43 |
+
remove_scroll_width();
|
44 |
+
}
|
45 |
+
else {
|
46 |
+
if ( jQuery('.hide-filter.hide').is(":visible") ) {
|
47 |
+
document.getElementById('fm-fields-filter').style.display = '';
|
48 |
+
}
|
49 |
+
add_scroll_width();
|
50 |
+
}
|
51 |
+
});
|
52 |
+
|
53 |
+
function filter_fields_submit() {
|
54 |
+
jQuery('#fm-fields-filter').find('input').keypress( function(e) {
|
55 |
+
if ( e.which == 13 ) {
|
56 |
+
fm_form_submit(false, 'admin_form');
|
57 |
+
}
|
58 |
+
});
|
59 |
+
}
|
60 |
+
|
61 |
+
function show_hide_filter() {
|
62 |
+
jQuery(".show-filter").toggle();
|
63 |
+
jQuery(".hide-filter").toggle();
|
64 |
+
if (document.getElementById('fm-fields-filter').style.display == "none") {
|
65 |
+
document.getElementById('fm-fields-filter').style.display = '';
|
66 |
+
jQuery('.fm-bulk-actions .search_reset_button').show();
|
67 |
+
}
|
68 |
+
else {
|
69 |
+
document.getElementById('fm-fields-filter').style.display = "none";
|
70 |
+
jQuery('.fm-bulk-actions .search_reset_button').hide();
|
71 |
+
}
|
72 |
+
add_scroll_width();
|
73 |
+
return false;
|
74 |
+
}
|
75 |
+
|
76 |
function add_scroll_width() {
|
77 |
+
var wrapFullWidth = jQuery('.fm-table-submissions').width();
|
78 |
var scrollWidth = 0;
|
79 |
jQuery.each(jQuery("#fm-scroll table tr.fm_table_head td:visible, #fm-scroll table tr.fm_table_head th:visible"), function( index, value ) {
|
80 |
scrollWidth += jQuery(this).width();
|
144 |
|
145 |
function clickLabChB(label, ChB) {
|
146 |
document.forms.admin_form.hide_label_list.value = document.forms.admin_form.hide_label_list.value.replace('@' + label + '@', '');
|
147 |
+
if ( document.forms.admin_form.hide_label_list.value == '' ) {
|
148 |
document.getElementById('ChBAll').checked = true;
|
149 |
}
|
150 |
+
if ( ! (ChB.checked) ) {
|
151 |
document.forms.admin_form.hide_label_list.value += '@' + label + '@';
|
152 |
document.getElementById('ChBAll').checked = false;
|
153 |
}
|
154 |
renderColumns();
|
155 |
+
set_all_column_checkbox_checked();
|
156 |
}
|
157 |
|
158 |
+
function toggleChBDiv(flag) {
|
159 |
if (flag) {
|
160 |
/* sizes = window.getSize().size;*/
|
161 |
var width = jQuery(window).width();
|
166 |
|
167 |
document.getElementById("ChBDiv").style.display = "block";
|
168 |
document.getElementById("sbox-overlay").style.display = "block";
|
169 |
+
set_columns_history_checked();
|
170 |
+
}
|
171 |
else {
|
172 |
document.getElementById("ChBDiv").style.display = "none";
|
173 |
document.getElementById("sbox-overlay").style.display = "none";
|
174 |
+
set_show_hide_column_ids();
|
175 |
+
show_hide_columns_history();
|
176 |
}
|
177 |
add_scroll_width();
|
178 |
add_scroll_left();
|
179 |
}
|
180 |
|
181 |
+
function set_columns_history_checked() {
|
182 |
+
if ( getFormLocalStorage().show_hide_column_ids ) {
|
183 |
+
var show_hide_column_ids = getFormLocalStorage().show_hide_column_ids;
|
184 |
+
var checkboxs = jQuery('#ChBDiv input[type=checkbox]');
|
185 |
+
checkboxs.filter(':checkbox').removeAttr('checked');
|
186 |
+
var ChBAll = document.getElementById('ChBAll');
|
187 |
+
if ( checkboxs.length != show_hide_column_ids.length ) {
|
188 |
+
jQuery('#ChBAll').addClass('fm-remove_before');
|
189 |
+
}
|
190 |
+
if ( checkboxs.length == show_hide_column_ids.length) {
|
191 |
+
jQuery('#ChBAll').removeClass('fm-remove_before');
|
192 |
+
}
|
193 |
+
jQuery.each( show_hide_column_ids, function ( i, val) {
|
194 |
+
jQuery('#ChBDiv #'+ val).prop('checked',true).attr('checked');
|
195 |
+
});
|
196 |
+
}
|
197 |
+
}
|
198 |
+
|
199 |
+
function set_all_column_checkbox_checked() {
|
200 |
+
var ChBAll = jQuery('#ChBAll');
|
201 |
+
var checkboxs = jQuery('#ChBDiv input[type=checkbox]');
|
202 |
+
if ( checkboxs.length == checkboxs.filter(":checked").length ) {
|
203 |
+
ChBAll.removeClass('fm-remove_before').prop('checked', true);
|
204 |
+
}
|
205 |
+
else {
|
206 |
+
ChBAll.addClass('fm-remove_before').prop('checked', false);
|
207 |
+
}
|
208 |
+
}
|
209 |
+
|
210 |
+
function set_show_hide_column_ids() {
|
211 |
+
var ids = [];
|
212 |
+
var obj = {};
|
213 |
+
jQuery('#ChBDiv input[type=checkbox]').each(function ( i, val ) {
|
214 |
+
if ( this.checked ) {
|
215 |
+
var id = jQuery(this).attr('id');
|
216 |
+
ids.push( id );
|
217 |
+
}
|
218 |
+
});
|
219 |
+
obj.show_hide_column_ids = ids;
|
220 |
+
localStorage.setItem('fm_form' + formId, JSON.stringify(obj));
|
221 |
+
}
|
222 |
+
function show_hide_columns_history() {
|
223 |
+
if ( getFormLocalStorage().show_hide_column_ids ) {
|
224 |
+
jQuery('#fm-submission-lists th, #fm-submission-lists td').addClass('fm-hide-column');
|
225 |
+
jQuery.each( getFormLocalStorage().show_hide_column_ids , function( key, val ) {
|
226 |
+
var columnClassName = val.replace("fm_check_id_", "");
|
227 |
+
columnClassName = columnClassName.replace("fm_check_", "");
|
228 |
+
jQuery('#fm-submission-lists .' + columnClassName + '_fc' ).removeClass('fm-hide-column').addClass('fm-show-column');
|
229 |
+
});
|
230 |
+
jQuery('#fm-submission-lists .fm-column-not-hide').removeClass('fm-hide-column');
|
231 |
+
}
|
232 |
+
}
|
233 |
+
|
234 |
function submit_del(href_in) {
|
235 |
document.getElementById('admin_form').action = href_in;
|
236 |
document.getElementById('admin_form').submit();
|
js/frontend/.gitignore
DELETED
File without changes
|
js/main_div_front_end.js
CHANGED
@@ -796,7 +796,7 @@ function page_next(id, form_id, form_view_count, form_view_max) {
|
|
796 |
}
|
797 |
|
798 |
function getfileextension(filename, exten) {
|
799 |
-
if(filename.length == 0) {
|
800 |
return true;
|
801 |
}
|
802 |
var dot = filename.lastIndexOf(".");
|
@@ -1628,7 +1628,7 @@ function wd_spinner_check(form_id, spinner_check_field) {
|
|
1628 |
}
|
1629 |
|
1630 |
function fmscrollHandler(form_id) {
|
1631 |
-
|
1632 |
if(!jQuery("#fm-scrollbox" + form_id).hasClass("fm-minimized") && scrollPercent >= window["scrollbox_trigger_point" + form_id]) {
|
1633 |
setTimeout(function() {
|
1634 |
jQuery("#fm-scrollbox" + form_id).removeClass("fm-animated fadeOutDown").addClass("fm-animated fadeInUp");
|
796 |
}
|
797 |
|
798 |
function getfileextension(filename, exten) {
|
799 |
+
if( typeof filename == 'undefined' || filename.length == 0) {
|
800 |
return true;
|
801 |
}
|
802 |
var dot = filename.lastIndexOf(".");
|
1628 |
}
|
1629 |
|
1630 |
function fmscrollHandler(form_id) {
|
1631 |
+
var scrollPercent = 100 * jQuery(window).scrollTop() / (jQuery(document).height() - jQuery(window).height());
|
1632 |
if(!jQuery("#fm-scrollbox" + form_id).hasClass("fm-minimized") && scrollPercent >= window["scrollbox_trigger_point" + form_id]) {
|
1633 |
setTimeout(function() {
|
1634 |
jQuery("#fm-scrollbox" + form_id).removeClass("fm-animated fadeOutDown").addClass("fm-animated fadeInUp");
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: webdorado,10web
|
|
3 |
Tags: contact, contact form, email, forms, contact forms, custom form, feedback, form builder, form manager, form maker, forms builder, form builder wordpress
|
4 |
Requires at least: 3.4
|
5 |
Tested up to: 4.9
|
6 |
-
Stable tag: 1.12.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -79,6 +79,14 @@ After downloading the ZIP file,
|
|
79 |
|
80 |
== Changelog ==
|
81 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
= 1.12.30 =
|
83 |
* Changed: Separate buttons for deactivation.
|
84 |
|
@@ -90,24 +98,10 @@ After downloading the ZIP file,
|
|
90 |
* Changed: Code structure refactoring.
|
91 |
* Fixed: Bug on required fields PHP validation.
|
92 |
* Fixed: Bug on saving a theme.
|
93 |
-
|
94 |
-
|
95 |
-
*
|
96 |
-
*
|
97 |
-
* Fixed: Action after submission text for popup forms.
|
98 |
-
* Changed: Updated translations.
|
99 |
-
* Added: Gutenberg integration.
|
100 |
-
* Fixed: Required mark for "Receive Copy" field.
|
101 |
-
* Fixed: Bug on selecting options from database.
|
102 |
-
* Minor fix: an incorrect link
|
103 |
-
* Improved: Insert placeholder functionality.
|
104 |
-
* Fixed: Action after submission text for popup forms.
|
105 |
-
* Fixed: Do not allow negative numbers as quantity.
|
106 |
-
* Added: Loading for add-ons options.
|
107 |
-
* Added: Premium version page new style.
|
108 |
-
* Added: Add-ons page new style.
|
109 |
-
* Fixed: Submission id bug.
|
110 |
-
* Fixed: Security issue reported by Sairam Jetty.
|
111 |
|
112 |
= 1.12.22 =
|
113 |
* Added: Help and suggestions text for Privacy Policy (for GDPR compliance)
|
3 |
Tags: contact, contact form, email, forms, contact forms, custom form, feedback, form builder, form manager, form maker, forms builder, form builder wordpress
|
4 |
Requires at least: 3.4
|
5 |
Tested up to: 4.9
|
6 |
+
Stable tag: 1.12.31
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
79 |
|
80 |
== Changelog ==
|
81 |
|
82 |
+
= 1.12.31 =
|
83 |
+
* Improved: CSV, XML export.
|
84 |
+
* Improved: default email design
|
85 |
+
* Improved: Minor improvements in email options
|
86 |
+
* Fixed: PHP validation for email.
|
87 |
+
* Fixed: Preserve the list of columns displayed when changing the page.
|
88 |
+
* Fixed: Do not display ScrollBox form after Successful submission.
|
89 |
+
|
90 |
= 1.12.30 =
|
91 |
* Changed: Separate buttons for deactivation.
|
92 |
|
98 |
* Changed: Code structure refactoring.
|
99 |
* Fixed: Bug on required fields PHP validation.
|
100 |
* Fixed: Bug on saving a theme.
|
101 |
+
|
102 |
+
= 1.12.27 =
|
103 |
+
* Added: Help and suggestions text for Privacy Policy (for GDPR compliance)
|
104 |
+
* Added: Privacy related text to readme.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
|
106 |
= 1.12.22 =
|
107 |
* Added: Help and suggestions text for Privacy Policy (for GDPR compliance)
|