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

Version Description

  • Removed: Old forms support (created with Form Maker versions < 1.7.0)
  • Added: Form Header
  • Added: New Themes
  • Added: New Theme Editor
  • Added: Form Display Options (Embedded, Popup, Topbar, Scrollbox)
  • Fixed: Database creation on some versions of MySQL
  • Fixed: Removed html tags from csv and xml
Download this release

Release Info

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

Code changes from version 1.10.11 to 1.11.1

admin/controllers/FMControllerFormMakerEditCSS.php DELETED
@@ -1,98 +0,0 @@
1
- <?php
2
-
3
- class FMControllerFormMakerEditCSS {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $task = ((isset($_POST['task'])) ? esc_html($_POST['task']) : '');
23
- $id = ((isset($_POST['current_id'])) ? (int)esc_html($_POST['current_id']) : 0);
24
- if (method_exists($this, $task)) {
25
- $this->$task($id);
26
- }
27
- else {
28
- $this->display();
29
- }
30
- }
31
-
32
- public function display() {
33
- require_once WD_FM_DIR . "/admin/models/FMModelFormMakerEditCSS.php";
34
- $model = new FMModelFormMakerEditCSS();
35
-
36
- require_once WD_FM_DIR . "/admin/views/FMViewFormMakerEditCSS.php";
37
- $view = new FMViewFormMakerEditCSS($model);
38
- $view->display();
39
- }
40
-
41
- public function save() {
42
- $this->update_db();
43
- }
44
-
45
- public function apply() {
46
- $this->update_db();
47
- $this->display();
48
- }
49
-
50
- public function save_as_new() {
51
- $this->insert_db();
52
- }
53
-
54
- public function insert_db() {
55
- global $wpdb;
56
- $title = (isset($_POST['title']) ? esc_html(stripslashes( $_POST['title'])) : '');
57
- $css = (isset($_POST['css']) ? stripslashes(preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $_POST['css'])) : '');
58
- $default = (isset($_POST['default']) ? esc_html(stripslashes( $_POST['default'])) : 0);
59
- $save = $wpdb->insert($wpdb->prefix . 'formmaker_themes', array(
60
- 'title' => $title,
61
- 'css' => $css,
62
- 'default' => $default,
63
- ), array(
64
- '%s',
65
- '%s',
66
- '%d',
67
- ));
68
- }
69
-
70
- public function update_db() {
71
- global $wpdb;
72
- $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes( $_POST['current_id'])) : 0);
73
- $title = (isset($_POST['title']) ? esc_html(stripslashes( $_POST['title'])) : '');
74
- $css = (isset($_POST['css']) ? stripslashes(preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $_POST['css'])) : '');
75
- $default = (isset($_POST['default']) ? esc_html(stripslashes( $_POST['default'])) : 0);
76
- $save = $wpdb->update($wpdb->prefix . 'formmaker_themes', array(
77
- 'title' => $title,
78
- 'css' => $css,
79
- 'default' => $default,
80
- ), array('id' => $id));
81
- if ($save !== FALSE) {
82
- echo WDW_FM_Library::message('Item Succesfully Saved.', 'updated');
83
- }
84
- else {
85
- echo WDW_FM_Library::message('Error. Please install plugin again.', 'error');
86
- }
87
- }
88
-
89
- ////////////////////////////////////////////////////////////////////////////////////////
90
- // Getters & Setters //
91
- ////////////////////////////////////////////////////////////////////////////////////////
92
- ////////////////////////////////////////////////////////////////////////////////////////
93
- // Private Methods //
94
- ////////////////////////////////////////////////////////////////////////////////////////
95
- ////////////////////////////////////////////////////////////////////////////////////////
96
- // Listeners //
97
- ////////////////////////////////////////////////////////////////////////////////////////
98
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/controllers/FMControllerGoptions_fm.php CHANGED
@@ -53,8 +53,11 @@ class FMControllerGoptions_fm {
53
  $private_key = (isset($_POST['private_key']) ? esc_html(stripslashes( $_POST['private_key'])) : '');
54
  $csv_delimiter = (isset($_POST['csv_delimiter']) && $_POST['csv_delimiter']!='' ? esc_html(stripslashes( $_POST['csv_delimiter'])) : ',');
55
  $fm_shortcode = (isset($_POST['fm_shortcode']) ? "old" : '');
 
56
  $map_key = (isset($_POST['map_key']) ? esc_html(stripslashes( $_POST['map_key'])) : '');
57
- update_option('fm_settings', array('public_key' => $public_key, 'private_key' => $private_key, 'csv_delimiter' => $csv_delimiter, 'map_key' => $map_key, 'fm_shortcode' => $fm_shortcode));
 
 
58
  }
59
 
60
 
53
  $private_key = (isset($_POST['private_key']) ? esc_html(stripslashes( $_POST['private_key'])) : '');
54
  $csv_delimiter = (isset($_POST['csv_delimiter']) && $_POST['csv_delimiter']!='' ? esc_html(stripslashes( $_POST['csv_delimiter'])) : ',');
55
  $fm_shortcode = (isset($_POST['fm_shortcode']) ? "old" : '');
56
+
57
  $map_key = (isset($_POST['map_key']) ? esc_html(stripslashes( $_POST['map_key'])) : '');
58
+ update_option('fm_settings', array('public_key' => $public_key, 'private_key' => $private_key, 'csv_delimiter' => $csv_delimiter, 'map_key' => $map_key, 'fm_shortcode' => $fm_shortcode,));
59
+
60
+
61
  }
62
 
63
 
admin/controllers/FMControllerManage_fm.php CHANGED
@@ -24,15 +24,15 @@ class FMControllerManage_fm {
24
  $message = WDW_FM_Library::get('message');
25
  echo WDW_FM_Library::message_id($message);
26
  if (method_exists($this, $task)) {
27
- check_admin_referer('nonce_fm', 'nonce_fm');
28
- $this->$task($id);
29
  }
30
  else {
31
- $this->display();
32
  }
33
  }
34
- public function undo()
35
- {
36
  require_once WD_FM_DIR . "/admin/models/FMModelManage_fm.php";
37
  $model = new FMModelManage_fm();
38
 
@@ -42,15 +42,14 @@ public function undo()
42
  $backup_id = (int)WDW_FM_Library::get('backup_id');
43
  $id = (int)WDW_FM_Library::get('id');
44
 
45
- $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 ";
46
  $backup_id = $wpdb->get_var($query);
47
 
48
  $view = new FMViewManage_fm($model);
49
  $view->edit($backup_id);
 
50
 
51
- }
52
- public function redo()
53
- {
54
  require_once WD_FM_DIR . "/admin/models/FMModelManage_fm.php";
55
  $model = new FMModelManage_fm();
56
 
@@ -59,14 +58,12 @@ public function redo()
59
  $backup_id = (int)WDW_FM_Library::get('backup_id');
60
  $id = (int)WDW_FM_Library::get('id');
61
 
62
- $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 ";
63
  $backup_id = $wpdb->get_var($query);
64
-
65
- $view = new FMViewManage_fm($model);
66
- $view->edit($backup_id);
67
-
68
- }
69
-
70
 
71
  public function display() {
72
  require_once WD_FM_DIR . "/admin/models/FMModelManage_fm.php";
@@ -95,144 +92,20 @@ public function redo()
95
  $id = (int)WDW_FM_Library::get('current_id', 0);
96
 
97
  global $wpdb;
98
- $query = "SELECT backup_id FROM ".$wpdb->prefix."formmaker_backup WHERE cur=1 and id=".$id;
99
  $backup_id = $wpdb->get_var($query);
100
 
101
- if(!$backup_id)
102
- {
103
- $query = "SELECT max(backup_id) FROM ".$wpdb->prefix."formmaker_backup";
104
- $backup_id = $wpdb->get_var($query);
105
- if($backup_id)
106
- $backup_id++;
107
- else
108
- $backup_id=1;
109
- $query = "INSERT INTO ".$wpdb->prefix."formmaker_backup SELECT ".$backup_id." AS backup_id, 1 AS cur, formmakerbkup.id, formmakerbkup.title, 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 FROM ".$wpdb->prefix."formmaker as formmakerbkup WHERE id=".$id;
110
- $wpdb->query($query);
111
- }
112
-
113
- $view->edit($backup_id);
114
- }
115
-
116
- public function edit_old() {
117
- require_once WD_FM_DIR . "/admin/models/FMModelManage_fm.php";
118
- $model = new FMModelManage_fm();
119
-
120
- require_once WD_FM_DIR . "/admin/views/FMViewManage_fm.php";
121
- $view = new FMViewManage_fm($model);
122
- $id = (int)WDW_FM_Library::get('current_id', 0);
123
- $view->edit_old($id);
124
- }
125
-
126
- public function form_options_old() {
127
- if (!isset($_GET['task'])) {
128
- $this->save_db();
129
- }
130
- require_once WD_FM_DIR . "/admin/models/FMModelManage_fm.php";
131
- $model = new FMModelManage_fm();
132
-
133
- require_once WD_FM_DIR . "/admin/views/FMViewManage_fm.php";
134
- $view = new FMViewManage_fm($model);
135
- global $wpdb;
136
- $id = (int)WDW_FM_Library::get('current_id', $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker"));
137
- $view->form_options_old($id);
138
- }
139
-
140
- public function save_options_old() {
141
- $message = $this->save_db_options_old();
142
- // $this->edit_old();
143
- $page = WDW_FM_Library::get('page');
144
- $current_id = (int)WDW_FM_Library::get('current_id', 0);
145
- WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'edit_old', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
146
- }
147
-
148
- public function apply_options_old() {
149
- $message = $this->save_db_options_old();
150
- require_once WD_FM_DIR . "/admin/models/FMModelManage_fm.php";
151
- $model = new FMModelManage_fm();
152
-
153
- require_once WD_FM_DIR . "/admin/views/FMViewManage_fm.php";
154
- $view = new FMViewManage_fm($model);
155
- $page = WDW_FM_Library::get('page');
156
- $current_id = (int)WDW_FM_Library::get('current_id', 0);
157
- $fieldset_id = WDW_FM_Library::get('fieldset_id', 'general');
158
- WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'form_options_old', 'current_id' => $current_id, 'message' => $message, 'fieldset_id' => $fieldset_id), admin_url('admin.php')));
159
- }
160
-
161
- public function save_db_options_old() {
162
- $javascript = "// Occurs before the form is loaded
163
- function before_load() {
164
-
165
- }
166
- // Occurs just before submitting the form
167
- function before_submit() {
168
- // 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.
169
- }
170
- // Occurs just before resetting the form
171
- function before_reset() {
172
-
173
- }";
174
- global $wpdb;
175
- $id = (int)WDW_FM_Library::get('current_id', 0);
176
- $mail = (isset($_POST['mail']) ? esc_html(stripslashes($_POST['mail'])) : '');
177
- $theme = (isset($_POST['theme']) ? (int)esc_html(stripslashes($_POST['theme'])) : 1);
178
- $javascript = (isset($_POST['javascript']) ? stripslashes($_POST['javascript']) : $javascript);
179
- $script1 = (isset($_POST['script1']) ? esc_html(stripslashes($_POST['script1'])) : '');
180
- $script2 = (isset($_POST['script2']) ? esc_html(stripslashes($_POST['script2'])) : '');
181
- $script_user1 = (isset($_POST['script_user1']) ? esc_html(stripslashes($_POST['script_user1'])) : '');
182
- $script_user2 = (isset($_POST['script_user2']) ? esc_html(stripslashes($_POST['script_user2'])) : '');
183
- $submit_text = (isset($_POST['submit_text']) ? stripslashes($_POST['submit_text']) : '');
184
- $url = (isset($_POST['url']) ? esc_html(stripslashes($_POST['url'])) : '');
185
- $script_mail = (isset($_POST['script_mail']) ? stripslashes($_POST['script_mail']) : '%all%');
186
- $script_mail_user = (isset($_POST['script_mail_user']) ? stripslashes($_POST['script_mail_user']) : '%all%');
187
- $label_order_current = (isset($_POST['label_order_current']) ? esc_html(stripslashes($_POST['label_order_current'])) : '');
188
- $tax = (isset($_POST['tax']) ? esc_html(stripslashes($_POST['tax'])) : 0);
189
- $payment_currency = (isset($_POST['payment_currency']) ? stripslashes($_POST['payment_currency']) : '');
190
- $paypal_email = (isset($_POST['paypal_email']) ? esc_html(stripslashes($_POST['paypal_email'])) : '');
191
- $checkout_mode = (isset($_POST['checkout_mode']) ? esc_html(stripslashes($_POST['checkout_mode'])) : 'testmode');
192
- $paypal_mode = (isset($_POST['paypal_mode']) ? esc_html(stripslashes($_POST['paypal_mode'])) : 0);
193
- $from_mail = (isset($_POST['from_mail']) ? esc_html(stripslashes($_POST['from_mail'])) : '');
194
- $from_name = (isset($_POST['from_name']) ? esc_html(stripslashes($_POST['from_name'])) : '');
195
- if (isset($_POST['submit_text_type'])) {
196
- $submit_text_type = esc_html(stripslashes($_POST['submit_text_type']));
197
- if ($submit_text_type == 5) {
198
- $article_id = (isset($_POST['page_name']) ? esc_html(stripslashes($_POST['page_name'])) : 0);
199
- }
200
- else {
201
- $article_id = (isset($_POST['post_name']) ? esc_html(stripslashes($_POST['post_name'])) : 0);
202
- }
203
  }
204
- else {
205
- $submit_text_type = 0;
206
- $article_id = 0;
207
- }
208
- $save = $wpdb->update($wpdb->prefix . 'formmaker', array(
209
- 'mail' => $mail,
210
- 'theme' => $theme,
211
- 'javascript' => $javascript,
212
- 'submit_text' => $submit_text,
213
- 'url' => $url,
214
- 'submit_text_type' => $submit_text_type,
215
- 'script_mail' => $script_mail,
216
- 'script_mail_user' => $script_mail_user,
217
- 'article_id' => $article_id,
218
- 'paypal_mode' => $paypal_mode,
219
- 'checkout_mode' => $checkout_mode,
220
- 'paypal_email' => $paypal_email,
221
- 'payment_currency' => $payment_currency,
222
- 'tax' => $tax,
223
- 'from_mail' => $from_mail,
224
- 'from_name' => $from_name,
225
- ), array('id' => $id));
226
- if ($save !== FALSE) {
227
- return 8;
228
- }
229
- else {
230
- return 2;
231
- }
232
- }
233
-
234
- public function cancel_options_old() {
235
- $this->edit_old();
236
  }
237
 
238
  public function form_layout() {
@@ -251,7 +124,6 @@ function before_reset() {
251
 
252
  public function save_layout() {
253
  $message = $this->save_db_layout();
254
- // $this->edit();
255
  $page = WDW_FM_Library::get('page');
256
  $current_id = (int)WDW_FM_Library::get('current_id', 0);
257
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
@@ -259,15 +131,9 @@ function before_reset() {
259
 
260
  public function apply_layout() {
261
  $message = $this->save_db_layout();
262
- require_once WD_FM_DIR . "/admin/models/FMModelManage_fm.php";
263
- $model = new FMModelManage_fm();
264
-
265
- require_once WD_FM_DIR . "/admin/views/FMViewManage_fm.php";
266
- $view = new FMViewManage_fm($model);
267
  $page = WDW_FM_Library::get('page');
268
  $current_id = (int)WDW_FM_Library::get('current_id', 0);
269
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'form_layout', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
270
- // $view->form_layout($id);
271
  }
272
 
273
  public function save_db_layout() {
@@ -288,20 +154,29 @@ function before_reset() {
288
  }
289
 
290
  public function form_options() {
291
- if (!isset($_GET['task'])) {
292
- $this->save_db();
293
- }
294
  require_once WD_FM_DIR . "/admin/models/FMModelManage_fm.php";
295
  $model = new FMModelManage_fm();
296
 
297
  require_once WD_FM_DIR . "/admin/views/FMViewManage_fm.php";
298
  $view = new FMViewManage_fm($model);
299
- // $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
300
  global $wpdb;
301
  $id = (int)WDW_FM_Library::get('current_id', $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker"));
302
  $view->form_options($id);
303
  }
304
 
 
 
 
 
 
 
 
 
 
 
 
 
305
  public function save_options() {
306
  $message = $this->save_db_options();
307
  // $this->edit();
@@ -310,25 +185,52 @@ function before_reset() {
310
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
311
  }
312
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
313
  public function apply_options() {
314
  $message = $this->save_db_options();
315
- require_once WD_FM_DIR . "/admin/models/FMModelManage_fm.php";
316
- $model = new FMModelManage_fm();
317
-
318
- require_once WD_FM_DIR . "/admin/views/FMViewManage_fm.php";
319
- $view = new FMViewManage_fm($model);
320
- // $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
321
- // $view->form_options($id);
322
  $page = WDW_FM_Library::get('page');
323
  $current_id = (int)WDW_FM_Library::get('current_id', 0);
324
  $fieldset_id = WDW_FM_Library::get('fieldset_id', 'general');
325
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'form_options', 'current_id' => $current_id, 'message' => $message, 'fieldset_id' => $fieldset_id), admin_url('admin.php')));
326
  }
327
 
 
 
 
 
 
 
 
328
  public function remove_query() {
329
  global $wpdb;
330
  $cid = ((isset($_POST['cid']) && $_POST['cid'] != '') ? $_POST['cid'] : NULL);
331
- if (count($cid)) {
332
  array_walk($cid, create_function('&$value', '$value = (int)$value;'));
333
  $cids = implode(',', $cid);
334
  $query = 'DELETE FROM ' . $wpdb->prefix . 'formmaker_query WHERE id IN ( ' . $cids . ' )';
@@ -411,9 +313,9 @@ function before_reset() {
411
  $user_id_wd = (isset($_POST['user_id_wd']) ? stripslashes($_POST['user_id_wd']) : 'administrator,');
412
  $frontend_submit_fields = (isset($_POST['frontend_submit_fields']) ? stripslashes($_POST['frontend_submit_fields']) : '');
413
  $frontend_submit_stat_fields = (isset($_POST['frontend_submit_stat_fields']) ? stripslashes($_POST['frontend_submit_stat_fields']) : '');
414
- $mail_emptyfields = (isset($_POST['mail_emptyfields']) ? esc_html(stripslashes($_POST['mail_emptyfields'])) : 0);
415
- $mail_verify = (isset($_POST['mail_verify']) ? esc_html(stripslashes($_POST['mail_verify'])) : 0);
416
- $mail_verify_expiretime = (isset($_POST['mail_verify_expiretime']) ? esc_html(stripslashes($_POST['mail_verify_expiretime'])) : '');
417
  $send_to = '';
418
  for ($i = 0; $i < 20; $i++) {
419
  if (isset($_POST['send_to' . $i])) {
@@ -430,7 +332,7 @@ function before_reset() {
430
  }
431
  }
432
  else {
433
- $submit_text_type = 0;
434
  $article_id = 0;
435
  }
436
 
@@ -447,7 +349,7 @@ function before_reset() {
447
  if(!$mail_verification_post_id || get_post( $mail_verification_post_id )===NULL)
448
  $mail_verification_post_id = wp_insert_post( $email_verification_post );
449
  }
450
-
451
  $save = $wpdb->update($wpdb->prefix . 'formmaker', array(
452
  'published' => $published,
453
  'savedb' => $savedb,
@@ -489,10 +391,10 @@ function before_reset() {
489
  'send_to' => $send_to,
490
  'frontend_submit_fields' => $frontend_submit_fields,
491
  'frontend_submit_stat_fields' => $frontend_submit_stat_fields,
492
- 'mail_emptyfields' => $mail_emptyfields,
493
- 'mail_verify' => $mail_verify,
494
- 'mail_verify_expiretime' => $mail_verify_expiretime,
495
- 'mail_verification_post_id' => $mail_verification_post_id,
496
  ), array('id' => $id));
497
  if ($save !== FALSE) {
498
  $save_theme_in_backup = $wpdb->update($wpdb->prefix . 'formmaker_backup', array(
@@ -505,211 +407,90 @@ function before_reset() {
505
  }
506
  }
507
 
508
- public function save_as_copy_old() {
509
- $message = $this->save_db_as_copy_old();
510
- // $this->display();
511
- $page = WDW_FM_Library::get('page');
512
- WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
513
- }
514
-
515
- public function save_old() {
516
- $message = $this->save_db_old();
517
- // $this->display();
518
- $page = WDW_FM_Library::get('page');
519
- WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
520
- }
521
-
522
- public function apply_old() {
523
- global $wpdb;
524
- $message = $this->save_db_old();
525
- // $this->edit_old();
526
- $id = (int) $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
527
- $current_id = (int)WDW_FM_Library::get('current_id', $id);
528
- $page = WDW_FM_Library::get('page');
529
- WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'edit_old', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
530
- }
531
-
532
- public function save_db_old() {
533
- global $wpdb;
534
- // $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes($_POST['current_id'])) : 0);
535
- $id = (int)WDW_FM_Library::get('current_id', 0);
536
- $title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
537
- $form = (isset($_POST['form']) ? stripslashes($_POST['form']) : '');
538
- $form_front = (isset($_POST['form_front']) ? stripslashes($_POST['form_front']) : '');
539
- $counter = (isset($_POST['counter']) ? esc_html(stripslashes($_POST['counter'])) : 0);
540
- $label_order = (isset($_POST['label_order']) ? esc_html(stripslashes($_POST['label_order'])) : '');
541
- $label_order_current = (isset($_POST['label_order_current']) ? esc_html(stripslashes($_POST['label_order_current'])) : '');
542
- $pagination = (isset($_POST['pagination']) ? esc_html(stripslashes($_POST['pagination'])) : '');
543
- $show_title = (isset($_POST['show_title']) ? esc_html(stripslashes($_POST['show_title'])) : '');
544
- $show_numbers = (isset($_POST['show_numbers']) ? esc_html(stripslashes($_POST['show_numbers'])) : '');
545
- $public_key = (isset($_POST['public_key']) ? esc_html(stripslashes($_POST['public_key'])) : '');
546
- $private_key = (isset($_POST['private_key']) ? esc_html(stripslashes($_POST['private_key'])) : '');
547
- $recaptcha_theme = (isset($_POST['recaptcha_theme']) ? esc_html(stripslashes($_POST['recaptcha_theme'])) : '');
548
-
549
- $save = $wpdb->update($wpdb->prefix . 'formmaker', array(
550
- 'title' => $title,
551
- 'form' => $form,
552
- 'form_front' => $form_front,
553
- 'counter' => $counter,
554
- 'label_order' => $label_order,
555
- 'label_order_current' => $label_order_current,
556
- 'pagination' => $pagination,
557
- 'show_title' => $show_title,
558
- 'show_numbers' => $show_numbers,
559
- 'public_key' => $public_key,
560
- 'private_key' => $private_key,
561
- 'recaptcha_theme' => $recaptcha_theme,
562
- ), array('id' => $id));
563
- if ($save !== FALSE) {
564
- return 1;
565
- }
566
- else {
567
- return 2;
568
- }
569
- }
570
-
571
- public function save_db_as_copy_old() {
572
- global $wpdb;
573
- // $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes($_POST['current_id'])) : 0);
574
- $id = (int)WDW_FM_Library::get('current_id', 0);
575
- $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
576
- $title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
577
- $form = (isset($_POST['form']) ? stripslashes($_POST['form']) : '');
578
- $form_front = (isset($_POST['form_front']) ? stripslashes($_POST['form_front']) : '');
579
- $counter = (isset($_POST['counter']) ? esc_html(stripslashes($_POST['counter'])) : 0);
580
- $label_order = (isset($_POST['label_order']) ? esc_html(stripslashes($_POST['label_order'])) : '');
581
- $pagination = (isset($_POST['pagination']) ? esc_html(stripslashes($_POST['pagination'])) : '');
582
- $show_title = (isset($_POST['show_title']) ? esc_html(stripslashes($_POST['show_title'])) : '');
583
- $show_numbers = (isset($_POST['show_numbers']) ? esc_html(stripslashes($_POST['show_numbers'])) : '');
584
- $public_key = (isset($_POST['public_key']) ? esc_html(stripslashes($_POST['public_key'])) : '');
585
- $private_key = (isset($_POST['private_key']) ? esc_html(stripslashes($_POST['private_key'])) : '');
586
- $recaptcha_theme = (isset($_POST['recaptcha_theme']) ? esc_html(stripslashes($_POST['recaptcha_theme'])) : '');
587
 
588
- $save = $wpdb->insert($wpdb->prefix . 'formmaker', array(
589
- 'title' => $title,
590
- 'mail' => $row->mail,
591
- 'form' => $form,
592
- 'form_front' => $form_front,
593
- 'theme' => $row->theme,
594
- 'counter' => $counter,
595
- 'label_order' => $label_order,
596
- 'pagination' => $pagination,
597
- 'show_title' => $show_title,
598
- 'show_numbers' => $show_numbers,
599
- 'public_key' => $public_key,
600
- 'private_key' => $private_key,
601
- 'recaptcha_theme' => $recaptcha_theme,
602
- 'javascript' => $row->javascript,
603
- 'script1' => $row->script1,
604
- 'script2' => $row->script2,
605
- 'script_user1' => $row->script_user1,
606
- 'script_user2' => $row->script_user2,
607
- 'submit_text' => $row->submit_text,
608
- 'url' => $row->url,
609
- 'article_id' => $row->article_id,
610
- 'submit_text_type' => $row->submit_text_type,
611
- 'script_mail' => $row->script_mail,
612
- 'script_mail_user' => $row->script_mail_user,
613
- 'paypal_mode' => $row->paypal_mode,
614
- 'checkout_mode' => $row->checkout_mode,
615
- 'paypal_email' => $row->paypal_email,
616
- 'payment_currency' => $row->payment_currency,
617
- 'tax' => $row->tax,
618
- 'label_order_current' => $row->label_order_current,
619
- 'from_mail' => $row->from_mail,
620
- 'from_name' => $row->from_name,
621
- 'reply_to_user' => $row->reply_to_user,
622
- 'mail_from_name_user' => $row->mail_from_name_user,
623
- 'mail_from_user' => $row->mail_from_user,
624
- 'custom_front' => $row->custom_front,
625
- 'autogen_layout' => $row->autogen_layout,
626
- 'send_to' => $row->send_to,
627
- 'reply_to' => $row->reply_to,
628
- 'requiredmark' => $row->requiredmark,
629
- 'sendemail' => $row->sendemail,
630
- 'savedb' => $row->savedb,
631
- 'form_fields' => $row->form_fields,
632
- 'published' => $row->published,
633
- 'save_uploads' => $row->save_uploads
634
- ), array(
635
- '%s',
636
- '%s',
637
- '%s',
638
- '%s',
639
- '%d',
640
- '%d',
641
- '%s',
642
- '%s',
643
- '%s',
644
- '%s',
645
- '%s',
646
- '%s',
647
- '%s',
648
- '%s',
649
- '%s',
650
- '%s',
651
- '%s',
652
- '%s',
653
- '%s',
654
- '%s',
655
- '%s',
656
- '%d',
657
- '%s',
658
- '%s',
659
- '%d',
660
- '%s',
661
- '%s',
662
- '%s',
663
- '%s',
664
- '%s',
665
- '%s',
666
- '%s',
667
- '%s',
668
- '%s',
669
- '%s',
670
- '%s',
671
- '%d',
672
- '%s',
673
- '%s',
674
- '%s',
675
- '%d',
676
- '%d',
677
- '%s',
678
- '%d'
679
- ));
680
- $id = (int)$wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
681
- $wpdb->insert($wpdb->prefix . 'formmaker_views', array(
682
  'form_id' => $id,
683
- 'views' => 0
684
- ), array(
685
- '%d',
686
- '%d'
687
- ));
688
- if ($save !== FALSE) {
689
- return 1;
690
- }
691
- else {
692
- return 2;
693
- }
694
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
695
 
696
  public function save_as_copy() {
697
  $message = $this->save_db_as_copy();
698
- // $this->display();
699
  $page = WDW_FM_Library::get('page');
700
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
701
  }
702
 
703
  public function save() {
704
  $message = $this->save_db();
705
- // $this->display();
706
  $page = WDW_FM_Library::get('page');
707
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
708
  }
709
 
710
  public function apply() {
711
  $message = $this->save_db();
712
- // $this->edit();
713
  global $wpdb;
714
  $id = (int) $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
715
  $current_id = (int)WDW_FM_Library::get('current_id', $id);
@@ -726,12 +507,12 @@ function before_load() {
726
  function before_submit() {
727
  // 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.
728
  }
729
- // before form reset
730
  function before_reset() {
731
  }";
732
  $id = (int)WDW_FM_Library::get('current_id', 0);
733
  $title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
734
- $theme = (isset($_POST['theme']) ? esc_html(stripslashes($_POST['theme'])) : $wpdb->get_var("SELECT id FROM " . $wpdb->prefix . "formmaker_themes WHERE `default`='1'"));
735
  $form_front = (isset($_POST['form_front']) ? stripslashes($_POST['form_front']) : '');
736
  $sortable = (isset($_POST['sortable']) ? stripslashes($_POST['sortable']) : 1);
737
  $counter = (isset($_POST['counter']) ? esc_html(stripslashes($_POST['counter'])) : 0);
@@ -744,6 +525,15 @@ function before_reset() {
744
  $recaptcha_theme = (isset($_POST['recaptcha_theme']) ? esc_html(stripslashes($_POST['recaptcha_theme'])) : '');
745
  $label_order_current = (isset($_POST['label_order_current']) ? esc_html(stripslashes($_POST['label_order_current'])) : '');
746
  $form_fields = (isset($_POST['form_fields']) ? stripslashes($_POST['form_fields']) : '');
 
 
 
 
 
 
 
 
 
747
  if ($id != 0) {
748
  $save = $wpdb->update($wpdb->prefix . 'formmaker', array(
749
  'title' => $title,
@@ -760,11 +550,17 @@ function before_reset() {
760
  'private_key' => $private_key,
761
  'recaptcha_theme' => $recaptcha_theme,
762
  'form_fields' => $form_fields,
 
 
 
 
 
763
  ), array('id' => $id));
764
  }
765
  else {
766
  $save = $wpdb->insert($wpdb->prefix . 'formmaker', array(
767
  'title' => $title,
 
768
  'mail' => '',
769
  'form_front' => $form_front,
770
  'theme' => $theme,
@@ -780,7 +576,7 @@ function before_reset() {
780
  'submit_text' => '',
781
  'url' => '',
782
  'article_id' => 0,
783
- 'submit_text_type' => 0,
784
  'script_mail' => '%all%',
785
  'script_mail_user' => '%all%',
786
  'label_order_current' => $label_order_current,
@@ -819,65 +615,66 @@ function before_reset() {
819
  'frontend_submit_fields' => '',
820
  'frontend_submit_stat_fields' => '',
821
  'save_uploads' => 1,
822
- ), array(
823
- '%s',
824
- '%s',
825
- '%s',
826
- '%d',
827
- '%d',
828
- '%s',
829
- '%s',
830
- '%s',
831
- '%s',
832
- '%s',
833
- '%s',
834
- '%s',
835
- '%s',
836
- '%s',
837
- '%s',
838
- '%d',
839
- '%d',
840
- '%s',
841
- '%s',
842
- '%s',
843
- '%s',
844
- '%s',
845
- '%s',
846
- '%s',
847
- '%d',
848
- '%d',
849
- '%s',
850
- '%d',
851
- '%d',
852
- '%s',
853
- '%s',
854
- '%s',
855
- '%s',
856
- '%s',
857
- '%d',
858
- '%s',
859
- '%s',
860
- '%s',
861
- '%s',
862
- '%s',
863
- '%s',
864
- '%s',
865
- '%s',
866
- '%s',
867
- '%s',
868
- '%s',
869
- '%d',
870
- '%d',
871
- '%d',
872
- '%d',
873
- '%d',
874
- '%s',
875
- '%s',
876
- '%s',
877
- '%d',
878
  ));
879
  $id = (int)$wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
880
  // $_POST['current_id'] = $id;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
881
  $wpdb->insert($wpdb->prefix . 'formmaker_views', array(
882
  'form_id' => $id,
883
  'views' => 0
@@ -919,6 +716,11 @@ function before_reset() {
919
  'private_key' => $private_key,
920
  'recaptcha_theme' => $recaptcha_theme,
921
  'form_fields' => $form_fields,
 
 
 
 
 
922
  ), array('backup_id' => $backup_id));
923
 
924
 
@@ -952,7 +754,7 @@ function before_reset() {
952
  'submit_text' => '',
953
  'url' => '',
954
  'article_id' => 0,
955
- 'submit_text_type' => 0,
956
  'script_mail' => '%all%',
957
  'script_mail_user' => '%all%',
958
  'label_order_current' => $label_order_current,
@@ -990,6 +792,11 @@ function before_reset() {
990
  'user_id_wd' => 'administrator,',
991
  'frontend_submit_fields' => '',
992
  'frontend_submit_stat_fields' => '',
 
 
 
 
 
993
  ), array(
994
  '%d',
995
  '%d',
@@ -1047,6 +854,11 @@ function before_reset() {
1047
  '%s',
1048
  '%s',
1049
  '%s',
 
 
 
 
 
1050
  )) ;
1051
 
1052
  $query = "SELECT count(backup_id) FROM ".$wpdb->prefix."formmaker_backup WHERE id = ".$id;
@@ -1067,10 +879,13 @@ function before_reset() {
1067
 
1068
  public function save_db_as_copy() {
1069
  global $wpdb;
1070
- // $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes($_POST['current_id'])) : 0);
1071
  $id = (int)WDW_FM_Library::get('current_id', 0);
1072
  $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
 
 
 
1073
  $title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
 
1074
  $form_front = (isset($_POST['form_front']) ? stripslashes($_POST['form_front']) : '');
1075
  $sortable = (isset($_POST['sortable']) ? stripslashes($_POST['sortable']) : 1);
1076
  $counter = (isset($_POST['counter']) ? esc_html(stripslashes($_POST['counter'])) : 0);
@@ -1086,9 +901,10 @@ function before_reset() {
1086
 
1087
  $save = $wpdb->insert($wpdb->prefix . 'formmaker', array(
1088
  'title' => $title,
 
1089
  'mail' => $row->mail,
1090
  'form_front' => $form_front,
1091
- 'theme' => $row->theme,
1092
  'counter' => $counter,
1093
  'label_order' => $label_order,
1094
  'pagination' => $pagination,
@@ -1140,64 +956,65 @@ function before_reset() {
1140
  'frontend_submit_fields' => $row->frontend_submit_fields,
1141
  'frontend_submit_stat_fields' => $row->frontend_submit_stat_fields,
1142
  'save_uploads' => $row->save_uploads,
1143
- ), array(
1144
- '%s',
1145
- '%s',
1146
- '%s',
1147
- '%d',
1148
- '%d',
1149
- '%s',
1150
- '%s',
1151
- '%s',
1152
- '%s',
1153
- '%s',
1154
- '%s',
1155
- '%s',
1156
- '%s',
1157
- '%s',
1158
- '%s',
1159
- '%d',
1160
- '%d',
1161
- '%s',
1162
- '%s',
1163
- '%s',
1164
- '%s',
1165
- '%s',
1166
- '%s',
1167
- '%s',
1168
- '%d',
1169
- '%d',
1170
- '%s',
1171
- '%d',
1172
- '%d',
1173
- '%s',
1174
- '%s',
1175
- '%s',
1176
- '%s',
1177
- '%s',
1178
- '%d',
1179
- '%s',
1180
- '%s',
1181
- '%s',
1182
- '%s',
1183
- '%s',
1184
- '%s',
1185
- '%s',
1186
- '%s',
1187
- '%s',
1188
- '%s',
1189
- '%s',
1190
- '%d',
1191
- '%d',
1192
- '%d',
1193
- '%d',
1194
- '%d',
1195
- '%s',
1196
- '%s',
1197
- '%s',
1198
- '%d',
1199
  ));
1200
  $new_id = (int)$wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1201
  $wpdb->insert($wpdb->prefix . 'formmaker_views', array(
1202
  'form_id' => $new_id,
1203
  'views' => 0
@@ -1206,7 +1023,16 @@ function before_reset() {
1206
  '%d'
1207
  ));
1208
  if ($save !== FALSE) {
1209
-
 
 
 
 
 
 
 
 
 
1210
  return 1;
1211
  }
1212
  else {
@@ -1220,13 +1046,23 @@ function before_reset() {
1220
  if ($wpdb->query($query)) {
1221
  $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_views WHERE form_id="%d"', $id));
1222
  $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE form_id="%d"', $id));
1223
-
 
 
 
 
 
 
 
 
 
 
 
1224
  $message = 3;
1225
  }
1226
  else {
1227
  $message = 2;
1228
  }
1229
- // $this->display();
1230
  $page = WDW_FM_Library::get('page');
1231
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
1232
  }
@@ -1242,6 +1078,9 @@ function before_reset() {
1242
  $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $form_id));
1243
  $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_views WHERE form_id="%d"', $form_id));
1244
  $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE form_id="%d"', $form_id));
 
 
 
1245
  }
1246
  }
1247
  if ($flag) {
@@ -1250,11 +1089,102 @@ function before_reset() {
1250
  else {
1251
  $message = 6;
1252
  }
1253
- // $this->display();
1254
  $page = WDW_FM_Library::get('page');
1255
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
1256
  }
1257
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1258
  ////////////////////////////////////////////////////////////////////////////////////////
1259
  // Getters & Setters //
1260
  ////////////////////////////////////////////////////////////////////////////////////////
24
  $message = WDW_FM_Library::get('message');
25
  echo WDW_FM_Library::message_id($message);
26
  if (method_exists($this, $task)) {
27
+ check_admin_referer('nonce_fm', 'nonce_fm');
28
+ $this->$task($id);
29
  }
30
  else {
31
+ $this->display();
32
  }
33
  }
34
+
35
+ public function undo() {
36
  require_once WD_FM_DIR . "/admin/models/FMModelManage_fm.php";
37
  $model = new FMModelManage_fm();
38
 
42
  $backup_id = (int)WDW_FM_Library::get('backup_id');
43
  $id = (int)WDW_FM_Library::get('id');
44
 
45
+ $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 ";
46
  $backup_id = $wpdb->get_var($query);
47
 
48
  $view = new FMViewManage_fm($model);
49
  $view->edit($backup_id);
50
+ }
51
 
52
+ public function redo() {
 
 
53
  require_once WD_FM_DIR . "/admin/models/FMModelManage_fm.php";
54
  $model = new FMModelManage_fm();
55
 
58
  $backup_id = (int)WDW_FM_Library::get('backup_id');
59
  $id = (int)WDW_FM_Library::get('id');
60
 
61
+ $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 ";
62
  $backup_id = $wpdb->get_var($query);
63
+
64
+ $view = new FMViewManage_fm($model);
65
+ $view->edit($backup_id);
66
+ }
 
 
67
 
68
  public function display() {
69
  require_once WD_FM_DIR . "/admin/models/FMModelManage_fm.php";
92
  $id = (int)WDW_FM_Library::get('current_id', 0);
93
 
94
  global $wpdb;
95
+ $query = "SELECT backup_id FROM ".$wpdb->prefix."formmaker_backup WHERE cur=1 and id=".$id;
96
  $backup_id = $wpdb->get_var($query);
97
 
98
+ if(!$backup_id) {
99
+ $query = "SELECT max(backup_id) FROM ".$wpdb->prefix."formmaker_backup";
100
+ $backup_id = $wpdb->get_var($query);
101
+ if($backup_id)
102
+ $backup_id++;
103
+ else
104
+ $backup_id=1;
105
+ $query = "INSERT INTO ".$wpdb->prefix."formmaker_backup SELECT ".$backup_id." AS backup_id, 1 AS cur, 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;
106
+ $wpdb->query($query);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  }
108
+ $view->edit($backup_id);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  }
110
 
111
  public function form_layout() {
124
 
125
  public function save_layout() {
126
  $message = $this->save_db_layout();
 
127
  $page = WDW_FM_Library::get('page');
128
  $current_id = (int)WDW_FM_Library::get('current_id', 0);
129
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
131
 
132
  public function apply_layout() {
133
  $message = $this->save_db_layout();
 
 
 
 
 
134
  $page = WDW_FM_Library::get('page');
135
  $current_id = (int)WDW_FM_Library::get('current_id', 0);
136
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'form_layout', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
 
137
  }
138
 
139
  public function save_db_layout() {
154
  }
155
 
156
  public function form_options() {
 
 
 
157
  require_once WD_FM_DIR . "/admin/models/FMModelManage_fm.php";
158
  $model = new FMModelManage_fm();
159
 
160
  require_once WD_FM_DIR . "/admin/views/FMViewManage_fm.php";
161
  $view = new FMViewManage_fm($model);
162
+
163
  global $wpdb;
164
  $id = (int)WDW_FM_Library::get('current_id', $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker"));
165
  $view->form_options($id);
166
  }
167
 
168
+ public function display_options() {
169
+ require_once WD_FM_DIR . "/admin/models/FMModelManage_fm.php";
170
+ $model = new FMModelManage_fm();
171
+
172
+ require_once WD_FM_DIR . "/admin/views/FMViewManage_fm.php";
173
+ $view = new FMViewManage_fm($model);
174
+
175
+ global $wpdb;
176
+ $id = (int)WDW_FM_Library::get('current_id', $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker"));
177
+ $view->display_options($id);
178
+ }
179
+
180
  public function save_options() {
181
  $message = $this->save_db_options();
182
  // $this->edit();
185
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
186
  }
187
 
188
+ public function save_display_options() {
189
+ $message = $this->save_dis_options();
190
+ $page = WDW_FM_Library::get('page');
191
+ $current_id = (int)WDW_FM_Library::get('current_id', 0);
192
+ WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
193
+ }
194
+
195
+ public function view_options() {
196
+ if (!isset($_GET['task'])) {
197
+ $this->save_db();
198
+ }
199
+ global $wpdb;
200
+ $page = WDW_FM_Library::get('page');
201
+ $current_id = (int)WDW_FM_Library::get('current_id', $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker"));
202
+ WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'form_options', 'current_id' => $current_id), admin_url('admin.php')));
203
+ }
204
+
205
+ public function view_display_options() {
206
+ if (!isset($_GET['task'])) {
207
+ $this->save_db();
208
+ }
209
+ global $wpdb;
210
+ $page = WDW_FM_Library::get('page');
211
+ $current_id = (int)WDW_FM_Library::get('current_id', $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker"));
212
+ WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display_options', 'current_id' => $current_id), admin_url('admin.php')));
213
+ }
214
+
215
  public function apply_options() {
216
  $message = $this->save_db_options();
 
 
 
 
 
 
 
217
  $page = WDW_FM_Library::get('page');
218
  $current_id = (int)WDW_FM_Library::get('current_id', 0);
219
  $fieldset_id = WDW_FM_Library::get('fieldset_id', 'general');
220
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'form_options', 'current_id' => $current_id, 'message' => $message, 'fieldset_id' => $fieldset_id), admin_url('admin.php')));
221
  }
222
 
223
+ public function apply_display_options() {
224
+ $message = $this->save_dis_options();
225
+ $page = WDW_FM_Library::get('page');
226
+ $current_id = (int)WDW_FM_Library::get('current_id', 0);
227
+ WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display_options', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
228
+ }
229
+
230
  public function remove_query() {
231
  global $wpdb;
232
  $cid = ((isset($_POST['cid']) && $_POST['cid'] != '') ? $_POST['cid'] : NULL);
233
+ if (count($cid)) {
234
  array_walk($cid, create_function('&$value', '$value = (int)$value;'));
235
  $cids = implode(',', $cid);
236
  $query = 'DELETE FROM ' . $wpdb->prefix . 'formmaker_query WHERE id IN ( ' . $cids . ' )';
313
  $user_id_wd = (isset($_POST['user_id_wd']) ? stripslashes($_POST['user_id_wd']) : 'administrator,');
314
  $frontend_submit_fields = (isset($_POST['frontend_submit_fields']) ? stripslashes($_POST['frontend_submit_fields']) : '');
315
  $frontend_submit_stat_fields = (isset($_POST['frontend_submit_stat_fields']) ? stripslashes($_POST['frontend_submit_stat_fields']) : '');
316
+ $mail_emptyfields = (isset($_POST['mail_emptyfields']) ? esc_html(stripslashes($_POST['mail_emptyfields'])) : 0);
317
+ $mail_verify = (isset($_POST['mail_verify']) ? esc_html(stripslashes($_POST['mail_verify'])) : 0);
318
+ $mail_verify_expiretime = (isset($_POST['mail_verify_expiretime']) ? esc_html(stripslashes($_POST['mail_verify_expiretime'])) : '');
319
  $send_to = '';
320
  for ($i = 0; $i < 20; $i++) {
321
  if (isset($_POST['send_to' . $i])) {
332
  }
333
  }
334
  else {
335
+ $submit_text_type = 1;
336
  $article_id = 0;
337
  }
338
 
349
  if(!$mail_verification_post_id || get_post( $mail_verification_post_id )===NULL)
350
  $mail_verification_post_id = wp_insert_post( $email_verification_post );
351
  }
352
+ $paypal_mode = $paypal_mode == 'paypal' ? 1 : 0;
353
  $save = $wpdb->update($wpdb->prefix . 'formmaker', array(
354
  'published' => $published,
355
  'savedb' => $savedb,
391
  'send_to' => $send_to,
392
  'frontend_submit_fields' => $frontend_submit_fields,
393
  'frontend_submit_stat_fields' => $frontend_submit_stat_fields,
394
+ 'mail_emptyfields' => $mail_emptyfields,
395
+ 'mail_verify' => $mail_verify,
396
+ 'mail_verify_expiretime' => $mail_verify_expiretime,
397
+ 'mail_verification_post_id' => $mail_verification_post_id,
398
  ), array('id' => $id));
399
  if ($save !== FALSE) {
400
  $save_theme_in_backup = $wpdb->update($wpdb->prefix . 'formmaker_backup', array(
407
  }
408
  }
409
 
410
+ public function save_dis_options() {
411
+ global $wpdb;
412
+ $id = (int)WDW_FM_Library::get('current_id', 0);
413
+ $scrollbox_loading_delay = (isset($_POST['scrollbox_loading_delay']) ? esc_html(stripslashes($_POST['scrollbox_loading_delay'])) : 0);
414
+ $popover_animate_effect = (isset($_POST['popover_animate_effect']) ? esc_html(stripslashes($_POST['popover_animate_effect'])) : '');
415
+ $popover_loading_delay = (isset($_POST['popover_loading_delay']) ? esc_html(stripslashes($_POST['popover_loading_delay'])) : 0);
416
+ $popover_frequency = (isset($_POST['popover_frequency']) ? esc_html(stripslashes($_POST['popover_frequency'])) : 0);
417
+ $topbar_position = (isset($_POST['topbar_position']) ? esc_html(stripslashes($_POST['topbar_position'])) : 1);
418
+ $topbar_remain_top = (isset($_POST['topbar_remain_top']) ? esc_html(stripslashes($_POST['topbar_remain_top'])) : 1);
419
+ $topbar_closing = (isset($_POST['topbar_closing']) ? esc_html(stripslashes($_POST['topbar_closing'])) : 1);
420
+ $topbar_hide_duration = (isset($_POST['topbar_hide_duration']) ? esc_html(stripslashes($_POST['topbar_hide_duration'])) : 0);
421
+ $scrollbox_position = (isset($_POST['scrollbox_position']) ? esc_html(stripslashes($_POST['scrollbox_position'])) : 1);
422
+ $scrollbox_trigger_point = (isset($_POST['scrollbox_trigger_point']) ? esc_html(stripslashes($_POST['scrollbox_trigger_point'])) : 20);
423
+ $scrollbox_hide_duration = (isset($_POST['scrollbox_hide_duration']) ? esc_html(stripslashes($_POST['scrollbox_hide_duration'])) : 0);
424
+ $scrollbox_auto_hide = (isset($_POST['scrollbox_auto_hide']) ? esc_html(stripslashes($_POST['scrollbox_auto_hide'])) :1);
425
+ $hide_mobile = (isset($_POST['hide_mobile']) ? esc_html(stripslashes($_POST['hide_mobile'])) : 0);
426
+ $scrollbox_closing = (isset($_POST['scrollbox_closing']) ? esc_html(stripslashes($_POST['scrollbox_closing'])) : 1);
427
+ $scrollbox_minimize = (isset($_POST['scrollbox_minimize']) ? esc_html(stripslashes($_POST['scrollbox_minimize'])) : 1);
428
+ $scrollbox_minimize_text = (isset($_POST['scrollbox_minimize_text']) ? esc_html(stripslashes($_POST['scrollbox_minimize_text'])) : '');
429
+
430
+ $type = (isset($_POST['form_type']) ? esc_html(stripslashes($_POST['form_type'])) : 'embadded');
431
+ $display_on = (isset($_POST['display_on']) ? esc_html(implode(',', $_POST['display_on'])) : '');
432
+ $posts_include = (isset($_POST['posts_include']) ? esc_html(stripslashes($_POST['posts_include'])) : '');
433
+ $pages_include = (isset($_POST['pages_include']) ? esc_html(stripslashes($_POST['pages_include'])) : '');
434
+ $display_on_categories = (isset($_POST['display_on_categories']) ? esc_html(implode(',', $_POST['display_on_categories'])) : '');
435
+ $current_categories = (isset($_POST['current_categories']) ? esc_html(stripslashes($_POST['current_categories'])) : '');
436
+ $show_for_admin = (isset($_POST['show_for_admin']) ? esc_html(stripslashes($_POST['show_for_admin'])) : 0);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
437
 
438
+ $save = $wpdb->replace($wpdb->prefix . 'formmaker_display_options', array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
439
  'form_id' => $id,
440
+ 'type' => $type,
441
+ 'scrollbox_loading_delay' => $scrollbox_loading_delay,
442
+ 'popover_animate_effect' => $popover_animate_effect,
443
+ 'popover_loading_delay' => $popover_loading_delay,
444
+ 'popover_frequency' => $popover_frequency,
445
+ 'topbar_position' => $topbar_position,
446
+ 'topbar_remain_top' => $topbar_remain_top,
447
+ 'topbar_closing' => $topbar_closing,
448
+ 'topbar_hide_duration' => $topbar_hide_duration,
449
+ 'scrollbox_position' => $scrollbox_position,
450
+ 'scrollbox_trigger_point' => $scrollbox_trigger_point,
451
+ 'scrollbox_hide_duration' => $scrollbox_hide_duration,
452
+ 'scrollbox_auto_hide' => $scrollbox_auto_hide,
453
+ 'hide_mobile' => $hide_mobile,
454
+ 'scrollbox_closing' => $scrollbox_closing,
455
+ 'scrollbox_minimize' => $scrollbox_minimize,
456
+ 'scrollbox_minimize_text' => $scrollbox_minimize_text,
457
+ 'display_on' => $display_on,
458
+ 'posts_include' => $posts_include,
459
+ 'pages_include' => $pages_include,
460
+ 'display_on_categories' => $display_on_categories,
461
+ 'current_categories' => $current_categories,
462
+ 'show_for_admin' => $show_for_admin,
463
+ ));
464
+
465
+ if ($save !== FALSE) {
466
+ $save_in_backup = $wpdb->update($wpdb->prefix . 'formmaker_backup', array(
467
+ 'type' => $type
468
+ ), array('id' => $id));
469
+
470
+ $save_in_form = $wpdb->update($wpdb->prefix . 'formmaker', array(
471
+ 'type' => $type
472
+ ), array('id' => $id));
473
+ return 8;
474
+ }
475
+ else {
476
+ return 2;
477
+ }
478
+ }
479
 
480
  public function save_as_copy() {
481
  $message = $this->save_db_as_copy();
 
482
  $page = WDW_FM_Library::get('page');
483
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
484
  }
485
 
486
  public function save() {
487
  $message = $this->save_db();
 
488
  $page = WDW_FM_Library::get('page');
489
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
490
  }
491
 
492
  public function apply() {
493
  $message = $this->save_db();
 
494
  global $wpdb;
495
  $id = (int) $wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
496
  $current_id = (int)WDW_FM_Library::get('current_id', $id);
507
  function before_submit() {
508
  // 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.
509
  }
510
+ // Occurs just before resetting the form
511
  function before_reset() {
512
  }";
513
  $id = (int)WDW_FM_Library::get('current_id', 0);
514
  $title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
515
+ $theme = (isset($_POST['theme']) ? esc_html(stripslashes($_POST['theme'])) : $wpdb->get_var("SELECT id FROM " . $wpdb->prefix . "formmaker_themes WHERE `default`='1'"));
516
  $form_front = (isset($_POST['form_front']) ? stripslashes($_POST['form_front']) : '');
517
  $sortable = (isset($_POST['sortable']) ? stripslashes($_POST['sortable']) : 1);
518
  $counter = (isset($_POST['counter']) ? esc_html(stripslashes($_POST['counter'])) : 0);
525
  $recaptcha_theme = (isset($_POST['recaptcha_theme']) ? esc_html(stripslashes($_POST['recaptcha_theme'])) : '');
526
  $label_order_current = (isset($_POST['label_order_current']) ? esc_html(stripslashes($_POST['label_order_current'])) : '');
527
  $form_fields = (isset($_POST['form_fields']) ? stripslashes($_POST['form_fields']) : '');
528
+
529
+ $header_title = (isset($_POST['header_title']) ? esc_html(stripslashes($_POST['header_title'])) : '');
530
+ $header_description = (isset($_POST['header_description']) ? htmlspecialchars_decode(esc_html(stripslashes($_POST['header_description']))) : '');
531
+ $header_image_url = (isset($_POST['header_image_url']) ? esc_html(stripslashes($_POST['header_image_url'])) : '');
532
+ $header_image_animation = (isset($_POST['header_image_animation']) ? esc_html(stripslashes($_POST['header_image_animation'])) : '');
533
+ $header_hide_image = (isset($_POST['header_hide_image']) ? esc_html(stripslashes($_POST['header_hide_image'])) : 0);
534
+ $type = (isset($_POST['form_type']) ? esc_html(stripslashes($_POST['form_type'])) : 'embedded');
535
+ $scrollbox_minimize_text = $header_title ? $header_title : 'The form is minimized.';
536
+
537
  if ($id != 0) {
538
  $save = $wpdb->update($wpdb->prefix . 'formmaker', array(
539
  'title' => $title,
550
  'private_key' => $private_key,
551
  'recaptcha_theme' => $recaptcha_theme,
552
  'form_fields' => $form_fields,
553
+ 'header_title' => $header_title,
554
+ 'header_description' => $header_description,
555
+ 'header_image_url' => $header_image_url,
556
+ 'header_image_animation' => $header_image_animation,
557
+ 'header_hide_image' => $header_hide_image,
558
  ), array('id' => $id));
559
  }
560
  else {
561
  $save = $wpdb->insert($wpdb->prefix . 'formmaker', array(
562
  'title' => $title,
563
+ 'type' => $type,
564
  'mail' => '',
565
  'form_front' => $form_front,
566
  'theme' => $theme,
576
  'submit_text' => '',
577
  'url' => '',
578
  'article_id' => 0,
579
+ 'submit_text_type' => 1,
580
  'script_mail' => '%all%',
581
  'script_mail_user' => '%all%',
582
  'label_order_current' => $label_order_current,
615
  'frontend_submit_fields' => '',
616
  'frontend_submit_stat_fields' => '',
617
  'save_uploads' => 1,
618
+
619
+ 'header_title' => $header_title,
620
+ 'header_description' => $header_description,
621
+ 'header_image_url' => $header_image_url,
622
+ 'header_image_animation' => $header_image_animation,
623
+ 'header_hide_image' => $header_hide_image,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
624
  ));
625
  $id = (int)$wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
626
  // $_POST['current_id'] = $id;
627
+ $save_display_options = $wpdb->insert($wpdb->prefix . 'formmaker_display_options', array(
628
+ 'form_id' => $id,
629
+ 'type' => $type,
630
+ 'scrollbox_loading_delay' => 0,
631
+ 'popover_animate_effect' => '',
632
+ 'popover_loading_delay' => 0,
633
+ 'popover_frequency' => 0,
634
+ 'topbar_position' => 1,
635
+ 'topbar_remain_top' => 1,
636
+ 'topbar_closing' => 1,
637
+ 'topbar_hide_duration' => 0,
638
+ 'scrollbox_position' => 1,
639
+ 'scrollbox_trigger_point' => 20,
640
+ 'scrollbox_hide_duration' => 0,
641
+ 'scrollbox_auto_hide' => 1,
642
+ 'hide_mobile' => 0,
643
+ 'scrollbox_closing' => 1,
644
+ 'scrollbox_minimize' => 1,
645
+ 'scrollbox_minimize_text' => $scrollbox_minimize_text,
646
+ 'display_on' => 'home,post,page',
647
+ 'posts_include' => '',
648
+ 'pages_include' => '',
649
+ 'display_on_categories' => '',
650
+ 'current_categories' => '',
651
+ 'show_for_admin' => 0,
652
+ ), array(
653
+ '%d',
654
+ '%s',
655
+ '%d',
656
+ '%s',
657
+ '%d',
658
+ '%d',
659
+ '%d',
660
+ '%d',
661
+ '%d',
662
+ '%d',
663
+ '%d',
664
+ '%d',
665
+ '%d',
666
+ '%d',
667
+ '%d',
668
+ '%d',
669
+ '%d',
670
+ '%s',
671
+ '%s',
672
+ '%s',
673
+ '%s',
674
+ '%s',
675
+ '%s',
676
+ '%d',
677
+ ));
678
  $wpdb->insert($wpdb->prefix . 'formmaker_views', array(
679
  'form_id' => $id,
680
  'views' => 0
716
  'private_key' => $private_key,
717
  'recaptcha_theme' => $recaptcha_theme,
718
  'form_fields' => $form_fields,
719
+ 'header_title' => $header_title,
720
+ 'header_description' => $header_description,
721
+ 'header_image_url' => $header_image_url,
722
+ 'header_image_animation' => $header_image_animation,
723
+ 'header_hide_image' => $header_hide_image,
724
  ), array('backup_id' => $backup_id));
725
 
726
 
754
  'submit_text' => '',
755
  'url' => '',
756
  'article_id' => 0,
757
+ 'submit_text_type' => 1,
758
  'script_mail' => '%all%',
759
  'script_mail_user' => '%all%',
760
  'label_order_current' => $label_order_current,
792
  'user_id_wd' => 'administrator,',
793
  'frontend_submit_fields' => '',
794
  'frontend_submit_stat_fields' => '',
795
+ 'header_title' => $header_title,
796
+ 'header_description' => $header_description,
797
+ 'header_image_url' => $header_image_url,
798
+ 'header_image_animation' => $header_image_animation,
799
+ 'header_hide_image' => $header_hide_image,
800
  ), array(
801
  '%d',
802
  '%d',
854
  '%s',
855
  '%s',
856
  '%s',
857
+ '%s',
858
+ '%s',
859
+ '%s',
860
+ '%s',
861
+ '%d',
862
  )) ;
863
 
864
  $query = "SELECT count(backup_id) FROM ".$wpdb->prefix."formmaker_backup WHERE id = ".$id;
879
 
880
  public function save_db_as_copy() {
881
  global $wpdb;
 
882
  $id = (int)WDW_FM_Library::get('current_id', 0);
883
  $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $id));
884
+ require_once WD_FM_DIR . "/admin/models/FMModelManage_fm.php";
885
+ $model = new FMModelManage_fm();
886
+ $row_display = $model->get_display_options($id);
887
  $title = (isset($_POST['title']) ? esc_html(stripslashes($_POST['title'])) : '');
888
+ $theme = (isset($_POST['theme']) ? esc_html(stripslashes($_POST['theme'])) : 0);
889
  $form_front = (isset($_POST['form_front']) ? stripslashes($_POST['form_front']) : '');
890
  $sortable = (isset($_POST['sortable']) ? stripslashes($_POST['sortable']) : 1);
891
  $counter = (isset($_POST['counter']) ? esc_html(stripslashes($_POST['counter'])) : 0);
901
 
902
  $save = $wpdb->insert($wpdb->prefix . 'formmaker', array(
903
  'title' => $title,
904
+ 'type' => $row->type,
905
  'mail' => $row->mail,
906
  'form_front' => $form_front,
907
+ 'theme' => $theme,
908
  'counter' => $counter,
909
  'label_order' => $label_order,
910
  'pagination' => $pagination,
956
  'frontend_submit_fields' => $row->frontend_submit_fields,
957
  'frontend_submit_stat_fields' => $row->frontend_submit_stat_fields,
958
  'save_uploads' => $row->save_uploads,
959
+
960
+ 'header_title' => $row->header_title,
961
+ 'header_description' => $row->header_description,
962
+ 'header_image_url' => $row->header_image_url,
963
+ 'header_image_animation' => $row->header_image_animation,
964
+ 'header_hide_image' => $row->header_hide_image,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
965
  ));
966
  $new_id = (int)$wpdb->get_var("SELECT MAX(id) FROM " . $wpdb->prefix . "formmaker");
967
+ $save = $wpdb->insert($wpdb->prefix . 'formmaker_display_options', array(
968
+ 'form_id' => $new_id,
969
+ 'type' => $row_display->type,
970
+ 'scrollbox_loading_delay' => $row_display->scrollbox_loading_delay,
971
+ 'popover_animate_effect' => $row_display->popover_animate_effect,
972
+ 'popover_loading_delay' => $row_display->popover_loading_delay,
973
+ 'popover_frequency' => $row_display->popover_frequency,
974
+ 'topbar_position' => $row_display->topbar_position,
975
+ 'topbar_remain_top' => $row_display->topbar_remain_top,
976
+ 'topbar_closing' => $row_display->topbar_closing,
977
+ 'topbar_hide_duration' => $row_display->topbar_hide_duration,
978
+ 'scrollbox_position' => $row_display->scrollbox_position,
979
+ 'scrollbox_trigger_point' => $row_display->scrollbox_trigger_point,
980
+ 'scrollbox_hide_duration' => $row_display->scrollbox_hide_duration,
981
+ 'scrollbox_auto_hide' => $row_display->scrollbox_auto_hide,
982
+ 'hide_mobile' => $row_display->hide_mobile,
983
+ 'scrollbox_closing' => $row_display->scrollbox_closing,
984
+ 'scrollbox_minimize' => $row_display->scrollbox_minimize,
985
+ 'scrollbox_minimize_text' => $row_display->scrollbox_minimize_text,
986
+ 'display_on' => $row_display->display_on,
987
+ 'posts_include' => $row_display->posts_include,
988
+ 'pages_include' => $row_display->pages_include,
989
+ 'display_on_categories' => $row_display->display_on_categories,
990
+ 'current_categories' => $row_display->current_categories,
991
+ 'show_for_admin' => $row_display->show_for_admin,
992
+ ), array(
993
+ '%d',
994
+ '%s',
995
+ '%d',
996
+ '%s',
997
+ '%d',
998
+ '%d',
999
+ '%d',
1000
+ '%d',
1001
+ '%d',
1002
+ '%d',
1003
+ '%d',
1004
+ '%d',
1005
+ '%d',
1006
+ '%d',
1007
+ '%d',
1008
+ '%d',
1009
+ '%d',
1010
+ '%s',
1011
+ '%s',
1012
+ '%s',
1013
+ '%s',
1014
+ '%s',
1015
+ '%s',
1016
+ '%d'
1017
+ ));
1018
  $wpdb->insert($wpdb->prefix . 'formmaker_views', array(
1019
  'form_id' => $new_id,
1020
  'views' => 0
1023
  '%d'
1024
  ));
1025
  if ($save !== FALSE) {
1026
+ $addons = array('WD_FM_EMAIL_COND' => 'Conditional Emails', 'WD_FM_PDF' => 'PDF Integration', 'WD_FM_SAVE_PROG' => 'Save Form Progress', 'WD_FM_CALCULATOR' => 'Calculator');
1027
+ $addons_array = array();
1028
+ foreach($addons as $addon => $addon_name) {
1029
+ if (defined($addon) && is_plugin_active(constant($addon))) {
1030
+ $_GET['addon_task'] = 'save_as_copy';
1031
+ $_GET['form_id'] = $id;
1032
+ $_GET['form_id_new'] = $new_id;
1033
+ do_action($addon.'_init');
1034
+ }
1035
+ }
1036
  return 1;
1037
  }
1038
  else {
1046
  if ($wpdb->query($query)) {
1047
  $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_views WHERE form_id="%d"', $id));
1048
  $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE form_id="%d"', $id));
1049
+ $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_sessions WHERE form_id="%d"', $id));
1050
+ $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_backup WHERE id="%d"', $id));
1051
+ $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_display_options WHERE form_id="%d"', $id));
1052
+ $addons = array('WD_FM_EMAIL_COND' => 'Conditional Emails', 'WD_FM_PDF' => 'PDF Integration', 'WD_FM_SAVE_PROG' => 'Save Form Progress', 'WD_FM_CALCULATOR' => 'Calculator');
1053
+ $addons_array = array();
1054
+ foreach($addons as $addon => $addon_name) {
1055
+ if (defined($addon) && is_plugin_active(constant($addon))) {
1056
+ $_GET['addon_task'] = 'delete';
1057
+ $_GET['form_id'] = $id;
1058
+ do_action($addon.'_init');
1059
+ }
1060
+ }
1061
  $message = 3;
1062
  }
1063
  else {
1064
  $message = 2;
1065
  }
 
1066
  $page = WDW_FM_Library::get('page');
1067
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
1068
  }
1078
  $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $form_id));
1079
  $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_views WHERE form_id="%d"', $form_id));
1080
  $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE form_id="%d"', $form_id));
1081
+ $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_sessions WHERE form_id="%d"', $form_id));
1082
+ $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_backup WHERE id="%d"', $form_id));
1083
+ $wpdb->query($wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_display_options WHERE form_id="%d"', $form_id));
1084
  }
1085
  }
1086
  if ($flag) {
1089
  else {
1090
  $message = 6;
1091
  }
 
1092
  $page = WDW_FM_Library::get('page');
1093
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
1094
  }
1095
 
1096
+ public function fm_live_search() {
1097
+ $search_string = ! empty( $_POST['pp_live_search'] ) ? sanitize_text_field( $_POST['pp_live_search'] ) : '';
1098
+ $post_type = ! empty( $_POST['pp_post_type'] ) ? sanitize_text_field( $_POST['pp_post_type'] ) : 'any';
1099
+ $full_content = ! empty( $_POST['pp_full_content'] ) ? sanitize_text_field( $_POST['pp_full_content'] ) : 'true';
1100
+
1101
+ $args['s'] = $search_string;
1102
+
1103
+ $results = $this->fm_posts_query( $args, $post_type );
1104
+ /* if ('true' === $full_content) { */
1105
+ $output = '<ul class="pp_search_results">';
1106
+ /* } else {
1107
+ $output = '';
1108
+ } */
1109
+
1110
+ if (empty($results)) {
1111
+ /* if ( 'true' === $full_content ) { */
1112
+ $output .= sprintf(
1113
+ '<li class="pp_no_res">%1$s</li>',
1114
+ esc_html__( 'No results found', 'fm-text' )
1115
+ );
1116
+ /* } */
1117
+ } else {
1118
+ foreach( $results as $single_post ) {
1119
+ $output .= sprintf(
1120
+ '<li data-post_id="%2$s">[%3$s] - %1$s</li>',
1121
+ esc_html( $single_post['title'] ),
1122
+ esc_attr( $single_post['id'] ),
1123
+ esc_html( $single_post['post_type'] )
1124
+ );
1125
+ }
1126
+ }
1127
+
1128
+ /* if ( 'true' === $full_content ) { */
1129
+ $output .= '</ul>';
1130
+ /* } */
1131
+
1132
+ die( $output );
1133
+ }
1134
+
1135
+ public function fm_posts_query( $args = array(), $include_post_type = '' ) {
1136
+ if ( 'only_pages' === $include_post_type ) {
1137
+ $pt_names = array( 'page' );
1138
+ } elseif ( 'any' === $include_post_type || 'only_posts' === $include_post_type ) {
1139
+ $default_post_types = array( 'post', 'page' );
1140
+ $custom_post_types = get_post_types( array(
1141
+ 'public' => true,
1142
+ '_builtin' => false,
1143
+ ) );
1144
+
1145
+ $post_types = array_merge($default_post_types, $custom_post_types);
1146
+ $pt_names = array_values($post_types);
1147
+
1148
+ if ( 'only_posts' === $include_post_type ) {
1149
+ unset($pt_names[1]);
1150
+ }
1151
+ } else {
1152
+ $pt_names = $include_post_type;
1153
+ }
1154
+
1155
+ $query = array(
1156
+ 'post_type' => $pt_names,
1157
+ 'suppress_filters' => true,
1158
+ 'update_post_term_cache' => false,
1159
+ 'update_post_meta_cache' => false,
1160
+ 'post_status' => 'publish',
1161
+ 'posts_per_page' => -1,
1162
+ );
1163
+
1164
+ if ( isset( $args['s'] ) ) {
1165
+ $query['s'] = $args['s'];
1166
+ }
1167
+
1168
+ $get_posts = new WP_Query;
1169
+ $posts = $get_posts->query( $query );
1170
+ if ( ! $get_posts->post_count ) {
1171
+ return false;
1172
+ }
1173
+
1174
+ $results = array();
1175
+ foreach ($posts as $post) {
1176
+ $results[] = array(
1177
+ 'id' => (int) $post->ID,
1178
+ 'title' => trim( esc_html( strip_tags( get_the_title( $post ) ) ) ),
1179
+ 'post_type' => $post->post_type,
1180
+ );
1181
+ }
1182
+
1183
+ wp_reset_postdata();
1184
+
1185
+ return $results;
1186
+ }
1187
+
1188
  ////////////////////////////////////////////////////////////////////////////////////////
1189
  // Getters & Setters //
1190
  ////////////////////////////////////////////////////////////////////////////////////////
admin/controllers/FMControllerSubmissions_fm.php CHANGED
@@ -1,87 +1,74 @@
1
  <?php
2
 
3
  class FMControllerSubmissions_fm {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
- public function execute() {
22
- $task = ((isset($_POST['task'])) ? esc_html($_POST['task']) : '');
23
- $id = ((isset($_POST['current_id'])) ? (int)esc_html($_POST['current_id']) : 0);
24
- $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
25
-
26
- if (method_exists($this, $task)) {
27
- if($task != 'show_stats')
28
- check_admin_referer('nonce_fm', 'nonce_fm');
29
- else
30
- check_ajax_referer('nonce_fm_ajax', 'nonce_fm_ajax');
31
- $this->$task($id);
32
- }
33
- else {
34
- $this->display($form_id);
35
- }
36
- }
37
 
38
- public function display($form_id) {
39
- $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
40
- require_once WD_FM_DIR . "/admin/models/FMModelSubmissions_fm.php";
41
- $model = new FMModelSubmissions_fm();
42
-
43
- require_once WD_FM_DIR . "/admin/views/FMViewSubmissions_fm.php";
44
- $view = new FMViewSubmissions_fm($model);
45
- $view->display($form_id);
46
- }
47
-
48
- public function show_stats() {
49
 
50
- $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
51
- require_once WD_FM_DIR . "/admin/models/FMModelSubmissions_fm.php";
52
- $model = new FMModelSubmissions_fm();
 
53
 
54
- require_once WD_FM_DIR . "/admin/views/FMViewSubmissions_fm.php";
55
- $view = new FMViewSubmissions_fm($model);
56
- $view->show_stats($form_id);
57
- }
58
 
59
- public function edit() {
60
- global $wpdb;
61
- require_once WD_FM_DIR . "/admin/models/FMModelSubmissions_fm.php";
62
- $model = new FMModelSubmissions_fm();
63
 
64
- require_once WD_FM_DIR . "/admin/views/FMViewSubmissions_fm.php";
65
- $view = new FMViewSubmissions_fm($model);
66
- $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? (int) $_POST['current_id'] : 0);
67
-
68
- $form_id = (int)$wpdb->get_var("SELECT form_id FROM " . $wpdb->prefix . "formmaker_submits WHERE group_id='" . $id . "'");
69
- $form = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id='" . $form_id . "'");
70
 
71
- if (isset($form->form)) {
72
- $old = TRUE;
73
- }
74
- else {
75
- $old = FALSE;
76
- }
77
 
78
- if ($old == FALSE || ($old == TRUE && $form->form == '')) {
79
- $view->new_edit($id, $form_id);
80
- }
81
- else {
82
- $view->edit($id);
83
- }
84
- }
85
 
86
  public function save() {
87
  $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
@@ -135,7 +122,6 @@ class FMControllerSubmissions_fm {
135
  $i=$label_id[$key];
136
  $id = 'form_id_temp';
137
  switch ($type) {
138
-
139
  case 'type_text':
140
  case 'type_password':
141
  case 'type_textarea':
@@ -143,8 +129,8 @@ class FMControllerSubmissions_fm {
143
  case "type_date":
144
  case "type_own_select":
145
  case "type_country":
146
- case "type_number":
147
- case "type_phone_new": {
148
  $value = (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL);
149
  break;
150
  }
@@ -160,7 +146,6 @@ class FMControllerSubmissions_fm {
160
 
161
  break;
162
  }
163
-
164
  case "type_date_new":{
165
  $value = isset($_POST['wdform_'.$i."_element".$id]) ? esc_html($_POST['wdform_'.$i."_element".$id]) : "";
166
 
@@ -171,8 +156,7 @@ class FMControllerSubmissions_fm {
171
  $value = (isset($_POST['wdform_'.$i."_element".$id."0"]) ? esc_html($_POST['wdform_'.$i."_element".$id."0"]) : "").' - '.(isset($_POST['wdform_'.$i."_element".$id."1"]) ? esc_html($_POST['wdform_'.$i."_element".$id."1"]) : "");
172
 
173
  break;
174
- }
175
-
176
  case "type_date_fields": {
177
  $day = (isset($_POST['wdform_'.$i."_day".$id]) ? $_POST['wdform_'.$i."_day".$id] : NULL);
178
  $month = (isset($_POST['wdform_'.$i."_month".$id]) ? $_POST['wdform_'.$i."_month".$id] : NULL);
@@ -333,18 +317,25 @@ class FMControllerSubmissions_fm {
333
  break;
334
  }
335
 
 
 
 
 
 
336
  case "type_paypal_select": {
337
-
338
- if((isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : NULL))
339
- $value = (isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : NULL) . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL) . $form_currency;
340
- else
341
- $value = '';
342
-
343
- $element_quantity = (isset($_POST['wdform_'.$i."element_quantity".$id]) ? $_POST['wdform_'.$i."element_quantity".$id] : NULL);
344
- if(isset($element_quantity) && $value!='')
345
- $value .= '***br***' . (isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : NULL) . ': ' . (isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL);
346
-
347
-
 
 
348
  for($k=0; $k<50; $k++) {
349
  $temp_val = (isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL);
350
  if(isset($temp_val) && $value!='') {
@@ -358,7 +349,7 @@ class FMControllerSubmissions_fm {
358
  case "type_paypal_radio": {
359
 
360
  if((isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : NULL))
361
- $value = (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL) . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL) . $form_currency;
362
  else
363
  $value='';
364
 
@@ -382,11 +373,10 @@ class FMControllerSubmissions_fm {
382
  case "type_paypal_shipping": {
383
 
384
  if((isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : NULL))
385
- $value = (isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : NULL) . ' : ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL) . $form_currency;
386
  else
387
- $value='';
388
- $value = (isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : NULL) . ' - ' . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL);
389
-
390
  $paypal['shipping'] = (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL);
391
 
392
  break;
@@ -415,15 +405,8 @@ class FMControllerSubmissions_fm {
415
  for($j=$start; $j<100; $j++) {
416
  $element = (isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL);
417
  if(isset($element))
418
- if($j==$other_element_id) {
419
- $value = $value . (isset($_POST['wdform_'.$i."_other_input".$id]) ? $_POST['wdform_'.$i."_other_input".$id] : NULL) . '***br***';
420
-
421
- }
422
- else {
423
-
424
- $value = $value . (isset($_POST['wdform_'.$i."_element".$id.$j."_label"]) ? $_POST['wdform_'.$i."_element".$id.$j."_label"] : NULL) . ' - ' . ((isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL) == '' ? '0' : (isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL)) . $form_currency . '***br***';
425
 
426
- }
427
  }
428
 
429
  $element_quantity = (isset($_POST['wdform_'.$i."element_quantity".$id]) ? $_POST['wdform_'.$i."element_quantity".$id] : NULL);
@@ -685,28 +668,17 @@ class FMControllerSubmissions_fm {
685
  global $wpdb;
686
  $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
687
  $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id="%d"', $id);
688
- // $elements_col = $wpdb->get_col($wpdb->prepare('SELECT element_value FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id="%d"', $id));
689
  if ($wpdb->query($query)) {
690
- // foreach ($elements_col as $element_value) {
691
- // $destination = str_replace(site_url() . '/', '', $element_value);
692
- // $destination = str_replace('*@@url@@*', '', $destination);
693
- // if ($destination) {
694
- // $destination = ABSPATH . $destination;
695
- // if (file_exists($destination)) {
696
- // unlink($destination);
697
- // }
698
- // }
699
- // }
700
  echo WDW_FM_Library::message('Item Succesfully Deleted.', 'updated');
701
  }
702
  else {
703
  echo WDW_FM_Library::message('Error. Please install plugin again.', 'error');
704
  }
705
-
706
- $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_sessions WHERE form_id="%d" AND group_id="%d"', $form_id, $id);
707
- $wpdb->query($query);
708
 
709
- $this->display($form_id);
 
 
 
710
  }
711
 
712
  public function delete_all() {
@@ -717,9 +689,8 @@ class FMControllerSubmissions_fm {
717
  array_walk($cid, create_function('&$value', '$value = (int)$value;'));
718
  $cids = implode(',', $cid);
719
  $query = 'DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id IN ( ' . $cids . ' )';
720
- // $elements_col = $wpdb->get_col('SELECT element_value FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id IN ( ' . $cids . ' )');
721
  if ($wpdb->query($query)) {
722
-
723
  echo WDW_FM_Library::message('Items Succesfully Deleted.', 'updated');
724
  }
725
  else {
1
  <?php
2
 
3
  class FMControllerSubmissions_fm {
4
+ ////////////////////////////////////////////////////////////////////////////////////////
5
+ // Events //
6
+ ////////////////////////////////////////////////////////////////////////////////////////
7
+ ////////////////////////////////////////////////////////////////////////////////////////
8
+ // Constants //
9
+ ////////////////////////////////////////////////////////////////////////////////////////
10
+ ////////////////////////////////////////////////////////////////////////////////////////
11
+ // Variables //
12
+ ////////////////////////////////////////////////////////////////////////////////////////
13
+ ////////////////////////////////////////////////////////////////////////////////////////
14
+ // Constructor & Destructor //
15
+ ////////////////////////////////////////////////////////////////////////////////////////
16
+ public function __construct() {
17
+ }
18
+ ////////////////////////////////////////////////////////////////////////////////////////
19
+ // Public Methods //
20
+ ////////////////////////////////////////////////////////////////////////////////////////
21
+ public function execute() {
22
+ $task = ((isset($_POST['task'])) ? esc_html($_POST['task']) : '');
23
+ $id = ((isset($_POST['current_id'])) ? (int)esc_html($_POST['current_id']) : 0);
24
+ $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
25
+
26
+ if (method_exists($this, $task)) {
27
+ if($task != 'show_stats')
28
+ check_admin_referer('nonce_fm', 'nonce_fm');
29
+ else
30
+ check_ajax_referer('nonce_fm_ajax', 'nonce_fm_ajax');
31
+ $this->$task($id);
32
+ }
33
+ else {
34
+ $this->display($form_id);
35
+ }
36
+ }
37
 
38
+ public function display($form_id) {
39
+ $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
40
+ require_once WD_FM_DIR . "/admin/models/FMModelSubmissions_fm.php";
41
+ $model = new FMModelSubmissions_fm();
 
 
 
 
 
 
 
42
 
43
+ require_once WD_FM_DIR . "/admin/views/FMViewSubmissions_fm.php";
44
+ $view = new FMViewSubmissions_fm($model);
45
+ $view->display($form_id);
46
+ }
47
 
48
+ public function show_stats() {
49
+ $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
50
+ require_once WD_FM_DIR . "/admin/models/FMModelSubmissions_fm.php";
51
+ $model = new FMModelSubmissions_fm();
52
 
53
+ require_once WD_FM_DIR . "/admin/views/FMViewSubmissions_fm.php";
54
+ $view = new FMViewSubmissions_fm($model);
55
+ $view->show_stats($form_id);
56
+ }
57
 
58
+ public function edit() {
59
+ global $wpdb;
60
+ require_once WD_FM_DIR . "/admin/models/FMModelSubmissions_fm.php";
61
+ $model = new FMModelSubmissions_fm();
 
 
62
 
63
+ require_once WD_FM_DIR . "/admin/views/FMViewSubmissions_fm.php";
64
+ $view = new FMViewSubmissions_fm($model);
65
+ $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? (int) $_POST['current_id'] : 0);
66
+
67
+ $form_id = (int)$wpdb->get_var("SELECT form_id FROM " . $wpdb->prefix . "formmaker_submits WHERE group_id='" . $id . "'");
68
+ $form = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "formmaker WHERE id='" . $form_id . "'");
69
 
70
+ $view->edit($id);
71
+ }
 
 
 
 
 
72
 
73
  public function save() {
74
  $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
122
  $i=$label_id[$key];
123
  $id = 'form_id_temp';
124
  switch ($type) {
 
125
  case 'type_text':
126
  case 'type_password':
127
  case 'type_textarea':
129
  case "type_date":
130
  case "type_own_select":
131
  case "type_country":
132
+ case "type_phone_new":
133
+ case "type_number": {
134
  $value = (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL);
135
  break;
136
  }
146
 
147
  break;
148
  }
 
149
  case "type_date_new":{
150
  $value = isset($_POST['wdform_'.$i."_element".$id]) ? esc_html($_POST['wdform_'.$i."_element".$id]) : "";
151
 
156
  $value = (isset($_POST['wdform_'.$i."_element".$id."0"]) ? esc_html($_POST['wdform_'.$i."_element".$id."0"]) : "").' - '.(isset($_POST['wdform_'.$i."_element".$id."1"]) ? esc_html($_POST['wdform_'.$i."_element".$id."1"]) : "");
157
 
158
  break;
159
+ }
 
160
  case "type_date_fields": {
161
  $day = (isset($_POST['wdform_'.$i."_day".$id]) ? $_POST['wdform_'.$i."_day".$id] : NULL);
162
  $month = (isset($_POST['wdform_'.$i."_month".$id]) ? $_POST['wdform_'.$i."_month".$id] : NULL);
317
  break;
318
  }
319
 
320
+ case "type_paypal_price_new": {
321
+
322
+ $value = isset($_POST['wdform_'.$i."_element".$id]) ? $form_currency.$_POST['wdform_'.$i."_element".$id] : $form_currency.'0';
323
+ break;
324
+ }
325
  case "type_paypal_select": {
326
+
327
+ if(isset($_POST['wdform_'.$i."_element".$id]) && $_POST['wdform_'.$i."_element".$id]) {
328
+ $value = (isset($_POST['wdform_'.$i."_element_label".$id]) && $_POST['wdform_'.$i."_element_label".$id] ? $_POST['wdform_'.$i."_element_label".$id] : '' ) . ' : ' . $form_currency . $_POST['wdform_'.$i."_element".$id];
329
+ }
330
+ else {
331
+ $value = '';
332
+ }
333
+
334
+
335
+ $element_quantity = isset($_POST['wdform_'.$i."_element_quantity".$id]) ? $_POST['wdform_'.$i."_element_quantity".$id] : NULL;
336
+ if(isset($element_quantity) && $value != '') {
337
+ $value .= '***br***' . (isset($_POST['wdform_'.$i."_element_quantity_label".$id]) ? $_POST['wdform_'.$i."_element_quantity_label".$id] : "") . ': ' . $_POST['wdform_'.$i."_element_quantity".$id] . '***quantity***';
338
+ }
339
  for($k=0; $k<50; $k++) {
340
  $temp_val = (isset($_POST['wdform_'.$i."_property".$id.$k]) ? $_POST['wdform_'.$i."_property".$id.$k] : NULL);
341
  if(isset($temp_val) && $value!='') {
349
  case "type_paypal_radio": {
350
 
351
  if((isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : NULL))
352
+ $value = (isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : NULL) . ' : ' . $form_currency . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL);
353
  else
354
  $value='';
355
 
373
  case "type_paypal_shipping": {
374
 
375
  if((isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : NULL))
376
+ $value = (isset($_POST['wdform_'.$i."_element_label".$id]) ? $_POST['wdform_'.$i."_element_label".$id] : NULL) . ' : ' . $form_currency . (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL);
377
  else
378
+ $value='';
379
+
 
380
  $paypal['shipping'] = (isset($_POST['wdform_'.$i."_element".$id]) ? $_POST['wdform_'.$i."_element".$id] : NULL);
381
 
382
  break;
405
  for($j=$start; $j<100; $j++) {
406
  $element = (isset($_POST['wdform_'.$i."_element".$id.$j]) ? $_POST['wdform_'.$i."_element".$id.$j] : NULL);
407
  if(isset($element))
408
+ $value = $value . (isset($_POST['wdform_'.$i."_element".$id.$j."_label"]) ? $_POST['wdform_'.$i."_element".$id.$j."_label"] : NULL) . ' - ' . $form_currency . (isset($_POST['wdform_'.$i."_element".$id.$j]) && $_POST['wdform_'.$i."_element".$id.$j] ? $_POST['wdform_'.$i."_element".$id.$j] : 0 ). '***br***';
 
 
 
 
 
 
409
 
 
410
  }
411
 
412
  $element_quantity = (isset($_POST['wdform_'.$i."element_quantity".$id]) ? $_POST['wdform_'.$i."element_quantity".$id] : NULL);
668
  global $wpdb;
669
  $form_id = ((isset($_POST['form_id']) && esc_html($_POST['form_id']) != '') ? (int)esc_html($_POST['form_id']) : 0);
670
  $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id="%d"', $id);
 
671
  if ($wpdb->query($query)) {
 
 
 
 
 
 
 
 
 
 
672
  echo WDW_FM_Library::message('Item Succesfully Deleted.', 'updated');
673
  }
674
  else {
675
  echo WDW_FM_Library::message('Error. Please install plugin again.', 'error');
676
  }
 
 
 
677
 
678
+ $query = $wpdb->prepare('DELETE FROM ' . $wpdb->prefix . 'formmaker_sessions WHERE form_id="%d" AND group_id="%d"', $form_id, $id);
679
+ $wpdb->query($query);
680
+
681
+ $this->display($form_id);
682
  }
683
 
684
  public function delete_all() {
689
  array_walk($cid, create_function('&$value', '$value = (int)$value;'));
690
  $cids = implode(',', $cid);
691
  $query = 'DELETE FROM ' . $wpdb->prefix . 'formmaker_submits WHERE group_id IN ( ' . $cids . ' )';
692
+
693
  if ($wpdb->query($query)) {
 
694
  echo WDW_FM_Library::message('Items Succesfully Deleted.', 'updated');
695
  }
696
  else {
admin/controllers/FMControllerThemes_fm.php CHANGED
@@ -1,23 +1,7 @@
1
  <?php
2
 
3
  class FMControllerThemes_fm {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
  public function execute() {
22
  $task = WDW_FM_Library::get('task');
23
  $id = (int)WDW_FM_Library::get('current_id', 0);
@@ -56,14 +40,12 @@ class FMControllerThemes_fm {
56
 
57
  require_once WD_FM_DIR . "/admin/views/FMViewThemes_fm.php";
58
  $view = new FMViewThemes_fm($model);
59
- // $id = ((isset($_POST['current_id']) && esc_html($_POST['current_id']) != '') ? esc_html($_POST['current_id']) : 0);
60
  $id = (int)WDW_FM_Library::get('current_id', 0);
61
  $view->edit($id, FALSE);
62
  }
63
 
64
  public function save() {
65
  $message = $this->save_db();
66
- // $this->display();
67
  $page = WDW_FM_Library::get('page');
68
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
69
  }
@@ -71,42 +53,85 @@ class FMControllerThemes_fm {
71
  public function apply() {
72
  $message = $this->save_db();
73
  global $wpdb;
74
- // if (!isset($_POST['current_id']) || (esc_html($_POST['current_id']) == 0) || (esc_html($_POST['current_id']) == '')) {
75
-
76
- // }
77
  $id = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'formmaker_themes');
78
  $current_id = (int)WDW_FM_Library::get('current_id', $id);
79
  $page = WDW_FM_Library::get('page');
80
- WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message), admin_url('admin.php')));
81
- // $this->edit();
 
 
82
  }
83
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  public function save_db() {
85
  global $wpdb;
86
- // $id = (isset($_POST['current_id']) ? (int) esc_html(stripslashes( $_POST['current_id'])) : 0);
87
  $id = (int) WDW_FM_Library::get('current_id', 0);
88
  $title = (isset($_POST['title']) ? esc_html(stripslashes( $_POST['title'])) : '');
89
- $css = (isset($_POST['css']) ? stripslashes(preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $_POST['css'])) : '');
 
90
  $default = (isset($_POST['default']) ? esc_html(stripslashes( $_POST['default'])) : 0);
91
  if ($id != 0) {
92
  $save = $wpdb->update($wpdb->prefix . 'formmaker_themes', array(
93
  'title' => $title,
94
- 'css' => $css,
95
  'default' => $default,
96
  ), array('id' => $id));
 
97
  }
98
  else {
99
  $save = $wpdb->insert($wpdb->prefix . 'formmaker_themes', array(
100
  'title' => $title,
101
- 'css' => $css,
102
  'default' => $default,
103
  ), array(
104
  '%s',
105
  '%s',
106
  '%d',
107
  ));
 
108
  }
109
  if ($save !== FALSE) {
 
 
 
 
110
  return 1;
111
  }
112
  else {
@@ -114,6 +139,31 @@ class FMControllerThemes_fm {
114
  }
115
  }
116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  public function delete($id) {
118
  global $wpdb;
119
  $isDefault = $wpdb->get_var($wpdb->prepare('SELECT `default` FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $id));
@@ -129,7 +179,6 @@ class FMControllerThemes_fm {
129
  $message = 2;
130
  }
131
  }
132
- // $this->display();
133
  $page = WDW_FM_Library::get('page');
134
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
135
  }
@@ -157,7 +206,6 @@ class FMControllerThemes_fm {
157
  else {
158
  $message = 6;
159
  }
160
- // $this->display();
161
  $page = WDW_FM_Library::get('page');
162
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
163
  }
@@ -172,18 +220,8 @@ class FMControllerThemes_fm {
172
  else {
173
  $message = 2;
174
  }
175
- // $this->display();
176
  $page = WDW_FM_Library::get('page');
177
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
178
  }
179
 
180
- ////////////////////////////////////////////////////////////////////////////////////////
181
- // Getters & Setters //
182
- ////////////////////////////////////////////////////////////////////////////////////////
183
- ////////////////////////////////////////////////////////////////////////////////////////
184
- // Private Methods //
185
- ////////////////////////////////////////////////////////////////////////////////////////
186
- ////////////////////////////////////////////////////////////////////////////////////////
187
- // Listeners //
188
- ////////////////////////////////////////////////////////////////////////////////////////
189
- }
1
  <?php
2
 
3
  class FMControllerThemes_fm {
4
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  public function execute() {
6
  $task = WDW_FM_Library::get('task');
7
  $id = (int)WDW_FM_Library::get('current_id', 0);
40
 
41
  require_once WD_FM_DIR . "/admin/views/FMViewThemes_fm.php";
42
  $view = new FMViewThemes_fm($model);
 
43
  $id = (int)WDW_FM_Library::get('current_id', 0);
44
  $view->edit($id, FALSE);
45
  }
46
 
47
  public function save() {
48
  $message = $this->save_db();
 
49
  $page = WDW_FM_Library::get('page');
50
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
51
  }
53
  public function apply() {
54
  $message = $this->save_db();
55
  global $wpdb;
 
 
 
56
  $id = (int) $wpdb->get_var('SELECT MAX(`id`) FROM ' . $wpdb->prefix . 'formmaker_themes');
57
  $current_id = (int)WDW_FM_Library::get('current_id', $id);
58
  $page = WDW_FM_Library::get('page');
59
+ $active_tab = WDW_FM_Library::get('active_tab');
60
+ $pagination = WDW_FM_Library::get('pagination-type');
61
+ $form_type = WDW_FM_Library::get('form_type');
62
+ WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'edit', 'current_id' => $current_id, 'message' => $message, 'active_tab' => $active_tab, 'pagination' => $pagination, 'form_type' => $form_type), admin_url('admin.php')));
63
  }
64
+
65
+ public function copy_themes() {
66
+ global $wpdb;
67
+ $theme_ids_col = $wpdb->get_col('SELECT id FROM ' . $wpdb->prefix . 'formmaker_themes');
68
+ foreach ($theme_ids_col as $theme_id) {
69
+ if (isset($_POST['check_' . $theme_id])) {
70
+ $theme = $wpdb->get_row('SELECT * FROM ' . $wpdb->prefix . 'formmaker_themes where id=' . $theme_id);
71
+ $title = $theme->title;
72
+ $params = $theme->params;
73
+ $save = $wpdb->insert($wpdb->prefix . 'formmaker_themes',
74
+ array(
75
+ 'title' => $title,
76
+ 'params' => $params,
77
+ 'default' => 0
78
+ ), array(
79
+ '%s',
80
+ '%s',
81
+ '%d'
82
+ ));
83
+ }
84
+ }
85
+
86
+ if ($save !== FALSE) {
87
+ $message = 1;
88
+ }
89
+ else {
90
+ $message = 2;
91
+ }
92
+
93
+ $page = WDW_FM_Library::get('page');
94
+ WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
95
+ }
96
+
97
+ public function save_as_copy() {
98
+ $message = $this->save_db_as_copy();
99
+ $page = WDW_FM_Library::get('page');
100
+ WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
101
+ }
102
+
103
  public function save_db() {
104
  global $wpdb;
 
105
  $id = (int) WDW_FM_Library::get('current_id', 0);
106
  $title = (isset($_POST['title']) ? esc_html(stripslashes( $_POST['title'])) : '');
107
+ $version = 1;
108
+ $params = (isset($_POST['params']) ? stripslashes(preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $_POST['params'])) : '');
109
  $default = (isset($_POST['default']) ? esc_html(stripslashes( $_POST['default'])) : 0);
110
  if ($id != 0) {
111
  $save = $wpdb->update($wpdb->prefix . 'formmaker_themes', array(
112
  'title' => $title,
113
+ 'params' => $params,
114
  'default' => $default,
115
  ), array('id' => $id));
116
+ $version = $wpdb->get_var($wpdb->prepare("SELECT version FROM " . $wpdb->prefix . "formmaker_themes WHERE id=%d", $id));
117
  }
118
  else {
119
  $save = $wpdb->insert($wpdb->prefix . 'formmaker_themes', array(
120
  'title' => $title,
121
+ 'params' => $params,
122
  'default' => $default,
123
  ), array(
124
  '%s',
125
  '%s',
126
  '%d',
127
  ));
128
+ $id = $wpdb->insert_id;
129
  }
130
  if ($save !== FALSE) {
131
+ require_once WD_FM_DIR . "/frontend/models/FMModelForm_maker.php";
132
+ $model_frontend = new FMModelForm_maker();
133
+ $form_theme = json_decode(html_entity_decode($params), true);
134
+ $model_frontend->create_css($id, $form_theme, $version == 1, true);
135
  return 1;
136
  }
137
  else {
139
  }
140
  }
141
 
142
+ public function save_db_as_copy() {
143
+ global $wpdb;
144
+ $id = (int) WDW_FM_Library::get('current_id', 0);
145
+ $title = isset($_POST['title']) ? esc_html(stripslashes( $_POST['title'])) : '';
146
+ $params = isset($_POST['params']) ? stripslashes(preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $_POST['params'])) : '';
147
+
148
+ $save = $wpdb->insert($wpdb->prefix . 'formmaker_themes',
149
+ array(
150
+ 'title' => $title,
151
+ 'params' => $params,
152
+ 'default' => 0
153
+ ), array(
154
+ '%s',
155
+ '%s',
156
+ '%d'
157
+ ));
158
+
159
+ if ($save !== FALSE) {
160
+ return 1;
161
+ }
162
+ else {
163
+ return 2;
164
+ }
165
+ }
166
+
167
  public function delete($id) {
168
  global $wpdb;
169
  $isDefault = $wpdb->get_var($wpdb->prepare('SELECT `default` FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $id));
179
  $message = 2;
180
  }
181
  }
 
182
  $page = WDW_FM_Library::get('page');
183
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
184
  }
206
  else {
207
  $message = 6;
208
  }
 
209
  $page = WDW_FM_Library::get('page');
210
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
211
  }
220
  else {
221
  $message = 2;
222
  }
 
223
  $page = WDW_FM_Library::get('page');
224
  WDW_FM_Library::fm_redirect(add_query_arg(array('page' => $page, 'task' => 'display', 'message' => $message), admin_url('admin.php')));
225
  }
226
 
227
+ }
 
 
 
 
 
 
 
 
 
admin/models/FMModelFormMakerEditCSS.php DELETED
@@ -1,42 +0,0 @@
1
- <?php
2
-
3
- class FMModelFormMakerEditCSS {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
-
22
- public function get_theme_row($id) {
23
- global $wpdb;
24
- $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $id));
25
- return $row;
26
- }
27
-
28
- /*public function get_form($form_id) {
29
- global $wpdb;
30
- $form = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $form_id));
31
- return $form;
32
- }*/
33
- ////////////////////////////////////////////////////////////////////////////////////////
34
- // Getters & Setters //
35
- ////////////////////////////////////////////////////////////////////////////////////////
36
- ////////////////////////////////////////////////////////////////////////////////////////
37
- // Private Methods //
38
- ////////////////////////////////////////////////////////////////////////////////////////
39
- ////////////////////////////////////////////////////////////////////////////////////////
40
- // Listeners //
41
- ////////////////////////////////////////////////////////////////////////////////////////
42
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/models/FMModelFormMakerPreview.php CHANGED
@@ -19,12 +19,6 @@ class FMModelFormMakerPreview {
19
  // Public Methods //
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
 
22
- public function get_theme_css($id) {
23
- global $wpdb;
24
- $css = $wpdb->get_var($wpdb->prepare('SELECT css FROM ' . $wpdb->prefix . 'formmaker_themes WHERE id="%d"', $id));
25
- return $css;
26
- }
27
-
28
  public function get_form($form_id) {
29
  global $wpdb;
30
  $form = $wpdb->get_var($wpdb->prepare('SELECT form_front FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $form_id));
19
  // Public Methods //
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
 
 
 
 
 
 
 
22
  public function get_form($form_id) {
23
  global $wpdb;
24
  $form = $wpdb->get_var($wpdb->prepare('SELECT form_front FROM ' . $wpdb->prefix . 'formmaker WHERE id="%d"', $form_id));
admin/models/FMModelGenerete_csv.php CHANGED
@@ -27,16 +27,16 @@ class FMModelGenerete_csv {
27
  $limitstart = (int)$_REQUEST['limitstart'];
28
  $search_labels = isset($_REQUEST['search_labels']) ? $_REQUEST['search_labels'] : '';
29
  $verified_emails = isset($_REQUEST['verified_emails']) ? json_decode(stripslashes($_REQUEST['verified_emails']), true) : array();
30
-
31
 
32
  $paypal_info_fields = array('currency', 'ord_last_modified', 'status', 'full_name', 'fax', 'mobile_phone', 'email', 'phone', 'address', 'paypal_info', 'ipn', 'tax', 'shipping');
33
  $paypal_info_labels = array( 'Currency', 'Last modified', 'Status', 'Full Name', 'Fax', 'Mobile phone', 'Email', 'Phone', 'Address', 'Paypal info', 'IPN', 'Tax', 'Shipping');
34
-
 
35
  if($search_labels){
36
  $query = $wpdb->prepare("SELECT distinct group_id FROM " . $wpdb->prefix . "formmaker_submits where form_id=%d and group_id IN(".$search_labels.")", $form_id);
37
  $group_id_s = $wpdb->get_col($query);
38
  }
39
-
40
 
41
  $query = $wpdb->prepare("SELECT distinct element_label FROM " . $wpdb->prefix . "formmaker_submits where form_id=%d",$form_id);
42
  $labels = $wpdb->get_col($query);
@@ -87,13 +87,12 @@ class FMModelGenerete_csv {
87
  $rows = $wpdb->get_results($query, OBJECT_K);
88
  }
89
 
90
-
91
  $data = array();
92
  $group_id_s_count = $limitstart + 1000 < count($group_id_s) ? $limitstart + 1000 : count($group_id_s);
93
 
94
  sort($group_id_s,SORT_NUMERIC);
95
-
96
- for ($www = $limitstart; $www < $group_id_s_count; $www++) {
97
  $i = $group_id_s[$www];
98
  $field_key = array_search($i, $label_id);
99
  if($label_type[$field_key] != 'type_arithmetic_captcha') {
@@ -113,10 +112,12 @@ class FMModelGenerete_csv {
113
 
114
  $element_labels = explode(',', $tt->element_label);
115
  $element_values = explode('*:*el_value*:*', $tt->element_value);
 
 
116
  for ($h = 0; $h < $m; $h++) {
117
  if(isset($data_temp[$label_titles[$h]]))
118
  $label_titles[$h] .= '(1)';
119
-
120
  if(in_array($sorted_labels_id[$h], $element_labels)) {
121
  $element_value = $element_values[array_search($sorted_labels_id[$h], $element_labels)];
122
 
@@ -224,14 +225,15 @@ class FMModelGenerete_csv {
224
  $data_temp[stripslashes($label_titles[$h])] = $matrix;
225
  }
226
  else {
227
- $val = htmlspecialchars_decode($element_value);
228
  $val = stripslashes(str_replace('&#039;', "'", $val));
229
  $data_temp[stripslashes($label_titles[$h])] = ($element_value ? $val : '');
230
- }
231
  }
232
- else
233
  $data_temp[stripslashes($label_titles[$h])] = '';
234
-
 
235
  if(isset($verified_emails[$sorted_labels_id[$h]]) && $sorted_types[$h] == "type_submitter_mail") {
236
  if($data_temp[stripslashes($label_titles[$h])] == '') {
237
  $data_temp[stripslashes($label_titles[$h]).'(verified)'] = '';
@@ -244,7 +246,7 @@ class FMModelGenerete_csv {
244
  }
245
  }
246
  }
247
-
248
  $query = $wpdb->prepare("SELECT id FROM " . $wpdb->prefix . "formmaker_submits where element_label=%s AND form_id = %d AND group_id=%d",'item_total', $form_id, $i);
249
  $is_paypal = $wpdb->get_results($query);
250
 
@@ -271,15 +273,16 @@ class FMModelGenerete_csv {
271
  }
272
  }
273
  }
274
-
275
  $data[$i] = $data_temp;
276
- }
 
277
  }
278
 
 
279
  array_push($params, $data);
280
  array_push($params, $title);
281
  array_push($params, $is_paypal_info);
282
-
283
  return $params;
284
 
285
  }
27
  $limitstart = (int)$_REQUEST['limitstart'];
28
  $search_labels = isset($_REQUEST['search_labels']) ? $_REQUEST['search_labels'] : '';
29
  $verified_emails = isset($_REQUEST['verified_emails']) ? json_decode(stripslashes($_REQUEST['verified_emails']), true) : array();
 
30
 
31
  $paypal_info_fields = array('currency', 'ord_last_modified', 'status', 'full_name', 'fax', 'mobile_phone', 'email', 'phone', 'address', 'paypal_info', 'ipn', 'tax', 'shipping');
32
  $paypal_info_labels = array( 'Currency', 'Last modified', 'Status', 'Full Name', 'Fax', 'Mobile phone', 'Email', 'Phone', 'Address', 'Paypal info', 'IPN', 'Tax', 'Shipping');
33
+
34
+
35
  if($search_labels){
36
  $query = $wpdb->prepare("SELECT distinct group_id FROM " . $wpdb->prefix . "formmaker_submits where form_id=%d and group_id IN(".$search_labels.")", $form_id);
37
  $group_id_s = $wpdb->get_col($query);
38
  }
39
+
40
 
41
  $query = $wpdb->prepare("SELECT distinct element_label FROM " . $wpdb->prefix . "formmaker_submits where form_id=%d",$form_id);
42
  $labels = $wpdb->get_col($query);
87
  $rows = $wpdb->get_results($query, OBJECT_K);
88
  }
89
 
90
+
91
  $data = array();
92
  $group_id_s_count = $limitstart + 1000 < count($group_id_s) ? $limitstart + 1000 : count($group_id_s);
93
 
94
  sort($group_id_s,SORT_NUMERIC);
95
+ for ($www = $limitstart; $www < $group_id_s_count; $www++) {
 
96
  $i = $group_id_s[$www];
97
  $field_key = array_search($i, $label_id);
98
  if($label_type[$field_key] != 'type_arithmetic_captcha') {
112
 
113
  $element_labels = explode(',', $tt->element_label);
114
  $element_values = explode('*:*el_value*:*', $tt->element_value);
115
+
116
+
117
  for ($h = 0; $h < $m; $h++) {
118
  if(isset($data_temp[$label_titles[$h]]))
119
  $label_titles[$h] .= '(1)';
120
+
121
  if(in_array($sorted_labels_id[$h], $element_labels)) {
122
  $element_value = $element_values[array_search($sorted_labels_id[$h], $element_labels)];
123
 
225
  $data_temp[stripslashes($label_titles[$h])] = $matrix;
226
  }
227
  else {
228
+ $val = strip_tags(htmlspecialchars_decode($element_value));
229
  $val = stripslashes(str_replace('&#039;', "'", $val));
230
  $data_temp[stripslashes($label_titles[$h])] = ($element_value ? $val : '');
231
+ }
232
  }
233
+ else {
234
  $data_temp[stripslashes($label_titles[$h])] = '';
235
+ }
236
+
237
  if(isset($verified_emails[$sorted_labels_id[$h]]) && $sorted_types[$h] == "type_submitter_mail") {
238
  if($data_temp[stripslashes($label_titles[$h])] == '') {
239
  $data_temp[stripslashes($label_titles[$h]).'(verified)'] = '';
246
  }
247
  }
248
  }
249
+
250
  $query = $wpdb->prepare("SELECT id FROM " . $wpdb->prefix . "formmaker_submits where element_label=%s AND form_id = %d AND group_id=%d",'item_total', $form_id, $i);
251
  $is_paypal = $wpdb->get_results($query);
252
 
273
  }
274
  }
275
  }
276
+
277
  $data[$i] = $data_temp;
278
+ }
279
+
280
  }
281
 
282
+
283
  array_push($params, $data);
284
  array_push($params, $title);
285
  array_push($params, $is_paypal_info);
 
286
  return $params;
287
 
288
  }
admin/models/FMModelGenerete_xml.php CHANGED
@@ -48,8 +48,8 @@ class FMModelGenerete_xml {
48
 
49
  $sorted_labels_id = array();
50
  $sorted_labels = array();
51
- $sorted_types = array();
52
  $label_titles = array();
 
53
  $label_id = array();
54
  $label_order = array();
55
  $label_order_original = array();
@@ -89,9 +89,10 @@ class FMModelGenerete_xml {
89
  $group_id_s_count = $limitstart + 1000 < count($group_id_s) ? $limitstart + 1000 : count($group_id_s);
90
 
91
  sort($group_id_s,SORT_NUMERIC);
92
-
93
  for ($www = $limitstart; $www < $group_id_s_count; $www++) {
 
94
  $i = $group_id_s[$www];
 
95
  $field_key = array_search($i, $label_id);
96
  if($label_type[$field_key] != 'type_arithmetic_captcha') {
97
  $data_temp = array();
@@ -220,7 +221,7 @@ class FMModelGenerete_xml {
220
  $data_temp[stripslashes($label_titles[$h])] = $matrix;
221
  }
222
  else {
223
- $val = htmlspecialchars_decode($element_value);
224
  $val = stripslashes(str_replace('&#039;', "'", $val));
225
  $data_temp[stripslashes($label_titles[$h])] = ($element_value ? $val : '');
226
  }
48
 
49
  $sorted_labels_id = array();
50
  $sorted_labels = array();
 
51
  $label_titles = array();
52
+ $sorted_types = array();
53
  $label_id = array();
54
  $label_order = array();
55
  $label_order_original = array();
89
  $group_id_s_count = $limitstart + 1000 < count($group_id_s) ? $limitstart + 1000 : count($group_id_s);
90
 
91
  sort($group_id_s,SORT_NUMERIC);
 
92
  for ($www = $limitstart; $www < $group_id_s_count; $www++) {
93
+
94
  $i = $group_id_s[$www];
95
+
96
  $field_key = array_search($i, $label_id);
97
  if($label_type[$field_key] != 'type_arithmetic_captcha') {
98
  $data_temp = array();
221
  $data_temp[stripslashes($label_titles[$h])] = $matrix;
222
  }
223
  else {
224
+ $val = strip_tags(htmlspecialchars_decode($element_value));
225
  $val = stripslashes(str_replace('&#039;', "'", $val));
226
  $data_temp[stripslashes($label_titles[$h])] = ($element_value ? $val : '');
227
  }
admin/models/FMModelManage_fm.php CHANGED
@@ -20,14 +20,14 @@ class FMModelManage_fm {
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
  public function get_rows_data() {
22
  global $wpdb;
23
- $where = 'WHERE `id` NOT IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')';
24
  $where .= ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? ' AND title LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
25
  $asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'desc') ? 'desc' : 'asc');
26
- $order_by_array = array('id', 'title', 'mail');
27
- $order_by = isset($_POST['order_by']) && in_array(esc_html(stripslashes($_POST['order_by'])), $order_by_array) ? esc_html(stripslashes($_POST['order_by'])) : 'id';
28
  $order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
29
  if (isset($_POST['page_number']) && $_POST['page_number']) {
30
- $limit = ((int) $_POST['page_number'] - 1) * 20;
31
  }
32
  else {
33
  $limit = 0;
@@ -91,6 +91,11 @@ class FMModelManage_fm {
91
  $row->mail_from_name_user = '';
92
  $row->reply_to_user = '';
93
  $row->save_uploads = 1;
 
 
 
 
 
94
  }
95
  return $row;
96
  }
@@ -154,8 +159,9 @@ class FMModelManage_fm {
154
  }
155
 
156
  case 'type_send_copy':
 
157
  case 'type_captcha':
158
- case 'type_arithmetic_captcha':
159
  case 'type_recaptcha':
160
  {
161
  $arrows =$arrows.'<div id="wdform_arrows'.$id.'" class="wdform_arrows"><div id="X_'.$id.'" valign="middle" align="right" class="element_toolbar"><img src="' . WD_FM_URL . '/images/delete_el.png?ver='. get_option("wd_form_maker_version").'" title="Remove the field" onclick="remove_row(&quot;'.$id.'&quot;)" onmouseover="chnage_icons_src(this,&quot;delete_el&quot;)" onmouseout="chnage_icons_src(this,&quot;delete_el&quot;)"></div><div id="left_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/left.png?ver='. get_option("wd_form_maker_version").'" title="Move the field to the left" onclick="left_row(&quot;'.$id.'&quot;)" onmouseover="chnage_icons_src(this,&quot;left&quot;)" onmouseout="chnage_icons_src(this,&quot;left&quot;)"></div><div id="up_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/up.png?ver='. get_option("wd_form_maker_version").'" title="Move the field up" onclick="up_row(&quot;'.$id.'&quot;)" onmouseover="chnage_icons_src(this,&quot;up&quot;)" onmouseout="chnage_icons_src(this,&quot;up&quot;)"></div><div id="down_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/down.png?ver='. get_option("wd_form_maker_version").'" title="Move the field down" onclick="down_row(&quot;'.$id.'&quot;)" onmouseover="chnage_icons_src(this,&quot;down&quot;)" onmouseout="chnage_icons_src(this,&quot;down&quot;)"></div><div id="right_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/right.png?ver='. get_option("wd_form_maker_version").'" title="Move the field to the right" onclick="right_row(&quot;'.$id.'&quot;)" onmouseover="chnage_icons_src(this,&quot;right&quot;)" onmouseout="chnage_icons_src(this,&quot;right&quot;)"></div><div id="edit_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/edit.png?ver='. get_option("wd_form_maker_version").'" title="Edit the field" onclick="edit(&quot;'.$id.'&quot;)" onmouseover="chnage_icons_src(this,&quot;edit&quot;)" onmouseout="chnage_icons_src(this,&quot;edit&quot;)"></div><div id="duplicate_'.$id.'" valign="middle" class="element_toolbar"></div><div id="page_up_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/page_up.png?ver='. get_option("wd_form_maker_version").'" title="Move the field to the upper page" onclick="page_up(&quot;'.$id.'&quot;)" onmouseover="chnage_icons_src(this,&quot;page_up&quot;)" onmouseout="chnage_icons_src(this,&quot;page_up&quot;)"></div><div id="page_down_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/page_down.png?ver='. get_option("wd_form_maker_version").'" title="Move the field to the lower page" onclick="page_down(&quot;'.$id.'&quot;)" onmouseover="chnage_icons_src(this,&quot;page_down&quot;)" onmouseout="chnage_icons_src(this,&quot;page_down&quot;)"></div></div>';
@@ -169,6 +175,10 @@ class FMModelManage_fm {
169
  }
170
 
171
  }
 
 
 
 
172
  switch ($type) {
173
  case 'type_section_break': {
174
  $params_names = array('w_editor');
@@ -195,6 +205,10 @@ class FMModelManage_fm {
195
  case 'type_send_copy': {
196
  $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_first_val', 'w_required');
197
  $temp = $params;
 
 
 
 
198
  foreach ($params_names as $params_name ) {
199
  $temp = explode('*:*' . $params_name . '*:*', $temp);
200
  $param[$params_name] = $temp[0];
@@ -208,9 +222,13 @@ class FMModelManage_fm {
208
  }
209
  }
210
  $param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "table-cell" : "block");
 
 
 
 
211
  $input_active = ($param['w_first_val'] == 'true' ? "checked='checked'" : "");
212
  $required_sym = ($param['w_required'] == "yes" ? " *" : "");
213
- $rep ='<div id="wdform_field'.$id.'" type="type_send_copy" class="wdform_field" style="display: table-cell;">'.$arrows.'<div align="left" id="'.$id.'_label_sectionform_id_temp" 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" style="display: '.$param['w_field_label_pos'].'"><input type="hidden" value="type_send_copy" 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="checkbox" id="'.$id.'_elementform_id_temp" name="'.$id.'_elementform_id_temp" onclick="set_checked(&quot;'.$id.'&quot;,&quot;&quot;,&quot;form_id_temp&quot;)" '.$input_active.' '.$param['attributes'].' disabled /></div></div>';
214
  break;
215
  }
216
  case 'type_text': {
@@ -218,6 +236,13 @@ class FMModelManage_fm {
218
  $temp = $params;
219
  if(strpos($temp, 'w_regExp_status') > -1)
220
  $params_names = array('w_field_label_size','w_field_label_pos','w_size','w_first_val','w_title','w_required', 'w_regExp_status', 'w_regExp_value', 'w_regExp_common', 'w_regExp_arg', 'w_regExp_alert', 'w_unique');
 
 
 
 
 
 
 
221
  foreach ($params_names as $params_name) {
222
  $temp = explode('*:*' . $params_name . '*:*', $temp);
223
  $param[$params_name] = $temp[0];
@@ -230,6 +255,9 @@ class FMModelManage_fm {
230
  $param['attributes'] = $param['attributes'] . ' add_' . $attr;
231
  }
232
  }
 
 
 
233
 
234
  $param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "table-cell" : "block");
235
  $input_active = ($param['w_first_val'] == $param['w_title'] ? "input_deactive" : "input_active");
@@ -241,7 +269,13 @@ class FMModelManage_fm {
241
  $param['w_regExp_arg'] = (isset($param['w_regExp_arg']) ? $param['w_regExp_arg'] : "");
242
  $param['w_regExp_alert'] = (isset($param['w_regExp_alert']) ? $param['w_regExp_alert'] : "Incorrect Value");
243
 
244
- $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: '.$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" 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_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" class="'.$input_active.'" id="'.$id.'_elementform_id_temp" name="'.$id.'_elementform_id_temp" value="'.$param['w_first_val'].'" title="'.$param['w_title'].'" onfocus="delete_value(&quot;'.$id.'_elementform_id_temp&quot;)" onblur="return_value(&quot;'.$id.'_elementform_id_temp&quot;)" onchange="change_value(&quot;'.$id.'_elementform_id_temp&quot;)" style="width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled /></div></div>';
 
 
 
 
 
 
245
 
246
  break;
247
  }
@@ -268,10 +302,16 @@ class FMModelManage_fm {
268
  }
269
  case 'type_password': {
270
  $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_size', 'w_required', 'w_unique', 'w_class');
271
- $temp = $params;
 
 
 
 
272
  if(strpos($temp, 'w_verification') > -1)
273
- $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_size', 'w_required', 'w_unique', 'w_class', 'w_verification', 'w_verification_label');
274
-
 
 
275
  foreach ($params_names as $params_name) {
276
  $temp = explode('*:*' . $params_name . '*:*', $temp);
277
  $param[$params_name] = $temp[0];
@@ -284,12 +324,15 @@ class FMModelManage_fm {
284
  $param['attributes'] = $param['attributes'] . ' add_' . $attr;
285
  }
286
  }
 
 
 
 
 
287
 
288
- $param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "table-cell" : "block");
289
- $required_sym = ($param['w_required'] == "yes" ? " *" : "");
290
 
291
  if(isset($param['w_verification']) && $param['w_verification'] == "yes"){
292
- $display_label_confirm = $param['w_field_label_pos'];
293
  $display_element_confirm = $param['w_field_label_pos'];
294
  }
295
  else{
@@ -299,16 +342,26 @@ class FMModelManage_fm {
299
 
300
  $param['w_verification'] = isset($param['w_verification']) ? $param['w_verification'] : "no";
301
  $param['w_verification_label'] = isset($param['w_verification_label']) ? $param['w_verification_label'] : "Password confirmation:";
 
 
302
 
303
  $confirm_password ='<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" class="input_deactive" id="'.$id.'_1_elementform_id_temp" name="'.$id.'_1_elementform_id_temp" style="width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled /></div>';
304
 
305
-
306
- $rep ='<div id="wdform_field'.$id.'" type="type_password" 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_password" 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="password" id="'.$id.'_elementform_id_temp" name="'.$id.'_elementform_id_temp" style="width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled /></div>'.$confirm_password.'</div>';
 
307
  break;
 
308
  }
309
  case 'type_textarea': {
310
  $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_size_w', 'w_size_h', 'w_first_val', 'w_title', 'w_required', 'w_unique', 'w_class');
311
  $temp = $params;
 
 
 
 
 
 
312
  foreach ($params_names as $params_name) {
313
  $temp = explode('*:*' . $params_name . '*:*', $temp);
314
  $param[$params_name] = $temp[0];
@@ -324,12 +377,22 @@ class FMModelManage_fm {
324
  $param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "table-cell" : "block");
325
  $input_active = ($param['w_first_val'] == $param['w_title'] ? "input_deactive" : "input_active");
326
  $required_sym = ($param['w_required'] == "yes" ? " *" : "");
327
- $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:'.$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: table-cell;"><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_unique'].'" name="'.$id.'_uniqueform_id_temp" id="'.$id.'_uniqueform_id_temp"><textarea class="'.$input_active.'" id="'.$id.'_elementform_id_temp" name="'.$id.'_elementform_id_temp" title="'.$param['w_title'].'" onfocus="delete_value(&quot;'.$id.'_elementform_id_temp&quot;)" onblur="return_value(&quot;'.$id.'_elementform_id_temp&quot;)" onchange="change_value(&quot;'.$id.'_elementform_id_temp&quot;)" style="width: '.$param['w_size_w'].'px; height: '.$param['w_size_h'].'px;" '.$param['attributes'].' disabled>'.$param['w_first_val'].'</textarea></div></div>';
 
 
 
 
 
328
  break;
329
  }
330
  case 'type_phone': {
331
  $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_size', 'w_first_val', 'w_title', 'w_mini_labels', 'w_required', 'w_unique', 'w_class');
332
  $temp = $params;
 
 
 
 
 
333
  foreach ($params_names as $params_name) {
334
  $temp = explode('*:*' . $params_name . '*:*', $temp);
335
  $param[$params_name] = $temp[0];
@@ -346,9 +409,12 @@ class FMModelManage_fm {
346
  $w_title = explode('***', $param['w_title']);
347
  $w_mini_labels = explode('***', $param['w_mini_labels']);
348
  $param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "table-cell" : "block");
 
 
 
349
  $input_active = ($param['w_first_val'] == $param['w_title'] ? "input_deactive" : "input_active");
350
  $required_sym = ($param['w_required'] == "yes" ? " *" : "");
351
- $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: '.$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">'.$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_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" class="'.$input_active.'" id="'.$id.'_element_firstform_id_temp" name="'.$id.'_element_firstform_id_temp" value="'.$w_first_val[0].'" title="'.$w_title[0].'" onfocus="delete_value(&quot;'.$id.'_element_firstform_id_temp&quot;)"onblur="return_value(&quot;'.$id.'_element_firstform_id_temp&quot;)"onchange="change_value(&quot;'.$id.'_element_firstform_id_temp&quot;)" 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" class="'.$input_active.'" id="'.$id.'_element_lastform_id_temp" name="'.$id.'_element_lastform_id_temp" value="'.$w_first_val[1].'" title="'.$w_title[1].'" onfocus="delete_value(&quot;'.$id.'_element_lastform_id_temp&quot;)"onblur="return_value(&quot;'.$id.'_element_lastform_id_temp&quot;)" onchange="change_value(&quot;'.$id.'_element_lastform_id_temp&quot;)" 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>';
352
  break;
353
  }
354
 
@@ -379,7 +445,8 @@ class FMModelManage_fm {
379
  break;
380
  }
381
 
382
- case 'type_name': {
 
383
  $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_first_val', 'w_title', 'w_mini_labels', 'w_size', 'w_name_format', 'w_required', 'w_unique', 'w_class');
384
  $temp = $params;
385
  if(strpos($temp, 'w_name_fields') > -1)
@@ -387,6 +454,10 @@ class FMModelManage_fm {
387
 
388
  if(strpos($temp, 'w_autofill') > -1)
389
  $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_first_val', 'w_title', 'w_mini_labels', 'w_size', 'w_name_format', 'w_required', 'w_unique', 'w_class', 'w_name_fields', 'w_autofill');
 
 
 
 
390
  foreach ($params_names as $params_name) {
391
  $temp = explode('*:*' . $params_name . '*:*', $temp);
392
  $param[$params_name] = $temp[0];
@@ -400,6 +471,11 @@ class FMModelManage_fm {
400
  }
401
  }
402
  $param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "table-cell" : "block");
 
 
 
 
 
403
  $required_sym = ($param['w_required'] == "yes" ? " *" : "");
404
  $w_first_val = explode('***', $param['w_first_val']);
405
  $w_title = explode('***', $param['w_title']);
@@ -422,12 +498,18 @@ class FMModelManage_fm {
422
  $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>';
423
  }
424
 
425
- $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: '.$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_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_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>';
426
  break;
427
  }
428
  case 'type_address': {
429
  $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_size', 'w_mini_labels', 'w_disabled_fields', 'w_required', 'w_class');
430
  $temp = $params;
 
 
 
 
 
 
431
  foreach ($params_names as $params_name) {
432
  $temp = explode('*:*' . $params_name . '*:*', $temp);
433
  $param[$params_name] = $temp[0];
@@ -442,6 +524,11 @@ class FMModelManage_fm {
442
  }
443
  $param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "table-cell" : "block");
444
  $required_sym = ($param['w_required'] == "yes" ? " *" : "");
 
 
 
 
 
445
  $w_mini_labels = explode('***', $param['w_mini_labels']);
446
  $w_disabled_fields = explode('***', $param['w_disabled_fields']);
447
  $hidden_inputs = '';
@@ -494,10 +581,10 @@ class FMModelManage_fm {
494
  $address_fields .= '<span style="float: '.(($g%2==0) ? 'right' : 'left').'; width: 48%; padding-bottom: 8px;"><select type="text" id="'.$id.'_countryform_id_temp" name="'.($id+5).'_countryform_id_temp" onchange="change_value(&quot;'.$id.'_countryform_id_temp&quot;)" style="width: 100%;" '.$param['attributes'].' disabled><option value=""></option><option value="Afghanistan">Afghanistan</option><option value="Albania">Albania</option><option value="Algeria">Algeria</option><option value="Andorra">Andorra</option><option value="Angola">Angola</option><option value="Antigua and Barbuda">Antigua and Barbuda</option><option value="Argentina">Argentina</option><option value="Armenia">Armenia</option><option value="Australia">Australia</option><option value="Austria">Austria</option><option value="Azerbaijan">Azerbaijan</option><option value="Bahamas">Bahamas</option><option value="Bahrain">Bahrain</option><option value="Bangladesh">Bangladesh</option><option value="Barbados">Barbados</option><option value="Belarus">Belarus</option><option value="Belgium">Belgium</option><option value="Belize">Belize</option><option value="Benin">Benin</option><option value="Bhutan">Bhutan</option><option value="Bolivia">Bolivia</option><option value="Bosnia and Herzegovina">Bosnia and Herzegovina</option><option value="Botswana">Botswana</option><option value="Brazil">Brazil</option><option value="Brunei">Brunei</option><option value="Bulgaria">Bulgaria</option><option value="Burkina Faso">Burkina Faso</option><option value="Burundi">Burundi</option><option value="Cambodia">Cambodia</option><option value="Cameroon">Cameroon</option><option value="Canada">Canada</option><option value="Cape Verde">Cape Verde</option><option value="Central African Republic">Central African Republic</option><option value="Chad">Chad</option><option value="Chile">Chile</option><option value="China">China</option><option value="Colombia">Colombia</option><option value="Comoros">Comoros</option><option value="Congo (Brazzaville)">Congo (Brazzaville)</option><option value="Congo">Congo</option><option value="Costa Rica">Costa Rica</option><option value="Cote d\'Ivoire">Cote d\'Ivoire</option><option value="Croatia">Croatia</option><option value="Cuba">Cuba</option><option value="Cyprus">Cyprus</option><option value="Czech Republic">Czech Republic</option><option value="Denmark">Denmark</option><option value="Djibouti">Djibouti</option><option value="Dominica">Dominica</option><option value="Dominican Republic">Dominican Republic</option><option value="East Timor (Timor Timur)">East Timor (Timor Timur)</option><option value="Ecuador">Ecuador</option><option value="Egypt">Egypt</option><option value="El Salvador">El Salvador</option><option value="Equatorial Guinea">Equatorial Guinea</option><option value="Eritrea">Eritrea</option><option value="Estonia">Estonia</option><option value="Ethiopia">Ethiopia</option><option value="Fiji">Fiji</option><option value="Finland">Finland</option><option value="France">France</option><option value="Gabon">Gabon</option><option value="Gambia, The">Gambia, The</option><option value="Georgia">Georgia</option><option value="Germany">Germany</option><option value="Ghana">Ghana</option><option value="Greece">Greece</option><option value="Grenada">Grenada</option><option value="Guatemala">Guatemala</option><option value="Guinea">Guinea</option><option value="Guinea-Bissau">Guinea-Bissau</option><option value="Guyana">Guyana</option><option value="Haiti">Haiti</option><option value="Honduras">Honduras</option><option value="Hungary">Hungary</option><option value="Iceland">Iceland</option><option value="India">India</option><option value="Indonesia">Indonesia</option><option value="Iran">Iran</option><option value="Iraq">Iraq</option><option value="Ireland">Ireland</option><option value="Israel">Israel</option><option value="Italy">Italy</option><option value="Jamaica">Jamaica</option><option value="Japan">Japan</option><option value="Jordan">Jordan</option><option value="Kazakhstan">Kazakhstan</option><option value="Kenya">Kenya</option><option value="Kiribati">Kiribati</option><option value="Korea, North">Korea, North</option><option value="Korea, South">Korea, South</option><option value="Kuwait">Kuwait</option><option value="Kyrgyzstan">Kyrgyzstan</option><option value="Laos">Laos</option><option value="Latvia">Latvia</option><option value="Lebanon">Lebanon</option><option value="Lesotho">Lesotho</option><option value="Liberia">Liberia</option><option value="Libya">Libya</option><option value="Liechtenstein">Liechtenstein</option><option value="Lithuania">Lithuania</option><option value="Luxembourg">Luxembourg</option><option value="Macedonia">Macedonia</option><option value="Madagascar">Madagascar</option><option value="Malawi">Malawi</option><option value="Malaysia">Malaysia</option><option value="Maldives">Maldives</option><option value="Mali">Mali</option><option value="Malta">Malta</option><option value="Marshall Islands">Marshall Islands</option><option value="Mauritania">Mauritania</option><option value="Mauritius">Mauritius</option><option value="Mexico">Mexico</option><option value="Micronesia">Micronesia</option><option value="Moldova">Moldova</option><option value="Monaco">Monaco</option><option value="Mongolia">Mongolia</option><option value="Morocco">Morocco</option><option value="Mozambique">Mozambique</option><option value="Myanmar">Myanmar</option><option value="Namibia">Namibia</option><option value="Nauru">Nauru</option><option value="Nepal">Nepal</option><option value="Netherlands">Netherlands</option><option value="New Zealand">New Zealand</option><option value="Nicaragua">Nicaragua</option><option value="Niger">Niger</option><option value="Nigeria">Nigeria</option><option value="Norway">Norway</option><option value="Oman">Oman</option><option value="Pakistan">Pakistan</option><option value="Palau">Palau</option><option value="Panama">Panama</option><option value="Papua New Guinea">Papua New Guinea</option><option value="Paraguay">Paraguay</option><option value="Peru">Peru</option><option value="Philippines">Philippines</option><option value="Poland">Poland</option><option value="Portugal">Portugal</option><option value="Qatar">Qatar</option><option value="Romania">Romania</option><option value="Russia">Russia</option><option value="Rwanda">Rwanda</option><option value="Saint Kitts and Nevis">Saint Kitts and Nevis</option><option value="Saint Lucia">Saint Lucia</option><option value="Saint Vincent">Saint Vincent</option><option value="Samoa">Samoa</option><option value="San Marino">San Marino</option><option value="Sao Tome and Principe">Sao Tome and Principe</option><option value="Saudi Arabia">Saudi Arabia</option><option value="Senegal">Senegal</option><option value="Serbia and Montenegro">Serbia and Montenegro</option><option value="Seychelles">Seychelles</option><option value="Sierra Leone">Sierra Leone</option><option value="Singapore">Singapore</option><option value="Slovakia">Slovakia</option><option value="Slovenia">Slovenia</option><option value="Solomon Islands">Solomon Islands</option><option value="Somalia">Somalia</option><option value="South Africa">South Africa</option><option value="Spain">Spain</option><option value="Sri Lanka">Sri Lanka</option><option value="Sudan">Sudan</option><option value="Suriname">Suriname</option><option value="Swaziland">Swaziland</option><option value="Sweden">Sweden</option><option value="Switzerland">Switzerland</option><option value="Syria">Syria</option><option value="Taiwan">Taiwan</option><option value="Tajikistan">Tajikistan</option><option value="Tanzania">Tanzania</option><option value="Thailand">Thailand</option><option value="Togo">Togo</option><option value="Tonga">Tonga</option><option value="Trinidad and Tobago">Trinidad and Tobago</option><option value="Tunisia">Tunisia</option><option value="Turkey">Turkey</option><option value="Turkmenistan">Turkmenistan</option><option value="Tuvalu">Tuvalu</option><option value="Uganda">Uganda</option><option value="Ukraine">Ukraine</option><option value="United Arab Emirates">United Arab Emirates</option><option value="United Kingdom">United Kingdom</option><option value="United States">United States</option><option value="Uruguay">Uruguay</option><option value="Uzbekistan">Uzbekistan</option><option value="Vanuatu">Vanuatu</option><option value="Vatican City">Vatican City</option><option value="Venezuela">Venezuela</option><option value="Vietnam">Vietnam</option><option value="Yemen">Yemen</option><option value="Zambia">Zambia</option><option value="Zimbabwe">Zimbabwe</option></select><label class="mini_label" style="display: block;" id="'.$id.'_mini_label_country">'.$w_mini_labels[5].'</span>';
495
  }
496
 
497
- $rep ='<div id="wdform_field'.$id.'" type="type_address" 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; vertical-align:top;"><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_address" 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" name="'.$id.'_disable_fieldsform_id_temp" id="'.$id.'_disable_fieldsform_id_temp" street1="'.$w_disabled_fields[0].'" street2="'.$w_disabled_fields[1].'" city="'.$w_disabled_fields[2].'" state="'.$w_disabled_fields[3].'" postal="'.$w_disabled_fields[4].'" country="'.$w_disabled_fields[5].'" us_states="'.$w_disabled_fields[6].'"><div id="'.$id.'_div_address" style="width: '.$param['w_size'].'px;">'.$address_fields.$hidden_inputs.'</div></div></div>';
498
  break;
499
  }
500
- case 'type_submitter_mail': {
501
  $params_names=array('w_field_label_size','w_field_label_pos','w_size','w_first_val','w_title','w_required','w_unique', 'w_class');
502
  $temp=$params;
503
  if(strpos($temp, 'w_autofill') > -1)
@@ -542,24 +629,27 @@ class FMModelManage_fm {
542
  $display_element_confirm = "none";
543
  }
544
 
 
545
  $param['w_verification'] = isset($param['w_verification']) ? $param['w_verification'] : "no";
546
  $param['w_verification_label'] = isset($param['w_verification_label']) ? $param['w_verification_label'] : "E-mail confirmation:";
547
  $param['w_verification_placeholder'] = isset($param['w_verification_placeholder']) ? $param['w_verification_placeholder'] : "";
548
 
549
-
550
  $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" class="input_deactive" id="'.$id.'_1_elementform_id_temp" name="'.$id.'_1_elementform_id_temp" value="'.$param['w_verification_placeholder'].'" title="'.$param['w_verification_placeholder'].'" onfocus="delete_value(&quot;'.$id.'_elementform_id_temp&quot;)" onblur="return_value(&quot;'.$id.'_elementform_id_temp&quot;)" onchange="change_value(&quot;'.$id.'_elementform_id_temp&quot;)" style="width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled /></div>';
551
 
552
 
553
  $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" class="'.$input_active.'" id="'.$id.'_elementform_id_temp" name="'.$id.'_elementform_id_temp" value="'.$param['w_first_val'].'" title="'.$param['w_title'].'" onfocus="delete_value(&quot;'.$id.'_elementform_id_temp&quot;)" onblur="return_value(&quot;'.$id.'_elementform_id_temp&quot;)" onchange="change_value(&quot;'.$id.'_elementform_id_temp&quot;)" style="width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled /></div>'.$confirm_emeil.'</div>';
554
  break;
555
  }
556
-
557
  case 'type_checkbox':
558
  {
559
- $params_names=array('w_field_label_size','w_field_label_pos','w_flow','w_choices','w_choices_checked','w_rowcol', 'w_required','w_randomize','w_allow_other','w_allow_other_num','w_class');
560
  $temp=$params;
561
  if(strpos($temp, 'w_field_option_pos') > -1)
562
  $params_names=array('w_field_label_size','w_field_label_pos','w_field_option_pos','w_flow','w_choices','w_choices_checked','w_rowcol', 'w_required','w_randomize','w_allow_other','w_allow_other_num', 'w_value_disabled','w_choices_value', 'w_choices_params', 'w_class');
 
 
 
 
563
  foreach($params_names as $params_name )
564
  {
565
  $temp=explode('*:*'.$params_name.'*:*',$temp);
@@ -581,6 +671,10 @@ class FMModelManage_fm {
581
  $param['w_field_option_pos'] = 'left';
582
 
583
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
 
 
584
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
585
  $param['w_choices'] = explode('***',$param['w_choices']);
586
  $param['w_choices_checked'] = explode('***',$param['w_choices_checked']);
@@ -599,7 +693,7 @@ class FMModelManage_fm {
599
  $param['w_choices_checked'][$key]='';
600
  }
601
 
602
- $rep='<div id="wdform_field'.$id.'" type="type_checkbox" 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_checkbox" 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_randomize'].'" name="'.$id.'_randomizeform_id_temp" id="'.$id.'_randomizeform_id_temp"><input type="hidden" value="'.$param['w_allow_other'].'" name="'.$id.'_allow_otherform_id_temp" id="'.$id.'_allow_otherform_id_temp"><input type="hidden" value="'.$param['w_allow_other_num'].'" name="'.$id.'_allow_other_numform_id_temp" id="'.$id.'_allow_other_numform_id_temp"><input type="hidden" value="'.$param['w_rowcol'].'" name="'.$id.'_rowcol_numform_id_temp" id="'.$id.'_rowcol_numform_id_temp"><input type="hidden" value="'.$param['w_field_option_pos'].'" id="'.$id.'_option_left_right"><input type="hidden" value="'.$param['w_value_disabled'].'" name="'.$id.'_value_disabledform_id_temp" id="'.$id.'_value_disabledform_id_temp"><div style="display: table;"><div id="'.$id.'_table_little" style="display: table-row-group;" '.($param['w_flow']=='hor' ? 'for_hor="'.$id.'_hor"' : '').'>';
603
 
604
  if($param['w_flow']=='hor')
605
  {
@@ -756,6 +850,9 @@ class FMModelManage_fm {
756
  $temp=$params;
757
  if(strpos($temp, 'w_field_option_pos') > -1)
758
  $params_names=array('w_field_label_size','w_field_label_pos','w_field_option_pos','w_flow','w_choices','w_choices_checked','w_rowcol', 'w_required','w_randomize','w_allow_other','w_allow_other_num', 'w_value_disabled', 'w_choices_value', 'w_choices_params','w_class');
 
 
 
759
  foreach($params_names as $params_name )
760
  {
761
  $temp=explode('*:*'.$params_name.'*:*',$temp);
@@ -775,7 +872,11 @@ class FMModelManage_fm {
775
 
776
  if(!isset($param['w_field_option_pos']))
777
  $param['w_field_option_pos'] = 'left';
778
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
 
 
779
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
780
  $param['w_choices'] = explode('***',$param['w_choices']);
781
  $param['w_choices_checked'] = explode('***',$param['w_choices_checked']);
@@ -794,7 +895,7 @@ class FMModelManage_fm {
794
  $param['w_choices_checked'][$key]='';
795
  }
796
 
797
- $rep='<div id="wdform_field'.$id.'" type="type_radio" 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_radio" 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_randomize'].'" name="'.$id.'_randomizeform_id_temp" id="'.$id.'_randomizeform_id_temp"><input type="hidden" value="'.$param['w_allow_other'].'" name="'.$id.'_allow_otherform_id_temp" id="'.$id.'_allow_otherform_id_temp"><input type="hidden" value="'.$param['w_allow_other_num'].'" name="'.$id.'_allow_other_numform_id_temp" id="'.$id.'_allow_other_numform_id_temp"><input type="hidden" value="'.$param['w_rowcol'].'" name="'.$id.'_rowcol_numform_id_temp" id="'.$id.'_rowcol_numform_id_temp"><input type="hidden" value="'.$param['w_field_option_pos'].'" id="'.$id.'_option_left_right"><input type="hidden" value="'.$param['w_value_disabled'].'" name="'.$id.'_value_disabledform_id_temp" id="'.$id.'_value_disabledform_id_temp"><div style="display: table;"><div id="'.$id.'_table_little" style="display: table-row-group;" '.($param['w_flow']=='hor' ? 'for_hor="'.$id.'_hor"' : '').'>';
798
 
799
 
800
  if($param['w_flow']=='hor')
@@ -954,6 +1055,10 @@ class FMModelManage_fm {
954
  $temp=$params;
955
  if(strpos($temp, 'w_choices_value') > -1)
956
  $params_names=array('w_field_label_size','w_field_label_pos','w_size','w_choices','w_choices_checked', 'w_choices_disabled', 'w_required', 'w_value_disabled', 'w_choices_value', 'w_choices_params', 'w_class');
 
 
 
 
957
  foreach($params_names as $params_name )
958
  {
959
  $temp=explode('*:*'.$params_name.'*:*',$temp);
@@ -970,6 +1075,10 @@ class FMModelManage_fm {
970
  }
971
 
972
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
 
 
973
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
974
  $param['w_choices'] = explode('***',$param['w_choices']);
975
  $param['w_choices_checked'] = explode('***',$param['w_choices_checked']);
@@ -992,7 +1101,7 @@ class FMModelManage_fm {
992
  $param['w_choices_checked'][$key]='';
993
  }
994
 
995
- $rep='<div id="wdform_field'.$id.'" type="type_own_select" 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_own_select" 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_value_disabled'].'" name="'.$id.'_value_disabledform_id_temp" id="'.$id.'_value_disabledform_id_temp"><select id="'.$id.'_elementform_id_temp" name="'.$id.'_elementform_id_temp" onchange="set_select(this)" style="width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled>';
996
  foreach($param['w_choices'] as $key => $choice)
997
  {
998
  $where = '';
@@ -1018,6 +1127,10 @@ class FMModelManage_fm {
1018
  {
1019
  $params_names=array('w_field_label_size','w_field_label_pos','w_size','w_countries','w_required','w_class');
1020
  $temp=$params;
 
 
 
 
1021
  foreach($params_names as $params_name )
1022
  {
1023
  $temp=explode('*:*'.$params_name.'*:*',$temp);
@@ -1034,10 +1147,13 @@ class FMModelManage_fm {
1034
  }
1035
 
1036
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
 
1037
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
1038
  $param['w_countries'] = explode('***',$param['w_countries']);
1039
 
1040
- $rep='<div id="wdform_field'.$id.'" type="type_country" 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_country" 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"><select id="'.$id.'_elementform_id_temp" name="'.$id.'_elementform_id_temp" style="width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled>';
1041
  foreach($param['w_countries'] as $key => $choice)
1042
  {
1043
  $choice_value=$choice;
@@ -1051,6 +1167,10 @@ class FMModelManage_fm {
1051
  {
1052
  $params_names=array('w_field_label_size','w_field_label_pos','w_time_type','w_am_pm','w_sec','w_hh','w_mm','w_ss','w_mini_labels','w_required','w_class');
1053
  $temp=$params;
 
 
 
 
1054
  foreach($params_names as $params_name )
1055
  {
1056
  $temp=explode('*:*'.$params_name.'*:*',$temp);
@@ -1067,6 +1187,9 @@ class FMModelManage_fm {
1067
  }
1068
 
1069
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
 
1070
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
1071
 
1072
  $w_mini_labels = explode('***',$param['w_mini_labels']);
@@ -1109,7 +1232,7 @@ class FMModelManage_fm {
1109
  }
1110
 
1111
 
1112
- $rep ='<div id="wdform_field'.$id.'" type="type_time" 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_time" 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"><div id="'.$id.'_table_time" style="display: table;"><div id="'.$id.'_tr_time1" style="display: table-row;"><div id="'.$id.'_td_time_input1" style="width: 32px; display: table-cell;"><input type="text" value="'.$param['w_hh'].'" class="time_box" id="'.$id.'_hhform_id_temp" name="'.$id.'_hhform_id_temp" onkeypress="return check_hour(event, &quot;'.$id.'_hhform_id_temp&quot;, &quot;23&quot;)" onkeyup="change_hour(event, &quot;'.$id.'_hhform_id_temp&quot;,&quot;23&quot;)" onblur="add_0(&quot;'.$id.'_hhform_id_temp&quot;)" '.$param['attributes'].' disabled/></div><div align="center" style="display: table-cell;"><span class="wdform_colon" style="vertical-align: middle;">&nbsp;:&nbsp;</span></div><div id="'.$id.'_td_time_input2" style="width: 32px; display: table-cell;"><input type="text" value="'.$param['w_mm'].'" class="time_box" id="'.$id.'_mmform_id_temp" name="'.$id.'_mmform_id_temp" onkeypress="return check_minute(event, &quot;'.$id.'_mmform_id_temp&quot;)" onkeyup="change_minute(event, &quot;'.$id.'_mmform_id_temp&quot;)" onblur="add_0(&quot;'.$id.'_mmform_id_temp&quot;)" '.$param['attributes'].' disabled/></div>'.$w_sec.$w_time_type.'</div><div id="'.$id.'_tr_time2" style="display: table-row;"><div id="'.$id.'_td_time_label1" style="display: table-cell;"><label class="mini_label" id="'.$id.'_mini_label_hh">'.$w_mini_labels[0].'</label></div><div style="display: table-cell;"></div><div id="'.$id.'_td_time_label2" style="display: table-cell;"><label class="mini_label" id="'.$id.'_mini_label_mm">'.$w_mini_labels[1].'</label></div>'.$w_sec_label.$w_time_type_label.'</div></div></div></div>';
1113
 
1114
  break;
1115
  }
@@ -1144,12 +1267,18 @@ class FMModelManage_fm {
1144
  break;
1145
  }
1146
 
 
 
1147
  case 'type_date_new':
1148
  {
1149
 
1150
  $params_names=array('w_field_label_size','w_field_label_pos', 'w_size', 'w_date','w_required', 'w_show_image', 'w_class','w_format', 'w_start_day', 'w_default_date', 'w_min_date', 'w_max_date', 'w_invalid_dates', 'w_show_days', 'w_hide_time', 'w_but_val', 'w_disable_past_days');
1151
  $temp = $params;
1152
 
 
 
 
 
1153
  foreach($params_names as $params_name )
1154
  {
1155
  $temp=explode('*:*'.$params_name.'*:*',$temp);
@@ -1171,15 +1300,20 @@ class FMModelManage_fm {
1171
 
1172
 
1173
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
 
1174
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
1175
  $param['w_disable_past_days'] = isset($param['w_disable_past_days']) ? $param['w_disable_past_days'] : 'no';
1176
  $disable_past_days = $param['w_disable_past_days'] == 'yes' ? 'true' : 'false';
1177
  $display_image_date = $param['w_show_image'] == 'yes' ? 'inline' : 'none';
1178
 
1179
 
1180
- $rep ='<div id="wdform_field'.$id.'" type="type_date_new" 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_date_new" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_id_temp">
1181
  <input type="hidden" value="'.$param['w_required'].'" name="'.$id.'_requiredform_id_temp" id="'.$id.'_requiredform_id_temp">
1182
 
 
 
1183
  <input type="hidden" value="'.$param['w_show_image'].'" name="'.$id.'_show_imageform_id_temp" id="'.$id.'_show_imageform_id_temp">
1184
 
1185
  <input type="hidden" value="'.$param['w_disable_past_days'].'" name="'.$id.'_dis_past_daysform_id_temp" id="'.$id.'_dis_past_daysform_id_temp">
@@ -1213,6 +1347,9 @@ class FMModelManage_fm {
1213
  $params_names=array('w_field_label_size','w_field_label_pos', 'w_size', 'w_date','w_required', 'w_show_image', 'w_class','w_format', 'w_start_day', 'w_default_date_start', 'w_default_date_end', 'w_min_date', 'w_max_date', 'w_invalid_dates', 'w_show_days', 'w_hide_time', 'w_but_val', 'w_disable_past_days');
1214
  $temp = $params;
1215
 
 
 
 
1216
 
1217
  foreach($params_names as $params_name )
1218
  {
@@ -1236,17 +1373,23 @@ class FMModelManage_fm {
1236
  $defaul_day_end = $defaul_day_array[1];
1237
 
1238
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
 
 
1239
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
1240
  $param['w_disable_past_days'] = isset($param['w_disable_past_days']) ? $param['w_disable_past_days'] : 'no';
1241
  $disable_past_days = $param['w_disable_past_days'] == 'yes' ? 'true' : 'false';
1242
  $display_image_date = $param['w_show_image'] == 'yes' ? 'inline' : 'none';
1243
 
1244
- $rep ='<div id="wdform_field'.$id.'" type="type_date_range" 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'].';">
1245
 
1246
  <input type="hidden" value="type_date_range" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_id_temp">
1247
 
1248
  <input type="hidden" value="'.$param['w_required'].'" name="'.$id.'_requiredform_id_temp" id="'.$id.'_requiredform_id_temp">
1249
 
 
 
1250
  <input type="hidden" value="'.$param['w_show_image'].'" name="'.$id.'_show_imageform_id_temp" id="'.$id.'_show_imageform_id_temp">
1251
 
1252
  <input type="hidden" value="'.$param['w_disable_past_days'].'" name="'.$id.'_dis_past_daysform_id_temp" id="'.$id.'_dis_past_daysform_id_temp">
@@ -1289,11 +1432,19 @@ class FMModelManage_fm {
1289
  }
1290
 
1291
 
 
 
 
1292
  case 'type_date_fields':
1293
  {
1294
  $params_names=array('w_field_label_size','w_field_label_pos','w_day','w_month','w_year','w_day_type','w_month_type','w_year_type','w_day_label','w_month_label','w_year_label','w_day_size','w_month_size','w_year_size','w_required','w_class','w_from','w_to','w_divider');
1295
 
1296
  $temp=$params;
 
 
 
 
 
1297
  foreach($params_names as $params_name )
1298
  {
1299
  $temp=explode('*:*'.$params_name.'*:*',$temp);
@@ -1310,6 +1461,9 @@ class FMModelManage_fm {
1310
  }
1311
 
1312
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
 
1313
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
1314
 
1315
 
@@ -1382,7 +1536,7 @@ class FMModelManage_fm {
1382
  }
1383
 
1384
 
1385
- $rep ='<div id="wdform_field'.$id.'" type="type_date_fields" 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_date_fields" 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"><div id="'.$id.'_table_date" style="display: table;"><div id="'.$id.'_tr_date1" style="display: table-row;"><div id="'.$id.'_td_date_input1" style="display: table-cell;">
1386
  '.$w_day_type.'
1387
 
1388
  </div><div id="'.$id.'_td_date_separator1" style="display: table-cell;"><span id="'.$id.'_separator1" class="wdform_separator">'.$param['w_divider'].'</span></div><div id="'.$id.'_td_date_input2" style="display: table-cell;">'.$w_month_type.'</div><div id="'.$id.'_td_date_separator2" style="display: table-cell;"><span id="'.$id.'_separator2" class="wdform_separator">'.$param['w_divider'].'</span></div><div id="'.$id.'_td_date_input3" style="display: table-cell;">'.$w_year_type.'</div></div><div id="'.$id.'_tr_date2" style="display: table-row;"><div id="'.$id.'_td_date_label1" style="display: table-cell;"><label class="mini_label" id="'.$id.'_day_label">'.$param['w_day_label'].'</label></div><div style="display: table-cell;"></div><div id="'.$id.'_td_date_label2" style="display: table-cell;"><label class="mini_label" id="'.$id.'_month_label">'.$param['w_month_label'].'</label></div><div style="display: table-cell;"></div><div id="'.$id.'_td_date_label3" style="display: table-cell;"><label class="mini_label" id="'.$id.'_year_label">'.$param['w_year_label'].'</label></div></div></div></div></div>';
@@ -1393,6 +1547,11 @@ class FMModelManage_fm {
1393
  {
1394
  $params_names=array('w_field_label_size','w_field_label_pos','w_destination','w_extension','w_max_size','w_required','w_multiple','w_class');
1395
  $temp=$params;
 
 
 
 
 
1396
  foreach($params_names as $params_name )
1397
  {
1398
  $temp=explode('*:*'.$params_name.'*:*',$temp);
@@ -1414,10 +1573,13 @@ class FMModelManage_fm {
1414
  }
1415
 
1416
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
 
1417
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
1418
  $multiple = ($param['w_multiple']=="yes" ? "multiple='multiple'" : "");
1419
 
1420
- $rep ='<div id="wdform_field'.$id.'" type="type_file_upload" 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_file_upload" 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="***max_sizeskizb'.$id.'***'.$param['w_max_size'].'***max_sizeverj'.$id.'***" id="'.$id.'_max_size" name="'.$id.'_max_size"><input type="hidden" value="***destinationskizb'.$id.'***'.$param['w_destination'].'***destinationverj'.$id.'***" id="'.$id.'_destination" name="'.$id.'_destination"><input type="hidden" value="***extensionskizb'.$id.'***'.$param['w_extension'].'***extensionverj'.$id.'***" id="'.$id.'_extension" name="'.$id.'_extension"><input type="file" class="file_upload" id="'.$id.'_elementform_id_temp" name="'.$id.'_fileform_id_temp" '.$multiple.' '.$param['attributes'].' disabled/></div></div>';
1421
 
1422
  break;
1423
  }
@@ -1425,6 +1587,10 @@ class FMModelManage_fm {
1425
  {
1426
  $params_names=array('w_field_label_size','w_field_label_pos','w_digit','w_class');
1427
  $temp=$params;
 
 
 
 
1428
  foreach($params_names as $params_name )
1429
  {
1430
  $temp=explode('*:*'.$params_name.'*:*',$temp);
@@ -1441,8 +1607,11 @@ class FMModelManage_fm {
1441
  }
1442
 
1443
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
1444
-
1445
- $rep ='<div id="wdform_field'.$id.'" type="type_captcha" 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></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_captcha" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_id_temp"><div style="display: table;"><div style="display: table-row;"><div valign="middle" style="display: table-cell;"><img type="captcha" digit="'.$param['w_digit'].'" src="' . add_query_arg(array('action' => 'formmakerwdcaptcha', 'digit' => $param['w_digit'], 'i' => 'form_id_temp'), admin_url('admin-ajax.php')) . '" id="_wd_captchaform_id_temp" class="captcha_img" onclick="captcha_refresh(&quot;_wd_captcha&quot;,&quot;form_id_temp&quot;)" '.$param['attributes'].'></div><div valign="middle" style="display: table-cell;"><div class="captcha_refresh" id="_element_refreshform_id_temp" onclick="captcha_refresh(&quot;_wd_captcha&quot;,&quot;form_id_temp&quot;)" '.$param['attributes'].'></div></div></div><div style="display: table-row;"><div style="display: table-cell;"><input type="text" class="captcha_input" id="_wd_captcha_inputform_id_temp" name="captcha_input" style="width: '.($param['w_digit']*10+15).'px;" '.$param['attributes'].' disabled/></div></div></div></div></div>';
 
 
 
1446
 
1447
  break;
1448
  }
@@ -1450,6 +1619,11 @@ class FMModelManage_fm {
1450
  {
1451
  $params_names=array('w_field_label_size','w_field_label_pos', 'w_count', 'w_operations','w_class', 'w_input_size');
1452
  $temp=$params;
 
 
 
 
 
1453
  foreach($params_names as $params_name )
1454
  {
1455
  $temp=explode('*:*'.$params_name.'*:*',$temp);
@@ -1465,12 +1639,15 @@ class FMModelManage_fm {
1465
  $param['attributes'] = $param['attributes'].' add_'.$attr;
1466
  }
1467
 
1468
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
 
1469
  $param['w_count'] = $param['w_count'] ? $param['w_count'] : 1;
1470
  $param['w_operations'] = $param['w_operations'] ? $param['w_operations'] : '+, -, *, /';
1471
  $param['w_input_size'] = $param['w_input_size'] ? $param['w_input_size'] : 60;
1472
 
1473
- $rep ='<div id="wdform_field'.$id.'" type="type_arithmetic_captcha" 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></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_captcha" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_id_temp"><div style="display: table;"><div style="display: table-row;"><div style="display: table-cell;"><img type="captcha" operations_count="'.$param['w_count'].'" operations="'.$param['w_operations'].'" input_size="'.$param['w_input_size'].'" src="' . add_query_arg(array('action' => 'formmakerwdmathcaptcha', 'operations_count' => $param['w_count'], 'operations' => urlencode($param['w_operations']), 'i' => 'form_id_temp'), admin_url('admin-ajax.php')) . '" id="_wd_arithmetic_captchaform_id_temp" class="arithmetic_captcha_img" onclick="captcha_refresh(&quot;_wd_arithmetic_captcha&quot;,&quot;form_id_temp&quot;)" '.$param['attributes'].'></div><div style="display: table-cell;"><input type="text" class="arithmetic_captcha_input" id="_wd_arithmetic_captcha_inputform_id_temp" name="arithmetic_captcha_input" onkeypress="return check_isnum(event)" style="width: '.$param['w_input_size'].'px;" '.$param['attributes'].' disabled/></div><div style="display: table-cell; vertical-align: middle;"><div class="captcha_refresh" id="_element_refreshform_id_temp" onclick="captcha_refresh(&quot;_wd_arithmetic_captcha&quot;,&quot;form_id_temp&quot;)" '.$param['attributes'].'></div></div></div></div></div></div>';
1474
 
1475
  break;
1476
  }
@@ -1480,6 +1657,10 @@ class FMModelManage_fm {
1480
  {
1481
  $params_names=array('w_field_label_size','w_field_label_pos','w_public','w_private','w_theme','w_class');
1482
  $temp=$params;
 
 
 
 
1483
  foreach($params_names as $params_name )
1484
  {
1485
  $temp=explode('*:*'.$params_name.'*:*',$temp);
@@ -1496,8 +1677,10 @@ class FMModelManage_fm {
1496
  }
1497
 
1498
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
1499
 
1500
- $rep ='<div id="wdform_field'.$id.'" type="type_recaptcha" 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></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_recaptcha" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_id_temp"><div id="wd_recaptchaform_id_temp" public_key="'.$param['w_public'].'" private_key="'.$param['w_private'].'" theme="'.$param['w_theme'].'" '.$param['attributes'].'><span style="color: red; font-style: italic;">Recaptcha doesn\'t display in back end</span></div></div></div>';
1501
 
1502
  break;
1503
  }
@@ -1529,6 +1712,11 @@ class FMModelManage_fm {
1529
  {
1530
  $params_names=array('w_field_label_size','w_field_label_pos','w_center_x','w_center_y','w_long','w_lat','w_zoom','w_width','w_height','w_info','w_class');
1531
  $temp=$params;
 
 
 
 
 
1532
  foreach($params_names as $params_name )
1533
  {
1534
  $temp=explode('*:*'.$params_name.'*:*',$temp);
@@ -1545,8 +1733,10 @@ class FMModelManage_fm {
1545
  }
1546
 
1547
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
1548
 
1549
- $rep ='<div id="wdform_field'.$id.'" type="type_mark_map" 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></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_mark_map" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_id_temp"><div id="'.$id.'_elementform_id_temp" long0="'.$param['w_long'].'" lat0="'.$param['w_lat'].'" zoom="'.$param['w_zoom'].'" info0="'.$param['w_info'].'" center_x="'.$param['w_center_x'].'" center_y="'.$param['w_center_y'].'" style="width: '.$param['w_width'].'px; height: '.$param['w_height'].'px;" '.$param['attributes'].'></div></div></div> ';
1550
 
1551
  break;
1552
  }
@@ -1618,12 +1808,59 @@ class FMModelManage_fm {
1618
  break;
1619
  }
1620
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1621
  case 'type_paypal_select':
1622
  {
1623
  $params_names=array('w_field_label_size','w_field_label_pos','w_size','w_choices','w_choices_price','w_choices_checked', 'w_choices_disabled','w_required','w_quantity', 'w_quantity_value','w_class','w_property','w_property_values');
1624
  $temp=$params;
1625
  if(strpos($temp, 'w_choices_params') > -1)
1626
  $params_names=array('w_field_label_size','w_field_label_pos','w_size','w_choices','w_choices_price','w_choices_checked', 'w_choices_disabled','w_required','w_quantity', 'w_quantity_value', 'w_choices_params', 'w_class', 'w_property', 'w_property_values');
 
 
 
 
1627
  foreach($params_names as $params_name )
1628
  {
1629
  $temp=explode('*:*'.$params_name.'*:*',$temp);
@@ -1640,6 +1877,10 @@ class FMModelManage_fm {
1640
  }
1641
 
1642
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
 
 
1643
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
1644
  $param['w_choices'] = explode('***',$param['w_choices']);
1645
 
@@ -1661,7 +1902,7 @@ class FMModelManage_fm {
1661
  }
1662
 
1663
 
1664
- $rep='<div id="wdform_field'.$id.'" type="type_paypal_select" 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_select" 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"><select id="'.$id.'_elementform_id_temp" name="'.$id.'_elementform_id_temp" onchange="set_select(this)" style="width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled>';
1665
  foreach($param['w_choices'] as $key => $choice)
1666
  {
1667
  $where = '';
@@ -1711,6 +1952,9 @@ class FMModelManage_fm {
1711
  $temp=$params;
1712
  if(strpos($temp, 'w_field_option_pos') > -1)
1713
  $params_names=array('w_field_label_size','w_field_label_pos', 'w_field_option_pos', 'w_flow','w_choices','w_choices_price','w_choices_checked','w_required','w_randomize','w_allow_other','w_allow_other_num', 'w_choices_params', 'w_class','w_property','w_property_values','w_quantity','w_quantity_value');
 
 
 
1714
  foreach($params_names as $params_name )
1715
  {
1716
  $temp=explode('*:*'.$params_name.'*:*',$temp);
@@ -1728,7 +1972,10 @@ class FMModelManage_fm {
1728
  if(!isset($param['w_field_option_pos']))
1729
  $param['w_field_option_pos'] = 'left';
1730
 
1731
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
 
1732
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
1733
  $param['w_choices'] = explode('***',$param['w_choices']);
1734
  $param['w_choices_price'] = explode('***',$param['w_choices_price']);
@@ -1747,7 +1994,7 @@ class FMModelManage_fm {
1747
  $param['w_choices_checked'][$key]='';
1748
  }
1749
 
1750
- $rep='<div id="wdform_field'.$id.'" type="type_paypal_checkbox" 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="wd_form_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_checkbox" 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_randomize'].'" name="'.$id.'_randomizeform_id_temp" id="'.$id.'_randomizeform_id_temp"><input type="hidden" value="'.$param['w_allow_other'].'" name="'.$id.'_allow_otherform_id_temp" id="'.$id.'_allow_otherform_id_temp"><input type="hidden" value="'.$param['w_allow_other_num'].'" name="'.$id.'_allow_other_numform_id_temp" id="'.$id.'_allow_other_numform_id_temp"><input type="hidden" value="'.$param['w_field_option_pos'].'" id="'.$id.'_option_left_right"><div style="display: table;"><div id="'.$id.'_table_little" style="display: table-row-group;">';
1751
 
1752
  if($param['w_flow']=='hor')
1753
  {
@@ -1823,6 +2070,8 @@ class FMModelManage_fm {
1823
  $temp=$params;
1824
  if(strpos($temp, 'w_field_option_pos') > -1)
1825
  $params_names=array('w_field_label_size','w_field_label_pos', 'w_field_option_pos', 'w_flow','w_choices','w_choices_price','w_choices_checked','w_required','w_randomize','w_allow_other','w_allow_other_num', 'w_choices_params', 'w_class','w_property','w_property_values','w_quantity','w_quantity_value');
 
 
1826
  foreach($params_names as $params_name )
1827
  {
1828
  $temp=explode('*:*'.$params_name.'*:*',$temp);
@@ -1840,6 +2089,10 @@ class FMModelManage_fm {
1840
  if(!isset($param['w_field_option_pos']))
1841
  $param['w_field_option_pos'] = 'left';
1842
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
 
 
1843
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
1844
  $param['w_choices'] = explode('***',$param['w_choices']);
1845
 
@@ -1861,7 +2114,7 @@ class FMModelManage_fm {
1861
  $param['w_choices_checked'][$key]='';
1862
  }
1863
 
1864
- $rep='<div id="wdform_field'.$id.'" type="type_paypal_radio" 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="wd_form_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_radio" 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_randomize'].'" name="'.$id.'_randomizeform_id_temp" id="'.$id.'_randomizeform_id_temp"><input type="hidden" value="'.$param['w_allow_other'].'" name="'.$id.'_allow_otherform_id_temp" id="'.$id.'_allow_otherform_id_temp"><input type="hidden" value="'.$param['w_allow_other_num'].'" name="'.$id.'_allow_other_numform_id_temp" id="'.$id.'_allow_other_numform_id_temp"><input type="hidden" value="'.$param['w_field_option_pos'].'" id="'.$id.'_option_left_right"><div style="display: table;"><div id="'.$id.'_table_little" style="display: table-row-group;">';
1865
 
1866
  if($param['w_flow']=='hor')
1867
  {
@@ -1935,10 +2188,15 @@ class FMModelManage_fm {
1935
  case 'type_paypal_shipping':
1936
  {
1937
 
1938
- $params_names=array('w_field_label_size','w_field_label_pos', 'w_field_option_pos', 'w_flow','w_choices','w_choices_price','w_choices_checked','w_required','w_randomize','w_allow_other','w_allow_other_num','w_class');
1939
  $temp=$params;
 
1940
  if(strpos($temp, 'w_field_option_pos') > -1)
1941
- $params_names=array('w_field_label_size','w_field_label_pos', 'w_flow','w_choices','w_choices_price','w_choices_checked','w_required','w_randomize','w_allow_other','w_allow_other_num','w_choices_params','w_class');
 
 
 
 
1942
  foreach($params_names as $params_name )
1943
  {
1944
  $temp=explode('*:*'.$params_name.'*:*',$temp);
@@ -1957,6 +2215,13 @@ class FMModelManage_fm {
1957
  $param['w_field_option_pos'] = 'left';
1958
 
1959
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
 
 
 
 
 
1960
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
1961
  $param['w_choices'] = explode('***',$param['w_choices']);
1962
 
@@ -1975,7 +2240,7 @@ class FMModelManage_fm {
1975
  $param['w_choices_checked'][$key]='';
1976
  }
1977
 
1978
- $rep='<div id="wdform_field'.$id.'" type="type_paypal_shipping" 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="wd_form_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'].'; vertical-align:top;"><input type="hidden" value="type_paypal_shipping" 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_randomize'].'" name="'.$id.'_randomizeform_id_temp" id="'.$id.'_randomizeform_id_temp"><input type="hidden" value="'.$param['w_allow_other'].'" name="'.$id.'_allow_otherform_id_temp" id="'.$id.'_allow_otherform_id_temp"><input type="hidden" value="'.$param['w_allow_other_num'].'" name="'.$id.'_allow_other_numform_id_temp" id="'.$id.'_allow_other_numform_id_temp"><input type="hidden" value="'.$param['w_field_option_pos'].'" id="'.$id.'_option_left_right"><div style="display: table;"><div id="'.$id.'_table_little" style="display: table-row-group;">';
1979
 
1980
  if($param['w_flow']=='hor')
1981
  {
@@ -2027,7 +2292,44 @@ class FMModelManage_fm {
2027
  }
2028
  case 'type_paypal_total':
2029
  {
2030
- $params_names=array('w_field_label_size','w_field_label_pos','w_class');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2031
  $temp=$params;
2032
  foreach($params_names as $params_name )
2033
  {
@@ -2045,12 +2347,8 @@ class FMModelManage_fm {
2045
  }
2046
 
2047
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
2048
-
2049
-
2050
-
2051
- $rep='<div id="wdform_field'.$id.'" type="type_paypal_total" 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">'.$label.'</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_total" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_id_temp"><div id="'.$id.'paypal_totalform_id_temp" class="wdform_paypal_total paypal_totalform_id_temp"><input type="hidden" value="" name="'.$id.'_paypal_totalform_id_temp" class="input_paypal_totalform_id_temp"><div id="'.$id.'div_totalform_id_temp" class="div_totalform_id_temp" style="margin-bottom: 10px;"><!--repstart-->$300<!--repend--></div><div id="'.$id.'paypal_productsform_id_temp" class="paypal_productsform_id_temp" style="border-spacing: 2px;"><div style="border-spacing: 2px;"><!--repstart-->product 1 $100<!--repend--></div><div style="border-spacing: 2px;"><!--repstart-->product 2 $200<!--repend--></div></div><div id="'.$id.'paypal_taxform_id_temp" class="paypal_taxform_id_temp" style="border-spacing: 2px; margin-top: 7px;"></div></div></div></div>';
2052
-
2053
-
2054
  break;
2055
  }
2056
 
@@ -2058,6 +2356,10 @@ class FMModelManage_fm {
2058
  {
2059
  $params_names=array('w_field_label_size','w_field_label_pos','w_field_label_col','w_star_amount','w_required','w_class');
2060
  $temp=$params;
 
 
 
 
2061
  foreach($params_names as $params_name )
2062
  {
2063
  $temp=explode('*:*'.$params_name.'*:*',$temp);
@@ -2072,7 +2374,10 @@ class FMModelManage_fm {
2072
  foreach($attrs as $attr)
2073
  $param['attributes'] = $param['attributes'].' add_'.$attr;
2074
  }
2075
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
 
2076
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
2077
 
2078
 
@@ -2082,7 +2387,7 @@ class FMModelManage_fm {
2082
  $images .= '<img id="'.$id.'_star_'.$i.'" src="' . WD_FM_URL . '/images/star.png?ver='. get_option("wd_form_maker_version").'" onmouseover="change_src('.$i.','.$id.',&quot;form_id_temp&quot;)" onmouseout="reset_src('.$i.','.$id.')" onclick="select_star_rating('.$i.','.$id.', &quot;form_id_temp&quot;)">';
2083
  }
2084
 
2085
- $rep ='<div id="wdform_field'.$id.'" type="type_star_rating" 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">'.$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_star_rating" 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_star_amount'].'" id="'.$id.'_star_amountform_id_temp" name="'.$id.'_star_amountform_id_temp"><input type="hidden" value="'.$param['w_field_label_col'].'" name="'.$id.'_star_colorform_id_temp" id="'.$id.'_star_colorform_id_temp"><div id="'.$id.'_elementform_id_temp" class="wdform_stars" '.$param['attributes'].'>'.$images.'</div></div></div>';
2086
 
2087
 
2088
  break;
@@ -2091,6 +2396,10 @@ class FMModelManage_fm {
2091
  {
2092
  $params_names=array('w_field_label_size','w_field_label_pos','w_mini_labels','w_scale_amount','w_required','w_class');
2093
  $temp=$params;
 
 
 
 
2094
  foreach($params_names as $params_name )
2095
  {
2096
  $temp=explode('*:*'.$params_name.'*:*',$temp);
@@ -2106,6 +2415,10 @@ class FMModelManage_fm {
2106
  $param['attributes'] = $param['attributes'].' add_'.$attr;
2107
  }
2108
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
 
 
2109
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
2110
 
2111
  $w_mini_labels = explode('***',$param['w_mini_labels']);
@@ -2123,7 +2436,7 @@ class FMModelManage_fm {
2123
  $radio_buttons .= '<div id="'.$id.'_scale_td2_'.$k.'form_id_temp" style="display: table-cell;"><input id="'.$id.'_scale_radioform_id_temp_'.$k.'" name="'.$id.'_scale_radioform_id_temp" value="'.$k.'" type="radio"></div>';
2124
  }
2125
 
2126
- $rep ='<div id="wdform_field'.$id.'" type="type_scale_rating" 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'].'; vertical-align: top; width: '.$param['w_field_label_size'].'px;"><span id="'.$id.'_element_labelform_id_temp" class="label">'.$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_scale_rating" 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_scale_amount'].'" id="'.$id.'_scale_amountform_id_temp" name="'.$id.'_scale_amountform_id_temp"><div id="'.$id.'_elementform_id_temp" style="float: left;" '.$param['attributes'].'><label class="mini_label" id="'.$id.'_mini_label_worst" style="position: relative; top: 6px; font-size: 11px; display: inline-table;">'.$w_mini_labels[0].'</label><div id="'.$id.'_scale_tableform_id_temp" style="display: inline-table;"><div id="'.$id.'_scale_tr1form_id_temp" style="display: table-row;">'.$numbers.'</div><div id="'.$id.'_scale_tr2form_id_temp" style="display: table-row;">'.$radio_buttons.'</div></div><label class="mini_label" id="'.$id.'_mini_label_best" style="position: relative; top: 6px; font-size: 11px; display: inline-table;">'.$w_mini_labels[1].'</label></div></div></div>';
2127
 
2128
  break;
2129
  }
@@ -2131,6 +2444,11 @@ class FMModelManage_fm {
2131
  {
2132
  $params_names=array('w_field_label_size','w_field_label_pos','w_field_width','w_field_min_value','w_field_max_value', 'w_field_step', 'w_field_value', 'w_required','w_class');
2133
  $temp=$params;
 
 
 
 
 
2134
  foreach($params_names as $params_name ) {
2135
  $temp=explode('*:*'.$params_name.'*:*',$temp);
2136
  $param[$params_name] = $temp[0];
@@ -2142,14 +2460,22 @@ class FMModelManage_fm {
2142
  foreach($attrs as $attr)
2143
  $param['attributes'] = $param['attributes'].' add_'.$attr;
2144
  }
2145
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
 
2146
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
2147
- $rep ='<div id="wdform_field'.$id.'" type="type_spinner" 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">'.$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_spinner" 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_field_width'].'" name="'.$id.'_spinner_widthform_id_temp" id="'.$id.'_spinner_widthform_id_temp"><input type="hidden" value="'.$param['w_field_min_value'].'" id="'.$id.'_min_valueform_id_temp" name="'.$id.'_min_valueform_id_temp"><input type="hidden" value="'.$param['w_field_max_value'].'" name="'.$id.'_max_valueform_id_temp" id="'.$id.'_max_valueform_id_temp"><input type="hidden" value="'.$param['w_field_step'].'" name="'.$id.'_stepform_id_temp" id="'.$id.'_stepform_id_temp"><input type="" value="'.($param['w_field_value']!= 'null' ? $param['w_field_value'] : '').'" name="'.$id.'_elementform_id_temp" id="'.$id.'_elementform_id_temp" onkeypress="return check_isnum_or_minus(event)" style="width: '.$param['w_field_width'].'px;" '.$param['attributes'].' disabled/></div></div>';
 
2148
  break;
2149
  }
2150
  case 'type_slider': {
2151
  $params_names=array('w_field_label_size','w_field_label_pos','w_field_width','w_field_min_value','w_field_max_value', 'w_field_value', 'w_required','w_class');
2152
  $temp=$params;
 
 
 
 
2153
  foreach($params_names as $params_name ) {
2154
  $temp = explode('*:*'.$params_name.'*:*',$temp);
2155
  $param[$params_name] = $temp[0];
@@ -2163,13 +2489,21 @@ class FMModelManage_fm {
2163
  }
2164
  }
2165
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
 
 
2166
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
2167
- $rep ='<div id="wdform_field'.$id.'" type="type_slider" 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'].'; vertical-align: top; width: '.$param['w_field_label_size'].'px;"><span id="'.$id.'_element_labelform_id_temp" class="label">'.$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_slider" 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_field_width'].'" name="'.$id.'_slider_widthform_id_temp" id="'.$id.'_slider_widthform_id_temp"><input type="hidden" value="'.$param['w_field_min_value'].'" id="'.$id.'_slider_min_valueform_id_temp" name="'.$id.'_slider_min_valueform_id_temp"><input type="hidden" value="'.$param['w_field_max_value'].'" id="'.$id.'_slider_max_valueform_id_temp" name="'.$id.'_slider_max_valueform_id_temp"><input type="hidden" value="'.$param['w_field_value'].'" id="'.$id.'_slider_valueform_id_temp" name="'.$id.'_slider_valueform_id_temp"><div id="'.$id.'_slider_tableform_id_temp"><div><div id="'.$id.'_slider_td1form_id_temp"><div name="'.$id.'_elementform_id_temp" id="'.$id.'_elementform_id_temp" style="width: '.$param['w_field_width'].'px;" '.$param['attributes'].'"></div></div></div><div><div align="left" id="'.$id.'_slider_td2form_id_temp" style="display: inline-table; width: 33.3%; text-align: left;"><span id="'.$id.'_element_minform_id_temp" class="label">'.$param['w_field_min_value'].'</span></div><div align="right" id="'.$id.'_slider_td3form_id_temp" style="display: inline-table; width: 33.3%; text-align: center;"><span id="'.$id.'_element_valueform_id_temp" class="label">'.$param['w_field_value'].'</span></div><div align="right" id="'.$id.'_slider_td4form_id_temp" style="display: inline-table; width: 33.3%; text-align: right;"><span id="'.$id.'_element_maxform_id_temp" class="label">'.$param['w_field_max_value'].'</span></div></div></div></div></div>';
2168
  break;
2169
  }
2170
  case 'type_range': {
2171
  $params_names = array('w_field_label_size','w_field_label_pos','w_field_range_width','w_field_range_step','w_field_value1', 'w_field_value2', 'w_mini_labels', 'w_required','w_class');
2172
  $temp = $params;
 
 
 
 
2173
  foreach ($params_names as $params_name ) {
2174
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2175
  $param[$params_name] = $temp[0];
@@ -2183,14 +2517,22 @@ class FMModelManage_fm {
2183
  }
2184
  }
2185
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
 
2186
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
2187
  $w_mini_labels = explode('***',$param['w_mini_labels']);
2188
- $rep ='<div id="wdform_field'.$id.'" type="type_range" 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">'.$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_range" 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_field_range_width'].'" name="'.$id.'_range_widthform_id_temp" id="'.$id.'_range_widthform_id_temp"><input type="hidden" value="'.$param['w_field_range_step'].'" name="'.$id.'_range_stepform_id_temp" id="'.$id.'_range_stepform_id_temp"><div id="'.$id.'_elemet_table_littleform_id_temp" style="display: table;"><div style="display: table-row;"><div valign="middle" align="left" style="display: table-cell;"><input type="" value="'.($param['w_field_value1']!= 'null' ? $param['w_field_value1'] : '').'" name="'.$id.'_elementform_id_temp0" id="'.$id.'_elementform_id_temp0" onkeypress="return check_isnum_or_minus(event)" style="width: '.$param['w_field_range_width'].'px;" '.$param['attributes'].' disabled/></div><div valign="middle" align="left" style="display: table-cell; padding-left: 4px;"><input type="" value="'.($param['w_field_value2']!= 'null' ? $param['w_field_value2'] : '').'" name="'.$id.'_elementform_id_temp1" id="'.$id.'_elementform_id_temp1" onkeypress="return check_isnum_or_minus(event)" style="width: '.$param['w_field_range_width'].'px;" '.$param['attributes'].' disabled/></div></div><div style="display: table-row;"><div valign="top" align="left" style="display: table-cell;"><label class="mini_label" id="'.$id.'_mini_label_from">'.$w_mini_labels[0].'</label></div><div valign="top" align="left" style="display: table-cell;"><label class="mini_label" id="'.$id.'_mini_label_to">'.$w_mini_labels[1].'</label></div></div></div></div></div>';
2189
  break;
2190
  }
2191
  case 'type_grading': {
2192
  $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_items', 'w_total', 'w_required', 'w_class');
2193
  $temp = $params;
 
 
 
 
 
2194
  foreach($params_names as $params_name) {
2195
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2196
  $param[$params_name] = $temp[0];
@@ -2204,6 +2546,10 @@ class FMModelManage_fm {
2204
  }
2205
  }
2206
  $param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "table-cell" : "block");
 
 
 
 
2207
  $required_sym = ($param['w_required'] == "yes" ? " *" : "");
2208
  $w_items = explode('***', $param['w_items']);
2209
  $grading_items = '';
@@ -2212,13 +2558,18 @@ class FMModelManage_fm {
2212
  $grading_items .= '<div id="'.$id.'_element_div'.$i.'" class="grading"><input id="'.$id.'_elementform_id_temp_'.$i.'" name="'.$id.'_elementform_id_temp_'.$i.'" onkeypress="return check_isnum_or_minus(event)" value="" size="5" onkeyup="sum_grading_values('.$id.',&quot;form_id_temp&quot;)" onchange="sum_grading_values('.$id.',&quot;form_id_temp&quot;)" '.$param['attributes'].' disabled/><label id="'.$id.'_label_elementform_id_temp'.$i.'" class="ch-rad-label">'.$w_items[$i].'</label></div>';
2213
  }
2214
 
2215
- $rep ='<div id="wdform_field'.$id.'" type="type_grading" 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'].'; vertical-align: top; width: '.$param['w_field_label_size'].'px;"><span id="'.$id.'_element_labelform_id_temp" class="label">'.$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_grading" 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_total'].'" name="'.$id.'_grading_totalform_id_temp" id="'.$id.'_grading_totalform_id_temp"><div id="'.$id.'_elementform_id_temp">'.$grading_items.'<div id="'.$id.'_element_total_divform_id_temp" class="grading_div">Total:<span id="'.$id.'_sum_elementform_id_temp" name="'.$id.'_sum_elementform_id_temp">0</span>/<span id="'.$id.'_total_elementform_id_temp" name="'.$id.'_total_elementform_id_temp">'.$param['w_total'].'</span><span id="'.$id.'_text_elementform_id_temp" name="'.$id.'_text_elementform_id_temp"></span></div></div></div></div>';
2216
 
2217
  break;
2218
  }
2219
  case 'type_matrix': {
2220
  $params_names=array('w_field_label_size','w_field_label_pos', 'w_field_input_type', 'w_rows', 'w_columns', 'w_required','w_class','w_textbox_size');
2221
  $temp = $params;
 
 
 
 
 
2222
  foreach ($params_names as $params_name) {
2223
  $temp = explode('*:*'.$params_name.'*:*',$temp);
2224
  $param[$params_name] = $temp[0];
@@ -2232,6 +2583,9 @@ class FMModelManage_fm {
2232
  }
2233
  }
2234
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
 
 
 
2235
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
2236
  $param['w_textbox_size'] = isset($param['w_textbox_size']) ? $param['w_textbox_size'] : '100';
2237
  $w_rows = explode('***',$param['w_rows']);
@@ -2268,7 +2622,7 @@ class FMModelManage_fm {
2268
 
2269
 
2270
 
2271
- $rep ='<div id="wdform_field'.$id.'" type="type_matrix" 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">'.$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_matrix" 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_field_input_type'].'" name="'.$id.'_input_typeform_id_temp" id="'.$id.'_input_typeform_id_temp"><input type="hidden" value="'.$param['w_textbox_size'].'" name="'.$id.'_textbox_sizeform_id_temp" id="'.$id.'_textbox_sizeform_id_temp"><div id="'.$id.'_elementform_id_temp" style="display: table;" '.$param['attributes'].'><div id="'.$id.'_table_little" style="display: table-row-group;"><div id="'.$id.'_element_tr0" style="display: table-row;"><div id="'.$id.'_element_td0_0" style="display: table-cell;"></div>'.$column_labels.'</div>'.$rows_columns.'</div></div></div></div>';
2272
 
2273
  break;
2274
  }
@@ -2288,7 +2642,7 @@ class FMModelManage_fm {
2288
  }
2289
  }
2290
  $param['w_act'] = ($param['w_act']=="false" ? 'style="display: none;"' : "");
2291
- $rep='<div id="wdform_field'.$id.'" type="type_submit_reset" 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;">type_submit_reset_'.$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_submit_reset" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_id_temp"><button type="button" class="button-submit" id="'.$id.'_element_submitform_id_temp" value="'.$param['w_submit_title'].'" onclick="check_required(&quot;submit&quot;, &quot;form_id_temp&quot;);" '.$param['attributes'].'>'.$param['w_submit_title'].'</button><button type="button" class="button-reset" id="'.$id.'_element_resetform_id_temp" value="'.$param['w_reset_title'].'" onclick="check_required(&quot;reset&quot;);" '.$param['w_act'].' '.$param['attributes'].'>'.$param['w_reset_title'].'</button></div></div>';
2292
  break;
2293
  }
2294
  case 'type_button': {
@@ -2374,6 +2728,12 @@ class FMModelManage_fm {
2374
  $row->reply_to_user = '';
2375
  $row->save_uploads = 1;
2376
 
 
 
 
 
 
 
2377
  $row->condition = '';
2378
  $row->mail_cc = '';
2379
  $row->mail_cc_user = '';
@@ -2396,7 +2756,7 @@ class FMModelManage_fm {
2396
 
2397
  public function get_theme_rows_data($old = '') {
2398
  global $wpdb;
2399
- $rows = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "formmaker_themes WHERE css " . ($old ? 'NOT' : '') . " LIKE '%.wdform_section%' ORDER BY title");
2400
  return $rows;
2401
  }
2402
 
@@ -2420,7 +2780,7 @@ class FMModelManage_fm {
2420
 
2421
  public function page_nav() {
2422
  global $wpdb;
2423
- $where = 'WHERE `id` NOT IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')';
2424
  $where .= ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? ' AND title LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
2425
  $query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "formmaker " . $where;
2426
  $total = $wpdb->get_var($query);
@@ -2434,6 +2794,87 @@ class FMModelManage_fm {
2434
  $page_nav['limit'] = (int) ($limit / 20 + 1);
2435
  return $page_nav;
2436
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2437
  ////////////////////////////////////////////////////////////////////////////////////////
2438
  // Getters & Setters //
2439
  ////////////////////////////////////////////////////////////////////////////////////////
20
  ////////////////////////////////////////////////////////////////////////////////////////
21
  public function get_rows_data() {
22
  global $wpdb;
23
+ $where = 'WHERE `id` NOT IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')';
24
  $where .= ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? ' AND title LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
25
  $asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'desc') ? 'desc' : 'asc');
26
+ $order_by_array = array('id', 'title', 'mail');
27
+ $order_by = isset($_POST['order_by']) && in_array(esc_html(stripslashes($_POST['order_by'])), $order_by_array) ? esc_html(stripslashes($_POST['order_by'])) : 'id';
28
  $order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
29
  if (isset($_POST['page_number']) && $_POST['page_number']) {
30
+ $limit = ((int)$_POST['page_number'] - 1) * 20;
31
  }
32
  else {
33
  $limit = 0;
91
  $row->mail_from_name_user = '';
92
  $row->reply_to_user = '';
93
  $row->save_uploads = 1;
94
+ $row->header_title = '';
95
+ $row->header_description = '';
96
+ $row->header_image_url = '';
97
+ $row->header_image_animation = '';
98
+ $row->header_hide_image = '';
99
  }
100
  return $row;
101
  }
159
  }
160
 
161
  case 'type_send_copy':
162
+ case 'type_stripe':
163
  case 'type_captcha':
164
+ case 'type_arithmetic_captcha':
165
  case 'type_recaptcha':
166
  {
167
  $arrows =$arrows.'<div id="wdform_arrows'.$id.'" class="wdform_arrows"><div id="X_'.$id.'" valign="middle" align="right" class="element_toolbar"><img src="' . WD_FM_URL . '/images/delete_el.png?ver='. get_option("wd_form_maker_version").'" title="Remove the field" onclick="remove_row(&quot;'.$id.'&quot;)" onmouseover="chnage_icons_src(this,&quot;delete_el&quot;)" onmouseout="chnage_icons_src(this,&quot;delete_el&quot;)"></div><div id="left_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/left.png?ver='. get_option("wd_form_maker_version").'" title="Move the field to the left" onclick="left_row(&quot;'.$id.'&quot;)" onmouseover="chnage_icons_src(this,&quot;left&quot;)" onmouseout="chnage_icons_src(this,&quot;left&quot;)"></div><div id="up_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/up.png?ver='. get_option("wd_form_maker_version").'" title="Move the field up" onclick="up_row(&quot;'.$id.'&quot;)" onmouseover="chnage_icons_src(this,&quot;up&quot;)" onmouseout="chnage_icons_src(this,&quot;up&quot;)"></div><div id="down_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/down.png?ver='. get_option("wd_form_maker_version").'" title="Move the field down" onclick="down_row(&quot;'.$id.'&quot;)" onmouseover="chnage_icons_src(this,&quot;down&quot;)" onmouseout="chnage_icons_src(this,&quot;down&quot;)"></div><div id="right_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/right.png?ver='. get_option("wd_form_maker_version").'" title="Move the field to the right" onclick="right_row(&quot;'.$id.'&quot;)" onmouseover="chnage_icons_src(this,&quot;right&quot;)" onmouseout="chnage_icons_src(this,&quot;right&quot;)"></div><div id="edit_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/edit.png?ver='. get_option("wd_form_maker_version").'" title="Edit the field" onclick="edit(&quot;'.$id.'&quot;)" onmouseover="chnage_icons_src(this,&quot;edit&quot;)" onmouseout="chnage_icons_src(this,&quot;edit&quot;)"></div><div id="duplicate_'.$id.'" valign="middle" class="element_toolbar"></div><div id="page_up_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/page_up.png?ver='. get_option("wd_form_maker_version").'" title="Move the field to the upper page" onclick="page_up(&quot;'.$id.'&quot;)" onmouseover="chnage_icons_src(this,&quot;page_up&quot;)" onmouseout="chnage_icons_src(this,&quot;page_up&quot;)"></div><div id="page_down_'.$id.'" valign="middle" class="element_toolbar"><img src="' . WD_FM_URL . '/images/page_down.png?ver='. get_option("wd_form_maker_version").'" title="Move the field to the lower page" onclick="page_down(&quot;'.$id.'&quot;)" onmouseover="chnage_icons_src(this,&quot;page_down&quot;)" onmouseout="chnage_icons_src(this,&quot;page_down&quot;)"></div></div>';
175
  }
176
 
177
  }
178
+
179
+
180
+
181
+
182
  switch ($type) {
183
  case 'type_section_break': {
184
  $params_names = array('w_editor');
205
  case 'type_send_copy': {
206
  $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_first_val', 'w_required');
207
  $temp = $params;
208
+
209
+ if(strpos($temp, 'w_hide_label') > -1)
210
+ $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_hide_label', 'w_first_val', 'w_required');
211
+
212
  foreach ($params_names as $params_name ) {
213
  $temp = explode('*:*' . $params_name . '*:*', $temp);
214
  $param[$params_name] = $temp[0];
222
  }
223
  }
224
  $param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "table-cell" : "block");
225
+
226
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
227
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
228
+
229
  $input_active = ($param['w_first_val'] == 'true' ? "checked='checked'" : "");
230
  $required_sym = ($param['w_required'] == "yes" ? " *" : "");
231
+ $rep ='<div id="wdform_field'.$id.'" type="type_send_copy" 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_send_copy" 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="checkbox" id="'.$id.'_elementform_id_temp" name="'.$id.'_elementform_id_temp" onclick="set_checked(&quot;'.$id.'&quot;,&quot;&quot;,&quot;form_id_temp&quot;)" '.$input_active.' '.$param['attributes'].' disabled /></div></div>';
232
  break;
233
  }
234
  case 'type_text': {
236
  $temp = $params;
237
  if(strpos($temp, 'w_regExp_status') > -1)
238
  $params_names = array('w_field_label_size','w_field_label_pos','w_size','w_first_val','w_title','w_required', 'w_regExp_status', 'w_regExp_value', 'w_regExp_common', 'w_regExp_arg', 'w_regExp_alert', 'w_unique');
239
+
240
+ if(strpos($temp, 'w_readonly') > -1)
241
+ $params_names = array('w_field_label_size','w_field_label_pos','w_size','w_first_val','w_title','w_required', 'w_regExp_status', 'w_regExp_value', 'w_regExp_common', 'w_regExp_arg', 'w_regExp_alert', 'w_unique', 'w_readonly');
242
+
243
+ if(strpos($temp, 'w_hide_label') > -1)
244
+ $params_names = array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_size','w_first_val','w_title','w_required', 'w_regExp_status', 'w_regExp_value', 'w_regExp_common', 'w_regExp_arg', 'w_regExp_alert', 'w_unique', 'w_readonly');
245
+
246
  foreach ($params_names as $params_name) {
247
  $temp = explode('*:*' . $params_name . '*:*', $temp);
248
  $param[$params_name] = $temp[0];
255
  $param['attributes'] = $param['attributes'] . ' add_' . $attr;
256
  }
257
  }
258
+
259
+
260
+
261
 
262
  $param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "table-cell" : "block");
263
  $input_active = ($param['w_first_val'] == $param['w_title'] ? "input_deactive" : "input_active");
269
  $param['w_regExp_arg'] = (isset($param['w_regExp_arg']) ? $param['w_regExp_arg'] : "");
270
  $param['w_regExp_alert'] = (isset($param['w_regExp_alert']) ? $param['w_regExp_alert'] : "Incorrect Value");
271
 
272
+ $param['w_readonly'] = (isset($param['w_readonly']) ? $param['w_readonly'] : "no");
273
+
274
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
275
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
276
+
277
+
278
+ $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" class="'.$input_active.'" id="'.$id.'_elementform_id_temp" name="'.$id.'_elementform_id_temp" value="'.$param['w_first_val'].'" title="'.$param['w_title'].'" onfocus="delete_value(&quot;'.$id.'_elementform_id_temp&quot;)" onblur="return_value(&quot;'.$id.'_elementform_id_temp&quot;)" onchange="change_value(&quot;'.$id.'_elementform_id_temp&quot;)" style="width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled /></div></div>';
279
 
280
  break;
281
  }
302
  }
303
  case 'type_password': {
304
  $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_size', 'w_required', 'w_unique', 'w_class');
305
+ $temp = $params;
306
+
307
+ if(strpos($temp, 'w_hide_label') > -1)
308
+ $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_hide_label', 'w_size', 'w_required', 'w_unique', 'w_class');
309
+
310
  if(strpos($temp, 'w_verification') > -1)
311
+ $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_hide_label', 'w_size', 'w_required', 'w_unique', 'w_class', 'w_verification', 'w_verification_label');
312
+
313
+
314
+
315
  foreach ($params_names as $params_name) {
316
  $temp = explode('*:*' . $params_name . '*:*', $temp);
317
  $param[$params_name] = $temp[0];
324
  $param['attributes'] = $param['attributes'] . ' add_' . $attr;
325
  }
326
  }
327
+
328
+ $param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "table-cell" : "block");
329
+
330
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
331
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
332
 
 
 
333
 
334
  if(isset($param['w_verification']) && $param['w_verification'] == "yes"){
335
+ $display_label_confirm = $display_label;
336
  $display_element_confirm = $param['w_field_label_pos'];
337
  }
338
  else{
342
 
343
  $param['w_verification'] = isset($param['w_verification']) ? $param['w_verification'] : "no";
344
  $param['w_verification_label'] = isset($param['w_verification_label']) ? $param['w_verification_label'] : "Password confirmation:";
345
+ $required_sym = ($param['w_required'] == "yes" ? " *" : "");
346
+
347
 
348
  $confirm_password ='<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" class="input_deactive" id="'.$id.'_1_elementform_id_temp" name="'.$id.'_1_elementform_id_temp" style="width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled /></div>';
349
 
350
+
351
+
352
+ $rep ='<div id="wdform_field'.$id.'" type="type_password" 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_password" 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="password" id="'.$id.'_elementform_id_temp" name="'.$id.'_elementform_id_temp" style="width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled /></div>'.$confirm_password.'</div>';
353
  break;
354
+
355
  }
356
  case 'type_textarea': {
357
  $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_size_w', 'w_size_h', 'w_first_val', 'w_title', 'w_required', 'w_unique', 'w_class');
358
  $temp = $params;
359
+
360
+ if(strpos($temp, 'w_hide_label') > -1)
361
+ $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_hide_label', 'w_size_w', 'w_size_h', 'w_first_val', 'w_title', 'w_required', 'w_unique', 'w_class');
362
+
363
+
364
+
365
  foreach ($params_names as $params_name) {
366
  $temp = explode('*:*' . $params_name . '*:*', $temp);
367
  $param[$params_name] = $temp[0];
377
  $param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "table-cell" : "block");
378
  $input_active = ($param['w_first_val'] == $param['w_title'] ? "input_deactive" : "input_active");
379
  $required_sym = ($param['w_required'] == "yes" ? " *" : "");
380
+
381
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
382
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
383
+
384
+
385
+ $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: table-cell;"><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 class="'.$input_active.'" id="'.$id.'_elementform_id_temp" name="'.$id.'_elementform_id_temp" title="'.$param['w_title'].'" onfocus="delete_value(&quot;'.$id.'_elementform_id_temp&quot;)" onblur="return_value(&quot;'.$id.'_elementform_id_temp&quot;)" onchange="change_value(&quot;'.$id.'_elementform_id_temp&quot;)" style="width: '.$param['w_size_w'].'px; height: '.$param['w_size_h'].'px;" '.$param['attributes'].' disabled>'.$param['w_first_val'].'</textarea></div></div>';
386
  break;
387
  }
388
  case 'type_phone': {
389
  $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_size', 'w_first_val', 'w_title', 'w_mini_labels', 'w_required', 'w_unique', 'w_class');
390
  $temp = $params;
391
+
392
+ if(strpos($temp, 'w_hide_label') > -1)
393
+ $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_hide_label', 'w_size', 'w_first_val', 'w_title', 'w_mini_labels', 'w_required', 'w_unique', 'w_class');
394
+
395
+
396
  foreach ($params_names as $params_name) {
397
  $temp = explode('*:*' . $params_name . '*:*', $temp);
398
  $param[$params_name] = $temp[0];
409
  $w_title = explode('***', $param['w_title']);
410
  $w_mini_labels = explode('***', $param['w_mini_labels']);
411
  $param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "table-cell" : "block");
412
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
413
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
414
+
415
  $input_active = ($param['w_first_val'] == $param['w_title'] ? "input_deactive" : "input_active");
416
  $required_sym = ($param['w_required'] == "yes" ? " *" : "");
417
+ $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" class="'.$input_active.'" id="'.$id.'_element_firstform_id_temp" name="'.$id.'_element_firstform_id_temp" value="'.$w_first_val[0].'" title="'.$w_title[0].'" onfocus="delete_value(&quot;'.$id.'_element_firstform_id_temp&quot;)"onblur="return_value(&quot;'.$id.'_element_firstform_id_temp&quot;)"onchange="change_value(&quot;'.$id.'_element_firstform_id_temp&quot;)" 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" class="'.$input_active.'" id="'.$id.'_element_lastform_id_temp" name="'.$id.'_element_lastform_id_temp" value="'.$w_first_val[1].'" title="'.$w_title[1].'" onfocus="delete_value(&quot;'.$id.'_element_lastform_id_temp&quot;)"onblur="return_value(&quot;'.$id.'_element_lastform_id_temp&quot;)" onchange="change_value(&quot;'.$id.'_element_lastform_id_temp&quot;)" 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>';
418
  break;
419
  }
420
 
445
  break;
446
  }
447
 
448
+
449
+ case 'type_name': {
450
  $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_first_val', 'w_title', 'w_mini_labels', 'w_size', 'w_name_format', 'w_required', 'w_unique', 'w_class');
451
  $temp = $params;
452
  if(strpos($temp, 'w_name_fields') > -1)
454
 
455
  if(strpos($temp, 'w_autofill') > -1)
456
  $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_first_val', 'w_title', 'w_mini_labels', 'w_size', 'w_name_format', 'w_required', 'w_unique', 'w_class', 'w_name_fields', 'w_autofill');
457
+
458
+ if(strpos($temp, 'w_hide_label') > -1)
459
+ $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_hide_label', 'w_first_val', 'w_title', 'w_mini_labels', 'w_size', 'w_name_format', 'w_required', 'w_unique', 'w_class', 'w_name_fields');
460
+
461
  foreach ($params_names as $params_name) {
462
  $temp = explode('*:*' . $params_name . '*:*', $temp);
463
  $param[$params_name] = $temp[0];
471
  }
472
  }
473
  $param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "table-cell" : "block");
474
+
475
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
476
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
477
+
478
+
479
  $required_sym = ($param['w_required'] == "yes" ? " *" : "");
480
  $w_first_val = explode('***', $param['w_first_val']);
481
  $w_title = explode('***', $param['w_title']);
498
  $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>';
499
  }
500
 
501
+ $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>';
502
  break;
503
  }
504
  case 'type_address': {
505
  $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_size', 'w_mini_labels', 'w_disabled_fields', 'w_required', 'w_class');
506
  $temp = $params;
507
+
508
+ if(strpos($temp, 'w_hide_label') > -1)
509
+ $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_hide_label', 'w_size', 'w_mini_labels', 'w_disabled_fields', 'w_required', 'w_class');
510
+
511
+
512
+
513
  foreach ($params_names as $params_name) {
514
  $temp = explode('*:*' . $params_name . '*:*', $temp);
515
  $param[$params_name] = $temp[0];
524
  }
525
  $param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "table-cell" : "block");
526
  $required_sym = ($param['w_required'] == "yes" ? " *" : "");
527
+
528
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
529
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
530
+
531
+
532
  $w_mini_labels = explode('***', $param['w_mini_labels']);
533
  $w_disabled_fields = explode('***', $param['w_disabled_fields']);
534
  $hidden_inputs = '';
581
  $address_fields .= '<span style="float: '.(($g%2==0) ? 'right' : 'left').'; width: 48%; padding-bottom: 8px;"><select type="text" id="'.$id.'_countryform_id_temp" name="'.($id+5).'_countryform_id_temp" onchange="change_value(&quot;'.$id.'_countryform_id_temp&quot;)" style="width: 100%;" '.$param['attributes'].' disabled><option value=""></option><option value="Afghanistan">Afghanistan</option><option value="Albania">Albania</option><option value="Algeria">Algeria</option><option value="Andorra">Andorra</option><option value="Angola">Angola</option><option value="Antigua and Barbuda">Antigua and Barbuda</option><option value="Argentina">Argentina</option><option value="Armenia">Armenia</option><option value="Australia">Australia</option><option value="Austria">Austria</option><option value="Azerbaijan">Azerbaijan</option><option value="Bahamas">Bahamas</option><option value="Bahrain">Bahrain</option><option value="Bangladesh">Bangladesh</option><option value="Barbados">Barbados</option><option value="Belarus">Belarus</option><option value="Belgium">Belgium</option><option value="Belize">Belize</option><option value="Benin">Benin</option><option value="Bhutan">Bhutan</option><option value="Bolivia">Bolivia</option><option value="Bosnia and Herzegovina">Bosnia and Herzegovina</option><option value="Botswana">Botswana</option><option value="Brazil">Brazil</option><option value="Brunei">Brunei</option><option value="Bulgaria">Bulgaria</option><option value="Burkina Faso">Burkina Faso</option><option value="Burundi">Burundi</option><option value="Cambodia">Cambodia</option><option value="Cameroon">Cameroon</option><option value="Canada">Canada</option><option value="Cape Verde">Cape Verde</option><option value="Central African Republic">Central African Republic</option><option value="Chad">Chad</option><option value="Chile">Chile</option><option value="China">China</option><option value="Colombia">Colombia</option><option value="Comoros">Comoros</option><option value="Congo (Brazzaville)">Congo (Brazzaville)</option><option value="Congo">Congo</option><option value="Costa Rica">Costa Rica</option><option value="Cote d\'Ivoire">Cote d\'Ivoire</option><option value="Croatia">Croatia</option><option value="Cuba">Cuba</option><option value="Cyprus">Cyprus</option><option value="Czech Republic">Czech Republic</option><option value="Denmark">Denmark</option><option value="Djibouti">Djibouti</option><option value="Dominica">Dominica</option><option value="Dominican Republic">Dominican Republic</option><option value="East Timor (Timor Timur)">East Timor (Timor Timur)</option><option value="Ecuador">Ecuador</option><option value="Egypt">Egypt</option><option value="El Salvador">El Salvador</option><option value="Equatorial Guinea">Equatorial Guinea</option><option value="Eritrea">Eritrea</option><option value="Estonia">Estonia</option><option value="Ethiopia">Ethiopia</option><option value="Fiji">Fiji</option><option value="Finland">Finland</option><option value="France">France</option><option value="Gabon">Gabon</option><option value="Gambia, The">Gambia, The</option><option value="Georgia">Georgia</option><option value="Germany">Germany</option><option value="Ghana">Ghana</option><option value="Greece">Greece</option><option value="Grenada">Grenada</option><option value="Guatemala">Guatemala</option><option value="Guinea">Guinea</option><option value="Guinea-Bissau">Guinea-Bissau</option><option value="Guyana">Guyana</option><option value="Haiti">Haiti</option><option value="Honduras">Honduras</option><option value="Hungary">Hungary</option><option value="Iceland">Iceland</option><option value="India">India</option><option value="Indonesia">Indonesia</option><option value="Iran">Iran</option><option value="Iraq">Iraq</option><option value="Ireland">Ireland</option><option value="Israel">Israel</option><option value="Italy">Italy</option><option value="Jamaica">Jamaica</option><option value="Japan">Japan</option><option value="Jordan">Jordan</option><option value="Kazakhstan">Kazakhstan</option><option value="Kenya">Kenya</option><option value="Kiribati">Kiribati</option><option value="Korea, North">Korea, North</option><option value="Korea, South">Korea, South</option><option value="Kuwait">Kuwait</option><option value="Kyrgyzstan">Kyrgyzstan</option><option value="Laos">Laos</option><option value="Latvia">Latvia</option><option value="Lebanon">Lebanon</option><option value="Lesotho">Lesotho</option><option value="Liberia">Liberia</option><option value="Libya">Libya</option><option value="Liechtenstein">Liechtenstein</option><option value="Lithuania">Lithuania</option><option value="Luxembourg">Luxembourg</option><option value="Macedonia">Macedonia</option><option value="Madagascar">Madagascar</option><option value="Malawi">Malawi</option><option value="Malaysia">Malaysia</option><option value="Maldives">Maldives</option><option value="Mali">Mali</option><option value="Malta">Malta</option><option value="Marshall Islands">Marshall Islands</option><option value="Mauritania">Mauritania</option><option value="Mauritius">Mauritius</option><option value="Mexico">Mexico</option><option value="Micronesia">Micronesia</option><option value="Moldova">Moldova</option><option value="Monaco">Monaco</option><option value="Mongolia">Mongolia</option><option value="Morocco">Morocco</option><option value="Mozambique">Mozambique</option><option value="Myanmar">Myanmar</option><option value="Namibia">Namibia</option><option value="Nauru">Nauru</option><option value="Nepal">Nepal</option><option value="Netherlands">Netherlands</option><option value="New Zealand">New Zealand</option><option value="Nicaragua">Nicaragua</option><option value="Niger">Niger</option><option value="Nigeria">Nigeria</option><option value="Norway">Norway</option><option value="Oman">Oman</option><option value="Pakistan">Pakistan</option><option value="Palau">Palau</option><option value="Panama">Panama</option><option value="Papua New Guinea">Papua New Guinea</option><option value="Paraguay">Paraguay</option><option value="Peru">Peru</option><option value="Philippines">Philippines</option><option value="Poland">Poland</option><option value="Portugal">Portugal</option><option value="Qatar">Qatar</option><option value="Romania">Romania</option><option value="Russia">Russia</option><option value="Rwanda">Rwanda</option><option value="Saint Kitts and Nevis">Saint Kitts and Nevis</option><option value="Saint Lucia">Saint Lucia</option><option value="Saint Vincent">Saint Vincent</option><option value="Samoa">Samoa</option><option value="San Marino">San Marino</option><option value="Sao Tome and Principe">Sao Tome and Principe</option><option value="Saudi Arabia">Saudi Arabia</option><option value="Senegal">Senegal</option><option value="Serbia and Montenegro">Serbia and Montenegro</option><option value="Seychelles">Seychelles</option><option value="Sierra Leone">Sierra Leone</option><option value="Singapore">Singapore</option><option value="Slovakia">Slovakia</option><option value="Slovenia">Slovenia</option><option value="Solomon Islands">Solomon Islands</option><option value="Somalia">Somalia</option><option value="South Africa">South Africa</option><option value="Spain">Spain</option><option value="Sri Lanka">Sri Lanka</option><option value="Sudan">Sudan</option><option value="Suriname">Suriname</option><option value="Swaziland">Swaziland</option><option value="Sweden">Sweden</option><option value="Switzerland">Switzerland</option><option value="Syria">Syria</option><option value="Taiwan">Taiwan</option><option value="Tajikistan">Tajikistan</option><option value="Tanzania">Tanzania</option><option value="Thailand">Thailand</option><option value="Togo">Togo</option><option value="Tonga">Tonga</option><option value="Trinidad and Tobago">Trinidad and Tobago</option><option value="Tunisia">Tunisia</option><option value="Turkey">Turkey</option><option value="Turkmenistan">Turkmenistan</option><option value="Tuvalu">Tuvalu</option><option value="Uganda">Uganda</option><option value="Ukraine">Ukraine</option><option value="United Arab Emirates">United Arab Emirates</option><option value="United Kingdom">United Kingdom</option><option value="United States">United States</option><option value="Uruguay">Uruguay</option><option value="Uzbekistan">Uzbekistan</option><option value="Vanuatu">Vanuatu</option><option value="Vatican City">Vatican City</option><option value="Venezuela">Venezuela</option><option value="Vietnam">Vietnam</option><option value="Yemen">Yemen</option><option value="Zambia">Zambia</option><option value="Zimbabwe">Zimbabwe</option></select><label class="mini_label" style="display: block;" id="'.$id.'_mini_label_country">'.$w_mini_labels[5].'</span>';
582
  }
583
 
584
+ $rep ='<div id="wdform_field'.$id.'" type="type_address" 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; vertical-align:top;"><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_address" 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" name="'.$id.'_disable_fieldsform_id_temp" id="'.$id.'_disable_fieldsform_id_temp" street1="'.$w_disabled_fields[0].'" street2="'.$w_disabled_fields[1].'" city="'.$w_disabled_fields[2].'" state="'.$w_disabled_fields[3].'" postal="'.$w_disabled_fields[4].'" country="'.$w_disabled_fields[5].'" us_states="'.$w_disabled_fields[6].'"><div id="'.$id.'_div_address" style="width: '.$param['w_size'].'px;">'.$address_fields.$hidden_inputs.'</div></div></div>';
585
  break;
586
  }
587
+ case 'type_submitter_mail': {
588
  $params_names=array('w_field_label_size','w_field_label_pos','w_size','w_first_val','w_title','w_required','w_unique', 'w_class');
589
  $temp=$params;
590
  if(strpos($temp, 'w_autofill') > -1)
629
  $display_element_confirm = "none";
630
  }
631
 
632
+
633
  $param['w_verification'] = isset($param['w_verification']) ? $param['w_verification'] : "no";
634
  $param['w_verification_label'] = isset($param['w_verification_label']) ? $param['w_verification_label'] : "E-mail confirmation:";
635
  $param['w_verification_placeholder'] = isset($param['w_verification_placeholder']) ? $param['w_verification_placeholder'] : "";
636
 
 
637
  $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" class="input_deactive" id="'.$id.'_1_elementform_id_temp" name="'.$id.'_1_elementform_id_temp" value="'.$param['w_verification_placeholder'].'" title="'.$param['w_verification_placeholder'].'" onfocus="delete_value(&quot;'.$id.'_elementform_id_temp&quot;)" onblur="return_value(&quot;'.$id.'_elementform_id_temp&quot;)" onchange="change_value(&quot;'.$id.'_elementform_id_temp&quot;)" style="width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled /></div>';
638
 
639
 
640
  $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" class="'.$input_active.'" id="'.$id.'_elementform_id_temp" name="'.$id.'_elementform_id_temp" value="'.$param['w_first_val'].'" title="'.$param['w_title'].'" onfocus="delete_value(&quot;'.$id.'_elementform_id_temp&quot;)" onblur="return_value(&quot;'.$id.'_elementform_id_temp&quot;)" onchange="change_value(&quot;'.$id.'_elementform_id_temp&quot;)" style="width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled /></div>'.$confirm_emeil.'</div>';
641
  break;
642
  }
 
643
  case 'type_checkbox':
644
  {
645
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_flow','w_choices','w_choices_checked','w_rowcol', 'w_required','w_randomize','w_allow_other','w_allow_other_num','w_class');
646
  $temp=$params;
647
  if(strpos($temp, 'w_field_option_pos') > -1)
648
  $params_names=array('w_field_label_size','w_field_label_pos','w_field_option_pos','w_flow','w_choices','w_choices_checked','w_rowcol', 'w_required','w_randomize','w_allow_other','w_allow_other_num', 'w_value_disabled','w_choices_value', 'w_choices_params', 'w_class');
649
+
650
+ if(strpos($temp, 'w_hide_label') > -1)
651
+ $params_names=array('w_field_label_size','w_field_label_pos','w_field_option_pos', 'w_hide_label', 'w_flow','w_choices','w_choices_checked','w_rowcol', 'w_required','w_randomize','w_allow_other','w_allow_other_num', 'w_value_disabled','w_choices_value', 'w_choices_params', 'w_class');
652
+
653
  foreach($params_names as $params_name )
654
  {
655
  $temp=explode('*:*'.$params_name.'*:*',$temp);
671
  $param['w_field_option_pos'] = 'left';
672
 
673
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
674
+
675
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
676
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
677
+
678
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
679
  $param['w_choices'] = explode('***',$param['w_choices']);
680
  $param['w_choices_checked'] = explode('***',$param['w_choices_checked']);
693
  $param['w_choices_checked'][$key]='';
694
  }
695
 
696
+ $rep='<div id="wdform_field'.$id.'" type="type_checkbox" 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_checkbox" 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_randomize'].'" name="'.$id.'_randomizeform_id_temp" id="'.$id.'_randomizeform_id_temp"><input type="hidden" value="'.$param['w_allow_other'].'" name="'.$id.'_allow_otherform_id_temp" id="'.$id.'_allow_otherform_id_temp"><input type="hidden" value="'.$param['w_allow_other_num'].'" name="'.$id.'_allow_other_numform_id_temp" id="'.$id.'_allow_other_numform_id_temp"><input type="hidden" value="'.$param['w_rowcol'].'" name="'.$id.'_rowcol_numform_id_temp" id="'.$id.'_rowcol_numform_id_temp"><input type="hidden" value="'.$param['w_field_option_pos'].'" id="'.$id.'_option_left_right"><input type="hidden" value="'.$param['w_value_disabled'].'" name="'.$id.'_value_disabledform_id_temp" id="'.$id.'_value_disabledform_id_temp"><div style="display: table;"><div id="'.$id.'_table_little" style="display: table-row-group;" '.($param['w_flow']=='hor' ? 'for_hor="'.$id.'_hor"' : '').'>';
697
 
698
  if($param['w_flow']=='hor')
699
  {
850
  $temp=$params;
851
  if(strpos($temp, 'w_field_option_pos') > -1)
852
  $params_names=array('w_field_label_size','w_field_label_pos','w_field_option_pos','w_flow','w_choices','w_choices_checked','w_rowcol', 'w_required','w_randomize','w_allow_other','w_allow_other_num', 'w_value_disabled', 'w_choices_value', 'w_choices_params','w_class');
853
+
854
+ if(strpos($temp, 'w_hide_label') > -1)
855
+ $params_names=array('w_field_label_size','w_field_label_pos','w_field_option_pos', 'w_hide_label', 'w_flow','w_choices','w_choices_checked','w_rowcol', 'w_required','w_randomize','w_allow_other','w_allow_other_num', 'w_value_disabled', 'w_choices_value', 'w_choices_params','w_class');
856
  foreach($params_names as $params_name )
857
  {
858
  $temp=explode('*:*'.$params_name.'*:*',$temp);
872
 
873
  if(!isset($param['w_field_option_pos']))
874
  $param['w_field_option_pos'] = 'left';
875
+ $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
876
+
877
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
878
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
879
+
880
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
881
  $param['w_choices'] = explode('***',$param['w_choices']);
882
  $param['w_choices_checked'] = explode('***',$param['w_choices_checked']);
895
  $param['w_choices_checked'][$key]='';
896
  }
897
 
898
+ $rep='<div id="wdform_field'.$id.'" type="type_radio" 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_radio" 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_randomize'].'" name="'.$id.'_randomizeform_id_temp" id="'.$id.'_randomizeform_id_temp"><input type="hidden" value="'.$param['w_allow_other'].'" name="'.$id.'_allow_otherform_id_temp" id="'.$id.'_allow_otherform_id_temp"><input type="hidden" value="'.$param['w_allow_other_num'].'" name="'.$id.'_allow_other_numform_id_temp" id="'.$id.'_allow_other_numform_id_temp"><input type="hidden" value="'.$param['w_rowcol'].'" name="'.$id.'_rowcol_numform_id_temp" id="'.$id.'_rowcol_numform_id_temp"><input type="hidden" value="'.$param['w_field_option_pos'].'" id="'.$id.'_option_left_right"><input type="hidden" value="'.$param['w_value_disabled'].'" name="'.$id.'_value_disabledform_id_temp" id="'.$id.'_value_disabledform_id_temp"><div style="display: table;"><div id="'.$id.'_table_little" style="display: table-row-group;" '.($param['w_flow']=='hor' ? 'for_hor="'.$id.'_hor"' : '').'>';
899
 
900
 
901
  if($param['w_flow']=='hor')
1055
  $temp=$params;
1056
  if(strpos($temp, 'w_choices_value') > -1)
1057
  $params_names=array('w_field_label_size','w_field_label_pos','w_size','w_choices','w_choices_checked', 'w_choices_disabled', 'w_required', 'w_value_disabled', 'w_choices_value', 'w_choices_params', 'w_class');
1058
+
1059
+ if(strpos($temp, 'w_hide_label') > -1)
1060
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_size','w_choices','w_choices_checked', 'w_choices_disabled', 'w_required', 'w_value_disabled', 'w_choices_value', 'w_choices_params', 'w_class');
1061
+
1062
  foreach($params_names as $params_name )
1063
  {
1064
  $temp=explode('*:*'.$params_name.'*:*',$temp);
1075
  }
1076
 
1077
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
1078
+
1079
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
1080
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
1081
+
1082
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
1083
  $param['w_choices'] = explode('***',$param['w_choices']);
1084
  $param['w_choices_checked'] = explode('***',$param['w_choices_checked']);
1101
  $param['w_choices_checked'][$key]='';
1102
  }
1103
 
1104
+ $rep='<div id="wdform_field'.$id.'" type="type_own_select" 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_own_select" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_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_required'].'" name="'.$id.'_requiredform_id_temp" id="'.$id.'_requiredform_id_temp"><input type="hidden" value="'.$param['w_value_disabled'].'" name="'.$id.'_value_disabledform_id_temp" id="'.$id.'_value_disabledform_id_temp"><select id="'.$id.'_elementform_id_temp" name="'.$id.'_elementform_id_temp" onchange="set_select(this)" style="width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled>';
1105
  foreach($param['w_choices'] as $key => $choice)
1106
  {
1107
  $where = '';
1127
  {
1128
  $params_names=array('w_field_label_size','w_field_label_pos','w_size','w_countries','w_required','w_class');
1129
  $temp=$params;
1130
+
1131
+ if(strpos($temp, 'w_hide_label') > -1)
1132
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_size','w_countries','w_required','w_class');
1133
+
1134
  foreach($params_names as $params_name )
1135
  {
1136
  $temp=explode('*:*'.$params_name.'*:*',$temp);
1147
  }
1148
 
1149
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
1150
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
1151
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
1152
+
1153
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
1154
  $param['w_countries'] = explode('***',$param['w_countries']);
1155
 
1156
+ $rep='<div id="wdform_field'.$id.'" type="type_country" 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_country" 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"/><select id="'.$id.'_elementform_id_temp" name="'.$id.'_elementform_id_temp" style="width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled>';
1157
  foreach($param['w_countries'] as $key => $choice)
1158
  {
1159
  $choice_value=$choice;
1167
  {
1168
  $params_names=array('w_field_label_size','w_field_label_pos','w_time_type','w_am_pm','w_sec','w_hh','w_mm','w_ss','w_mini_labels','w_required','w_class');
1169
  $temp=$params;
1170
+
1171
+ if(strpos($temp, 'w_hide_label') > -1)
1172
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_time_type', 'w_am_pm','w_sec','w_hh','w_mm','w_ss','w_mini_labels','w_required','w_class');
1173
+
1174
  foreach($params_names as $params_name )
1175
  {
1176
  $temp=explode('*:*'.$params_name.'*:*',$temp);
1187
  }
1188
 
1189
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
1190
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
1191
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
1192
+
1193
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
1194
 
1195
  $w_mini_labels = explode('***',$param['w_mini_labels']);
1232
  }
1233
 
1234
 
1235
+ $rep ='<div id="wdform_field'.$id.'" type="type_time" 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_time" 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"/><div id="'.$id.'_table_time" style="display: table;"><div id="'.$id.'_tr_time1" style="display: table-row;"><div id="'.$id.'_td_time_input1" style="width: 32px; display: table-cell;"><input type="text" value="'.$param['w_hh'].'" class="time_box" id="'.$id.'_hhform_id_temp" name="'.$id.'_hhform_id_temp" onkeypress="return check_hour(event, &quot;'.$id.'_hhform_id_temp&quot;, &quot;23&quot;)" onkeyup="change_hour(event, &quot;'.$id.'_hhform_id_temp&quot;,&quot;23&quot;)" onblur="add_0(&quot;'.$id.'_hhform_id_temp&quot;)" '.$param['attributes'].' disabled/></div><div align="center" style="display: table-cell;"><span class="wdform_colon" style="vertical-align: middle;">&nbsp;:&nbsp;</span></div><div id="'.$id.'_td_time_input2" style="width: 32px; display: table-cell;"><input type="text" value="'.$param['w_mm'].'" class="time_box" id="'.$id.'_mmform_id_temp" name="'.$id.'_mmform_id_temp" onkeypress="return check_minute(event, &quot;'.$id.'_mmform_id_temp&quot;)" onkeyup="change_minute(event, &quot;'.$id.'_mmform_id_temp&quot;)" onblur="add_0(&quot;'.$id.'_mmform_id_temp&quot;)" '.$param['attributes'].' disabled/></div>'.$w_sec.$w_time_type.'</div><div id="'.$id.'_tr_time2" style="display: table-row;"><div id="'.$id.'_td_time_label1" style="display: table-cell;"><label class="mini_label" id="'.$id.'_mini_label_hh">'.$w_mini_labels[0].'</label></div><div style="display: table-cell;"></div><div id="'.$id.'_td_time_label2" style="display: table-cell;"><label class="mini_label" id="'.$id.'_mini_label_mm">'.$w_mini_labels[1].'</label></div>'.$w_sec_label.$w_time_type_label.'</div></div></div></div>';
1236
 
1237
  break;
1238
  }
1267
  break;
1268
  }
1269
 
1270
+ ///////////////////////// type_date_new ////////////////////////////
1271
+
1272
  case 'type_date_new':
1273
  {
1274
 
1275
  $params_names=array('w_field_label_size','w_field_label_pos', 'w_size', 'w_date','w_required', 'w_show_image', 'w_class','w_format', 'w_start_day', 'w_default_date', 'w_min_date', 'w_max_date', 'w_invalid_dates', 'w_show_days', 'w_hide_time', 'w_but_val', 'w_disable_past_days');
1276
  $temp = $params;
1277
 
1278
+ if(strpos($temp, 'w_hide_label') > -1)
1279
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_size', 'w_date','w_required', 'w_show_image', 'w_class','w_format', 'w_start_day', 'w_default_date', 'w_min_date', 'w_max_date', 'w_invalid_dates', 'w_show_days', 'w_hide_time', 'w_but_val', 'w_disable_past_days');
1280
+
1281
+
1282
  foreach($params_names as $params_name )
1283
  {
1284
  $temp=explode('*:*'.$params_name.'*:*',$temp);
1300
 
1301
 
1302
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
1303
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
1304
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
1305
+
1306
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
1307
  $param['w_disable_past_days'] = isset($param['w_disable_past_days']) ? $param['w_disable_past_days'] : 'no';
1308
  $disable_past_days = $param['w_disable_past_days'] == 'yes' ? 'true' : 'false';
1309
  $display_image_date = $param['w_show_image'] == 'yes' ? 'inline' : 'none';
1310
 
1311
 
1312
+ $rep ='<div id="wdform_field'.$id.'" type="type_date_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_date_new" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_id_temp">
1313
  <input type="hidden" value="'.$param['w_required'].'" name="'.$id.'_requiredform_id_temp" id="'.$id.'_requiredform_id_temp">
1314
 
1315
+ <input type="hidden" value="'.$param['w_hide_label'].'" name="'.$id.'_hide_labelform_id_temp" id="'.$id.'_hide_labelform_id_temp"/>
1316
+
1317
  <input type="hidden" value="'.$param['w_show_image'].'" name="'.$id.'_show_imageform_id_temp" id="'.$id.'_show_imageform_id_temp">
1318
 
1319
  <input type="hidden" value="'.$param['w_disable_past_days'].'" name="'.$id.'_dis_past_daysform_id_temp" id="'.$id.'_dis_past_daysform_id_temp">
1347
  $params_names=array('w_field_label_size','w_field_label_pos', 'w_size', 'w_date','w_required', 'w_show_image', 'w_class','w_format', 'w_start_day', 'w_default_date_start', 'w_default_date_end', 'w_min_date', 'w_max_date', 'w_invalid_dates', 'w_show_days', 'w_hide_time', 'w_but_val', 'w_disable_past_days');
1348
  $temp = $params;
1349
 
1350
+ if(strpos($temp, 'w_hide_label') > -1)
1351
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_size', 'w_date','w_required', 'w_show_image', 'w_class','w_format', 'w_start_day', 'w_default_date_start', 'w_default_date_end', 'w_min_date', 'w_max_date', 'w_invalid_dates', 'w_show_days', 'w_hide_time', 'w_but_val', 'w_disable_past_days');
1352
+
1353
 
1354
  foreach($params_names as $params_name )
1355
  {
1373
  $defaul_day_end = $defaul_day_array[1];
1374
 
1375
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
1376
+
1377
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
1378
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
1379
+
1380
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
1381
  $param['w_disable_past_days'] = isset($param['w_disable_past_days']) ? $param['w_disable_past_days'] : 'no';
1382
  $disable_past_days = $param['w_disable_past_days'] == 'yes' ? 'true' : 'false';
1383
  $display_image_date = $param['w_show_image'] == 'yes' ? 'inline' : 'none';
1384
 
1385
+ $rep ='<div id="wdform_field'.$id.'" type="type_date_range" 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'].';">
1386
 
1387
  <input type="hidden" value="type_date_range" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_id_temp">
1388
 
1389
  <input type="hidden" value="'.$param['w_required'].'" name="'.$id.'_requiredform_id_temp" id="'.$id.'_requiredform_id_temp">
1390
 
1391
+ <input type="hidden" value="'.$param['w_hide_label'].'" name="'.$id.'_hide_labelform_id_temp" id="'.$id.'_hide_labelform_id_temp"/>
1392
+
1393
  <input type="hidden" value="'.$param['w_show_image'].'" name="'.$id.'_show_imageform_id_temp" id="'.$id.'_show_imageform_id_temp">
1394
 
1395
  <input type="hidden" value="'.$param['w_disable_past_days'].'" name="'.$id.'_dis_past_daysform_id_temp" id="'.$id.'_dis_past_daysform_id_temp">
1432
  }
1433
 
1434
 
1435
+
1436
+
1437
+
1438
  case 'type_date_fields':
1439
  {
1440
  $params_names=array('w_field_label_size','w_field_label_pos','w_day','w_month','w_year','w_day_type','w_month_type','w_year_type','w_day_label','w_month_label','w_year_label','w_day_size','w_month_size','w_year_size','w_required','w_class','w_from','w_to','w_divider');
1441
 
1442
  $temp=$params;
1443
+
1444
+ if(strpos($temp, 'w_hide_label') > -1)
1445
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_day','w_month','w_year','w_day_type','w_month_type','w_year_type','w_day_label','w_month_label','w_year_label','w_day_size','w_month_size','w_year_size','w_required','w_class','w_from','w_to','w_divider');
1446
+
1447
+
1448
  foreach($params_names as $params_name )
1449
  {
1450
  $temp=explode('*:*'.$params_name.'*:*',$temp);
1461
  }
1462
 
1463
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
1464
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
1465
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
1466
+
1467
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
1468
 
1469
 
1536
  }
1537
 
1538
 
1539
+ $rep ='<div id="wdform_field'.$id.'" type="type_date_fields" 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_date_fields" 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"/><div id="'.$id.'_table_date" style="display: table;"><div id="'.$id.'_tr_date1" style="display: table-row;"><div id="'.$id.'_td_date_input1" style="display: table-cell;">
1540
  '.$w_day_type.'
1541
 
1542
  </div><div id="'.$id.'_td_date_separator1" style="display: table-cell;"><span id="'.$id.'_separator1" class="wdform_separator">'.$param['w_divider'].'</span></div><div id="'.$id.'_td_date_input2" style="display: table-cell;">'.$w_month_type.'</div><div id="'.$id.'_td_date_separator2" style="display: table-cell;"><span id="'.$id.'_separator2" class="wdform_separator">'.$param['w_divider'].'</span></div><div id="'.$id.'_td_date_input3" style="display: table-cell;">'.$w_year_type.'</div></div><div id="'.$id.'_tr_date2" style="display: table-row;"><div id="'.$id.'_td_date_label1" style="display: table-cell;"><label class="mini_label" id="'.$id.'_day_label">'.$param['w_day_label'].'</label></div><div style="display: table-cell;"></div><div id="'.$id.'_td_date_label2" style="display: table-cell;"><label class="mini_label" id="'.$id.'_month_label">'.$param['w_month_label'].'</label></div><div style="display: table-cell;"></div><div id="'.$id.'_td_date_label3" style="display: table-cell;"><label class="mini_label" id="'.$id.'_year_label">'.$param['w_year_label'].'</label></div></div></div></div></div>';
1547
  {
1548
  $params_names=array('w_field_label_size','w_field_label_pos','w_destination','w_extension','w_max_size','w_required','w_multiple','w_class');
1549
  $temp=$params;
1550
+
1551
+ if(strpos($temp, 'w_hide_label') > -1)
1552
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_destination','w_extension','w_max_size','w_required','w_multiple','w_class');
1553
+
1554
+
1555
  foreach($params_names as $params_name )
1556
  {
1557
  $temp=explode('*:*'.$params_name.'*:*',$temp);
1573
  }
1574
 
1575
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
1576
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
1577
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
1578
+
1579
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
1580
  $multiple = ($param['w_multiple']=="yes" ? "multiple='multiple'" : "");
1581
 
1582
+ $rep ='<div id="wdform_field'.$id.'" type="type_file_upload" 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_file_upload" 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="***max_sizeskizb'.$id.'***'.$param['w_max_size'].'***max_sizeverj'.$id.'***" id="'.$id.'_max_size" name="'.$id.'_max_size"><input type="hidden" value="***destinationskizb'.$id.'***'.$param['w_destination'].'***destinationverj'.$id.'***" id="'.$id.'_destination" name="'.$id.'_destination"><input type="hidden" value="***extensionskizb'.$id.'***'.$param['w_extension'].'***extensionverj'.$id.'***" id="'.$id.'_extension" name="'.$id.'_extension"><input type="file" class="file_upload" id="'.$id.'_elementform_id_temp" name="'.$id.'_fileform_id_temp" '.$multiple.' '.$param['attributes'].' disabled/></div></div>';
1583
 
1584
  break;
1585
  }
1587
  {
1588
  $params_names=array('w_field_label_size','w_field_label_pos','w_digit','w_class');
1589
  $temp=$params;
1590
+
1591
+ if(strpos($temp, 'w_hide_label') > -1)
1592
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_digit','w_class');
1593
+
1594
  foreach($params_names as $params_name )
1595
  {
1596
  $temp=explode('*:*'.$params_name.'*:*',$temp);
1607
  }
1608
 
1609
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
1610
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
1611
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
1612
+
1613
+
1614
+ $rep ='<div id="wdform_field'.$id.'" type="type_captcha" 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></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_captcha" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_id_temp"><div style="display: table;"><div style="display: table-row;"><div valign="middle" style="display: table-cell;"><img type="captcha" digit="'.$param['w_digit'].'" src="' . add_query_arg(array('action' => 'formmakerwdcaptcha', 'digit' => $param['w_digit'], 'i' => 'form_id_temp'), admin_url('admin-ajax.php')) . '" id="_wd_captchaform_id_temp" class="captcha_img" onclick="captcha_refresh(&quot;_wd_captcha&quot;,&quot;form_id_temp&quot;)" '.$param['attributes'].'></div><div valign="middle" style="display: table-cell;"><div class="captcha_refresh" id="_element_refreshform_id_temp" onclick="captcha_refresh(&quot;_wd_captcha&quot;,&quot;form_id_temp&quot;)" '.$param['attributes'].'></div></div></div><div style="display: table-row;"><div style="display: table-cell;"><input type="text" class="captcha_input" id="_wd_captcha_inputform_id_temp" name="captcha_input" style="width: '.($param['w_digit']*10+15).'px;" '.$param['attributes'].' disabled/><input type="hidden" value="'.$param['w_hide_label'].'" name="'.$id.'_hide_labelform_id_temp" id="'.$id.'_hide_labelform_id_temp"/></div></div></div></div></div>';
1615
 
1616
  break;
1617
  }
1619
  {
1620
  $params_names=array('w_field_label_size','w_field_label_pos', 'w_count', 'w_operations','w_class', 'w_input_size');
1621
  $temp=$params;
1622
+
1623
+ if(strpos($temp, 'w_hide_label') > -1)
1624
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_count', 'w_operations','w_class', 'w_input_size');
1625
+
1626
+
1627
  foreach($params_names as $params_name )
1628
  {
1629
  $temp=explode('*:*'.$params_name.'*:*',$temp);
1639
  $param['attributes'] = $param['attributes'].' add_'.$attr;
1640
  }
1641
 
1642
+ $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
1643
+
1644
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
1645
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
1646
  $param['w_count'] = $param['w_count'] ? $param['w_count'] : 1;
1647
  $param['w_operations'] = $param['w_operations'] ? $param['w_operations'] : '+, -, *, /';
1648
  $param['w_input_size'] = $param['w_input_size'] ? $param['w_input_size'] : 60;
1649
 
1650
+ $rep ='<div id="wdform_field'.$id.'" type="type_arithmetic_captcha" 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></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_captcha" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_id_temp"><div style="display: table;"><div style="display: table-row;"><div style="display: table-cell;"><img type="captcha" operations_count="'.$param['w_count'].'" operations="'.$param['w_operations'].'" input_size="'.$param['w_input_size'].'" src="' . add_query_arg(array('action' => 'formmakerwdmathcaptcha', 'operations_count' => $param['w_count'], 'operations' => urlencode($param['w_operations']), 'i' => 'form_id_temp'), admin_url('admin-ajax.php')) . '" id="_wd_arithmetic_captchaform_id_temp" class="arithmetic_captcha_img" onclick="captcha_refresh(&quot;_wd_arithmetic_captcha&quot;,&quot;form_id_temp&quot;)" '.$param['attributes'].'></div><div style="display: table-cell;"><input type="text" class="arithmetic_captcha_input" id="_wd_arithmetic_captcha_inputform_id_temp" name="arithmetic_captcha_input" onkeypress="return check_isnum(event)" style="width: '.$param['w_input_size'].'px;" '.$param['attributes'].' disabled/><input type="hidden" value="'.$param['w_hide_label'].'" name="'.$id.'_hide_labelform_id_temp" id="'.$id.'_hide_labelform_id_temp"/></div><div style="display: table-cell; vertical-align: middle;"><div class="captcha_refresh" id="_element_refreshform_id_temp" onclick="captcha_refresh(&quot;_wd_arithmetic_captcha&quot;,&quot;form_id_temp&quot;)" '.$param['attributes'].'></div></div></div></div></div></div>';
1651
 
1652
  break;
1653
  }
1657
  {
1658
  $params_names=array('w_field_label_size','w_field_label_pos','w_public','w_private','w_theme','w_class');
1659
  $temp=$params;
1660
+
1661
+ if(strpos($temp, 'w_hide_label') > -1)
1662
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_public','w_private','w_theme','w_class');
1663
+
1664
  foreach($params_names as $params_name )
1665
  {
1666
  $temp=explode('*:*'.$params_name.'*:*',$temp);
1677
  }
1678
 
1679
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
1680
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
1681
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
1682
 
1683
+ $rep ='<div id="wdform_field'.$id.'" type="type_recaptcha" 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></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_recaptcha" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_id_temp"><input type="hidden" value="'.$param['w_hide_label'].'" name="'.$id.'_hide_labelform_id_temp" id="'.$id.'_hide_labelform_id_temp"/><div id="wd_recaptchaform_id_temp" public_key="'.$param['w_public'].'" private_key="'.$param['w_private'].'" theme="'.$param['w_theme'].'" '.$param['attributes'].'><span style="color: red; font-style: italic;">Recaptcha doesn\'t display in back end</span></div></div></div>';
1684
 
1685
  break;
1686
  }
1712
  {
1713
  $params_names=array('w_field_label_size','w_field_label_pos','w_center_x','w_center_y','w_long','w_lat','w_zoom','w_width','w_height','w_info','w_class');
1714
  $temp=$params;
1715
+
1716
+ if(strpos($temp, 'w_hide_label') > -1)
1717
+ $params_names = array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_center_x','w_center_y','w_long','w_lat','w_zoom','w_width','w_height','w_info','w_class');
1718
+
1719
+
1720
  foreach($params_names as $params_name )
1721
  {
1722
  $temp=explode('*:*'.$params_name.'*:*',$temp);
1733
  }
1734
 
1735
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
1736
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
1737
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
1738
 
1739
+ $rep ='<div id="wdform_field'.$id.'" type="type_mark_map" 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></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="'.$param['w_hide_label'].'" name="'.$id.'_hide_labelform_id_temp" id="'.$id.'_hide_labelform_id_temp"/><input type="hidden" value="type_mark_map" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_id_temp"><div id="'.$id.'_elementform_id_temp" long0="'.$param['w_long'].'" lat0="'.$param['w_lat'].'" zoom="'.$param['w_zoom'].'" info0="'.$param['w_info'].'" center_x="'.$param['w_center_x'].'" center_y="'.$param['w_center_y'].'" style="width: '.$param['w_width'].'px; height: '.$param['w_height'].'px;" '.$param['attributes'].'></div></div></div> ';
1740
 
1741
  break;
1742
  }
1808
  break;
1809
  }
1810
 
1811
+ case 'type_paypal_price_new':
1812
+ {
1813
+ $params_names=array('w_field_label_size','w_field_label_pos','w_first_val','w_title', 'w_size','w_required', 'w_class','w_range_min','w_range_max', 'w_readonly', 'w_currency');
1814
+
1815
+ $temp=$params;
1816
+
1817
+ if(strpos($temp, 'w_hide_label') > -1)
1818
+ $params_names = array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_first_val','w_title', 'w_size','w_required', 'w_class','w_range_min','w_range_max', 'w_readonly', 'w_currency');
1819
+
1820
+
1821
+ foreach($params_names as $params_name )
1822
+ {
1823
+ $temp=explode('*:*'.$params_name.'*:*',$temp);
1824
+ $param[$params_name] = $temp[0];
1825
+ $temp=$temp[1];
1826
+ }
1827
+
1828
+ if($temp)
1829
+ {
1830
+ $temp =explode('*:*w_attr_name*:*',$temp);
1831
+ $attrs = array_slice($temp,0, count($temp)-1);
1832
+ foreach($attrs as $attr)
1833
+ $param['attributes'] = $param['attributes'].' add_'.$attr;
1834
+ }
1835
+
1836
+ $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
1837
+
1838
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
1839
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
1840
+
1841
+ $input_active = ($param['w_first_val']==$param['w_title'] ? "input_deactive" : "input_active");
1842
+ $required_sym = ($param['w_required']=="yes" ? " *" : "");
1843
+ $currency_sumbol = ($param['w_currency']=="yes" ? "display:none;" : "display: table-cell;");
1844
+ $param['w_readonly'] = (isset($param['w_readonly']) ? $param['w_readonly'] : "no");
1845
+
1846
+ $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-->&nbsp;$&nbsp;<!--repend--></span></div><div id="'.$id.'_td_name_dollars" style="display: table-cell;"><input type="text" class="'.$input_active.'" id="'.$id.'_elementform_id_temp" name="'.$id.'_elementform_id_temp" value="'.$param['w_first_val'].'" title="'.$param['w_title'].'"onfocus="delete_value(&quot;'.$id.'_elementform_id_temp&quot;)" onblur="return_value(&quot;'.$id.'_elementform_id_temp&quot;)"onchange="change_value(&quot;'.$id.'_elementform_id_temp&quot;)" onkeypress="return check_isnum(event)" style="width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled/></div></div></div></div></div>';
1847
+ break;
1848
+ }
1849
+
1850
+
1851
+
1852
+
1853
+
1854
  case 'type_paypal_select':
1855
  {
1856
  $params_names=array('w_field_label_size','w_field_label_pos','w_size','w_choices','w_choices_price','w_choices_checked', 'w_choices_disabled','w_required','w_quantity', 'w_quantity_value','w_class','w_property','w_property_values');
1857
  $temp=$params;
1858
  if(strpos($temp, 'w_choices_params') > -1)
1859
  $params_names=array('w_field_label_size','w_field_label_pos','w_size','w_choices','w_choices_price','w_choices_checked', 'w_choices_disabled','w_required','w_quantity', 'w_quantity_value', 'w_choices_params', 'w_class', 'w_property', 'w_property_values');
1860
+
1861
+ if(strpos($temp, 'w_hide_label') > -1)
1862
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_size','w_choices','w_choices_price','w_choices_checked', 'w_choices_disabled','w_required','w_quantity', 'w_quantity_value', 'w_choices_params', 'w_class', 'w_property', 'w_property_values');
1863
+
1864
  foreach($params_names as $params_name )
1865
  {
1866
  $temp=explode('*:*'.$params_name.'*:*',$temp);
1877
  }
1878
 
1879
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
1880
+
1881
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
1882
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
1883
+
1884
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
1885
  $param['w_choices'] = explode('***',$param['w_choices']);
1886
 
1902
  }
1903
 
1904
 
1905
+ $rep='<div id="wdform_field'.$id.'" type="type_paypal_select" 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_select" 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"/><select id="'.$id.'_elementform_id_temp" name="'.$id.'_elementform_id_temp" onchange="set_select(this)" style="width: '.$param['w_size'].'px;" '.$param['attributes'].' disabled>';
1906
  foreach($param['w_choices'] as $key => $choice)
1907
  {
1908
  $where = '';
1952
  $temp=$params;
1953
  if(strpos($temp, 'w_field_option_pos') > -1)
1954
  $params_names=array('w_field_label_size','w_field_label_pos', 'w_field_option_pos', 'w_flow','w_choices','w_choices_price','w_choices_checked','w_required','w_randomize','w_allow_other','w_allow_other_num', 'w_choices_params', 'w_class','w_property','w_property_values','w_quantity','w_quantity_value');
1955
+
1956
+ if(strpos($temp, 'w_hide_label') > -1)
1957
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_field_option_pos', 'w_hide_label', 'w_flow','w_choices','w_choices_price','w_choices_checked','w_required','w_randomize','w_allow_other','w_allow_other_num', 'w_choices_params', 'w_class','w_property','w_property_values','w_quantity','w_quantity_value');
1958
  foreach($params_names as $params_name )
1959
  {
1960
  $temp=explode('*:*'.$params_name.'*:*',$temp);
1972
  if(!isset($param['w_field_option_pos']))
1973
  $param['w_field_option_pos'] = 'left';
1974
 
1975
+ $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
1976
+
1977
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
1978
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
1979
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
1980
  $param['w_choices'] = explode('***',$param['w_choices']);
1981
  $param['w_choices_price'] = explode('***',$param['w_choices_price']);
1994
  $param['w_choices_checked'][$key]='';
1995
  }
1996
 
1997
+ $rep='<div id="wdform_field'.$id.'" type="type_paypal_checkbox" 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="wd_form_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_checkbox" 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_randomize'].'" name="'.$id.'_randomizeform_id_temp" id="'.$id.'_randomizeform_id_temp"><input type="hidden" value="'.$param['w_allow_other'].'" name="'.$id.'_allow_otherform_id_temp" id="'.$id.'_allow_otherform_id_temp"><input type="hidden" value="'.$param['w_allow_other_num'].'" name="'.$id.'_allow_other_numform_id_temp" id="'.$id.'_allow_other_numform_id_temp"><input type="hidden" value="'.$param['w_field_option_pos'].'" id="'.$id.'_option_left_right"><div style="display: table;"><div id="'.$id.'_table_little" style="display: table-row-group;">';
1998
 
1999
  if($param['w_flow']=='hor')
2000
  {
2070
  $temp=$params;
2071
  if(strpos($temp, 'w_field_option_pos') > -1)
2072
  $params_names=array('w_field_label_size','w_field_label_pos', 'w_field_option_pos', 'w_flow','w_choices','w_choices_price','w_choices_checked','w_required','w_randomize','w_allow_other','w_allow_other_num', 'w_choices_params', 'w_class','w_property','w_property_values','w_quantity','w_quantity_value');
2073
+ if(strpos($temp, 'w_hide_label') > -1)
2074
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_field_option_pos', 'w_hide_label', 'w_flow','w_choices','w_choices_price','w_choices_checked','w_required','w_randomize','w_allow_other','w_allow_other_num', 'w_choices_params', 'w_class','w_property','w_property_values','w_quantity','w_quantity_value');
2075
  foreach($params_names as $params_name )
2076
  {
2077
  $temp=explode('*:*'.$params_name.'*:*',$temp);
2089
  if(!isset($param['w_field_option_pos']))
2090
  $param['w_field_option_pos'] = 'left';
2091
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
2092
+
2093
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
2094
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
2095
+
2096
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
2097
  $param['w_choices'] = explode('***',$param['w_choices']);
2098
 
2114
  $param['w_choices_checked'][$key]='';
2115
  }
2116
 
2117
+ $rep='<div id="wdform_field'.$id.'" type="type_paypal_radio" 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="wd_form_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_radio" 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_randomize'].'" name="'.$id.'_randomizeform_id_temp" id="'.$id.'_randomizeform_id_temp"><input type="hidden" value="'.$param['w_allow_other'].'" name="'.$id.'_allow_otherform_id_temp" id="'.$id.'_allow_otherform_id_temp"><input type="hidden" value="'.$param['w_allow_other_num'].'" name="'.$id.'_allow_other_numform_id_temp" id="'.$id.'_allow_other_numform_id_temp"><input type="hidden" value="'.$param['w_field_option_pos'].'" id="'.$id.'_option_left_right"><div style="display: table;"><div id="'.$id.'_table_little" style="display: table-row-group;">';
2118
 
2119
  if($param['w_flow']=='hor')
2120
  {
2188
  case 'type_paypal_shipping':
2189
  {
2190
 
2191
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_flow','w_choices','w_choices_price','w_choices_checked','w_required','w_randomize','w_allow_other','w_allow_other_num','w_class');
2192
  $temp=$params;
2193
+
2194
  if(strpos($temp, 'w_field_option_pos') > -1)
2195
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_field_option_pos', 'w_flow','w_choices','w_choices_price','w_choices_checked','w_required','w_randomize','w_allow_other','w_allow_other_num','w_choices_params','w_class');
2196
+
2197
+ if(strpos($temp, 'w_hide_label') > -1)
2198
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_field_option_pos', 'w_hide_label', 'w_flow','w_choices','w_choices_price','w_choices_checked','w_required','w_randomize','w_allow_other','w_allow_other_num','w_choices_params','w_class');
2199
+
2200
  foreach($params_names as $params_name )
2201
  {
2202
  $temp=explode('*:*'.$params_name.'*:*',$temp);
2215
  $param['w_field_option_pos'] = 'left';
2216
 
2217
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
2218
+
2219
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
2220
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
2221
+
2222
+
2223
+
2224
+
2225
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
2226
  $param['w_choices'] = explode('***',$param['w_choices']);
2227
 
2240
  $param['w_choices_checked'][$key]='';
2241
  }
2242
 
2243
+ $rep='<div id="wdform_field'.$id.'" type="type_paypal_shipping" 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="wd_form_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'].'; vertical-align:top;"><input type="hidden" value="type_paypal_shipping" 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_randomize'].'" name="'.$id.'_randomizeform_id_temp" id="'.$id.'_randomizeform_id_temp"><input type="hidden" value="'.$param['w_allow_other'].'" name="'.$id.'_allow_otherform_id_temp" id="'.$id.'_allow_otherform_id_temp"><input type="hidden" value="'.$param['w_allow_other_num'].'" name="'.$id.'_allow_other_numform_id_temp" id="'.$id.'_allow_other_numform_id_temp"><input type="hidden" value="'.$param['w_field_option_pos'].'" id="'.$id.'_option_left_right"><div style="display: table;"><div id="'.$id.'_table_little" style="display: table-row-group;">';
2244
 
2245
  if($param['w_flow']=='hor')
2246
  {
2292
  }
2293
  case 'type_paypal_total':
2294
  {
2295
+ $params_names=array('w_field_label_size','w_field_label_pos','w_class');
2296
+ $temp=$params;
2297
+ if(strpos($temp, 'w_size') > -1)
2298
+ $params_names=array('w_field_label_size','w_field_label_pos','w_class', 'w_size');
2299
+
2300
+ if(strpos($temp, 'w_hide_label') > -1)
2301
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_class', 'w_size');
2302
+
2303
+ foreach($params_names as $params_name )
2304
+ {
2305
+ $temp=explode('*:*'.$params_name.'*:*',$temp);
2306
+ $param[$params_name] = $temp[0];
2307
+ $temp=$temp[1];
2308
+ }
2309
+
2310
+ if($temp)
2311
+ {
2312
+ $temp = explode('*:*w_attr_name*:*',$temp);
2313
+ $attrs = array_slice($temp,0, count($temp)-1);
2314
+ foreach($attrs as $attr)
2315
+ $param['attributes'] = $param['attributes'].' add_'.$attr;
2316
+ }
2317
+
2318
+ $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
2319
+
2320
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
2321
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
2322
+ $param['w_size'] = isset($param['w_size']) ? $param['w_size'] : '300';
2323
+
2324
+ $rep='<div id="wdform_field'.$id.'" type="type_paypal_total" 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">'.$label.'</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_total" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_id_temp"><input type="hidden" value="'.$param['w_hide_label'].'" name="'.$id.'_hide_labelform_id_temp" id="'.$id.'_hide_labelform_id_temp"/><div id="'.$id.'paypal_totalform_id_temp" class="wdform_paypal_total paypal_totalform_id_temp" style="width:'.$param['w_size'].'px;"><input type="hidden" value="" name="'.$id.'_paypal_totalform_id_temp" class="input_paypal_totalform_id_temp"><div id="'.$id.'div_totalform_id_temp" class="div_totalform_id_temp" style="margin-bottom: 10px;"><!--repstart-->$300<!--repend--></div><div id="'.$id.'paypal_productsform_id_temp" class="paypal_productsform_id_temp" style="border-spacing: 2px;"><div style="border-spacing: 2px;"><!--repstart-->product 1 $100<!--repend--></div><div style="border-spacing: 2px;"><!--repstart-->product 2 $200<!--repend--></div></div><div id="'.$id.'paypal_taxform_id_temp" class="paypal_taxform_id_temp" style="border-spacing: 2px; margin-top: 7px;"></div></div></div></div>';
2325
+
2326
+ break;
2327
+ }
2328
+
2329
+
2330
+
2331
+ case 'type_stripe': {
2332
+ $params_names=array('w_field_size', 'w_field_label_size','w_field_label_pos','w_class');
2333
  $temp=$params;
2334
  foreach($params_names as $params_name )
2335
  {
2347
  }
2348
 
2349
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
2350
+ $rep='<div id="wdform_field'.$id.'" type="type_stripe" 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="display: none;">stripe</span></div><div align="left" id="'.$id.'_element_sectionform_id_temp" class="'.$param['w_class'].'" style="display: '.$param['w_field_label_pos'].';"><div id="'.$id.'_elementform_id_temp" style="width:'.$param['w_field_size'].'px; margin:10px; border: 1px solid #000; min-width:80px;text-align:center;"> Stripe Section</div><input type="hidden" id="is_stripe" /><input type="hidden" value="type_stripe" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_id_temp"></div></div>';
2351
+
 
 
 
 
2352
  break;
2353
  }
2354
 
2356
  {
2357
  $params_names=array('w_field_label_size','w_field_label_pos','w_field_label_col','w_star_amount','w_required','w_class');
2358
  $temp=$params;
2359
+
2360
+ if(strpos($temp, 'w_hide_label') > -1)
2361
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_field_label_col','w_star_amount','w_required','w_class');
2362
+
2363
  foreach($params_names as $params_name )
2364
  {
2365
  $temp=explode('*:*'.$params_name.'*:*',$temp);
2374
  foreach($attrs as $attr)
2375
  $param['attributes'] = $param['attributes'].' add_'.$attr;
2376
  }
2377
+ $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
2378
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
2379
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
2380
+
2381
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
2382
 
2383
 
2387
  $images .= '<img id="'.$id.'_star_'.$i.'" src="' . WD_FM_URL . '/images/star.png?ver='. get_option("wd_form_maker_version").'" onmouseover="change_src('.$i.','.$id.',&quot;form_id_temp&quot;)" onmouseout="reset_src('.$i.','.$id.')" onclick="select_star_rating('.$i.','.$id.', &quot;form_id_temp&quot;)">';
2388
  }
2389
 
2390
+ $rep ='<div id="wdform_field'.$id.'" type="type_star_rating" 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">'.$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_star_rating" 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_star_amount'].'" id="'.$id.'_star_amountform_id_temp" name="'.$id.'_star_amountform_id_temp"><input type="hidden" value="'.$param['w_field_label_col'].'" name="'.$id.'_star_colorform_id_temp" id="'.$id.'_star_colorform_id_temp"><div id="'.$id.'_elementform_id_temp" class="wdform_stars" '.$param['attributes'].'>'.$images.'</div></div></div>';
2391
 
2392
 
2393
  break;
2396
  {
2397
  $params_names=array('w_field_label_size','w_field_label_pos','w_mini_labels','w_scale_amount','w_required','w_class');
2398
  $temp=$params;
2399
+
2400
+ if(strpos($temp, 'w_hide_label') > -1)
2401
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_mini_labels','w_scale_amount','w_required','w_class');
2402
+
2403
  foreach($params_names as $params_name )
2404
  {
2405
  $temp=explode('*:*'.$params_name.'*:*',$temp);
2415
  $param['attributes'] = $param['attributes'].' add_'.$attr;
2416
  }
2417
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
2418
+
2419
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
2420
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
2421
+
2422
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
2423
 
2424
  $w_mini_labels = explode('***',$param['w_mini_labels']);
2436
  $radio_buttons .= '<div id="'.$id.'_scale_td2_'.$k.'form_id_temp" style="display: table-cell;"><input id="'.$id.'_scale_radioform_id_temp_'.$k.'" name="'.$id.'_scale_radioform_id_temp" value="'.$k.'" type="radio"></div>';
2437
  }
2438
 
2439
+ $rep ='<div id="wdform_field'.$id.'" type="type_scale_rating" 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.'; vertical-align: top; width: '.$param['w_field_label_size'].'px;"><span id="'.$id.'_element_labelform_id_temp" class="label">'.$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_scale_rating" 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_scale_amount'].'" id="'.$id.'_scale_amountform_id_temp" name="'.$id.'_scale_amountform_id_temp"><div id="'.$id.'_elementform_id_temp" style="float: left;" '.$param['attributes'].'><label class="mini_label" id="'.$id.'_mini_label_worst" style="position: relative; top: 6px; font-size: 11px; display: inline-table;">'.$w_mini_labels[0].'</label><div id="'.$id.'_scale_tableform_id_temp" style="display: inline-table;"><div id="'.$id.'_scale_tr1form_id_temp" style="display: table-row;">'.$numbers.'</div><div id="'.$id.'_scale_tr2form_id_temp" style="display: table-row;">'.$radio_buttons.'</div></div><label class="mini_label" id="'.$id.'_mini_label_best" style="position: relative; top: 6px; font-size: 11px; display: inline-table;">'.$w_mini_labels[1].'</label></div></div></div>';
2440
 
2441
  break;
2442
  }
2444
  {
2445
  $params_names=array('w_field_label_size','w_field_label_pos','w_field_width','w_field_min_value','w_field_max_value', 'w_field_step', 'w_field_value', 'w_required','w_class');
2446
  $temp=$params;
2447
+
2448
+ if(strpos($temp, 'w_hide_label') > -1)
2449
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_field_width','w_field_min_value','w_field_max_value', 'w_field_step', 'w_field_value', 'w_required','w_class');
2450
+
2451
+
2452
  foreach($params_names as $params_name ) {
2453
  $temp=explode('*:*'.$params_name.'*:*',$temp);
2454
  $param[$params_name] = $temp[0];
2460
  foreach($attrs as $attr)
2461
  $param['attributes'] = $param['attributes'].' add_'.$attr;
2462
  }
2463
+ $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
2464
+
2465
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
2466
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
2467
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
2468
+
2469
+ $rep ='<div id="wdform_field'.$id.'" type="type_spinner" 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">'.$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_spinner" 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_field_width'].'" name="'.$id.'_spinner_widthform_id_temp" id="'.$id.'_spinner_widthform_id_temp"><input type="hidden" value="'.$param['w_field_min_value'].'" id="'.$id.'_min_valueform_id_temp" name="'.$id.'_min_valueform_id_temp"><input type="hidden" value="'.$param['w_field_max_value'].'" name="'.$id.'_max_valueform_id_temp" id="'.$id.'_max_valueform_id_temp"><input type="hidden" value="'.$param['w_field_step'].'" name="'.$id.'_stepform_id_temp" id="'.$id.'_stepform_id_temp"><input type="" value="'.($param['w_field_value']!= 'null' ? $param['w_field_value'] : '').'" name="'.$id.'_elementform_id_temp" id="'.$id.'_elementform_id_temp" onkeypress="return check_isnum_or_minus(event)" style="width: '.$param['w_field_width'].'px;" '.$param['attributes'].' disabled/></div></div>';
2470
  break;
2471
  }
2472
  case 'type_slider': {
2473
  $params_names=array('w_field_label_size','w_field_label_pos','w_field_width','w_field_min_value','w_field_max_value', 'w_field_value', 'w_required','w_class');
2474
  $temp=$params;
2475
+
2476
+ if(strpos($temp, 'w_hide_label') > -1)
2477
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_field_width','w_field_min_value','w_field_max_value', 'w_field_value', 'w_required','w_class');
2478
+
2479
  foreach($params_names as $params_name ) {
2480
  $temp = explode('*:*'.$params_name.'*:*',$temp);
2481
  $param[$params_name] = $temp[0];
2489
  }
2490
  }
2491
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
2492
+
2493
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
2494
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
2495
+
2496
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
2497
+ $rep ='<div id="wdform_field'.$id.'" type="type_slider" 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.'; vertical-align: top; width: '.$param['w_field_label_size'].'px;"><span id="'.$id.'_element_labelform_id_temp" class="label">'.$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_slider" 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_field_width'].'" name="'.$id.'_slider_widthform_id_temp" id="'.$id.'_slider_widthform_id_temp"><input type="hidden" value="'.$param['w_field_min_value'].'" id="'.$id.'_slider_min_valueform_id_temp" name="'.$id.'_slider_min_valueform_id_temp"><input type="hidden" value="'.$param['w_field_max_value'].'" id="'.$id.'_slider_max_valueform_id_temp" name="'.$id.'_slider_max_valueform_id_temp"><input type="hidden" value="'.$param['w_field_value'].'" id="'.$id.'_slider_valueform_id_temp" name="'.$id.'_slider_valueform_id_temp"><div id="'.$id.'_slider_tableform_id_temp"><div><div id="'.$id.'_slider_td1form_id_temp"><div name="'.$id.'_elementform_id_temp" id="'.$id.'_elementform_id_temp" style="width: '.$param['w_field_width'].'px;" '.$param['attributes'].'"></div></div></div><div><div align="left" id="'.$id.'_slider_td2form_id_temp" style="display: inline-table; width: 33.3%; text-align: left;"><span id="'.$id.'_element_minform_id_temp" class="label">'.$param['w_field_min_value'].'</span></div><div align="right" id="'.$id.'_slider_td3form_id_temp" style="display: inline-table; width: 33.3%; text-align: center;"><span id="'.$id.'_element_valueform_id_temp" class="label">'.$param['w_field_value'].'</span></div><div align="right" id="'.$id.'_slider_td4form_id_temp" style="display: inline-table; width: 33.3%; text-align: right;"><span id="'.$id.'_element_maxform_id_temp" class="label">'.$param['w_field_max_value'].'</span></div></div></div></div></div>';
2498
  break;
2499
  }
2500
  case 'type_range': {
2501
  $params_names = array('w_field_label_size','w_field_label_pos','w_field_range_width','w_field_range_step','w_field_value1', 'w_field_value2', 'w_mini_labels', 'w_required','w_class');
2502
  $temp = $params;
2503
+
2504
+ if(strpos($temp, 'w_hide_label') > -1)
2505
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_field_range_width','w_field_range_step','w_field_value1', 'w_field_value2', 'w_mini_labels', 'w_required','w_class');
2506
+
2507
  foreach ($params_names as $params_name ) {
2508
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2509
  $param[$params_name] = $temp[0];
2517
  }
2518
  }
2519
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
2520
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
2521
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
2522
+
2523
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
2524
  $w_mini_labels = explode('***',$param['w_mini_labels']);
2525
+ $rep ='<div id="wdform_field'.$id.'" type="type_range" 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">'.$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_range" 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_field_range_width'].'" name="'.$id.'_range_widthform_id_temp" id="'.$id.'_range_widthform_id_temp"><input type="hidden" value="'.$param['w_field_range_step'].'" name="'.$id.'_range_stepform_id_temp" id="'.$id.'_range_stepform_id_temp"><div id="'.$id.'_elemet_table_littleform_id_temp" style="display: table;"><div style="display: table-row;"><div valign="middle" align="left" style="display: table-cell;"><input type="" value="'.($param['w_field_value1']!= 'null' ? $param['w_field_value1'] : '').'" name="'.$id.'_elementform_id_temp0" id="'.$id.'_elementform_id_temp0" onkeypress="return check_isnum_or_minus(event)" style="width: '.$param['w_field_range_width'].'px;" '.$param['attributes'].' disabled/></div><div valign="middle" align="left" style="display: table-cell; padding-left: 4px;"><input type="" value="'.($param['w_field_value2']!= 'null' ? $param['w_field_value2'] : '').'" name="'.$id.'_elementform_id_temp1" id="'.$id.'_elementform_id_temp1" onkeypress="return check_isnum_or_minus(event)" style="width: '.$param['w_field_range_width'].'px;" '.$param['attributes'].' disabled/></div></div><div style="display: table-row;"><div valign="top" align="left" style="display: table-cell;"><label class="mini_label" id="'.$id.'_mini_label_from">'.$w_mini_labels[0].'</label></div><div valign="top" align="left" style="display: table-cell;"><label class="mini_label" id="'.$id.'_mini_label_to">'.$w_mini_labels[1].'</label></div></div></div></div></div>';
2526
  break;
2527
  }
2528
  case 'type_grading': {
2529
  $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_items', 'w_total', 'w_required', 'w_class');
2530
  $temp = $params;
2531
+
2532
+ if(strpos($temp, 'w_hide_label') > -1)
2533
+ $params_names=array('w_field_label_size', 'w_field_label_pos', 'w_hide_label', 'w_items', 'w_total', 'w_required', 'w_class');
2534
+
2535
+
2536
  foreach($params_names as $params_name) {
2537
  $temp = explode('*:*' . $params_name . '*:*', $temp);
2538
  $param[$params_name] = $temp[0];
2546
  }
2547
  }
2548
  $param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "table-cell" : "block");
2549
+
2550
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
2551
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
2552
+
2553
  $required_sym = ($param['w_required'] == "yes" ? " *" : "");
2554
  $w_items = explode('***', $param['w_items']);
2555
  $grading_items = '';
2558
  $grading_items .= '<div id="'.$id.'_element_div'.$i.'" class="grading"><input id="'.$id.'_elementform_id_temp_'.$i.'" name="'.$id.'_elementform_id_temp_'.$i.'" onkeypress="return check_isnum_or_minus(event)" value="" size="5" onkeyup="sum_grading_values('.$id.',&quot;form_id_temp&quot;)" onchange="sum_grading_values('.$id.',&quot;form_id_temp&quot;)" '.$param['attributes'].' disabled/><label id="'.$id.'_label_elementform_id_temp'.$i.'" class="ch-rad-label">'.$w_items[$i].'</label></div>';
2559
  }
2560
 
2561
+ $rep ='<div id="wdform_field'.$id.'" type="type_grading" 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.'; vertical-align: top; width: '.$param['w_field_label_size'].'px;"><span id="'.$id.'_element_labelform_id_temp" class="label">'.$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_grading" 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_total'].'" name="'.$id.'_grading_totalform_id_temp" id="'.$id.'_grading_totalform_id_temp"><div id="'.$id.'_elementform_id_temp">'.$grading_items.'<div id="'.$id.'_element_total_divform_id_temp" class="grading_div">Total:<span id="'.$id.'_sum_elementform_id_temp" name="'.$id.'_sum_elementform_id_temp">0</span>/<span id="'.$id.'_total_elementform_id_temp" name="'.$id.'_total_elementform_id_temp">'.$param['w_total'].'</span><span id="'.$id.'_text_elementform_id_temp" name="'.$id.'_text_elementform_id_temp"></span></div></div></div></div>';
2562
 
2563
  break;
2564
  }
2565
  case 'type_matrix': {
2566
  $params_names=array('w_field_label_size','w_field_label_pos', 'w_field_input_type', 'w_rows', 'w_columns', 'w_required','w_class','w_textbox_size');
2567
  $temp = $params;
2568
+
2569
+ if(strpos($temp, 'w_hide_label') > -1)
2570
+ $params_names=array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_field_input_type', 'w_rows', 'w_columns', 'w_required','w_class','w_textbox_size');
2571
+
2572
+
2573
  foreach ($params_names as $params_name) {
2574
  $temp = explode('*:*'.$params_name.'*:*',$temp);
2575
  $param[$params_name] = $temp[0];
2583
  }
2584
  }
2585
  $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "table-cell" : "block");
2586
+ $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
2587
+ $display_label = $param['w_hide_label'] == "no" ? $param['w_field_label_pos'] : "none";
2588
+
2589
  $required_sym = ($param['w_required']=="yes" ? " *" : "");
2590
  $param['w_textbox_size'] = isset($param['w_textbox_size']) ? $param['w_textbox_size'] : '100';
2591
  $w_rows = explode('***',$param['w_rows']);
2622
 
2623
 
2624
 
2625
+ $rep ='<div id="wdform_field'.$id.'" type="type_matrix" 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">'.$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_matrix" 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_field_input_type'].'" name="'.$id.'_input_typeform_id_temp" id="'.$id.'_input_typeform_id_temp"><input type="hidden" value="'.$param['w_textbox_size'].'" name="'.$id.'_textbox_sizeform_id_temp" id="'.$id.'_textbox_sizeform_id_temp"><div id="'.$id.'_elementform_id_temp" style="display: table;" '.$param['attributes'].'><div id="'.$id.'_table_little" style="display: table-row-group;"><div id="'.$id.'_element_tr0" style="display: table-row;"><div id="'.$id.'_element_td0_0" style="display: table-cell;"></div>'.$column_labels.'</div>'.$rows_columns.'</div></div></div></div>';
2626
 
2627
  break;
2628
  }
2642
  }
2643
  }
2644
  $param['w_act'] = ($param['w_act']=="false" ? 'style="display: none;"' : "");
2645
+ $rep='<div id="wdform_field'.$id.'" type="type_submit_reset" 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;">type_submit_reset_'.$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_submit_reset" name="'.$id.'_typeform_id_temp" id="'.$id.'_typeform_id_temp"><button type="button" class="button-submit" id="'.$id.'_element_submitform_id_temp" value="'.$param['w_submit_title'].'" disabled '.$param['attributes'].'>'.$param['w_submit_title'].'</button><button type="button" class="button-reset" id="'.$id.'_element_resetform_id_temp" value="'.$param['w_reset_title'].'" disabled '.$param['w_act'].' '.$param['attributes'].'>'.$param['w_reset_title'].'</button></div></div>';
2646
  break;
2647
  }
2648
  case 'type_button': {
2728
  $row->reply_to_user = '';
2729
  $row->save_uploads = 1;
2730
 
2731
+ $row->header_title = '';
2732
+ $row->header_description = '';
2733
+ $row->header_image_url = '';
2734
+ $row->header_image_animation = '';
2735
+ $row->header_hide_image = '';
2736
+
2737
  $row->condition = '';
2738
  $row->mail_cc = '';
2739
  $row->mail_cc_user = '';
2756
 
2757
  public function get_theme_rows_data($old = '') {
2758
  global $wpdb;
2759
+ $rows = $wpdb->get_results("SELECT * FROM " . $wpdb->prefix . "formmaker_themes ORDER BY `version` DESC, `id` ASC");
2760
  return $rows;
2761
  }
2762
 
2780
 
2781
  public function page_nav() {
2782
  global $wpdb;
2783
+ $where = 'WHERE `id` NOT IN (' . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ')';
2784
  $where .= ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? ' AND title LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
2785
  $query = "SELECT COUNT(*) FROM " . $wpdb->prefix . "formmaker " . $where;
2786
  $total = $wpdb->get_var($query);
2794
  $page_nav['limit'] = (int) ($limit / 20 + 1);
2795
  return $page_nav;
2796
  }
2797
+
2798
+ public function get_display_options($id) {
2799
+ global $wpdb;
2800
+ $row = $wpdb->get_row($wpdb->prepare('SELECT * FROM ' . $wpdb->prefix . 'formmaker_display_options WHERE form_id="%d"', $id));
2801
+ if (!$row) {
2802
+ $row = new stdClass();
2803
+ $row->form_id = $id;
2804
+ $row->type = 'embedded';
2805
+ $row->scrollbox_loading_delay = 0;
2806
+ $row->popover_animate_effect = '';
2807
+ $row->popover_loading_delay = 0;
2808
+ $row->popover_frequency = 0;
2809
+ $row->topbar_position = 1;
2810
+ $row->topbar_remain_top = 1;
2811
+ $row->topbar_closing = 1;
2812
+ $row->topbar_hide_duration = 0;
2813
+ $row->scrollbox_position = 1;
2814
+ $row->scrollbox_trigger_point = 20;
2815
+ $row->scrollbox_hide_duration = 0;
2816
+ $row->scrollbox_auto_hide = 1;
2817
+ $row->hide_mobile = 0;
2818
+ $row->scrollbox_closing = 1;
2819
+ $row->scrollbox_minimize = 1;
2820
+ $row->scrollbox_minimize_text = '';
2821
+ $row->display_on = 'everything';
2822
+ $row->posts_include = '';
2823
+ $row->pages_include = '';
2824
+ $row->display_on_categories = '';
2825
+ $row->current_categories = '';
2826
+ $row->show_for_admin = 0;
2827
+ }
2828
+ return $row;
2829
+ }
2830
+
2831
+ public function fm_posts_query() {
2832
+ $default_post_types = array( 'post', 'page' );
2833
+ $custom_post_types = get_post_types( array(
2834
+ 'public' => true,
2835
+ '_builtin' => false,
2836
+ ) );
2837
+
2838
+ $post_types = array_merge($default_post_types, $custom_post_types);
2839
+ $pt_names = array_values($post_types);
2840
+
2841
+ $query = array(
2842
+ 'post_type' => $pt_names,
2843
+ 'suppress_filters' => true,
2844
+ 'update_post_term_cache' => false,
2845
+ 'update_post_meta_cache' => false,
2846
+ 'post_status' => 'publish',
2847
+ 'posts_per_page' => -1,
2848
+ );
2849
+
2850
+ $get_posts = new WP_Query;
2851
+ $posts = $get_posts->query( $query );
2852
+ if ( ! $get_posts->post_count ) {
2853
+ return false;
2854
+ }
2855
+
2856
+ $results = array();
2857
+ foreach ($posts as $post) {
2858
+ $results[(int)$post->ID] = array(
2859
+ 'title' => trim( esc_html( strip_tags( get_the_title( $post ) ) ) ),
2860
+ 'post_type' => $post->post_type,
2861
+ );
2862
+ }
2863
+
2864
+ wp_reset_postdata();
2865
+ return $results;
2866
+ }
2867
+
2868
+ public function fm_categories_query() {
2869
+ $categories = get_categories( array(
2870
+ 'hide_empty' => 0,
2871
+ ) );
2872
+ $final_categories = array();
2873
+ foreach ( $categories as $key => $value ) {
2874
+ $final_categories[$value->term_id] = $value->name;
2875
+ }
2876
+ return $final_categories;
2877
+ }
2878
  ////////////////////////////////////////////////////////////////////////////////////////
2879
  // Getters & Setters //
2880
  ////////////////////////////////////////////////////////////////////////////////////////
admin/models/FMModelSubmissions_fm.php CHANGED
@@ -25,7 +25,7 @@ class FMModelSubmissions_fm {
25
 
26
  public function get_form_titles() {
27
  global $wpdb;
28
- $query = "SELECT id, title FROM " . $wpdb->prefix . "formmaker WHERE `id` NOT IN(" . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ") order by title";
29
  $forms = $wpdb->get_results($query);
30
  return $forms;
31
  }
@@ -58,7 +58,7 @@ class FMModelSubmissions_fm {
58
  $labels_parameters = array();
59
  $join_query = array();
60
  $join_where = array();
61
- $join_verified = array();
62
  $rows_ord = array();
63
  $join = '';
64
 
@@ -77,7 +77,6 @@ class FMModelSubmissions_fm {
77
  $ver_emails_array[$elem_label][] = $wpdb->get_var($query);
78
  }
79
  }
80
-
81
  for ($i = 0; $i < 9; $i++) {
82
  array_push($labels_parameters, NULL);
83
  }
@@ -85,9 +84,7 @@ class FMModelSubmissions_fm {
85
  $sorted_label_names_original = array();
86
  $where_labels = array();
87
  $where2 = array();
88
-
89
  $pagination_clicked = (isset($_POST['pagination_clicked']) && $_POST['pagination_clicked'] == '1' ? '1' : '0');
90
-
91
  $order_by = ((isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) != '') ? esc_html(stripslashes($_POST['order_by'])) : 'group_id');
92
  $asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'asc') ? 'asc' : 'desc');
93
  $limit = ((isset($_POST['page_number'])) ? ((int) $_POST['page_number'] - 1) * 20 : 0);
@@ -99,7 +96,7 @@ class FMModelSubmissions_fm {
99
  $lists['username_search'] = ((isset($_POST['username_search'])) ? esc_html(stripslashes($_POST['username_search'])) : '');
100
  $lists['useremail_search'] = ((isset($_POST['useremail_search'])) ? esc_html(stripslashes($_POST['useremail_search'])) : '');
101
  $lists['id_search'] = ((isset($_POST['id_search'])) ? esc_html(stripslashes($_POST['id_search'])) : '');
102
-
103
  if ($lists['ip_search']) {
104
  $where[] = 'ip LIKE "%' . $lists['ip_search'] . '%"';
105
  }
@@ -175,9 +172,9 @@ class FMModelSubmissions_fm {
175
  else {
176
  $search_temp = '';
177
  }
178
- $search_temp = strtolower($search_temp);
 
179
  $lists[$form_id . '_' . $label_id . '_search'] = $search_temp;
180
-
181
  if ($search_temp) {
182
  $join_query[] = 'search';
183
  $join_where[] = array('label' => $label_id, 'search' => $search_temp);
@@ -198,7 +195,6 @@ class FMModelSubmissions_fm {
198
  }
199
  }
200
 
201
-
202
  if (strpos($order_by, "_field")) {
203
  if (in_array(str_replace("_field", "", $order_by), $labels)) {
204
  $join_query[] = 'sort';
@@ -209,7 +205,7 @@ class FMModelSubmissions_fm {
209
  if ($order_by == 'date' or $order_by == 'ip') {
210
  $cols = 'group_id, date, ip';
211
  }
212
-
213
  $ver_where = '';
214
  if( !empty($join_verified) ) {
215
  foreach( $join_verified as $key_ver => $join_ver) {
@@ -217,7 +213,7 @@ class FMModelSubmissions_fm {
217
  }
218
  }
219
 
220
- switch (count($join_query)) {
221
  case 0:
222
  $join = 'SELECT distinct group_id FROM ' . $wpdb->prefix . 'formmaker_submits WHERE '. $where;
223
 
@@ -263,10 +259,7 @@ class FMModelSubmissions_fm {
263
  }
264
  }
265
  break;
266
- }
267
-
268
-
269
-
270
  $pos = strpos($join, 'SELECT t.group_id');
271
  if ($pos === FALSE) {
272
  $query = str_replace(array('SELECT group_id','SELECT distinct group_id'), array('SELECT count(distinct group_id)','SELECT count(distinct group_id)'), $join);
@@ -275,12 +268,11 @@ class FMModelSubmissions_fm {
275
  $query = str_replace('SELECT t.group_id', 'SELECT count(t.group_id)', $join);
276
  }
277
  $total = $wpdb->get_var($query);
278
-
279
  $query_sub_count = "SELECT count(distinct group_id) from ".$wpdb->prefix."formmaker_submits";
280
  $sub_count = (int)$wpdb->get_var($query_sub_count);
281
 
282
  $limit1 = (int)$total < $sub_count && !$pagination_clicked ? 0 : $limit;
283
-
284
  $query = $join . ' ' . $orderby . ' limit ' . $limit1 . ', 20 ';
285
  $results = $wpdb->get_results($query);
286
  for ($i = 0; $i < count($results); $i++) {
@@ -294,6 +286,7 @@ class FMModelSubmissions_fm {
294
  array_push($searched_ids, $searched_group_ids[$i]->group_id);
295
  }
296
 
 
297
  $where2 = array();
298
  $where2[] = "group_id='0'";
299
  foreach ($rows_ord as $rows_ordd) {
@@ -305,6 +298,7 @@ class FMModelSubmissions_fm {
305
  $group_ids = $rows_ord;
306
  $lists['total'] = $total;
307
  $lists['limit'] = (int) ($limit1 / 20 + 1);
 
308
  $where_choices = $where;
309
  array_push($labels_parameters, $sorted_labels_id);
310
  array_push($labels_parameters, $sorted_label_types);
@@ -314,7 +308,7 @@ class FMModelSubmissions_fm {
314
  array_push($labels_parameters, $rows);
315
  array_push($labels_parameters, $group_ids);
316
  array_push($labels_parameters, $where_choices);
317
- array_push($labels_parameters, $searched_ids);
318
  }
319
  return $labels_parameters;
320
  }
@@ -465,7 +459,7 @@ class FMModelSubmissions_fm {
465
  array_push($label_type, $label_oder_each[1]);
466
  }
467
  /*$theme_id = $wpdb->get_var("SELECT theme FROM " . $wpdb->prefix . "formmaker WHERE id='" . $form->id . "'");*/
468
- $css = $wpdb->get_var("SELECT css FROM " . $wpdb->prefix . "formmaker_themes");
469
  array_push($params, $rows);
470
  array_push($params, $label_id);
471
  array_push($params, $label_order_original);
25
 
26
  public function get_form_titles() {
27
  global $wpdb;
28
+ $query = "SELECT id, title FROM " . $wpdb->prefix . "formmaker WHERE `id` NOT IN(" . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ") order by title";
29
  $forms = $wpdb->get_results($query);
30
  return $forms;
31
  }
58
  $labels_parameters = array();
59
  $join_query = array();
60
  $join_where = array();
61
+ $join_verified = array();
62
  $rows_ord = array();
63
  $join = '';
64
 
77
  $ver_emails_array[$elem_label][] = $wpdb->get_var($query);
78
  }
79
  }
 
80
  for ($i = 0; $i < 9; $i++) {
81
  array_push($labels_parameters, NULL);
82
  }
84
  $sorted_label_names_original = array();
85
  $where_labels = array();
86
  $where2 = array();
 
87
  $pagination_clicked = (isset($_POST['pagination_clicked']) && $_POST['pagination_clicked'] == '1' ? '1' : '0');
 
88
  $order_by = ((isset($_POST['order_by']) && esc_html(stripslashes($_POST['order_by'])) != '') ? esc_html(stripslashes($_POST['order_by'])) : 'group_id');
89
  $asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'asc') ? 'asc' : 'desc');
90
  $limit = ((isset($_POST['page_number'])) ? ((int) $_POST['page_number'] - 1) * 20 : 0);
96
  $lists['username_search'] = ((isset($_POST['username_search'])) ? esc_html(stripslashes($_POST['username_search'])) : '');
97
  $lists['useremail_search'] = ((isset($_POST['useremail_search'])) ? esc_html(stripslashes($_POST['useremail_search'])) : '');
98
  $lists['id_search'] = ((isset($_POST['id_search'])) ? esc_html(stripslashes($_POST['id_search'])) : '');
99
+
100
  if ($lists['ip_search']) {
101
  $where[] = 'ip LIKE "%' . $lists['ip_search'] . '%"';
102
  }
172
  else {
173
  $search_temp = '';
174
  }
175
+ $search_temp = strtolower($search_temp);
176
+
177
  $lists[$form_id . '_' . $label_id . '_search'] = $search_temp;
 
178
  if ($search_temp) {
179
  $join_query[] = 'search';
180
  $join_where[] = array('label' => $label_id, 'search' => $search_temp);
195
  }
196
  }
197
 
 
198
  if (strpos($order_by, "_field")) {
199
  if (in_array(str_replace("_field", "", $order_by), $labels)) {
200
  $join_query[] = 'sort';
205
  if ($order_by == 'date' or $order_by == 'ip') {
206
  $cols = 'group_id, date, ip';
207
  }
208
+
209
  $ver_where = '';
210
  if( !empty($join_verified) ) {
211
  foreach( $join_verified as $key_ver => $join_ver) {
213
  }
214
  }
215
 
216
+ switch (count($join_query)) {
217
  case 0:
218
  $join = 'SELECT distinct group_id FROM ' . $wpdb->prefix . 'formmaker_submits WHERE '. $where;
219
 
259
  }
260
  }
261
  break;
262
+ }
 
 
 
263
  $pos = strpos($join, 'SELECT t.group_id');
264
  if ($pos === FALSE) {
265
  $query = str_replace(array('SELECT group_id','SELECT distinct group_id'), array('SELECT count(distinct group_id)','SELECT count(distinct group_id)'), $join);
268
  $query = str_replace('SELECT t.group_id', 'SELECT count(t.group_id)', $join);
269
  }
270
  $total = $wpdb->get_var($query);
271
+
272
  $query_sub_count = "SELECT count(distinct group_id) from ".$wpdb->prefix."formmaker_submits";
273
  $sub_count = (int)$wpdb->get_var($query_sub_count);
274
 
275
  $limit1 = (int)$total < $sub_count && !$pagination_clicked ? 0 : $limit;
 
276
  $query = $join . ' ' . $orderby . ' limit ' . $limit1 . ', 20 ';
277
  $results = $wpdb->get_results($query);
278
  for ($i = 0; $i < count($results); $i++) {
286
  array_push($searched_ids, $searched_group_ids[$i]->group_id);
287
  }
288
 
289
+
290
  $where2 = array();
291
  $where2[] = "group_id='0'";
292
  foreach ($rows_ord as $rows_ordd) {
298
  $group_ids = $rows_ord;
299
  $lists['total'] = $total;
300
  $lists['limit'] = (int) ($limit1 / 20 + 1);
301
+
302
  $where_choices = $where;
303
  array_push($labels_parameters, $sorted_labels_id);
304
  array_push($labels_parameters, $sorted_label_types);
308
  array_push($labels_parameters, $rows);
309
  array_push($labels_parameters, $group_ids);
310
  array_push($labels_parameters, $where_choices);
311
+ array_push($labels_parameters, $searched_ids);
312
  }
313
  return $labels_parameters;
314
  }
459
  array_push($label_type, $label_oder_each[1]);
460
  }
461
  /*$theme_id = $wpdb->get_var("SELECT theme FROM " . $wpdb->prefix . "formmaker WHERE id='" . $form->id . "'");*/
462
+ $css = $wpdb->get_var("SELECT params FROM " . $wpdb->prefix . "formmaker_themes");
463
  array_push($params, $rows);
464
  array_push($params, $label_id);
465
  array_push($params, $label_order_original);
admin/models/FMModelThemes_fm.php CHANGED
@@ -22,7 +22,7 @@ class FMModelThemes_fm {
22
  global $wpdb;
23
  $where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE title LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
24
  $asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'desc') ? 'desc' : 'asc');
25
- $order_by_array = array('id', 'title', 'default');
26
  $order_by = isset($_POST['order_by']) && in_array(esc_html(stripslashes($_POST['order_by'])), $order_by_array) ? esc_html(stripslashes($_POST['order_by'])) : 'id';
27
  $order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
28
  if (isset($_POST['page_number']) && $_POST['page_number']) {
@@ -48,9 +48,10 @@ class FMModelThemes_fm {
48
  $row->id = $row_id;
49
  $row->title = $row_title;
50
  $row->default = FALSE;
 
51
  }
52
  else {
53
- $row->css = '';
54
  }
55
  }
56
  }
@@ -58,12 +59,20 @@ class FMModelThemes_fm {
58
  $row = new stdClass();
59
  $row->id = 0;
60
  $row->title = '';
61
- $row->css = '';
62
  $row->default = 0;
 
 
 
 
 
 
 
 
63
  }
64
  return $row;
65
  }
66
-
67
  public function page_nav() {
68
  global $wpdb;
69
  $where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE title LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
22
  global $wpdb;
23
  $where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE title LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
24
  $asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'desc') ? 'desc' : 'asc');
25
+ $order_by_array = array('id', 'title', 'default');
26
  $order_by = isset($_POST['order_by']) && in_array(esc_html(stripslashes($_POST['order_by'])), $order_by_array) ? esc_html(stripslashes($_POST['order_by'])) : 'id';
27
  $order_by = ' ORDER BY `' . $order_by . '` ' . $asc_or_desc;
28
  if (isset($_POST['page_number']) && $_POST['page_number']) {
48
  $row->id = $row_id;
49
  $row->title = $row_title;
50
  $row->default = FALSE;
51
+ $row->version = 2;
52
  }
53
  else {
54
+ $row->params = '';
55
  }
56
  }
57
  }
59
  $row = new stdClass();
60
  $row->id = 0;
61
  $row->title = '';
62
+ $row->params = '{"GPFontFamily":"tahoma","AGPWidth":"100","AGPSPWidth":"30","AGPPadding":"","AGPMargin":"0 auto","AGPBorderColor":"#ffffff","AGPBorderType":"solid","AGPBorderWidth":"1","AGPBorderRadius":"0","AGPBoxShadow":"","HPAlign":"top","HPBGColor":"#96afab","HPWidth":"100","HTPWidth":"40","HPPadding":"10px 0","HPMargin":"","HPTextAlign":"center","HPBorderColor":"#b7b7b7","HPBorderType":"solid","HPBorderWidth":"1","HPBorderRadius":"0","HTPFontSize":"24","HTPWeight":"normal","HTPColor":"#ffffff","HDPFontSize":"15","HDPColor":"#607370","HIPAlign":"top","HIPWidth":"80","HIPHeight":"","GPBGColor":"#ededed","GPFontSize":"16","GPFontWeight":"normal","GPWidth":"100","GTPWidth":"60","GPAlign":"center","GPBackground":"","GPBackgroundRepeat":"no-repeat","GPBGPosition1":"","GPBGPosition2":"","GPBGSize1":"","GPBGSize2":"","GPColor":"#607370","GPPadding":"10px","GPMargin":"","GPBorderColor":"#ffffff","GPBorderType":"solid","GPBorderWidth":"1","GPBorderRadius":"0","GPMLFontSize":"14","GPMLFontWeight":"normal","GPMLColor":"#868686","GPMLPadding":"0px 5px 0px 0px","GPMLMargin":"0px","SEPBGColor":"#ededed","SEPPadding":"","SEPMargin":"","COPPadding":"15px 20px","COPMargin":"0px","FPWidth":"70","FPPadding":"15px 0 0 0","FPMargin":"0 auto","IPHeight":"26","IPFontSize":"14","IPFontWeight":"normal","IPBGColor":"#ffffff","IPColor":"#868686","IPPadding":"0px 5px","IPMargin":"0px","IPBorderTop":"top","IPBorderRight":"right","IPBorderBottom":"bottom","IPBorderLeft":"left","IPBorderColor":"#dfdfdf","IPBorderType":"solid","IPBorderWidth":"1","IPBorderRadius":"0","IPBoxShadow":"","SBPAppearance":"none","SBPBackground":"images/themes/drop-downs/2.png","SBPBGRepeat":"no-repeat","SBPBGPos1":"95%","SBPBGPos2":"50%","SBPBGSize1":"8%","SBPBGSize2":"32%","SCPBGColor":"#ffffff","SCPWidth":"16","SCPHeight":"16","SCPBorderTop":"top","SCPBorderRight":"right","SCPBorderBottom":"bottom","SCPBorderLeft":"left","SCPBorderColor":"#868686","SCPBorderType":"solid","SCPBorderWidth":"1","SCPMargin":"0px 3px","SCPBorderRadius":"15","SCPBoxShadow":"","SCCPBGColor":"#868686","SCCPWidth":"6","SCCPHeight":"6","SCCPMargin":"5","SCCPBorderRadius":"10","MCPBGColor":"#ffffff","MCPWidth":"16","MCPHeight":"16","MCPBorderTop":"top","MCPBorderRight":"right","MCPBorderBottom":"bottom","MCPBorderLeft":"left","MCPBorderColor":"#868686","MCPBorderType":"solid","MCPBorderWidth":"1","MCPMargin":"0px 3px","MCPBorderRadius":"0","MCPBoxShadow":"","MCCPBGColor":"","MCCPBackground":"images/themes/checkboxes/1.png","MCCPBGRepeat":"no-repeat","MCCPBGPos1":"","MCCPBGPos2":"","MCCPWidth":"16","MCCPHeight":"16","MCCPMargin":"0","MCCPBorderRadius":"0","SPAlign":"left","SPBGColor":"#e74c3c","SPWidth":"","SPHeight":"","SPFontSize":"16","SPFontWeight":"normal","SPColor":"#ffffff","SPPadding":"5px 8px","SPMargin":"0 15px 0 0","SPBorderTop":"top","SPBorderRight":"right","SPBorderBottom":"bottom","SPBorderLeft":"left","SPBorderColor":"#e74c3c","SPBorderType":"solid","SPBorderWidth":"1","SPBorderRadius":"0","SPBoxShadow":"","SHPBGColor":"#701e16","SHPColor":"#ffffff","SHPBorderTop":"top","SHPBorderRight":"right","SHPBorderBottom":"bottom","SHPBorderLeft":"left","SHPBorderColor":"#701e16","SHPBorderType":"solid","SHPBorderWidth":"1","BPBGColor":"#96afab","BPWidth":"","BPHeight":"","BPFontSize":"16","BPFontWeight":"normal","BPColor":"#ffffff","BPPadding":"5px 8px","BPMargin":"0 15px 0 0","BPBorderTop":"top","BPBorderRight":"right","BPBorderBottom":"bottom","BPBorderLeft":"left","BPBorderColor":"#8a8a8a","BPBorderType":"solid","BPBorderWidth":"1","BPBorderRadius":"0","BPBoxShadow":"","BHPBGColor":"#5a7784","BHPColor":"#ffffff","BHPBorderTop":"top","BHPBorderRight":"right","BHPBorderBottom":"bottom","BHPBorderLeft":"left","BHPBorderColor":"#5a7784","BHPBorderType":"solid","BHPBorderWidth":"1","PSAPBGColor":"#e74c3c","PSAPFontSize":"16","PSAPFontWeight":"normal","PSAPColor":"#ffffff","PSAPHeight":"","PSAPLineHeight":"","PSAPPadding":"6px","PSAPMargin":"0 1px 0 0 ","PSAPBorderTop":"top","PSAPBorderRight":"right","PSAPBorderBottom":"bottom","PSAPBorderLeft":"left","PSAPBorderColor":"#e74c3c","PSAPBorderType":"solid","PSAPBorderWidth":"2","PSAPBorderRadius":"0","PSDPBGColor":"#ededed","PSDPFontSize":"14","PSDPFontWeight":"normal","PSDPColor":"#737373","PSDPHeight":"","PSDPLineHeight":"","PSDPPadding":"3px 5px","PSDPMargin":"0 1px 0 0 ","PSDPBorderTop":"top","PSDPBorderRight":"right","PSDPBorderBottom":"bottom","PSDPBorderLeft":"left","PSDPBorderColor":"#ededed","PSDPBorderType":"solid","PSDPBorderWidth":"2","PSDPBorderRadius":"0","PSAPAlign":"right","PSAPWidth":"","PPAPWidth":"100%","NBPBGColor":"","NBPWidth":"","NBPHeight":"","NBPLineHeight":"","NBPColor":"#607370","NBPPadding":"4px 10px","NBPMargin":"0px","NBPBorderColor":"#777777","NBPBorderType":"solid","NBPBorderWidth":"1","NBPBorderRadius":"0","NBPBoxShadow":"","NBHPBGColor":"","NBHPColor":"#96afab","NBHPBorderColor":"#787878","NBHPBorderType":"solid","NBHPBorderWidth":"1","PBPBGColor":"","PBPWidth":"100","PBPHeight":"","PBPLineHeight":"","PBPColor":"#607370","PBPPadding":"","PBPMargin":"0px","PBPBorderColor":"#777777","PBPBorderType":"solid","PBPBorderWidth":"1","PBPBorderRadius":"0","PBPBoxShadow":"","PBHPBGColor":"","PBHPColor":"#96afab","PBHPBorderColor":"#787878","PBHPBorderType":"solid","PBHPBorderWidth":"1","CBPPosition":"absolute","CBPTop":"10px","CBPRight":"10px","CBPBottom":"","CBPLeft":"","CBPBGColor":"","CBPFontSize":"20","CBPFontWeight":"normal","CBPColor":"#777777","CBPPadding":"0px","CBPMargin":"0px","CBPBorderColor":"#ffffff","CBPBorderType":"solid","CBPBorderWidth":"1","CBPBorderRadius":"0","CBHPBGColor":"","CBHPColor":"#e74c3c","CBHPBorderColor":"#737373","CBHPBorderType":"solid","CBHPBorderWidth":"1","MBPBGColor":"#96afab","MBPFontSize":"17","MBPFontWeight":"normal","MBPColor":"#ffffff","MBPTextAlign":"center","MBPPadding":"10px","MBPMargin":"","MBPBorderTop":"top","MBPBorderRight":"right","MBPBorderBottom":"bottom","MBPBorderLeft":"left","MBPBorderColor":"#96afab","MBPBorderType":"solid","MBPBorderWidth":"2","MBPBorderRadius":"0","MBHPBGColor":"#96afab","MBHPColor":"#607370","MBHPBorderTop":"top","MBHPBorderRight":"right","MBHPBorderBottom":"bottom","MBHPBorderLeft":"left","MBHPBorderColor":"#96afab","MBHPBorderType":"solid","MBHPBorderWidth":"2","OPDeInputColor":"#afafaf","OPFontStyle":"normal","OPRColor":"#ff1313","OPDPIcon":"images/themes/date-pickers/2.png","OPDPRepeat":"no-repeat","OPDPPos1":"0%","OPDPPos2":"10%","OPDPMargin":"3px 0 0 -23px","OPFBgUrl":"images/themes/file-uploads/2.png","OPFBGRepeat":"no-repeat","OPFPos1":"0%","OPFPos2":"10%","OPGWidth":"100","CUPCSS":""}';
63
  $row->default = 0;
64
+ $row->version = 2;
65
+ }
66
+ $params_decoded = json_decode(html_entity_decode($row->params), true);
67
+ if (json_last_error() == JSON_ERROR_NONE) {
68
+ $row->params = $params_decoded;
69
+ }
70
+ else {
71
+ $row->params = array("CUPCSS" => $row->params);
72
  }
73
  return $row;
74
  }
75
+
76
  public function page_nav() {
77
  global $wpdb;
78
  $where = ((isset($_POST['search_value']) && (esc_html($_POST['search_value']) != '')) ? 'WHERE title LIKE "%' . esc_html($_POST['search_value']) . '%"' : '');
admin/models/FMModelUninstall_fm.php CHANGED
@@ -1,23 +1,7 @@
1
  <?php
2
 
3
  class FMModelUninstall_fm {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- ////////////////////////////////////////////////////////////////////////////////////////
14
- // Constructor & Destructor //
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- public function __construct() {
17
- }
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- // Public Methods //
20
- ////////////////////////////////////////////////////////////////////////////////////////
21
  public function delete_db_tables() {
22
  global $wpdb;
23
  $true_or_false_forms = $wpdb->get_var("SELECT COUNT(*) FROM " . $wpdb->prefix . "formmaker WHERE `id` IN (" . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ")");
@@ -27,7 +11,16 @@ class FMModelUninstall_fm {
27
  $wpdb->query("DELETE FROM " . $wpdb->prefix . "formmaker_views WHERE `form_id` NOT IN (" . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ")");
28
  }
29
  else {
30
- $email_verification_post_id = $wpdb->get_var( "SELECT mail_verification_post_id FROM " . $wpdb->prefix . "formmaker WHERE mail_verification_post_id != 0");
 
 
 
 
 
 
 
 
 
31
  $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker");
32
  $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_submits");
33
  $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_views");
@@ -35,26 +28,23 @@ class FMModelUninstall_fm {
35
  $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_sessions");
36
  $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_blocked");
37
  $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_query");
38
-
39
  $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_backup");
40
- wp_delete_post($email_verification_post_id);
41
-
42
- delete_option('contact_form_forms');
43
- delete_option("wd_form_maker_version");
44
- delete_option('formmaker_cureent_version');
45
- delete_option('fm_emailverification');
46
- delete_option('form_maker_pro_active');
47
- delete_option('fm_admin_notice');
48
- delete_option('fm_settings');
 
 
 
 
 
 
49
  }
50
  }
51
- ////////////////////////////////////////////////////////////////////////////////////////
52
- // Getters & Setters //
53
- ////////////////////////////////////////////////////////////////////////////////////////
54
- ////////////////////////////////////////////////////////////////////////////////////////
55
- // Private Methods //
56
- ////////////////////////////////////////////////////////////////////////////////////////
57
- ////////////////////////////////////////////////////////////////////////////////////////
58
- // Listeners //
59
- ////////////////////////////////////////////////////////////////////////////////////////
60
- }
1
  <?php
2
 
3
  class FMModelUninstall_fm {
4
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  public function delete_db_tables() {
6
  global $wpdb;
7
  $true_or_false_forms = $wpdb->get_var("SELECT COUNT(*) FROM " . $wpdb->prefix . "formmaker WHERE `id` IN (" . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ")");
11
  $wpdb->query("DELETE FROM " . $wpdb->prefix . "formmaker_views WHERE `form_id` NOT IN (" . (get_option('contact_form_forms', '') != '' ? get_option('contact_form_forms') : 0) . ")");
12
  }
13
  else {
14
+ $email_verification_post_id = $wpdb->get_var("SELECT mail_verification_post_id FROM " . $wpdb->prefix . "formmaker WHERE mail_verification_post_id != 0");
15
+ delete_option("wd_form_maker_version");
16
+ delete_option('formmaker_cureent_version');
17
+ delete_option('contact_form_themes');
18
+ delete_option('contact_form_forms');
19
+ delete_option('form_maker_pro_active');
20
+ delete_option('fm_emailverification');
21
+ delete_option('fm_admin_notice');
22
+ delete_option('fm_settings');
23
+ wp_delete_post($email_verification_post_id);
24
  $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker");
25
  $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_submits");
26
  $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_views");
28
  $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_sessions");
29
  $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_blocked");
30
  $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_query");
 
31
  $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_backup");
32
+ $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_mailchimp");
33
+ $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_reg");
34
+ $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_post_gen_options");
35
+ $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_email_conditions");
36
+ $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_dbox_int");
37
+ $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_pdf_options");
38
+ $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_pdf");
39
+ $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_pushover");
40
+ $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_stripe");
41
+ $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_save_options");
42
+ $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_saved_entries");
43
+ $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_saved_attributes");
44
+ $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_calculator");
45
+ $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_gdrive_int");
46
+ $wpdb->query("DROP TABLE IF EXISTS " . $wpdb->prefix . "formmaker_display_options");
47
  }
48
  }
49
+
50
+ }
 
 
 
 
 
 
 
 
admin/views/FMViewBlocked_ips_fm.php CHANGED
@@ -33,7 +33,6 @@ class FMViewBlocked_ips_fm {
33
  $ids_string = '';
34
  ?>
35
  <div id="fm_blocked_ips_message" style="width: 99%; display: none;"></div>
36
- <div class="fm-clear"></div>
37
  <form onkeypress="fm_doNothing(event)" class="wrap" id="blocked_ips" method="post" action="admin.php?page=blocked_ips_fm">
38
  <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
39
  <div class="fm-page-banner blocked-ips-banner">
@@ -41,11 +40,11 @@ class FMViewBlocked_ips_fm {
41
  </div>
42
  <div class="fm-logo-title">Blocked IPs</div>
43
  <div class="fm-page-actions">
44
- <button class="fm-button save-button small" onclick="fm_set_input_value('task', 'save_all');">
45
  <span></span>
46
  Save
47
  </button>
48
- <button class="fm-button delete-button small" onclick="if (confirm('Do you want to unblock selected IPs?')) { fm_set_input_value('task', 'delete_all'); } else { return false; }">
49
  <span></span>
50
  Delete
51
  </button>
@@ -85,7 +84,7 @@ class FMViewBlocked_ips_fm {
85
  <th></th>
86
  <th>
87
  <input type="text" class="input_th" id="ip" name="ip" onkeypress="return fm_check_isnum(event)">
88
- <button class="fm-button add-button small" onclick="if (fm_check_required('ip', 'IP')) {return false;} fm_set_input_value('task', 'save'); fm_set_input_value('current_id', ''); fm_save_ip('blocked_ips');">
89
  Add IP
90
  <span></span>
91
  </button>
33
  $ids_string = '';
34
  ?>
35
  <div id="fm_blocked_ips_message" style="width: 99%; display: none;"></div>
 
36
  <form onkeypress="fm_doNothing(event)" class="wrap" id="blocked_ips" method="post" action="admin.php?page=blocked_ips_fm">
37
  <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
38
  <div class="fm-page-banner blocked-ips-banner">
40
  </div>
41
  <div class="fm-logo-title">Blocked IPs</div>
42
  <div class="fm-page-actions">
43
+ <button class="fm-button save-button medium" onclick="fm_set_input_value('task', 'save_all');">
44
  <span></span>
45
  Save
46
  </button>
47
+ <button class="fm-button delete-button medium" onclick="if (confirm('Do you want to unblock selected IPs?')) { fm_set_input_value('task', 'delete_all'); } else { return false; }">
48
  <span></span>
49
  Delete
50
  </button>
84
  <th></th>
85
  <th>
86
  <input type="text" class="input_th" id="ip" name="ip" onkeypress="return fm_check_isnum(event)">
87
+ <button class="fm-button add-button medium" onclick="if (fm_check_required('ip', 'IP')) {return false;} fm_set_input_value('task', 'save'); fm_set_input_value('current_id', ''); fm_save_ip('blocked_ips');">
88
  Add IP
89
  <span></span>
90
  </button>
admin/views/FMViewFormMakerEditCSS.php DELETED
@@ -1,135 +0,0 @@
1
- <?php
2
-
3
- class FMViewFormMakerEditCSS {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $model;
14
-
15
-
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- // Constructor & Destructor //
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
- public function __construct($model) {
20
- $this->model = $model;
21
- }
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
- public function display() {
26
- $theme_id = ((isset($_GET['id'])) ? esc_html(stripslashes($_GET['id'])) : '');
27
- $form_id = ((isset($_GET['form_id'])) ? esc_html(stripslashes($_GET['form_id'])) : 0);
28
- $row = $this->model->get_theme_row($theme_id);
29
- wp_print_scripts('jquery');
30
-
31
- ?>
32
- <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>load-styles.php?c=1&amp;dir=ltr&amp;load=admin-bar,dashicons,wp-admin,buttons,wp-auth-check" rel="stylesheet">
33
- <link media="all" type="text/css" href="<?php echo get_admin_url(); ?>css/colors<?php echo ((get_bloginfo('version') < '3.8') ? '-fresh' : ''); ?>.min.css" id="colors-css" rel="stylesheet">
34
- <link media="all" type="text/css" href="<?php echo WD_FM_URL . '/css/form_maker_tables.css'; ?>" rel="stylesheet">
35
- <script src="<?php echo WD_FM_URL . '/js/form_maker_admin.js'; ?>" type="text/javascript"></script>
36
- <script src="<?php echo WD_FM_URL . '/js/layout/codemirror.js'; ?>" type="text/javascript"></script>
37
- <script src="<?php echo WD_FM_URL . '/js/layout/formatting.js'; ?>" type="text/javascript"></script>
38
- <script src="<?php echo WD_FM_URL . '/js/layout/css.js'; ?>" type="text/javascript"></script>
39
- <script src="<?php echo WD_FM_URL . '/js/layout/clike.js'; ?>" type="text/javascript"></script>
40
- <script src="<?php echo WD_FM_URL . '/js/layout/javascript.js'; ?>" type="text/javascript"></script>
41
- <script src="<?php echo WD_FM_URL . '/js/layout/htmlmixed.js'; ?>" type="text/javascript"></script>
42
- <script src="<?php echo WD_FM_URL . '/js/layout/xml.js'; ?>" type="text/javascript"></script>
43
- <script src="<?php echo WD_FM_URL . '/js/layout/php.js'; ?>" type="text/javascript"></script>
44
- <link media="all" type="text/css" href="<?php echo WD_FM_URL . '/css/codemirror.css'; ?>" rel="stylesheet">
45
-
46
- <style>
47
- .CodeMirror {
48
- border: 1px solid #ccc;
49
- font-size: 12px;
50
- margin-bottom: 6px;
51
- background: white;
52
- }
53
- </style>
54
-
55
- <form id="fm_theme" class="wrap wp-core-ui" method="post" action="#" style="width: 99%; padding-left:3px;">
56
- <div class="fm-page-header">
57
- <div class="fm-page-actions">
58
- <button class="fm-button save-button small" onclick="if (fm_check_required('title', 'Theme title')) {return false;}; fm_save_theme('save'); window.parent.jQuery('#theme option[value=<?php echo $theme_id; ?>]').html(jQuery('#title').val()); window.parent.tb_remove();">
59
- <span></span>
60
- Save
61
- </button>
62
- <button class="fm-button apply-button small" onclick="if (fm_check_required('title', 'Theme title')) {return false;}; fm_save_theme('apply'); window.parent.jQuery('#theme option[value=<?php echo $theme_id; ?>]').html(jQuery('#title').val()); return false;">
63
- <span></span>
64
- Apply
65
- </button>
66
- <button class="fm-button save-as-copy-button medium" onclick="if (fm_check_required('title', 'Theme title')) {return false;}; fm_save_theme('save_as_new'); window.parent.jQuery('#theme').append('<option value=0>' + jQuery('#title').val() + '</option>'); window.parent.tb_remove(); return false;">
67
- <span></span>
68
- Save as New
69
- </button>
70
- <button class="fm-button undo-button small" onclick="fm_reset_theme(); return false;">
71
- <span></span>
72
- Reset
73
- </button>
74
- <button class="fm-button cancel-button small" onclick="window.parent.tb_remove();">
75
- <span></span>
76
- Cancel
77
- </button>
78
- </div>
79
- <div class="fm-clear"></div>
80
- </div>
81
- <table style="clear: both;">
82
- <tbody>
83
- <tr>
84
- <td class="fm_label"><label for="title">Theme title: <span style="color:#FF0000;"> * </span> </label></td>
85
- <td><input type="text" id="title" name="title" value="<?php echo $row->title; ?>" class="fm_text_input" /></td>
86
- </tr>
87
- <tr>
88
- <td class="fm_label"><label for="css">Css: </label></td>
89
- <td style="width: 90%;"><textarea id="css" name="css" rows="25" style="width: 100%;"><?php echo htmlspecialchars($row->css); ?></textarea></td>
90
- </tr>
91
- </tbody>
92
- </table>
93
- <div style="display: none;" id="main_theme"><?php echo str_replace('"', '\"', $row->css); ?></div>
94
- <input type="hidden" id="task" name="task" value="" />
95
- <input type="hidden" id="current_id" name="current_id" value="<?php echo $row->id; ?>" />
96
- <input type="hidden" id="default" name="default" value="<?php echo $row->default; ?>" />
97
- <input type="hidden" name="form_id" id="form_id" value="<?php echo $form_id; ?>" />
98
- </form>
99
- <script>
100
- var editor = CodeMirror.fromTextArea(
101
- document.getElementById("css"), {
102
- lineNumbers: true,
103
- lineWrapping: true,
104
- mode: "css"
105
- });
106
-
107
- CodeMirror.commands["selectAll"](editor);
108
- editor.autoFormatRange(editor.getCursor(true), editor.getCursor(false));
109
- editor.scrollTo(0,0);
110
-
111
- function fm_save_theme(task) {
112
- fm_set_input_value('task', task);
113
- document.getElementById('fm_theme').submit();
114
- }
115
-
116
- function fm_reset_theme() {
117
- editor.setValue(jQuery('#main_theme').html())
118
- jQuery('#css').val(jQuery('#main_theme').html());
119
- }
120
-
121
- </script>
122
- <?php
123
- die();
124
- }
125
-
126
- ////////////////////////////////////////////////////////////////////////////////////////
127
- // Getters & Setters //
128
- ////////////////////////////////////////////////////////////////////////////////////////
129
- ////////////////////////////////////////////////////////////////////////////////////////
130
- // Private Methods //
131
- ////////////////////////////////////////////////////////////////////////////////////////
132
- ////////////////////////////////////////////////////////////////////////////////////////
133
- // Listeners //
134
- ////////////////////////////////////////////////////////////////////////////////////////
135
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
admin/views/FMViewFormMakerPreview.php CHANGED
@@ -1,480 +1,79 @@
1
  <?php
2
 
3
  class FMViewFormMakerPreview {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
- private $model;
14
 
 
15
 
16
- ////////////////////////////////////////////////////////////////////////////////////////
17
- // Constructor & Destructor //
18
- ////////////////////////////////////////////////////////////////////////////////////////
19
  public function __construct($model) {
20
  $this->model = $model;
21
  }
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
  public function display() {
26
  $form_id = ((isset($_GET['form_id'])) ? esc_html(stripslashes($_GET['form_id'])) : 0);
27
  $form = (($form_id) ? $this->model->get_form($form_id) : '');
 
28
  wp_print_scripts('jquery');
29
  wp_print_scripts('jquery-ui-widget');
30
  wp_print_scripts('jquery-ui-slider');
31
  wp_print_scripts('jquery-ui-spinner');
32
- $fm_settings = get_option('fm_settings');
33
- $map_key = isset($fm_settings['map_key']) ? $fm_settings['map_key'] : '';
34
- ?>
35
- <script src="https://maps.google.com/maps/api/js?v=3.exp&key=<?php echo $map_key ?>" type="text/javascript"></script>
36
- <script src="<?php echo WD_FM_URL . '/js/if_gmap_front_end.js'; ?>" type="text/javascript"></script>
37
- <script src="<?php echo WD_FM_URL . '/js/calendar/calendar.js'; ?>" type="text/javascript"></script>
38
- <script src="<?php echo WD_FM_URL . '/js/calendar/calendar_function.js'; ?>" type="text/javascript"></script>
39
- <link media="all" type="text/css" href="<?php echo WD_FM_URL . '/css/calendar-jos.css'; ?>" rel="stylesheet">
40
- <link media="all" type="text/css" href="<?php echo WD_FM_URL . '/css/jquery-ui-1.10.3.custom.css'; ?>" rel="stylesheet">
41
- <link media="all" type="text/css" href="<?php echo WD_FM_URL . '/css/jquery-ui-spinner.css'; ?>" rel="stylesheet">
42
- <link media="all" type="text/css" href="<?php echo WD_FM_URL . '/css/form_maker_frontend.css'; ?>" rel="stylesheet">
43
- <?php
44
- if (isset($_GET['test_theme'])) {
45
- wp_print_scripts('jquery-effects-shake');
46
- wp_register_script('main_div_front_end', WD_FM_URL . '/js/main_div_front_end.js', array(), get_option("wd_form_maker_version"));
47
- $theme_id = esc_html(stripslashes($_GET['test_theme']));
48
- require_once (WD_FM_DIR . '/frontend/controllers/FMControllerForm_maker.php');
49
- $controller = new FMControllerForm_maker();
50
- echo $controller->execute($form_id, $theme_id);
51
- die();
52
- }
53
- $theme_id = ((isset($_GET['id'])) ? esc_html(stripslashes($_GET['id'])) : '');
54
- $css = $this->model->get_theme_css($theme_id);
55
- $id = 'form_id_temp';
56
- ?>
57
- <script src="<?php echo WD_FM_URL . '/js/main_front_end.js'; ?>"></script>
58
- <style>
59
- <?php
60
- echo str_replace('[SITE_ROOT]', WD_FM_URL, $css);
61
- ?>
62
- </style>
63
- <div id="form_id_temppages" class="wdform_page_navigation" show_title="" show_numbers="" type=""></div>
64
- <form id="form_preview"><?php echo $form; ?></form>
65
- <?php
66
- if ($form) { // Preview from options page.
67
- die();
68
- }
69
- ?>
70
- <input type="hidden" id="counter<?php echo $id; ?>" value="" name="counter<?php echo $id; ?>" />
71
- <script>
72
- var plugin_url = "<?php echo WD_FM_URL; ?>";
73
- /*JURI_ROOT = '<?php echo WD_FM_URL . '/js' ?>';*/
74
- document.getElementById('form_preview').innerHTML = window.parent.document.getElementById('take').innerHTML;
75
- document.getElementById('form_id_temppages').setAttribute('show_title', window.parent.document.getElementById('pages').getAttribute('show_title'));
76
- document.getElementById('form_id_temppages').setAttribute('show_numbers', window.parent.document.getElementById('pages').getAttribute('show_numbers'));
77
- document.getElementById('form_id_temppages').setAttribute('type', window.parent.document.getElementById('pages').getAttribute('type'));
78
- document.getElementById('counterform_id_temp').value = window.parent.gen;
79
- form_view_count<?php echo $id ?>= 0;
80
- for (i = 1; i <= 30; i++) {
81
- if (document.getElementById('<?php echo $id ?>form_view' + i)) {
82
- form_view_count<?php echo $id ?>++;
83
- form_view_max<?php echo $id ?>= i;
84
- document.getElementById('<?php echo $id ?>form_view' + i).parentNode.removeAttribute('style');
85
- }
86
- }
87
- refresh_first();
88
- if (form_view_count<?php echo $id ?>> 1) {
89
- for (i = 1; i <= form_view_max<?php echo $id ?>; i++) {
90
- if (document.getElementById('<?php echo $id ?>form_view' + i)) {
91
- first_form_view<?php echo $id ?>= i;
92
- break;
93
- }
94
- }
95
- generate_page_nav(first_form_view<?php echo $id ?>, '<?php echo $id ?>', form_view_count<?php echo $id ?>, form_view_max<?php echo $id ?>);
96
- }
97
- function remove_add_(id) {
98
- attr_name = new Array();
99
- attr_value = new Array();
100
- var input = document.getElementById(id);
101
- atr = input.attributes;
102
- for (v = 0; v < 30; v++)
103
- if (atr[v]) {
104
- if (atr[v].name.indexOf("add_") == 0) {
105
- attr_name.push(atr[v].name.replace('add_', ''));
106
- attr_value.push(atr[v].value);
107
- input.removeAttribute(atr[v].name);
108
- v--;
109
- }
110
- }
111
- for (v = 0; v < attr_name.length; v++) {
112
- input.setAttribute(attr_name[v], attr_value[v])
113
- }
114
- }
115
- function refresh_first() {
116
- n = window.parent.gen;
117
- for (i = 0; i < n; i++) {
118
- if (document.getElementById(i)) {
119
- for (z = 0; z < document.getElementById(i).childNodes.length; z++) {
120
- if (document.getElementById(i).childNodes[z].nodeType == 3) {
121
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[z]);
122
- }
123
- }
124
- if (document.getElementById(i).getAttribute('type') == "type_map") {
125
- if_gmap_init(i);
126
- for (q = 0; q < 20; q++) {
127
- if (document.getElementById(i + "_elementform_id_temp").getAttribute("long" + q)) {
128
- w_long = parseFloat(document.getElementById(i + "_elementform_id_temp").getAttribute("long" + q));
129
- w_lat = parseFloat(document.getElementById(i + "_elementform_id_temp").getAttribute("lat" + q));
130
- w_info = parseFloat(document.getElementById(i + "_elementform_id_temp").getAttribute("info" + q));
131
- add_marker_on_map(i, q, w_long, w_lat, w_info, false);
132
- }
133
- }
134
- }
135
- if (document.getElementById(i).getAttribute('type') == "type_mark_map") {
136
- if_gmap_init(i);
137
- w_long = parseFloat(document.getElementById(i + "_elementform_id_temp").getAttribute("long" + 0));
138
- w_lat = parseFloat(document.getElementById(i + "_elementform_id_temp").getAttribute("lat" + 0));
139
- w_info = parseFloat(document.getElementById(i + "_elementform_id_temp").getAttribute("info" + 0));
140
- add_marker_on_map(i, 0, w_long, w_lat, w_info, true);
141
- }
142
- if (document.getElementById(i).getAttribute('type') == "type_captcha" || document.getElementById(i).getAttribute('type') == "type_recaptcha") {
143
- if (document.getElementById(i).childNodes[10]) {
144
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
145
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
146
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
147
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
148
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
149
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
150
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
151
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
152
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
153
- }
154
- else {
155
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
156
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
157
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
158
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
159
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
160
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
161
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
162
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
163
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
164
- }
165
- continue;
166
- }
167
- if (document.getElementById(i).getAttribute('type') == "type_section_break") {
168
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
169
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
170
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
171
- continue;
172
- }
173
- if (document.getElementById(i).childNodes[10]) {
174
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
175
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
176
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
177
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
178
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
179
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
180
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
181
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
182
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[2]);
183
- }
184
- else {
185
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
186
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
187
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
188
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
189
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
190
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
191
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
192
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
193
- document.getElementById(i).removeChild(document.getElementById(i).childNodes[1]);
194
- }
195
- }
196
- }
197
- for (i = 0; i <= n; i++) {
198
- if (document.getElementById(i)) {
199
- type = document.getElementById(i).getAttribute("type");
200
- switch (type) {
201
- case "type_text":
202
- case "type_number":
203
- case "type_password":
204
- case "type_submitter_mail":
205
- case "type_own_select":
206
- case "type_country":
207
- case "type_hidden":
208
- case "type_map": {
209
- remove_add_(i + "_elementform_id_temp");
210
- break;
211
- }
212
- case "type_submit_reset": {
213
- remove_add_(i + "_element_submitform_id_temp");
214
- if (document.getElementById(i + "_element_resetform_id_temp")) {
215
- remove_add_(i + "_element_resetform_id_temp");
216
- }
217
- break;
218
- }
219
 
220
- case "type_captcha": {
221
- remove_add_("_wd_captchaform_id_temp");
222
- remove_add_("_element_refreshform_id_temp");
223
- remove_add_("_wd_captcha_inputform_id_temp");
224
- break;
225
- }
226
- case "type_recaptcha": {
227
- remove_add_("wd_recaptchaform_id_temp");
228
- break;
229
- }
230
- case "type_file_upload": {
231
- remove_add_(i + "_elementform_id_temp");
232
- break;
233
- }
234
- case "type_textarea": {
235
- remove_add_(i + "_elementform_id_temp");
236
- break;
237
- }
238
- case "type_name": {
239
- if (document.getElementById(i + "_element_titleform_id_temp")) {
240
- remove_add_(i + "_element_titleform_id_temp");
241
- remove_add_(i + "_element_firstform_id_temp");
242
- remove_add_(i + "_element_lastform_id_temp");
243
- remove_add_(i + "_element_middleform_id_temp");
244
- }
245
- else {
246
- remove_add_(i + "_element_firstform_id_temp");
247
- remove_add_(i + "_element_lastform_id_temp");
248
 
249
- }
250
- break;
251
- }
252
- case "type_phone": {
253
- remove_add_(i + "_element_firstform_id_temp");
254
- remove_add_(i + "_element_lastform_id_temp");
255
- break;
256
- }
257
- case "type_address": {
258
- if(document.getElementById(i+"_disable_fieldsform_id_temp").getAttribute('street1')=='no')
259
- remove_add_(i+"_street1form_id_temp");
260
- if(document.getElementById(i+"_disable_fieldsform_id_temp").getAttribute('street2')=='no')
261
- remove_add_(i+"_street2form_id_temp");
262
- if(document.getElementById(i+"_disable_fieldsform_id_temp").getAttribute('city')=='no')
263
- remove_add_(i+"_cityform_id_temp");
264
- if(document.getElementById(i+"_disable_fieldsform_id_temp").getAttribute('state')=='no')
265
- remove_add_(i+"_stateform_id_temp");
266
- if(document.getElementById(i+"_disable_fieldsform_id_temp").getAttribute('postal')=='no')
267
- remove_add_(i+"_postalform_id_temp");
268
- if(document.getElementById(i+"_disable_fieldsform_id_temp").getAttribute('country')=='no')
269
- remove_add_(i+"_countryform_id_temp");
270
- break;
271
- }
272
- case "type_checkbox":
273
- case "type_radio": {
274
- is = true;
275
- for (j = 0; j < 100; j++) {
276
- if (document.getElementById(i + "_elementform_id_temp" + j)) {
277
- remove_add_(i + "_elementform_id_temp" + j);
278
- }
279
- }
280
- break;
281
- }
282
- case "type_button": {
283
- for (j = 0; j < 100; j++) {
284
- if (document.getElementById(i + "_elementform_id_temp" + j)) {
285
- remove_add_(i + "_elementform_id_temp" + j);
286
- }
287
- }
288
- break;
289
- }
290
- case "type_time": {
291
- if (document.getElementById(i + "_ssform_id_temp")) {
292
- remove_add_(i + "_ssform_id_temp");
293
- remove_add_(i + "_mmform_id_temp");
294
- remove_add_(i + "_hhform_id_temp");
295
- }
296
- else {
297
- remove_add_(i + "_mmform_id_temp");
298
- remove_add_(i + "_hhform_id_temp");
299
- }
300
- break;
301
- }
302
- case "type_date": {
303
- remove_add_(i + "_elementform_id_temp");
304
- remove_add_(i + "_buttonform_id_temp");
305
- break;
306
- }
307
- case "type_date_fields": {
308
- remove_add_(i + "_dayform_id_temp");
309
- remove_add_(i + "_monthform_id_temp");
310
- remove_add_(i + "_yearform_id_temp");
311
- break;
312
- }
313
- case "type_star_rating": {
314
- remove_add_(i+"_elementform_id_temp");
315
- break;
316
- }
317
- case "type_scale_rating": {
318
- remove_add_(i+"_elementform_id_temp");
319
- break;
320
- }
321
- case "type_spinner": {
322
- remove_add_(i+"_elementform_id_temp");
323
- var spinner_value = document.getElementById(i+"_elementform_id_temp").getAttribute( "aria-valuenow" );
324
- var spinner_min_value = document.getElementById(i+"_min_valueform_id_temp").value;
325
- var spinner_max_value = document.getElementById(i+"_max_valueform_id_temp").value;
326
- var spinner_step = document.getElementById(i+"_stepform_id_temp").value;
327
- jQuery( "#"+i+"_elementform_id_temp" ).removeClass( "ui-spinner-input" )
328
- .prop( "disabled", false )
329
- .removeAttr( "autocomplete" )
330
- .removeAttr( "role" )
331
- .removeAttr( "aria-valuemin" )
332
- .removeAttr( "aria-valuemax" )
333
- .removeAttr( "aria-valuenow" );
334
- span_ui= document.getElementById(i+"_elementform_id_temp").parentNode;
335
- span_ui.parentNode.appendChild(document.getElementById(i+"_elementform_id_temp"));
336
- span_ui.parentNode.removeChild(span_ui);
337
- jQuery("#"+i+"_elementform_id_temp")[0].spin = null;
338
- spinner = jQuery( "#"+i+"_elementform_id_temp" ).spinner();
339
- spinner.spinner( "value", spinner_value );
340
- jQuery( "#"+i+"_elementform_id_temp" ).spinner({ min: spinner_min_value});
341
- jQuery( "#"+i+"_elementform_id_temp" ).spinner({ max: spinner_max_value});
342
- jQuery( "#"+i+"_elementform_id_temp" ).spinner({ step: spinner_step});
343
- break;
344
- }
345
- case "type_slider": {
346
- remove_add_(i+"_elementform_id_temp");
347
- var slider_value = document.getElementById(i+"_slider_valueform_id_temp").value;
348
- var slider_min_value = document.getElementById(i+"_slider_min_valueform_id_temp").value;
349
- var slider_max_value = document.getElementById(i+"_slider_max_valueform_id_temp").value;
350
- var slider_element_value = document.getElementById( i+"_element_valueform_id_temp" );
351
- var slider_value_save = document.getElementById( i+"_slider_valueform_id_temp" );
352
- document.getElementById(i+"_elementform_id_temp").innerHTML = "";
353
- document.getElementById(i+"_elementform_id_temp").removeAttribute( "class" );
354
- document.getElementById(i+"_elementform_id_temp").removeAttribute( "aria-disabled" );
355
- jQuery("#"+i+"_elementform_id_temp")[0].slide = null;
356
- jQuery( "#"+i+"_elementform_id_temp").slider({
357
- range: "min",
358
- value: eval(slider_value),
359
- min: eval(slider_min_value),
360
- max: eval(slider_max_value),
361
- slide: function( event, ui ) {
362
- slider_element_value.innerHTML = "" + ui.value ;
363
- slider_value_save.value = "" + ui.value;
364
 
365
- }
366
- });
367
- break;
368
- }
369
- case "type_range": {
370
- remove_add_(i+"_elementform_id_temp0");
371
- remove_add_(i+"_elementform_id_temp1");
372
- var spinner_value0 = document.getElementById(i+"_elementform_id_temp0").getAttribute( "aria-valuenow" );
373
- var spinner_step = document.getElementById(i+"_range_stepform_id_temp").value;
374
- jQuery( "#"+i+"_elementform_id_temp0" ).removeClass( "ui-spinner-input" )
375
- .prop( "disabled", false )
376
- .removeAttr( "autocomplete" )
377
- .removeAttr( "role" )
378
- .removeAttr( "aria-valuenow" );
379
- span_ui= document.getElementById(i+"_elementform_id_temp0").parentNode;
380
- span_ui.parentNode.appendChild(document.getElementById(i+"_elementform_id_temp0"));
381
- span_ui.parentNode.removeChild(span_ui);
382
- jQuery("#"+i+"_elementform_id_temp0")[0].spin = null;
383
- jQuery("#"+i+"_elementform_id_temp1")[0].spin = null;
384
- spinner0 = jQuery( "#"+i+"_elementform_id_temp0" ).spinner();
385
- spinner0.spinner( "value", spinner_value0 );
386
- jQuery( "#"+i+"_elementform_id_temp0" ).spinner({ step: spinner_step});
387
- var spinner_value1 = document.getElementById(i+"_elementform_id_temp1").getAttribute( "aria-valuenow" );
388
- jQuery( "#"+i+"_elementform_id_temp1" ).removeClass( "ui-spinner-input" )
389
- .prop( "disabled", false )
390
- .removeAttr( "autocomplete" )
391
- .removeAttr( "role" )
392
- .removeAttr( "aria-valuenow" );
393
- span_ui1= document.getElementById(i+"_elementform_id_temp1").parentNode;
394
- span_ui1.parentNode.appendChild(document.getElementById(i+"_elementform_id_temp1"));
395
- span_ui1.parentNode.removeChild(span_ui1);
396
- spinner1 = jQuery( "#"+i+"_elementform_id_temp1" ).spinner();
397
- spinner1.spinner( "value", spinner_value1 );
398
- jQuery( "#"+i+"_elementform_id_temp1" ).spinner({ step: spinner_step});
399
- break;
400
- }
401
- case "type_grading": {
402
- for (k=0; k<100; k++) {
403
- if (document.getElementById(i+"_elementform_id_temp"+k)) {
404
- remove_add_(i+"_elementform_id_temp"+k);
405
- }
406
- }
407
- break;
408
- }
409
- case "type_matrix": {
410
- remove_add_(i+"_elementform_id_temp");
411
- break;
412
- }
413
- }
414
- }
415
- }
416
- for (t = 1; t <= form_view_max<?php echo $id ?>; t++) {
417
- if (document.getElementById('form_id_tempform_view' + t)) {
418
- form_view_element = document.getElementById('form_id_tempform_view' + t);
419
- remove_whitespace(form_view_element);
420
- xy = form_view_element.childNodes.length - 2;
421
- for (z = 0; z <= xy; z++) {
422
- if (form_view_element.childNodes[z]) {
423
- if (form_view_element.childNodes[z].nodeType != 3) {
424
- if (!form_view_element.childNodes[z].id) {
425
- del = true;
426
- GLOBAL_tr = form_view_element.childNodes[z];
427
- //////////////////////////////////////////////////////////////////////////////////////////
428
- for (x = 0; x < GLOBAL_tr.firstChild.childNodes.length; x++) {
429
- table = GLOBAL_tr.firstChild.childNodes[x];
430
- tbody = table.firstChild;
431
- if (tbody.childNodes.length) {
432
- del = false;
433
- }
434
- }
435
- if (del) {
436
- form_view_element.removeChild(form_view_element.childNodes[z]);
437
- }
438
- }
439
- }
440
- }
441
- }
442
- }
443
- }
444
- for (i = 1; i <= window.parent.form_view_max; i++) {
445
- if (document.getElementById('form_id_tempform_view' + i)) {
446
- document.getElementById('form_id_tempform_view' + i).parentNode.removeChild(document.getElementById('form_id_tempform_view_img' + i));
447
- document.getElementById('form_id_tempform_view' + i).removeAttribute('style');
448
- }
449
- }
450
- }
451
- function remove_whitespace(node) {
452
- var ttt;
453
- for (ttt = 0; ttt < node.childNodes.length; ttt++) {
454
- if (node.childNodes[ttt] && node.childNodes[ttt].nodeType == '3' && !/\S/.test(node.childNodes[ttt].nodeValue)) {
455
- node.removeChild(node.childNodes[ttt]);
456
- ttt--;
457
- }
458
- else {
459
- if (node.childNodes[ttt].childNodes.length) {
460
- remove_whitespace(node.childNodes[ttt]);
461
- }
462
- }
463
- }
464
- return;
465
- }
466
- </script>
467
  <?php
 
 
 
468
  die();
469
  }
470
-
471
- ////////////////////////////////////////////////////////////////////////////////////////
472
- // Getters & Setters //
473
- ////////////////////////////////////////////////////////////////////////////////////////
474
- ////////////////////////////////////////////////////////////////////////////////////////
475
- // Private Methods //
476
- ////////////////////////////////////////////////////////////////////////////////////////
477
- ////////////////////////////////////////////////////////////////////////////////////////
478
- // Listeners //
479
- ////////////////////////////////////////////////////////////////////////////////////////
480
- }
1
  <?php
2
 
3
  class FMViewFormMakerPreview {
 
 
 
 
 
 
 
 
 
 
4
 
5
+ private $model;
6
 
 
 
 
7
  public function __construct($model) {
8
  $this->model = $model;
9
  }
10
+
 
 
11
  public function display() {
12
  $form_id = ((isset($_GET['form_id'])) ? esc_html(stripslashes($_GET['form_id'])) : 0);
13
  $form = (($form_id) ? $this->model->get_form($form_id) : '');
14
+ $ver = rand();
15
  wp_print_scripts('jquery');
16
  wp_print_scripts('jquery-ui-widget');
17
  wp_print_scripts('jquery-ui-slider');
18
  wp_print_scripts('jquery-ui-spinner');
19
+ wp_print_scripts('jquery-effects-shake');
20
+ wp_print_scripts('jquery-ui-datepicker');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
+ wp_register_style('fm-jquery-ui', WD_FM_URL . '/css/jquery-ui-1.10.3.custom.css', array(), WD_FM_VERSION);
23
+ wp_print_styles('fm-jquery-ui');
24
+ wp_register_style('fm-jquery-ui-spinner', WD_FM_URL . '/css/jquery-ui-spinner.css', array(), WD_FM_VERSION);
25
+ wp_print_styles('fm-jquery-ui-spinner');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
+ wp_register_script('gmap_form', WD_FM_URL . '/js/if_gmap_front_end.js', array(), WD_FM_VERSION);
28
+ wp_print_scripts('gmap_form');
29
+ wp_register_script('phone_field', WD_FM_URL . '/js/intlTelInput.js', array(), WD_FM_VERSION);
30
+ wp_print_scripts('phone_field');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
+ wp_register_script('fm-Calendar', WD_FM_URL . '/js/calendar/calendar.js', array(), WD_FM_VERSION);
33
+ wp_print_scripts('fm-Calendar');
34
+ wp_register_script('calendar_function', WD_FM_URL . '/js/calendar/calendar_function.js', array(), WD_FM_VERSION);
35
+ wp_print_scripts('calendar_function');
36
+
37
+ wp_register_style('form_maker_calendar-jos', WD_FM_URL . '/css/calendar-jos.css', array(), WD_FM_VERSION);
38
+ wp_print_styles('form_maker_calendar-jos');
39
+ wp_register_style('phone_field_css', WD_FM_URL . '/css/intlTelInput.css', array(), WD_FM_VERSION);
40
+ wp_print_styles('phone_field_css');
41
+ wp_register_style('form_maker_frontend', WD_FM_URL . '/css/form_maker_frontend.css', array(), WD_FM_VERSION);
42
+ wp_print_styles('form_maker_frontend');
43
+ wp_register_style('style_submissions', WD_FM_URL . '/css/style_submissions.css', array(), WD_FM_VERSION);
44
+ wp_print_styles('style_submissions');
45
+
46
+ wp_register_script('main_div_front_end', WD_FM_URL . '/js/main_div_front_end.js', array(), WD_FM_VERSION);
47
+ wp_print_scripts('main_div_front_end');
48
+ wp_localize_script('main_div_front_end', 'fm_objectL10n', array(
49
+ 'plugin_url' => WD_FM_URL,
50
+ 'fm_file_type_error' => addslashes(__('Can not upload this type of file', 'form_maker')),
51
+ 'fm_field_is_required' => addslashes(__('Field is required', 'form_maker')),
52
+ 'fm_min_max_check_1' => addslashes((__('The ', 'form_maker'))),
53
+ 'fm_min_max_check_2' => addslashes((__(' value must be between ', 'form_maker'))),
54
+ 'fm_spinner_check' => addslashes((__('Value must be between ', 'form_maker'))),
55
+ ));
56
+
57
+ require_once(WD_FM_DIR . '/framework/WDW_FM_Library.php');
58
+ $google_fonts = WDW_FM_Library::get_google_fonts();
59
+ $fonts = implode("|", str_replace(' ', '+', $google_fonts));
60
+ wp_register_style('fm_googlefonts', 'https://fonts.googleapis.com/css?family=' . $fonts . '&subset=greek,latin,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic', null, null);
61
+ wp_print_styles('fm_googlefonts');
62
+
63
+ wp_register_style('fm-animate', WD_FM_URL . '/css/frontend/fm-animate.css', array(), WD_FM_VERSION);
64
+ wp_print_styles('fm-animate');
65
+ wp_register_style('fm-font-awesome', WD_FM_URL . '/css/frontend/font-awesome/font-awesome.css', array(), WD_FM_VERSION);
66
+ wp_print_styles('fm-font-awesome');
67
+
68
+ $fm_settings = get_option('fm_settings');
69
+ $map_key = isset($fm_settings['map_key']) ? $fm_settings['map_key'] : '';
70
+ ?>
71
+ <script src="https://maps.google.com/maps/api/js?v=3.exp&key=<?php echo $map_key ?>" type="text/javascript"></script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72
  <?php
73
+ require_once(WD_FM_DIR . '/frontend/controllers/FMControllerForm_maker.php');
74
+ $controller = new FMControllerForm_maker();
75
+ echo $controller->execute($form_id);
76
  die();
77
  }
78
+
79
+ }
 
 
 
 
 
 
 
 
 
admin/views/FMViewFormmakerwindow.php CHANGED
@@ -32,7 +32,6 @@ class FMViewFormmakerwindow {
32
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
33
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
34
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
35
-
36
  <?php
37
  wp_print_scripts('jquery');
38
  ?>
@@ -91,8 +90,7 @@ class FMViewFormmakerwindow {
91
  </div>
92
  <div id="submissions_panel" class="panel">
93
  <div class="error" style="position: relative; padding: 5px; font-size: 20px; color: red; opacity: 1; font-weight: bolder;">Front end submissions are disabled in free version.</div>
94
- <div style="position: absolute; background: gray; width: 92%; height: 65%; opacity: 0.3;">
95
- </div>
96
  <table>
97
  <tr>
98
  <td class="smaller_font">Select a Form:</td>
32
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/tiny_mce_popup.js"></script>
33
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/mctabs.js"></script>
34
  <script language="javascript" type="text/javascript" src="<?php echo site_url(); ?>/wp-includes/js/tinymce/utils/form_utils.js"></script>
 
35
  <?php
36
  wp_print_scripts('jquery');
37
  ?>
90
  </div>
91
  <div id="submissions_panel" class="panel">
92
  <div class="error" style="position: relative; padding: 5px; font-size: 20px; color: red; opacity: 1; font-weight: bolder;">Front end submissions are disabled in free version.</div>
93
+ <div style="position: absolute; background: gray; width: 92%; height: 65%; opacity: 0.3;"></div>
 
94
  <table>
95
  <tr>
96
  <td class="smaller_font">Select a Form:</td>
admin/views/FMViewGoptions_fm.php CHANGED
@@ -37,7 +37,7 @@ class FMViewGoptions_fm {
37
  Form Settings
38
  </div>
39
  <div class="fm-page-actions">
40
- <button class="fm-button save-button small" onclick="if (fm_check_required('title', 'Title')) {return false;}; fm_set_input_value('task', 'save');">
41
  <span></span>
42
  Save
43
  </button>
@@ -46,6 +46,7 @@ class FMViewGoptions_fm {
46
 
47
  <table style="clear:both;">
48
  <tbody>
 
49
  <tr>
50
  <td>
51
  <label for="public_key">Recaptcha Public Key:</label>
37
  Form Settings
38
  </div>
39
  <div class="fm-page-actions">
40
+ <button class="fm-button save-button medium" onclick="if (fm_check_required('title', 'Title')) {return false;}; fm_set_input_value('task', 'save');">
41
  <span></span>
42
  Save
43
  </button>
46
 
47
  <table style="clear:both;">
48
  <tbody>
49
+
50
  <tr>
51
  <td>
52
  <label for="public_key">Recaptcha Public Key:</label>
admin/views/FMViewLicensing_fm.php CHANGED
@@ -23,40 +23,40 @@ class FMViewLicensing_fm {
23
  // Public Methods //
24
  ////////////////////////////////////////////////////////////////////////////////////////
25
  public function display() {
26
- wp_register_style('fm_license', WD_FM_URL . '/css/license.css', array(), get_option("wd_form_maker_version"));
27
- wp_print_styles('fm_license');
 
 
28
  ?>
29
  <div style="width:99%">
30
- <div id="featurs_tables">
31
- <div id="featurs_table1">
32
- <span>Unlimited Fields</span>
33
- <span>File Upload Field</span>
34
- <span>Google Map</span>
35
- <span>PayPal Integration</span>
36
- <span>Front-End Submissions</span>
37
- <span>Add-ons support</span>
38
- </div>
39
- <div id="featurs_table2">
40
- <span>Free</span>
41
- <span class="no"></span>
42
- <span class="no"></span>
43
- <span class="no"></span>
44
- <span class="no"></span>
45
- <span class="no"></span>
46
- <span class="no"></span>
47
- </div>
48
- <div id="featurs_table3">
49
- <span>Pro Version</span>
50
- <span class="yes"></span>
51
- <span class="yes"></span>
52
- <span class="yes"></span>
53
- <span class="yes"></span>
54
- <span class="yes"></span>
55
- <span class="yes"></span>
56
- </div>
57
- </div>
58
- <div style="float: left; clear: both;">
59
- <a href="https://web-dorado.com/files/fromFormMaker.php" class="button-primary" target="_blank">Purchase a License</a>
60
  <br/><br/>
61
  <p>After purchasing the commercial version follow these steps:</p>
62
  <ol>
@@ -64,12 +64,6 @@ class FMViewLicensing_fm {
64
  <li>Delete Form Maker Plugin.</li>
65
  <li>Install the downloaded commercial version of the plugin.</li>
66
  </ol>
67
- <br/>
68
- <p>If you enjoy using Form Maker and find it useful, please consider making a donation. Your donation will help encourage and support the plugin's continued development and better user support.</p>
69
- <br/>
70
- <a href="https://web-dorado.com/files/donate_redirect.php" target="_blank">
71
- <div class="fm-get-pro"></div>
72
- </a>
73
  </div>
74
  <?php
75
  }
23
  // Public Methods //
24
  ////////////////////////////////////////////////////////////////////////////////////////
25
  public function display() {
26
+ wp_register_style('fm_license', WD_FM_URL . '/css/license.css', array(), get_option("wd_form_maker_version"));
27
+ wp_print_styles('fm_license');
28
+ wp_register_style('fm_style', WD_FM_URL . '/css/style.css', array(), get_option("wd_form_maker_version"));
29
+ wp_print_styles('fm_style');
30
  ?>
31
  <div style="width:99%">
32
+ <div id="featurs_tables">
33
+ <div id="featurs_table1">
34
+ <span>Unlimited Fields</span>
35
+ <span>File Upload Field</span>
36
+ <span>Google Map</span>
37
+ <span>PayPal Integration</span>
38
+ <span>Front-End Submissions</span>
39
+ </div>
40
+ <div id="featurs_table2">
41
+ <span>Free</span>
42
+ <span class="no"></span>
43
+ <span class="no"></span>
44
+ <span class="no"></span>
45
+ <span class="no"></span>
46
+ <span class="no"></span>
47
+ </div>
48
+ <div id="featurs_table3">
49
+ <span>Pro Version</span>
50
+ <span class="yes"></span>
51
+ <span class="yes"></span>
52
+ <span class="yes"></span>
53
+ <span class="yes"></span>
54
+ <span class="yes"></span>
55
+ </div>
56
+ </div>
57
+ <div style="float: left; clear: both;">
58
+ <a href="https://web-dorado.com/files/fromFormMaker.php" class="button-primary" target="_blank">Purchase a
59
+ License</a>
 
 
60
  <br/><br/>
61
  <p>After purchasing the commercial version follow these steps:</p>
62
  <ol>
64
  <li>Delete Form Maker Plugin.</li>
65
  <li>Install the downloaded commercial version of the plugin.</li>
66
  </ol>
 
 
 
 
 
 
67
  </div>
68
  <?php
69
  }
admin/views/FMViewManage_fm.php CHANGED
@@ -1,27 +1,13 @@
1
  <?php
2
 
3
  class FMViewManage_fm {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
  private $model;
14
 
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- // Constructor & Destructor //
17
- ////////////////////////////////////////////////////////////////////////////////////////
18
  public function __construct($model) {
19
  $this->model = $model;
20
  }
21
 
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
  public function display() {
26
  $rows_data = $this->model->get_rows_data();
27
  $page_nav = $this->model->page_nav();
@@ -33,7 +19,6 @@ class FMViewManage_fm {
33
  $order_class = 'manage-column column-title sorted ' . $asc_or_desc;
34
  $ids_string = '';
35
  ?>
36
- <div class="fm-clear"></div>
37
  <form onkeypress="fm_doNothing(event)" class="wrap" id="manage_form" method="post" action="admin.php?page=manage_fm">
38
  <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
39
  <div class="fm-page-banner">
@@ -44,6 +29,12 @@ class FMViewManage_fm {
44
  <span></span>
45
  Add New
46
  </button>
 
 
 
 
 
 
47
  </div>
48
  <div class="tablenav top">
49
  <?php
@@ -62,26 +53,25 @@ class FMViewManage_fm {
62
  <a onclick="fm_set_input_value('task', ''); fm_set_input_value('order_by', 'title'); fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'title' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>'); fm_form_submit(event, 'manage_form')" href="">
63
  <span>Title</span><span class="sorting-indicator"></span></a>
64
  </th>
 
 
 
 
65
  <th class="<?php if ($order_by == 'mail') { echo $order_class; } ?>">
66
  <a onclick="fm_set_input_value('task', ''); fm_set_input_value('order_by', 'mail'); fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'mail' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>'); fm_form_submit(event, 'manage_form')" href="">
67
  <span>Email to send submissions to</span><span class="sorting-indicator"></span></a>
68
  </th>
69
- <th class="table_big_col">Shortcode</th>
70
  <th class="table_large_col">PHP function</th>
71
  <th class="table_small_col">Edit</th>
72
- <th class="table_small_col">
73
- <a title="Delete selected items" href="" onclick="if (confirm('Do you want to delete selected items?')) { fm_set_input_value('task', 'delete_all'); fm_form_submit(event, 'manage_form'); } else { return false; }">Delete</a>
74
- </th>
75
  </thead>
76
  <tbody id="tbody_arr">
77
  <?php
78
  if ($rows_data) {
79
  foreach ($rows_data as $row_data) {
80
  $alternate = (!isset($alternate) || $alternate == '') ? 'class="alternate"' : '';
81
- $old = '';
82
- if (isset($row_data->form) && ($row_data->form != '')) {
83
- $old = '_old';
84
- }
85
  ?>
86
  <tr id="tr_<?php echo $row_data->id; ?>" <?php echo $alternate; ?>>
87
  <td class="table_small_col check-column">
@@ -89,19 +79,41 @@ class FMViewManage_fm {
89
  </td>
90
  <td class="table_small_col"><?php echo $row_data->id; ?></td>
91
  <td>
92
- <a onclick="fm_set_input_value('task', 'edit<?php echo $old; ?>'); fm_set_input_value('current_id', '<?php echo $row_data->id; ?>'); fm_form_submit(event, 'manage_form')" href="" title="Edit"><?php echo $row_data->title; ?></a>
 
 
 
 
 
 
 
 
 
 
 
 
93
  </td>
94
  <td><?php echo $row_data->mail; ?></td>
95
  <td class="table_big_col" style="padding-left: 0; padding-right: 0;">
96
- <input type="text" value='[Form id="<?php echo $row_data->id; ?>"]' onclick="fm_select_value(this)" size="12" readonly="readonly" style="padding-left: 1px; padding-right: 1px;"/>
 
 
 
 
97
  </td>
98
  <td class="table_large_col" style="padding-left: 0; padding-right: 0;">
99
- <input type="text" value='&#60;?php wd_form_maker(<?php echo $row_data->id; ?>); ?&#62;' onclick="fm_select_value(this)" readonly="readonly" style="padding-left: 1px; padding-right: 1px;"/>
100
  </td>
101
  <td class="table_small_col">
102
- <button class="fm-icon edit-icon" onclick="fm_set_input_value('task', 'edit<?php echo $old; ?>'); fm_set_input_value('current_id', '<?php echo $row_data->id; ?>'); fm_form_submit(event, 'manage_form')">
 
 
 
103
  <span></span>
104
  </button>
 
 
 
105
  </td>
106
  <td class="table_small_col">
107
  <button class="fm-icon delete-icon" onclick="if (confirm('Do you want to delete selected item(s)?')) { fm_set_input_value('task', 'delete'); fm_set_input_value('current_id', '<?php echo $row_data->id; ?>'); fm_form_submit(event, 'manage_form'); } else { return false; }">
@@ -127,10 +139,12 @@ class FMViewManage_fm {
127
 
128
  public function edit($id) {
129
  ?>
130
- <img src="<?php echo WD_FM_URL . '/images/buttons.png'; ?>" style="display:none;"/>
131
  <?php
132
  $row = $this->model->get_row_data_new($id);
133
  $themes = $this->model->get_theme_rows_data();
 
 
134
  $labels = array();
135
  $label_id = array();
136
  $label_order_original = array();
@@ -148,12 +162,19 @@ class FMViewManage_fm {
148
  $labels['label'] = '"' . implode('","', $label_order_original) . '"';
149
  $labels['type'] = '"' . implode('","', $label_type) . '"';
150
  $page_title = (($id != 0) ? 'Edit form ' . $row->title : 'Create new form');
 
 
 
 
151
  ?>
152
  <script type="text/javascript">
153
  var plugin_url = "<?php echo WD_FM_URL; ?>";
154
  </script>
155
- <script src="<?php echo WD_FM_URL . '/js/formmaker_div_free.js'; ?>?ver=<?php echo get_option("wd_form_maker_version"); ?>" type="text/javascript"></script>
156
  <script type="text/javascript">
 
 
 
157
  form_view = 1;
158
  form_view_count = 1;
159
  form_view_max = 1;
@@ -347,7 +368,7 @@ class FMViewManage_fm {
347
  else {
348
  jQuery('#formMakerDiv').slideToggle(400);
349
  }
350
-
351
  if (document.getElementById('formMakerDiv1').style.display == 'block') {
352
  jQuery('#formMakerDiv1').slideToggle(200);
353
  }
@@ -368,7 +389,7 @@ class FMViewManage_fm {
368
  else {
369
  jQuery('#formMakerDiv').slideToggle(400);
370
  }
371
-
372
  if (document.getElementById('formMakerDiv1').style.display == 'block') {
373
  jQuery('#formMakerDiv1').slideToggle(200);
374
  }
@@ -384,7 +405,6 @@ class FMViewManage_fm {
384
  }
385
  }
386
  </script>
387
- <div class="fm-clear"></div>
388
  <form class="wrap" id="manage_form" method="post" action="admin.php?page=manage_fm">
389
  <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
390
  <h2 class="fm-h2-message"></h2>
@@ -400,11 +420,10 @@ class FMViewManage_fm {
400
  <?php
401
  if(isset($row->backup_id) )
402
  if($row->backup_id!="") {
403
- global $wpdb;
404
  $query = "SELECT backup_id FROM " . $wpdb->prefix . "formmaker_backup WHERE backup_id > ".$row->backup_id." AND id = ".$row->id." ORDER BY backup_id ASC LIMIT 0 , 1 ";
405
  $backup_id = $wpdb->get_var($query);
406
  if($backup_id) { ?>
407
- <button class="fm-button redo-button small" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; jQuery('#saving_text').html('Redo');fm_set_input_value('task', 'redo');">
408
  <span></span>
409
  Redo
410
  </button>
@@ -414,7 +433,7 @@ class FMViewManage_fm {
414
  $backup_id = $wpdb->get_var($query);
415
 
416
  if($backup_id) { ?>
417
- <button class="fm-button undo-button small" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; jQuery('#saving_text').html('Undo');fm_set_input_value('task', 'undo');">
418
  <span></span>
419
  Undo
420
  </button>
@@ -422,22 +441,22 @@ class FMViewManage_fm {
422
  }
423
  }
424
  ?>
425
-
426
  <?php if ($id) { ?>
427
  <button class="fm-button save-as-copy-button medium" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'save_as_copy');">
428
  <span></span>
429
  Save as Copy
430
  </button>
431
  <?php } ?>
432
- <button class="fm-button save-button small" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'save');">
433
  <span></span>
434
  Save
435
  </button>
436
- <button class="fm-button apply-button small" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'apply');">
437
  <span></span>
438
  Apply
439
  </button>
440
- <button class="fm-button cancel-button small" onclick="fm_set_input_value('task', 'cancel');">
441
  <span></span>
442
  Cancel
443
  </button>
@@ -451,37 +470,53 @@ class FMViewManage_fm {
451
  <input id="title" name="title" value="<?php echo $row->title; ?>"/>
452
  </div>
453
  <div class="fm-page-actions">
454
- <button class="fm-button form-options-button medium" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'form_options');">
 
 
 
 
455
  <span></span>
456
  Form Options
457
- </button>
458
- <button class="fm-button form-layout-button large" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'form_layout');">
459
  <span></span>
460
- Advanced Layout
461
- </button>
462
- </div>
463
  </div>
464
  <div class="fm-clear"></div>
465
  <div class="fm-theme-banner">
466
  <div class="fm-theme" style="float:left;">
467
  <span style="">Theme:&nbsp;</span>
468
  <select id="theme" name="theme" onChange="set_preview()">
469
- <?php
470
- foreach ($themes as $theme) {
471
- ?>
472
- <option value="<?php echo $theme->id; ?>" <?php echo (($theme->id == $row->theme) ? 'selected' : ''); ?>><?php echo $theme->title; ?></option>
473
- <?php
474
- }
475
- ?>
 
 
 
 
 
 
 
 
 
 
 
476
  </select>
477
- <button id="preview_form" class="fm-button preview-button medium" onclick="tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerPreview', 'form_id' => $row->id, 'test_theme' => $row->theme, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>'); return false;">
478
  <span></span>
479
  Preview
480
  </button>
481
- <button id="edit_css" class="fm-button options-edit-button medium" onclick="tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerEditCSS', 'id' => $row->theme, 'form_id' => $row->id, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>'); return false;">
482
- <span></span>
483
- Edit CSS
484
- </button>
 
485
  </div>
486
  <div style="float:right;">
487
  <button class="fm-button add-new-button large" onclick="enable(); Enable(); return false;">
@@ -492,793 +527,910 @@ class FMViewManage_fm {
492
  </div>
493
  <div class="fm-clear"></div>
494
  <div id="formMakerDiv" onclick="close_window()"></div>
495
- <div id="formMakerDiv1">
496
- <table class="formMakerDiv1_table" border="0" width="100%" cellpadding="0" cellspacing="0" height="100%">
497
- <tr>
498
- <td style="padding:0px">
499
- <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" >
500
- <tr valign="top">
501
- <td width="20%" height="100%" id="field_types">
502
- <div id="when_edit" style="display: none;"></div>
503
- <table border="0" cellpadding="0" cellspacing="3" width="100%" style="border-collapse: separate; border-spacing: 3px;">
504
- <tbody>
505
- <tr>
506
- <td align="center" onclick="addRow('customHTML')" class="field_buttons" id="table_editor">
507
- <img src="<?php echo WD_FM_URL; ?>/images/customHTML.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_customHTML">
508
- <div>Custom HTML</div>
509
- </td>
510
- <td align="center" onclick="addRow('text')" class="field_buttons" id="table_text">
511
- <img src="<?php echo WD_FM_URL; ?>/images/text.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_text">
512
- <div>Text input</div>
513
- </td>
514
- </tr>
515
- <tr>
516
- <td align="center" onclick="addRow('checkbox')" class="field_buttons" id="table_checkbox">
517
- <img src="<?php echo WD_FM_URL; ?>/images/checkbox.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_checkbox">
518
- <div>Multiple Choice</div>
519
- </td>
520
- <td align="center" onclick="addRow('radio')" class="field_buttons" id="table_radio">
521
- <img src="<?php echo WD_FM_URL; ?>/images/radio.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_radio">
522
- <div>Single Choice</div>
523
- </td>
524
- </tr>
525
- <tr>
526
- <td align="center" onclick="addRow('survey')" class="field_buttons" id="table_survey">
527
- <img src="<?php echo WD_FM_URL; ?>/images/survey.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_survey">
528
- <div>Survey Tools</div>
529
- </td>
530
- <td align="center" onclick="addRow('time_and_date')" class="field_buttons" id="table_time_and_date">
531
- <img src="<?php echo WD_FM_URL; ?>/images/time_and_date.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_time_and_date">
532
- <div>Time and Date</div>
533
- </td>
534
- </tr>
535
- <tr>
536
- <td align="center" onclick="addRow('select')" class="field_buttons" id="table_select">
537
- <img src="<?php echo WD_FM_URL; ?>/images/select.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_select">
538
- <div>Select Box</div>
539
- </td>
540
- <td align="center" onclick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')" class="field_buttons field_disabled" id="table_file_upload">
541
- <img src="<?php echo WD_FM_URL; ?>/images/file_upload.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_file_upload">
542
- <div>File Upload</div>
543
- </td>
544
- </tr>
545
- <tr>
546
- <td align="center" onclick="addRow('section_break')" class="field_buttons" id="table_section_break">
547
- <img src="<?php echo WD_FM_URL; ?>/images/section_break.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_section_break">
548
- <div>Section Break</div>
549
- </td>
550
- <td align="center" onclick="addRow('page_break')" class="field_buttons" id="table_page_break">
551
- <img src="<?php echo WD_FM_URL; ?>/images/page_break.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_page_break">
552
- <div>Page Break</div>
553
- </td>
554
- </tr>
555
- <tr>
556
- <td align="center" onclick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')" class="field_buttons field_disabled" id="table_map">
557
- <img src="<?php echo WD_FM_URL; ?>/images/map.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_map">
558
- <div>Map</div>
559
- </td>
560
- <td align="center" onclick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')" id="table_paypal" class="field_buttons field_disabled">
561
- <img src="<?php echo WD_FM_URL; ?>/images/paypal.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_paypal">
562
- <div>Payment</div>
563
- </td>
564
- </tr>
565
- <tr>
566
- <td align="center" onclick="addRow('captcha')" class="field_buttons" id="table_captcha">
567
- <img src="<?php echo WD_FM_URL; ?>/images/captcha.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_captcha">
568
- <div>Captcha</div>
569
- </td>
570
- <td align="center" onclick="addRow('button')" id="table_button" class="field_buttons">
571
- <img src="<?php echo WD_FM_URL; ?>/images/button.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_button">
572
- <div>Button</div>
573
- </td>
574
- </tr>
575
- </tbody>
576
- </table>
577
- </td>
578
- <td width="40%" height="100%" align="left">
579
- <div id="edit_table"></div>
580
- </td>
581
- <td align="center" valign="top" style="background: url("<?php echo WD_FM_URL . '/images/border2.png'; ?>") repeat-y;">&nbsp;</td>
582
- <td style="padding:15px;">
583
- <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" >
584
  <tr>
585
- <td align="right">
586
- <input type="radio" value="end" name="el_pos" checked="checked" id="pos_end" onclick="Disable()"/>
587
- At The End
588
- <input type="radio" value="begin" name="el_pos" id="pos_begin" onclick="Disable()"/>
589
- At The Beginning
590
- <input type="radio" value="before" name="el_pos" id="pos_before" onclick="Enable()"/>
591
- Before
592
- <select style="width: 100px; margin-left: 5px;" id="sel_el_pos" onclick="change_before()" disabled="disabled"></select>
593
- <br>
594
- <button class="fm-button field-save-button small" onclick="add(0, false); return false;">
595
- Save
596
- <span></span>
597
- </button>
598
- <button class="fm-button cancel-button small" onclick="close_window(); return false;">
599
- Cancel
600
- <span></span>
601
- </button>
602
- <hr style="margin-bottom:10px" />
603
  </td>
604
  </tr>
605
- <tr height="100%" valign="top">
606
- <td id="show_table"></td>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
607
  </tr>
608
- </table>
609
- </td>
610
- </tr>
611
- </table>
612
- </td>
613
- </tr>
614
- </table>
615
- <input type="hidden" id="old" />
616
- <input type="hidden" id="old_selected" />
617
- <input type="hidden" id="element_type" />
618
- <input type="hidden" id="editing_id" />
619
- <input type="hidden" value="<?php echo WD_FM_URL; ?>" id="form_plugins_url" />
620
- <div id="main_editor" style="position: fixed; display: none; z-index: 140;">
621
- <?php if (user_can_richedit()) {
622
- wp_editor('', 'form_maker_editor', array('teeny' => FALSE, 'textarea_name' => 'form_maker_editor', 'media_buttons' => FALSE, 'textarea_rows' => 5));
623
- }
624
- else { ?>
625
- <textarea name="form_maker_editor" id="form_maker_editor" cols="40" rows="5" style="width: 440px; height: 350px;" class="mce_editable" aria-hidden="true"></textarea>
626
- <?php
627
- }
628
- ?>
629
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
630
  </div>
631
- <?php if (!function_exists('the_editor')) { ?>
632
- <iframe id="tinymce" style="display: none;"></iframe>
633
- <?php } ?>
634
-
635
- <div class="fm-edit-content">
636
- <div class="fm-drag-and-drop">
637
- <div>
638
- <label for="enable_sortable">Enable Drag & Drop</label>
639
- <button name="sortable" id="enable_sortable" class="fm-checkbox-radio-button <?php echo $row->sortable == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="enable_drag(this); return false;" value="<?php echo $row->sortable; ?>">
640
- <span></span>
641
- </button>
642
- <input type="hidden" name="sortable" id="sortable_hidden" value="<?php echo $row->sortable; ?>"/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
643
  </div>
644
- <div>
645
- You can use drag and drop to move the fields up/down for the change of the order and left/right for creating columns within the form.
 
 
 
 
 
 
 
 
 
 
646
  </div>
647
  </div>
648
- <fieldset>
649
- <legend></legend>
650
- <?php if ($id) { ?>
651
- <div style="margin: 8px; display: table; width: 100%;" id="page_bar">
652
- <div id="page_navigation" style="display: table-row;">
653
- <div align="center" id="pages" show_title="<?php echo $row->show_title; ?>" show_numbers="<?php echo $row->show_numbers; ?>" type="<?php echo $row->pagination; ?>" style="display: table-cell; width:90%;"></div>
654
- <div align="left" id="edit_page_navigation" style="display: table-cell; vertical-align: middle;"></div>
655
- </div>
656
- </div>
657
- <div id="take" class="main">
658
- <?php echo $row->form_front; ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
659
  </div>
660
- <?php } else { ?>
661
- <div style="margin:8px; display:table; width:100%" id="page_bar">
662
- <div id="page_navigation" style="display:table-row">
663
- <div align="center" id="pages" show_title="false" show_numbers="true" type="none" style="display:table-cell; width:90%"></div>
664
- <div align="left" id="edit_page_navigation" style="display:table-cell; vertical-align: middle;"></div>
665
- </div>
 
 
 
666
  </div>
667
- <div id="take" class="main">
668
- <div class="wdform-page-and-images" style="display:table; border-top:0px solid black;">
669
- <div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false">
670
- <div class="wdform_section">
671
- <div class="wdform_column"></div>
672
- </div>
673
- <div valign="top" class="wdform_footer" style="width: 100%;">
674
- <div style="width: 100%;">
675
- <div style="width: 100%; display: table; padding-top:10px;">
676
- <div style="display: table-row-group;">
677
- <div id="form_id_temppage_nav1" style="display: table-row;"></div>
678
- </div>
679
  </div>
680
  </div>
681
  </div>
682
  </div>
683
- <div id="form_id_tempform_view_img1" style="float: right;">
684
- <div>
685
- <img src="<?php echo WD_FM_URL . '/images/minus.png?ver='. get_option("wd_form_maker_version"); ?>" title="Show or hide the page" class="page_toolbar" onClick="show_or_hide('1')" onMouseOver="chnage_icons_src(this,'minus')" onmouseout="chnage_icons_src(this,'minus')" id="show_page_img_1"/>
686
- <img src="<?php echo WD_FM_URL . '/images/page_delete.png?ver='. get_option("wd_form_maker_version"); ?>" title="Delete the page" class="page_toolbar" onClick="remove_page('1')" onMouseOver="chnage_icons_src(this,'page_delete')" onmouseout="chnage_icons_src(this,'page_delete')"/>
687
- <img src="<?php echo WD_FM_URL . '/images/page_delete_all.png?ver='. get_option("wd_form_maker_version"); ?>" title="Delete the page with fields" class="page_toolbar" onClick="remove_page_all('1')" onMouseOver="chnage_icons_src(this,'page_delete_all')" onmouseout="chnage_icons_src(this,'page_delete_all')"/>
688
- <img src="<?php echo WD_FM_URL . '/images/page_edit.png?ver='. get_option("wd_form_maker_version"); ?>" title="Edit the page" class="page_toolbar" onClick="edit_page_break('1')" onMouseOver="chnage_icons_src(this,'page_edit')" onmouseout="chnage_icons_src(this,'page_edit')"/>
689
- </div>
690
  </div>
691
  </div>
692
  </div>
693
- <?php } ?>
694
- </fieldset>
695
- </div>
696
- <input type="hidden" name="form_front" id="form_front" />
697
- <input type="hidden" name="form_fields" id="form_fields" />
698
- <input type="hidden" name="pagination" id="pagination" />
699
- <input type="hidden" name="show_title" id="show_title" />
700
- <input type="hidden" name="show_numbers" id="show_numbers" />
701
- <input type="hidden" name="public_key" id="public_key" />
702
- <input type="hidden" name="private_key" id="private_key" />
703
- <input type="hidden" name="recaptcha_theme" id="recaptcha_theme" />
704
- <input type="hidden" id="label_order" name="label_order" value="<?php echo $row->label_order; ?>" />
705
- <input type="hidden" id="label_order_current" name="label_order_current" value="<?php echo $row->label_order_current; ?>" />
706
- <input type="hidden" name="counter" id="counter" value="<?php echo $row->counter; ?>" />
707
- <input type="hidden" id="araqel" value="0" />
708
- <input type="hidden" name="backup_id" id="backup_id" value="<?php echo $row->backup_id;?>">
709
-
710
- <?php if ($id) { ?>
711
- <script type="text/javascript">
712
- function set_preview() {
713
- jQuery("#preview_form").attr("onclick", "tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerPreview', 'form_id' => $row->id), admin_url('admin-ajax.php')); ?>&test_theme=" + jQuery('#theme').val() + "&width=1000&height=500&TB_iframe=1'); return false;");
714
- jQuery("#edit_css").attr("onclick", "tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerEditCSS', 'form_id' => $row->id), admin_url('admin-ajax.php')); ?>&id=" + jQuery('#theme').val() + "&width=800&height=500&TB_iframe=1'); return false;");
715
- }
716
- function formOnload() {
717
- for (t = 0; t < <?php echo $row->counter; ?>; t++) {
718
- if (document.getElementById(t + "_typeform_id_temp")) {
719
- if (document.getElementById(t + "_typeform_id_temp").value == "type_map" || document.getElementById(t + "_typeform_id_temp").value == "type_mark_map") {
720
- if_gmap_init(t);
721
- for (q = 0; q < 20; q++) {
722
- if (document.getElementById(t + "_elementform_id_temp").getAttribute("long" + q)) {
723
- w_long = parseFloat(document.getElementById(t + "_elementform_id_temp").getAttribute("long" + q));
724
- w_lat = parseFloat(document.getElementById(t + "_elementform_id_temp").getAttribute("lat" + q));
725
- w_info = parseFloat(document.getElementById(t + "_elementform_id_temp").getAttribute("info" + q));
726
- add_marker_on_map(t, q, w_long, w_lat, w_info, false);
727
- }
728
- }
729
- }
730
-
731
- else if (document.getElementById(t + "_typeform_id_temp").value == "type_date_range") {
732
- var default_date_start = jQuery("#"+t+"_default_date_id_temp_start").val();
733
- var default_date_end = jQuery("#"+t+"_default_date_id_temp_end").val();
734
- var date_format = jQuery("#"+t+"_buttonform_id_temp").attr('format');
735
-
736
-
737
-
738
- jQuery("#"+t+"_elementform_id_temp0").datepicker();
739
- jQuery("#"+t+"_elementform_id_temp1").datepicker();
740
- jQuery("#"+t+"_elementform_id_temp0").datepicker("option", "dateFormat", date_format);
741
- jQuery("#"+t+"_elementform_id_temp1").datepicker("option", "dateFormat", date_format);
742
-
743
-
744
- if(default_date_start =="today")
745
- jQuery("#"+t+"_elementform_id_temp0").datepicker("setDate", new Date());
746
- else if(default_date_start.indexOf("d") == -1 && default_date_start.indexOf("m") == -1 && default_date_start.indexOf("y") == -1 && default_date_start.indexOf("w") == -1){
747
- if(default_date_start !== "")
748
- default_date_start = jQuery.datepicker.formatDate(date_format, new Date(default_date_start));
749
- jQuery("#"+t+"_elementform_id_temp0").datepicker("setDate", default_date_start);
750
- }
751
- else
752
- jQuery("#"+t+"_elementform_id_temp0").datepicker("setDate", default_date_start);
753
-
754
-
755
- if(default_date_end =="today")
756
- jQuery("#"+t+"_elementform_id_temp1").datepicker("setDate", new Date());
757
- else if(default_date_end.indexOf("d") == -1 && default_date_end.indexOf("m") == -1 && default_date_end.indexOf("y") == -1 && default_date_end.indexOf("w") == -1){
758
- if(default_date_end !== "")
759
- default_date_end = jQuery.datepicker.formatDate(date_format, new Date(default_date_end));
760
- jQuery("#"+t+"_elementform_id_temp1").datepicker("setDate", default_date_end);
761
- }
762
- else
763
- jQuery("#"+t+"_elementform_id_temp1").datepicker("setDate", default_date_end);
764
- }
765
-
766
- else if (document.getElementById(t + "_typeform_id_temp").value == "type_date_new") {
767
- var default_date = jQuery("#"+t+"_default_date_id_temp").val();
768
- var date_format = jQuery("#"+t+"_buttonform_id_temp").attr('format');
769
- jQuery("#"+t+"_elementform_id_temp").datepicker();
770
- jQuery("#"+t+"_elementform_id_temp").datepicker("option", "dateFormat", date_format);
771
-
772
-
773
- if(default_date =="today")
774
- jQuery("#"+t+"_elementform_id_temp").datepicker("setDate", new Date());
775
- else if(default_date.indexOf("d") == -1 && default_date.indexOf("m") == -1 && default_date.indexOf("y") == -1 && default_date.indexOf("w") == -1){
776
- if(default_date !== "")
777
- default_date = jQuery.datepicker.formatDate(date_format, new Date(default_date));
778
- jQuery("#"+t+"_elementform_id_temp").datepicker("setDate", default_date);
779
  }
780
- else
781
- jQuery("#"+t+"_elementform_id_temp").datepicker("setDate", default_date);
782
-
783
-
784
-
785
- }
786
- else if (document.getElementById(t + "_typeform_id_temp").value == "type_phone_new") {
787
-
788
-
789
- jQuery("#"+t+"_elementform_id_temp").intlTelInput({
790
- nationalMode: false,
791
- preferredCountries: [ jQuery("#"+t+"_elementform_id_temp").attr("top-country") ],
792
- });
793
- jQuery("#"+t+"_elementform_id_temp").intlTelInput("setNumber", jQuery("#"+t+"_elementform_id_temp").val());
794
-
795
- }
796
- else if (document.getElementById(t + "_typeform_id_temp").value == "type_name") {
797
- var myu = t;
798
- jQuery(document).ready(function () {
799
- jQuery("#" + myu + "_mini_label_first").click(function () {
800
- if (jQuery(this).children('input').length == 0) {
801
- var first = "<input type='text' id='first' class='first' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
802
- jQuery(this).html(first);
803
- jQuery("input.first").focus();
804
- jQuery("input.first").blur(function () {
805
- var id_for_blur = document.getElementById('first').parentNode.id.split('_');
806
- var value = jQuery(this).val();
807
- jQuery("#" + id_for_blur[0] + "_mini_label_first").text(value);
808
- });
809
- }
810
- });
811
- jQuery("label#" + myu + "_mini_label_last").click(function () {
812
- if (jQuery(this).children('input').length == 0) {
813
- var last = "<input type='text' id='last' class='last' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
814
- jQuery(this).html(last);
815
- jQuery("input.last").focus();
816
- jQuery("input.last").blur(function () {
817
- var id_for_blur = document.getElementById('last').parentNode.id.split('_');
818
- var value = jQuery(this).val();
819
- jQuery("#" + id_for_blur[0] + "_mini_label_last").text(value);
820
- });
821
- }
822
- });
823
- jQuery("label#" + myu + "_mini_label_title").click(function () {
824
- if (jQuery(this).children('input').length == 0) {
825
- var title_ = "<input type='text' id='title_' class='title_' style='outline:none; border:none; background:none; width:50px;' value=\"" + jQuery(this).text() + "\">";
826
- jQuery(this).html(title_);
827
- jQuery("input.title_").focus();
828
- jQuery("input.title_").blur(function () {
829
- var id_for_blur = document.getElementById('title_').parentNode.id.split('_');
830
- var value = jQuery(this).val();
831
- jQuery("#" + id_for_blur[0] + "_mini_label_title").text(value);
832
- });
833
- }
834
- });
835
- jQuery("label#" + myu + "_mini_label_middle").click(function () {
836
- if (jQuery(this).children('input').length == 0) {
837
- var middle = "<input type='text' id='middle' class='middle' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
838
- jQuery(this).html(middle);
839
- jQuery("input.middle").focus();
840
- jQuery("input.middle").blur(function () {
841
- var id_for_blur = document.getElementById('middle').parentNode.id.split('_');
842
- var value = jQuery(this).val();
843
- jQuery("#" + id_for_blur[0] + "_mini_label_middle").text(value);
844
- });
845
- }
846
- });
847
- });
848
  }
849
- else if (document.getElementById(t + "_typeform_id_temp").value == "type_phone") {
850
- var myu = t;
851
- jQuery(document).ready(function () {
852
- jQuery("label#" + myu + "_mini_label_area_code").click(function () {
853
- if (jQuery(this).children('input').length == 0) {
854
- var area_code = "<input type='text' id='area_code' class='area_code' size='10' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
855
- jQuery(this).html(area_code);
856
- jQuery("input.area_code").focus();
857
- jQuery("input.area_code").blur(function () {
858
- var id_for_blur = document.getElementById('area_code').parentNode.id.split('_');
859
- var value = jQuery(this).val();
860
- jQuery("#" + id_for_blur[0] + "_mini_label_area_code").text(value);
861
- });
862
- }
863
- });
864
- jQuery("label#" + myu + "_mini_label_phone_number").click(function () {
865
- if (jQuery(this).children('input').length == 0) {
866
- var phone_number = "<input type='text' id='phone_number' class='phone_number' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
867
- jQuery(this).html(phone_number);
868
- jQuery("input.phone_number").focus();
869
- jQuery("input.phone_number").blur(function () {
870
- var id_for_blur = document.getElementById('phone_number').parentNode.id.split('_');
871
- var value = jQuery(this).val();
872
- jQuery("#" + id_for_blur[0] + "_mini_label_phone_number").text(value);
873
- });
874
- }
875
- });
876
  });
877
- }
878
- else if (document.getElementById(t + "_typeform_id_temp").value == "type_date_fields") {
879
- var myu = t;
880
- jQuery(document).ready(function () {
881
- jQuery("label#" + myu + "_day_label").click(function () {
882
- if (jQuery(this).children('input').length == 0) {
883
- var day = "<input type='text' id='day' class='day' size='8' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
884
- jQuery(this).html(day);
885
- jQuery("input.day").focus();
886
- jQuery("input.day").blur(function () {
887
- var id_for_blur = document.getElementById('day').parentNode.id.split('_');
888
- var value = jQuery(this).val();
889
- jQuery("#" + id_for_blur[0] + "_day_label").text(value);
890
- });
891
- }
892
- });
893
- jQuery("label#" + myu + "_month_label").click(function () {
894
- if (jQuery(this).children('input').length == 0) {
895
- var month = "<input type='text' id='month' class='month' size='8' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
896
- jQuery(this).html(month);
897
- jQuery("input.month").focus();
898
- jQuery("input.month").blur(function () {
899
- var id_for_blur = document.getElementById('month').parentNode.id.split('_');
900
- var value = jQuery(this).val();
901
- jQuery("#" + id_for_blur[0] + "_month_label").text(value);
902
- });
903
- }
904
- });
905
- jQuery("label#" + myu + "_year_label").click(function () {
906
- if (jQuery(this).children('input').length == 0) {
907
- var year = "<input type='text' id='year' class='year' size='8' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
908
- jQuery(this).html(year);
909
- jQuery("input.year").focus();
910
- jQuery("input.year").blur(function () {
911
- var id_for_blur = document.getElementById('year').parentNode.id.split('_');
912
- var value = jQuery(this).val();
913
- jQuery("#" + id_for_blur[0] + "_year_label").text(value);
914
- });
915
- }
916
- });
917
  });
918
- }
919
- else if (document.getElementById(t + "_typeform_id_temp").value == "type_time") {
920
- var myu = t;
921
- jQuery(document).ready(function () {
922
- jQuery("label#" + myu + "_mini_label_hh").click(function () {
923
- if (jQuery(this).children('input').length == 0) {
924
- var hh = "<input type='text' id='hh' class='hh' size='4' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
925
- jQuery(this).html(hh);
926
- jQuery("input.hh").focus();
927
- jQuery("input.hh").blur(function () {
928
- var id_for_blur = document.getElementById('hh').parentNode.id.split('_');
929
- var value = jQuery(this).val();
930
- jQuery("#" + id_for_blur[0] + "_mini_label_hh").text(value);
931
- });
932
- }
933
- });
934
- jQuery("label#" + myu + "_mini_label_mm").click(function () {
935
- if (jQuery(this).children('input').length == 0) {
936
- var mm = "<input type='text' id='mm' class='mm' size='4' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
937
- jQuery(this).html(mm);
938
- jQuery("input.mm").focus();
939
- jQuery("input.mm").blur(function () {
940
- var id_for_blur = document.getElementById('mm').parentNode.id.split('_');
941
- var value = jQuery(this).val();
942
- jQuery("#" + id_for_blur[0] + "_mini_label_mm").text(value);
943
- });
944
- }
945
- });
946
- jQuery("label#" + myu + "_mini_label_ss").click(function () {
947
- if (jQuery(this).children('input').length == 0) {
948
- var ss = "<input type='text' id='ss' class='ss' size='4' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
949
- jQuery(this).html(ss);
950
- jQuery("input.ss").focus();
951
- jQuery("input.ss").blur(function () {
952
- var id_for_blur = document.getElementById('ss').parentNode.id.split('_');
953
- var value = jQuery(this).val();
954
- jQuery("#" + id_for_blur[0] + "_mini_label_ss").text(value);
955
- });
956
- }
957
- });
958
- jQuery("label#" + myu + "_mini_label_am_pm").click(function () {
959
- if (jQuery(this).children('input').length == 0) {
960
- var am_pm = "<input type='text' id='am_pm' class='am_pm' size='4' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
961
- jQuery(this).html(am_pm);
962
- jQuery("input.am_pm").focus();
963
- jQuery("input.am_pm").blur(function () {
964
- var id_for_blur = document.getElementById('am_pm').parentNode.id.split('_');
965
- var value = jQuery(this).val();
966
- jQuery("#" + id_for_blur[0] + "_mini_label_am_pm").text(value);
967
- });
968
- }
969
- });
970
  });
971
- }
972
- else if (document.getElementById(t + "_typeform_id_temp").value == "type_paypal_price") {
973
- var myu = t;
974
- jQuery(document).ready(function () {
975
- jQuery("#" + myu + "_mini_label_dollars").click(function () {
976
- if (jQuery(this).children('input').length == 0) {
977
- var dollars = "<input type='text' id='dollars' class='dollars' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
978
- jQuery(this).html(dollars);
979
- jQuery("input.dollars").focus();
980
- jQuery("input.dollars").blur(function () {
981
- var id_for_blur = document.getElementById('dollars').parentNode.id.split('_');
982
- var value = jQuery(this).val();
983
- jQuery("#" + id_for_blur[0] + "_mini_label_dollars").text(value);
984
- });
985
- }
986
- });
987
- jQuery("label#" + myu + "_mini_label_cents").click(function () {
988
- if (jQuery(this).children('input').length == 0) {
989
- var cents = "<input type='text' id='cents' class='cents' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
990
- jQuery(this).html(cents);
991
- jQuery("input.cents").focus();
992
- jQuery("input.cents").blur(function () {
993
- var id_for_blur = document.getElementById('cents').parentNode.id.split('_');
994
- var value = jQuery(this).val();
995
- jQuery("#" + id_for_blur[0] + "_mini_label_cents").text(value);
996
- });
997
- }
998
- });
999
  });
1000
- }
1001
- else if (document.getElementById(t + "_typeform_id_temp").value == "type_address") {
1002
- var myu = t;
1003
- jQuery(document).ready(function () {
1004
- jQuery("label#" + myu + "_mini_label_street1").click(function () {
1005
- if (jQuery(this).children('input').length == 0) {
1006
- var street1 = "<input type='text' id='street1' class='street1' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
1007
- jQuery(this).html(street1);
1008
- jQuery("input.street1").focus();
1009
- jQuery("input.street1").blur(function () {
1010
- var id_for_blur = document.getElementById('street1').parentNode.id.split('_');
1011
- var value = jQuery(this).val();
1012
- jQuery("#" + id_for_blur[0] + "_mini_label_street1").text(value);
1013
- });
1014
- }
1015
- });
1016
- jQuery("label#" + myu + "_mini_label_street2").click(function () {
1017
- if (jQuery(this).children('input').length == 0) {
1018
- var street2 = "<input type='text' id='street2' class='street2' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
1019
- jQuery(this).html(street2);
1020
- jQuery("input.street2").focus();
1021
- jQuery("input.street2").blur(function () {
1022
- var id_for_blur = document.getElementById('street2').parentNode.id.split('_');
1023
- var value = jQuery(this).val();
1024
- jQuery("#" + id_for_blur[0] + "_mini_label_street2").text(value);
1025
- });
1026
- }
1027
- });
1028
- jQuery("label#" + myu + "_mini_label_city").click(function () {
1029
- if (jQuery(this).children('input').length == 0) {
1030
- var city = "<input type='text' id='city' class='city' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
1031
- jQuery(this).html(city);
1032
- jQuery("input.city").focus();
1033
- jQuery("input.city").blur(function () {
1034
- var id_for_blur = document.getElementById('city').parentNode.id.split('_');
1035
- var value = jQuery(this).val();
1036
- jQuery("#" + id_for_blur[0] + "_mini_label_city").text(value);
1037
- });
1038
- }
1039
- });
1040
- jQuery("label#" + myu + "_mini_label_state").click(function () {
1041
- if (jQuery(this).children('input').length == 0) {
1042
- var state = "<input type='text' id='state' class='state' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
1043
- jQuery(this).html(state);
1044
- jQuery("input.state").focus();
1045
- jQuery("input.state").blur(function () {
1046
- var id_for_blur = document.getElementById('state').parentNode.id.split('_');
1047
- var value = jQuery(this).val();
1048
- jQuery("#" + id_for_blur[0] + "_mini_label_state").text(value);
1049
- });
1050
- }
1051
- });
1052
- jQuery("label#" + myu + "_mini_label_postal").click(function () {
1053
- if (jQuery(this).children('input').length == 0) {
1054
- var postal = "<input type='text' id='postal' class='postal' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
1055
- jQuery(this).html(postal);
1056
- jQuery("input.postal").focus();
1057
- jQuery("input.postal").blur(function () {
1058
- var id_for_blur = document.getElementById('postal').parentNode.id.split('_');
1059
- var value = jQuery(this).val();
1060
- jQuery("#" + id_for_blur[0] + "_mini_label_postal").text(value);
1061
- });
1062
- }
1063
- });
1064
- jQuery("label#" + myu + "_mini_label_country").click(function () {
1065
- if (jQuery(this).children('input').length == 0) {
1066
- var country = "<input type='country' id='country' class='country' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
1067
- jQuery(this).html(country);
1068
- jQuery("input.country").focus();
1069
- jQuery("input.country").blur(function () {
1070
- var id_for_blur = document.getElementById('country').parentNode.id.split('_');
1071
- var value = jQuery(this).val();
1072
- jQuery("#" + id_for_blur[0] + "_mini_label_country").text(value);
1073
- });
1074
- }
1075
- });
1076
  });
1077
- }
1078
- else if (document.getElementById(t + "_typeform_id_temp").value == "type_scale_rating") {
1079
- var myu = t;
1080
- jQuery(document).ready(function () {
1081
- jQuery("#" + myu + "_mini_label_worst").click(function () {
1082
- if (jQuery(this).children('input').length == 0) {
1083
- var worst = "<input type='text' id='worst' class='worst' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\"" + jQuery(this).text() + "\">";
1084
- jQuery(this).html(worst);
1085
- jQuery("input.worst").focus();
1086
- jQuery("input.worst").blur(function () {
1087
- var id_for_blur = document.getElementById('worst').parentNode.id.split('_');
1088
- var value = jQuery(this).val();
1089
- jQuery("#" + id_for_blur[0] + "_mini_label_worst").text(value);
1090
- });
1091
- }
1092
- });
1093
- jQuery("label#" + myu + "_mini_label_best").click(function () {
1094
- if (jQuery(this).children('input').length == 0) {
1095
- var best = "<input type='text' id='best' class='best' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\"" + jQuery(this).text() + "\">";
1096
- jQuery(this).html(best);
1097
- jQuery("input.best").focus();
1098
- jQuery("input.best").blur(function () {
1099
- var id_for_blur = document.getElementById('best').parentNode.id.split('_');
1100
- var value = jQuery(this).val();
1101
- jQuery("#" + id_for_blur[0] + "_mini_label_best").text(value);
1102
- });
1103
- }
1104
- });
1105
  });
1106
- }
1107
- else if (document.getElementById(t + "_typeform_id_temp").value == "type_spinner") {
1108
- var spinner_value = document.getElementById(t + "_elementform_id_temp").value;
1109
- var spinner_min_value = document.getElementById(t + "_min_valueform_id_temp").value;
1110
- var spinner_max_value = document.getElementById(t + "_max_valueform_id_temp").value;
1111
- var spinner_step = document.getElementById(t + "_stepform_id_temp").value;
1112
- jQuery("#" + t + "_elementform_id_temp")[0].spin = null;
1113
- spinner = jQuery("#" + t + "_elementform_id_temp").spinner();
1114
- spinner.spinner("value", spinner_value);
1115
- jQuery("#" + t + "_elementform_id_temp").spinner({ min:spinner_min_value});
1116
- jQuery("#" + t + "_elementform_id_temp").spinner({ max:spinner_max_value});
1117
- jQuery("#" + t + "_elementform_id_temp").spinner({ step:spinner_step});
1118
- }
1119
- else if (document.getElementById(t + "_typeform_id_temp").value == "type_slider") {
1120
- var slider_value = document.getElementById(t + "_slider_valueform_id_temp").value;
1121
- var slider_min_value = document.getElementById(t + "_slider_min_valueform_id_temp").value;
1122
- var slider_max_value = document.getElementById(t + "_slider_max_valueform_id_temp").value;
1123
- var slider_element_value = document.getElementById(t + "_element_valueform_id_temp");
1124
- var slider_value_save = document.getElementById(t + "_slider_valueform_id_temp");
1125
- jQuery("#" + t + "_elementform_id_temp")[0].slide = null;
1126
- jQuery(function () {
1127
- jQuery("#" + t + "_elementform_id_temp").slider({
1128
- range:"min",
1129
- value:eval(slider_value),
1130
- min:eval(slider_min_value),
1131
- max:eval(slider_max_value),
1132
- slide:function (event, ui) {
1133
- slider_element_value.innerHTML = "" + ui.value;
1134
- slider_value_save.value = "" + ui.value;
1135
- }
1136
- });
1137
  });
1138
- }
1139
- else if (document.getElementById(t + "_typeform_id_temp").value == "type_range") {
1140
- var spinner_value0 = document.getElementById(t + "_elementform_id_temp0").value;
1141
- var spinner_step = document.getElementById(t + "_range_stepform_id_temp").value;
1142
- jQuery("#" + t + "_elementform_id_temp0")[0].spin = null;
1143
- jQuery("#" + t + "_elementform_id_temp1")[0].spin = null;
1144
- spinner0 = jQuery("#" + t + "_elementform_id_temp0").spinner();
1145
- spinner0.spinner("value", spinner_value0);
1146
- jQuery("#" + t + "_elementform_id_temp0").spinner({ step:spinner_step});
1147
- var spinner_value1 = document.getElementById(t + "_elementform_id_temp1").value;
1148
- spinner1 = jQuery("#" + t + "_elementform_id_temp1").spinner();
1149
- spinner1.spinner("value", spinner_value1);
1150
- jQuery("#" + t + "_elementform_id_temp1").spinner({ step:spinner_step});
1151
- var myu = t;
1152
- jQuery(document).ready(function () {
1153
- jQuery("#" + myu + "_mini_label_from").click(function () {
1154
- if (jQuery(this).children('input').length == 0) {
1155
- var from = "<input type='text' id='from' class='from' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\"" + jQuery(this).text() + "\">";
1156
- jQuery(this).html(from);
1157
- jQuery("input.from").focus();
1158
- jQuery("input.from").blur(function () {
1159
- var id_for_blur = document.getElementById('from').parentNode.id.split('_');
1160
- var value = jQuery(this).val();
1161
- jQuery("#" + id_for_blur[0] + "_mini_label_from").text(value);
1162
- });
1163
- }
1164
  });
1165
- jQuery("label#" + myu + "_mini_label_to").click(function () {
1166
  if (jQuery(this).children('input').length == 0) {
1167
- var to = "<input type='text' id='to' class='to' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\"" + jQuery(this).text() + "\">";
1168
- jQuery(this).html(to);
1169
- jQuery("input.to").focus();
1170
- jQuery("input.to").blur(function () {
1171
- var id_for_blur = document.getElementById('to').parentNode.id.split('_');
1172
  var value = jQuery(this).val();
1173
- jQuery("#" + id_for_blur[0] + "_mini_label_to").text(value);
1174
  });
1175
  }
1176
  });
1177
  });
1178
  }
1179
- }
1180
- }
1181
-
1182
- remove_whitespace(document.getElementById('take'));
1183
- form_view = 1;
1184
- form_view_count = 0;
1185
-
1186
- for (i = 1; i <= 30; i++) {
1187
- if (document.getElementById('form_id_tempform_view' + i)) {
1188
- form_view_count++;
1189
- form_view_max = i;
1190
- tbody_img = document.createElement('div');
1191
- tbody_img.setAttribute('id', 'form_id_tempform_view_img' + i);
1192
- tbody_img.style.cssText = "float:right";
1193
- tr_img = document.createElement('div');
1194
- var img = document.createElement('img');
1195
- img.setAttribute('src', '<?php echo WD_FM_URL; ?>/images/minus.png?ver=<?php echo get_option("wd_form_maker_version"); ?>');
1196
- img.setAttribute('title', 'Show or hide the page');
1197
- img.setAttribute("class", "page_toolbar");
1198
- img.setAttribute('id', 'show_page_img_' + i);
1199
- img.setAttribute('onClick', 'show_or_hide("' + i + '")');
1200
- img.setAttribute("onmouseover", 'chnage_icons_src(this,"minus")');
1201
- img.setAttribute("onmouseout", 'chnage_icons_src(this,"minus")');
1202
- var img_X = document.createElement("img");
1203
- img_X.setAttribute("src", "<?php echo WD_FM_URL; ?>/images/page_delete.png?ver=<?php echo get_option("wd_form_maker_version"); ?>");
1204
- img_X.setAttribute('title', 'Delete the page');
1205
- img_X.setAttribute("class", "page_toolbar");
1206
- img_X.setAttribute("onclick", 'remove_page("' + i + '")');
1207
- img_X.setAttribute("onmouseover", 'chnage_icons_src(this,"page_delete")');
1208
- img_X.setAttribute("onmouseout", 'chnage_icons_src(this,"page_delete")');
1209
- var img_X_all = document.createElement("img");
1210
- img_X_all.setAttribute("src", "<?php echo WD_FM_URL; ?>/images/page_delete_all.png?ver=<?php echo get_option("wd_form_maker_version"); ?>");
1211
- img_X_all.setAttribute('title', 'Delete the page with fields');
1212
- img_X_all.setAttribute("class", "page_toolbar");
1213
- img_X_all.setAttribute("onclick", 'remove_page_all("' + i + '")');
1214
- img_X_all.setAttribute("onmouseover", 'chnage_icons_src(this,"page_delete_all")');
1215
- img_X_all.setAttribute("onmouseout", 'chnage_icons_src(this,"page_delete_all")');
1216
- var img_EDIT = document.createElement("img");
1217
- img_EDIT.setAttribute("src", "<?php echo WD_FM_URL; ?>/images/page_edit.png?ver=<?php echo get_option("wd_form_maker_version"); ?>");
1218
- img_EDIT.setAttribute('title', 'Edit the page');
1219
- img_EDIT.setAttribute("class", "page_toolbar");
1220
- img_EDIT.setAttribute("onclick", 'edit_page_break("' + i + '")');
1221
- img_EDIT.setAttribute("onmouseover", 'chnage_icons_src(this,"page_edit")');
1222
- img_EDIT.setAttribute("onmouseout", 'chnage_icons_src(this,"page_edit")');
1223
- tr_img.appendChild(img);
1224
- tr_img.appendChild(img_X);
1225
- tr_img.appendChild(img_X_all);
1226
- tr_img.appendChild(img_EDIT);
1227
- tbody_img.appendChild(tr_img);
1228
- document.getElementById('form_id_tempform_view' + i).parentNode.appendChild(tbody_img);
1229
- }
1230
- }
1231
-
1232
- if (form_view_count > 1) {
1233
- for (i = 1; i <= form_view_max; i++) {
1234
- if (document.getElementById('form_id_tempform_view' + i)) {
1235
- first_form_view = i;
1236
- break;
1237
- }
1238
- }
1239
- form_view = form_view_max;
1240
- need_enable = false;
1241
- generate_page_nav(first_form_view);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1242
  var img_EDIT = document.createElement("img");
1243
- img_EDIT.setAttribute("src", "<?php echo WD_FM_URL . '/images/edit.png?ver='.get_option("wd_form_maker_version"); ?>");
1244
- img_EDIT.style.cssText = "margin-left:40px; cursor:pointer";
1245
- img_EDIT.setAttribute("onclick", 'el_page_navigation()');
1246
- var td_EDIT = document.getElementById("edit_page_navigation");
1247
- td_EDIT.appendChild(img_EDIT);
1248
- document.getElementById('page_navigation').appendChild(td_EDIT);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1249
  }
1250
- document.getElementById('araqel').value = 1;
 
 
 
 
 
 
 
 
 
1251
  }
1252
- jQuery(window).load(function () {
1253
- formOnload();
 
 
 
 
 
 
1254
  });
 
 
 
 
 
 
 
 
 
 
 
 
1255
  jQuery(function() {
1256
  jQuery('.wdform_section .wdform_column:last-child').each(function() {
1257
  jQuery(this).parent().append(jQuery('<div></div>').addClass("wdform_column"));
1258
  });
1259
-
1260
  sortable_columns();
1261
- if(<?php echo $row->sortable ?>==1) {
1262
- jQuery( ".wdform_arrows" ).hide();
1263
- all_sortable_events();
1264
- }
1265
- else
1266
- jQuery('.wdform_column').sortable( "disable" );
1267
-
1268
  });
1269
- </script>
1270
- <?php
1271
- } else { ?>
1272
- <script type="text/javascript">
1273
- jQuery(function() {
1274
- jQuery('.wdform_section .wdform_column:last-child').each(function() {
1275
- jQuery(this).parent().append(jQuery('<div></div>').addClass("wdform_column"));
1276
- });
1277
- sortable_columns();
1278
- all_sortable_events();
1279
- });
1280
- </script>
1281
- <?php } ?>
1282
  <input type="hidden" name="option" value="com_formmaker" />
1283
  <input type="hidden" name="id" value="<?php echo $row->id; ?>" />
1284
  <input type="hidden" name="cid[]" value="<?php echo $row->id; ?>" />
@@ -1288,1469 +1440,8 @@ class FMViewManage_fm {
1288
  <?php
1289
  }
1290
 
1291
- public function edit_old($id) {
1292
- // header("X-XSS-Protection: 0");
1293
- $row = $this->model->get_row_data($id);
1294
- $themes = $this->model->get_theme_rows_data('old');
1295
- $labels = array();
1296
- $label_id = array();
1297
- $label_order_original = array();
1298
- $label_type = array();
1299
- $label_all = explode('#****#', $row->label_order);
1300
- $label_all = array_slice($label_all, 0, count($label_all) - 1);
1301
- foreach ($label_all as $key => $label_each) {
1302
- $label_id_each = explode('#**id**#', $label_each);
1303
- array_push($label_id, $label_id_each[0]);
1304
- $label_oder_each = explode('#**label**#', $label_id_each[1]);
1305
- array_push($label_order_original, addslashes($label_oder_each[0]));
1306
- array_push($label_type, $label_oder_each[1]);
1307
- }
1308
- $labels['id'] = '"' . implode('","', $label_id) . '"';
1309
- $labels['label'] = '"' . implode('","', $label_order_original) . '"';
1310
- $labels['type'] = '"' . implode('","', $label_type) . '"';
1311
-
1312
- $page_title = (($id != 0) ? 'Edit form ' . $row->title : 'Create new form');
1313
- ?>
1314
- <script type="text/javascript">
1315
- var plugin_url = "<?php echo WD_FM_URL; ?>";
1316
- </script>
1317
- <script src="<?php echo WD_FM_URL . '/js/formmaker_free.js'; ?>?ver=<?php echo get_option("wd_form_maker_version"); ?>" type="text/javascript"></script>
1318
- <script type="text/javascript">
1319
- function submitbutton() {
1320
- if (!document.getElementById('araqel') || (document.getElementById('araqel').value == '0')) {
1321
- alert('Please wait while page loading.');
1322
- return false;
1323
- }
1324
- tox = '';
1325
- l_id_array = [<?php echo $labels['id']?>];
1326
- l_label_array = [<?php echo $labels['label']?>];
1327
- l_type_array = [<?php echo $labels['type']?>];
1328
- l_id_removed = [];
1329
- for (x=0; x< l_id_array.length; x++) {
1330
- l_id_removed[l_id_array[x]]=true;
1331
- }
1332
- for (t=1;t<=form_view_max;t++) {
1333
- if (document.getElementById('form_id_tempform_view'+t)) {
1334
- form_view_element=document.getElementById('form_id_tempform_view'+t);
1335
- n=form_view_element.childNodes.length-2;
1336
- for(q=0;q<=n;q++) {
1337
- if (form_view_element.childNodes[q].nodeType!=3) {
1338
- if (!form_view_element.childNodes[q].id) {
1339
- GLOBAL_tr=form_view_element.childNodes[q];
1340
- for (x=0; x < GLOBAL_tr.firstChild.childNodes.length; x++) {
1341
- table=GLOBAL_tr.firstChild.childNodes[x];
1342
- tbody=table.firstChild;
1343
- for (y=0; y < tbody.childNodes.length; y++) {
1344
- is_in_old=false;
1345
- tr=tbody.childNodes[y];
1346
- l_id=tr.id;
1347
- l_label=document.getElementById( tr.id+'_element_labelform_id_temp').innerHTML;
1348
- l_label = l_label.replace(/(\r\n|\n|\r)/gm," ");
1349
- l_type=tr.getAttribute('type');
1350
- for (z = 0; z < l_id_array.length; z++) {
1351
- if (l_id_array[z] == l_id) {
1352
- if (l_type_array[z] == "type_address") {
1353
- if (document.getElementById(l_id + "_mini_label_street1")) {
1354
- l_id_removed[l_id_array[z]] = false;
1355
- }
1356
- if (document.getElementById(l_id+"_mini_label_street2")) {
1357
- l_id_removed[parseInt(l_id_array[z]) + 1] = false;
1358
- }
1359
- if (document.getElementById(l_id+"_mini_label_city")) {
1360
- l_id_removed[parseInt(l_id_array[z]) + 2] = false;
1361
- }
1362
- if (document.getElementById(l_id+"_mini_label_state")) {
1363
- l_id_removed[parseInt(l_id_array[z]) + 3] = false;
1364
- }
1365
- if (document.getElementById(l_id+"_mini_label_postal")) {
1366
- l_id_removed[parseInt(l_id_array[z]) + 4] = false;
1367
- }
1368
- if (document.getElementById(l_id+"_mini_label_country")) {
1369
- l_id_removed[parseInt(l_id_array[z]) + 5] = false;
1370
- }
1371
- z = z + 5;
1372
- }
1373
- else {
1374
- l_id_removed[l_id] = false;
1375
- }
1376
- }
1377
- }
1378
- if (tr.getAttribute('type')=="type_address") {
1379
- addr_id=parseInt(tr.id);
1380
- id_for_country= addr_id;
1381
- if(document.getElementById(id_for_country+"_mini_label_street1"))
1382
- tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_street1").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#';addr_id++;
1383
- if(document.getElementById(id_for_country+"_mini_label_street2"))
1384
- tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_street2").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#';addr_id++;
1385
- if(document.getElementById(id_for_country+"_mini_label_city"))
1386
- tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_city").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#'; addr_id++;
1387
- if(document.getElementById(id_for_country+"_mini_label_state"))
1388
- tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_state").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#'; addr_id++;
1389
- if(document.getElementById(id_for_country+"_mini_label_postal"))
1390
- tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_postal").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#'; addr_id++;
1391
- if(document.getElementById(id_for_country+"_mini_label_country"))
1392
- tox=tox+addr_id+'#**id**#'+document.getElementById(id_for_country+"_mini_label_country").innerHTML+'#**label**#'+tr.getAttribute('type')+'#****#';
1393
- }
1394
- else {
1395
- tox = tox+l_id+'#**id**#'+l_label+'#**label**#'+l_type+'#****#';
1396
- }
1397
- }
1398
- }
1399
- }
1400
- }
1401
- }
1402
- }
1403
- }
1404
- document.getElementById('label_order_current').value = tox;
1405
- for (x = 0; x < l_id_array.length; x++) {
1406
- if (l_id_removed[l_id_array[x]]) {
1407
- tox = tox + l_id_array[x] + '#**id**#' + l_label_array[x] + '#**label**#' + l_type_array[x] + '#****#';
1408
- }
1409
- }
1410
- document.getElementById('label_order').value = tox;
1411
- refresh_old();
1412
- document.getElementById('pagination').value=document.getElementById('pages').getAttribute("type");
1413
- document.getElementById('show_title').value=document.getElementById('pages').getAttribute("show_title");
1414
- document.getElementById('show_numbers').value=document.getElementById('pages').getAttribute("show_numbers");
1415
- return true;
1416
- }
1417
-
1418
- gen = <?php echo (($id != 0) ? $row->counter : 1); ?>;
1419
-
1420
- function enable() {
1421
- alltypes = Array('customHTML', 'text', 'checkbox', 'radio', 'time_and_date', 'select', 'file_upload', 'captcha', 'map', 'button', 'page_break', 'section_break', 'paypal', 'survey');
1422
- for (x = 0; x < 14; x++) {
1423
- document.getElementById('img_' + alltypes[x]).src = "<?php echo WD_FM_URL . '/images/'; ?>" + alltypes[x] + ".png?ver=<?php echo get_option("wd_form_maker_version"); ?>";
1424
- }
1425
- if (document.getElementById('formMakerDiv').style.display == 'block') {
1426
- jQuery('#formMakerDiv').slideToggle(200);
1427
- }
1428
- else {
1429
- jQuery('#formMakerDiv').slideToggle(400);
1430
- }
1431
-
1432
- if (document.getElementById('formMakerDiv1').style.display == 'block') {
1433
- jQuery('#formMakerDiv1').slideToggle(200);
1434
- }
1435
- else {
1436
- jQuery('#formMakerDiv1').slideToggle(400);
1437
- }
1438
- document.getElementById('when_edit').style.display = 'none';
1439
- }
1440
-
1441
- function enable2() {
1442
- alltypes = Array('customHTML', 'text', 'checkbox', 'radio', 'time_and_date', 'select', 'file_upload', 'captcha', 'map', 'button', 'page_break', 'section_break', 'paypal', 'survey');
1443
- for (x = 0; x < 14; x++) {
1444
- document.getElementById('img_' + alltypes[x]).src = "<?php echo WD_FM_URL . '/images/'; ?>" + alltypes[x] + ".png?ver=<?php echo get_option("wd_form_maker_version"); ?>";
1445
- }
1446
- if (document.getElementById('formMakerDiv').style.display == 'block') {
1447
- jQuery('#formMakerDiv').slideToggle(200);
1448
- }
1449
- else {
1450
- jQuery('#formMakerDiv').slideToggle(400);
1451
- }
1452
-
1453
- if (document.getElementById('formMakerDiv1').style.display == 'block') {
1454
- jQuery('#formMakerDiv1').slideToggle(200);
1455
- }
1456
- else {
1457
- jQuery('#formMakerDiv1').slideToggle(400);
1458
- }
1459
- document.getElementById('when_edit').style.display = 'block';
1460
- if (document.getElementById('field_types').offsetWidth) {
1461
- document.getElementById('when_edit').style.width = 'inherit';
1462
- }
1463
- if (document.getElementById('field_types').offsetHeight) {
1464
- document.getElementById('when_edit').style.height = 'inherit';
1465
- }
1466
- }
1467
- </script>
1468
- <form class="wrap" id="manage_form" method="post" action="admin.php?page=manage_fm">
1469
- <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
1470
- <h2 class="fm-h2-message"></h2>
1471
- <div class="fm-page-header">
1472
- <!-- <div class="fm-page-title">
1473
- <?php echo $page_title; ?>
1474
- </div> -->
1475
- <div style="float:left;">
1476
- <div class="fm-logo-edit-page"></div>
1477
- <div class="fm-title-edit-page">Form</br>Maker</div>
1478
- </div>
1479
- <div class="fm-page-actions">
1480
- <div style="height:40px; border-right: 1px solid #848484; display: inline-block; width: 5px; vertical-align: bottom; margin-right: 5px;"></div>
1481
- <?php if ($id) { ?>
1482
- <button class="fm-button save-as-copy-button medium" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'save_as_copy_old');">
1483
- <span></span>
1484
- Save as Copy
1485
- </button>
1486
- <?php } ?>
1487
- <button class="fm-button save-button small" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'save_old');">
1488
- <span></span>
1489
- Save
1490
- </button>
1491
- <button class="fm-button apply-button small" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'apply_old');">
1492
- <span></span>
1493
- Apply
1494
- </button>
1495
- <button class="fm-button cancel-button small" onclick="fm_set_input_value('task', 'cancel');">
1496
- <span></span>
1497
- Cancel
1498
- </button>
1499
- </div>
1500
- <div class="fm-clear"></div>
1501
- </div>
1502
-
1503
- <div class="fm-theme-banner">
1504
- <div class="fm-title">
1505
- <span style="">Form title:&nbsp;</span>
1506
- <input id="title" name="title" value="<?php echo $row->title; ?>"/>
1507
- </div>
1508
- <div class="fm-page-actions">
1509
- <button class="fm-button form-options-button medium" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'form_options_old');">
1510
- <span></span>
1511
- Form Options
1512
- </button>
1513
- </div>
1514
- </div>
1515
- <div class="fm-clear"></div>
1516
- <div class="fm-theme-banner">
1517
- <div class="fm-theme" style="float:left;">
1518
- <span style="">Theme:&nbsp;</span>
1519
- <select id="theme" name="theme" onChange="set_preview()">
1520
- <?php
1521
- foreach ($themes as $theme) {
1522
- ?>
1523
- <option value="<?php echo $theme->id; ?>" <?php echo (($theme->id == $row->theme) ? 'selected' : ''); ?>><?php echo $theme->title; ?></option>
1524
- <?php
1525
- }
1526
- ?>
1527
- </select>
1528
- <button id="preview_form" class="fm-button preview-button medium" onclick="tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerPreview', 'form_id' => $row->id, 'test_theme' => $row->theme, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>'); return false;">
1529
- <span></span>
1530
- Preview
1531
- </button>
1532
- <button id="edit_css" class="fm-button options-edit-button medium" onclick="tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerEditCSS', 'id' => $row->theme, 'form_id' => $row->id, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>'); return false;">
1533
- <span></span>
1534
- Edit CSS
1535
- </button>
1536
- </div>
1537
- <div style="float:right;">
1538
- <button class="fm-button add-new-button large" onclick="enable(); Enable(); return false;">
1539
- Add a New Field
1540
- <span></span>
1541
- </button>
1542
- </div>
1543
- </div>
1544
- <div class="fm-clear"></div>
1545
-
1546
- <div id="formMakerDiv" onclick="close_window()"></div>
1547
- <div id="formMakerDiv1" style="padding-top: 20px;" align="center">
1548
- <table class="formMakerDiv1_table" border="0" width="100%" cellpadding="0" cellspacing="0" height="100%">
1549
- <tr>
1550
- <td style="padding:0px">
1551
- <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" >
1552
- <tr valign="top">
1553
- <td width="20%" height="100%" id="field_types">
1554
- <div id="when_edit" style="display: none;"></div>
1555
- <table border="0" cellpadding="0" cellspacing="3" width="100%" style="border-collapse: separate; border-spacing: 3px;">
1556
- <tbody>
1557
- <tr>
1558
- <td align="center" onclick="addRow('customHTML')" class="field_buttons" id="table_editor">
1559
- <img src="<?php echo WD_FM_URL; ?>/images/customHTML.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_customHTML">
1560
- <div>Custom HTML</div>
1561
- </td>
1562
- <td align="center" onclick="addRow('text')" class="field_buttons" id="table_text">
1563
- <img src="<?php echo WD_FM_URL; ?>/images/text.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_text">
1564
- <div>Text input</div>
1565
- </td>
1566
- </tr>
1567
- <tr>
1568
- <td align="center" onclick="addRow('checkbox')" class="field_buttons" id="table_checkbox">
1569
- <img src="<?php echo WD_FM_URL; ?>/images/checkbox.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_checkbox">
1570
- <div>Multiple Choice</div>
1571
- </td>
1572
- <td align="center" onclick="addRow('radio')" class="field_buttons" id="table_radio">
1573
- <img src="<?php echo WD_FM_URL; ?>/images/radio.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_radio">
1574
- <div>Single Choice</div>
1575
- </td>
1576
- </tr>
1577
- <tr>
1578
- <td align="center" onclick="addRow('survey')" class="field_buttons" id="table_survey">
1579
- <img src="<?php echo WD_FM_URL; ?>/images/survey.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_survey">
1580
- <div>Survey Tools</div>
1581
- </td>
1582
- <td align="center" onclick="addRow('time_and_date')" class="field_buttons" id="table_time_and_date">
1583
- <img src="<?php echo WD_FM_URL; ?>/images/time_and_date.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_time_and_date">
1584
- <div>Time and Date</div>
1585
- </td>
1586
- </tr>
1587
- <tr>
1588
- <td align="center" onclick="addRow('select')" class="field_buttons" id="table_select">
1589
- <img src="<?php echo WD_FM_URL; ?>/images/select.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_select">
1590
- <div>Select Box</div>
1591
- </td>
1592
- <td align="center" onclick="addRow('file_upload')" class="field_buttons" id="table_file_upload">
1593
- <img src="<?php echo WD_FM_URL; ?>/images/file_upload.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_file_upload">
1594
- <div>File Upload</div>
1595
- </td>
1596
- </tr>
1597
- <tr>
1598
- <td align="center" onclick="addRow('section_break')" class="field_buttons" id="table_section_break">
1599
- <img src="<?php echo WD_FM_URL; ?>/images/section_break.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_section_break">
1600
- <div>Section Break</div>
1601
- </td>
1602
- <td align="center" onclick="addRow('page_break')" class="field_buttons" id="table_page_break">
1603
- <img src="<?php echo WD_FM_URL; ?>/images/page_break.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_page_break">
1604
- <div>Page Break</div>
1605
- </td>
1606
- </tr>
1607
- <tr>
1608
- <td align="center" onclick="addRow('map')" class="field_buttons" id="table_map">
1609
- <img src="<?php echo WD_FM_URL; ?>/images/map.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_map">
1610
- <div>Map</div>
1611
- </td>
1612
- <td align="center" onclick="addRow('paypal')" style="" id="table_paypal" class="field_buttons">
1613
- <img src="<?php echo WD_FM_URL; ?>/images/paypal.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_paypal">
1614
- <div>Payment</div>
1615
- </td>
1616
- </tr>
1617
- <tr>
1618
- <td align="center" onclick="addRow('captcha')" class="field_buttons" id="table_captcha">
1619
- <img src="<?php echo WD_FM_URL; ?>/images/captcha.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_captcha">
1620
- <div>Captcha</div>
1621
- </td>
1622
- <td align="center" onclick="addRow('button')" id="table_button" class="field_buttons">
1623
- <img src="<?php echo WD_FM_URL; ?>/images/button.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_button">
1624
- <div>Button</div>
1625
- </td>
1626
- </tr>
1627
- </tbody>
1628
- </table>
1629
- </td>
1630
- <td width="40%" height="100%" align="left">
1631
- <div id="edit_table"></div>
1632
- </td>
1633
- <td align="center" valign="top" style="background: url("<?php echo WD_FM_URL . '/images/border2.png'; ?>") repeat-y;">&nbsp;</td>
1634
- <td style="padding:15px;">
1635
- <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" >
1636
- <tr>
1637
- <td align="right">
1638
- <input type="radio" value="end" name="el_pos" checked="checked" id="pos_end" onclick="Disable()"/>
1639
- At The End
1640
- <input type="radio" value="begin" name="el_pos" id="pos_begin" onclick="Disable()"/>
1641
- At The Beginning
1642
- <input type="radio" value="before" name="el_pos" id="pos_before" onclick="Enable()"/>
1643
- Before
1644
- <select style="width: 100px; margin-left: 5px;" id="sel_el_pos" onclick="change_before()" disabled="disabled"></select>
1645
- <br>
1646
- <button class="fm-button field-save-button small" onclick="add(0, false); return false;">
1647
- Save
1648
- <span></span>
1649
- </button>
1650
- <button class="fm-button cancel-button small" onclick="close_window(); return false;">
1651
- Cancel
1652
- <span></span>
1653
- </button>
1654
- <hr style="margin-bottom:10px" />
1655
- </td>
1656
- </tr>
1657
- <tr height="100%" valign="top">
1658
- <td id="show_table"></td>
1659
- </tr>
1660
- </table>
1661
- </td>
1662
- </tr>
1663
- </table>
1664
- </td>
1665
- </tr>
1666
- </table>
1667
- <input type="hidden" id="old" />
1668
- <input type="hidden" id="old_selected" />
1669
- <input type="hidden" id="element_type" />
1670
- <input type="hidden" id="editing_id" />
1671
- <input type="hidden" value="<?php echo WD_FM_URL; ?>" id="form_plugins_url" />
1672
- <div id="main_editor" style="position: fixed; display: none; z-index: 140;">
1673
- <?php
1674
- if (user_can_richedit()) {
1675
- wp_editor('', 'form_maker_editor', array('teeny' => FALSE, 'textarea_name' => 'form_maker_editor', 'media_buttons' => FALSE, 'textarea_rows' => 5));
1676
- }
1677
- else {
1678
- ?>
1679
- <textarea cols="36" rows="5" id="form_maker_editor" name="form_maker_editor" style="width: 440px; height: 350px; resize: vertical;" class="mce_editable" aria-hidden="true"></textarea>
1680
- <?php
1681
- }
1682
- ?>
1683
- </div>
1684
- </div>
1685
- <?php
1686
- if (!function_exists('the_editor')) {
1687
- ?>
1688
- <iframe id="tinymce" style="display: none;"></iframe>
1689
- <?php
1690
- }
1691
- ?>
1692
- <br />
1693
- <br />
1694
- <fieldset>
1695
- <legend><h2 style="color: #00aeef;">Form</h2></legend>
1696
- <table width="100%" style="margin:8px">
1697
- <tr id="page_navigation">
1698
- <td align="center" width="90%" id="pages" show_title="<?php echo $row->show_title; ?>" show_numbers="<?php echo $row->show_numbers; ?>" type="<?php echo $row->pagination; ?>"></td>
1699
- <td align="left" id="edit_page_navigation"></td>
1700
- </tr>
1701
- </table>
1702
- <div id="take">
1703
- <?php
1704
- if ($row->form) {
1705
- echo str_replace('.png', '.png?ver='. get_option("wd_form_maker_version"), $row->form);
1706
- }
1707
- else {
1708
- ?>
1709
- <table border="0" cellpadding="4" cellspacing="0" class="wdform_table1" style="width: 100%;">
1710
- <tbody id="form_id_tempform_view1" class="wdform_tbody1" page_title="Untitled page" next_title="Next" next_type="button" next_class="wdform_page_button" next_checkable="false" previous_title="Previous" previous_type="button" previous_class="wdform_page_button" previous_checkable="false">
1711
- <tr class="wdform_tr1">
1712
- <td class="wdform_td1" >
1713
- <table class="wdform_table2">
1714
- <tbody class="wdform_tbody2"></tbody>
1715
- </table>
1716
- </td>
1717
- </tr>
1718
- <tr class="wdform_footer">
1719
- <td colspan="100" valign="top">
1720
- <table width="100%" style="padding-right:170px">
1721
- <tbody>
1722
- <tr id="form_id_temppage_nav1">
1723
- </tr>
1724
- </tbody>
1725
- </table>
1726
- </td>
1727
- </tr>
1728
- <tbody id="form_id_tempform_view_img1" style="float: right !important;" >
1729
- <tr>
1730
- <td width="0%"></td>
1731
- <td align="right">
1732
- <img src="<?php echo WD_FM_URL . '/images/minus.png?ver='. get_option("wd_form_maker_version").''; ?>" title="Show or hide the page" class="page_toolbar" onclick="show_or_hide('1')" onmouseover="chnage_icons_src(this,'minus')" onmouseout="chnage_icons_src(this,'minus')" id="show_page_img_1" />
1733
- </td>
1734
- <td>
1735
- <img src="<?php echo WD_FM_URL . '/images/page_delete.png?ver='. get_option("wd_form_maker_version").''; ?>" title="Delete the page" class="page_toolbar" onclick="remove_page('1')" onmouseover="chnage_icons_src(this,'page_delete')" onmouseout="chnage_icons_src(this,'page_delete')" />
1736
- </td>
1737
- <td>
1738
- <img src="<?php echo WD_FM_URL . '/images/page_delete_all.png?ver='. get_option("wd_form_maker_version").''; ?>" title="Delete the page with fields" class="page_toolbar" onclick="remove_page_all('1')" onmouseover="chnage_icons_src(this,'page_delete_all')" onmouseout="chnage_icons_src(this,'page_delete_all')" />
1739
- </td>
1740
- <td>
1741
- <img src="<?php echo WD_FM_URL . '/images/page_edit.png?ver='. get_option("wd_form_maker_version").''; ?>" title="Edit the page" class="page_toolbar" onclick="edit_page_break('1')" onmouseover="chnage_icons_src(this,'page_edit')" onmouseout="chnage_icons_src(this,'page_edit')" />
1742
- </td>
1743
- </tr>
1744
- </tbody>
1745
- </table>
1746
- <?php
1747
- }
1748
- ?>
1749
- </div>
1750
- </fieldset>
1751
- <input type="hidden" name="form" id="form" />
1752
- <input type="hidden" name="form_front" id="form_front" />
1753
- <input type="hidden" name="pagination" id="pagination" />
1754
- <input type="hidden" name="show_title" id="show_title" />
1755
- <input type="hidden" name="show_numbers" id="show_numbers" />
1756
- <input type="hidden" name="public_key" id="public_key" />
1757
- <input type="hidden" name="private_key" id="private_key" />
1758
- <input type="hidden" name="recaptcha_theme" id="recaptcha_theme" />
1759
- <input type="hidden" id="label_order" name="label_order" value="<?php echo $row->label_order; ?>" />
1760
- <input type="hidden" id="label_order_current" name="label_order_current" value="<?php echo $row->label_order_current; ?>" />
1761
- <input type="hidden" name="counter" id="counter" value="<?php echo $row->counter; ?>" />
1762
- <input type="hidden" id="araqel" value="0" />
1763
- <script type="text/javascript">
1764
- form_view = 1;
1765
- form_view_count = 1;
1766
- form_view_max = 1;
1767
- function formOnload() {
1768
- // Enable maps.
1769
- for (t = 0; t < <?php echo $row->counter;?>; t++)
1770
- if (document.getElementById(t+"_typeform_id_temp")) {
1771
- if (document.getElementById(t+"_typeform_id_temp").value=="type_map" || document.getElementById(t+"_typeform_id_temp").value=="type_mark_map") {
1772
- if_gmap_init(t);
1773
- for (q = 0; q < 20; q++) {
1774
- if (document.getElementById(t+"_elementform_id_temp").getAttribute("long"+q)) {
1775
- w_long=parseFloat(document.getElementById(t+"_elementform_id_temp").getAttribute("long"+q));
1776
- w_lat=parseFloat(document.getElementById(t+"_elementform_id_temp").getAttribute("lat"+q));
1777
- w_info=parseFloat(document.getElementById(t+"_elementform_id_temp").getAttribute("info"+q));
1778
- add_marker_on_map(t,q, w_long, w_lat, w_info, false);
1779
- }
1780
- }
1781
- }
1782
- else
1783
- if (document.getElementById(t+"_typeform_id_temp").value == "type_date") {
1784
- // Calendar.setup({
1785
- // inputField: t+"_elementform_id_temp",
1786
- // ifFormat: document.getElementById(t+"_buttonform_id_temp").getAttribute('format'),
1787
- // button: t+"_buttonform_id_temp",
1788
- // align: "Tl",
1789
- // singleClick: true,
1790
- // firstDay: 0
1791
- // });
1792
- }
1793
- else
1794
- if(document.getElementById(t+"_typeform_id_temp").value=="type_spinner") {
1795
- var spinner_value = jQuery("#" + t + "_elementform_id_temp").get( "aria-valuenow" );
1796
- var spinner_min_value = document.getElementById(t+"_min_valueform_id_temp").value;
1797
- var spinner_max_value = document.getElementById(t+"_max_valueform_id_temp").value;
1798
- var spinner_step = document.getElementById(t+"_stepform_id_temp").value;
1799
-
1800
- jQuery( "#"+t+"_elementform_id_temp" ).removeClass( "ui-spinner-input" )
1801
- .prop( "disabled", false )
1802
- .removeAttr( "autocomplete" )
1803
- .removeAttr( "role" )
1804
- .removeAttr( "aria-valuemin" )
1805
- .removeAttr( "aria-valuemax" )
1806
- .removeAttr( "aria-valuenow" );
1807
-
1808
- span_ui= document.getElementById(t+"_elementform_id_temp").parentNode;
1809
- span_ui.parentNode.appendChild(document.getElementById(t+"_elementform_id_temp"));
1810
- span_ui.parentNode.removeChild(span_ui);
1811
-
1812
- jQuery("#"+t+"_elementform_id_temp")[0].spin = null;
1813
-
1814
- spinner = jQuery( "#"+t+"_elementform_id_temp" ).spinner();
1815
- spinner.spinner( "value", spinner_value );
1816
- jQuery( "#"+t+"_elementform_id_temp" ).spinner({ min: spinner_min_value});
1817
- jQuery( "#"+t+"_elementform_id_temp" ).spinner({ max: spinner_max_value});
1818
- jQuery( "#"+t+"_elementform_id_temp" ).spinner({ step: spinner_step});
1819
-
1820
- }
1821
- else
1822
- if(document.getElementById(t+"_typeform_id_temp").value=="type_slider") {
1823
-
1824
- var slider_value = document.getElementById(t+"_slider_valueform_id_temp").value;
1825
- var slider_min_value = document.getElementById(t+"_slider_min_valueform_id_temp").value;
1826
- var slider_max_value = document.getElementById(t+"_slider_max_valueform_id_temp").value;
1827
-
1828
- var slider_element_value = document.getElementById( t+"_element_valueform_id_temp" );
1829
- var slider_value_save = document.getElementById( t+"_slider_valueform_id_temp" );
1830
-
1831
- document.getElementById(t+"_elementform_id_temp").innerHTML = "";
1832
- document.getElementById(t+"_elementform_id_temp").removeAttribute( "class" );
1833
- document.getElementById(t+"_elementform_id_temp").removeAttribute( "aria-disabled" );
1834
-
1835
- jQuery("#"+t+"_elementform_id_temp")[0].slide = null;
1836
-
1837
- jQuery(function() {
1838
- jQuery( "#"+t+"_elementform_id_temp").slider({
1839
- range: "min",
1840
- value: eval(slider_value),
1841
- min: eval(slider_min_value),
1842
- max: eval(slider_max_value),
1843
- slide: function( event, ui ) {
1844
- slider_element_value.innerHTML = "" + ui.value ;
1845
- slider_value_save.value = "" + ui.value;
1846
-
1847
- }
1848
- });
1849
-
1850
-
1851
- });
1852
-
1853
-
1854
- }
1855
- else
1856
- if(document.getElementById(t+"_typeform_id_temp").value=="type_range"){
1857
- var spinner_value0 = jQuery("#" + t+"_elementform_id_temp0").get( "aria-valuenow" );
1858
- var spinner_step = document.getElementById(t+"_range_stepform_id_temp").value;
1859
-
1860
- jQuery( "#"+t+"_elementform_id_temp0" ).removeClass( "ui-spinner-input" )
1861
- .prop( "disabled", false )
1862
- .removeAttr( "autocomplete" )
1863
- .removeAttr( "role" )
1864
- .removeAttr( "aria-valuenow" );
1865
-
1866
- span_ui= document.getElementById(t+"_elementform_id_temp0").parentNode;
1867
- span_ui.parentNode.appendChild(document.getElementById(t+"_elementform_id_temp0"));
1868
- span_ui.parentNode.removeChild(span_ui);
1869
-
1870
-
1871
- jQuery("#"+t+"_elementform_id_temp0")[0].spin = null;
1872
- jQuery("#"+t+"_elementform_id_temp1")[0].spin = null;
1873
-
1874
- spinner0 = jQuery( "#"+t+"_elementform_id_temp0" ).spinner();
1875
- spinner0.spinner( "value", spinner_value0 );
1876
- jQuery( "#"+t+"_elementform_id_temp0" ).spinner({ step: spinner_step});
1877
-
1878
-
1879
-
1880
- var spinner_value1 = jQuery("#" + t+"_elementform_id_temp1").get( "aria-valuenow" );
1881
-
1882
- jQuery( "#"+t+"_elementform_id_temp1" ).removeClass( "ui-spinner-input" )
1883
- .prop( "disabled", false )
1884
- .removeAttr( "autocomplete" )
1885
- .removeAttr( "role" )
1886
- .removeAttr( "aria-valuenow" );
1887
-
1888
- span_ui1= document.getElementById(t+"_elementform_id_temp1").parentNode;
1889
- span_ui1.parentNode.appendChild(document.getElementById(t+"_elementform_id_temp1"));
1890
- span_ui1.parentNode.removeChild(span_ui1);
1891
-
1892
- spinner1 = jQuery( "#"+t+"_elementform_id_temp1" ).spinner();
1893
- spinner1.spinner( "value", spinner_value1 );
1894
- jQuery( "#"+t+"_elementform_id_temp1" ).spinner({ step: spinner_step});
1895
-
1896
- var myu = t;
1897
- jQuery(document).ready(function() {
1898
-
1899
- jQuery("#"+myu+"_mini_label_from").click(function() {
1900
- if (jQuery(this).children('input').length == 0) {
1901
- var from = "<input type='text' id='from' class='from' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\""+jQuery(this).text()+"\">";
1902
- jQuery(this).html(from);
1903
- jQuery("input.from").focus();
1904
- jQuery("input.from").blur(function() {
1905
- var id_for_blur = document.getElementById('from').parentNode.id.split('_');
1906
- var value = jQuery(this).val();
1907
- jQuery("#"+id_for_blur[0]+"_mini_label_from").text(value);
1908
- });
1909
- }
1910
- });
1911
-
1912
- jQuery("label#"+myu+"_mini_label_to").click(function() {
1913
- if (jQuery(this).children('input').length == 0) {
1914
-
1915
- var to = "<input type='text' id='to' class='to' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\""+jQuery(this).text()+"\">";
1916
- jQuery(this).html(to);
1917
- jQuery("input.to").focus();
1918
- jQuery("input.to").blur(function() {
1919
- var id_for_blur = document.getElementById('to').parentNode.id.split('_');
1920
- var value = jQuery(this).val();
1921
-
1922
- jQuery("#"+id_for_blur[0]+"_mini_label_to").text(value);
1923
- });
1924
-
1925
- }
1926
- });
1927
-
1928
-
1929
-
1930
- });
1931
- }
1932
-
1933
- else
1934
- if(document.getElementById(t+"_typeform_id_temp").value=="type_name"){
1935
- var myu = t;
1936
- jQuery(document).ready(function() {
1937
-
1938
- jQuery("#"+myu+"_mini_label_first").click(function() {
1939
-
1940
- if (jQuery(this).children('input').length == 0) {
1941
-
1942
- var first = "<input type='text' id='first' class='first' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
1943
- jQuery(this).html(first);
1944
- jQuery("input.first").focus();
1945
- jQuery("input.first").blur(function() {
1946
-
1947
- var id_for_blur = document.getElementById('first').parentNode.id.split('_');
1948
- var value = jQuery(this).val();
1949
- jQuery("#"+id_for_blur[0]+"_mini_label_first").text(value);
1950
- });
1951
- }
1952
- });
1953
-
1954
- jQuery("label#"+myu+"_mini_label_last").click(function() {
1955
- if (jQuery(this).children('input').length == 0) {
1956
-
1957
- var last = "<input type='text' id='last' class='last' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
1958
- jQuery(this).html(last);
1959
- jQuery("input.last").focus();
1960
- jQuery("input.last").blur(function() {
1961
- var id_for_blur = document.getElementById('last').parentNode.id.split('_');
1962
- var value = jQuery(this).val();
1963
-
1964
- jQuery("#"+id_for_blur[0]+"_mini_label_last").text(value);
1965
- });
1966
-
1967
- }
1968
- });
1969
-
1970
- jQuery("label#"+myu+"_mini_label_title").click(function() {
1971
- if (jQuery(this).children('input').length == 0) {
1972
- var title = "<input type='text' id='title' class='title' size='10' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
1973
- jQuery(this).html(title);
1974
- jQuery("input.title").focus();
1975
- jQuery("input.title").blur(function() {
1976
- var id_for_blur = document.getElementById('title').parentNode.id.split('_');
1977
- var value = jQuery(this).val();
1978
-
1979
-
1980
- jQuery("#"+id_for_blur[0]+"_mini_label_title").text(value);
1981
- });
1982
- }
1983
-
1984
- });
1985
-
1986
-
1987
- jQuery("label#"+myu+"_mini_label_middle").click(function() {
1988
- if (jQuery(this).children('input').length == 0) {
1989
- var middle = "<input type='text' id='middle' class='middle' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
1990
- jQuery(this).html(middle);
1991
- jQuery("input.middle").focus();
1992
- jQuery("input.middle").blur(function() {
1993
- var id_for_blur = document.getElementById('middle').parentNode.id.split('_');
1994
- var value = jQuery(this).val();
1995
-
1996
- jQuery("#"+id_for_blur[0]+"_mini_label_middle").text(value);
1997
- });
1998
- }
1999
- });
2000
-
2001
- });
2002
- }
2003
- else
2004
- if(document.getElementById(t+"_typeform_id_temp").value=="type_address"){
2005
- var myu = t;
2006
-
2007
- jQuery(document).ready(function() {
2008
- jQuery("label#"+myu+"_mini_label_street1").click(function() {
2009
-
2010
- if (jQuery(this).children('input').length == 0) {
2011
- var street1 = "<input type='text' id='street1' class='street1' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
2012
- jQuery(this).html(street1);
2013
- jQuery("input.street1").focus();
2014
- jQuery("input.street1").blur(function() {
2015
- var id_for_blur = document.getElementById('street1').parentNode.id.split('_');
2016
- var value = jQuery(this).val();
2017
- jQuery("#"+id_for_blur[0]+"_mini_label_street1").text(value);
2018
- });
2019
- }
2020
- });
2021
-
2022
- jQuery("label#"+myu+"_mini_label_street2").click(function() {
2023
- if (jQuery(this).children('input').length == 0) {
2024
- var street2 = "<input type='text' id='street2' class='street2' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
2025
- jQuery(this).html(street2);
2026
- jQuery("input.street2").focus();
2027
- jQuery("input.street2").blur(function() {
2028
- var id_for_blur = document.getElementById('street2').parentNode.id.split('_');
2029
- var value = jQuery(this).val();
2030
- jQuery("#"+id_for_blur[0]+"_mini_label_street2").text(value);
2031
- });
2032
- }
2033
- });
2034
-
2035
-
2036
- jQuery("label#"+myu+"_mini_label_city").click(function() {
2037
- if (jQuery(this).children('input').length == 0) {
2038
- var city = "<input type='text' id='city' class='city' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
2039
- jQuery(this).html(city);
2040
- jQuery("input.city").focus();
2041
- jQuery("input.city").blur(function() {
2042
- var id_for_blur = document.getElementById('city').parentNode.id.split('_');
2043
- var value = jQuery(this).val();
2044
- jQuery("#"+id_for_blur[0]+"_mini_label_city").text(value);
2045
- });
2046
- }
2047
- });
2048
-
2049
- jQuery("label#"+myu+"_mini_label_state").click(function() {
2050
- if (jQuery(this).children('input').length == 0) {
2051
- var state = "<input type='text' id='state' class='state' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
2052
- jQuery(this).html(state);
2053
- jQuery("input.state").focus();
2054
- jQuery("input.state").blur(function() {
2055
- var id_for_blur = document.getElementById('state').parentNode.id.split('_');
2056
- var value = jQuery(this).val();
2057
- jQuery("#"+id_for_blur[0]+"_mini_label_state").text(value);
2058
- });
2059
- }
2060
- });
2061
-
2062
- jQuery("label#"+myu+"_mini_label_postal").click(function() {
2063
- if (jQuery(this).children('input').length == 0) {
2064
- var postal = "<input type='text' id='postal' class='postal' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
2065
- jQuery(this).html(postal);
2066
- jQuery("input.postal").focus();
2067
- jQuery("input.postal").blur(function() {
2068
- var id_for_blur = document.getElementById('postal').parentNode.id.split('_');
2069
- var value = jQuery(this).val();
2070
- jQuery("#"+id_for_blur[0]+"_mini_label_postal").text(value);
2071
- });
2072
- }
2073
- });
2074
-
2075
-
2076
- jQuery("label#"+myu+"_mini_label_country").click(function() {
2077
- if (jQuery(this).children('input').length == 0) {
2078
- var country = "<input type='country' id='country' class='country' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
2079
- jQuery(this).html(country);
2080
- jQuery("input.country").focus();
2081
- jQuery("input.country").blur(function() {
2082
- var id_for_blur = document.getElementById('country').parentNode.id.split('_');
2083
- var value = jQuery(this).val();
2084
- jQuery("#"+id_for_blur[0]+"_mini_label_country").text(value);
2085
- });
2086
- }
2087
- });
2088
- });
2089
-
2090
- }
2091
- else
2092
- if(document.getElementById(t+"_typeform_id_temp").value=="type_phone"){
2093
- var myu = t;
2094
-
2095
- jQuery(document).ready(function() {
2096
- jQuery("label#"+myu+"_mini_label_area_code").click(function() {
2097
- if (jQuery(this).children('input').length == 0) {
2098
-
2099
- var area_code = "<input type='text' id='area_code' class='area_code' size='10' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
2100
-
2101
- jQuery(this).html(area_code);
2102
- jQuery("input.area_code").focus();
2103
- jQuery("input.area_code").blur(function() {
2104
- var id_for_blur = document.getElementById('area_code').parentNode.id.split('_');
2105
- var value = jQuery(this).val();
2106
- jQuery("#"+id_for_blur[0]+"_mini_label_area_code").text(value);
2107
- });
2108
- }
2109
- });
2110
-
2111
-
2112
- jQuery("label#"+myu+"_mini_label_phone_number").click(function() {
2113
-
2114
- if (jQuery(this).children('input').length == 0) {
2115
- var phone_number = "<input type='text' id='phone_number' class='phone_number' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
2116
-
2117
- jQuery(this).html(phone_number);
2118
-
2119
- jQuery("input.phone_number").focus();
2120
- jQuery("input.phone_number").blur(function() {
2121
- var id_for_blur = document.getElementById('phone_number').parentNode.id.split('_');
2122
- var value = jQuery(this).val();
2123
- jQuery("#"+id_for_blur[0]+"_mini_label_phone_number").text(value);
2124
- });
2125
- }
2126
- });
2127
-
2128
- });
2129
- }
2130
- else
2131
- if(document.getElementById(t+"_typeform_id_temp").value=="type_date_fields"){
2132
- var myu = t;
2133
-
2134
- jQuery(document).ready(function() {
2135
- jQuery("label#"+myu+"_day_label").click(function() {
2136
- if (jQuery(this).children('input').length == 0) {
2137
- var day = "<input type='text' id='day' class='day' size='8' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
2138
- jQuery(this).html(day);
2139
- jQuery("input.day").focus();
2140
- jQuery("input.day").blur(function() {
2141
- var id_for_blur = document.getElementById('day').parentNode.id.split('_');
2142
- var value = jQuery(this).val();
2143
-
2144
- jQuery("#"+id_for_blur[0]+"_day_label").text(value);
2145
- });
2146
- }
2147
- });
2148
-
2149
-
2150
- jQuery("label#"+myu+"_month_label").click(function() {
2151
- if (jQuery(this).children('input').length == 0) {
2152
- var month = "<input type='text' id='month' class='month' size='8' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
2153
- jQuery(this).html(month);
2154
- jQuery("input.month").focus();
2155
- jQuery("input.month").blur(function() {
2156
- var id_for_blur = document.getElementById('month').parentNode.id.split('_');
2157
- var value = jQuery(this).val();
2158
-
2159
- jQuery("#"+id_for_blur[0]+"_month_label").text(value);
2160
- });
2161
- }
2162
- });
2163
-
2164
- jQuery("label#"+myu+"_year_label").click(function() {
2165
- if (jQuery(this).children('input').length == 0) {
2166
- var year = "<input type='text' id='year' class='year' size='8' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
2167
- jQuery(this).html(year);
2168
- jQuery("input.year").focus();
2169
- jQuery("input.year").blur(function() {
2170
- var id_for_blur = document.getElementById('year').parentNode.id.split('_');
2171
- var value = jQuery(this).val();
2172
-
2173
- jQuery("#"+id_for_blur[0]+"_year_label").text(value);
2174
- });
2175
- }
2176
- });
2177
-
2178
- });
2179
-
2180
-
2181
- }
2182
- else
2183
- if(document.getElementById(t+"_typeform_id_temp").value=="type_time"){
2184
- var myu = t;
2185
-
2186
- jQuery(document).ready(function() {
2187
- jQuery("label#"+myu+"_mini_label_hh").click(function() {
2188
- if (jQuery(this).children('input').length == 0) {
2189
- var hh = "<input type='text' id='hh' class='hh' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
2190
- jQuery(this).html(hh);
2191
- jQuery("input.hh").focus();
2192
- jQuery("input.hh").blur(function() {
2193
- var id_for_blur = document.getElementById('hh').parentNode.id.split('_');
2194
- var value = jQuery(this).val();
2195
-
2196
-
2197
- jQuery("#"+id_for_blur[0]+"_mini_label_hh").text(value);
2198
- });
2199
- }
2200
- });
2201
-
2202
-
2203
- jQuery("label#"+myu+"_mini_label_mm").click(function() {
2204
- if (jQuery(this).children('input').length == 0) {
2205
- var mm = "<input type='text' id='mm' class='mm' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
2206
- jQuery(this).html(mm);
2207
- jQuery("input.mm").focus();
2208
- jQuery("input.mm").blur(function() {
2209
- var id_for_blur = document.getElementById('mm').parentNode.id.split('_');
2210
- var value = jQuery(this).val();
2211
-
2212
- jQuery("#"+id_for_blur[0]+"_mini_label_mm").text(value);
2213
- });
2214
- }
2215
- });
2216
-
2217
- jQuery("label#"+myu+"_mini_label_ss").click(function() {
2218
- if (jQuery(this).children('input').length == 0) {
2219
- var ss = "<input type='text' id='ss' class='ss' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
2220
- jQuery(this).html(ss);
2221
- jQuery("input.ss").focus();
2222
- jQuery("input.ss").blur(function() {
2223
- var id_for_blur = document.getElementById('ss').parentNode.id.split('_');
2224
- var value = jQuery(this).val();
2225
-
2226
- jQuery("#"+id_for_blur[0]+"_mini_label_ss").text(value);
2227
- });
2228
- }
2229
- });
2230
-
2231
- jQuery("label#"+myu+"_mini_label_am_pm").click(function() {
2232
- if (jQuery(this).children('input').length == 0) {
2233
- var am_pm = "<input type='text' id='am_pm' class='am_pm' size='4' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
2234
- jQuery(this).html(am_pm);
2235
- jQuery("input.am_pm").focus();
2236
- jQuery("input.am_pm").blur(function() {
2237
- var id_for_blur = document.getElementById('am_pm').parentNode.id.split('_');
2238
- var value = jQuery(this).val();
2239
-
2240
- jQuery("#"+id_for_blur[0]+"_mini_label_am_pm").text(value);
2241
- });
2242
- }
2243
- });
2244
- });
2245
-
2246
- }
2247
-
2248
- else
2249
- if(document.getElementById(t+"_typeform_id_temp").value=="type_paypal_price"){
2250
- var myu = t;
2251
- jQuery(document).ready(function() {
2252
-
2253
- jQuery("#"+myu+"_mini_label_dollars").click(function() {
2254
-
2255
- if (jQuery(this).children('input').length == 0) {
2256
-
2257
- var dollars = "<input type='text' id='dollars' class='dollars' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
2258
- jQuery(this).html(dollars);
2259
- jQuery("input.dollars").focus();
2260
- jQuery("input.dollars").blur(function() {
2261
-
2262
- var id_for_blur = document.getElementById('dollars').parentNode.id.split('_');
2263
- var value = jQuery(this).val();
2264
- jQuery("#"+id_for_blur[0]+"_mini_label_dollars").text(value);
2265
- });
2266
- }
2267
- });
2268
-
2269
- jQuery("label#"+myu+"_mini_label_cents").click(function() {
2270
- if (jQuery(this).children('input').length == 0) {
2271
-
2272
- var cents = "<input type='text' id='cents' class='cents' style='outline:none; border:none; background:none;' value=\""+jQuery(this).text()+"\">";
2273
- jQuery(this).html(cents);
2274
- jQuery("input.cents").focus();
2275
- jQuery("input.cents").blur(function() {
2276
- var id_for_blur = document.getElementById('cents').parentNode.id.split('_');
2277
- var value = jQuery(this).val();
2278
-
2279
- jQuery("#"+id_for_blur[0]+"_mini_label_cents").text(value);
2280
- });
2281
-
2282
- }
2283
- });
2284
- });
2285
- }
2286
- else
2287
- if(document.getElementById(t+"_typeform_id_temp").value=="type_scale_rating"){
2288
- var myu = t;
2289
- jQuery(document).ready(function() {
2290
-
2291
- jQuery("#"+myu+"_mini_label_worst").click(function() {
2292
-
2293
- if (jQuery(this).children('input').length == 0) {
2294
-
2295
- var worst = "<input type='text' id='worst' class='worst' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\""+jQuery(this).text()+"\">";
2296
- jQuery(this).html(worst);
2297
- jQuery("input.worst").focus();
2298
- jQuery("input.worst").blur(function() {
2299
-
2300
- var id_for_blur = document.getElementById('worst').parentNode.id.split('_');
2301
- var value = jQuery(this).val();
2302
- jQuery("#"+id_for_blur[0]+"_mini_label_worst").text(value);
2303
- });
2304
- }
2305
- });
2306
-
2307
- jQuery("label#"+myu+"_mini_label_best").click(function() {
2308
- if (jQuery(this).children('input').length == 0) {
2309
-
2310
- var best = "<input type='text' id='best' class='best' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\""+jQuery(this).text()+"\">";
2311
- jQuery(this).html(best);
2312
- jQuery("input.best").focus();
2313
- jQuery("input.best").blur(function() {
2314
- var id_for_blur = document.getElementById('best').parentNode.id.split('_');
2315
- var value = jQuery(this).val();
2316
-
2317
- jQuery("#"+id_for_blur[0]+"_mini_label_best").text(value);
2318
- });
2319
-
2320
- }
2321
- });
2322
-
2323
-
2324
-
2325
- });
2326
- }
2327
- }
2328
- form_view = 1;
2329
- form_view_count = 0;
2330
- for (i = 1; i <= 30; i++) {
2331
- if (document.getElementById('form_id_tempform_view'+i)) {
2332
- form_view_count++;
2333
- form_view_max=i;
2334
- }
2335
- }
2336
- if (form_view_count > 1) {
2337
- for (i=1; i<=form_view_max; i++) {
2338
- if (document.getElementById('form_id_tempform_view'+i)) {
2339
- first_form_view=i;
2340
- break;
2341
- }
2342
- }
2343
- form_view=form_view_max;
2344
- generate_page_nav(first_form_view);
2345
- var img_EDIT = document.createElement("img");
2346
- img_EDIT.setAttribute("src", "<?php echo WD_FM_URL . '/images/edit.png'; ?>");
2347
- img_EDIT.style.cssText = "margin-left:40px; cursor:pointer";
2348
- img_EDIT.setAttribute("onclick", 'el_page_navigation()');
2349
- var td_EDIT = document.getElementById("edit_page_navigation");
2350
- td_EDIT.appendChild(img_EDIT);
2351
- document.getElementById('page_navigation').appendChild(td_EDIT);
2352
- }
2353
- //if(document.getElementById('take').innerHTML.indexOf('up_row(')==-1) location.reload(true);
2354
- //else
2355
-
2356
- document.getElementById('form').value=document.getElementById('take').innerHTML;
2357
- document.getElementById('araqel').value = 1;
2358
- }
2359
- jQuery(window).load(function () {
2360
- formOnload();
2361
- });
2362
- </script>
2363
-
2364
- <input type="hidden" name="option" value="com_formmaker" />
2365
- <input type="hidden" name="id" value="<?php echo $row->id; ?>" />
2366
- <input type="hidden" name="cid[]" value="<?php echo $row->id; ?>" />
2367
-
2368
- <input type="hidden" id="task" name="task" value=""/>
2369
- <input type="hidden" id="current_id" name="current_id" value="<?php echo $row->id; ?>" />
2370
- </form>
2371
- <script>
2372
- jQuery(window).load(function() {
2373
- fm_popup();
2374
- });
2375
- </script>
2376
- <?php
2377
- }
2378
-
2379
- public function form_options_old($id) {
2380
- $row = $this->model->get_row_data($id);
2381
- $themes = $this->model->get_theme_rows_data('_old');
2382
- $page_title = $row->title . ' form options';
2383
- $label_id = array();
2384
- $label_label = array();
2385
- $label_type = array();
2386
- $label_all = explode('#****#', $row->label_order_current);
2387
- $label_all = array_slice($label_all, 0, count($label_all) - 1);
2388
- foreach ($label_all as $key => $label_each) {
2389
- $label_id_each = explode('#**id**#', $label_each);
2390
- array_push($label_id, $label_id_each[0]);
2391
- $label_order_each = explode('#**label**#', $label_id_each[1]);
2392
- array_push($label_label, $label_order_each[0]);
2393
- array_push($label_type, $label_order_each[1]);
2394
- }
2395
- ?>
2396
- <script>
2397
- gen = "<?php echo $row->counter; ?>";
2398
- form_view_max = 20;
2399
- function set_preview() {
2400
- document.getElementById('preview_form').href = '<?php echo add_query_arg(array('action' => 'FormMakerPreview', 'form_id' => $row->id), admin_url('admin-ajax.php')); ?>&id='+document.getElementById('theme').value+'&width=1000&height=500&TB_iframe=1';
2401
- }
2402
- </script>
2403
- <form class="wrap" method="post" action="admin.php?page=manage_fm" style="width:99%;" name="adminForm" id="adminForm">
2404
- <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
2405
- <h2><?php echo $page_title; ?></h2>
2406
- <div style="float: right; margin: 0 5px 0 0;">
2407
- <input class="button-secondary" type="submit" onclick="if (fm_check_email('mail') ||
2408
- fm_check_email('from_mail') ||
2409
- fm_check_email('paypal_email')) {return false;}; fm_set_input_value('task', 'save_options_old')" value="Save"/>
2410
- <input class="button-secondary" type="submit" onclick="if (fm_check_email('mail') ||
2411
- fm_check_email('from_mail') ||
2412
- fm_check_email('paypal_email')) {return false;}; fm_set_input_value('task', 'apply_options_old')" value="Apply"/>
2413
- <input class="button-secondary" type="submit" onclick="fm_set_input_value('task', 'cancel_options_old')" value="Cancel"/>
2414
- </div>
2415
- <input type="hidden" name="take" id="take" value="<?php $row->form ?>">
2416
- <div class="submenu-box" style="width: 99%; float: left; margin: 15px 0 0 0;">
2417
- <div class="submenu-pad">
2418
- <ul id="submenu" class="configuration">
2419
- <li>
2420
- <a id="general" class="fm_fieldset_tab" onclick="form_maker_options_tabs('general')" href="#">General Options</a>
2421
- </li>
2422
- <li>
2423
- <a id="actions" class="fm_fieldset_tab" onclick="form_maker_options_tabs('actions')" href="#">Actions after Submission</a>
2424
- </li>
2425
- <li>
2426
- <a id="payment" class="fm_fieldset_tab" onclick="form_maker_options_tabs('payment')" href="#">Payment Options</a>
2427
- </li>
2428
- <li>
2429
- <a id="javascript" class="fm_fieldset_tab" onclick="form_maker_options_tabs('javascript')" href="#">JavaScript</a>
2430
- </li>
2431
- <li>
2432
- <a id="custom" class="fm_fieldset_tab" onclick="form_maker_options_tabs('custom')" href="#">Custom Text in Email</a>
2433
- </li>
2434
- </ul>
2435
- </div>
2436
- </div>
2437
- <fieldset id="actions_fieldset" class="adminform fm_fieldset_deactive">
2438
- <legend style="color:#0B55C4;font-weight: bold;">Actions after submission</legend>
2439
- <table class="admintable">
2440
- <tr valign="top">
2441
- <td class="fm_options_label">
2442
- <label>Action type</label>
2443
- </td>
2444
- <td class="fm_options_value">
2445
- <div><input type="radio" name="submit_text_type" id="text_type_none" onclick="set_type('none')" value="1" <?php echo ($row->submit_text_type != 2 && $row->submit_text_type != 3 && $row->submit_text_type != 4 && $row->submit_text_type != 5) ? "checked" : ""; ?> /><label for="text_type_none">Stay on Form</label></div>
2446
- <div><input type="radio" name="submit_text_type" id="text_type_post" onclick="set_type('post')" value="2" <?php echo ($row->submit_text_type == 2) ? "checked" : ""; ?> /><label for="text_type_post">Post</label></label></div>
2447
- <div><input type="radio" name="submit_text_type" id="text_type_page" onclick="set_type('page')" value="5" <?php echo ($row->submit_text_type == 5) ? "checked" : ""; ?> /><label for="text_type_page">Page</label></label></div>
2448
- <div><input type="radio" name="submit_text_type" id="text_type_custom_text" onclick="set_type('custom_text')" value="3" <?php echo ($row->submit_text_type == 3 ) ? "checked" : ""; ?> /><label for="text_type_custom_text">Custom Text</label></label></div>
2449
- <div><input type="radio" name="submit_text_type" id="text_type_url" onclick="set_type('url')" value="4" <?php echo ($row->submit_text_type == 4) ? "checked" : ""; ?> /><label for="text_type_url">URL</div>
2450
- </td>
2451
- </tr>
2452
- <tr id="none" <?php echo (($row->submit_text_type == 2 || $row->submit_text_type == 3 || $row->submit_text_type == 4 || $row->submit_text_type == 5) ? 'style="display:none"' : ''); ?>>
2453
- <td class="fm_options_label">
2454
- <label>Stay on Form</label>
2455
- </td>
2456
- <td class="fm_options_value">
2457
- <img src="<?php echo WD_FM_URL . '/images/tick.png'; ?>" border="0">
2458
- </td>
2459
- </tr>
2460
- <tr id="post" <?php echo (($row->submit_text_type != 2) ? 'style="display:none"' : ''); ?>>
2461
- <td class="fm_options_label">
2462
- <label for="post_name">Post</label>
2463
- </td>
2464
- <td class="fm_options_value">
2465
- <select id="post_name" name="post_name">
2466
- <option value="0">- Select Post -</option>
2467
- <?php
2468
- // The Query.
2469
- $args = array('posts_per_page' => 10000);
2470
- query_posts($args);
2471
- // The Loop.
2472
- while (have_posts()) : the_post(); ?>
2473
- <option value="<?php $x = get_permalink(get_the_ID()); echo $x; ?>" <?php echo (($row->article_id == $x) ? 'selected="selected"' : ''); ?>><?php the_title(); ?></option>
2474
- <?php
2475
- endwhile;
2476
- // Reset Query.
2477
- wp_reset_query();
2478
- ?>
2479
- </select>
2480
- </td>
2481
- </tr>
2482
- <tr id="page" <?php echo (($row->submit_text_type != 5) ? 'style="display:none"' : ''); ?>>
2483
- <td class="fm_options_label">
2484
- <label for="page_name">Page</label>
2485
- </td>
2486
- <td class="fm_options_value">
2487
- <select id="page_name" name="page_name" style="width:153px; font-size:11px;">
2488
- <option value="0">- Select Page -</option>
2489
- <?php
2490
- // The Query.
2491
- $pages = get_pages();
2492
- // The Loop.
2493
- foreach ($pages as $page) {
2494
- $page_id = get_page_link($page->ID);
2495
- ?>
2496
- <option value="<?php echo $page_id; ?>" <?php echo (($row->article_id == $page_id) ? 'selected="selected"' : ''); ?>><?php echo $page->post_title; ?></option>
2497
- <?php
2498
- }
2499
- // Reset Query.
2500
- wp_reset_query();
2501
- ?>
2502
- </select>
2503
- </td>
2504
- </tr>
2505
- <tr id="custom_text" <?php echo (($row->submit_text_type != 3) ? 'style="display: none;"' : ''); ?>>
2506
- <td class="fm_options_label">
2507
- <label for="submit_text">Text</label>
2508
- </td>
2509
- <td class="fm_options_value">
2510
- <?php
2511
- if (user_can_richedit()) {
2512
- wp_editor($row->submit_text, 'submit_text', array('teeny' => FALSE, 'textarea_name' => 'submit_text', 'media_buttons' => FALSE, 'textarea_rows' => 5));
2513
- }
2514
- else {
2515
- ?>
2516
- <textarea cols="36" rows="5" id="submit_text" name="submit_text" style="resize: vertical;">
2517
- <?php echo $row->submit_text; ?>
2518
- </textarea>
2519
- <?php
2520
- }
2521
- ?>
2522
- </td>
2523
- </tr>
2524
- <tr id="url" <?php echo (($row->submit_text_type != 4 ) ? 'style="display:none"' : ''); ?>>
2525
- <td class="fm_options_label">
2526
- <label for="url">URL</label>
2527
- </td>
2528
- <td class="fm_options_value">
2529
- <input type="text" id="url" name="url" style="width:300px" value="<?php echo $row->url; ?>" />
2530
- </td>
2531
- </tr>
2532
- </table>
2533
- </fieldset>
2534
- <fieldset id="custom_fieldset" class="adminform fm_fieldset_deactive">
2535
- <legend style="color:#0B55C4;font-weight: bold;">Custom text in email</legend>
2536
- <table class="admintable">
2537
- <tr>
2538
- <td class="fm_options_label" valign="top">
2539
- <label>For Administrator</label>
2540
- </td>
2541
- <td class="fm_options_value">
2542
- <div style="margin-bottom:5px">
2543
- <?php
2544
- $choise = "document.getElementById('script_mail')";
2545
- for ($i = 0; $i < count($label_label); $i++) {
2546
- if ($label_type[$i] == "type_submit_reset" || $label_type[$i] == "type_editor" || $label_type[$i] == "type_map" || $label_type[$i] == "type_mark_map" || $label_type[$i] == "type_captcha" || $label_type[$i] == "type_recaptcha" || $label_type[$i] == "type_button") {
2547
- continue;
2548
- }
2549
- $param = htmlspecialchars(addslashes($label_label[$i]));
2550
- ?>
2551
- <input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo htmlspecialchars(addslashes($label_label[$i])); ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
2552
- <?php
2553
- }
2554
- ?>
2555
- <input style="border: 1px solid silver; font-size: 10px; margin: 3px;" type="button" value="All fields list" onClick="insertAtCursor(<?php echo $choise; ?>, 'all')" />
2556
- </div>
2557
- <?php
2558
- if (user_can_richedit()) {
2559
- wp_editor($row->script_mail, 'script_mail', array('teeny' => FALSE, 'textarea_name' => 'script_mail', 'media_buttons' => FALSE, 'textarea_rows' => 5));
2560
- }
2561
- else {
2562
- ?>
2563
- <textarea name="script_mail" id="script_mail" cols="20" rows="10" style="width:300px; height:450px;"><?php echo $row->script_mail; ?></textarea>
2564
- <?php
2565
- }
2566
- ?>
2567
- </td>
2568
- </tr>
2569
- <tr>
2570
- <td valign="top" height="30"></td>
2571
- <td valign="top"></td>
2572
- </tr>
2573
- <tr>
2574
- <td class="fm_options_label" valign="top">
2575
- <label>For User</label>
2576
- </td>
2577
- <td class="fm_options_value">
2578
- <div style="margin-bottom:5px">
2579
- <?php
2580
- $choise = "document.getElementById('script_mail_user')";
2581
- for ($i = 0; $i < count($label_label); $i++) {
2582
- if ($label_type[$i] == "type_submit_reset" || $label_type[$i] == "type_editor" || $label_type[$i] == "type_map" || $label_type[$i] == "type_mark_map" || $label_type[$i] == "type_captcha" || $label_type[$i] == "type_recaptcha" || $label_type[$i] == "type_button") {
2583
- continue;
2584
- }
2585
- $param = htmlspecialchars(addslashes($label_label[$i]));
2586
- ?>
2587
- <input style="border: 1px solid silver; font-size: 10px;" type="button" value="<?php echo htmlspecialchars(addslashes($label_label[$i])); ?>" onClick="insertAtCursor(<?php echo $choise; ?>, '<?php echo $param; ?>')" />
2588
- <?php
2589
- }
2590
- ?>
2591
- <input style="border: 1px solid silver; font-size: 10px; margin:3px;" type="button" value="All fields list" onClick="insertAtCursor(<?php echo $choise; ?>, 'all')" />
2592
- </div>
2593
- <?php
2594
- if (user_can_richedit()) {
2595
- wp_editor($row->script_mail_user, 'script_mail_user', array('teeny' => FALSE, 'textarea_name' => 'script_mail_user', 'media_buttons' => FALSE, 'textarea_rows' => 5));
2596
- }
2597
- else {
2598
- ?>
2599
- <textarea name="script_mail_user" id="script_mail_user" cols="20" rows="10" style="width:300px; height:450px;"><?php echo $row->script_mail_user; ?></textarea>
2600
- <?php
2601
- }
2602
- ?>
2603
- </td>
2604
- </tr>
2605
- </table>
2606
- </fieldset>
2607
- <fieldset id="general_fieldset" class="adminform fm_fieldset_deactive">
2608
- <legend style="color:#0B55C4;font-weight: bold;">General Options</legend>
2609
- <table class="admintable" style="float:left">
2610
- <tr valign="top">
2611
- <td class="fm_options_label">
2612
- <label for="mail">Email to send submissions to</label>
2613
- </td>
2614
- <td class="fm_options_value">
2615
- <input id="mail" name="mail" value="<?php echo $row->mail; ?>" style="width:250px;" />
2616
- </td>
2617
- </tr>
2618
- <tr valign="top">
2619
- <td class="fm_options_label">
2620
- <label for="from_mail">From Email</label>
2621
- </td>
2622
- <td class="fm_options_value">
2623
- <input id="from_mail" name="from_mail" value="<?php echo $row->from_mail; ?>" style="width:250px;" />
2624
- </td>
2625
- </tr>
2626
- <tr valign="top">
2627
- <td class="fm_options_label">
2628
- <label for="from_name">From Name</label>
2629
- </td>
2630
- <td class="fm_options_value">
2631
- <input id="from_name" name="from_name" value="<?php echo $row->from_name; ?>" style="width:250px;"/>
2632
- </td>
2633
- </tr>
2634
- <tr valign="top">
2635
- <td class="fm_options_label">
2636
- <label for="theme">Theme</label>
2637
- </td>
2638
- <td class="fm_options_value">
2639
- <select id="theme" name="theme" style="width:260px;" onChange="set_preview()">
2640
- <?php
2641
- foreach ($themes as $theme) {
2642
- ?>
2643
- <option value="<?php echo $theme->id; ?>" <?php echo (($theme->id == $row->theme) ? 'selected' : ''); ?>><?php echo $theme->title; ?></option>
2644
- <?php
2645
- }
2646
- ?>
2647
- </select>
2648
- <a href="<?php echo add_query_arg(array('action' => 'FormMakerPreview', 'id' => $row->theme, 'form_id' => $row->id, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" class="button-primary thickbox thickbox-preview" id="preview_form" title="Form Preview" onclick="return false;">
2649
- Preview
2650
- </a>
2651
- </td>
2652
- </tr>
2653
- </table>
2654
- </fieldset>
2655
- <fieldset id="payment_fieldset" class="adminform fm_fieldset_deactive">
2656
- <legend style="color:#0B55C4;font-weight: bold;">Payment Options</legend>
2657
- <table class="admintable">
2658
- <tr valign="top">
2659
- <td class="fm_options_label">
2660
- <label>Turn Paypal On</label>
2661
- </td>
2662
- <td class="fm_options_value">
2663
- <div><input type="radio" name="paypal_mode" id="paypal_mode1" value="1" <?php echo ($row->paypal_mode == "1") ? "checked" : ""; ?> /><label for="paypal_mode1">On</label></div>
2664
- <div><input type="radio" name="paypal_mode" id="paypal_mode2" value="0" <?php echo ($row->paypal_mode != "1") ? "checked" : ""; ?> /><label for="paypal_mode2">Off</label></div>
2665
- </td>
2666
- </tr>
2667
- <tr valign="top">
2668
- <td class="fm_options_label">
2669
- <label>Checkout Mode</label>
2670
- </td>
2671
- <td class="fm_options_value">
2672
- <div><input type="radio" name="checkout_mode" id="checkout_mode1" value="production" <?php echo ($row->checkout_mode == "production") ? "checked" : ""; ?> /><label for="checkout_mode1">Production</label></div>
2673
- <div><input type="radio" name="checkout_mode" id="checkout_mode2" value="testmode" <?php echo ($row->checkout_mode != "production") ? "checked" : ""; ?> /><label for="checkout_mode2">Testmode</label></div>
2674
- </td>
2675
- </tr>
2676
- <tr valign="top">
2677
- <td class="fm_options_label">
2678
- <label for="paypal_email">Paypal email</label>
2679
- </td>
2680
- <td class="fm_options_value">
2681
- <input type="text" name="paypal_email" id="paypal_email" value="<?php echo $row->paypal_email; ?>" class="text_area" style="width:250px">
2682
- </td>
2683
- </tr>
2684
- <tr valign="top">
2685
- <td class="fm_options_label">
2686
- <label for="payment_currency">Payment Currency</label>
2687
- </td>
2688
- <td class="fm_options_value">
2689
- <select id="payment_currency" name="payment_currency" style="width:253px">
2690
- <option value="USD" <?php echo (($row->payment_currency == 'USD') ? 'selected' : ''); ?>>$ &#8226; U.S. Dollar</option>
2691
- <option value="EUR" <?php echo (($row->payment_currency == 'EUR') ? 'selected' : ''); ?>>&#8364; &#8226; Euro</option>
2692
- <option value="GBP" <?php echo (($row->payment_currency == 'GBP') ? 'selected' : ''); ?>>&#163; &#8226; Pound Sterling</option>
2693
- <option value="JPY" <?php echo (($row->payment_currency == 'JPY') ? 'selected' : ''); ?>>&#165; &#8226; Japanese Yen</option>
2694
- <option value="CAD" <?php echo (($row->payment_currency == 'CAD') ? 'selected' : ''); ?>>C$ &#8226; Canadian Dollar</option>
2695
- <option value="MXN" <?php echo (($row->payment_currency == 'MXN') ? 'selected' : ''); ?>>Mex$ &#8226; Mexican Peso</option>
2696
- <option value="HKD" <?php echo (($row->payment_currency == 'HKD') ? 'selected' : ''); ?>>HK$ &#8226; Hong Kong Dollar</option>
2697
- <option value="HUF" <?php echo (($row->payment_currency == 'HUF') ? 'selected' : ''); ?>>Ft &#8226; Hungarian Forint</option>
2698
- <option value="NOK" <?php echo (($row->payment_currency == 'NOK') ? 'selected' : ''); ?>>kr &#8226; Norwegian Kroner</option>
2699
- <option value="NZD" <?php echo (($row->payment_currency == 'NZD') ? 'selected' : ''); ?>>NZ$ &#8226; New Zealand Dollar</option>
2700
- <option value="SGD" <?php echo (($row->payment_currency == 'SGD') ? 'selected' : ''); ?>>S$ &#8226; Singapore Dollar</option>
2701
- <option value="SEK" <?php echo (($row->payment_currency == 'SEK') ? 'selected' : ''); ?>>kr &#8226; Swedish Kronor</option>
2702
- <option value="PLN" <?php echo (($row->payment_currency == 'PLN') ? 'selected' : ''); ?>>zl &#8226; Polish Zloty</option>
2703
- <option value="AUD" <?php echo (($row->payment_currency == 'AUD') ? 'selected' : ''); ?>>A$ &#8226; Australian Dollar</option>
2704
- <option value="DKK" <?php echo (($row->payment_currency == 'DKK') ? 'selected' : ''); ?>>kr &#8226; Danish Kroner</option>
2705
- <option value="CHF" <?php echo (($row->payment_currency == 'CHF') ? 'selected' : ''); ?>>CHF &#8226; Swiss Francs</option>
2706
- <option value="CZK" <?php echo (($row->payment_currency == 'CZK') ? 'selected' : ''); ?>>Kc &#8226; Czech Koruny</option>
2707
- <option value="ILS" <?php echo (($row->payment_currency == 'ILS') ? 'selected' : ''); ?>>&#8362; &#8226; Israeli Sheqel</option>
2708
- <option value="BRL" <?php echo (($row->payment_currency == 'BRL') ? 'selected' : ''); ?>>R$ &#8226; Brazilian Real</option>
2709
- <option value="TWD" <?php echo (($row->payment_currency == 'TWD') ? 'selected' : ''); ?>>NT$ &#8226; Taiwan New Dollars</option>
2710
- <option value="MYR" <?php echo (($row->payment_currency == 'MYR') ? 'selected' : ''); ?>>RM &#8226; Malaysian Ringgit</option>
2711
- <option value="PHP" <?php echo (($row->payment_currency == 'PHP') ? 'selected' : ''); ?>>&#8369; &#8226; Philippine Peso</option>
2712
- <option value="THB" <?php echo (($row->payment_currency == 'THB') ? 'selected' : ''); ?>>&#xe3f; &#8226; Thai Bahtv</option>
2713
- </select>
2714
- </td>
2715
- </tr>
2716
- <tr valign="top">
2717
- <td class="fm_options_label">
2718
- <label for="tax">Tax</label>
2719
- </td>
2720
- <td class="fm_options_value">
2721
- <input type="text" name="tax" id="tax" value="<?php echo $row->tax; ?>" class="text_area" style="width: 40px;" onKeyPress="return check_isnum_point(event)"> %
2722
- </td>
2723
- </tr>
2724
- </table>
2725
- </fieldset>
2726
- <fieldset id="javascript_fieldset" class="adminform fm_fieldset_deactive">
2727
- <legend style="color:#0B55C4;font-weight: bold;">JavaScript</legend>
2728
- <table class="admintable">
2729
- <tr valign="top">
2730
- <td class="fm_options_label">
2731
- <label for="javascript">Javascript</label>
2732
- </td>
2733
- <td class="fm_options_value">
2734
- <textarea style="margin: 0px;" cols="60" rows="30" name="javascript" id="javascript"><?php echo $row->javascript; ?></textarea>
2735
- </td>
2736
- </tr>
2737
- </table>
2738
- </fieldset>
2739
- <input type="hidden" name="fieldset_id" id="fieldset_id" value="<?php echo WDW_FM_Library::get('fieldset_id', 'general'); ?>" />
2740
- <input type="hidden" id="task" name="task" value=""/>
2741
- <input type="hidden" id="current_id" name="current_id" value="<?php echo $row->id; ?>" />
2742
- </form>
2743
- <script>
2744
- jQuery(window).load(function () {
2745
- form_maker_options_tabs(jQuery("#fieldset_id").val());
2746
- fm_popup();
2747
- });
2748
- </script>
2749
- <?php
2750
- }
2751
-
2752
  public function form_options($id) {
2753
-
2754
 
2755
  $row = $this->model->get_row_data($id);
2756
  $themes = $this->model->get_theme_rows_data();
@@ -2771,42 +1462,26 @@ class FMViewManage_fm {
2771
  }
2772
  $fields = explode('*:*id*:*type_submitter_mail*:*type*:*', $row->form_fields);
2773
  $fields_count = count($fields);
 
 
 
 
 
 
 
2774
  ?>
2775
  <script>
2776
- function fm_change_radio_checkbox_text(elem) {
2777
- var labels_array = [];
2778
- labels_array['paypal_mode'] = ['Off', 'On'];
2779
- labels_array['checkout_mode'] = ['Testmode', 'Production'];
2780
- labels_array['mail_mode'] = ['Text', 'HTML'];
2781
- labels_array['mail_mode_user'] = ['Text', 'HTML'];
2782
- labels_array['value'] = ['1', '0'];
2783
-
2784
- jQuery(elem).val(labels_array['value'][jQuery(elem).val()]);
2785
- jQuery(elem).next().val(jQuery(elem).val());
2786
-
2787
- var clicked_element = labels_array[jQuery(elem).attr('name')];
2788
- jQuery(elem).find('label').html(clicked_element[jQuery(elem).val()]);
2789
- if(jQuery( elem ).hasClass( "fm-text-yes" )) {
2790
- jQuery( elem ).removeClass('fm-text-yes').addClass('fm-text-no');
2791
- jQuery(elem).find("span").animate({
2792
- right: parseInt(jQuery( elem ).css( "width")) - 14 + 'px'
2793
- }, 400, function() {
2794
- });
2795
- }
2796
- else {
2797
- jQuery( elem ).removeClass('fm-text-no').addClass('fm-text-yes');
2798
- jQuery(elem).find("span").animate({
2799
- right: 0
2800
- }, 400, function() {
2801
- });
2802
- }
2803
- }
2804
-
2805
  gen = "<?php echo $row->counter; ?>";
2806
  form_view_max = 20;
2807
  function set_preview() {
2808
- jQuery("#preview_form").attr("onclick", "tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerPreview', 'form_id' => $row->id), admin_url('admin-ajax.php')); ?>&test_theme=" + jQuery('#theme').val() + "&width=1000&height=500&TB_iframe=1'); return false;");
2809
- jQuery("#edit_css").attr("onclick", "tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerEditCSS', 'form_id' => $row->id), admin_url('admin-ajax.php')); ?>&id=" + jQuery('#theme').val() + "&width=800&height=500&TB_iframe=1'); return false;");
 
 
 
 
 
 
2810
  }
2811
 
2812
  function set_condition() {
@@ -2866,23 +1541,22 @@ class FMViewManage_fm {
2866
  background: white;
2867
  }
2868
  </style>
2869
- <div class="fm-clear"></div>
2870
- <form class="wrap" method="post" action="admin.php?page=manage_fm" style="width:99%;" name="adminForm" id="adminForm">
2871
  <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
2872
  <div class="fm-page-header">
2873
  <div class="fm-page-title" style="width: inherit;">
2874
  <?php echo $page_title; ?>
2875
  </div>
2876
  <div class="fm-page-actions">
2877
- <button class="fm-button save-button small" onclick="if (fm_check_email('mailToAdd') ||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')) {return false;}; set_condition(); wd_fm_apply_options('save_options');">
2878
  <span></span>
2879
  Save
2880
  </button>
2881
- <button class="fm-button apply-button small" onclick="if (fm_check_email('mailToAdd') || 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')) {return false;}; set_condition(); wd_fm_apply_options('apply_options');">
2882
  <span></span>
2883
  Apply
2884
  </button>
2885
- <button class="fm-button cancel-button small" onclick="fm_set_input_value('task', 'cancel_options');">
2886
  <span></span>
2887
  Cancel
2888
  </button>
@@ -2914,13 +1588,23 @@ class FMViewManage_fm {
2914
  <li>
2915
  <a id="mapping" class="fm_fieldset_tab" onclick="form_maker_options_tabs('mapping')" href="#" >MySQL Mapping</a>
2916
  </li>
2917
-
 
 
 
 
 
 
 
 
 
 
2918
  </ul>
2919
  </div>
2920
  </div>
2921
  <fieldset id="general_fieldset" class="adminform fm_fieldset_deactive">
2922
  <legend>General Options</legend>
2923
- <table class="admintable" >
2924
  <tr valign="top">
2925
  <td class="fm_options_label">
2926
  <label>Published</label>
@@ -2948,23 +1632,35 @@ class FMViewManage_fm {
2948
  <label for="theme">Theme</label>
2949
  </td>
2950
  <td class="fm_options_value">
2951
- <select id="theme" name="theme" onChange="set_preview()">
2952
- <?php
2953
- foreach ($themes as $theme) {
2954
- ?>
2955
- <option value="<?php echo $theme->id; ?>" <?php echo (($theme->id == $row->theme) ? 'selected' : ''); ?>><?php echo $theme->title; ?></option>
2956
- <?php
2957
- }
2958
- ?>
2959
- </select>
2960
- <button id="preview_form" class="fm-button preview-button medium" onclick="tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerPreview', 'form_id' => $row->id, 'test_theme' => $row->theme, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>'); return false;">
 
 
 
 
 
 
 
 
 
 
 
2961
  <span></span>
2962
  Preview
2963
  </button>
2964
- <button id="edit_css" class="fm-button options-edit-button medium" onclick="tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerEditCSS', 'id' => $row->theme, 'form_id' => $row->id, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>'); return false;">
2965
  <span></span>
2966
- Edit CSS
2967
  </button>
 
2968
  </td>
2969
  </tr>
2970
  <tr valign="top">
@@ -2987,8 +1683,8 @@ class FMViewManage_fm {
2987
  </td>
2988
  </tr>
2989
  </table>
2990
- <br/>
2991
- <div class="error_fm" style="padding: 5px; font-size: 14px;">Front end submissions are disabled in free version.</div>
2992
  <fieldset class="adminform">
2993
  <legend>Front end submissions access level</legend>
2994
  <table>
@@ -3114,6 +1810,7 @@ class FMViewManage_fm {
3114
  jQuery(document).on('change','input[name="all_stats_fields"]',function() {
3115
  jQuery('.stats_filed_label').prop("checked" , this.checked);
3116
  });
 
3117
  });
3118
  </script>
3119
  <style>
@@ -3241,11 +1938,11 @@ class FMViewManage_fm {
3241
  for ($i = 0; $i < $fields_count - 1; $i++) {
3242
  ?>
3243
  <div>
3244
- <input type="radio" name="from_mail" id="from_mail<?php echo $i; ?>" value="<?php echo (!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]); ?>" <?php echo ((!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]) == $row->from_mail ? 'checked="checked"' : '' ); ?> onclick="wdhide('mail_from_other')" />
3245
  <label for="from_mail<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
3246
  </div>
3247
  <?php
3248
- if(!is_numeric($fields[$i]) ) {
3249
  if (substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*') + 15, strlen($fields[$i])) == $row->from_mail) {
3250
  $is_other = FALSE;
3251
  }
@@ -3305,11 +2002,11 @@ class FMViewManage_fm {
3305
  for ($i = 0; $i < $fields_count - 1; $i++) {
3306
  ?>
3307
  <div>
3308
- <input type="radio" name="reply_to" id="reply_to<?php echo $i; ?>" value="<?php echo (!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]); ?>" <?php echo ((!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]) == $row->reply_to ? 'checked="checked"' : '' ); ?> onclick="wdhide('reply_to_other')" />
3309
  <label for="reply_to<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
3310
  </div>
3311
  <?php
3312
- if(!is_numeric($fields[$i]) ) {
3313
  if (substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*') + 15, strlen($fields[$i])) == $row->reply_to) {
3314
  $is_other = FALSE;
3315
  }
@@ -3394,7 +2091,7 @@ class FMViewManage_fm {
3394
  <label> Attach File: </label>
3395
  </td>
3396
  <td class="fm_options_value">
3397
- <div class="error_fm" style="padding: 5px; font-size: 14px;">File attach is disabled in free version.</div>
3398
  <input type="hidden" name="mail_attachment" value="<?php echo $row->mail_attachment; ?>"/>
3399
  </td>
3400
  </tr>
@@ -3471,6 +2168,7 @@ class FMViewManage_fm {
3471
  </td>
3472
  <td class="fm_options_value">
3473
  <?php
 
3474
  $fields = explode('*:*id*:*type_submitter_mail*:*type*:*', $row->form_fields);
3475
  $fields_count = count($fields);
3476
  if ($fields_count == 1) { ?>
@@ -3481,7 +2179,7 @@ class FMViewManage_fm {
3481
  for ($i = 0; $i < $fields_count - 1; $i++) {
3482
  ?>
3483
  <div>
3484
- <input type="checkbox" name="send_to<?php echo $i; ?>" id="send_to<?php echo $i; ?>" value="<?php echo (!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]); ?>" <?php echo (is_numeric(strpos($row->send_to, '*'.(!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]).'*')) ? 'checked="checked"' : '' ); ?> style="margin: 0px 5px 0px 0px;" />
3485
  <label for="send_to<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
3486
  </div>
3487
  <?php
@@ -3592,7 +2290,7 @@ class FMViewManage_fm {
3592
  <label> Mode: </label>
3593
  </td>
3594
  <td class="fm_options_value">
3595
- <button name="mail_mode_user" class="fm-checkbox-radio-button <?php echo $row->mail_mode_user == 1 ? 'fm-text-yes' : 'fm-text-no' ?> medium" onclick="fm_change_radio_checkbox_text(this); return false;" value="<?php echo $row->mail_mode_user == 1 ? '1' : '0' ?>">
3596
  <label><?php echo $row->mail_mode_user == 1 ? 'HTML' : 'Text' ?></label>
3597
  <span></span>
3598
  </button>
@@ -3604,7 +2302,7 @@ class FMViewManage_fm {
3604
  <label> Attach File: </label>
3605
  </td>
3606
  <td class="fm_options_value">
3607
- <div class="error_fm" style="padding: 5px; font-size: 14px;">File attach is disabled in free version.</div>
3608
  <input type="hidden" name="mail_attachment_user" value="<?php echo $row->mail_attachment_user; ?>"/>
3609
  </td>
3610
  </tr>
@@ -3812,22 +2510,22 @@ class FMViewManage_fm {
3812
  </fieldset>
3813
  <fieldset id="payment_fieldset" class="adminform fm_fieldset_deactive">
3814
  <legend>Payment Options</legend>
3815
- <table class="admintable">
3816
- <tr>
3817
- <td colspan="2">
3818
- <div class="error_fm" style="padding: 5px; font-size: 14px;">Paypal Options are disabled in free version.</div>
3819
- </td>
3820
- </tr>
3821
  <tr valign="top">
3822
- <td class="fm_options_label">
3823
- <label>Payment Method</label>
3824
- </td>
3825
- <td class="fm_options_value">
3826
- <div><input type="radio" name="paypal_mode" id="paypal_mode0" value="none" checked="checked" onchange="fm_change_payment_method('none');" disabled="disabled" /><label for="paypal_mode0">None</label></div>
3827
  <div><input type="radio" name="paypal_mode" id="paypal_mode1" value="paypal" onchange="fm_change_payment_method('paypal');" disabled="disabled" /><label for="paypal_mode1">Paypal</label></div>
3828
- </td>
3829
- </tr>
3830
- </table>
3831
  </fieldset>
3832
  <fieldset id="javascript_fieldset" class="adminform fm_fieldset_deactive">
3833
  <legend>JavaScript</legend>
@@ -3851,12 +2549,14 @@ class FMViewManage_fm {
3851
  $all_ids = array();
3852
  $all_labels = array();
3853
 
3854
- $select_and_input = array("type_text", "type_password", "type_textarea", "type_name", "type_number", "type_phone", "type_phone_new", "type_submitter_mail", "type_address", "type_spinner", "type_checkbox", "type_radio", "type_own_select", "type_paypal_price", "type_paypal_select", "type_paypal_checkbox", "type_paypal_radio", "type_paypal_shipping", "type_date_new");
3855
 
3856
  $select_type_fields = array("type_address", "type_checkbox", "type_radio", "type_own_select", "type_paypal_select", "type_paypal_checkbox", "type_paypal_radio", "type_paypal_shipping");
3857
 
 
3858
  $fields=explode('*:*new_field*:*',$row->form_fields);
3859
- $fields = array_slice($fields,0, count($fields)-1);
 
3860
  foreach($fields as $field) {
3861
  $temp=explode('*:*id*:*',$field);
3862
  array_push($ids, $temp[0]);
@@ -3896,7 +2596,8 @@ class FMViewManage_fm {
3896
  $field_label = array();
3897
  $all_any = array();
3898
  $condition_params = array();
3899
-
 
3900
  $count_of_conditions=0;
3901
  if($row->condition!="") {
3902
  $conditions=explode('*:*new_condition*:*',$row->condition);
@@ -4024,49 +2725,50 @@ class FMViewManage_fm {
4024
  break;
4025
  }
4026
 
4027
- $w_choices = explode('*:*w_choices*:*',$w_size[1]);
4028
- $w_choices_array = explode('***',$w_choices[0]);
4029
-
4030
- if($types[$key_select_or_input] == 'type_radio' || $types[$key_select_or_input] == 'type_checkbox' || $types[$key_select_or_input] == 'type_own_select')
4031
- {
4032
-
4033
- if(strpos($w_choices[1], 'w_value_disabled') > -1)
4034
  {
4035
- $w_value_disabled= explode('*:*w_value_disabled*:*',$w_choices[1]);
4036
- $w_choices_value = explode('*:*w_choices_value*:*',$w_value_disabled[1]);
4037
- $w_choices_value = $w_choices_value[0];
 
 
 
 
 
 
 
 
 
4038
  }
4039
-
4040
- if(isset($w_choices_value))
4041
- $w_choices_value_array = explode('***',$w_choices_value);
4042
- else
4043
- $w_choices_value_array = $w_choices_array;
4044
- }
4045
- else
4046
- {
4047
- $w_choices_price= explode('*:*w_choices_price*:*',$w_choices[1]);
4048
- $w_choices_value = $w_choices_price[0];
4049
- $w_choices_value_array = explode('***', $w_choices_value);
4050
- }
4051
-
4052
- for($m=0; $m<count($w_choices_array); $m++)
4053
- {
4054
- if($types[$key_select_or_input]=="type_paypal_checkbox" || $types[$key_select_or_input]=="type_paypal_radio" || $types[$key_select_or_input]=="type_paypal_shipping" || $types[$key_select_or_input]=="type_paypal_select")
4055
- $w_choice = $w_choices_array[$m].'*:*value*:*'.$w_choices_value_array[$m];
4056
  else
4057
- $w_choice = $w_choices_value_array[$m];
 
 
 
 
 
4058
 
4059
- if(in_array(esc_html($w_choice),$multiselect))
4060
  {
4061
- $selected = 'selected="selected"';
4062
- }
4063
- else
4064
- $selected ='';
 
 
 
 
 
 
 
4065
 
4066
- if(strpos($w_choices_array[$m], '[') === false && strpos($w_choices_array[$m], ']') === false ) {
4067
- echo '<option id="choise_'.$k.'_'.$m.'" value="'.$w_choice.'" '.$selected.'>'.$w_choices_array[$m].'</option>';
4068
- }
4069
- }
4070
 
4071
  if($types[$key_select_or_input]=="type_address")
4072
  {
@@ -4091,7 +2793,7 @@ class FMViewManage_fm {
4091
  if($key_select_or_input != '' && ($types[$key_select_or_input]=="type_number" || $types[$key_select_or_input]=="type_phone"))
4092
  $onkeypress_function = "onkeypress='return check_isnum_space(event)'";
4093
  else
4094
- if($key_select_or_input != '' && $types[$key_select_or_input]=="type_paypal_price")
4095
  $onkeypress_function = "onkeypress='return check_isnum_point(event)'";
4096
  else
4097
  $onkeypress_function = "";
@@ -4117,7 +2819,7 @@ class FMViewManage_fm {
4117
  <span></span>
4118
  Add Query
4119
  </button>
4120
- <button class="fm-button delete-button small" onclick="if (fm_check_email('mailToAdd') || fm_check_email('from_mail') || fm_check_email('reply_to') || fm_check_email('mail_from_other') || fm_check_email('reply_to_other') || fm_check_email('paypal_email')) {return false;}; set_condition(); wd_fm_apply_options('remove_query'); return false;">
4121
  <span></span>
4122
  Delete
4123
  </button>
@@ -4162,7 +2864,15 @@ class FMViewManage_fm {
4162
  }
4163
  ?>
4164
  </fieldset>
4165
-
 
 
 
 
 
 
 
 
4166
  </div>
4167
  <input type="hidden" name="boxchecked" value="0">
4168
  <input type="hidden" name="fieldset_id" id="fieldset_id" value="<?php echo WDW_FM_Library::get('fieldset_id', 'general'); ?>" />
@@ -4209,6 +2919,7 @@ class FMViewManage_fm {
4209
  set_condition();
4210
  fm_set_input_value('task', task);
4211
  document.getElementById('adminForm').submit();
 
4212
  }
4213
  </script>
4214
  <?php
@@ -4284,15 +2995,15 @@ class FMViewManage_fm {
4284
  <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
4285
  <div class="fm-layout-actions">
4286
  <div class="fm-page-actions">
4287
- <button class="fm-button save-button small" onclick="submitbutton(); fm_set_input_value('task', 'save_layout');">
4288
  Save
4289
  <span></span>
4290
  </button>
4291
- <button class="fm-button apply-button small" onclick="submitbutton(); fm_set_input_value('task', 'apply_layout');">
4292
  Apply
4293
  <span></span>
4294
  </button>
4295
- <button class="fm-button cancel-button small" onclick="fm_set_input_value('task', 'cancel_options');">
4296
  Cancel
4297
  <span></span>
4298
  </button>
@@ -4352,13 +3063,426 @@ class FMViewManage_fm {
4352
  <?php
4353
  }
4354
 
4355
- ////////////////////////////////////////////////////////////////////////////////////////
4356
- // Getters & Setters //
4357
- ////////////////////////////////////////////////////////////////////////////////////////
4358
- ////////////////////////////////////////////////////////////////////////////////////////
4359
- // Private Methods //
4360
- ////////////////////////////////////////////////////////////////////////////////////////
4361
- ////////////////////////////////////////////////////////////////////////////////////////
4362
- // Listeners //
4363
- ////////////////////////////////////////////////////////////////////////////////////////
4364
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
 
3
  class FMViewManage_fm {
4
+
 
 
 
 
 
 
 
 
5
  private $model;
6
 
 
 
 
7
  public function __construct($model) {
8
  $this->model = $model;
9
  }
10
 
 
 
 
11
  public function display() {
12
  $rows_data = $this->model->get_rows_data();
13
  $page_nav = $this->model->page_nav();
19
  $order_class = 'manage-column column-title sorted ' . $asc_or_desc;
20
  $ids_string = '';
21
  ?>
 
22
  <form onkeypress="fm_doNothing(event)" class="wrap" id="manage_form" method="post" action="admin.php?page=manage_fm">
23
  <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
24
  <div class="fm-page-banner">
29
  <span></span>
30
  Add New
31
  </button>
32
+ <div class="fm-page-actions">
33
+ <button class="fm-button delete-button medium" onclick="if (confirm('Do you want to delete selected items?')) { fm_set_input_value('task', 'delete_all'); fm_form_submit(event, 'manage_form'); } else { return false; }">
34
+ <span></span>
35
+ Delete
36
+ </button>
37
+ </div>
38
  </div>
39
  <div class="tablenav top">
40
  <?php
53
  <a onclick="fm_set_input_value('task', ''); fm_set_input_value('order_by', 'title'); fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'title' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>'); fm_form_submit(event, 'manage_form')" href="">
54
  <span>Title</span><span class="sorting-indicator"></span></a>
55
  </th>
56
+ <th class="<?php if ($order_by == 'type') { echo $order_class; } ?>">
57
+ <a onclick="fm_set_input_value('task', ''); fm_set_input_value('order_by', 'type'); fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'type' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>'); fm_form_submit(event, 'manage_form')" href="">
58
+ <span>Type</span><span class="sorting-indicator"></span></a>
59
+ </th>
60
  <th class="<?php if ($order_by == 'mail') { echo $order_class; } ?>">
61
  <a onclick="fm_set_input_value('task', ''); fm_set_input_value('order_by', 'mail'); fm_set_input_value('asc_or_desc', '<?php echo (($order_by == 'mail' && $asc_or_desc == 'asc') ? 'desc' : 'asc'); ?>'); fm_form_submit(event, 'manage_form')" href="">
62
  <span>Email to send submissions to</span><span class="sorting-indicator"></span></a>
63
  </th>
64
+ <th class="table_large_col">Shortcode</th>
65
  <th class="table_large_col">PHP function</th>
66
  <th class="table_small_col">Edit</th>
67
+ <th class="table_small_col">Delete</th>
 
 
68
  </thead>
69
  <tbody id="tbody_arr">
70
  <?php
71
  if ($rows_data) {
72
  foreach ($rows_data as $row_data) {
73
  $alternate = (!isset($alternate) || $alternate == '') ? 'class="alternate"' : '';
74
+ $old = isset($row_data->form) && ($row_data->form != '');
 
 
 
75
  ?>
76
  <tr id="tr_<?php echo $row_data->id; ?>" <?php echo $alternate; ?>>
77
  <td class="table_small_col check-column">
79
  </td>
80
  <td class="table_small_col"><?php echo $row_data->id; ?></td>
81
  <td>
82
+ <?php
83
+ if (!$old) {
84
+ ?>
85
+ <a onclick="fm_set_input_value('task', 'edit'); fm_set_input_value('current_id', '<?php echo $row_data->id; ?>'); fm_form_submit(event, 'manage_form')" href="" title="Edit"><?php echo $row_data->title; ?></a>
86
+ <?php
87
+ }
88
+ else {
89
+ echo $row_data->title;
90
+ }
91
+ ?>
92
+ </td>
93
+ <td>
94
+ <?php echo $row_data->type; ?>
95
  </td>
96
  <td><?php echo $row_data->mail; ?></td>
97
  <td class="table_big_col" style="padding-left: 0; padding-right: 0;">
98
+ <?php if($row_data->type == 'embedded'){ ?>
99
+ <input type="text" value='[Form id="<?php echo $row_data->id; ?>"]' onclick="fm_select_value(this)" size="12" readonly="readonly" style="padding-left: 1px; padding-right: 1px;"/>
100
+ <?php } else { ?>
101
+ <a href="<?php echo add_query_arg(array('current_id' => $row_data->id, 'nonce_fm' => wp_create_nonce('nonce_fm')), admin_url('admin.php?page=manage_fm&task=display_options')); ?>">Set Display Options</a>
102
+ <?php } ?>
103
  </td>
104
  <td class="table_large_col" style="padding-left: 0; padding-right: 0;">
105
+ <input type="text" value='&#60;?php wd_form_maker(<?php echo $row_data->id; ?>, "<?php echo $row_data->type; ?>"); ?&#62;' onclick="fm_select_value(this)" readonly="readonly" style="padding-left: 1px; padding-right: 1px;"/>
106
  </td>
107
  <td class="table_small_col">
108
+ <?php
109
+ if (!$old) {
110
+ ?>
111
+ <button class="fm-icon edit-icon" onclick="fm_set_input_value('task', 'edit'); fm_set_input_value('current_id', '<?php echo $row_data->id; ?>'); fm_form_submit(event, 'manage_form')">
112
  <span></span>
113
  </button>
114
+ <?php
115
+ }
116
+ ?>
117
  </td>
118
  <td class="table_small_col">
119
  <button class="fm-icon delete-icon" onclick="if (confirm('Do you want to delete selected item(s)?')) { fm_set_input_value('task', 'delete'); fm_set_input_value('current_id', '<?php echo $row_data->id; ?>'); fm_form_submit(event, 'manage_form'); } else { return false; }">
139
 
140
  public function edit($id) {
141
  ?>
142
+ <img src="<?php echo WD_FM_URL . '/images/icons.png'; ?>" style="display:none;"/>
143
  <?php
144
  $row = $this->model->get_row_data_new($id);
145
  $themes = $this->model->get_theme_rows_data();
146
+ global $wpdb;
147
+ $default_theme = $wpdb->get_var('SELECT id FROM ' . $wpdb->prefix . 'formmaker_themes where `default`=1');
148
  $labels = array();
149
  $label_id = array();
150
  $label_order_original = array();
162
  $labels['label'] = '"' . implode('","', $label_order_original) . '"';
163
  $labels['type'] = '"' . implode('","', $label_type) . '"';
164
  $page_title = (($id != 0) ? 'Edit form ' . $row->title : 'Create new form');
165
+ $is_addon_stripe_active = (defined('WD_FM_STRIPE') && is_plugin_active(constant('WD_FM_STRIPE')));
166
+ if ($is_addon_stripe_active) {
167
+ require_once (WD_FM_STRIPE_DIR . '/controller.php');
168
+ }
169
  ?>
170
  <script type="text/javascript">
171
  var plugin_url = "<?php echo WD_FM_URL; ?>";
172
  </script>
173
+ <script src="<?php echo WD_FM_URL . '/js/formmaker_div.js'; ?>?ver=<?php echo get_option("wd_form_maker_version"); ?>" type="text/javascript"></script>
174
  <script type="text/javascript">
175
+ is_addon_calculator_active = <?php echo (defined('WD_FM_CALCULATOR') && is_plugin_active(constant('WD_FM_CALCULATOR'))) ? 1 : 0; ?>;
176
+ is_addon_stripe_active = <?php echo $is_addon_stripe_active ? 1 : 0; ?>;
177
+ is_stripe_enabled = <?php echo ($is_addon_stripe_active && (int) WD_FM_STRIPE_controller::stripe_enable($row->id) ? 1 : 0); ?>;
178
  form_view = 1;
179
  form_view_count = 1;
180
  form_view_max = 1;
368
  else {
369
  jQuery('#formMakerDiv').slideToggle(400);
370
  }
371
+
372
  if (document.getElementById('formMakerDiv1').style.display == 'block') {
373
  jQuery('#formMakerDiv1').slideToggle(200);
374
  }
389
  else {
390
  jQuery('#formMakerDiv').slideToggle(400);
391
  }
392
+
393
  if (document.getElementById('formMakerDiv1').style.display == 'block') {
394
  jQuery('#formMakerDiv1').slideToggle(200);
395
  }
405
  }
406
  }
407
  </script>
 
408
  <form class="wrap" id="manage_form" method="post" action="admin.php?page=manage_fm">
409
  <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
410
  <h2 class="fm-h2-message"></h2>
420
  <?php
421
  if(isset($row->backup_id) )
422
  if($row->backup_id!="") {
 
423
  $query = "SELECT backup_id FROM " . $wpdb->prefix . "formmaker_backup WHERE backup_id > ".$row->backup_id." AND id = ".$row->id." ORDER BY backup_id ASC LIMIT 0 , 1 ";
424
  $backup_id = $wpdb->get_var($query);
425
  if($backup_id) { ?>
426
+ <button class="fm-button redo-button medium" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; jQuery('#saving_text').html('Redo');fm_set_input_value('task', 'redo');">
427
  <span></span>
428
  Redo
429
  </button>
433
  $backup_id = $wpdb->get_var($query);
434
 
435
  if($backup_id) { ?>
436
+ <button class="fm-button undo-button medium" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; jQuery('#saving_text').html('Undo');fm_set_input_value('task', 'undo');">
437
  <span></span>
438
  Undo
439
  </button>
441
  }
442
  }
443
  ?>
444
+
445
  <?php if ($id) { ?>
446
  <button class="fm-button save-as-copy-button medium" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'save_as_copy');">
447
  <span></span>
448
  Save as Copy
449
  </button>
450
  <?php } ?>
451
+ <button class="fm-button save-button medium" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'save');">
452
  <span></span>
453
  Save
454
  </button>
455
+ <button class="fm-button apply-button medium" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'apply');">
456
  <span></span>
457
  Apply
458
  </button>
459
+ <button class="fm-button cancel-button medium" onclick="fm_set_input_value('task', 'cancel');">
460
  <span></span>
461
  Cancel
462
  </button>
470
  <input id="title" name="title" value="<?php echo $row->title; ?>"/>
471
  </div>
472
  <div class="fm-page-actions">
473
+ <button class="fm-button display-options-button large" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'view_display_options');">
474
+ <span></span>
475
+ Display Options
476
+ </button>
477
+ <button class="fm-button form-options-button medium" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'view_options');">
478
  <span></span>
479
  Form Options
480
+ </button>
481
+ <!--<button class="fm-button form-layout-button large" onclick="if (fm_check_required('title', 'Form title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'form_layout');">
482
  <span></span>
483
+ Advanced Layout
484
+ </button>-->
485
+ </div>
486
  </div>
487
  <div class="fm-clear"></div>
488
  <div class="fm-theme-banner">
489
  <div class="fm-theme" style="float:left;">
490
  <span style="">Theme:&nbsp;</span>
491
  <select id="theme" name="theme" onChange="set_preview()">
492
+ <optgroup label="New Themes">
493
+ <option value="0" <?php echo $row->theme && $row->theme == 0 ? 'selected' : '' ?> data-version="2">Inherit From Website Theme</option>
494
+ <?php
495
+ $optiongroup = true;
496
+ foreach ($themes as $theme) {
497
+ if ($optiongroup && $theme->version == 1) {
498
+ $optiongroup = false;
499
+ ?>
500
+ </optgroup>
501
+ <optgroup label="Outdated Themes">
502
+ <?php
503
+ }
504
+ ?>
505
+ <option value="<?php echo $theme->id; ?>" <?php echo (($theme->id == $row->theme) ? 'selected' : ''); ?> data-version="<?php echo $theme->version; ?>"><?php echo $theme->title; ?></option>
506
+ <?php
507
+ }
508
+ ?>
509
+ </optgroup>
510
  </select>
511
+ <button id="preview_form" class="fm-button preview-button medium"<?php if (!$id) echo ' disabled="disabled"' ?> onclick="tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerPreview', 'form_id' => $row->id, 'test_theme' => $row->theme, 'form_preview' => 1, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>'); return false;">
512
  <span></span>
513
  Preview
514
  </button>
515
+ <button id="edit_css" class="fm-button options-edit-button medium" onclick="window.open('<?php echo add_query_arg(array('current_id' => ($row->theme ? $row->theme : $default_theme), 'nonce_fm' => wp_create_nonce('nonce_fm')), admin_url('admin.php?page=themes_fm&task=edit')); ?>'); return false;">
516
+ <span></span>
517
+ Edit
518
+ </button>
519
+ <div id="old_theme_notice" class="wd_error" style="display: none;">The theme you have selected is outdated. Please choose one from New Themes section.</div>
520
  </div>
521
  <div style="float:right;">
522
  <button class="fm-button add-new-button large" onclick="enable(); Enable(); return false;">
527
  </div>
528
  <div class="fm-clear"></div>
529
  <div id="formMakerDiv" onclick="close_window()"></div>
530
+ <div id="formMakerDiv1">
531
+ <table class="formMakerDiv1_table" border="0" width="100%" cellpadding="0" cellspacing="0" height="100%">
532
+ <tr>
533
+ <td style="padding:0px">
534
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" >
535
+ <tr valign="top">
536
+ <td width="20%" height="100%" id="field_types">
537
+ <div id="when_edit" style="display: none;"></div>
538
+ <table border="0" cellpadding="0" cellspacing="3" width="100%" style="border-collapse: separate; border-spacing: 3px;">
539
+ <tbody>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
540
  <tr>
541
+ <td align="center" onclick="addRow('customHTML')" class="field_buttons" id="table_editor">
542
+ <img src="<?php echo WD_FM_URL; ?>/images/customHTML.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_customHTML">
543
+ <div>Custom HTML</div>
544
+ </td>
545
+ <td align="center" onclick="addRow('text')" class="field_buttons" id="table_text">
546
+ <img src="<?php echo WD_FM_URL; ?>/images/text.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_text">
547
+ <div>Text input</div>
548
+ </td>
549
+ </tr>
550
+ <tr>
551
+ <td align="center" onclick="addRow('checkbox')" class="field_buttons" id="table_checkbox">
552
+ <img src="<?php echo WD_FM_URL; ?>/images/checkbox.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_checkbox">
553
+ <div>Multiple Choice</div>
554
+ </td>
555
+ <td align="center" onclick="addRow('radio')" class="field_buttons" id="table_radio">
556
+ <img src="<?php echo WD_FM_URL; ?>/images/radio.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_radio">
557
+ <div>Single Choice</div>
 
558
  </td>
559
  </tr>
560
+ <tr>
561
+ <td align="center" onclick="addRow('survey')" class="field_buttons" id="table_survey">
562
+ <img src="<?php echo WD_FM_URL; ?>/images/survey.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_survey">
563
+ <div>Survey Tools</div>
564
+ </td>
565
+ <td align="center" onclick="addRow('time_and_date')" class="field_buttons" id="table_time_and_date">
566
+ <img src="<?php echo WD_FM_URL; ?>/images/time_and_date.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_time_and_date">
567
+ <div>Time and Date</div>
568
+ </td>
569
+ </tr>
570
+ <tr>
571
+ <td align="center" onclick="addRow('select')" class="field_buttons" id="table_select">
572
+ <img src="<?php echo WD_FM_URL; ?>/images/select.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_select">
573
+ <div>Select Box</div>
574
+ </td>
575
+ <td align="center" onclick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')" class="field_buttons field_disabled" id="table_file_upload">
576
+ <img src="<?php echo WD_FM_URL; ?>/images/file_upload.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_file_upload">
577
+ <div>File Upload</div>
578
+ </td>
579
  </tr>
580
+ <tr>
581
+ <td align="center" onclick="addRow('section_break')" class="field_buttons" id="table_section_break">
582
+ <img src="<?php echo WD_FM_URL; ?>/images/section_break.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_section_break">
583
+ <div>Section Break</div>
584
+ </td>
585
+ <td align="center" onclick="addRow('page_break')" class="field_buttons" id="table_page_break">
586
+ <img src="<?php echo WD_FM_URL; ?>/images/page_break.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_page_break">
587
+ <div>Page Break</div>
588
+ </td>
589
+ </tr>
590
+ <tr>
591
+ <td align="center" onclick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')" class="field_buttons field_disabled" id="table_map">
592
+ <img src="<?php echo WD_FM_URL; ?>/images/map.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_map">
593
+ <div>Map</div>
594
+ </td>
595
+ <td align="center" onclick="alert('This field type is disabled in free version. If you need this functionality, you need to buy the commercial version.')" id="table_paypal" class="field_buttons field_disabled">
596
+ <img src="<?php echo WD_FM_URL; ?>/images/paypal.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_paypal">
597
+ <div>Payment</div>
598
+ </td>
599
+ </tr>
600
+ <tr>
601
+ <td align="center" onclick="addRow('captcha')" class="field_buttons" id="table_captcha">
602
+ <img src="<?php echo WD_FM_URL; ?>/images/captcha.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_captcha">
603
+ <div>Captcha</div>
604
+ </td>
605
+ <td align="center" onclick="addRow('button')" id="table_button" class="field_buttons">
606
+ <img src="<?php echo WD_FM_URL; ?>/images/button.png?ver=<?php echo get_option("wd_form_maker_version"); ?>" style="margin:5px" id="img_button">
607
+ <div>Button</div>
608
+ </td>
609
+ </tr>
610
+ </tbody>
611
+ </table>
612
+ </td>
613
+ <td width="40%" height="100%" align="left">
614
+ <div id="edit_table"></div>
615
+ </td>
616
+ <td align="center" valign="top" style="background: url("<?php echo WD_FM_URL . '/images/border2.png'; ?>") repeat-y;">&nbsp;</td>
617
+ <td style="padding:15px;">
618
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" height="100%" >
619
+ <tr>
620
+ <td align="right">
621
+ <input type="radio" value="end" name="el_pos" checked="checked" id="pos_end" onclick="Disable()"/>
622
+ At The End
623
+ <input type="radio" value="begin" name="el_pos" id="pos_begin" onclick="Disable()"/>
624
+ At The Beginning
625
+ <input type="radio" value="before" name="el_pos" id="pos_before" onclick="Enable()"/>
626
+ Before
627
+ <select style="width: 100px; margin-left: 5px;" id="sel_el_pos" onclick="change_before()" disabled="disabled"></select>
628
+ <br>
629
+ <button class="fm-button field-save-button medium" onclick="add(0, false); return false;">
630
+ Save
631
+ <span></span>
632
+ </button>
633
+ <button class="fm-button cancel-button medium" onclick="close_window(); return false;">
634
+ Cancel
635
+ <span></span>
636
+ </button>
637
+ <hr style="margin-bottom:10px" />
638
+ </td>
639
+ </tr>
640
+ <tr height="100%" valign="top">
641
+ <td id="show_table"></td>
642
+ </tr>
643
+ </table>
644
+ </td>
645
+ </tr>
646
+ </table>
647
+ </td>
648
+ </tr>
649
+ </table>
650
+ <input type="hidden" id="old" />
651
+ <input type="hidden" id="old_selected" />
652
+ <input type="hidden" id="element_type" />
653
+ <input type="hidden" id="editing_id" />
654
+ <input type="hidden" value="<?php echo WD_FM_URL; ?>" id="form_plugins_url" />
655
+ <div id="main_editor" style="position: fixed; display: none; z-index: 140;">
656
+ <?php if (user_can_richedit()) {
657
+ wp_editor('', 'form_maker_editor', array('teeny' => FALSE, 'textarea_name' => 'form_maker_editor', 'media_buttons' => FALSE, 'textarea_rows' => 5));
658
+ }
659
+ else { ?>
660
+ <textarea name="form_maker_editor" id="form_maker_editor" cols="40" rows="5" style="width: 440px; height: 350px;" class="mce_editable" aria-hidden="true"></textarea>
661
+ <?php
662
+ }
663
+ ?>
664
  </div>
665
+ </div>
666
+ <?php if (!function_exists('the_editor')) { ?>
667
+ <iframe id="tinymce" style="display: none;"></iframe>
668
+ <?php } ?>
669
+
670
+ <?php
671
+ $animation_effects = array(
672
+ 'none' => 'None',
673
+ 'bounce' => 'Bounce',
674
+ 'tada' => 'Tada',
675
+ 'bounceInDown' => 'BounceInDown',
676
+ 'fadeInLeft' => 'FadeInLeft',
677
+ 'flash' => 'Flash',
678
+ 'pulse' => 'Pulse',
679
+ 'rubberBand' => 'RubberBand',
680
+ 'shake' => 'Shake',
681
+ 'swing' => 'Swing',
682
+ 'wobble' => 'Wobble',
683
+ 'hinge' => 'Hinge',
684
+ 'lightSpeedIn' => 'LightSpeedIn',
685
+ 'rollIn' => 'RollIn',
686
+ 'bounceIn' => 'BounceIn',
687
+ 'bounceInLeft' => 'BounceInLeft',
688
+ 'bounceInRight' => 'BounceInRight',
689
+ 'bounceInUp' => 'BounceInUp',
690
+ 'fadeIn' => 'FadeIn',
691
+ 'fadeInDown' => 'FadeInDown',
692
+ 'fadeInDownBig' => 'FadeInDownBig',
693
+ 'fadeInLeftBig' => 'FadeInLeftBig',
694
+ 'fadeInRight' => 'FadeInRight',
695
+ 'fadeInRightBig' => 'FadeInRightBig',
696
+ 'fadeInUp' => 'FadeInUp',
697
+ 'fadeInUpBig' => 'FadeInUpBig',
698
+ 'flip' => 'Flip',
699
+ 'flipInX' => 'FlipInX',
700
+ 'flipInY' => 'FlipInY',
701
+ 'rotateIn' => 'RotateIn',
702
+ 'rotateInDownLeft' => 'RotateInDownLeft',
703
+ 'rotateInDownRight' => 'RotateInDownRight',
704
+ 'rotateInUpLeft' => 'RotateInUpLeft',
705
+ 'rotateInUpRight' => 'RotateInUpRight',
706
+ 'zoomIn' => 'ZoomIn',
707
+ 'zoomInDown' => 'ZoomInDown',
708
+ 'zoomInLeft' => 'ZoomInLeft',
709
+ 'zoomInRight' => 'ZoomInRight',
710
+ 'zoomInUp' => 'ZoomInUp',
711
+ );
712
+ ?>
713
+ <div class="fm-edit-content panel form-header">
714
+ <div class="panel-heading">
715
+ <span class="fm-header-bg"></span>
716
+ Header
717
+ <span class="fm-expcol pull-right" onclick="jQuery(this).toggleClass('fm-expanded'); jQuery('#fm-header-content').toggleClass('fm-hide');"></span>
718
+ </div>
719
+ <div id="fm-header-content" class="panel-content fm-hide">
720
+ <div class="col-md-6 col-xs-12">
721
+ <div class="fm-row">
722
+ <label>Title: </label>
723
+ <input type="text" id="header_title" name="header_title" value="<?php echo $row->header_title; ?>"/>
724
  </div>
725
+ <div class="fm-row">
726
+ <label>Description: </label>
727
+ <div id="description_editor" style="width:470px; display: inline-block; vertical-align: middle;">
728
+ <?php if (user_can_richedit()) {
729
+ wp_editor($row->header_description, 'header_description', array('teeny' => FALSE, 'textarea_name' => 'header_description', 'media_buttons' => FALSE, 'textarea_rows' => 5));
730
+ }
731
+ else { ?>
732
+ <textarea name="header_description" id="header_description" cols="40" rows="5" style="width: 440px; height: 350px;" class="mce_editable" aria-hidden="true"></textarea>
733
+ <?php
734
+ }
735
+ ?>
736
+ </div>
737
  </div>
738
  </div>
739
+ <div class="col-md-6 col-xs-12">
740
+ <div class="fm-row">
741
+ <label>Image: </label>
742
+ <input type="text" id="header_image_url" name="header_image_url" value="<?php echo $row->header_image_url; ?>"/>
743
+ <button class="fm-button add-button medium" onclick="fmOpenMediaUploader(event); return false;">Add Image</button>
744
+ <?php $header_bg = $row->header_image_url ? 'background-image: url('.$row->header_image_url.'); background-position: center;' : ''; ?>
745
+ <div id="header_image" class="header_img<?php if (!$row->header_image_url) echo ' fm-hide'; ?>" style="<?php echo $header_bg; ?>">
746
+ <button type="button" id="remove_header_img" onclick="fmRemoveHeaderImage(event); return false;">
747
+ <i class="mce-ico mce-i-dashicon dashicons-no"></i>
748
+ </button>
749
+ </div>
750
+ </div>
751
+ <div class="fm-row">
752
+ <label>Image Animation: </label>
753
+ <select name="header_image_animation">
754
+ <?php
755
+ foreach($animation_effects as $anim_key => $animation_effect){
756
+ $selected = $row->header_image_animation == $anim_key ? 'selected="selected"' : '';
757
+ echo '<option value="'.$anim_key.'" '.$selected.'>'.$animation_effect.'</option>';
758
+ }
759
+ ?>
760
+ </select>
761
+ </div>
762
+ <div class="fm-row">
763
+ <label for="header_hide_image">Hide Image on Mobile: </label>
764
+ <input type="checkbox" id="header_hide_image" name="header_hide_image" value="1" <?php echo $row->header_hide_image == '1' ? 'checked="checked"' : '' ?> />
765
+ </div>
766
+ </div>
767
+ <div class="fm-clear"></div>
768
+ </div>
769
+ </div>
770
+
771
+ <div class="fm-edit-content">
772
+ <div class="fm-drag-and-drop">
773
+ <div>
774
+ <label for="enable_sortable">Enable Drag & Drop</label>
775
+ <button name="sortable" id="enable_sortable" class="fm-checkbox-radio-button <?php echo $row->sortable == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="enable_drag(this); return false;" value="<?php echo $row->sortable; ?>">
776
+ <span></span>
777
+ </button>
778
+ <input type="hidden" name="sortable" id="sortable_hidden" value="<?php echo $row->sortable; ?>"/>
779
+ </div>
780
+ <div>
781
+ You can use drag and drop to move the fields up/down for the change of the order and left/right for creating columns within the form.
782
+ </div>
783
+ </div>
784
+ <fieldset>
785
+ <legend></legend>
786
+ <?php if ($id) { ?>
787
+ <div style="margin: 8px; display: table; width: 100%;" id="page_bar">
788
+ <div id="page_navigation" style="display: table-row;">
789
+ <div align="center" id="pages" show_title="<?php echo $row->show_title; ?>" show_numbers="<?php echo $row->show_numbers; ?>" type="<?php echo $row->pagination; ?>" style="display: table-cell; width:90%;"></div>
790
+ <div align="left" id="edit_page_navigation" style="display: table-cell; vertical-align: middle;"></div>
791
  </div>
792
+ </div>
793
+ <div id="take" class="main">
794
+ <?php echo $row->form_front; ?>
795
+ </div>
796
+ <?php } else { ?>
797
+ <div style="margin:8px; display:table; width:100%" id="page_bar">
798
+ <div id="page_navigation" style="display:table-row">
799
+ <div align="center" id="pages" show_title="false" show_numbers="true" type="none" style="display:table-cell; width:90%"></div>
800
+ <div align="left" id="edit_page_navigation" style="display:table-cell; vertical-align: middle;"></div>
801
  </div>
802
+ </div>
803
+ <div id="take" class="main">
804
+ <div class="wdform-page-and-images" style="display:table; border-top:0px solid black;">
805
+ <div id="form_id_tempform_view1" class="wdform_page" page_title="Untitled page" next_title="Next" next_type="text" next_class="wdform-page-button" next_checkable="false" previous_title="Previous" previous_type="text" previous_class="wdform-page-button" previous_checkable="false">
806
+ <div class="wdform_section">
807
+ <div class="wdform_column"></div>
808
+ </div>
809
+ <div valign="top" class="wdform_footer" style="width: 100%;">
810
+ <div style="width: 100%;">
811
+ <div style="width: 100%; display: table; padding-top:10px;">
812
+ <div style="display: table-row-group;">
813
+ <div id="form_id_temppage_nav1" style="display: table-row;"></div>
814
  </div>
815
  </div>
816
  </div>
817
  </div>
818
+ </div>
819
+ <div id="form_id_tempform_view_img1" style="float: right;">
820
+ <div>
821
+ <img src="<?php echo WD_FM_URL . '/images/minus.png?ver='. get_option("wd_form_maker_version"); ?>" title="Show or hide the page" class="page_toolbar" onClick="show_or_hide('1')" onMouseOver="chnage_icons_src(this,'minus')" onmouseout="chnage_icons_src(this,'minus')" id="show_page_img_1"/>
822
+ <img src="<?php echo WD_FM_URL . '/images/page_delete.png?ver='. get_option("wd_form_maker_version"); ?>" title="Delete the page" class="page_toolbar" onClick="remove_page('1')" onMouseOver="chnage_icons_src(this,'page_delete')" onmouseout="chnage_icons_src(this,'page_delete')"/>
823
+ <img src="<?php echo WD_FM_URL . '/images/page_delete_all.png?ver='. get_option("wd_form_maker_version"); ?>" title="Delete the page with fields" class="page_toolbar" onClick="remove_page_all('1')" onMouseOver="chnage_icons_src(this,'page_delete_all')" onmouseout="chnage_icons_src(this,'page_delete_all')"/>
824
+ <img src="<?php echo WD_FM_URL . '/images/page_edit.png?ver='. get_option("wd_form_maker_version"); ?>" title="Edit the page" class="page_toolbar" onClick="edit_page_break('1')" onMouseOver="chnage_icons_src(this,'page_edit')" onmouseout="chnage_icons_src(this,'page_edit')"/>
825
  </div>
826
  </div>
827
  </div>
828
+ </div>
829
+ <?php } ?>
830
+ </fieldset>
831
+ </div>
832
+ <input type="hidden" name="form_front" id="form_front" />
833
+ <input type="hidden" name="form_fields" id="form_fields" />
834
+ <input type="hidden" name="pagination" id="pagination" />
835
+ <input type="hidden" name="show_title" id="show_title" />
836
+ <input type="hidden" name="show_numbers" id="show_numbers" />
837
+ <input type="hidden" name="public_key" id="public_key" />
838
+ <input type="hidden" name="private_key" id="private_key" />
839
+ <input type="hidden" name="recaptcha_theme" id="recaptcha_theme" />
840
+ <input type="hidden" id="label_order" name="label_order" value="<?php echo $row->label_order; ?>" />
841
+ <input type="hidden" id="label_order_current" name="label_order_current" value="<?php echo $row->label_order_current; ?>" />
842
+ <input type="hidden" name="counter" id="counter" value="<?php echo $row->counter; ?>" />
843
+ <input type="hidden" id="araqel" value="0" />
844
+ <input type="hidden" name="backup_id" id="backup_id" value="<?php echo $row->backup_id;?>">
845
+
846
+ <script type="text/javascript">
847
+ function set_preview() {
848
+ jQuery("#preview_form").attr("onclick", "tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerPreview', 'form_id' => $row->id, 'form_preview' => 1), admin_url('admin-ajax.php')); ?>&test_theme=" + jQuery('#theme').val() + "&width=1000&height=500&TB_iframe=1'); return false;");
849
+ jQuery("#edit_css").attr("onclick", "window.open('<?php echo add_query_arg(array('nonce_fm' => wp_create_nonce('nonce_fm')), admin_url('admin.php?page=themes_fm&task=edit')); ?>&current_id=" + jQuery('#theme').val() + "'); return false;");
850
+ if (jQuery('#theme option:selected').attr('data-version') == 1) {
851
+ jQuery("#old_theme_notice").show();
852
+ }
853
+ else {
854
+ jQuery("#old_theme_notice").hide();
855
+ }
856
+ }
857
+ jQuery(document).ready(function () {
858
+ set_preview();
859
+ });
860
+ <?php if ($id) { ?>
861
+ function formOnload() {
862
+ for (t = 0; t < <?php echo $row->counter; ?>; t++) {
863
+ if (document.getElementById(t + "_typeform_id_temp")) {
864
+ if (document.getElementById(t + "_typeform_id_temp").value == "type_map" || document.getElementById(t + "_typeform_id_temp").value == "type_mark_map") {
865
+ if_gmap_init(t);
866
+ for (q = 0; q < 20; q++) {
867
+ if (document.getElementById(t + "_elementform_id_temp").getAttribute("long" + q)) {
868
+ w_long = parseFloat(document.getElementById(t + "_elementform_id_temp").getAttribute("long" + q));
869
+ w_lat = parseFloat(document.getElementById(t + "_elementform_id_temp").getAttribute("lat" + q));
870
+ w_info = parseFloat(document.getElementById(t + "_elementform_id_temp").getAttribute("info" + q));
871
+ add_marker_on_map(t, q, w_long, w_lat, w_info, false);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
872
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
873
  }
874
+ }
875
+ else if (document.getElementById(t + "_typeform_id_temp").value == "type_date") {
876
+ // Calendar.setup({
877
+ // inputField:t + "_elementform_id_temp",
878
+ // ifFormat:document.getElementById(t + "_buttonform_id_temp").getAttribute('format'),
879
+ // button:t + "_buttonform_id_temp",
880
+ // align:"Tl",
881
+ // singleClick:true,
882
+ // firstDay:0
883
+ // });
884
+ }
885
+ else if (document.getElementById(t + "_typeform_id_temp").value == "type_name") {
886
+ var myu = t;
887
+ jQuery(document).ready(function () {
888
+ jQuery("#" + myu + "_mini_label_first").click(function () {
889
+ if (jQuery(this).children('input').length == 0) {
890
+ var first = "<input type='text' id='first' class='first' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
891
+ jQuery(this).html(first);
892
+ jQuery("input.first").focus();
893
+ jQuery("input.first").blur(function () {
894
+ var id_for_blur = document.getElementById('first').parentNode.id.split('_');
895
+ var value = jQuery(this).val();
896
+ jQuery("#" + id_for_blur[0] + "_mini_label_first").text(value);
897
+ });
898
+ }
 
 
899
  });
900
+ jQuery("label#" + myu + "_mini_label_last").click(function () {
901
+ if (jQuery(this).children('input').length == 0) {
902
+ var last = "<input type='text' id='last' class='last' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
903
+ jQuery(this).html(last);
904
+ jQuery("input.last").focus();
905
+ jQuery("input.last").blur(function () {
906
+ var id_for_blur = document.getElementById('last').parentNode.id.split('_');
907
+ var value = jQuery(this).val();
908
+ jQuery("#" + id_for_blur[0] + "_mini_label_last").text(value);
909
+ });
910
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
911
  });
912
+ jQuery("label#" + myu + "_mini_label_title").click(function () {
913
+ if (jQuery(this).children('input').length == 0) {
914
+ var title_ = "<input type='text' id='title_' class='title_' style='outline:none; border:none; background:none; width:50px;' value=\"" + jQuery(this).text() + "\">";
915
+ jQuery(this).html(title_);
916
+ jQuery("input.title_").focus();
917
+ jQuery("input.title_").blur(function () {
918
+ var id_for_blur = document.getElementById('title_').parentNode.id.split('_');
919
+ var value = jQuery(this).val();
920
+ jQuery("#" + id_for_blur[0] + "_mini_label_title").text(value);
921
+ });
922
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
923
  });
924
+ jQuery("label#" + myu + "_mini_label_middle").click(function () {
925
+ if (jQuery(this).children('input').length == 0) {
926
+ var middle = "<input type='text' id='middle' class='middle' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
927
+ jQuery(this).html(middle);
928
+ jQuery("input.middle").focus();
929
+ jQuery("input.middle").blur(function () {
930
+ var id_for_blur = document.getElementById('middle').parentNode.id.split('_');
931
+ var value = jQuery(this).val();
932
+ jQuery("#" + id_for_blur[0] + "_mini_label_middle").text(value);
933
+ });
934
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
935
  });
936
+ });
937
+ }
938
+ else if (document.getElementById(t + "_typeform_id_temp").value == "type_phone") {
939
+ var myu = t;
940
+ jQuery(document).ready(function () {
941
+ jQuery("label#" + myu + "_mini_label_area_code").click(function () {
942
+ if (jQuery(this).children('input').length == 0) {
943
+ var area_code = "<input type='text' id='area_code' class='area_code' size='10' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
944
+ jQuery(this).html(area_code);
945
+ jQuery("input.area_code").focus();
946
+ jQuery("input.area_code").blur(function () {
947
+ var id_for_blur = document.getElementById('area_code').parentNode.id.split('_');
948
+ var value = jQuery(this).val();
949
+ jQuery("#" + id_for_blur[0] + "_mini_label_area_code").text(value);
950
+ });
951
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
952
  });
953
+ jQuery("label#" + myu + "_mini_label_phone_number").click(function () {
954
+ if (jQuery(this).children('input').length == 0) {
955
+ var phone_number = "<input type='text' id='phone_number' class='phone_number' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
956
+ jQuery(this).html(phone_number);
957
+ jQuery("input.phone_number").focus();
958
+ jQuery("input.phone_number").blur(function () {
959
+ var id_for_blur = document.getElementById('phone_number').parentNode.id.split('_');
960
+ var value = jQuery(this).val();
961
+ jQuery("#" + id_for_blur[0] + "_mini_label_phone_number").text(value);
962
+ });
963
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
964
  });
965
+ });
966
+ }
967
+ else if (document.getElementById(t + "_typeform_id_temp").value == "type_date_fields") {
968
+ var myu = t;
969
+ jQuery(document).ready(function () {
970
+ jQuery("label#" + myu + "_day_label").click(function () {
971
+ if (jQuery(this).children('input').length == 0) {
972
+ var day = "<input type='text' id='day' class='day' size='8' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
973
+ jQuery(this).html(day);
974
+ jQuery("input.day").focus();
975
+ jQuery("input.day").blur(function () {
976
+ var id_for_blur = document.getElementById('day').parentNode.id.split('_');
977
+ var value = jQuery(this).val();
978
+ jQuery("#" + id_for_blur[0] + "_day_label").text(value);
979
+ });
980
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
981
  });
982
+ jQuery("label#" + myu + "_month_label").click(function () {
983
+ if (jQuery(this).children('input').length == 0) {
984
+ var month = "<input type='text' id='month' class='month' size='8' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
985
+ jQuery(this).html(month);
986
+ jQuery("input.month").focus();
987
+ jQuery("input.month").blur(function () {
988
+ var id_for_blur = document.getElementById('month').parentNode.id.split('_');
989
+ var value = jQuery(this).val();
990
+ jQuery("#" + id_for_blur[0] + "_month_label").text(value);
991
+ });
992
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
993
  });
994
+ jQuery("label#" + myu + "_year_label").click(function () {
995
  if (jQuery(this).children('input').length == 0) {
996
+ var year = "<input type='text' id='year' class='year' size='8' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
997
+ jQuery(this).html(year);
998
+ jQuery("input.year").focus();
999
+ jQuery("input.year").blur(function () {
1000
+ var id_for_blur = document.getElementById('year').parentNode.id.split('_');
1001
  var value = jQuery(this).val();
1002
+ jQuery("#" + id_for_blur[0] + "_year_label").text(value);
1003
  });
1004
  }
1005
  });
1006
  });
1007
  }
1008
+ else if (document.getElementById(t + "_typeform_id_temp").value == "type_time") {
1009
+ var myu = t;
1010
+ jQuery(document).ready(function () {
1011
+ jQuery("label#" + myu + "_mini_label_hh").click(function () {
1012
+ if (jQuery(this).children('input').length == 0) {
1013
+ var hh = "<input type='text' id='hh' class='hh' size='4' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
1014
+ jQuery(this).html(hh);
1015
+ jQuery("input.hh").focus();
1016
+ jQuery("input.hh").blur(function () {
1017
+ var id_for_blur = document.getElementById('hh').parentNode.id.split('_');
1018
+ var value = jQuery(this).val();
1019
+ jQuery("#" + id_for_blur[0] + "_mini_label_hh").text(value);
1020
+ });
1021
+ }
1022
+ });
1023
+ jQuery("label#" + myu + "_mini_label_mm").click(function () {
1024
+ if (jQuery(this).children('input').length == 0) {
1025
+ var mm = "<input type='text' id='mm' class='mm' size='4' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
1026
+ jQuery(this).html(mm);
1027
+ jQuery("input.mm").focus();
1028
+ jQuery("input.mm").blur(function () {
1029
+ var id_for_blur = document.getElementById('mm').parentNode.id.split('_');
1030
+ var value = jQuery(this).val();
1031
+ jQuery("#" + id_for_blur[0] + "_mini_label_mm").text(value);
1032
+ });
1033
+ }
1034
+ });
1035
+ jQuery("label#" + myu + "_mini_label_ss").click(function () {
1036
+ if (jQuery(this).children('input').length == 0) {
1037
+ var ss = "<input type='text' id='ss' class='ss' size='4' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
1038
+ jQuery(this).html(ss);
1039
+ jQuery("input.ss").focus();
1040
+ jQuery("input.ss").blur(function () {
1041
+ var id_for_blur = document.getElementById('ss').parentNode.id.split('_');
1042
+ var value = jQuery(this).val();
1043
+ jQuery("#" + id_for_blur[0] + "_mini_label_ss").text(value);
1044
+ });
1045
+ }
1046
+ });
1047
+ jQuery("label#" + myu + "_mini_label_am_pm").click(function () {
1048
+ if (jQuery(this).children('input').length == 0) {
1049
+ var am_pm = "<input type='text' id='am_pm' class='am_pm' size='4' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
1050
+ jQuery(this).html(am_pm);
1051
+ jQuery("input.am_pm").focus();
1052
+ jQuery("input.am_pm").blur(function () {
1053
+ var id_for_blur = document.getElementById('am_pm').parentNode.id.split('_');
1054
+ var value = jQuery(this).val();
1055
+ jQuery("#" + id_for_blur[0] + "_mini_label_am_pm").text(value);
1056
+ });
1057
+ }
1058
+ });
1059
+ });
1060
+ }
1061
+ else if (document.getElementById(t + "_typeform_id_temp").value == "type_paypal_price") {
1062
+ var myu = t;
1063
+ jQuery(document).ready(function () {
1064
+ jQuery("#" + myu + "_mini_label_dollars").click(function () {
1065
+ if (jQuery(this).children('input').length == 0) {
1066
+ var dollars = "<input type='text' id='dollars' class='dollars' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
1067
+ jQuery(this).html(dollars);
1068
+ jQuery("input.dollars").focus();
1069
+ jQuery("input.dollars").blur(function () {
1070
+ var id_for_blur = document.getElementById('dollars').parentNode.id.split('_');
1071
+ var value = jQuery(this).val();
1072
+ jQuery("#" + id_for_blur[0] + "_mini_label_dollars").text(value);
1073
+ });
1074
+ }
1075
+ });
1076
+ jQuery("label#" + myu + "_mini_label_cents").click(function () {
1077
+ if (jQuery(this).children('input').length == 0) {
1078
+ var cents = "<input type='text' id='cents' class='cents' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
1079
+ jQuery(this).html(cents);
1080
+ jQuery("input.cents").focus();
1081
+ jQuery("input.cents").blur(function () {
1082
+ var id_for_blur = document.getElementById('cents').parentNode.id.split('_');
1083
+ var value = jQuery(this).val();
1084
+ jQuery("#" + id_for_blur[0] + "_mini_label_cents").text(value);
1085
+ });
1086
+ }
1087
+ });
1088
+ });
1089
+ }
1090
+ else if (document.getElementById(t + "_typeform_id_temp").value == "type_address") {
1091
+ var myu = t;
1092
+ jQuery(document).ready(function () {
1093
+ jQuery("label#" + myu + "_mini_label_street1").click(function () {
1094
+ if (jQuery(this).children('input').length == 0) {
1095
+ var street1 = "<input type='text' id='street1' class='street1' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
1096
+ jQuery(this).html(street1);
1097
+ jQuery("input.street1").focus();
1098
+ jQuery("input.street1").blur(function () {
1099
+ var id_for_blur = document.getElementById('street1').parentNode.id.split('_');
1100
+ var value = jQuery(this).val();
1101
+ jQuery("#" + id_for_blur[0] + "_mini_label_street1").text(value);
1102
+ });
1103
+ }
1104
+ });
1105
+ jQuery("label#" + myu + "_mini_label_street2").click(function () {
1106
+ if (jQuery(this).children('input').length == 0) {
1107
+ var street2 = "<input type='text' id='street2' class='street2' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
1108
+ jQuery(this).html(street2);
1109
+ jQuery("input.street2").focus();
1110
+ jQuery("input.street2").blur(function () {
1111
+ var id_for_blur = document.getElementById('street2').parentNode.id.split('_');
1112
+ var value = jQuery(this).val();
1113
+ jQuery("#" + id_for_blur[0] + "_mini_label_street2").text(value);
1114
+ });
1115
+ }
1116
+ });
1117
+ jQuery("label#" + myu + "_mini_label_city").click(function () {
1118
+ if (jQuery(this).children('input').length == 0) {
1119
+ var city = "<input type='text' id='city' class='city' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
1120
+ jQuery(this).html(city);
1121
+ jQuery("input.city").focus();
1122
+ jQuery("input.city").blur(function () {
1123
+ var id_for_blur = document.getElementById('city').parentNode.id.split('_');
1124
+ var value = jQuery(this).val();
1125
+ jQuery("#" + id_for_blur[0] + "_mini_label_city").text(value);
1126
+ });
1127
+ }
1128
+ });
1129
+ jQuery("label#" + myu + "_mini_label_state").click(function () {
1130
+ if (jQuery(this).children('input').length == 0) {
1131
+ var state = "<input type='text' id='state' class='state' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
1132
+ jQuery(this).html(state);
1133
+ jQuery("input.state").focus();
1134
+ jQuery("input.state").blur(function () {
1135
+ var id_for_blur = document.getElementById('state').parentNode.id.split('_');
1136
+ var value = jQuery(this).val();
1137
+ jQuery("#" + id_for_blur[0] + "_mini_label_state").text(value);
1138
+ });
1139
+ }
1140
+ });
1141
+ jQuery("label#" + myu + "_mini_label_postal").click(function () {
1142
+ if (jQuery(this).children('input').length == 0) {
1143
+ var postal = "<input type='text' id='postal' class='postal' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
1144
+ jQuery(this).html(postal);
1145
+ jQuery("input.postal").focus();
1146
+ jQuery("input.postal").blur(function () {
1147
+ var id_for_blur = document.getElementById('postal').parentNode.id.split('_');
1148
+ var value = jQuery(this).val();
1149
+ jQuery("#" + id_for_blur[0] + "_mini_label_postal").text(value);
1150
+ });
1151
+ }
1152
+ });
1153
+ jQuery("label#" + myu + "_mini_label_country").click(function () {
1154
+ if (jQuery(this).children('input').length == 0) {
1155
+ var country = "<input type='country' id='country' class='country' style='outline:none; border:none; background:none;' value=\"" + jQuery(this).text() + "\">";
1156
+ jQuery(this).html(country);
1157
+ jQuery("input.country").focus();
1158
+ jQuery("input.country").blur(function () {
1159
+ var id_for_blur = document.getElementById('country').parentNode.id.split('_');
1160
+ var value = jQuery(this).val();
1161
+ jQuery("#" + id_for_blur[0] + "_mini_label_country").text(value);
1162
+ });
1163
+ }
1164
+ });
1165
+ });
1166
+ }
1167
+ else if (document.getElementById(t + "_typeform_id_temp").value == "type_scale_rating") {
1168
+ var myu = t;
1169
+ jQuery(document).ready(function () {
1170
+ jQuery("#" + myu + "_mini_label_worst").click(function () {
1171
+ if (jQuery(this).children('input').length == 0) {
1172
+ var worst = "<input type='text' id='worst' class='worst' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\"" + jQuery(this).text() + "\">";
1173
+ jQuery(this).html(worst);
1174
+ jQuery("input.worst").focus();
1175
+ jQuery("input.worst").blur(function () {
1176
+ var id_for_blur = document.getElementById('worst').parentNode.id.split('_');
1177
+ var value = jQuery(this).val();
1178
+ jQuery("#" + id_for_blur[0] + "_mini_label_worst").text(value);
1179
+ });
1180
+ }
1181
+ });
1182
+ jQuery("label#" + myu + "_mini_label_best").click(function () {
1183
+ if (jQuery(this).children('input').length == 0) {
1184
+ var best = "<input type='text' id='best' class='best' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\"" + jQuery(this).text() + "\">";
1185
+ jQuery(this).html(best);
1186
+ jQuery("input.best").focus();
1187
+ jQuery("input.best").blur(function () {
1188
+ var id_for_blur = document.getElementById('best').parentNode.id.split('_');
1189
+ var value = jQuery(this).val();
1190
+ jQuery("#" + id_for_blur[0] + "_mini_label_best").text(value);
1191
+ });
1192
+ }
1193
+ });
1194
+ });
1195
+ }
1196
+ else if (document.getElementById(t + "_typeform_id_temp").value == "type_spinner") {
1197
+ var spinner_value = document.getElementById(t + "_elementform_id_temp").value;
1198
+ var spinner_min_value = document.getElementById(t + "_min_valueform_id_temp").value;
1199
+ var spinner_max_value = document.getElementById(t + "_max_valueform_id_temp").value;
1200
+ var spinner_step = document.getElementById(t + "_stepform_id_temp").value;
1201
+ jQuery("#" + t + "_elementform_id_temp")[0].spin = null;
1202
+ spinner = jQuery("#" + t + "_elementform_id_temp").spinner();
1203
+ spinner.spinner("value", spinner_value);
1204
+ jQuery("#" + t + "_elementform_id_temp").spinner({ min:spinner_min_value});
1205
+ jQuery("#" + t + "_elementform_id_temp").spinner({ max:spinner_max_value});
1206
+ jQuery("#" + t + "_elementform_id_temp").spinner({ step:spinner_step});
1207
+ }
1208
+ else if (document.getElementById(t + "_typeform_id_temp").value == "type_slider") {
1209
+ var slider_value = document.getElementById(t + "_slider_valueform_id_temp").value;
1210
+ var slider_min_value = document.getElementById(t + "_slider_min_valueform_id_temp").value;
1211
+ var slider_max_value = document.getElementById(t + "_slider_max_valueform_id_temp").value;
1212
+ var slider_element_value = document.getElementById(t + "_element_valueform_id_temp");
1213
+ var slider_value_save = document.getElementById(t + "_slider_valueform_id_temp");
1214
+ jQuery("#" + t + "_elementform_id_temp")[0].slide = null;
1215
+ jQuery(function () {
1216
+ jQuery("#" + t + "_elementform_id_temp").slider({
1217
+ range:"min",
1218
+ value:eval(slider_value),
1219
+ min:eval(slider_min_value),
1220
+ max:eval(slider_max_value),
1221
+ slide:function (event, ui) {
1222
+ slider_element_value.innerHTML = "" + ui.value;
1223
+ slider_value_save.value = "" + ui.value;
1224
+ }
1225
+ });
1226
+ });
1227
+ }
1228
+ else if (document.getElementById(t + "_typeform_id_temp").value == "type_range") {
1229
+ var spinner_value0 = document.getElementById(t + "_elementform_id_temp0").value;
1230
+ var spinner_step = document.getElementById(t + "_range_stepform_id_temp").value;
1231
+ jQuery("#" + t + "_elementform_id_temp0")[0].spin = null;
1232
+ jQuery("#" + t + "_elementform_id_temp1")[0].spin = null;
1233
+ spinner0 = jQuery("#" + t + "_elementform_id_temp0").spinner();
1234
+ spinner0.spinner("value", spinner_value0);
1235
+ jQuery("#" + t + "_elementform_id_temp0").spinner({ step:spinner_step});
1236
+ var spinner_value1 = document.getElementById(t + "_elementform_id_temp1").value;
1237
+ spinner1 = jQuery("#" + t + "_elementform_id_temp1").spinner();
1238
+ spinner1.spinner("value", spinner_value1);
1239
+ jQuery("#" + t + "_elementform_id_temp1").spinner({ step:spinner_step});
1240
+ var myu = t;
1241
+ jQuery(document).ready(function () {
1242
+ jQuery("#" + myu + "_mini_label_from").click(function () {
1243
+ if (jQuery(this).children('input').length == 0) {
1244
+ var from = "<input type='text' id='from' class='from' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\"" + jQuery(this).text() + "\">";
1245
+ jQuery(this).html(from);
1246
+ jQuery("input.from").focus();
1247
+ jQuery("input.from").blur(function () {
1248
+ var id_for_blur = document.getElementById('from').parentNode.id.split('_');
1249
+ var value = jQuery(this).val();
1250
+ jQuery("#" + id_for_blur[0] + "_mini_label_from").text(value);
1251
+ });
1252
+ }
1253
+ });
1254
+ jQuery("label#" + myu + "_mini_label_to").click(function () {
1255
+ if (jQuery(this).children('input').length == 0) {
1256
+ var to = "<input type='text' id='to' class='to' size='6' style='outline:none; border:none; background:none; font-size:11px;' value=\"" + jQuery(this).text() + "\">";
1257
+ jQuery(this).html(to);
1258
+ jQuery("input.to").focus();
1259
+ jQuery("input.to").blur(function () {
1260
+ var id_for_blur = document.getElementById('to').parentNode.id.split('_');
1261
+ var value = jQuery(this).val();
1262
+ jQuery("#" + id_for_blur[0] + "_mini_label_to").text(value);
1263
+ });
1264
+ }
1265
+ });
1266
+ });
1267
+ }
1268
+ else if (document.getElementById(t + "_typeform_id_temp").value == "type_date_range") {
1269
+ var default_date_start = jQuery("#"+t+"_default_date_id_temp_start").val();
1270
+ var default_date_end = jQuery("#"+t+"_default_date_id_temp_end").val();
1271
+ var date_format = jQuery("#"+t+"_buttonform_id_temp").attr('format');
1272
+
1273
+
1274
+
1275
+ jQuery("#"+t+"_elementform_id_temp0").datepicker();
1276
+ jQuery("#"+t+"_elementform_id_temp1").datepicker();
1277
+ jQuery("#"+t+"_elementform_id_temp0").datepicker("option", "dateFormat", date_format);
1278
+ jQuery("#"+t+"_elementform_id_temp1").datepicker("option", "dateFormat", date_format);
1279
+
1280
+
1281
+ if(default_date_start =="today")
1282
+ jQuery("#"+t+"_elementform_id_temp0").datepicker("setDate", new Date());
1283
+ else if(default_date_start.indexOf("d") == -1 && default_date_start.indexOf("m") == -1 && default_date_start.indexOf("y") == -1 && default_date_start.indexOf("w") == -1){
1284
+ if(default_date_start !== "")
1285
+ default_date_start = jQuery.datepicker.formatDate(date_format, new Date(default_date_start));
1286
+ jQuery("#"+t+"_elementform_id_temp0").datepicker("setDate", default_date_start);
1287
+ }
1288
+ else
1289
+ jQuery("#"+t+"_elementform_id_temp0").datepicker("setDate", default_date_start);
1290
+
1291
+
1292
+ if(default_date_end =="today")
1293
+ jQuery("#"+t+"_elementform_id_temp1").datepicker("setDate", new Date());
1294
+ else if(default_date_end.indexOf("d") == -1 && default_date_end.indexOf("m") == -1 && default_date_end.indexOf("y") == -1 && default_date_end.indexOf("w") == -1){
1295
+ if(default_date_end !== "")
1296
+ default_date_end = jQuery.datepicker.formatDate(date_format, new Date(default_date_end));
1297
+ jQuery("#"+t+"_elementform_id_temp1").datepicker("setDate", default_date_end);
1298
+ }
1299
+ else
1300
+ jQuery("#"+t+"_elementform_id_temp1").datepicker("setDate", default_date_end);
1301
+ }
1302
+
1303
+ else if (document.getElementById(t + "_typeform_id_temp").value == "type_date_new") {
1304
+ var default_date = jQuery("#"+t+"_default_date_id_temp").val();
1305
+ var date_format = jQuery("#"+t+"_buttonform_id_temp").attr('format');
1306
+ jQuery("#"+t+"_elementform_id_temp").datepicker();
1307
+ jQuery("#"+t+"_elementform_id_temp").datepicker("option", "dateFormat", date_format);
1308
+
1309
+
1310
+ if(default_date =="today")
1311
+ jQuery("#"+t+"_elementform_id_temp").datepicker("setDate", new Date());
1312
+ else if(default_date.indexOf("d") == -1 && default_date.indexOf("m") == -1 && default_date.indexOf("y") == -1 && default_date.indexOf("w") == -1){
1313
+ if(default_date !== "")
1314
+ default_date = jQuery.datepicker.formatDate(date_format, new Date(default_date));
1315
+ jQuery("#"+t+"_elementform_id_temp").datepicker("setDate", default_date);
1316
+ }
1317
+ else
1318
+ jQuery("#"+t+"_elementform_id_temp").datepicker("setDate", default_date);
1319
+
1320
+
1321
+
1322
+ }
1323
+ else if (document.getElementById(t + "_typeform_id_temp").value == "type_phone_new") {
1324
+
1325
+
1326
+ jQuery("#"+t+"_elementform_id_temp").intlTelInput({
1327
+ nationalMode: false,
1328
+ preferredCountries: [ jQuery("#"+t+"_elementform_id_temp").attr("top-country") ],
1329
+ });
1330
+ jQuery("#"+t+"_elementform_id_temp").intlTelInput("setNumber", jQuery("#"+t+"_elementform_id_temp").val());
1331
+
1332
+ }
1333
+ }
1334
+ }
1335
+
1336
+ remove_whitespace(document.getElementById('take'));
1337
+ form_view = 1;
1338
+ form_view_count = 0;
1339
+
1340
+ for (i = 1; i <= 30; i++) {
1341
+ if (document.getElementById('form_id_tempform_view' + i)) {
1342
+ form_view_count++;
1343
+ form_view_max = i;
1344
+ tbody_img = document.createElement('div');
1345
+ tbody_img.setAttribute('id', 'form_id_tempform_view_img' + i);
1346
+ tbody_img.style.cssText = "float:right";
1347
+ tr_img = document.createElement('div');
1348
+ var img = document.createElement('img');
1349
+ img.setAttribute('src', '<?php echo WD_FM_URL; ?>/images/minus.png?ver=<?php echo get_option("wd_form_maker_version"); ?>');
1350
+ img.setAttribute('title', 'Show or hide the page');
1351
+ img.setAttribute("class", "page_toolbar");
1352
+ img.setAttribute('id', 'show_page_img_' + i);
1353
+ img.setAttribute('onClick', 'show_or_hide("' + i + '")');
1354
+ img.setAttribute("onmouseover", 'chnage_icons_src(this,"minus")');
1355
+ img.setAttribute("onmouseout", 'chnage_icons_src(this,"minus")');
1356
+ var img_X = document.createElement("img");
1357
+ img_X.setAttribute("src", "<?php echo WD_FM_URL; ?>/images/page_delete.png?ver=<?php echo get_option("wd_form_maker_version"); ?>");
1358
+ img_X.setAttribute('title', 'Delete the page');
1359
+ img_X.setAttribute("class", "page_toolbar");
1360
+ img_X.setAttribute("onclick", 'remove_page("' + i + '")');
1361
+ img_X.setAttribute("onmouseover", 'chnage_icons_src(this,"page_delete")');
1362
+ img_X.setAttribute("onmouseout", 'chnage_icons_src(this,"page_delete")');
1363
+ var img_X_all = document.createElement("img");
1364
+ img_X_all.setAttribute("src", "<?php echo WD_FM_URL; ?>/images/page_delete_all.png?ver=<?php echo get_option("wd_form_maker_version"); ?>");
1365
+ img_X_all.setAttribute('title', 'Delete the page with fields');
1366
+ img_X_all.setAttribute("class", "page_toolbar");
1367
+ img_X_all.setAttribute("onclick", 'remove_page_all("' + i + '")');
1368
+ img_X_all.setAttribute("onmouseover", 'chnage_icons_src(this,"page_delete_all")');
1369
+ img_X_all.setAttribute("onmouseout", 'chnage_icons_src(this,"page_delete_all")');
1370
  var img_EDIT = document.createElement("img");
1371
+ img_EDIT.setAttribute("src", "<?php echo WD_FM_URL; ?>/images/page_edit.png?ver=<?php echo get_option("wd_form_maker_version"); ?>");
1372
+ img_EDIT.setAttribute('title', 'Edit the page');
1373
+ img_EDIT.setAttribute("class", "page_toolbar");
1374
+ img_EDIT.setAttribute("onclick", 'edit_page_break("' + i + '")');
1375
+ img_EDIT.setAttribute("onmouseover", 'chnage_icons_src(this,"page_edit")');
1376
+ img_EDIT.setAttribute("onmouseout", 'chnage_icons_src(this,"page_edit")');
1377
+ tr_img.appendChild(img);
1378
+ tr_img.appendChild(img_X);
1379
+ tr_img.appendChild(img_X_all);
1380
+ tr_img.appendChild(img_EDIT);
1381
+ tbody_img.appendChild(tr_img);
1382
+ document.getElementById('form_id_tempform_view' + i).parentNode.appendChild(tbody_img);
1383
+ }
1384
+ }
1385
+
1386
+ if (form_view_count > 1) {
1387
+ for (i = 1; i <= form_view_max; i++) {
1388
+ if (document.getElementById('form_id_tempform_view' + i)) {
1389
+ first_form_view = i;
1390
+ break;
1391
+ }
1392
  }
1393
+ form_view = form_view_max;
1394
+ need_enable = false;
1395
+ generate_page_nav(first_form_view);
1396
+ var img_EDIT = document.createElement("img");
1397
+ img_EDIT.setAttribute("src", "<?php echo WD_FM_URL . '/images/edit.png?ver='.get_option("wd_form_maker_version"); ?>");
1398
+ img_EDIT.style.cssText = "margin-left:40px; cursor:pointer";
1399
+ img_EDIT.setAttribute("onclick", 'el_page_navigation()');
1400
+ var td_EDIT = document.getElementById("edit_page_navigation");
1401
+ td_EDIT.appendChild(img_EDIT);
1402
+ document.getElementById('page_navigation').appendChild(td_EDIT);
1403
  }
1404
+ document.getElementById('araqel').value = 1;
1405
+ }
1406
+ jQuery(window).load(function () {
1407
+ formOnload();
1408
+ });
1409
+ jQuery(function() {
1410
+ jQuery('.wdform_section .wdform_column:last-child').each(function() {
1411
+ jQuery(this).parent().append(jQuery('<div></div>').addClass("wdform_column"));
1412
  });
1413
+
1414
+ sortable_columns();
1415
+ if(<?php echo $row->sortable ?>==1) {
1416
+ jQuery( ".wdform_arrows" ).hide();
1417
+ all_sortable_events();
1418
+ }
1419
+ else
1420
+ jQuery('.wdform_column').sortable( "disable" );
1421
+
1422
+ });
1423
+ <?php
1424
+ } else { ?>
1425
  jQuery(function() {
1426
  jQuery('.wdform_section .wdform_column:last-child').each(function() {
1427
  jQuery(this).parent().append(jQuery('<div></div>').addClass("wdform_column"));
1428
  });
 
1429
  sortable_columns();
1430
+ all_sortable_events();
 
 
 
 
 
 
1431
  });
1432
+ <?php } ?>
1433
+ </script>
 
 
 
 
 
 
 
 
 
 
 
1434
  <input type="hidden" name="option" value="com_formmaker" />
1435
  <input type="hidden" name="id" value="<?php echo $row->id; ?>" />
1436
  <input type="hidden" name="cid[]" value="<?php echo $row->id; ?>" />
1440
  <?php
1441
  }
1442
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1443
  public function form_options($id) {
1444
+ $addons = array('WD_FM_MAILCHIMP' => 'MailChimp', 'WD_FM_REG' => 'Registration', 'WD_FM_POST_GEN' => 'Post Generation', 'WD_FM_EMAIL_COND' => 'Conditional Emails', 'WD_FM_DBOX_INT' => 'Dropbox Integration', 'WD_FM_GDRIVE_INT' => 'Google Drive Integration','WD_FM_PDF' => 'PDF Integration', 'WD_FM_PUSHOVER' => 'Pushover', 'WD_FM_SAVE_PROG' => 'Save Form Progress', 'WD_FM_CALCULATOR' => 'Calculator');
1445
 
1446
  $row = $this->model->get_row_data($id);
1447
  $themes = $this->model->get_theme_rows_data();
1462
  }
1463
  $fields = explode('*:*id*:*type_submitter_mail*:*type*:*', $row->form_fields);
1464
  $fields_count = count($fields);
1465
+ $is_addon_stripe_active = (defined('WD_FM_STRIPE') && is_plugin_active(constant('WD_FM_STRIPE')));
1466
+ $payment_method = $row->paypal_mode ? 'paypal' : 'none';
1467
+ if ($is_addon_stripe_active) {
1468
+ require_once (WD_FM_STRIPE_DIR . '/controller.php');
1469
+ $stripe_enable = (int) WD_FM_STRIPE_controller::stripe_enable($id);
1470
+ $payment_method = $stripe_enable ? 'stripe' : $payment_method;
1471
+ }
1472
  ?>
1473
  <script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1474
  gen = "<?php echo $row->counter; ?>";
1475
  form_view_max = 20;
1476
  function set_preview() {
1477
+ jQuery("#preview_form").attr("onclick", "tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerPreview', 'form_id' => $row->id, 'form_preview' => 1), admin_url('admin-ajax.php')); ?>&test_theme=" + jQuery('#theme').val() + "&width=1000&height=500&TB_iframe=1'); return false;");
1478
+ jQuery("#edit_css").attr("onclick", "window.open('<?php echo add_query_arg(array('nonce_fm' => wp_create_nonce('nonce_fm')), admin_url('admin.php?page=themes_fm&task=edit')); ?>&current_id=" + jQuery('#theme').val() + "'); return false;");
1479
+ if (jQuery('#theme option:selected').attr('data-version') == 1) {
1480
+ jQuery("#old_theme_notice").show();
1481
+ }
1482
+ else {
1483
+ jQuery("#old_theme_notice").hide();
1484
+ }
1485
  }
1486
 
1487
  function set_condition() {
1541
  background: white;
1542
  }
1543
  </style>
1544
+ <form class="wrap" method="post" action="admin.php?page=manage_fm" name="adminForm" id="adminForm">
 
1545
  <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
1546
  <div class="fm-page-header">
1547
  <div class="fm-page-title" style="width: inherit;">
1548
  <?php echo $page_title; ?>
1549
  </div>
1550
  <div class="fm-page-actions">
1551
+ <button class="fm-button save-button medium" onclick="if (fm_check_email('mailToAdd') ||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') || check_stripe_required_fields() || check_calculator_required_fields()) {return false;}; wd_fm_apply_options('save_options');">
1552
  <span></span>
1553
  Save
1554
  </button>
1555
+ <button class="fm-button apply-button medium" onclick="if (fm_check_email('mailToAdd') || 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') || check_stripe_required_fields() || check_calculator_required_fields()) {return false;}; wd_fm_apply_options('apply_options');">
1556
  <span></span>
1557
  Apply
1558
  </button>
1559
+ <button class="fm-button cancel-button medium" onclick="fm_set_input_value('task', 'cancel_options');">
1560
  <span></span>
1561
  Cancel
1562
  </button>
1588
  <li>
1589
  <a id="mapping" class="fm_fieldset_tab" onclick="form_maker_options_tabs('mapping')" href="#" >MySQL Mapping</a>
1590
  </li>
1591
+ <?php
1592
+ foreach($addons as $addon => $addon_name) {
1593
+ if (defined($addon) && is_plugin_active(constant($addon))) {
1594
+ ?>
1595
+ <li>
1596
+ <a id="<?php echo $addon;?>" class="fm_fieldset_tab" onclick="form_maker_options_tabs('<?php echo $addon;?>')" href="#" ><?php echo $addon_name;?></a>
1597
+ </li>
1598
+ <?php
1599
+ }
1600
+ }
1601
+ ?>
1602
  </ul>
1603
  </div>
1604
  </div>
1605
  <fieldset id="general_fieldset" class="adminform fm_fieldset_deactive">
1606
  <legend>General Options</legend>
1607
+ <table class="admintable" style="float: left;">
1608
  <tr valign="top">
1609
  <td class="fm_options_label">
1610
  <label>Published</label>
1632
  <label for="theme">Theme</label>
1633
  </td>
1634
  <td class="fm_options_value">
1635
+ <select id="theme" name="theme" onChange="set_preview()">
1636
+ <optgroup label="New Themes">
1637
+ <option value="0" <?php echo $row->theme && $row->theme == 0 ? 'selected' : '' ?> data-version="2">Inherit From Website Theme</option>
1638
+ <?php
1639
+ $optiongroup = true;
1640
+ foreach ($themes as $theme) {
1641
+ if ($optiongroup && $theme->version == 1) {
1642
+ $optiongroup = false;
1643
+ ?>
1644
+ </optgroup>
1645
+ <optgroup label="Outdated Themes">
1646
+ <?php
1647
+ }
1648
+ ?>
1649
+ <option value="<?php echo $theme->id; ?>" <?php echo (($theme->id == $row->theme) ? 'selected' : ''); ?> data-version="<?php echo $theme->version; ?>"><?php echo $theme->title; ?></option>
1650
+ <?php
1651
+ }
1652
+ ?>
1653
+ </optgroup>
1654
+ </select>
1655
+ <button id="preview_form" class="fm-button preview-button medium" onclick="tb_show('', '<?php echo add_query_arg(array('action' => 'FormMakerPreview', 'form_id' => $row->id, 'test_theme' => $row->theme, 'form_preview' => 1, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>'); return false;">
1656
  <span></span>
1657
  Preview
1658
  </button>
1659
+ <button id="edit_css" class="fm-button options-edit-button medium" onclick="window.open('<?php echo add_query_arg(array('current_id' => ($row->theme ? $row->theme : $default_theme), 'nonce_fm' => wp_create_nonce('nonce_fm')), admin_url('admin.php?page=themes_fm&task=edit')); ?>'); return false;">
1660
  <span></span>
1661
+ Edit
1662
  </button>
1663
+ <div id="old_theme_notice" class="wd_error" style="display: none;">The theme you have selected is outdated. Please choose one from New Themes section.</div>
1664
  </td>
1665
  </tr>
1666
  <tr valign="top">
1683
  </td>
1684
  </tr>
1685
  </table>
1686
+ <br/>
1687
+ <div class="error_fm" style="padding: 5px; font-size: 14px;">Front end submissions are disabled in free version.</div>
1688
  <fieldset class="adminform">
1689
  <legend>Front end submissions access level</legend>
1690
  <table>
1810
  jQuery(document).on('change','input[name="all_stats_fields"]',function() {
1811
  jQuery('.stats_filed_label').prop("checked" , this.checked);
1812
  });
1813
+ set_preview();
1814
  });
1815
  </script>
1816
  <style>
1938
  for ($i = 0; $i < $fields_count - 1; $i++) {
1939
  ?>
1940
  <div>
1941
+ <input type="radio" name="from_mail" id="from_mail<?php echo $i; ?>" value="<?php echo (!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]); ?>" <?php echo ((!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]) == $row->from_mail ? 'checked="checked"' : '' ); ?> onclick="wdhide('mail_from_other')" />
1942
  <label for="from_mail<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
1943
  </div>
1944
  <?php
1945
+ if(!is_numeric($fields[$i])) {
1946
  if (substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*') + 15, strlen($fields[$i])) == $row->from_mail) {
1947
  $is_other = FALSE;
1948
  }
2002
  for ($i = 0; $i < $fields_count - 1; $i++) {
2003
  ?>
2004
  <div>
2005
+ <input type="radio" name="reply_to" id="reply_to<?php echo $i; ?>" value="<?php echo (!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]); ?>" <?php echo ((!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]) == $row->reply_to ? 'checked="checked"' : '' ); ?> onclick="wdhide('reply_to_other')" />
2006
  <label for="reply_to<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
2007
  </div>
2008
  <?php
2009
+ if(!is_numeric($fields[$i])) {
2010
  if (substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*') + 15, strlen($fields[$i])) == $row->reply_to) {
2011
  $is_other = FALSE;
2012
  }
2091
  <label> Attach File: </label>
2092
  </td>
2093
  <td class="fm_options_value">
2094
+ <div class="error_fm" style="padding: 5px; font-size: 14px;">File attach is disabled in free version.</div>
2095
  <input type="hidden" name="mail_attachment" value="<?php echo $row->mail_attachment; ?>"/>
2096
  </td>
2097
  </tr>
2168
  </td>
2169
  <td class="fm_options_value">
2170
  <?php
2171
+
2172
  $fields = explode('*:*id*:*type_submitter_mail*:*type*:*', $row->form_fields);
2173
  $fields_count = count($fields);
2174
  if ($fields_count == 1) { ?>
2179
  for ($i = 0; $i < $fields_count - 1; $i++) {
2180
  ?>
2181
  <div>
2182
+ <input type="checkbox" name="send_to<?php echo $i; ?>" id="send_to<?php echo $i; ?>" value="<?php echo (!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]); ?>" <?php echo (is_numeric(strpos($row->send_to, '*'.(!is_numeric($fields[$i]) ? substr($fields[$i], strrpos($fields[$i], '*:*new_field*:*')+15, strlen($fields[$i])) : $fields[$i]).'*')) ? 'checked="checked"' : '' ); ?> style="margin: 0px 5px 0px 0px;" />
2183
  <label for="send_to<?php echo $i; ?>"><?php echo substr($fields[$i + 1], 0, strpos($fields[$i + 1], '*:*w_field_label*:*')); ?></label>
2184
  </div>
2185
  <?php
2290
  <label> Mode: </label>
2291
  </td>
2292
  <td class="fm_options_value">
2293
+ <button name="mail_mode_user"class="fm-checkbox-radio-button <?php echo $row->mail_mode_user == 1 ? 'fm-text-yes' : 'fm-text-no' ?> medium" onclick="fm_change_radio_checkbox_text(this); return false;" value="<?php echo $row->mail_mode_user ?>">
2294
  <label><?php echo $row->mail_mode_user == 1 ? 'HTML' : 'Text' ?></label>
2295
  <span></span>
2296
  </button>
2302
  <label> Attach File: </label>
2303
  </td>
2304
  <td class="fm_options_value">
2305
+ <div class="error_fm" style="padding: 5px; font-size: 14px;">File attach is disabled in free version.</div>
2306
  <input type="hidden" name="mail_attachment_user" value="<?php echo $row->mail_attachment_user; ?>"/>
2307
  </td>
2308
  </tr>
2510
  </fieldset>
2511
  <fieldset id="payment_fieldset" class="adminform fm_fieldset_deactive">
2512
  <legend>Payment Options</legend>
2513
+ <table class="admintable">
2514
+ <tr>
2515
+ <td colspan="2">
2516
+ <div class="error_fm" style="padding: 5px; font-size: 14px;">Paypal Options are disabled in free version.</div>
2517
+ </td>
2518
+ </tr>
2519
  <tr valign="top">
2520
+ <td class="fm_options_label">
2521
+ <label>Payment Method</label>
2522
+ </td>
2523
+ <td class="fm_options_value">
2524
+ <div><input type="radio" name="paypal_mode" id="paypal_mode0" value="none" checked="checked" onchange="fm_change_payment_method('none');" disabled="disabled" /><label for="paypal_mode0">None</label></div>
2525
  <div><input type="radio" name="paypal_mode" id="paypal_mode1" value="paypal" onchange="fm_change_payment_method('paypal');" disabled="disabled" /><label for="paypal_mode1">Paypal</label></div>
2526
+ </td>
2527
+ </tr>
2528
+ </table>
2529
  </fieldset>
2530
  <fieldset id="javascript_fieldset" class="adminform fm_fieldset_deactive">
2531
  <legend>JavaScript</legend>
2549
  $all_ids = array();
2550
  $all_labels = array();
2551
 
2552
+ $select_and_input = array("type_text", "type_password", "type_textarea", "type_name", "type_number", "type_phone", "type_phone_new", "type_submitter_mail", "type_address", "type_spinner", "type_checkbox", "type_radio", "type_own_select", "type_paypal_price", "type_paypal_price_new", "type_paypal_select", "type_paypal_checkbox", "type_paypal_radio", "type_paypal_shipping", "type_date_new");
2553
 
2554
  $select_type_fields = array("type_address", "type_checkbox", "type_radio", "type_own_select", "type_paypal_select", "type_paypal_checkbox", "type_paypal_radio", "type_paypal_shipping");
2555
 
2556
+
2557
  $fields=explode('*:*new_field*:*',$row->form_fields);
2558
+ $fields = array_slice($fields,0, count($fields)-1);
2559
+
2560
  foreach($fields as $field) {
2561
  $temp=explode('*:*id*:*',$field);
2562
  array_push($ids, $temp[0]);
2596
  $field_label = array();
2597
  $all_any = array();
2598
  $condition_params = array();
2599
+
2600
+
2601
  $count_of_conditions=0;
2602
  if($row->condition!="") {
2603
  $conditions=explode('*:*new_condition*:*',$row->condition);
2725
  break;
2726
  }
2727
 
2728
+ $w_choices = explode('*:*w_choices*:*',$w_size[1]);
2729
+ $w_choices_array = explode('***',$w_choices[0]);
2730
+
2731
+ if($types[$key_select_or_input] == 'type_radio' || $types[$key_select_or_input] == 'type_checkbox' || $types[$key_select_or_input] == 'type_own_select')
 
 
 
2732
  {
2733
+
2734
+ if(strpos($w_choices[1], 'w_value_disabled') > -1)
2735
+ {
2736
+ $w_value_disabled= explode('*:*w_value_disabled*:*',$w_choices[1]);
2737
+ $w_choices_value = explode('*:*w_choices_value*:*',$w_value_disabled[1]);
2738
+ $w_choices_value = $w_choices_value[0];
2739
+ }
2740
+
2741
+ if(isset($w_choices_value))
2742
+ $w_choices_value_array = explode('***',$w_choices_value);
2743
+ else
2744
+ $w_choices_value_array = $w_choices_array;
2745
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2746
  else
2747
+ {
2748
+ $w_choices_price= explode('*:*w_choices_price*:*',$w_choices[1]);
2749
+ $w_choices_value = $w_choices_price[0];
2750
+ $w_choices_value_array = explode('***', $w_choices_value);
2751
+ }
2752
+
2753
 
2754
+ for($m=0; $m<count($w_choices_array); $m++)
2755
  {
2756
+ if($types[$key_select_or_input]=="type_paypal_checkbox" || $types[$key_select_or_input]=="type_paypal_radio" || $types[$key_select_or_input]=="type_paypal_shipping" || $types[$key_select_or_input]=="type_paypal_select")
2757
+ $w_choice = $w_choices_array[$m].'*:*value*:*'.$w_choices_value_array[$m];
2758
+ else
2759
+ $w_choice = $w_choices_value_array[$m];
2760
+
2761
+ if(in_array(esc_html($w_choice),$multiselect))
2762
+ {
2763
+ $selected = 'selected="selected"';
2764
+ }
2765
+ else
2766
+ $selected ='';
2767
 
2768
+ if(strpos($w_choices_array[$m], '[') === false && strpos($w_choices_array[$m], ']') === false ) {
2769
+ echo '<option id="choise_'.$k.'_'.$m.'" value="'.$w_choice.'" '.$selected.'>'.$w_choices_array[$m].'</option>';
2770
+ }
2771
+ }
2772
 
2773
  if($types[$key_select_or_input]=="type_address")
2774
  {
2793
  if($key_select_or_input != '' && ($types[$key_select_or_input]=="type_number" || $types[$key_select_or_input]=="type_phone"))
2794
  $onkeypress_function = "onkeypress='return check_isnum_space(event)'";
2795
  else
2796
+ if($key_select_or_input != '' && ($types[$key_select_or_input]=="type_paypal_price" || $types[$key_select_or_input]=="type_paypal_price_new"))
2797
  $onkeypress_function = "onkeypress='return check_isnum_point(event)'";
2798
  else
2799
  $onkeypress_function = "";
2819
  <span></span>
2820
  Add Query
2821
  </button>
2822
+ <button class="fm-button delete-button medium" onclick="if (fm_check_email('mailToAdd') || fm_check_email('from_mail') || fm_check_email('reply_to') || fm_check_email('mail_from_other') || fm_check_email('reply_to_other') || fm_check_email('paypal_email')) {return false;}; wd_fm_apply_options('remove_query'); return false;">
2823
  <span></span>
2824
  Delete
2825
  </button>
2864
  }
2865
  ?>
2866
  </fieldset>
2867
+ <?php
2868
+ foreach($addons as $addon => $addon_name) {
2869
+ if (defined($addon) && is_plugin_active(constant($addon))) {
2870
+ $_GET['addon_view']='admin';
2871
+ $_GET['form_id']=$row->id;
2872
+ do_action($addon.'_init');
2873
+ }
2874
+ }
2875
+ ?>
2876
  </div>
2877
  <input type="hidden" name="boxchecked" value="0">
2878
  <input type="hidden" name="fieldset_id" id="fieldset_id" value="<?php echo WDW_FM_Library::get('fieldset_id', 'general'); ?>" />
2919
  set_condition();
2920
  fm_set_input_value('task', task);
2921
  document.getElementById('adminForm').submit();
2922
+
2923
  }
2924
  </script>
2925
  <?php
2995
  <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
2996
  <div class="fm-layout-actions">
2997
  <div class="fm-page-actions">
2998
+ <button class="fm-button save-button medium" onclick="submitbutton(); fm_set_input_value('task', 'save_layout');">
2999
  Save
3000
  <span></span>
3001
  </button>
3002
+ <button class="fm-button apply-button medium" onclick="submitbutton(); fm_set_input_value('task', 'apply_layout');">
3003
  Apply
3004
  <span></span>
3005
  </button>
3006
+ <button class="fm-button cancel-button medium" onclick="fm_set_input_value('task', 'cancel_options');">
3007
  Cancel
3008
  <span></span>
3009
  </button>
3063
  <?php
3064
  }
3065
 
3066
+ public function display_options($id) {
3067
+ $row_form = $this->model->get_row_data($id);
3068
+ $row = $this->model->get_display_options($id);
3069
+ $page_title = 'Display Options: '.$row_form->title;
3070
+ $animation_effects = array(
3071
+ 'none' => 'None',
3072
+ 'bounce' => 'Bounce',
3073
+ 'tada' => 'Tada',
3074
+ 'bounceInDown' => 'BounceInDown',
3075
+ 'fadeInLeft' => 'FadeInLeft',
3076
+ 'flash' => 'Flash',
3077
+ 'pulse' => 'Pulse',
3078
+ 'rubberBand' => 'RubberBand',
3079
+ 'shake' => 'Shake',
3080
+ 'swing' => 'Swing',
3081
+ 'wobble' => 'Wobble',
3082
+ 'hinge' => 'Hinge',
3083
+ 'lightSpeedIn' => 'LightSpeedIn',
3084
+ 'rollIn' => 'RollIn',
3085
+ 'bounceIn' => 'BounceIn',
3086
+ 'bounceInLeft' => 'BounceInLeft',
3087
+ 'bounceInRight' => 'BounceInRight',
3088
+ 'bounceInUp' => 'BounceInUp',
3089
+ 'fadeIn' => 'FadeIn',
3090
+ 'fadeInDown' => 'FadeInDown',
3091
+ 'fadeInDownBig' => 'FadeInDownBig',
3092
+ 'fadeInLeftBig' => 'FadeInLeftBig',
3093
+ 'fadeInRight' => 'FadeInRight',
3094
+ 'fadeInRightBig' => 'FadeInRightBig',
3095
+ 'fadeInUp' => 'FadeInUp',
3096
+ 'fadeInUpBig' => 'FadeInUpBig',
3097
+ 'flip' => 'Flip',
3098
+ 'flipInX' => 'FlipInX',
3099
+ 'flipInY' => 'FlipInY',
3100
+ 'rotateIn' => 'RotateIn',
3101
+ 'rotateInDownLeft' => 'RotateInDownLeft',
3102
+ 'rotateInDownRight' => 'RotateInDownRight',
3103
+ 'rotateInUpLeft' => 'RotateInUpLeft',
3104
+ 'rotateInUpRight' => 'RotateInUpRight',
3105
+ 'zoomIn' => 'ZoomIn',
3106
+ 'zoomInDown' => 'ZoomInDown',
3107
+ 'zoomInLeft' => 'ZoomInLeft',
3108
+ 'zoomInRight' => 'ZoomInRight',
3109
+ 'zoomInUp' => 'ZoomInUp',
3110
+ );
3111
+
3112
+ ?>
3113
+ <form class="wrap" method="post" action="admin.php?page=manage_fm" name="adminForm" id="adminForm">
3114
+ <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
3115
+ <input type="hidden" id="task" name="task" value=""/>
3116
+ <input type="hidden" id="current_id" name="current_id" value="<?php echo $row->form_id; ?>" />
3117
+ <div class="fm-page-header">
3118
+ <div class="fm-logo">
3119
+ </div>
3120
+ <div class="fm-page-title"><?php echo $page_title; ?></div>
3121
+ <div class="fm-page-actions">
3122
+ <button class="fm-button save-button medium" onclick="fm_apply_options('save_display_options');">
3123
+ <span></span>
3124
+ Save
3125
+ </button>
3126
+ <button class="fm-button apply-button medium" onclick="fm_apply_options('apply_display_options');">
3127
+ <span></span>
3128
+ Apply
3129
+ </button>
3130
+ <button class="fm-button cancel-button medium" onclick="fm_set_input_value('task', 'cancel_options');">
3131
+ <span></span>
3132
+ Cancel
3133
+ </button>
3134
+ </div>
3135
+ <div class="fm-clear"></div>
3136
+ </div>
3137
+ <div class="fm-form-options">
3138
+ <fieldset id="type_settings_fieldset" class="adminform">
3139
+ <div class="fm-row fm-form-types">
3140
+ <label style="font-size:18px; width: 170px !important; ">Form Type</label>
3141
+ <label>
3142
+ <input type="radio" name="form_type" value="embedded" onclick="change_form_type('embedded'); change_hide_show('fm-embedded');"
3143
+ <?php echo $row->type == 'embedded' ? 'checked="checked"' : '' ?>>
3144
+ <span class="fm-embedded <?php echo $row->type == 'embedded' ? ' active' : '' ?>"></span>
3145
+ <p>Embedded</p>
3146
+ </label>
3147
+ <label>
3148
+ <input type="radio" name="form_type" value="popover" onclick="change_form_type('popover'); change_hide_show('fm-popover');"
3149
+ <?php echo $row->type == 'popover' ? 'checked="checked"' : '' ?>>
3150
+ <span class="fm-popover <?php echo $row->type == 'popover' ? ' active' : '' ?>"></span>
3151
+ <p>Popup</p>
3152
+ </label>
3153
+ <label>
3154
+ <input type="radio" name="form_type" value="topbar" onclick="change_form_type('topbar'); change_hide_show('fm-topbar');"
3155
+ <?php echo $row->type == 'topbar' ? 'checked="checked"' : '' ?>>
3156
+ <span class="fm-topbar <?php echo $row->type == 'topbar' ? ' active' : '' ?>"></span>
3157
+ <p>Topbar</p>
3158
+ </label>
3159
+ <label>
3160
+ <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"' : '' ?>>
3161
+ <span class="fm-scrollbox <?php echo $row->type == 'scrollbox' ? ' active' : '' ?>"></span>
3162
+ <p>Scrollbox</p>
3163
+ </label>
3164
+ </div>
3165
+ <br /><br />
3166
+ <table class="admintable">
3167
+ <tr class="fm-embedded <?php echo $row->type == 'embedded' ? 'fm-show' : 'fm-hide' ?>">
3168
+ <td class="fm_options_label">
3169
+ <label>Form Placement</label>
3170
+ </td>
3171
+ <td class="fm_options_value">
3172
+ Use <input type="text" value='[Form id="<?php echo $row->form_id; ?>"]' onclick="fm_select_value(this)" readonly="readonly" style="width:155px !important;"/> shortcode to display the form.
3173
+ </td>
3174
+ </tr>
3175
+ <tr class="fm-popover <?php echo $row->type == 'popover' ? 'fm-show' : 'fm-hide' ?>">
3176
+ <td class="fm_options_label">
3177
+ <label>Animation Effect</label>
3178
+ </td>
3179
+ <td class="fm_options_value">
3180
+ <select id="popover_animate_effect" name="popover_animate_effect">
3181
+ <?php
3182
+ foreach($animation_effects as $anim_key => $animation_effect){
3183
+ $selected = $row->popover_animate_effect == $anim_key ? 'selected="selected"' : '';
3184
+ echo '<option value="'.$anim_key.'" '.$selected.'>'.$animation_effect.'</option>';
3185
+ }
3186
+ ?>
3187
+ </select>
3188
+ </td>
3189
+ </tr>
3190
+
3191
+ <tr class="fm-popover <?php echo $row->type != 'popover' ? 'fm-hide' : 'fm-show'; ?>">
3192
+ <td class="fm_options_label">
3193
+ <label>Loading Delay</label>
3194
+ </td>
3195
+ <td class="fm_options_value">
3196
+ <input type="number" name="popover_loading_delay" value="<?php echo $row->popover_loading_delay; ?>" /> seconds
3197
+ <div>Define the amount of time before the form popup appears after the page loads. Set 0 for no delay.
3198
+ </div>
3199
+ </td>
3200
+ </tr>
3201
+ <tr class="fm-popover <?php echo $row->type == 'popover' ? 'fm-show' : 'fm-hide' ?>">
3202
+ <td class="fm_options_label">
3203
+ <label>Frequency</label>
3204
+ </td>
3205
+ <td class="fm_options_value">
3206
+ <input type="number" name="popover_frequency" value="<?php echo $row->popover_frequency; ?>" /> days
3207
+ <div>Display the popup to the same visitor (who has closed the popup/submitted the form) after this period. Set the value to 0 to always show.
3208
+ </div>
3209
+ </td>
3210
+ </tr>
3211
+ <tr class="fm-topbar <?php echo $row->type == 'topbar' ? 'fm-show' : 'fm-hide' ?>">
3212
+ <td class="fm_options_label">
3213
+ <label>Position</label>
3214
+ </td>
3215
+ <td class="fm_options_value">
3216
+ <button name="topbar_position" class="fm-checkbox-radio-button <?php echo $row->topbar_position == 1 ? 'fm-text-yes' : 'fm-text-no' ?> medium" onclick="fm_change_radio_checkbox_text(this); fm_show_hide('topbar_remain_top'); return false;" value="<?php echo $row->topbar_position == 1 ? '1' : '0' ?>">
3217
+ <label><?php echo $row->topbar_position == 1 ? 'Top' : 'Bottom' ?></label>
3218
+ <span></span>
3219
+ </button>
3220
+ <input type="hidden" name="topbar_position" value="<?php echo $row->topbar_position; ?>"/>
3221
+ </td>
3222
+ </tr>
3223
+ <tr class="fm-topbar topbar_remain_top <?php echo $row->type != 'topbar' ? 'fm-hide' : ($row->topbar_position == 1 ? 'fm-show' : 'fm-hide') ?>">
3224
+ <td class="fm_options_label">
3225
+ <label>Remain at top when scrolling</label>
3226
+ </td>
3227
+ <td class="fm_options_value">
3228
+ <button class="fm-checkbox-radio-button <?php echo $row->topbar_remain_top == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->topbar_remain_top; ?>">
3229
+ <span></span>
3230
+ </button>
3231
+ <input type="hidden" name="topbar_remain_top" value="<?php echo $row->topbar_remain_top; ?>"/>
3232
+ </td>
3233
+ </tr>
3234
+ <tr class="fm-topbar <?php echo $row->type == 'topbar' ? 'fm-show' : 'fm-hide' ?>">
3235
+ <td class="fm_options_label">
3236
+ <label>Allow Closing the bar</label>
3237
+ </td>
3238
+ <td class="fm_options_value">
3239
+ <button class="fm-checkbox-radio-button <?php echo $row->topbar_closing == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->topbar_closing; ?>">
3240
+ <span></span>
3241
+ </button>
3242
+ <input type="hidden" name="topbar_closing" value="<?php echo $row->topbar_closing; ?>"/>
3243
+ </td>
3244
+ </tr>
3245
+ <tr class="fm-topbar topbar_hide_duration <?php echo $row->type != 'topbar' ? 'fm-hide' : 'fm-show' ?>">
3246
+ <td class="fm_options_label">
3247
+ <label>Frequency</label>
3248
+ </td>
3249
+ <td class="fm_options_value">
3250
+ <input type="number" name="topbar_hide_duration" value="<?php echo $row->topbar_hide_duration; ?>"/>days
3251
+ <div>Display the topbar to the same visitor (who has closed the popup/submitted the form) after this period. Set the value to 0 to always show.
3252
+ </div>
3253
+ </td>
3254
+ </tr>
3255
+
3256
+ <tr class="fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
3257
+ <td class="fm_options_label">
3258
+ <label>Position</label>
3259
+ </td>
3260
+ <td class="fm_options_value">
3261
+ <button name="scrollbox_position" class="fm-checkbox-radio-button <?php echo $row->scrollbox_position == 1 ? 'fm-text-yes' : 'fm-text-no' ?> medium" onclick="fm_change_radio_checkbox_text(this); return false;" value="<?php echo $row->scrollbox_position == 1 ? '1' : '0' ?>">
3262
+ <label><?php echo $row->scrollbox_position == 1 ? 'Right' : 'Left' ?></label>
3263
+ <span></span>
3264
+ </button>
3265
+ <input type="hidden" name="scrollbox_position" value="<?php echo $row->scrollbox_position; ?>"/>
3266
+ </td>
3267
+ </tr>
3268
+ <tr class="fm-scrollbox <?php echo $row->type != 'scrollbox' ? 'fm-hide' : 'fm-show'; ?>">
3269
+ <td class="fm_options_label">
3270
+ <label>Loading Delay</label>
3271
+ </td>
3272
+ <td class="fm_options_value">
3273
+ <input type="number" name="scrollbox_loading_delay" value="<?php echo $row->scrollbox_loading_delay; ?>" /> seconds
3274
+ <div>Define the amount of time before the form scrollbox appears after the page loads. Set 0 for no delay.
3275
+ </div>
3276
+ </td>
3277
+ </tr>
3278
+ <tr class="fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
3279
+ <td class="fm_options_label">
3280
+ <label>Frequency</label>
3281
+ </td>
3282
+ <td class="fm_options_value">
3283
+ <input type="number" name="scrollbox_hide_duration" value="<?php echo $row->scrollbox_hide_duration; ?>"/>days
3284
+ <div>Display the scrollbox to the same visitor (who has closed the popup/submitted the form) after this period. Set the value to 0 to always show.
3285
+ </div>
3286
+ </td>
3287
+ </tr>
3288
+
3289
+ <tr class="fm-popover fm-topbar fm-scrollbox <?php echo $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
3290
+ <td class="fm_options_label">
3291
+ <label>Always show for administrator</label>
3292
+ </td>
3293
+ <td class="fm_options_value">
3294
+ <button class="fm-checkbox-radio-button <?php echo $row->show_for_admin == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->show_for_admin; ?>">
3295
+ <span></span>
3296
+ </button>
3297
+ <input type="hidden" name="show_for_admin" value="<?php echo $row->show_for_admin; ?>"/>
3298
+ <div>If this option is enabled, website admins will always see the form.</div>
3299
+ </td>
3300
+ </tr>
3301
+
3302
+ <tr class="fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
3303
+ <td class="fm_options_label">
3304
+ <label>Trigger Point</label>
3305
+ </td>
3306
+ <td class="fm_options_value">
3307
+ <input type="number" name="scrollbox_trigger_point" value="<?php echo $row->scrollbox_trigger_point; ?>"/>%
3308
+ <div>Set the percentage of the page height, where the scrollbox form will appear after scrolling down.</div>
3309
+ </td>
3310
+ </tr>
3311
+ <tr class="fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
3312
+ <td class="fm_options_label">
3313
+ <label>Allow Closing the bar</label>
3314
+ </td>
3315
+ <td class="fm_options_value">
3316
+ <button class="fm-checkbox-radio-button <?php echo $row->scrollbox_closing == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->scrollbox_closing; ?>">
3317
+ <span></span>
3318
+ </button>
3319
+ <input type="hidden" name="scrollbox_closing" value="<?php echo $row->scrollbox_closing; ?>"/>
3320
+ </td>
3321
+ </tr>
3322
+ <tr class="fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
3323
+ <td class="fm_options_label">
3324
+ <label>Allow Minimize</label>
3325
+ </td>
3326
+ <td class="fm_options_value">
3327
+ <button class="fm-checkbox-radio-button <?php echo $row->scrollbox_minimize == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); fm_show_hide('minimize_text'); return false;" value="<?php echo $row->scrollbox_minimize; ?>">
3328
+ <span></span>
3329
+ </button>
3330
+ <input type="hidden" name="scrollbox_minimize" value="<?php echo $row->scrollbox_minimize; ?>"/>
3331
+ </td>
3332
+ </tr>
3333
+ <tr class="fm-scrollbox minimize_text <?php echo $row->type == 'scrollbox' && $row->scrollbox_minimize == 1 ? 'fm-show' : 'fm-hide' ?>">
3334
+ <td class="fm_options_label">
3335
+ <label>Minimize Text</label>
3336
+ </td>
3337
+ <td class="fm_options_value">
3338
+ <input type="text" name="scrollbox_minimize_text" value="<?php echo $row->scrollbox_minimize_text; ?>"/>
3339
+ </td>
3340
+ </tr>
3341
+
3342
+ <tr class="fm-scrollbox <?php echo $row->type == 'scrollbox' ? 'fm-show' : 'fm-hide' ?>">
3343
+ <td class="fm_options_label">
3344
+ <label>Auto Hide</label>
3345
+ </td>
3346
+ <td class="fm_options_value">
3347
+ <button class="fm-checkbox-radio-button <?php echo $row->scrollbox_auto_hide == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->scrollbox_auto_hide; ?>">
3348
+ <span></span>
3349
+ </button>
3350
+ <input type="hidden" name="scrollbox_auto_hide" value="<?php echo $row->scrollbox_auto_hide; ?>"/>
3351
+ <div>Hide the scrollbox form again when visitor scrolls back up.</div>
3352
+ </td>
3353
+ </tr>
3354
+ <tr class="fm-popover fm-topbar fm-scrollbox <?php echo $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
3355
+ <td class="fm_options_label">
3356
+ <label>Display on</label>
3357
+ </td>
3358
+ <td class="fm_options_value">
3359
+ <ul class="pp_display pp_display_on"><?php
3360
+ $posts_and_pages = $this->model->fm_posts_query();
3361
+ $stat_types = array('everything' => 'All', 'home' => 'Homepage', 'archive' => 'Archives');
3362
+
3363
+ $def_post_types = array('post' => 'Post', 'page' => 'Page');
3364
+ $custom_post_types = get_post_types( array(
3365
+ 'public' => true,
3366
+ '_builtin' => false,
3367
+ ) );
3368
+
3369
+ $post_types = array_merge($def_post_types, $custom_post_types);
3370
+ $all_types = $stat_types + $post_types;
3371
+ $selected_types = explode(',', $row->display_on);
3372
+ $show_cats = in_array('post', $selected_types);
3373
+ $m = 0;
3374
+ foreach($all_types as $post_key => $post_type){
3375
+ $checked = in_array('everything', $selected_types) || in_array($post_key, $selected_types) ? 'checked="checked"' : '';
3376
+ $postclass = $post_key != 'page' && in_array($post_key, array_keys($def_post_types)) ? 'class="catpost"' : '';
3377
+ echo '<li><input id="pt'.$m.'" type="checkbox" name="display_on[]" value="'.$post_key.'" '.$checked.' '.$postclass.'/><label for="pt'.$m.'">'.$post_type.'</label></li>';
3378
+ $m++;
3379
+ }
3380
+ ?>
3381
+ </ul>
3382
+ </td>
3383
+ </tr>
3384
+ <tr class="fm-popover fm-topbar fm-scrollbox fm-cat-show <?php echo $row->type != 'embedded' && $show_cats ? 'fm-show' : 'fm-hide' ?>">
3385
+ <td class="fm_options_label">
3386
+ <label>Display on these category's posts</label>
3387
+ </td>
3388
+ <td class="fm_options_value">
3389
+ <ul class="pp_display pp_display_on_categories"><?php
3390
+ $categories = $this->model->fm_categories_query();
3391
+ $selected_categories = explode(',', $row->display_on_categories);
3392
+ $current_categories_array = explode(',', $row->current_categories);
3393
+ $m = 0;
3394
+ foreach($categories as $cat_key => $category){
3395
+ $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"' : '';
3396
+
3397
+ echo '<li><input id="cat'.$m.'" type="checkbox" name="display_on_categories[]" value="'.$cat_key.'" '.$checked.'/><label for="cat'.$m.'">'.$category.'</label></li>';
3398
+ $m++;
3399
+ }
3400
+ $auto_check = (!$row->current_categories && !$row->display_on_categories) || in_array('auto_check_new', $selected_categories) ? 'checked="checked"' : '';
3401
+ echo '<li><br/><input id="cat'.$m.'" type="checkbox" name="display_on_categories[]" value="auto_check_new" '.$auto_check.'/><label for="cat'.$m.'">Automatically check new categories</label></li>';
3402
+ $current_categories = !$row->current_categories && !$row->display_on_categories ? implode(',', array_keys($categories)) : $row->current_categories;
3403
+ ?>
3404
+ </ul>
3405
+ <input type="hidden" name="current_categories" value="<?php echo $current_categories; ?>"/>
3406
+ </td>
3407
+ </tr>
3408
+ <tr class="fm-popover fm-topbar fm-scrollbox fm-posts-show <?php echo (in_array('everything', $selected_types) || in_array('post', $selected_types)) && $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
3409
+ <td class="fm_options_label">
3410
+ <label>Display on these posts</label>
3411
+ </td>
3412
+ <td class="fm_options_value">
3413
+ <div class="fm-mini-heading">Click on input area to view the list of posts. If left empty the form will appear on all posts.</div>
3414
+ <p>Posts defined below will override all settings above.</p>
3415
+ <ul class="fm-pp">
3416
+ <li class="pp_selected"><?php if($row->posts_include){
3417
+ $posts_include = explode(',', $row->posts_include);
3418
+ foreach($posts_include as $post_exclude){
3419
+ if(isset($posts_and_pages[$post_exclude])){
3420
+ $ptitle = $posts_and_pages[$post_exclude]['title'];
3421
+ $ptype = $posts_and_pages[$post_exclude]['post_type'];
3422
+ echo '<span data-post_id="'.$post_exclude.'">['.$ptype.'] - '.$ptitle.'<span class="pp_selected_remove">x</span></span>';
3423
+ }
3424
+ }
3425
+ } ?></li>
3426
+ <li>
3427
+ <input type="text" class="pp_search_posts" value="" data-post_type="only_posts" style="width: 100% !important;" />
3428
+ <input type="hidden" class="pp_exclude" name="posts_include" value="<?php echo $row->posts_include; ?>" />
3429
+ <span class="fm-loading"></span>
3430
+ </li>
3431
+ <li class="pp_live_search fm-hide">
3432
+ <ul class="pp_search_results">
3433
+
3434
+ </ul>
3435
+ </li>
3436
+ </ul>
3437
+ </td>
3438
+ </tr>
3439
+ <tr class="fm-popover fm-topbar fm-scrollbox fm-pages-show <?php echo (in_array('everything', $selected_types) || in_array('page', $selected_types)) && $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
3440
+ <td class="fm_options_label">
3441
+ <label>Display on these pages</label>
3442
+ </td>
3443
+ <td class="fm_options_value">
3444
+ <div class="fm-mini-heading">Click on input area to view the list of pages. If left empty the form will appear on all pages.</div>
3445
+ <p>Pages defined below will override all settings above.</p>
3446
+ <ul class="fm-pp">
3447
+ <li class="pp_selected"><?php if($row->pages_include){
3448
+ $pages_include = explode(',', $row->pages_include);
3449
+ foreach($pages_include as $page_exclude){
3450
+ if(isset($posts_and_pages[$page_exclude])){
3451
+ $ptitle = $posts_and_pages[$page_exclude]['title'];
3452
+ $ptype = $posts_and_pages[$page_exclude]['post_type'];
3453
+ echo '<span data-post_id="'.$page_exclude.'">['.$ptype.'] - '.$ptitle.'<span class="pp_selected_remove">x</span></span>';
3454
+ }
3455
+ }
3456
+ } ?></li>
3457
+ <li>
3458
+ <input type="text" class="pp_search_posts" value="" data-post_type="only_pages" style="width: 100% !important;" />
3459
+ <input type="hidden" class="pp_exclude" name="pages_include" value="<?php echo $row->pages_include; ?>" />
3460
+ <span class="fm-loading"></span>
3461
+ </li>
3462
+ <li class="pp_live_search fm-hide">
3463
+ <ul class="pp_search_results">
3464
+ </ul>
3465
+ </li>
3466
+ </ul>
3467
+ </td>
3468
+ </tr>
3469
+ <tr class="fm-popover fm-topbar fm-scrollbox <?php echo $row->type != 'embedded' ? 'fm-show' : 'fm-hide' ?>">
3470
+ <td class="fm_options_label">
3471
+ <label>Hide on Mobile</label>
3472
+ </td>
3473
+ <td class="fm_options_value">
3474
+ <button class="fm-checkbox-radio-button <?php echo $row->hide_mobile == 1 ? 'fm-yes' : 'fm-no' ?>" onclick="fm_change_radio(this); return false;" value="<?php echo $row->hide_mobile; ?>">
3475
+ <span></span>
3476
+ </button>
3477
+ <input type="hidden" name="hide_mobile" value="<?php echo $row->hide_mobile; ?>"/>
3478
+ </td>
3479
+ </tr>
3480
+
3481
+ </table>
3482
+ </fieldset>
3483
+ </div>
3484
+ </form>
3485
+ <?php
3486
+ }
3487
+
3488
+ }
admin/views/FMViewSelect_data_from_db.php CHANGED
@@ -252,6 +252,8 @@ class FMViewSelect_data_from_db {
252
  document.getElementById('db_field_value').style.display = "none";
253
  }
254
 
 
 
255
  if(jQuery('#value_disabled').val()=='no')
256
  jQuery('.ch_rad_value_disabled').hide();
257
 
@@ -700,7 +702,7 @@ function gen_query(){
700
 
701
  ?>
702
  </select>
703
- </div>
704
  <div class="select-db-op where"><img src="<?php echo WD_FM_URL . '/images/add_condition.png?ver='. get_option("wd_form_maker_version").''; ?>" title="ADD" class="add_cond"/>WHERE</div>
705
 
706
  </div>
252
  document.getElementById('db_field_value').style.display = "none";
253
  }
254
 
255
+
256
+
257
  if(jQuery('#value_disabled').val()=='no')
258
  jQuery('.ch_rad_value_disabled').hide();
259
 
702
 
703
  ?>
704
  </select>
705
+ </div>
706
  <div class="select-db-op where"><img src="<?php echo WD_FM_URL . '/images/add_condition.png?ver='. get_option("wd_form_maker_version").''; ?>" title="ADD" class="add_cond"/>WHERE</div>
707
 
708
  </div>
admin/views/FMViewSubmissions_fm.php CHANGED
@@ -1,30 +1,14 @@
1
  <?php
2
 
3
  class FMViewSubmissions_fm {
4
- ////////////////////////////////////////////////////////////////////////////////////////
5
- // Events //
6
- ////////////////////////////////////////////////////////////////////////////////////////
7
- ////////////////////////////////////////////////////////////////////////////////////////
8
- // Constants //
9
- ////////////////////////////////////////////////////////////////////////////////////////
10
- ////////////////////////////////////////////////////////////////////////////////////////
11
- // Variables //
12
- ////////////////////////////////////////////////////////////////////////////////////////
13
  private $model;
14
 
15
- ////////////////////////////////////////////////////////////////////////////////////////
16
- // Constructor & Destructor //
17
- ////////////////////////////////////////////////////////////////////////////////////////
18
  public function __construct($model) {
19
- $this->model = $model;
20
  }
21
 
22
- ////////////////////////////////////////////////////////////////////////////////////////
23
- // Public Methods //
24
- ////////////////////////////////////////////////////////////////////////////////////////
25
  public function display($form_id) {
26
-
27
-
28
  global $wpdb;
29
  $forms = $this->model->get_form_titles();
30
  $statistics = $this->model->get_statistics($form_id);
@@ -39,7 +23,6 @@ class FMViewSubmissions_fm {
39
  $group_ids = ((isset($labels_parameters[6])) ? $labels_parameters[6] : NULL);
40
  $where_choices = $labels_parameters[7];
41
  $searched_ids = $labels_parameters[8] ? implode(',', $labels_parameters[8]) : '';
42
-
43
  $order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'group_id');
44
  $asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'asc') ? 'asc' : 'desc');
45
  $style_id = $this->model->hide_or_not($lists['hide_label_list'], '@submitid@');
@@ -57,7 +40,6 @@ class FMViewSubmissions_fm {
57
  $n = count($rows);
58
  $group_id_s = array();
59
  $group_id_s = $this->model->sort_group_ids(count($sorted_label_names),$group_ids);
60
-
61
  $ka_fielderov_search = (($lists['ip_search'] || $lists['startdate'] || $lists['enddate'] || $lists['username_search'] || $lists['useremail_search'] || $lists['id_search']) ? TRUE : FALSE);
62
  $is_stats = false;
63
  $blocked_ips = $this->model->blocked_ips();
@@ -78,6 +60,7 @@ class FMViewSubmissions_fm {
78
  $verified_emails = array();
79
  ?>
80
  <script type="text/javascript">
 
81
  function export_submissions(type, limit) {
82
  var progressbar = jQuery( "#fm-progressbar" );
83
  var progressLabel = jQuery( ".fm-progress-label" );
@@ -205,7 +188,6 @@ class FMViewSubmissions_fm {
205
  document.getElementById('<?php echo $form_id . '_' . $sorted_labels_id[$i] . '_search'; ?>').value='';
206
  <?php
207
  }
208
-
209
  if ($sorted_label_types[$i] == "type_submitter_mail") { ?>
210
  if(document.getElementById('<?php echo $form_id . '_' . $sorted_labels_id[$i] . '_search_verified'; ?>')) {
211
  document.getElementById('<?php echo $form_id . '_' . $sorted_labels_id[$i] . '_search_verified'; ?>').checked = false;
@@ -261,7 +243,7 @@ class FMViewSubmissions_fm {
261
  }
262
  $ispaypal = FALSE;
263
  for ($i = 0; $i < count($sorted_label_names); $i++) {
264
- if ($sorted_label_types[$i] == 'type_paypal_payment_status') {
265
  $ispaypal = TRUE;
266
  }
267
  }
@@ -279,22 +261,20 @@ class FMViewSubmissions_fm {
279
  </div>
280
  </form>
281
  </div>
282
- <div class="fm-clear"></div>
283
  <form action="admin.php?page=submissions_fm" method="post" id="admin_form" name="admin_form">
284
  <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
285
- <input type="hidden" name="option" value="com_formmaker" />
286
  <input type="hidden" id="task" name="task" value="" />
287
  <input type="hidden" id="current_id" name="current_id" value="" />
288
  <input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php echo $asc_or_desc; ?>" />
289
  <input type="hidden" name="order_by" id="order_by" value="<?php echo $order_by; ?>" />
290
-
291
  <div class="fm-submissions-page wrap">
292
  <div class="submissions-actions">
293
  <div class="fm-form-title">
294
  <?php echo $chosen_form_title; ?>
295
  </div>
296
  <div class="fm-page-actions">
297
- <button class="fm-button block-button small" onclick="fm_set_input_value('task', 'block_ip'); fm_form_submit(event, 'admin_form');">
298
  <span></span>
299
  Block IP
300
  </button>
@@ -302,7 +282,7 @@ class FMViewSubmissions_fm {
302
  <span></span>
303
  Unblock IP
304
  </button>
305
- <button class="fm-button delete-button small" onclick="if (confirm('Do you want to delete selected items?')) { fm_set_input_value('task', 'delete_all'); fm_form_submit(event, 'admin_form'); } else { return false; }">
306
  <span></span>
307
  Delete
308
  </button>
@@ -345,13 +325,12 @@ class FMViewSubmissions_fm {
345
  <button class="fm-button show-filter-button medium" onclick="show_hide_filter(); return false;" title="Show Filters">
346
  <span></span>
347
  Show Filters
348
-
349
  </button>
350
- <button class="fm-button search-button small" onclick="fm_form_submit(event, 'admin_form'); return false;" title="Search">
351
  <span></span>
352
  Search
353
  </button>
354
- <button class="fm-button reset-button small" 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;" title="Reset">
355
  <span></span>
356
  Reset
357
  </button>
@@ -361,14 +340,15 @@ class FMViewSubmissions_fm {
361
  <button class="fm-button" onclick="toggleChBDiv(true); return false;">
362
  Add/Remove Columns
363
  </button>
364
- <?php WDW_FM_Library::html_page_nav($lists['total'], $lists['limit'], 'admin_form'); ?>
 
365
  <?php } ?>
366
  <input type="hidden" name="pagination_clicked" id="pagination_clicked" value=""/>
367
  </div>
368
  </div>
369
  <div class="fm-clear"></div>
370
  </div>
371
-
372
  <div class="fm-loading-container" style="display:none;">
373
  <div class="fm-loading-content">
374
  </div>
@@ -426,21 +406,28 @@ class FMViewSubmissions_fm {
426
  </a>
427
  </th>
428
  <?php
 
429
  for ($i = 0; $i < count($sorted_label_names); $i++) {
430
  $styleStr = $this->model->hide_or_not($lists['hide_label_list'], $sorted_labels_id[$i]);
431
  $styleStr2 = $this->model->hide_or_not($lists['hide_label_list'] , '@payment_info@');
432
  $field_title = $this->model->get_type_address($sorted_label_types[$i], $sorted_label_names_original[$i]);
433
- if ($sorted_label_types[$i] == 'type_paypal_payment_status') {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
434
  $ispaypal = TRUE;
435
- ?>
436
- <th <?php echo $styleStr; ?> id="<?php echo $sorted_labels_id[$i] . '_fc'; ?>" class="table_large_col <?php echo $sorted_labels_id[$i] . '_fc'; if ($order_by == $sorted_labels_id[$i] . "_field") echo $oder_class . '"';else echo $oder_class_default . '"'; ?>">
437
- <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')">
438
- <span><?php echo $field_title; ?></span>
439
- <span class="sorting-indicator"></span>
440
- </a>
441
- </th>
442
- <th class="table_large_col payment_info_fc" <?php echo $styleStr2; ?>>Payment Info</th>
443
- <?php
444
  }
445
  else {
446
  ?>
@@ -456,12 +443,16 @@ class FMViewSubmissions_fm {
456
  ?>
457
  </tr>
458
  <tr id="fields_filter" style="display: none;">
 
459
  <th></th>
 
 
460
  <th></th>
 
461
  <th class="submitid_fc" <?php echo $style_id; ?> >
462
  <input type="text" name="id_search" id="id_search" value="<?php echo $lists['id_search'] ?>" onChange="this.form.submit();" style="width:30px"/>
463
  </th>
464
- <th></th>
465
  <th></th>
466
  <th></th>
467
  <th width="150" class="submitdate_fc" <?php echo $style_date; ?>>
@@ -497,6 +488,8 @@ class FMViewSubmissions_fm {
497
  </th>
498
  <?php
499
  for ($i = 0; $i < count($sorted_label_names); $i++) {
 
 
500
  $styleStr = $this->model->hide_or_not($lists['hide_label_list'], $sorted_labels_id[$i]);
501
  if (!$ka_fielderov_search) {
502
  if ($lists[$form_id . '_' . $sorted_labels_id[$i] . '_search'] || isset($lists[$form_id . '_' . $sorted_labels_id[$i] . '_search_verified'])) {
@@ -590,19 +583,19 @@ class FMViewSubmissions_fm {
590
  <td class="table_small_col count_col sub-align"><?php echo $www + 1; ?></td>
591
  <td class="check-column table_small_col sub-align" style="padding: 0;">
592
  <input type="checkbox" name="post[]" value="<?php echo $data->group_id; ?>">
593
- </td>
594
  <td class="table_small_col sub-align submitid_fc" id="submitid_fc" <?php echo $style_id; ?>>
595
  <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');" >
596
  <?php echo $data->group_id; ?>
597
  </a>
598
- </td>
599
  <td class="table_small_col submitdate_fc sub-align" id="view_submissions">
600
  <a href="<?php echo add_query_arg(array('action' => 'FormMakerSubmits', 'form_id' => $data->form_id, 'group_id' => $data->group_id, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>"
601
  class="thickbox thickbox-preview"
602
  title="<?php echo __("Show submission","form_maker"); ?>"
603
- onclick="return false;"><img src="<?php echo WD_FM_URL . '/images/view-icon.png'; ?>">
604
  </a>
605
- </td>
606
  <td class="table_small_col sub-align">
607
  <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');">Edit
608
  </a>
@@ -616,7 +609,7 @@ class FMViewSubmissions_fm {
616
  </a>
617
  </td>
618
  <td class="table_medium_col_uncenter submitterip_fc sub-align" id="submitterip_fc" <?php echo $style_ip; ?>>
619
- <a class="thickbox-preview" href="<?php echo add_query_arg(array('action' => 'fromipinfoinpopup', 'data_ip' => $data->ip, 'width' => '400', 'height' => '300', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" title="Show submitter information" <?php echo (!in_array($data->ip, $blocked_ips)) ? '' : 'style="color: #FF0000;"'; ?>><?php echo $data->ip; ?></a>
620
  </td>
621
  <td class="table_large_col submitterusername_fc sub-align" id="submitterusername_fc" <?php echo $style_username; ?>>
622
  <?php echo $username; ?>
@@ -626,6 +619,8 @@ class FMViewSubmissions_fm {
626
  </td>
627
  <?php
628
  for ($h = 0; $h < $m; $h++) {
 
 
629
  $not_label = TRUE;
630
  for ($g = 0; $g < count($temp); $g++) {
631
  $styleStr = $this->model->hide_or_not($lists['hide_label_list'], $sorted_labels_id[$h]);
@@ -663,15 +658,13 @@ class FMViewSubmissions_fm {
663
  <td align="center" class="<?php echo $sorted_labels_id[$h];?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>><?php echo $stars; ?></td>
664
  <?php
665
  }
666
-
667
  elseif (strpos($temp[$g]->element_value, "***matrix***")) {
668
- ?>
669
- <td class="table_large_col <?php echo $sorted_labels_id[$h];?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>>
670
- <a class="thickbox-preview" href="<?php echo add_query_arg(array('action' => 'show_matrix', 'matrix_params' => str_replace('#','%23', urlencode($temp[$g]->element_value)), 'width' => '620', 'height' => '550', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" title="Show Matrix">Show Matrix</a>
671
- </td>
672
- <?php
673
  }
674
-
675
  elseif (strpos($temp[$g]->element_value, "@@@") !== FALSE || $temp[$g]->element_value == "@@@" || $temp[$g]->element_value == "@@@@@@@@@") {
676
  ?>
677
  <td class="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>>
@@ -700,7 +693,7 @@ class FMViewSubmissions_fm {
700
  $query = $wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'formmaker_submits WHERE form_id ="%d" AND group_id="%d" AND element_value="verified**%d"', $form_id, $i, $sorted_labels_id[$h]);
701
  $isverified = $wpdb->get_var($query);
702
 
703
- if($isverified) {
704
  if(!isset($verified_emails[$sorted_labels_id[$h]]))
705
  $verified_emails[$sorted_labels_id[$h]] = array();
706
 
@@ -1219,3760 +1212,6 @@ class FMViewSubmissions_fm {
1219
  </form>
1220
  <?php
1221
  }
1222
-
1223
- public function new_edit($id, $form_id) {
1224
- global $wpdb;
1225
- $labels_parameters = $this->model->get_labels_parameters($form_id);
1226
- $current_id = ((isset($id)) ? $id : 0);
1227
- $params = $this->model->get_data_of_group_id($current_id);
1228
- $rows = $params[0];
1229
- $labels_id = $params[1];
1230
- $labels_name = $params[2];
1231
- $labels_type = $params[3];
1232
- $ispaypal = $params[4];
1233
- $form = $params[5];
1234
- $form_theme = $params[6];
1235
- $userinfo = get_userdata($rows[0]->user_id_wd);
1236
- $username = $userinfo ? $userinfo->display_name : "";
1237
- $useremail = $userinfo ? $userinfo->user_email : "";
1238
-
1239
- //////// filters, ordering //////////////////
1240
-
1241
- $sorted_labels_id = $labels_parameters[0];
1242
- $sorted_label_types = $labels_parameters[1];
1243
- $lists = $labels_parameters[2];
1244
- $sorted_label_names = $labels_parameters[3];
1245
-
1246
- $order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'group_id');
1247
- $asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'asc') ? 'asc' : 'desc');
1248
- $style_id = $this->model->hide_or_not($lists['hide_label_list'], '@submitid@');
1249
- $style_date = $this->model->hide_or_not($lists['hide_label_list'], '@submitdate@');
1250
- $style_ip = $this->model->hide_or_not($lists['hide_label_list'], '@submitterip@');
1251
- $ka_fielderov_search = (($lists['ip_search'] || $lists['startdate'] || $lists['enddate'] || $lists['username_search'] || $lists['useremail_search'] || $lists['id_search']) ? TRUE : FALSE);
1252
- $style_username = $this->model->hide_or_not($lists['hide_label_list'], '@submitterusername@');
1253
- $style_useremail = $this->model->hide_or_not($lists['hide_label_list'], '@submitteremail@');
1254
-
1255
- if (defined('WD_FM_PDF') && is_plugin_active(constant('WD_FM_PDF'))) {
1256
- require_once(WD_FM_PDF_DIR.'/model.php');
1257
- $pdf_data = WD_FM_PDF_model::get_pdf_data($form_id);
1258
- }
1259
- ?>
1260
- <div class="fm-clear"></div>
1261
- <form action="admin.php?page=submissions_fm" method="post" id="formform_id_temp" name="formform_id_temp">
1262
- <table style="display:none;">
1263
- <tr id="fields_filter" >
1264
- <?php if (defined('WD_FM_PDF') && is_plugin_active(constant('WD_FM_PDF'))): ?>
1265
- <th></th>
1266
- <?php endif; ?>
1267
- <th></th>
1268
- <th></th>
1269
- <th class="submitid_fc" <?php echo $style_id; ?> >
1270
- <input type="text" name="id_search" id="id_search" value="<?php echo $lists['id_search'] ?>" onChange="this.form.submit();" style="width:30px"/>
1271
- </th>
1272
- <th></th>
1273
- <th></th>
1274
- <th width="150" class="submitdate_fc" <?php echo $style_date; ?>>
1275
- <table align="center" style="margin:auto" class="simple_table">
1276
- <tr class="simple_table">
1277
- <td class="simple_table" style="text-align: left;">From:</td>
1278
- <td style="text-align: center;" class="simple_table">
1279
- <input class="inputbox" type="text" name="startdate" id="startdate" size="10" maxlength="10" value="<?php echo $lists['startdate']; ?>" />
1280
- </td>
1281
- <td style="text-align: center;" class="simple_table">
1282
- <input type="reset" style="width: 22px; border-radius: 3px !important;" class="button" value="..." onclick="return showCalendar('startdate','%Y-%m-%d');" />
1283
- </td>
1284
- </tr>
1285
- <tr class="simple_table">
1286
- <td style="text-align: left;" class="simple_table">To:</td>
1287
- <td style="text-align: center;" class="simple_table">
1288
- <input class="inputbox" type="text" name="enddate" id="enddate" size="10" maxlength="10" value="<?php echo $lists['enddate']; ?>" />
1289
- </td>
1290
- <td style="text-align: center;" class="simple_table">
1291
- <input type="reset" style="width: 22px; border-radius: 3px !important;" class="button" value="..." onclick="return showCalendar('enddate','%Y-%m-%d');" />
1292
- </td>
1293
- </tr>
1294
- </table>
1295
- </th>
1296
- <th class="table_medium_col_uncenter submitterip_fc" <?php echo $style_ip; ?>>
1297
- <input type="text" name="ip_search" id="ip_search" value="<?php echo $lists['ip_search']; ?>" onChange="this.form.submit();" />
1298
- </th>
1299
- <th class="table_medium_col_uncenter submitterusername_fc" <?php echo $style_username; ?>>
1300
- <input type="text" name="username_search" id="username_search" value="<?php echo $lists['username_search']; ?>" onChange="this.form.submit();" />
1301
- </th>
1302
- <th class="table_medium_col_uncenter submitteremail_fc" <?php echo $style_useremail; ?>>
1303
- <input type="text" name="useremail_search" id="useremail_search" value="<?php echo $lists['useremail_search']; ?>" onChange="this.form.submit();" />
1304
- </th>
1305
- <?php
1306
- for ($i = 0; $i < count($sorted_label_names); $i++) {
1307
- if($sorted_label_types[$i] == 'type_stripe')
1308
- continue;
1309
- $styleStr = $this->model->hide_or_not($lists['hide_label_list'], $sorted_labels_id[$i]);
1310
- if (!$ka_fielderov_search) {
1311
- if ($lists[$form_id . '_' . $sorted_labels_id[$i] . '_search'] || isset($lists[$form_id . '_' . $sorted_labels_id[$i] . '_search_verified'])) {
1312
- $ka_fielderov_search = TRUE;
1313
- }
1314
- }
1315
- switch ($sorted_label_types[$i]) {
1316
- case 'type_mark_map': ?>
1317
- <th class="table_large_col <?php echo $sorted_labels_id[$i]; ?>_fc" <?php echo $styleStr; ?>></th>
1318
- <?php
1319
- break;
1320
- case 'type_paypal_payment_status': ?>
1321
- <th class="table_large_col <?php echo $sorted_labels_id[$i]; ?>_fc" <?php echo $styleStr; ?>>
1322
- <select style="font-size: 11px; margin: 0; padding: 0; height: inherit;" name="<?php echo $form_id . '_' . $sorted_labels_id[$i]; ?>_search" id="<?php echo $form_id.'_'.$sorted_labels_id[$i]; ?>_search" onChange="this.form.submit();" value="<?php echo $lists[$form_id.'_'.$sorted_labels_id[$i].'_search']; ?>" >
1323
- <option value="" ></option>
1324
- <option value="canceled" >Canceled</option>
1325
- <option value="cleared" >Cleared</option>
1326
- <option value="cleared by payment review" >Cleared by payment review</option>
1327
- <option value="completed" >Completed</option>
1328
- <option value="denied" >Denied</option>
1329
- <option value="failed" >Failed</option>
1330
- <option value="held" >Held</option>
1331
- <option value="in progress" >In progress</option>
1332
- <option value="on hold" >On hold</option>
1333
- <option value="paid" >Paid</option>
1334
- <option value="partially refunded" >Partially refunded</option>
1335
- <option value="pending verification" >Pending verification</option>
1336
- <option value="placed" >Placed</option>
1337
- <option value="processing" >Processing</option>
1338
- <option value="refunded" >Refunded</option>
1339
- <option value="refused" >Refused</option>
1340
- <option value="removed" >Removed</option>
1341
- <option value="returned" >Returned</option>
1342
- <option value="reversed" >Reversed</option>
1343
- <option value="temporary hold" >Temporary hold</option>
1344
- <option value="unclaimed" >Unclaimed</option>
1345
- </select>
1346
- <script>
1347
- var element = document.getElementById('<?php echo $form_id.'_'.$sorted_labels_id[$i]; ?>_search');
1348
- element.value = '<?php echo $lists[$form_id.'_'.$sorted_labels_id[$i].'_search']; ?>';
1349
- </script>
1350
- </th>
1351
- <th class="table_large_col payment_info_fc" <?php echo $styleStr2; ?>></th>
1352
- <?php
1353
- break;
1354
- case 'type_submitter_mail':
1355
- $query = $wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'formmaker_submits WHERE form_id ="%d" AND element_label="verifyInfo" AND element_value="verified**%d"', $form_id, $sorted_labels_id[$i]);
1356
- $is_verified_exist = $wpdb->get_var($query);
1357
-
1358
- ?>
1359
- <th class="<?php echo $sorted_labels_id[$i]; ?>_fc" <?php echo $styleStr; ?>>
1360
- <div style="width:220px;">
1361
- <input name="<?php echo $form_id .'_' . $sorted_labels_id[$i].'_search'; ?>" id="<?php echo $form_id .'_' . $sorted_labels_id[$i].'_search'; ?>" type="text" value="<?php echo $lists[$form_id.'_'.$sorted_labels_id[$i].'_search']; ?>" onChange="this.form.submit();" >
1362
- <?php if($is_verified_exist) { ?>
1363
- Verified <input name="<?php echo $form_id .'_' . $sorted_labels_id[$i].'_search_verified'; ?>" id="<?php echo $form_id .'_' . $sorted_labels_id[$i].'_search_verified'; ?>" type="checkbox" <?php if(isset($lists[$form_id.'_'.$sorted_labels_id[$i].'_search_verified'])) echo "checked='checked'";?> onChange="this.form.submit();">
1364
- <?php } ?>
1365
- </div>
1366
- </th>
1367
- <?php
1368
- break;
1369
- default: ?>
1370
- <th class="<?php echo $sorted_labels_id[$i]; ?>_fc" <?php echo $styleStr; ?>>
1371
- <input name="<?php echo $form_id .'_' . $sorted_labels_id[$i].'_search'; ?>" id="<?php echo $form_id .'_' . $sorted_labels_id[$i].'_search'; ?>" type="text" value="<?php echo $lists[$form_id.'_'.$sorted_labels_id[$i].'_search']; ?>" onChange="this.form.submit();" >
1372
- </th>
1373
- <?php
1374
- break;
1375
- }
1376
- }
1377
- ?>
1378
- </tr>
1379
- </table>
1380
- <input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php echo $asc_or_desc; ?>" />
1381
- <input type="hidden" name="order_by" id="order_by" value="<?php echo $order_by; ?>" />
1382
- <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
1383
- <div class="fm-page-header">
1384
- <div class="fm-page-title">Edit Submission</div>
1385
- <div class="fm-page-actions">
1386
- <button class="fm-button save-button small" onclick="pressbutton(); fm_set_input_value('task', 'save'); fm_set_input_value('current_id', <?php echo $current_id ;?>); fm_form_submit(event, 'formform_id_temp');">
1387
- <span></span>
1388
- Save
1389
- </button>
1390
- <button class="fm-button apply-button small" onclick="pressbutton(); fm_set_input_value('task', 'apply'); fm_set_input_value('current_id', <?php echo $current_id ;?>); fm_form_submit(event, 'formform_id_temp');">
1391
- <span></span>
1392
- Apply
1393
- </button>
1394
- <button class="fm-button cancel-button small" onclick="fm_set_input_value('task', '');fm_form_submit(event, 'formform_id_temp');">
1395
- <span></span>
1396
- Cancel
1397
- </button>
1398
- </div>
1399
- <div class="fm-clear"></div>
1400
- </div>
1401
- <div class="fm-submissins-edit">
1402
- <table>
1403
- <tr>
1404
- <td class="fm-key"><label for="ID">ID: </label></td>
1405
- <td><?php echo $rows[0]->group_id; ?></td>
1406
- </tr>
1407
- <tr>
1408
- <td class="fm-key"><label for="Date">Date: </label></td>
1409
- <td><?php echo $rows[0]->date; ?></td>
1410
- </tr>
1411
- <tr>
1412
- <td class="fm-key"><label for="IP">IP: </label></td>
1413
- <td><?php echo $rows[0]->ip; ?></td>
1414
- </tr>
1415
- <tr>
1416
- <td class="fm-key"><label for="Submitter's Username">Submitter's Username: </label></td>
1417
- <td><?php echo $username; ?></td>
1418
- </tr>
1419
- <tr>
1420
- <td class="fm-key"><label for="Submitter's Email Address">Submitter's Email Address: </label></td>
1421
- <td><?php echo $useremail; ?></td>
1422
- </tr>
1423
- </table>
1424
- <?php
1425
- $css_rep1 = array("[SITE_ROOT]");
1426
- $css_rep2 = array(WD_FM_URL);
1427
- $order = array("\r\n", "\n", "\r");
1428
- $form_theme = str_replace($order, '', $form_theme);
1429
- $form_theme = str_replace($css_rep1, $css_rep2, $form_theme);
1430
- $form_theme = "#form" . $form->id . ' ' . $form_theme;
1431
- ?>
1432
- <style>
1433
- <?php
1434
- echo $form_theme;
1435
- ?>
1436
- .wdform-page-and-images{
1437
- width: 50%;
1438
- }
1439
- .wdform-page-and-images div {
1440
- background-color: rgba(0, 0, 0, 0);
1441
- }
1442
- </style>
1443
- <?php
1444
- $form_currency = '$';
1445
- $check_js = '';
1446
- $onload_js = '';
1447
- $onsubmit_js = '';
1448
- $currency_code = array('USD', 'EUR', 'GBP', 'JPY', 'CAD', 'MXN', 'HKD', 'HUF', 'NOK', 'NZD', 'SGD', 'SEK', 'PLN', 'AUD', 'DKK', 'CHF', 'CZK', 'ILS', 'BRL', 'TWD', 'MYR', 'PHP', 'THB');
1449
- $currency_sign = array('$' , '€' , '£' , '¥' , 'C$', 'Mex$', 'HK$', 'Ft' , 'kr' , 'NZ$', 'S$' , 'kr' , 'zl' , 'A$' , 'kr' , 'CHF' , 'Kc', '?' , 'R$' , 'NT$', 'RM' , '?' , '?' );
1450
- $is_type = array();
1451
- $id1s = array();
1452
- $types = array();
1453
- $labels = array();
1454
- $paramss = array();
1455
- $fields = explode('*:*new_field*:*', $form->form_fields);
1456
- $fields = array_slice($fields, 0, count($fields) - 1);
1457
- foreach ($fields as $field) {
1458
- $temp = explode('*:*id*:*',$field);
1459
- array_push($id1s, $temp[0]);
1460
- $temp = explode('*:*type*:*', $temp[1]);
1461
- array_push($types, $temp[0]);
1462
- $temp = explode('*:*w_field_label*:*', $temp[1]);
1463
- array_push($labels, $temp[0]);
1464
- array_push($paramss, $temp[1]);
1465
- }
1466
- $form = $form->form_front;
1467
- $form_id = 'form_id_temp';
1468
- $start = 0;
1469
- foreach ($id1s as $id1s_key => $id1) {
1470
- $label = $labels[$id1s_key];
1471
- $type = $types[$id1s_key];
1472
- $params = $paramss[$id1s_key];
1473
- if ($type != 'type_address') {
1474
- foreach ($rows as $row) {
1475
- if ($row->element_label == $id1) {
1476
- $element_value = $row->element_value;
1477
- break;
1478
- }
1479
- else {
1480
- $element_value = '';
1481
- }
1482
- }
1483
- }
1484
- else {
1485
- for ($i = 0; $i < 6; $i++) {
1486
- $address_value = '';
1487
- foreach ($rows as $row) {
1488
- if ($row->element_label == (string)((int) $id1 + $i)) {
1489
- $address_value = $row->element_value;
1490
- }
1491
- }
1492
- $elements_of_address[$i] = $address_value;
1493
- }
1494
- }
1495
- if (strpos($form, '%' . $id1 . ' - ' . $label . '%')) {
1496
- $rep = '';
1497
- $param = array();
1498
- $param['attributes'] = '';
1499
- $is_type[$type] = TRUE;
1500
- switch ($type) {
1501
- case 'type_section_break':
1502
- case 'type_editor':
1503
- case 'type_file_upload':
1504
- case 'type_captcha':
1505
- case 'type_recaptcha':
1506
- case 'type_mark_map':
1507
- case 'type_map':
1508
- case 'type_submit_reset':
1509
- case 'type_button':
1510
- case 'type_paypal_total':
1511
- break;
1512
-
1513
- case 'type_text': {
1514
- $params_names = array('w_field_label_size','w_field_label_pos','w_size','w_first_val','w_title','w_required','w_unique');
1515
- $temp = $params;
1516
- foreach ($params_names as $params_name ) {
1517
- $temp = explode('*:*'.$params_name.'*:*', $temp);
1518
- $param[$params_name] = $temp[0];
1519
- $temp = $temp[1];
1520
- }
1521
- if ($temp) {
1522
- $temp = explode('*:*w_attr_name*:*', $temp);
1523
- $attrs = array_slice($temp, 0, count($temp) - 1);
1524
- foreach ($attrs as $attr) {
1525
- $param['attributes'] = $param['attributes'].' '.$attr;
1526
- }
1527
- }
1528
- $wdformfieldsize = ($param['w_field_label_pos'] == "left" ? $param['w_field_label_size']+$param['w_size'] : max($param['w_field_label_size'],$param['w_size']));
1529
- $param['w_field_label_pos'] = ($param['w_field_label_pos'] == "left" ? "float: left;" : "display:block;");
1530
- $rep ='<div type="type_text" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].' width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
1531
- $rep.='</div><div class="wdform-element-section" style="width: '.$param['w_size'].'px;" ><input type="text" class="" id="wdform_'.$id1.'_element'.$form_id.'" name="wdform_'.$id1.'_element'.$form_id.'" value="'.$element_value.'" style="width: 100%;" '.$param['attributes'].'></div></div>';
1532
- break;
1533
- }
1534
-
1535
- case 'type_number': {
1536
- $params_names = array('w_field_label_size','w_field_label_pos','w_size','w_first_val','w_title','w_required','w_unique','w_class');
1537
- $temp = $params;
1538
- foreach ($params_names as $params_name ) {
1539
- $temp = explode('*:*'.$params_name.'*:*', $temp);
1540
- $param[$params_name] = $temp[0];
1541
- $temp = $temp[1];
1542
- }
1543
- if ($temp) {
1544
- $temp =explode('*:*w_attr_name*:*',$temp);
1545
- $attrs = array_slice($temp,0, count($temp)-1);
1546
- foreach($attrs as $attr)
1547
- $param['attributes'] = $param['attributes'].' '.$attr;
1548
- }
1549
-
1550
- $wdformfieldsize = ($param['w_field_label_pos']=="left" ? $param['w_field_label_size']+$param['w_size'] : max($param['w_field_label_size'],$param['w_size']));
1551
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
1552
-
1553
- $rep ='<div type="type_number" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section" class="'.$param['w_class'].'" style="'.$param['w_field_label_pos'].' width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
1554
-
1555
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="width: '.$param['w_size'].'px;"><input type="text" class="" id="wdform_'.$id1.'_element'.$form_id.'" name="wdform_'.$id1.'_element'.$form_id.'" value="'.$element_value.'" style="width: 100%;" '.$param['attributes'].'></div></div>';
1556
-
1557
- break;
1558
- }
1559
-
1560
- case 'type_password': {
1561
- $params_names=array('w_field_label_size','w_field_label_pos','w_size','w_required','w_unique','w_class');
1562
- $temp=$params;
1563
-
1564
- foreach($params_names as $params_name ) {
1565
- $temp=explode('*:*'.$params_name.'*:*',$temp);
1566
- $param[$params_name] = $temp[0];
1567
- $temp=$temp[1];
1568
- }
1569
-
1570
- if($temp) {
1571
- $temp =explode('*:*w_attr_name*:*',$temp);
1572
- $attrs = array_slice($temp,0, count($temp)-1);
1573
- foreach($attrs as $attr)
1574
- $param['attributes'] = $param['attributes'].' '.$attr;
1575
- }
1576
-
1577
- $wdformfieldsize = ($param['w_field_label_pos']=="left" ? $param['w_field_label_size']+$param['w_size'] : max($param['w_field_label_size'],$param['w_size']));
1578
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
1579
-
1580
-
1581
- $rep ='<div type="type_password" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section" class="'.$param['w_class'].'" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
1582
-
1583
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="width: '.$param['w_size'].'px;"><input type="password" id="wdform_'.$id1.'_element'.$form_id.'" name="wdform_'.$id1.'_element'.$form_id.'" value="'.$element_value.'" style="width: 100%;" '.$param['attributes'].'></div></div>';
1584
-
1585
-
1586
- break;
1587
- }
1588
-
1589
- case 'type_textarea': {
1590
- $params_names=array('w_field_label_size','w_field_label_pos','w_size_w','w_size_h','w_first_val','w_title','w_required','w_unique','w_class');
1591
- $temp=$params;
1592
-
1593
- foreach($params_names as $params_name ) {
1594
- $temp=explode('*:*'.$params_name.'*:*',$temp);
1595
- $param[$params_name] = $temp[0];
1596
- $temp=$temp[1];
1597
- }
1598
-
1599
-
1600
- if($temp) {
1601
- $temp =explode('*:*w_attr_name*:*',$temp);
1602
- $attrs = array_slice($temp,0, count($temp)-1);
1603
- foreach($attrs as $attr)
1604
- $param['attributes'] = $param['attributes'].' '.$attr;
1605
- }
1606
-
1607
-
1608
-
1609
- $wdformfieldsize = ($param['w_field_label_pos']=="left" ? $param['w_field_label_size']+$param['w_size_w'] : max($param['w_field_label_size'],$param['w_size_w']));
1610
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
1611
-
1612
-
1613
- $rep ='<div type="type_textarea" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
1614
-
1615
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="width: '.$param['w_size_w'].'px"><textarea class="" id="wdform_'.$id1.'_element'.$form_id.'" name="wdform_'.$id1.'_element'.$form_id.'" title="'.$param['w_title'].'" style="width: 100%; height: '.$param['w_size_h'].'px;" '.$param['attributes'].'>'.$element_value.'</textarea></div></div>';
1616
-
1617
-
1618
-
1619
- break;
1620
- }
1621
-
1622
- case 'type_wdeditor': {
1623
- $params_names=array('w_field_label_size','w_field_label_pos','w_size_w','w_size_h','w_title','w_required','w_class');
1624
- $temp=$params;
1625
-
1626
- foreach($params_names as $params_name ) {
1627
- $temp=explode('*:*'.$params_name.'*:*',$temp);
1628
- $param[$params_name] = $temp[0];
1629
- $temp=$temp[1];
1630
- }
1631
-
1632
- if($temp) {
1633
- $temp =explode('*:*w_attr_name*:*',$temp);
1634
- $attrs = array_slice($temp,0, count($temp)-1);
1635
- foreach($attrs as $attr)
1636
- $param['attributes'] = $param['attributes'].' '.$attr;
1637
- }
1638
-
1639
- $wdformfieldsize = ($param['w_field_label_pos']=="left" ? $param['w_field_label_size']+$param['w_size_w']+10 : max($param['w_field_label_size'],$param['w_size_w']));
1640
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
1641
-
1642
- $rep ='<div type="type_wdeditor" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
1643
-
1644
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="width: '.$param['w_size_w'].'px">';
1645
-
1646
- if(user_can_richedit()) {
1647
- ob_start();
1648
- wp_editor($element_value, 'wdform_'.$id1.'_wd_editor'.$form_id, array('teeny' => FALSE, 'media_buttons' => FALSE, 'textarea_rows' => 5));
1649
- $wd_editor = ob_get_clean();
1650
- }
1651
- else {
1652
- $wd_editor='
1653
- <textarea class="'.$param['w_class'].'" name="wdform_'.$id1.'_wd_editor'.$form_id.'" id="wdform_'.$id1.'_wd_editor'.$form_id.'" style="width: '.$param['w_size_w'].'px; height: '.$param['w_size_h'].'px; " class="mce_editable" aria-hidden="true">'.$element_value.'</textarea>';
1654
- }
1655
-
1656
- $rep.= $wd_editor.'</div></div>';
1657
-
1658
- break;
1659
- }
1660
-
1661
- case 'type_phone': {
1662
-
1663
- if($element_value=='')
1664
- $element_value = ' ';
1665
-
1666
- $params_names=array('w_field_label_size','w_field_label_pos','w_size','w_first_val','w_title','w_mini_labels','w_required','w_unique', 'w_class');
1667
- $temp=$params;
1668
-
1669
- foreach($params_names as $params_name ) {
1670
- $temp=explode('*:*'.$params_name.'*:*',$temp);
1671
- $param[$params_name] = $temp[0];
1672
- $temp=$temp[1];
1673
- }
1674
-
1675
- if($temp) {
1676
- $temp =explode('*:*w_attr_name*:*',$temp);
1677
- $attrs = array_slice($temp,0, count($temp)-1);
1678
- foreach($attrs as $attr)
1679
- $param['attributes'] = $param['attributes'].' '.$attr;
1680
- }
1681
-
1682
- $element_value = explode(' ',$element_value);
1683
-
1684
- $wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$param['w_size']+65) : max($param['w_field_label_size'],($param['w_size']+65)));
1685
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
1686
-
1687
- $w_mini_labels = explode('***',$param['w_mini_labels']);
1688
-
1689
- $rep ='<div type="type_phone" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label" >'.$label.'</span>';
1690
-
1691
- $rep.='
1692
- </div>
1693
- <div class="wdform-element-section '.$param['w_class'].'" style="width: '.($param['w_size']+65).'px;">
1694
- <div style="display: table-cell;vertical-align: middle;">
1695
- <div><input type="text" class="" id="wdform_'.$id1.'_element_first'.$form_id.'" name="wdform_'.$id1.'_element_first'.$form_id.'" value="'.$element_value[0].'" style="width: 50px;" '.$param['attributes'].'></div>
1696
- <div><label class="mini_label">'.$w_mini_labels[0].'</label></div>
1697
- </div>
1698
- <div style="display: table-cell;vertical-align: middle;">
1699
- <div class="wdform_line" style="margin: 0px 4px 10px 4px; padding: 0px;">-</div>
1700
- </div>
1701
- <div style="display: table-cell;vertical-align: middle; width:100%;">
1702
- <div><input type="text" class="" id="wdform_'.$id1.'_element_last'.$form_id.'" name="wdform_'.$id1.'_element_last'.$form_id.'" value="'.$element_value[1].'" style="width: 100%;" '.$param['attributes'].'></div>
1703
- <div><label class="mini_label">'.$w_mini_labels[1].'</label></div>
1704
- </div>
1705
- </div>
1706
- </div>';
1707
-
1708
- break;
1709
- }
1710
-
1711
- case 'type_phone_new': {
1712
- $params_names = array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_size','w_first_val','w_top_country','w_required','w_unique', 'w_class');
1713
- $temp=$params;
1714
- foreach($params_names as $params_name ) {
1715
- $temp=explode('*:*'.$params_name.'*:*',$temp);
1716
- $param[$params_name] = $temp[0];
1717
- $temp=$temp[1];
1718
- }
1719
- if($temp) {
1720
- $temp =explode('*:*w_attr_name*:*',$temp);
1721
- $attrs = array_slice($temp,0, count($temp)-1);
1722
- foreach($attrs as $attr) {
1723
- $param['attributes'] = $param['attributes'].' '.$attr;
1724
- }
1725
- }
1726
- $param['w_first_val']=(isset($_POST['wdform_'.$id1.'_element'.$form_id]) ? esc_html(stripslashes($_POST['wdform_'.$id1.'_element'.$form_id])) : $param['w_first_val']);
1727
-
1728
- $wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$param['w_size'] + 10) : max($param['w_field_label_size'],($param['w_size'])));
1729
- $param['w_field_label_pos1'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "");
1730
- $param['w_field_label_pos2'] = ($param['w_field_label_pos']=="left" ? "" : "display:block;");
1731
- $param['w_hide_label'] = (isset($param['w_hide_label']) ? $param['w_hide_label'] : "no");
1732
- if($param['w_hide_label'] == "yes")
1733
- $param['w_field_label_pos1'] = "display:none;";
1734
-
1735
- $required = ($param['w_required']=="yes" ? true : false);
1736
-
1737
- $rep ='<div type="type_phone_new" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section '.$param['w_class'].'" style="'.$param['w_field_label_pos1'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label" >'.$label.'</span>';
1738
- if($required) {
1739
- $rep.='<span class="wdform-required">'.$required_sym.'</span>';
1740
- }
1741
- $rep.='
1742
- </div>
1743
- <div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos2'].' width: '.$param['w_size'].'px;">
1744
- <input type="text" class="input_active" id="wdform_'.$id1.'_element'.$form_id.'" name="wdform_'.$id1.'_element'.$form_id.'" value="'.$element_value.'" style="width: 100%;" placeholder="" '.$param['attributes'].'>
1745
- </div>
1746
- </div>';
1747
- break;
1748
- }
1749
-
1750
- case 'type_name': {
1751
-
1752
- if($element_value =='')
1753
- $element_value = '@@@';
1754
-
1755
- $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_first_val', 'w_title', 'w_mini_labels', 'w_size', 'w_name_format', 'w_required', 'w_unique', 'w_class');
1756
- $temp = $params;
1757
- if(strpos($temp, 'w_name_fields') > -1)
1758
- $params_names = array('w_field_label_size', 'w_field_label_pos', 'w_first_val', 'w_title', 'w_mini_labels', 'w_size', 'w_name_format', 'w_required', 'w_unique', 'w_class', 'w_name_fields');
1759
-
1760
- foreach($params_names as $params_name ) {
1761
- $temp=explode('*:*'.$params_name.'*:*',$temp);
1762
- $param[$params_name] = $temp[0];
1763
- $temp=$temp[1];
1764
- }
1765
-
1766
-
1767
- if($temp) {
1768
- $temp = explode('*:*w_attr_name*:*',$temp);
1769
- $attrs = array_slice($temp,0, count($temp)-1);
1770
- foreach($attrs as $attr)
1771
- $param['attributes'] = $param['attributes'].' '.$attr;
1772
- }
1773
-
1774
- $w_mini_labels = explode('***',$param['w_mini_labels']);
1775
- $param['w_name_fields'] = isset($param['w_name_fields']) ? $param['w_name_fields'] : ($param['w_name_format'] == 'normal' ? 'no***no' : 'yes***yes');
1776
- $w_name_fields = explode('***', $param['w_name_fields']);
1777
- $element_value = explode('@@@', $element_value);
1778
-
1779
- if($w_name_fields[0]== 'no' && $w_name_fields[1]== 'no' ) {
1780
- $w_name_format = '
1781
- <div style="display: table-cell; width:50%">
1782
- <div><input type="text" class="" id="wdform_'.$id1.'_element_first'.$form_id.'" name="wdform_'.$id1.'_element_first'.$form_id.'" value="'.(count($element_value)==2 ? $element_value[0] : $element_value[1]).'" style="width: 100%;"'.$param['attributes'].'></div>
1783
- <div><label class="mini_label">'.$w_mini_labels[1].'</label></div>
1784
- </div>
1785
- <div style="display:table-cell;"><div style="margin: 0px 8px; padding: 0px;"></div></div>
1786
- <div style="display: table-cell; width:50%">
1787
- <div><input type="text" class="" id="wdform_'.$id1.'_element_last'.$form_id.'" name="wdform_'.$id1.'_element_last'.$form_id.'" value="'.(count($element_value)==2 ? $element_value[1] : $element_value[2]).'" style="width: 100%;" '.$param['attributes'].'></div>
1788
- <div><label class="mini_label">'.$w_mini_labels[2].'</label></div>
1789
- </div>
1790
- ';
1791
- $w_size=2*$param['w_size'];
1792
- }
1793
- else {
1794
- $first_last_size = $w_name_fields[0] == 'yes' && $w_name_fields[1] == 'no' ? 45 : 30;
1795
- $w_name_format = '
1796
- <div style="display: table-cell; width:30%">
1797
- <div><input type="text" class="" id="wdform_'.$id1.'_element_first'.$form_id.'" name="wdform_'.$id1.'_element_first'.$form_id.'" value="'.(count($element_value)==2 ? $element_value[0] : $element_value[1]).'" style="width:100%;"></div>
1798
- <div><label class="mini_label">'.$w_mini_labels[1].'</label></div>
1799
- </div>
1800
- <div style="display:table-cell;"><div style="margin: 0px 4px; padding: 0px;"></div></div>
1801
- <div style="display: table-cell; width:30%">
1802
- <div><input type="text" class="" id="wdform_'.$id1.'_element_last'.$form_id.'" name="wdform_'.$id1.'_element_last'.$form_id.'" value="'.(count($element_value)==2 ? $element_value[1] : $element_value[2]).'" style="width: 100%;"></div>
1803
- <div><label class="mini_label">'.$w_mini_labels[2].'</label></div>
1804
- </div>';
1805
- $w_size = 2*$param['w_size'];
1806
-
1807
- if($w_name_fields[0] == 'yes') {
1808
- $w_name_format = '
1809
- <div style="display: table-cell;">
1810
- <div><input type="text" class="" id="wdform_'.$id1.'_element_title'.$form_id.'" name="wdform_'.$id1.'_element_title'.$form_id.'" value="'.(count($element_value)==2 ? "" : $element_value[0]).'" style="width: 40px;"></div>
1811
- <div><label class="mini_label">'.$w_mini_labels[0].'</label></div>
1812
- </div>
1813
- <div style="display:table-cell;"><div style="margin: 0px 1px; padding: 0px;"></div></div>'.$w_name_format;
1814
- $w_size += 80;
1815
- }
1816
- if($w_name_fields[1] == 'yes') {
1817
- $w_name_format = $w_name_format.'
1818
- <div style="display:table-cell;"><div style="margin: 0px 4px; padding: 0px;"></div></div>
1819
- <div style="display: table-cell; width:30%">
1820
- <div><input type="text" class="" id="wdform_'.$id1.'_element_middle'.$form_id.'" name="wdform_'.$id1.'_element_middle'.$form_id.'" value="'.(count($element_value)==2 ? "" : $element_value[3]).'"style="width: 100%;"></div>
1821
- <div><label class="mini_label">'.$w_mini_labels[3].'</label></div>
1822
- </div>
1823
- ';
1824
- $w_size += $param['w_size'];
1825
- }
1826
- }
1827
-
1828
- $wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$w_size) : max($param['w_field_label_size'],$w_size));
1829
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
1830
-
1831
- $rep ='<div type="type_name" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
1832
-
1833
- $rep.='</div>
1834
- <div class="wdform-element-section '.$param['w_class'].'" style="width: '.$w_size.'px;">'.$w_name_format.'</div></div>';
1835
-
1836
- break;
1837
- }
1838
-
1839
- case 'type_address': {
1840
- $params_names = array('w_field_label_size','w_field_label_pos','w_size','w_mini_labels','w_disabled_fields','w_required','w_class');
1841
- $temp = $params;
1842
- foreach($params_names as $params_name ) {
1843
- $temp=explode('*:*'.$params_name.'*:*',$temp);
1844
- $param[$params_name] = $temp[0];
1845
- $temp=$temp[1];
1846
- }
1847
-
1848
- if($temp) {
1849
- $temp =explode('*:*w_attr_name*:*',$temp);
1850
- $attrs = array_slice($temp,0, count($temp)-1);
1851
- foreach($attrs as $attr)
1852
- $param['attributes'] = $param['attributes'].' '.$attr;
1853
- }
1854
-
1855
- $wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$param['w_size']) : max($param['w_field_label_size'], $param['w_size']));
1856
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
1857
-
1858
- $w_mini_labels = explode('***',$param['w_mini_labels']);
1859
- $w_disabled_fields = explode('***',$param['w_disabled_fields']);
1860
-
1861
- $rep ='<div type="type_address" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
1862
-
1863
- $address_fields ='';
1864
- $g=0;
1865
- if (isset($w_disabled_fields[0]) && $w_disabled_fields[0]=='no') {
1866
- $g+=2;
1867
- $address_fields .= '<span style="float: left; width: 100%; padding-bottom: 8px; display: block;"><input type="text" id="wdform_'.$id1.'_street1'.$form_id.'" name="wdform_'.$id1.'_street1'.$form_id.'" value="'.$elements_of_address[0].'" style="width: 100%;" '.$param['attributes'].'><label class="mini_label" >'.$w_mini_labels[0].'</label></span>';
1868
- }
1869
- if (isset($w_disabled_fields[1]) && $w_disabled_fields[1]=='no') {
1870
- $g+=2;
1871
- $address_fields .= '<span style="float: left; width: 100%; padding-bottom: 8px; display: block;"><input type="text" id="wdform_'.$id1.'_street2'.$form_id.'" name="wdform_'.($id1+1).'_street2'.$form_id.'" value="'.$elements_of_address[1].'" style="width: 100%;" '.$param['attributes'].'><label class="mini_label" >'.$w_mini_labels[1].'</label></span>';
1872
- }
1873
- if (isset($w_disabled_fields[2]) && $w_disabled_fields[2]=='no') {
1874
- $g++;
1875
- $address_fields .= '<span style="float: left; width: 48%; padding-bottom: 8px;"><input type="text" id="wdform_'.$id1.'_city'.$form_id.'" name="wdform_'.($id1+2).'_city'.$form_id.'" value="'.$elements_of_address[2].'" style="width: 100%;" '.$param['attributes'].'><label class="mini_label" >'.$w_mini_labels[2].'</label></span>';
1876
- }
1877
- if (isset($w_disabled_fields[3]) && $w_disabled_fields[3]=='no') {
1878
- $g++;
1879
- $w_states = array("","Alabama","Alaska", "Arizona","Arkansas","California","Colorado","Connecticut","Delaware","District Of Columbia","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming");
1880
- $w_state_options = '';
1881
- foreach($w_states as $w_state) {
1882
- if($w_state == $elements_of_address[3])
1883
- $selected = 'selected=\"selected\"';
1884
- else
1885
- $selected = '';
1886
- $w_state_options .= '<option value="'.$w_state.'" '.$selected.'>'.$w_state.'</option>';
1887
- }
1888
- if(isset($w_disabled_fields[5]) && $w_disabled_fields[5]=='yes' && isset($w_disabled_fields[6]) && $w_disabled_fields[6]=='yes') {
1889
- $address_fields .= '<span style="float: '.(($g%2==0) ? 'right' : 'left').'; width: 48%; padding-bottom: 8px;"><select type="text" id="wdform_'.$id1.'_state'.$form_id.'" name="wdform_'.($id1+3).'_state'.$form_id.'" style="width: 100%;" '.$param['attributes'].'>'.$w_state_options.'</select><label class="mini_label" style="display: block;" id="'.$id1.'_mini_label_state">'.$w_mini_labels[3].'</label></span>';
1890
- }
1891
- else
1892
- $address_fields .= '<span style="float: '.(($g%2==0) ? 'right' : 'left').'; width: 48%; padding-bottom: 8px;"><input type="text" id="wdform_'.$id1.'_state'.$form_id.'" name="wdform_'.($id1+3).'_state'.$form_id.'" value="'.$elements_of_address[3].'" style="width: 100%;" '.$param['attributes'].'><label class="mini_label">'.$w_mini_labels[3].'</label></span>';
1893
- }
1894
- if (isset($w_disabled_fields[4]) && $w_disabled_fields[4]=='no') {
1895
- $g++;
1896
- $address_fields .= '<span style="float: '.(($g%2==0) ? 'right' : 'left').'; width: 48%; padding-bottom: 8px;"><input type="text" id="wdform_'.$id1.'_postal'.$form_id.'" name="wdform_'.($id1+4).'_postal'.$form_id.'" value="'.$elements_of_address[4].'" style="width: 100%;" '.$param['attributes'].'><label class="mini_label">'.$w_mini_labels[4].'</label></span>';
1897
- }
1898
- $w_countries = array("","Afghanistan","Albania","Algeria","Andorra","Angola","Antigua and Barbuda","Argentina","Armenia","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bhutan","Bolivia","Bosnia and Herzegovina","Botswana","Brazil","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Central African Republic","Chad","Chile","China","Colombia","Comoros","Congo (Brazzaville)","Congo","Costa Rica","Cote d'Ivoire","Croatia","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","East Timor (Timor Timur)","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Fiji","Finland","France","Gabon","Gambia, The","Georgia","Germany","Ghana","Greece","Grenada","Guatemala","Guinea","Guinea-Bissau","Guyana","Haiti","Honduras","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Israel","Italy","Jamaica","Japan","Jordan","Kazakhstan","Kenya","Kiribati","Korea, North","Korea, South","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macedonia","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Mauritania","Mauritius","Mexico","Micronesia","Moldova","Monaco","Mongolia","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","New Zealand","Nicaragua","Niger","Nigeria","Norway","Oman","Pakistan","Palau","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Qatar","Romania","Russia","Rwanda","Saint Kitts and Nevis","Saint Lucia","Saint Vincent","Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia and Montenegro","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","Spain","Sri Lanka","Sudan","Suriname","Swaziland","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Togo","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Yemen","Zambia","Zimbabwe");
1899
- $w_options = '';
1900
- foreach($w_countries as $w_country) {
1901
- if($w_country == $elements_of_address[5])
1902
- $selected = 'selected="selected"';
1903
- else
1904
- $selected = '';
1905
- $w_options .= '<option value="'.$w_country.'" '.$selected.'>'.$w_country.'</option>';
1906
- }
1907
-
1908
- if (isset($w_disabled_fields[5]) && $w_disabled_fields[5]=='no') {
1909
- $g++;
1910
- $address_fields .= '<span style="float: '.(($g%2==0) ? 'right' : 'left').'; width: 48%; padding-bottom: 8px;display: inline-block;"><select type="text" id="wdform_'.$id1.'_country'.$form_id.'" name="wdform_'.($id1+5).'_country'.$form_id.'" style="width:100%" '.$param['attributes'].'>'.$w_options.'</select><label class="mini_label">'.$w_mini_labels[5].'</span>';
1911
- }
1912
-
1913
-
1914
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="width: '.$param['w_size'].'px;"><div>
1915
- '.$address_fields.'</div></div></div>';
1916
- break;
1917
- }
1918
-
1919
- case 'type_submitter_mail': {
1920
- $params_names=array('w_field_label_size','w_field_label_pos','w_size','w_first_val','w_title','w_required','w_unique', 'w_class');
1921
- $temp=$params;
1922
-
1923
- if(strpos($temp, 'w_hide_label') > -1)
1924
- $params_names=array('w_field_label_size','w_field_label_pos', 'w_hide_label', 'w_size','w_first_val','w_title','w_required','w_unique', 'w_class');
1925
-
1926
-
1927
- foreach($params_names as $params_name ) {
1928
- $temp=explode('*:*'.$params_name.'*:*',$temp);
1929
- $param[$params_name] = $temp[0];
1930
- $temp=$temp[1];
1931
- }
1932
-
1933
-
1934
- if($temp) {
1935
- $temp =explode('*:*w_attr_name*:*',$temp);
1936
- $attrs = array_slice($temp,0, count($temp)-1);
1937
- foreach($attrs as $attr)
1938
- $param['attributes'] = $param['attributes'].' '.$attr;
1939
- }
1940
-
1941
- $wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$param['w_size']) : max($param['w_field_label_size'], $param['w_size']));
1942
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
1943
-
1944
- $rep ='<div type="type_submitter_mail" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
1945
-
1946
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="width: '.$param['w_size'].'px;"><input type="text" class="" id="wdform_'.$id1.'_element'.$form_id.'" name="wdform_'.$id1.'_element'.$form_id.'" value="'.$element_value.'" title="'.$param['w_title'].'" style="width: 100%;" '.$param['attributes'].'></div></div>';
1947
-
1948
-
1949
-
1950
- break;
1951
- }
1952
-
1953
- case 'type_checkbox':
1954
-
1955
- {
1956
-
1957
-
1958
-
1959
- $params_names=array('w_field_label_size','w_field_label_pos','w_flow','w_choices','w_choices_checked','w_rowcol', 'w_required','w_randomize','w_allow_other','w_allow_other_num','w_class');
1960
-
1961
- $temp=$params;
1962
-
1963
- if(strpos($temp, 'w_field_option_pos') > -1)
1964
-
1965
- $params_names=array('w_field_label_size','w_field_label_pos','w_field_option_pos','w_flow','w_choices','w_choices_checked','w_rowcol', 'w_required','w_randomize','w_allow_other','w_allow_other_num', 'w_value_disabled','w_choices_value', 'w_choices_params', 'w_class');
1966
-
1967
-
1968
-
1969
- foreach($params_names as $params_name )
1970
-
1971
- {
1972
-
1973
- $temp=explode('*:*'.$params_name.'*:*',$temp);
1974
-
1975
- $param[$params_name] = $temp[0];
1976
-
1977
- $temp=$temp[1];
1978
-
1979
- }
1980
-
1981
-
1982
-
1983
- if($temp)
1984
-
1985
- {
1986
-
1987
- $temp =explode('*:*w_attr_name*:*',$temp);
1988
-
1989
- $attrs = array_slice($temp,0, count($temp)-1);
1990
-
1991
- foreach($attrs as $attr)
1992
-
1993
- $param['attributes'] = $param['attributes'].' '.$attr;
1994
-
1995
- }
1996
-
1997
-
1998
-
1999
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
2000
-
2001
- if(!isset($param['w_value_disabled']))
2002
-
2003
- $param['w_value_disabled'] = 'no';
2004
-
2005
-
2006
-
2007
- if(!isset($param['w_field_option_pos']))
2008
-
2009
- $param['w_field_option_pos'] = 'left';
2010
-
2011
-
2012
-
2013
- $param['w_field_option_pos1'] = ($param['w_field_option_pos']=="right" ? "style='float: none !important;'" : "");
2014
-
2015
- $param['w_field_option_pos2'] = ($param['w_field_option_pos']=="right" ? "style='float: left !important; margin-right: 8px !important; display: inline-block !important;'" : "");
2016
-
2017
-
2018
-
2019
- $param['w_choices'] = explode('***',$param['w_choices']);
2020
-
2021
- if(isset($param['w_choices_value']))
2022
-
2023
- {
2024
-
2025
- $param['w_choices_value'] = explode('***',$param['w_choices_value']);
2026
-
2027
- $param['w_choices_params'] = explode('***',$param['w_choices_params']);
2028
-
2029
- }
2030
-
2031
-
2032
-
2033
- $element_value = explode('***br***',$element_value);
2034
-
2035
- $element_value = array_slice($element_value,0, count($element_value)-1);
2036
-
2037
- $is_other=false;
2038
-
2039
- $other_value = '';
2040
-
2041
-
2042
-
2043
- foreach($element_value as $key => $value)
2044
-
2045
- {
2046
-
2047
- if(!in_array($value, ($param['w_value_disabled']=='no' ? $param['w_choices'] : (isset($param['w_choices_value']) ? $param['w_choices_value'] : array()))))
2048
-
2049
- {
2050
-
2051
- $other_value = $value;
2052
-
2053
- $is_other=true;
2054
-
2055
- break;
2056
-
2057
- }
2058
-
2059
- }
2060
-
2061
-
2062
-
2063
- $rep='<div type="type_checkbox" class="wdform-field"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
2064
-
2065
-
2066
-
2067
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';">';
2068
-
2069
-
2070
-
2071
- $rep.='<div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
2072
-
2073
- $total_queries = 0;
2074
-
2075
- foreach($param['w_choices'] as $key => $choice)
2076
-
2077
- {
2078
-
2079
- $key1 = $key + $total_queries;
2080
-
2081
- if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
2082
-
2083
- {
2084
-
2085
- $choices_labels =array();
2086
- $choices_values = array();
2087
-
2088
- $w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
2089
- $where = (str_replace(array('[',']'), '', $w_choices_params[0]) ? ' WHERE '.str_replace(array('[',']'), '', $w_choices_params[0]) : '');
2090
- $w_choices_params = explode('[db_info]',$w_choices_params[1]);
2091
-
2092
- $order_by = str_replace(array('[',']'), '', $w_choices_params[0]);
2093
- $db_info = str_replace(array('[',']'), '', $w_choices_params[1]);
2094
-
2095
-
2096
-
2097
- $label_table_and_column = explode(':',str_replace(array('[',']'), '', $choice));
2098
-
2099
- $table = $label_table_and_column[0];
2100
-
2101
- $label_column = $label_table_and_column[1];
2102
-
2103
- if($label_column)
2104
-
2105
- {
2106
- $choices_labels = $this->model->select_data_from_db_for_labels($db_info, $label_column, $table, $where, $order_by);
2107
-
2108
- }
2109
-
2110
-
2111
-
2112
- $value_table_and_column = explode(':',str_replace(array('[',']'), '', $param['w_choices_value'][$key]));
2113
-
2114
- $value_column = $value_table_and_column[1];
2115
-
2116
-
2117
-
2118
- if($value_column)
2119
-
2120
- {
2121
- $choices_values = $this->model->select_data_from_db_for_values($db_info, $value_column, $table, $where, $order_by);
2122
-
2123
- }
2124
-
2125
- $columns_count_checkbox = count($choices_labels)>0 ? count($choices_labels) : count($choices_values);
2126
-
2127
-
2128
-
2129
- if(array_filter($choices_labels) || array_filter($choices_values))
2130
-
2131
- {
2132
-
2133
- $total_queries = $total_queries + $columns_count_checkbox-1;
2134
-
2135
-
2136
-
2137
- if(!isset($post_value))
2138
-
2139
- $param['w_choices_checked'][$key]=($param['w_choices_checked'][$key]=='true' ? 'checked="checked"' : '');
2140
-
2141
-
2142
-
2143
- for($k=0; $k<$columns_count_checkbox; $k++)
2144
-
2145
- {
2146
-
2147
- $choice_label = isset($choices_labels[$k]) ? $choices_labels[$k] : '';
2148
-
2149
- $choice_value = isset($choices_values[$k]) ? $choices_values[$k] : $choice_label;
2150
-
2151
- if(($key1+$k)%$param['w_rowcol']==0 && ($key1+$k)>0)
2152
-
2153
- $rep.='</div><div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
2154
-
2155
-
2156
-
2157
- $checked=(in_array($choice_value, $element_value) ? 'checked="checked"' : '');
2158
-
2159
-
2160
-
2161
- $rep.='<div style="display: '.($param['w_flow']!='hor' ? 'table-cell' : 'table-row' ).';"><label class="wdform-ch-rad-label" for="wdform_'.$id1.'_element'.$form_id.''.($key1+$k).'" '.$param['w_field_option_pos1'].'>'.$choice_label.'</label><div class="checkbox-div forlabs" '.$param['w_field_option_pos2'].'><input type="checkbox" '.(($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key) ? 'other="1"' : '' ).' id="wdform_'.$id1.'_element'.$form_id.''.($key1+$k).'" name="wdform_'.$id1.'_element'.$form_id.''.($key1+$k).'" value="'.htmlspecialchars($choice_value).'" '.(($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key) ? 'onclick="if(set_checked(&quot;wdform_'.$id1.'&quot;,&quot;'.($key1+$k).'&quot;,&quot;'.$form_id.'&quot;)) show_other_input(&quot;wdform_'.$id1.'&quot;,&quot;'.$form_id.'&quot;);"' : '').' '.$param['attributes'].' '.$checked.'><label for="wdform_'.$id1.'_element'.$form_id.''.($key1+$k).'"></label></div></div>';
2162
-
2163
-
2164
-
2165
- }
2166
-
2167
- }
2168
-
2169
- }
2170
-
2171
- else
2172
-
2173
- {
2174
-
2175
- if($key1%$param['w_rowcol']==0 && $key1>0)
2176
-
2177
- $rep.='</div><div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
2178
-
2179
-
2180
- $choice_value = isset($param['w_choices_value']) ? $param['w_choices_value'][$key] : $choice;
2181
-
2182
- $checked=(in_array($choice_value, $element_value) ? 'checked="checked"' : '');
2183
-
2184
- if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key && $is_other)
2185
-
2186
- $checked = 'checked="checked"';
2187
-
2188
-
2189
-
2190
-
2191
-
2192
- $rep.='<div style="display: '.($param['w_flow']!='hor' ? 'table-cell' : 'table-row' ).';"><label class="wdform-ch-rad-label" for="wdform_'.$id1.'_element'.$form_id.''.$key1.'" '.$param['w_field_option_pos1'].'>'.$choice.'</label><div class="checkbox-div forlabs" '.$param['w_field_option_pos2'].'><input type="checkbox" '.(($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key) ? 'other="1"' : '' ).' id="wdform_'.$id1.'_element'.$form_id.''.$key1.'" name="wdform_'.$id1.'_element'.$form_id.''.$key1.'" value="'.htmlspecialchars($choice_value).'" '.(($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key) ? 'onclick="if(set_checked(&quot;wdform_'.$id1.'&quot;,&quot;'.$key1.'&quot;,&quot;'.$form_id.'&quot;)) show_other_input(&quot;wdform_'.$id1.'&quot;,&quot;'.$form_id.'&quot;);"' : '').' '.$checked.' '.$param['attributes'].'><label for="wdform_'.$id1.'_element'.$form_id.''.$key1.'"></label></div></div>';
2193
-
2194
-
2195
-
2196
- $param['w_allow_other_num'] = $param['w_allow_other_num']==$key ? $key1 : $param['w_allow_other_num'];
2197
-
2198
- }
2199
-
2200
- }
2201
-
2202
- $rep.='</div>';
2203
-
2204
-
2205
-
2206
- $rep.='</div></div>';
2207
-
2208
-
2209
-
2210
-
2211
-
2212
- if($is_other)
2213
-
2214
- $onload_js .='show_other_input("wdform_'.$id1.'","'.$form_id.'"); jQuery("#wdform_'.$id1.'_other_input'.$form_id.'").val("'.$other_value.'");';
2215
-
2216
-
2217
-
2218
- $onsubmit_js.='
2219
-
2220
- jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_allow_other'.$form_id.'\" value = \"'.$param['w_allow_other'].'\" />").appendTo("#adminForm");
2221
-
2222
- jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_allow_other_num'.$form_id.'\" value = \"'.$param['w_allow_other_num'].'\" />").appendTo("#adminForm");
2223
-
2224
- ';
2225
-
2226
-
2227
-
2228
- break;
2229
-
2230
- }
2231
-
2232
- case 'type_radio':
2233
-
2234
- {
2235
-
2236
-
2237
-
2238
-
2239
-
2240
- $params_names=array('w_field_label_size','w_field_label_pos','w_flow','w_choices','w_choices_checked','w_rowcol', 'w_required','w_randomize','w_allow_other','w_allow_other_num','w_class');
2241
-
2242
- $temp=$params;
2243
-
2244
- if(strpos($temp, 'w_field_option_pos') > -1)
2245
-
2246
- $params_names=array('w_field_label_size','w_field_label_pos','w_field_option_pos','w_flow','w_choices','w_choices_checked','w_rowcol', 'w_required','w_randomize','w_allow_other','w_allow_other_num','w_value_disabled','w_choices_value', 'w_choices_params','w_class');
2247
-
2248
-
2249
-
2250
- foreach($params_names as $params_name )
2251
-
2252
- {
2253
-
2254
- $temp=explode('*:*'.$params_name.'*:*',$temp);
2255
-
2256
- $param[$params_name] = $temp[0];
2257
-
2258
- $temp=$temp[1];
2259
-
2260
- }
2261
-
2262
-
2263
-
2264
- if($temp)
2265
-
2266
- {
2267
-
2268
- $temp =explode('*:*w_attr_name*:*',$temp);
2269
-
2270
- $attrs = array_slice($temp,0, count($temp)-1);
2271
-
2272
- foreach($attrs as $attr)
2273
-
2274
- $param['attributes'] = $param['attributes'].' '.$attr;
2275
-
2276
- }
2277
-
2278
- if(!isset($param['w_value_disabled']))
2279
-
2280
- $param['w_value_disabled'] = 'no';
2281
-
2282
-
2283
-
2284
- if(!isset($param['w_field_option_pos']))
2285
-
2286
- $param['w_field_option_pos'] = 'left';
2287
-
2288
-
2289
-
2290
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
2291
-
2292
- $param['w_field_option_pos1'] = ($param['w_field_option_pos']=="right" ? "style='float: none !important;'" : "");
2293
-
2294
- $param['w_field_option_pos2'] = ($param['w_field_option_pos']=="right" ? "style='float: left !important; margin-right: 8px !important; display: inline-block !important;'" : "");
2295
-
2296
-
2297
-
2298
- $param['w_choices'] = explode('***',$param['w_choices']);
2299
-
2300
- if(isset($param['w_choices_value']))
2301
-
2302
- {
2303
-
2304
- $param['w_choices_value'] = explode('***',$param['w_choices_value']);
2305
-
2306
- $param['w_choices_params'] = explode('***',$param['w_choices_params']);
2307
-
2308
- }
2309
-
2310
-
2311
-
2312
- $is_other=true;
2313
-
2314
-
2315
-
2316
- foreach($param['w_choices'] as $key => $choice)
2317
-
2318
- {
2319
-
2320
- $choice_value = isset($param['w_choices_value']) ? $param['w_choices_value'][$key] : $choice;
2321
-
2322
- if($choice_value==$element_value)
2323
-
2324
- {
2325
-
2326
- $is_other=false;
2327
-
2328
- break;
2329
-
2330
- }
2331
-
2332
- }
2333
-
2334
-
2335
-
2336
- $rep='<div type="type_radio" class="wdform-field"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
2337
-
2338
-
2339
-
2340
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';">';
2341
-
2342
-
2343
-
2344
- $rep.='<div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
2345
-
2346
- $total_queries =0;
2347
-
2348
- foreach($param['w_choices'] as $key => $choice)
2349
-
2350
- {
2351
-
2352
- $key1 = $key + $total_queries;
2353
-
2354
- if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
2355
-
2356
- {
2357
-
2358
- $choices_labels =array();
2359
- $choices_values =array();
2360
- $w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
2361
- $where = (str_replace(array('[',']'), '', $w_choices_params[0]) ? ' WHERE '.str_replace(array('[',']'), '', $w_choices_params[0]) : '');
2362
- $w_choices_params = explode('[db_info]',$w_choices_params[1]);
2363
- $order_by = str_replace(array('[',']'), '', $w_choices_params[0]);
2364
- $db_info = str_replace(array('[',']'), '', $w_choices_params[1]);
2365
-
2366
- $label_table_and_column = explode(':',str_replace(array('[',']'), '', $choice));
2367
-
2368
- $table = $label_table_and_column[0];
2369
-
2370
- $label_column = $label_table_and_column[1];
2371
-
2372
- if($label_column) {
2373
- $choices_labels = $this->model->select_data_from_db_for_labels($db_info, $label_column, $table, $where, $order_by);
2374
- }
2375
-
2376
-
2377
-
2378
- $value_table_and_column = explode(':',str_replace(array('[',']'), '', $param['w_choices_value'][$key]));
2379
-
2380
- $value_column = $value_table_and_column[1];
2381
-
2382
-
2383
-
2384
- if($value_column) {
2385
- $choices_values = $this->model->select_data_from_db_for_values($db_info, $value_column, $table, $where, $order_by);
2386
- }
2387
-
2388
-
2389
-
2390
- $columns_count_radio = count($choices_labels)>0 ? count($choices_labels) : count($choices_values);
2391
-
2392
- if(array_filter($choices_labels) || array_filter($choices_values))
2393
-
2394
- {
2395
-
2396
- $total_queries = $total_queries + $columns_count_radio-1;
2397
-
2398
-
2399
-
2400
- for($k=0; $k<$columns_count_radio; $k++)
2401
-
2402
- {
2403
-
2404
- $choice_label = isset($choices_labels[$k]) ? $choices_labels[$k] : '';
2405
-
2406
- $choice_value = isset($choices_values[$k]) ? $choices_values[$k] : $choice_label;
2407
-
2408
-
2409
-
2410
- if(($key1+$k)%$param['w_rowcol']==0 && ($key1+$k)>0)
2411
-
2412
- $rep.='</div><div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
2413
-
2414
-
2415
-
2416
- $checked =($choice_value==$element_value ? 'checked="checked"' : '');
2417
-
2418
- if($choice_value==$element_value)
2419
-
2420
- $is_other=false;
2421
-
2422
-
2423
-
2424
- $rep.='<div style="display: '.($param['w_flow']!='hor' ? 'table-cell' : 'table-row' ).';"><label class="wdform-ch-rad-label" for="wdform_'.$id1.'_element'.$form_id.''.($key1+$k).'" '.$param['w_field_option_pos1'].'>'.$choice_label.'</label><div class="radio-div forlabs" '.$param['w_field_option_pos2'].'><input type="radio" '.(($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key) ? 'other="1"' : '' ).' id="wdform_'.$id1.'_element'.$form_id.''.($key1+$k).'" name="wdform_'.$id1.'_element'.$form_id.'" value="'.htmlspecialchars($choice_value).'" onclick="set_default(&quot;wdform_'.$id1.'&quot;,&quot;'.($key1+$k).'&quot;,&quot;'.$form_id.'&quot;); '.(($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key) ? 'show_other_input(&quot;wdform_'.$id1.'&quot;,&quot;'.$form_id.'&quot;);' : '').'" '.$checked.' '.$param['attributes'].'><label for="wdform_'.$id1.'_element'.$form_id.''.($key1+$k).'"></label></div></div>';
2425
-
2426
-
2427
-
2428
- }
2429
-
2430
- }
2431
-
2432
- }
2433
-
2434
- else
2435
-
2436
- {
2437
-
2438
- if($key1%$param['w_rowcol']==0 && $key1>0)
2439
-
2440
- $rep.='</div><div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).'; vertical-align:top">';
2441
-
2442
-
2443
- $choice_value = isset($param['w_choices_value']) ? $param['w_choices_value'][$key] : $choice;
2444
-
2445
- $checked =($choice_value==$element_value ? 'checked="checked"' : '');
2446
-
2447
-
2448
-
2449
- if($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key && $is_other==true && $element_value!='')
2450
-
2451
- $checked = 'checked="checked"';
2452
-
2453
-
2454
-
2455
-
2456
- $rep.='<div style="display: '.($param['w_flow']!='hor' ? 'table-cell' : 'table-row' ).';"><label class="wdform-ch-rad-label" for="wdform_'.$id1.'_element'.$form_id.''.$key1.'" '.$param['w_field_option_pos1'].'>'.$choice.'</label><div class="radio-div forlabs" '.$param['w_field_option_pos2'].'><input type="radio" '.(($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key) ? 'other="1"' : '' ).' id="wdform_'.$id1.'_element'.$form_id.''.$key1.'" name="wdform_'.$id1.'_element'.$form_id.'" value="'.htmlspecialchars($choice_value).'" onclick="set_default(&quot;wdform_'.$id1.'&quot;,&quot;'.$key1.'&quot;,&quot;'.$form_id.'&quot;); '.(($param['w_allow_other']=="yes" && $param['w_allow_other_num']==$key) ? 'show_other_input(&quot;wdform_'.$id1.'&quot;,&quot;'.$form_id.'&quot;);' : '').'" '.$checked.' '.$param['attributes'].'><label for="wdform_'.$id1.'_element'.$form_id.''.$key1.'"></label></div></div>';
2457
-
2458
-
2459
-
2460
- $param['w_allow_other_num'] = $param['w_allow_other_num']==$key ? $key1 : $param['w_allow_other_num'];
2461
-
2462
- }
2463
-
2464
- }
2465
-
2466
- $rep.='</div>';
2467
-
2468
-
2469
-
2470
- $rep.='</div></div>';
2471
-
2472
-
2473
-
2474
-
2475
-
2476
- if($is_other && $element_value!='')
2477
-
2478
- $onload_js .='show_other_input("wdform_'.$id1.'","'.$form_id.'"); jQuery("#wdform_'.$id1.'_other_input'.$form_id.'").val("'.$element_value.'");';
2479
-
2480
-
2481
-
2482
- $onsubmit_js.='
2483
-
2484
- jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_allow_other'.$form_id.'\" value = \"'.$param['w_allow_other'].'\" />").appendTo("#form'.$form_id.'");
2485
-
2486
- jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_allow_other_num'.$form_id.'\" value = \"'.$param['w_allow_other_num'].'\" />").appendTo("#adminForm");
2487
-
2488
- ';
2489
-
2490
-
2491
-
2492
- break;
2493
-
2494
- }
2495
-
2496
- case 'type_own_select':
2497
-
2498
- {
2499
-
2500
-
2501
-
2502
- $params_names=array('w_field_label_size','w_field_label_pos','w_size','w_choices','w_choices_checked', 'w_choices_disabled','w_required','w_class');
2503
-
2504
- $temp=$params;
2505
-
2506
- if(strpos($temp, 'w_choices_value') > -1)
2507
-
2508
- $params_names=array('w_field_label_size','w_field_label_pos','w_size','w_choices','w_choices_checked', 'w_choices_disabled', 'w_required', 'w_value_disabled', 'w_choices_value', 'w_choices_params', 'w_class');
2509
-
2510
-
2511
-
2512
- foreach($params_names as $params_name )
2513
-
2514
- {
2515
-
2516
- $temp=explode('*:*'.$params_name.'*:*',$temp);
2517
-
2518
- $param[$params_name] = $temp[0];
2519
-
2520
- $temp=$temp[1];
2521
-
2522
- }
2523
-
2524
-
2525
-
2526
-
2527
-
2528
- if($temp)
2529
-
2530
- {
2531
-
2532
- $temp =explode('*:*w_attr_name*:*',$temp);
2533
-
2534
- $attrs = array_slice($temp,0, count($temp)-1);
2535
-
2536
- foreach($attrs as $attr)
2537
-
2538
- $param['attributes'] = $param['attributes'].' '.$attr;
2539
-
2540
- }
2541
-
2542
-
2543
-
2544
-
2545
-
2546
- $wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$param['w_size']) : max($param['w_field_label_size'], $param['w_size']));
2547
-
2548
- $param['w_field_label_pos1'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "");
2549
-
2550
- $param['w_field_label_pos2'] = ($param['w_field_label_pos']=="left" ? "" : "display:block;");
2551
-
2552
-
2553
-
2554
- $param['w_choices'] = explode('***',$param['w_choices']);
2555
-
2556
- $param['w_choices_disabled'] = explode('***',$param['w_choices_disabled']);
2557
-
2558
- if(isset($param['w_choices_value']))
2559
-
2560
- {
2561
-
2562
- $param['w_choices_value'] = explode('***',$param['w_choices_value']);
2563
-
2564
- $param['w_choices_params'] = explode('***',$param['w_choices_params']);
2565
-
2566
- }
2567
-
2568
-
2569
-
2570
- if(!isset($param['w_value_disabled']))
2571
-
2572
- $param['w_value_disabled'] = 'no';
2573
-
2574
-
2575
-
2576
- $rep='<div type="type_own_select" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section" style="'.$param['w_field_label_pos1'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
2577
-
2578
-
2579
-
2580
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos2'].' width: '.($param['w_size']).'px; "><select id="wdform_'.$id1.'_element'.$form_id.'" name="wdform_'.$id1.'_element'.$form_id.'" style="width: 100%;" '.$param['attributes'].'>';
2581
-
2582
- foreach($param['w_choices'] as $key => $choice)
2583
-
2584
- {
2585
-
2586
- if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
2587
-
2588
- {
2589
-
2590
- $choices_labels =array();
2591
- $choices_values = array();
2592
- $w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
2593
- $where = (str_replace(array('[',']'), '', $w_choices_params[0]) ? ' WHERE '.str_replace(array('[',']'), '', $w_choices_params[0]) : '');
2594
- $w_choices_params = explode('[db_info]',$w_choices_params[1]);
2595
- $order_by = str_replace(array('[',']'), '', $w_choices_params[0]);
2596
- $db_info = str_replace(array('[',']'), '', $w_choices_params[1]);
2597
-
2598
-
2599
- $label_table_and_column = explode(':',str_replace(array('[',']'), '', $choice));
2600
-
2601
- $table = $label_table_and_column[0];
2602
-
2603
- $label_column = $label_table_and_column[1];
2604
-
2605
- if($label_column)
2606
-
2607
- {
2608
-
2609
- $choices_labels = $this->model->select_data_from_db_for_labels($db_info, $label_column, $table, $where, $order_by);
2610
-
2611
- }
2612
-
2613
-
2614
-
2615
- $value_table_and_column = explode(':',str_replace(array('[',']'), '', $param['w_choices_value'][$key]));
2616
-
2617
- $value_column = $param['w_choices_disabled'][$key]=="true" ? '' : $value_table_and_column[1];
2618
-
2619
-
2620
-
2621
- if($value_column)
2622
-
2623
- {
2624
-
2625
- $choices_values = $this->model->select_data_from_db_for_values($db_info, $value_column, $table, $where, $order_by);
2626
-
2627
- }
2628
-
2629
-
2630
-
2631
- $columns_count = count($choices_labels)>0 ? count($choices_labels) : count($choices_values);
2632
-
2633
- if(array_filter($choices_labels) || array_filter($choices_values))
2634
-
2635
- for($k=0; $k<$columns_count; $k++)
2636
-
2637
- {
2638
-
2639
- $choice_label = isset($choices_labels[$k]) ? $choices_labels[$k] : '';
2640
-
2641
- $choice_value = isset($choices_values[$k]) ? $choices_values[$k] : ($param['w_choices_disabled'][$key]=="true" ? '' : $choice_label);
2642
-
2643
-
2644
-
2645
- $selected=($element_value && htmlspecialchars($choice_value)==htmlspecialchars($element_value) ? 'selected="selected"' : '');
2646
-
2647
-
2648
-
2649
- $rep.='<option value="'.htmlspecialchars($choice_value).'" '.$selected.'>'.$choice_label.'</option>';
2650
-
2651
-
2652
-
2653
- }
2654
-
2655
- }
2656
-
2657
- else
2658
-
2659
- {
2660
-
2661
- $choice_value = $param['w_choices_disabled'][$key]=="true" ? '' : (isset($param['w_choices_value']) ? $param['w_choices_value'][$key] : $choice);
2662
-
2663
-
2664
-
2665
- $selected=($element_value && htmlspecialchars($choice_value)==htmlspecialchars($element_value) ? 'selected="selected"' : '');
2666
-
2667
-
2668
-
2669
- $rep.='<option value="'.htmlspecialchars($choice_value).'" '.$selected.'>'.$choice.'</option>';
2670
-
2671
- }
2672
-
2673
- }
2674
-
2675
- $rep.='</select></div></div>';
2676
-
2677
-
2678
-
2679
-
2680
-
2681
- break;
2682
-
2683
- }
2684
-
2685
- case 'type_country': {
2686
- $params_names=array('w_field_label_size','w_field_label_pos','w_size','w_countries','w_required','w_class');
2687
- $temp=$params;
2688
- foreach($params_names as $params_name ) {
2689
- $temp=explode('*:*'.$params_name.'*:*',$temp);
2690
- $param[$params_name] = $temp[0];
2691
- $temp=$temp[1];
2692
- }
2693
-
2694
- if($temp) {
2695
- $temp =explode('*:*w_attr_name*:*',$temp);
2696
- $attrs = array_slice($temp,0, count($temp)-1);
2697
- foreach($attrs as $attr)
2698
- $param['attributes'] = $param['attributes'].' add_'.$attr;
2699
- }
2700
-
2701
- $wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$param['w_size']) : max($param['w_field_label_size'], $param['w_size']));
2702
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
2703
-
2704
- $param['w_countries'] = explode('***',$param['w_countries']);
2705
-
2706
- $selected='';
2707
-
2708
- $rep='<div type="type_country" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
2709
-
2710
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="width: '.$param['w_size'].'px;"><select id="wdform_'.$id1.'_element'.$form_id.'" name="wdform_'.$id1.'_element'.$form_id.'" style="width: 100%;" '.$param['attributes'].'>';
2711
- foreach($param['w_countries'] as $key => $choice) {
2712
-
2713
- $selected=(htmlspecialchars($choice)==htmlspecialchars($element_value) ? 'selected="selected"' : '');
2714
-
2715
- $choice_value=$choice;
2716
- $rep.='<option value="'.$choice_value.'" '.$selected.'>'.$choice.'</option>';
2717
- }
2718
- $rep.='</select></div></div>';
2719
-
2720
- break;
2721
- }
2722
-
2723
- case 'type_time': {
2724
- if($element_value =='')
2725
- $element_value = ':';
2726
-
2727
- $params_names=array('w_field_label_size','w_field_label_pos','w_time_type','w_am_pm','w_sec','w_hh','w_mm','w_ss','w_mini_labels','w_required','w_class');
2728
- $temp=$params;
2729
-
2730
- foreach($params_names as $params_name ) {
2731
- $temp=explode('*:*'.$params_name.'*:*',$temp);
2732
- $param[$params_name] = $temp[0];
2733
- $temp=$temp[1];
2734
- }
2735
-
2736
- if($temp) {
2737
- $temp =explode('*:*w_attr_name*:*',$temp);
2738
- $attrs = array_slice($temp,0, count($temp)-1);
2739
- foreach($attrs as $attr)
2740
- $param['attributes'] = $param['attributes'].' '.$attr;
2741
- }
2742
-
2743
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
2744
-
2745
- $w_mini_labels = explode('***',$param['w_mini_labels']);
2746
- $element_value = explode(':',$element_value);
2747
-
2748
-
2749
- $w_sec = '';
2750
- $w_sec_label='';
2751
-
2752
- if($param['w_sec']=='1') {
2753
- $w_sec = '<div align="center" style="display: table-cell;"><span class="wdform_colon" style="vertical-align: middle;">&nbsp;:&nbsp;</span></div><div style="display: table-cell;"><input type="text" value="'.(count($element_value)==2 ? '' : $element_value[2]).'" class="time_box" id="wdform_'.$id1.'_ss'.$form_id.'" name="wdform_'.$id1.'_ss'.$form_id.'" onkeypress="return check_second(event, &quot;wdform_'.$id1.'_ss'.$form_id.'&quot;)" '.$param['attributes'].'></div>';
2754
-
2755
- $w_sec_label='<div style="display: table-cell;"></div><div style="display: table-cell;"><label class="mini_label">'.$w_mini_labels[2].'</label></div>';
2756
- }
2757
-
2758
-
2759
- if($param['w_time_type']=='12') {
2760
- if(strpos($element_value[2],'pm')!==false) {
2761
- $am_ = "";
2762
- $pm_ = "selected=\"selected\"";
2763
- }
2764
- else {
2765
- $am_ = "selected=\"selected\"";
2766
- $pm_ = "";
2767
- }
2768
-
2769
- $w_time_type = '<div style="display: table-cell;"><select class="am_pm_select" name="wdform_'.$id1.'_am_pm'.$form_id.'" id="wdform_'.$id1.'_am_pm'.$form_id.'" '.$param['attributes'].'><option value="am" '.$am_.'>AM</option><option value="pm" '.$pm_.'>PM</option></select></div>';
2770
-
2771
- $w_time_type_label = '<div ><label class="mini_label">'.$w_mini_labels[3].'</label></div>';
2772
-
2773
- }
2774
- else {
2775
- $w_time_type='';
2776
- $w_time_type_label = '';
2777
- }
2778
-
2779
- $rep ='<div type="type_time" class="wdform-field"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
2780
-
2781
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';"><div style="display: table;"><div style="display: table-row;"><div style="display: table-cell;"><input type="text" value="'.$element_value[0].'" class="time_box" id="wdform_'.$id1.'_hh'.$form_id.'" name="wdform_'.$id1.'_hh'.$form_id.'" onkeypress="return check_hour(event, &quot;wdform_'.$id1.'_hh'.$form_id.'&quot;, &quot;23&quot;)" '.$param['attributes'].'></div><div align="center" style="display: table-cell;"><span class="wdform_colon" style="vertical-align: middle;">&nbsp;:&nbsp;</span></div><div style="display: table-cell;"><input type="text" value="'.$element_value[1].'" class="time_box" id="wdform_'.$id1.'_mm'.$form_id.'" name="wdform_'.$id1.'_mm'.$form_id.'" onkeypress="return check_minute(event, &quot;wdform_'.$id1.'_mm'.$form_id.'&quot;)" '.$param['attributes'].'></div>'.$w_sec.$w_time_type.'</div><div style="display: table-row;"><div style="display: table-cell;"><label class="mini_label">'.$w_mini_labels[0].'</label></div><div style="display: table-cell;"></div><div style="display: table-cell;"><label class="mini_label">'.$w_mini_labels[1].'</label></div>'.$w_sec_label.$w_time_type_label.'</div></div></div></div>';
2782
-
2783
- break;
2784
- }
2785
-
2786
- case 'type_date': {
2787
- $params_names=array('w_field_label_size','w_field_label_pos','w_date','w_required','w_class','w_format','w_but_val');
2788
- $temp = $params;
2789
- if(strpos($temp, 'w_disable_past_days') > -1)
2790
- $params_names = array('w_field_label_size','w_field_label_pos','w_date','w_required','w_class','w_format','w_but_val', 'w_disable_past_days');
2791
-
2792
- foreach($params_names as $params_name ) {
2793
- $temp=explode('*:*'.$params_name.'*:*',$temp);
2794
- $param[$params_name] = $temp[0];
2795
- $temp=$temp[1];
2796
- }
2797
-
2798
- if($temp) {
2799
- $temp =explode('*:*w_attr_name*:*',$temp);
2800
- $attrs = array_slice($temp,0, count($temp)-1);
2801
- foreach($attrs as $attr)
2802
- $param['attributes'] = $param['attributes'].' '.$attr;
2803
- }
2804
-
2805
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
2806
-
2807
- $rep ='<div type="type_date" class="wdform-field"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
2808
-
2809
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';"><input type="text" value="'.$element_value.'" class="wdform-date" id="wdform_'.$id1.'_element'.$form_id.'" name="wdform_'.$id1.'_element'.$form_id.'" maxlength="10" '.$param['attributes'].'><input id="wdform_'.$id1.'_button'.$form_id.'" class="wdform-calendar-button" type="reset" value="'.$param['w_but_val'].'" format="'.$param['w_format'].'" onclick="return showCalendar(\'wdform_'.$id1.'_element'.$form_id.'\' , \'%Y-%m-%d\')" '.$param['attributes'].' "></div></div>';
2810
-
2811
-
2812
- // $onload_js.= 'Calendar.setup({inputField: "wdform_'.$id1.'_element'.$form_id.'", ifFormat: "'.$param['w_format'].'",button: "wdform_'.$id1.'_button'.$form_id.'",align: "Tl",singleClick: true,firstDay: 0});';
2813
-
2814
- break;
2815
- }
2816
-
2817
-
2818
- case 'type_date_new': {
2819
-
2820
- $params_names = array('w_field_label_size','w_field_label_pos', 'w_size', 'w_date','w_required', 'w_show_image', 'w_class','w_format', 'w_start_day', 'w_default_date', 'w_min_date', 'w_max_date', 'w_invalid_dates', 'w_show_days', 'w_hide_time', 'w_but_val', 'w_disable_past_days');
2821
-
2822
- $temp = $params;
2823
-
2824
- foreach($params_names as $params_name ) {
2825
- $temp=explode('*:*'.$params_name.'*:*',$temp);
2826
- $param[$params_name] = $temp[0];
2827
- $temp=$temp[1];
2828
- }
2829
- if($temp) {
2830
- $temp =explode('*:*w_attr_name*:*',$temp);
2831
- $attrs = array_slice($temp,0, count($temp)-1);
2832
- foreach($attrs as $attr) {
2833
- $param['attributes'] = $param['attributes'].' '.$attr;
2834
- }
2835
- }
2836
-
2837
- $param['w_field_label_pos1'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "");
2838
- $param['w_field_label_pos2'] = ($param['w_field_label_pos']=="left" ? "" : "display:block;");
2839
-
2840
- $show_image = ($param['w_show_image']=="yes" ? "inline-block" : "none");
2841
-
2842
- $div_size = ($show_image == "inline-block" ? $param['w_size'] + 22 : $param['w_size']);
2843
- $input_size = ($show_image == "inline-block" ? "calc(100% - 22px)" : "100%");
2844
-
2845
- ////////// param date_picer //////////
2846
-
2847
-
2848
-
2849
-
2850
-
2851
- $w_show_week_days = explode('***', $param['w_show_days']);
2852
- $w_hide_sunday = $w_show_week_days[0] == 'yes' ? '' : ' && day != 0';
2853
- $w_hide_monday = $w_show_week_days[1] == 'yes' ? '' : ' && day != 1';
2854
- $w_hide_tuesday = $w_show_week_days[2] == 'yes' ? '' : ' && day != 2';
2855
- $w_hide_wednesday = $w_show_week_days[3] == 'yes' ? '' : ' && day != 3';
2856
- $w_hide_thursday = $w_show_week_days[4] == 'yes' ? '' : ' && day != 4';
2857
- $w_hide_friday = $w_show_week_days[5] == 'yes' ? '' : ' && day != 5';
2858
- $w_hide_saturday = $w_show_week_days[6] == 'yes' ? '' : '&& day != 6';
2859
-
2860
-
2861
-
2862
-
2863
- $rep ='<div type="type_date_new" class="wdform-field"><div class="wdform-label-section" style="'.$param['w_field_label_pos1'].' width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
2864
-
2865
-
2866
-
2867
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="width:'.$div_size.'px; ' .$param['w_field_label_pos2'].' "><input type="text" id="wdform_'.$id1.'_element'.$form_id.'" style="width:'.$input_size.'" name="wdform_'.$id1.'_element'.$form_id.'" '.$param['attributes'].'><img style="display:'.$show_image.'; vertical-align:sub" src="'.WD_FM_URL.'/images/date.png" id="button_calendar_'.$id1.'" /><input type="hidden" format="'.$param['w_format'].'" id="wdform_'.$id1.'_button'.$form_id.'"/></div></div>';
2868
-
2869
-
2870
-
2871
- $onload_js .='
2872
- jQuery("#button_calendar_'.$id1.'").click(function() {
2873
- jQuery("#wdform_'.$id1.'_element'.$form_id.'").datepicker("show");
2874
- });
2875
- jQuery("#wdform_'.$id1.'_element'.$form_id.'").datepicker({
2876
- dateFormat: "mm/dd/yy",
2877
- minDate: "'.$param['w_min_date'].'",
2878
- maxDate: "'.$param['w_max_date'].'",
2879
- changeMonth: true,
2880
- changeYear: true,
2881
- showOtherMonths: true,
2882
- selectOtherMonths: true,
2883
- firstDay: "'.$param['w_start_day'].'",
2884
-
2885
- beforeShowDay: function(date){
2886
- var invalid_dates = "'.$param["w_invalid_dates"].'";
2887
- var invalid_dates_finish = [];
2888
- var invalid_dates_start = invalid_dates.split(",");
2889
- var invalid_date_range =[];
2890
-
2891
-
2892
- for(var i = 0; i < invalid_dates_start.length; i++ ){
2893
- invalid_dates_start[i] = invalid_dates_start[i].trim();
2894
- if(invalid_dates_start[i].length < 11 || invalid_dates_start[i].indexOf("-") == -1){
2895
- invalid_dates_finish.push(invalid_dates_start[i]);
2896
- }
2897
- else{
2898
- if(invalid_dates_start[i].indexOf("-") > 4)
2899
- invalid_date_range.push(invalid_dates_start[i].split("-"));
2900
- else{
2901
- var invalid_date_array = invalid_dates_start[i].split("-");
2902
- var start_invalid_day = invalid_date_array[0] + "-" + invalid_date_array[1] + "-" + invalid_date_array[2];
2903
- var end_invalid_day = invalid_date_array[3] + "-" + invalid_date_array[4] + "-" + invalid_date_array[5];
2904
- invalid_date_range.push([start_invalid_day, end_invalid_day]);
2905
- }
2906
- }
2907
- }
2908
-
2909
-
2910
- jQuery.each(invalid_date_range, function( index, value ) {
2911
- for(var d = new Date(value[0]); d <= new Date(value[1]); d.setDate(d.getDate() + 1)) {
2912
- invalid_dates_finish.push(jQuery.datepicker.formatDate("mm/dd/yy", d));
2913
- }
2914
- });
2915
-
2916
- var string_days = jQuery.datepicker.formatDate("mm/dd/yy", date);
2917
- var day = date.getDay();
2918
- return [ invalid_dates_finish.indexOf(string_days) == -1 '.$w_hide_sunday .$w_hide_monday. $w_hide_tuesday. $w_hide_wednesday. $w_hide_thursday. $w_hide_friday. $w_hide_saturday.'];
2919
- }
2920
- });
2921
-
2922
-
2923
-
2924
- var default_date = "'.$element_value.'";
2925
- var format_date = "'.$param['w_format'].'";
2926
-
2927
- jQuery("#wdform_'.$id1.'_element'.$form_id.'").datepicker("option", "dateFormat", format_date);
2928
-
2929
- if(default_date =="today")
2930
- jQuery("#wdform_'.$id1.'_element'.$form_id.'").datepicker("setDate", new Date());
2931
- else if(default_date.indexOf("d") == -1 && default_date.indexOf("m") == -1 && default_date.indexOf("y") == -1 && default_date.indexOf("w") == -1){
2932
- if(default_date !== "")
2933
- default_date = jQuery.datepicker.formatDate(format_date, new Date(default_date));
2934
- jQuery("#wdform_'.$id1.'_element'.$form_id.'").datepicker("setDate", default_date);
2935
- }
2936
- else
2937
- jQuery("#wdform_'.$id1.'_element'.$form_id.'").datepicker("setDate", default_date);
2938
-
2939
- ';
2940
-
2941
- break;
2942
- }
2943
- //////////// date range //////////////////
2944
-
2945
- case 'type_date_range': {
2946
-
2947
- $params_names = array('w_field_label_size','w_field_label_pos', 'w_size', 'w_date','w_required', 'w_show_image', 'w_class','w_format', 'w_start_day', 'w_default_date_start', 'w_default_date_end', 'w_min_date', 'w_max_date', 'w_invalid_dates', 'w_show_days', 'w_hide_time', 'w_but_val', 'w_disable_past_days');
2948
-
2949
- $temp = $params;
2950
-
2951
- foreach($params_names as $params_name ) {
2952
- $temp=explode('*:*'.$params_name.'*:*',$temp);
2953
- $param[$params_name] = $temp[0];
2954
- $temp=$temp[1];
2955
- }
2956
- if($temp) {
2957
- $temp = explode('*:*w_attr_name*:*',$temp);
2958
- $attrs = array_slice($temp,0, count($temp)-1);
2959
- foreach($attrs as $attr) {
2960
- $param['attributes'] = $param['attributes'].' '.$attr;
2961
- }
2962
- }
2963
-
2964
- $param['w_field_label_pos1'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "");
2965
- $param['w_field_label_pos2'] = ($param['w_field_label_pos']=="left" ? "" : "display:block;");
2966
- $show_image = ($param['w_show_image']=="yes" ? "inline-block" : "none");
2967
-
2968
-
2969
- $input_size = $param['w_size'];
2970
- $param['w_size'] = ($show_image == "inline-block" ? $param['w_size']*2 + 44 : $param['w_size']*2 + 8);
2971
- $input_size = ($show_image == "inline-block" ? "calc(50% - 26px)" : "calc(50% - 4px)");
2972
-
2973
- $element_date_range_array = explode(' - ', $element_value);
2974
-
2975
-
2976
- $element_date_range_start =$element_date_range_array[0];
2977
- $element_date_range_end = $element_date_range_array[1];
2978
-
2979
- ////////// param date_picer //////////
2980
-
2981
- $w_show_week_days = explode('***', $param['w_show_days']);
2982
- $w_hide_sunday = $w_show_week_days[0] == 'yes' ? '' : ' && day != 0';
2983
- $w_hide_monday = $w_show_week_days[1] == 'yes' ? '' : ' && day != 1';
2984
- $w_hide_tuesday = $w_show_week_days[2] == 'yes' ? '' : ' && day != 2';
2985
- $w_hide_wednesday = $w_show_week_days[3] == 'yes' ? '' : ' && day != 3';
2986
- $w_hide_thursday = $w_show_week_days[4] == 'yes' ? '' : ' && day != 4';
2987
- $w_hide_friday = $w_show_week_days[5] == 'yes' ? '' : ' && day != 5';
2988
- $w_hide_saturday = $w_show_week_days[6] == 'yes' ? '' : '&& day != 6';
2989
-
2990
- $rep ='<div type="type_date_range" class="wdform-field"><div class="wdform-label-section" style="'.$param['w_field_label_pos1'].' width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
2991
-
2992
-
2993
-
2994
-
2995
-
2996
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="width:'.$param['w_size'].'px; ' .$param['w_field_label_pos2'].' "><input type="text" id="wdform_'.$id1.'_element'.$form_id.'0" style="width:'.$input_size.'" name="wdform_'.$id1.'_element'.$form_id.'0" '.$param['attributes'].' onchange="change_value_range(\'wdform_'.$id1.'_element'.$form_id.'1\', \'minDate\', this.value, \''.$param['w_min_date'].'\', \''.$param['w_format'].'\')"><img src="'.WD_FM_URL.'/images/date.png" style="display:'.$show_image.'; vertical-align:sub" id="button_calendar_'.$id1.'0" /><span>-</span><input type="text" id="wdform_'.$id1.'_element'.$form_id.'1" style="width:'.$input_size.'" name="wdform_'.$id1.'_element'.$form_id.'1" '.$param['attributes'].' onchange="change_value_range(\'wdform_'.$id1.'_element'.$form_id.'0\', \'maxDate\', this.value, \''.$param['w_max_date'].'\', \''.$param['w_format'].'\')"><img src="'.WD_FM_URL.'/images/date.png" style="display:'.$show_image.'; vertical-align:sub" id="button_calendar_'.$id1.'1" />
2997
- <input type="hidden" format="'.$param['w_format'].'" id="wdform_'.$id1.'_button'.$form_id.'" />
2998
- </div></div>';
2999
-
3000
-
3001
-
3002
- $onload_js .='
3003
- jQuery("#button_calendar_'.$id1.'0").click(function() {
3004
- jQuery("#wdform_'.$id1.'_element'.$form_id.'0").datepicker("show");
3005
- });
3006
- jQuery("#button_calendar_'.$id1.'1").click(function() {
3007
- jQuery("#wdform_'.$id1.'_element'.$form_id.'1").datepicker("show");
3008
- });
3009
- jQuery("input[id^=\'wdform_'.$id1.'_element'.$form_id.'\']").datepicker({
3010
- dateFormat: "mm/dd/yy",
3011
- minDate: "'.$param['w_min_date'].'",
3012
- maxDate: "'.$param['w_max_date'].'",
3013
- changeMonth: true,
3014
- changeYear: true,
3015
- showOtherMonths: true,
3016
- selectOtherMonths: true,
3017
- firstDay: "'.$param['w_start_day'].'",
3018
-
3019
- beforeShowDay: function(date){
3020
- var invalid_dates = "'.$param["w_invalid_dates"].'";
3021
- var invalid_dates_finish = [];
3022
- var invalid_dates_start = invalid_dates.split(",");
3023
- var invalid_date_range =[];
3024
-
3025
-
3026
- for(var i = 0; i < invalid_dates_start.length; i++ ){
3027
- invalid_dates_start[i] = invalid_dates_start[i].trim();
3028
- if(invalid_dates_start[i].length < 11 || invalid_dates_start[i].indexOf("-") == -1){
3029
- invalid_dates_finish.push(invalid_dates_start[i]);
3030
- }
3031
- else{
3032
- if(invalid_dates_start[i].indexOf("-") > 4)
3033
- invalid_date_range.push(invalid_dates_start[i].split("-"));
3034
- else{
3035
- var invalid_date_array = invalid_dates_start[i].split("-");
3036
- var start_invalid_day = invalid_date_array[0] + "-" + invalid_date_array[1] + "-" + invalid_date_array[2];
3037
- var end_invalid_day = invalid_date_array[3] + "-" + invalid_date_array[4] + "-" + invalid_date_array[5];
3038
- invalid_date_range.push([start_invalid_day, end_invalid_day]);
3039
- }
3040
- }
3041
- }
3042
-
3043
-
3044
- jQuery.each(invalid_date_range, function( index, value ) {
3045
- for(var d = new Date(value[0]); d <= new Date(value[1]); d.setDate(d.getDate() + 1)) {
3046
- invalid_dates_finish.push(jQuery.datepicker.formatDate("mm/dd/yy", d));
3047
- }
3048
- });
3049
-
3050
- var string_days = jQuery.datepicker.formatDate("mm/dd/yy", date);
3051
- var day = date.getDay();
3052
- return [ invalid_dates_finish.indexOf(string_days) == -1 '.$w_hide_sunday .$w_hide_monday. $w_hide_tuesday. $w_hide_wednesday. $w_hide_thursday. $w_hide_friday. $w_hide_saturday.'];
3053
- }
3054
- });
3055
-
3056
-
3057
-
3058
- var default_date_start = "'.$element_date_range_start.'";
3059
- var format_date = "'.$param['w_format'].'";
3060
-
3061
- jQuery("#wdform_'.$id1.'_element'.$form_id.'0").datepicker("option", "dateFormat", format_date);
3062
- jQuery("#wdform_'.$id1.'_element'.$form_id.'1").datepicker("option", "dateFormat", format_date);
3063
-
3064
- if(default_date_start =="today"){
3065
- jQuery("#wdform_'.$id1.'_element'.$form_id.'0").datepicker("setDate", new Date());
3066
- jQuery("#wdform_'.$id1.'_element'.$form_id.'1").datepicker("option", "minDate", new Date());
3067
- }
3068
- else if(default_date_start.indexOf("d") == -1 && default_date_start.indexOf("m") == -1 && default_date_start.indexOf("y") == -1 && default_date_start.indexOf("w") == -1){
3069
- if(default_date_start !== "")
3070
- default_date_start = jQuery.datepicker.formatDate(format_date, new Date(default_date_start));
3071
- jQuery("#wdform_'.$id1.'_element'.$form_id.'0").datepicker("setDate", default_date_start);
3072
- jQuery("#wdform_'.$id1.'_element'.$form_id.'1").datepicker("option", "minDate", default_date_start);
3073
- }
3074
- else{
3075
- jQuery("#wdform_'.$id1.'_element'.$form_id.'0").datepicker("setDate", default_date_start);
3076
- jQuery("#wdform_'.$id1.'_element'.$form_id.'1").datepicker("option", "minDate", default_date_start);
3077
- }
3078
-
3079
-
3080
- var default_date_end = "'.$element_date_range_end.'";
3081
- var format_date = "'.$param['w_format'].'";
3082
-
3083
-
3084
- jQuery("#wdform_'.$id1.'_element'.$form_id.'0").datepicker("option", "dateFormat", format_date);
3085
- jQuery("#wdform_'.$id1.'_element'.$form_id.'1").datepicker("option", "dateFormat", format_date);
3086
-
3087
- if(default_date_end =="today"){
3088
- jQuery("#wdform_'.$id1.'_element'.$form_id.'1").datepicker("setDate", new Date());
3089
- jQuery("#wdform_'.$id1.'_element'.$form_id.'0").datepicker("option", "maxDate", new Date());
3090
- }
3091
- else if(default_date_end.indexOf("d") == -1 && default_date_end.indexOf("m") == -1 && default_date_end.indexOf("y") == -1 && default_date_end.indexOf("w") == -1){
3092
- if(default_date_end !== "")
3093
- default_date_end = jQuery.datepicker.formatDate(format_date, new Date(default_date_end));
3094
- jQuery("#wdform_'.$id1.'_element'.$form_id.'1").datepicker("setDate", default_date_end);
3095
- jQuery("#wdform_'.$id1.'_element'.$form_id.'0").datepicker("option", "maxDate", default_date_end);
3096
- }
3097
- else{
3098
- jQuery("#wdform_'.$id1.'_element'.$form_id.'1").datepicker("setDate", default_date_end);
3099
- jQuery("#wdform_'.$id1.'_element'.$form_id.'0").datepicker("option", "maxDate", default_date_end);
3100
- }
3101
- ';
3102
-
3103
- break;
3104
- }
3105
-
3106
-
3107
- case 'type_date_fields': {
3108
- if($element_value=='')
3109
- $element_value='--';
3110
-
3111
- $params_names=array('w_field_label_size','w_field_label_pos','w_day','w_month','w_year','w_day_type','w_month_type','w_year_type','w_day_label','w_month_label','w_year_label','w_day_size','w_month_size','w_year_size','w_required','w_class','w_from','w_to','w_divider');
3112
-
3113
- $temp=$params;
3114
-
3115
- foreach($params_names as $params_name ) {
3116
- $temp=explode('*:*'.$params_name.'*:*',$temp);
3117
- $param[$params_name] = $temp[0];
3118
- $temp=$temp[1];
3119
- }
3120
-
3121
-
3122
- if($temp) {
3123
- $temp =explode('*:*w_attr_name*:*',$temp);
3124
- $attrs = array_slice($temp,0, count($temp)-1);
3125
- foreach($attrs as $attr)
3126
- $param['attributes'] = $param['attributes'].' '.$attr;
3127
- }
3128
-
3129
- $element_value = explode('-',$element_value);
3130
-
3131
- $param['w_day'] = (isset($_POST['wdform_'.$id1."_day".$form_id]) ? esc_html(stripslashes( $_POST['wdform_'.$id1."_day".$form_id])) : $param['w_day']);
3132
- $param['w_month'] = (isset($_POST['wdform_'.$id1."_month".$form_id]) ? esc_html(stripslashes( $_POST['wdform_'.$id1."_month".$form_id])) : $element_value[1]);//??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
3133
- $param['w_year'] = (isset($_POST['wdform_'.$id1."w_year".$form_id]) ? esc_html(stripslashes( $_POST['wdform_'.$id1."_year".$form_id])) : $param['w_year']);
3134
-
3135
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
3136
-
3137
- if($param['w_day_type']=="SELECT") {
3138
-
3139
- $w_day_type = '<select id="wdform_'.$id1.'_day'.$form_id.'" name="wdform_'.$id1.'_day'.$form_id.'" style="width: '.$param['w_day_size'].'px;" '.$param['attributes'].'><option value=""></option>';
3140
-
3141
- for($k=1; $k<=31; $k++) {
3142
-
3143
- if($k<10) {
3144
- if($element_value[0]=='0'.$k)
3145
- $selected = "selected=\"selected\"";
3146
- else
3147
- $selected = "";
3148
-
3149
- $w_day_type .= '<option value="0'.$k.'" '.$selected.'>0'.$k.'</option>';
3150
- }
3151
- else {
3152
- if($element_value[0]==''.$k)
3153
- $selected = "selected=\"selected\"";
3154
- else
3155
- $selected = "";
3156
-
3157
- $w_day_type .= '<option value="'.$k.'" '.$selected.'>'.$k.'</option>';
3158
- }
3159
-
3160
- }
3161
- $w_day_type .= '</select>';
3162
-
3163
- }
3164
- else {
3165
- $w_day_type = '<input type="text" value="'.$element_value[0].'" id="wdform_'.$id1.'_day'.$form_id.'" name="wdform_'.$id1.'_day'.$form_id.'" style="width: '.$param['w_day_size'].'px;" '.$param['attributes'].'>';
3166
- $onload_js .='jQuery("#wdform_'.$id1.'_day'.$form_id.'").blur(function() {if (jQuery(this).val()=="0") jQuery(this).val(""); else add_0(this)});';
3167
- $onload_js .='jQuery("#wdform_'.$id1.'_day'.$form_id.'").keypress(function() {return check_day(event, this)});';
3168
- }
3169
-
3170
-
3171
- if($param['w_month_type']=="SELECT") {
3172
-
3173
- $w_month_type = '<select id="wdform_'.$id1.'_month'.$form_id.'" name="wdform_'.$id1.'_month'.$form_id.'" style="width: '.$param['w_month_size'].'px;" '.$param['attributes'].'><option value=""></option><option value="01" '.($param['w_month']=="01" ? "selected=\"selected\"": "").' >'.(__("January", 'form_maker')).'</option><option value="02" '.($param['w_month']=="02" ? "selected=\"selected\"": "").'>'.(__("February", 'form_maker')).'</option><option value="03" '.($param['w_month']=="03"? "selected=\"selected\"": "").'>'.(__("March", 'form_maker')).'</option><option value="04" '.($param['w_month']=="04" ? "selected=\"selected\"": "").' >'.(__("April", 'form_maker')).'</option><option value="05" '.($param['w_month']=="05" ? "selected=\"selected\"": "").' >'.(__("May", 'form_maker')).'</option><option value="06" '.($param['w_month']=="06" ? "selected=\"selected\"": "").' >'.(__("June", 'form_maker')).'</option><option value="07" '.($param['w_month']=="07" ? "selected=\"selected\"": "").' >'.(__("July", 'form_maker')).'</option><option value="08" '.($param['w_month']=="08" ? "selected=\"selected\"": "").' >'.(__("August", 'form_maker')).'</option><option value="09" '.($param['w_month']=="09" ? "selected=\"selected\"": "").' >'.(__("September", 'form_maker')).'</option><option value="10" '.($param['w_month']=="10" ? "selected=\"selected\"": "").' >'.(__("October", 'form_maker')).'</option><option value="11" '.($param['w_month']=="11" ? "selected=\"selected\"": "").'>'.(__("November", 'form_maker')).'</option><option value="12" '.($param['w_month']=="12" ? "selected=\"selected\"": "").' >'.(__("December", 'form_maker')).'</option></select>';
3174
- }
3175
- else {
3176
- $w_month_type = '<input type="text" value="'.$element_value[1].'" id="wdform_'.$id1.'_month'.$form_id.'" name="wdform_'.$id1.'_month'.$form_id.'" style="width: '.$param['w_day_size'].'px;" '.$param['attributes'].'>';
3177
- $onload_js .='jQuery("#wdform_'.$id1.'_month'.$form_id.'").blur(function() {if (jQuery(this).val()=="0") jQuery(this).val(""); else add_0(this)});';
3178
- $onload_js .='jQuery("#wdform_'.$id1.'_month'.$form_id.'").keypress(function() {return check_month(event, this)});';
3179
- }
3180
-
3181
-
3182
- if($param['w_year_type']=="SELECT" ) {
3183
- $w_year_type = '<select id="wdform_'.$id1.'_year'.$form_id.'" name="wdform_'.$id1.'_year'.$form_id.'" from="'.$param['w_from'].'" to="'.$param['w_to'].'" style="width: '.$param['w_year_size'].'px;" '.$param['attributes'].'><option value=""></option>';
3184
-
3185
- for($k=$param['w_to']; $k>=$param['w_from']; $k--) {
3186
- if($element_value[2]==$k)
3187
- $selected = "selected=\"selected\"";
3188
- else
3189
- $selected = "";
3190
-
3191
- $w_year_type .= '<option value="'.$k.'" '.$selected.'>'.$k.'</option>';
3192
- }
3193
- $w_year_type .= '</select>';
3194
- }
3195
- else {
3196
- $w_year_type = '<input type="text" value="'.$element_value[2].'" id="wdform_'.$id1.'_year'.$form_id.'" name="wdform_'.$id1.'_year'.$form_id.'" from="'.$param['w_from'].'" to="'.$param['w_to'].'" style="width: '.$param['w_day_size'].'px;" '.$param['attributes'].'>';
3197
- $onload_js .='jQuery("#wdform_'.$id1.'_year'.$form_id.'").blur(function() {check_year2(this)});';
3198
- $onload_js .='jQuery("#wdform_'.$id1.'_year'.$form_id.'").keypress(function() {return check_year1(event, this)});';
3199
- $onload_js .='jQuery("#wdform_'.$id1.'_year'.$form_id.'").change(function() {change_year(this)});';
3200
- }
3201
-
3202
- $rep ='<div type="type_date_fields" class="wdform-field"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
3203
-
3204
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';"><div style="display: table;"><div style="display: table-row;"><div style="display: table-cell;">'.$w_day_type.'</div><div style="display: table-cell;"><span class="wdform_separator">'.$param['w_divider'].'</span></div><div style="display: table-cell;">'.$w_month_type.'</div><div style="display: table-cell;"><span class="wdform_separator">'.$param['w_divider'].'</span></div><div style="display: table-cell;">'.$w_year_type.'</div></div><div style="display: table-row;"><div style="display: table-cell;"><label class="mini_label">'.$param['w_day_label'].'</label></div><div style="display: table-cell;"></div><div style="display: table-cell;"><label class="mini_label" >'.$param['w_month_label'].'</label></div><div style="display: table-cell;"></div><div style="display: table-cell;"><label class="mini_label">'.$param['w_year_label'].'</label></div></div></div></div></div>';
3205
-
3206
- break;
3207
- }
3208
-
3209
-
3210
- case 'type_hidden': {
3211
- $params_names=array('w_name','w_value');
3212
- $temp=$params;
3213
-
3214
- foreach($params_names as $params_name ) {
3215
- $temp=explode('*:*'.$params_name.'*:*',$temp);
3216
- $param[$params_name] = $temp[0];
3217
- $temp=$temp[1];
3218
- }
3219
-
3220
- if($temp) {
3221
- $temp =explode('*:*w_attr_name*:*',$temp);
3222
- $attrs = array_slice($temp,0, count($temp)-1);
3223
- foreach($attrs as $attr)
3224
- $param['attributes'] = $param['attributes'].' '.$attr;
3225
- }
3226
-
3227
- $rep ='<div type="type_hidden" class="wdform-field"><div class="wdform-label-section" style="float:left; width: 150px;"><span class="wdform-label">' . $label . '</span></div><div class="wdform-element-section" style="display: table-cell;"><input type="text" value="'.$element_value.'" id="wdform_'.$id1.'_element'.$form_id.'" name="'.$param['w_name'].'" '.$param['attributes'].'></div></div>';
3228
-
3229
- break;
3230
- }
3231
-
3232
-
3233
- case 'type_paypal_price': {
3234
-
3235
- $params_names=array('w_field_label_size','w_field_label_pos','w_first_val','w_title', 'w_mini_labels','w_size','w_required','w_hide_cents','w_class','w_range_min','w_range_max');
3236
- $temp=$params;
3237
-
3238
- foreach($params_names as $params_name ) {
3239
- $temp=explode('*:*'.$params_name.'*:*',$temp);
3240
- $param[$params_name] = $temp[0];
3241
- $temp=$temp[1];
3242
- }
3243
-
3244
-
3245
- if($temp) {
3246
- $temp =explode('*:*w_attr_name*:*',$temp);
3247
- $attrs = array_slice($temp,0, count($temp)-1);
3248
- foreach($attrs as $attr)
3249
- $param['attributes'] = $param['attributes'].' '.$attr;
3250
- }
3251
-
3252
- if (strpos($element_value,'.')!== false)
3253
- $element = explode('.',$element_value);
3254
- else {
3255
- $element = Array();
3256
- $element[0] = preg_replace("/[^0-9]/","",$element_value);
3257
- $element[1] = '';
3258
- }
3259
-
3260
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
3261
-
3262
- $hide_cents = ($param['w_hide_cents']=="yes" ? "none;" : "table-cell;");
3263
-
3264
- $w_mini_labels = explode('***',$param['w_mini_labels']);
3265
-
3266
- $rep ='<div type="type_paypal_price" class="wdform-field"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
3267
-
3268
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';"><input type="hidden" value="'.$param['w_range_min'].'" name="wdform_'.$id1.'_range_min'.$form_id.'" id="wdform_'.$id1.'_range_min'.$form_id.'"><input type="hidden" value="'.$param['w_range_max'].'" name="wdform_'.$id1.'_range_max'.$form_id.'" id="wdform_'.$id1.'_range_max'.$form_id.'"><div id="wdform_'.$id1.'_table_price" style="display: table;"><div id="wdform_'.$id1.'_tr_price1" style="display: table-row;"><div id="wdform_'.$id1.'_td_name_currency" style="display: table-cell;"><span class="wdform_colon" style="vertical-align: middle;"><!--repstart-->&nbsp;'.$form_currency.'&nbsp;<!--repend--></span></div><div id="wdform_'.$id1.'_td_name_dollars" style="display: table-cell;"><input type="text" class="" id="wdform_'.$id1.'_element_dollars'.$form_id.'" name="wdform_'.$id1.'_element_dollars'.$form_id.'" value="'.(strpos($element_value,'.') !== false ? preg_replace("/[^0-9]/","",$element[0]) : $element[0]).'" onkeypress="return check_isnum(event)" style="width: '.$param['w_size'].'px;" '.$param['attributes'].'></div><div id="wdform_'.$id1.'_td_name_divider" style="display: '.$hide_cents.';"><span class="wdform_colon" style="vertical-align: middle;">&nbsp;.&nbsp;</span></div><div id="wdform_'.$id1.'_td_name_cents" style="display: '.$hide_cents.'"><input type="text" class="" id="wdform_'.$id1.'_element_cents'.$form_id.'" name="wdform_'.$id1.'_element_cents'.$form_id.'" value="'.(strpos($element_value,'.') !== false ? preg_replace("/[^0-9]/","",$element[1]) : " ").'" style="width: 30px;" '.$param['attributes'].'></div></div><div id="wdform_'.$id1.'_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">'.$w_mini_labels[0].'</label></div><div id="wdform_'.$id1.'_td_name_label_divider" style="display: '.$hide_cents.'"><label class="mini_label"></label></div><div align="left" id="wdform_'.$id1.'_td_name_label_cents" style="display: '.$hide_cents.'"><label class="mini_label">'.$w_mini_labels[1].'</label></div></div></div></div></div>';
3269
-
3270
- $onload_js .='jQuery("#wdform_'.$id1.'_element_cents'.$form_id.'").blur(function() {add_0(this)});';
3271
- $onload_js .='jQuery("#wdform_'.$id1.'_element_cents'.$form_id.'").keypress(function() {return check_isnum_interval(event,this,0,99)});';
3272
-
3273
- break;
3274
- }
3275
-
3276
- case 'type_paypal_select':
3277
-
3278
- {
3279
-
3280
-
3281
-
3282
- if($element_value=='')
3283
-
3284
- $element_value = ' :';
3285
-
3286
-
3287
-
3288
- $params_names=array('w_field_label_size','w_field_label_pos','w_size','w_choices','w_choices_price','w_choices_checked', 'w_choices_disabled','w_required','w_quantity','w_class','w_property','w_property_values');
3289
-
3290
- $temp=$params;
3291
-
3292
-
3293
-
3294
- if(strpos($temp, 'w_choices_params') > -1)
3295
-
3296
- $params_names=array('w_field_label_size','w_field_label_pos','w_size','w_choices','w_choices_price','w_choices_checked', 'w_choices_disabled','w_required','w_quantity', 'w_quantity_value', 'w_choices_params','w_class','w_property','w_property_values');
3297
-
3298
-
3299
-
3300
- foreach($params_names as $params_name )
3301
-
3302
- {
3303
-
3304
- $temp=explode('*:*'.$params_name.'*:*',$temp);
3305
-
3306
- $param[$params_name] = $temp[0];
3307
-
3308
- $temp=$temp[1];
3309
-
3310
- }
3311
-
3312
-
3313
-
3314
-
3315
-
3316
- if($temp)
3317
-
3318
- {
3319
-
3320
- $temp =explode('*:*w_attr_name*:*',$temp);
3321
-
3322
- $attrs = array_slice($temp,0, count($temp)-1);
3323
-
3324
- foreach($attrs as $attr)
3325
-
3326
- $param['attributes'] = $param['attributes'].' '.$attr;
3327
-
3328
- }
3329
-
3330
-
3331
-
3332
-
3333
-
3334
- $wdformfieldsize = ($param['w_field_label_pos']=="left" ? ($param['w_field_label_size']+$param['w_size']) : max($param['w_field_label_size'], $param['w_size']));
3335
-
3336
- $param['w_field_label_pos1'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "");
3337
-
3338
- $param['w_field_label_pos2'] = ($param['w_field_label_pos']=="left" ? "" : "display:block;");
3339
-
3340
-
3341
-
3342
- $param['w_choices'] = explode('***',$param['w_choices']);
3343
-
3344
- $param['w_choices_price'] = explode('***',$param['w_choices_price']);
3345
-
3346
-
3347
-
3348
- $param['w_choices_disabled'] = explode('***',$param['w_choices_disabled']);
3349
-
3350
- $param['w_property'] = explode('***',$param['w_property']);
3351
-
3352
- $param['w_property_values'] = explode('***',$param['w_property_values']);
3353
-
3354
- if(isset($param['w_choices_params']))
3355
-
3356
- $param['w_choices_params'] = explode('***',$param['w_choices_params']);
3357
-
3358
-
3359
-
3360
-
3361
-
3362
- if(strpos($element_value,'***br***') !== false)
3363
-
3364
- {
3365
-
3366
- $element_value = explode('***br***',$element_value);
3367
-
3368
- if(count($element_value)==2)
3369
-
3370
- {
3371
-
3372
- if(strpos($element_value[1],'***quantity***') !== false)
3373
-
3374
- {
3375
-
3376
- $quantity_value = explode(': ',str_replace("***quantity***","",$element_value[1]));
3377
-
3378
- $quantity_value = $quantity_value[1];
3379
-
3380
- $property_of_select = '';
3381
-
3382
- }
3383
-
3384
- else
3385
-
3386
- {
3387
-
3388
- $quantity_value = '' ;
3389
-
3390
- $property_of_select = explode(': ',str_replace("***property***","",$element_value[1]));
3391
-
3392
- $property_of_select = $property_of_select[1];
3393
-
3394
- }
3395
-
3396
-
3397
-
3398
- $element_value = explode(' :',$element_value[0]);
3399
-
3400
- $choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
3401
-
3402
- }
3403
-
3404
- else
3405
-
3406
- {
3407
-
3408
- $quantity_value = explode(': ',str_replace("***quantity***","",$element_value[1]));
3409
-
3410
- $quantity_value = $quantity_value[1];
3411
-
3412
- $property_of_select = explode(': ',str_replace("***property***","",$element_value[2]));
3413
-
3414
- $property_of_select = $property_of_select[1];
3415
-
3416
- $element_value = explode(' :',$element_value[0]);
3417
-
3418
- $choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
3419
-
3420
- }
3421
-
3422
- }
3423
-
3424
- else
3425
-
3426
- {
3427
-
3428
- $element_value = explode(' :',$element_value);
3429
-
3430
- $choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
3431
-
3432
- $quantity_value = '';
3433
-
3434
- $property_of_select = '';
3435
-
3436
- }
3437
-
3438
-
3439
-
3440
-
3441
-
3442
- $rep='<div type="type_paypal_select" class="wdform-field" style="width:'.$wdformfieldsize.'px"><div class="wdform-label-section" style="'.$param['w_field_label_pos1'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
3443
-
3444
-
3445
-
3446
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos2'].'; width: '.$param['w_size'].'px;"><select id="wdform_'.$id1.'_element'.$form_id.'" name="wdform_'.$id1.'_element'.$form_id.'" style="width:100%;" '.$param['attributes'].'>';
3447
-
3448
- foreach($param['w_choices'] as $key => $choice)
3449
-
3450
- {
3451
-
3452
- if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
3453
-
3454
- {
3455
-
3456
- $choices_labels =array();
3457
- $choices_values =array();
3458
- $w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
3459
- $where = (str_replace(array('[',']'), '', $w_choices_params[0]) ? ' WHERE '.str_replace(array('[',']'), '', $w_choices_params[0]) : '');
3460
- $w_choices_params = explode('[db_info]',$w_choices_params[1]);
3461
- $order_by = str_replace(array('[',']'), '', $w_choices_params[0]);
3462
- $db_info = str_replace(array('[',']'), '', $w_choices_params[1]);
3463
-
3464
-
3465
- $label_table_and_column = explode(':',str_replace(array('[',']'), '', $choice));
3466
-
3467
- $table = $label_table_and_column[0];
3468
-
3469
- $label_column = $label_table_and_column[1];
3470
-
3471
- if($label_column)
3472
-
3473
- {
3474
-
3475
- $choices_labels = $this->model->select_data_from_db_for_labels($db_info, $label_column, $table, $where, $order_by);
3476
-
3477
- }
3478
-
3479
-
3480
-
3481
- $value_table_and_column = explode(':',str_replace(array('[',']'), '', $param['w_choices_price'][$key]));
3482
-
3483
- $value_column = $param['w_choices_disabled'][$key]=="true" ? '' : $value_table_and_column[1];
3484
-
3485
-
3486
-
3487
- if($value_column)
3488
-
3489
- {
3490
-
3491
- $choices_values = $this->model->select_data_from_db_for_values($db_info, $value_column, $table, $where, $order_by);
3492
-
3493
- }
3494
-
3495
-
3496
-
3497
- $columns_count = count($choices_labels)>0 ? count($choices_labels) : count($choices_values);
3498
-
3499
-
3500
-
3501
- for($k=0; $k<$columns_count; $k++)
3502
-
3503
- {
3504
-
3505
- $choice_label = isset($choices_labels[$k]) ? $choices_labels[$k] : '';
3506
-
3507
- $choice_value = isset($choices_values[$k]) ? (float)$choices_values[$k] : '';
3508
-
3509
-
3510
-
3511
- if($element_value[0] == $choice_label && $choice_value == $choise_value)
3512
-
3513
- $selected = 'selected="selected"';
3514
-
3515
- else
3516
-
3517
- $selected = '';
3518
-
3519
-
3520
-
3521
- $rep.='<option value="'.$choice_value.'" '.$selected.'>'.$choice_label.'</option>';
3522
-
3523
- }
3524
-
3525
- }
3526
-
3527
- else
3528
-
3529
- {
3530
-
3531
- if($param['w_choices_disabled'][$key]=="true")
3532
-
3533
- $choice_value='';
3534
-
3535
- else
3536
-
3537
- $choice_value=$param['w_choices_price'][$key];
3538
-
3539
-
3540
-
3541
- if($element_value[0] == $choice && $param['w_choices_price'][$key] == $choise_value)
3542
-
3543
- $selected = 'selected="selected"';
3544
-
3545
- else
3546
-
3547
- $selected = '';
3548
-
3549
-
3550
-
3551
- $rep.='<option value="'.$choice_value.'" '.$selected.'>'.$choice.'</option>';
3552
-
3553
-
3554
-
3555
- }
3556
-
3557
- }
3558
-
3559
- $rep.='</select><div id="wdform_'.$id1.'_div'.$form_id.'">';
3560
-
3561
- if($param['w_quantity']=="yes")
3562
-
3563
- {
3564
-
3565
- $rep.='<div class="paypal-property"><label class="mini_label" style="margin: 0px 5px;">Quantity</label><input type="text" id="wdform_'.$id1.'_element_quantity'.$form_id.'" name="wdform_'.$id1.'_element_quantity'.$form_id.'" value="'.($quantity_value=="" ? 1 : $quantity_value).'" class="wdform-quantity"></div>';
3566
-
3567
- }
3568
-
3569
- if($param['w_property'][0])
3570
-
3571
- foreach($param['w_property'] as $key => $property)
3572
-
3573
- {
3574
-
3575
-
3576
-
3577
- $rep.='
3578
-
3579
- <div id="wdform_'.$id1.'_property_'.$key.'" class="paypal-property">
3580
-
3581
- <div style="width:150px; display:inline-block;">
3582
-
3583
- <label class="mini_label" id="wdform_'.$id1.'_property_label_'.$form_id.''.$key.'" style="margin-right: 5px;">'.$property.'</label>
3584
-
3585
- <select id="wdform_'.$id1.'_property'.$form_id.''.$key.'" name="wdform_'.$id1.'_property'.$form_id.''.$key.'" style="width: 100%; margin: 2px 0px;">';
3586
-
3587
- $param['w_property_values'][$key] = explode('###',$param['w_property_values'][$key]);
3588
-
3589
- $param['w_property_values'][$key] = array_slice($param['w_property_values'][$key],1, count($param['w_property_values'][$key]));
3590
-
3591
- foreach($param['w_property_values'][$key] as $subkey => $property_value)
3592
-
3593
- {
3594
-
3595
- $rep.='<option id="wdform_'.$id1.'_'.$key.'_option'.$subkey.'" value="'.$property_value.'" '.($property_of_select==$property_value ? 'selected="selected"' : "").'>'.$property_value.'</option>';
3596
-
3597
- }
3598
-
3599
- $rep.='</select></div></div>';
3600
-
3601
- }
3602
-
3603
-
3604
-
3605
- $rep.='</div></div></div>';
3606
-
3607
-
3608
-
3609
-
3610
-
3611
- $onsubmit_js.='
3612
-
3613
- jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_label'.$form_id.'\" />").val(jQuery("#wdform_'.$id1.'_element'.$form_id.' option:selected").text()).appendTo("#adminForm");
3614
-
3615
- ';
3616
-
3617
- $onsubmit_js.='
3618
-
3619
- jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_quantity_label'.$form_id.'\" />").val("Quantity").appendTo("#adminForm");
3620
-
3621
- ';
3622
-
3623
- $onsubmit_js.='
3624
-
3625
- jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_property_label'.$form_id.'\" />").val("'.$param['w_property'][0].'").appendTo("#adminForm");
3626
-
3627
- ';
3628
-
3629
-
3630
-
3631
-
3632
-
3633
- break;
3634
-
3635
- }
3636
-
3637
- case 'type_paypal_checkbox':
3638
-
3639
- {
3640
-
3641
-
3642
-
3643
- if($element_value == '')
3644
-
3645
- $element_value =' :';
3646
-
3647
-
3648
-
3649
- $params_names=array('w_field_label_size','w_field_label_pos','w_flow','w_choices','w_choices_price','w_choices_checked','w_required','w_randomize','w_allow_other','w_allow_other_num','w_class','w_property','w_property_values','w_quantity');
3650
-
3651
- $temp=$params;
3652
-
3653
- if(strpos($temp, 'w_field_option_pos') > -1)
3654
-
3655
- $params_names=array('w_field_label_size','w_field_label_pos', 'w_field_option_pos','w_flow','w_choices','w_choices_price','w_choices_checked','w_required','w_randomize','w_allow_other','w_allow_other_num', 'w_choices_params', 'w_class','w_property','w_property_values','w_quantity');
3656
-
3657
- foreach($params_names as $params_name )
3658
-
3659
- {
3660
-
3661
- $temp=explode('*:*'.$params_name.'*:*',$temp);
3662
-
3663
- $param[$params_name] = $temp[0];
3664
-
3665
- $temp=$temp[1];
3666
-
3667
- }
3668
-
3669
-
3670
-
3671
-
3672
-
3673
- if($temp)
3674
-
3675
- {
3676
-
3677
- $temp =explode('*:*w_attr_name*:*',$temp);
3678
-
3679
- $attrs = array_slice($temp,0, count($temp)-1);
3680
-
3681
- foreach($attrs as $attr)
3682
-
3683
- $param['attributes'] = $param['attributes'].' '.$attr;
3684
-
3685
- }
3686
-
3687
-
3688
-
3689
-
3690
-
3691
- if(!isset($param['w_field_option_pos']))
3692
-
3693
- $param['w_field_option_pos'] = 'left';
3694
-
3695
-
3696
-
3697
- $param['w_field_label_pos1'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "");
3698
-
3699
- $param['w_field_label_pos2'] = ($param['w_field_label_pos']=="left" ? "" : "display:block;");
3700
-
3701
- $param['w_field_option_pos1'] = ($param['w_field_option_pos']=="right" ? "style='float: none !important;'" : "");
3702
-
3703
- $param['w_field_option_pos2'] = ($param['w_field_option_pos']=="right" ? "style='float: left !important; margin-right: 8px !important; display: inline-block !important;'" : "");
3704
-
3705
-
3706
-
3707
-
3708
-
3709
- $param['w_choices'] = explode('***',$param['w_choices']);
3710
-
3711
- $param['w_choices_price'] = explode('***',$param['w_choices_price']);
3712
-
3713
-
3714
-
3715
- $param['w_property'] = explode('***',$param['w_property']);
3716
-
3717
- $param['w_property_values'] = explode('***',$param['w_property_values']);
3718
-
3719
- if(isset($param['w_choices_params']))
3720
-
3721
- $param['w_choices_params'] = explode('***',$param['w_choices_params']);
3722
-
3723
-
3724
-
3725
- $rep='<div type="type_paypal_checkbox" class="wdform-field"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
3726
-
3727
-
3728
-
3729
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';">';
3730
-
3731
-
3732
-
3733
-
3734
-
3735
- if(strpos($element_value,'***br***') !== false)
3736
-
3737
- {
3738
-
3739
- $element_value = explode('***br***',$element_value);
3740
-
3741
- foreach($element_value as $key => $element)
3742
-
3743
- {
3744
-
3745
-
3746
-
3747
- if(strpos($element,'***quantity***') !== false)
3748
-
3749
- {
3750
-
3751
- $quantity_value = explode(': ',str_replace("***quantity***","",$element));
3752
-
3753
- $quantity_value = $quantity_value[1];
3754
-
3755
- unset($element_value[$key]);
3756
-
3757
- }
3758
-
3759
- else
3760
-
3761
- if(strpos($element,'***property***') !== false)
3762
-
3763
- {
3764
-
3765
- $property_of_check = explode(': ',str_replace("***property***","",$element));
3766
-
3767
- $property_of_check = $property_of_check[1];
3768
-
3769
- unset($element_value[$key]);
3770
-
3771
- }
3772
-
3773
- else
3774
-
3775
- {
3776
-
3777
- for($m=0; $m<strlen($element); $m++)
3778
-
3779
- {
3780
-
3781
- if(!ctype_digit($element[strlen($element)-1]))
3782
-
3783
- $element_value[$key] = substr($element,0,-1);
3784
-
3785
- else
3786
-
3787
- break;
3788
-
3789
- }
3790
-
3791
- $quantity_value = '';
3792
-
3793
- $property_of_check = '';
3794
-
3795
- }
3796
-
3797
-
3798
-
3799
- }
3800
-
3801
- }
3802
-
3803
- else
3804
-
3805
- {
3806
-
3807
- $element_value = explode(' :',$element_value);
3808
-
3809
- $choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
3810
-
3811
- $quantity_value = '';
3812
-
3813
- $property_of_check = '';
3814
-
3815
- }
3816
-
3817
-
3818
-
3819
- $total_queries = 0;
3820
-
3821
- foreach($param['w_choices'] as $key => $choice)
3822
-
3823
- {
3824
-
3825
- $key1 = $key + $total_queries;
3826
-
3827
- if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
3828
-
3829
- {
3830
-
3831
- $choices_labels = array();
3832
- $choices_values = array();
3833
-
3834
- $w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
3835
- $where = (str_replace(array('[',']'), '', $w_choices_params[0]) ? ' WHERE '.str_replace(array('[',']'), '', $w_choices_params[0]) : '');
3836
- $w_choices_params = explode('[db_info]',$w_choices_params[1]);
3837
-
3838
- $order_by = str_replace(array('[',']'), '', $w_choices_params[0]);
3839
- $db_info = str_replace(array('[',']'), '', $w_choices_params[1]);
3840
-
3841
- $label_table_and_column = explode(':',str_replace(array('[',']'), '', $choice));
3842
-
3843
- $table = $label_table_and_column[0];
3844
-
3845
- $label_column = $label_table_and_column[1];
3846
-
3847
- if($label_column)
3848
-
3849
- {
3850
-
3851
- $choices_labels = $this->model->select_data_from_db_for_labels($db_info, $label_column, $table, $where, $order_by);
3852
- }
3853
-
3854
-
3855
-
3856
- $value_table_and_column = explode(':',str_replace(array('[',']'), '', $param['w_choices_price'][$key]));
3857
-
3858
- $value_column = $value_table_and_column[1];
3859
-
3860
-
3861
-
3862
- if($value_column)
3863
-
3864
- {
3865
-
3866
- $choices_values = $this->model->select_data_from_db_for_values($db_info, $value_column, $table, $where, $order_by);
3867
-
3868
- }
3869
-
3870
-
3871
-
3872
- $columns_count = count($choices_labels)>0 ? count($choices_labels) : count($choices_values);
3873
-
3874
-
3875
-
3876
- if(array_filter($choices_labels) || array_filter($choices_values))
3877
-
3878
- {
3879
-
3880
- $total_queries = $total_queries + $columns_count-1;
3881
-
3882
-
3883
-
3884
-
3885
-
3886
- for($k=0; $k<$columns_count; $k++)
3887
-
3888
- {
3889
-
3890
- $choice_label = isset($choices_labels) ? $choices_labels[$k] : '';
3891
-
3892
- $choice_value = isset($choices_values) ? (float)$choices_values[$k] : '';
3893
-
3894
-
3895
-
3896
- $checked=(in_array($choice_label.' - '.$choice_value, $element_value)=='true' ? 'checked="checked"' : '');
3897
-
3898
-
3899
-
3900
- $rep.='<div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).';"><label class="wdform-ch-rad-label" for="wdform_'.$id1.'_element'.$form_id.''.($key1+$k).'" '.$param['w_field_option_pos1'].'>'.$choice_label.'</label><div class="checkbox-div forlabs" '.$param['w_field_option_pos2'].'><input type="checkbox" id="wdform_'.$id1.'_element'.$form_id.''.($key1+$k).'" name="wdform_'.$id1.'_element'.$form_id.''.($key1+$k).'" value="'.$choice_value.'" '.$checked.' '.$param['attributes'].'><label for="wdform_'.$id1.'_element'.$form_id.''.($key1+$k).'"></label></div><input type="hidden" name="wdform_'.$id1.'_element'.$form_id.($key1+$k).'_label" value="'.htmlspecialchars($choice_label).'" /></div>';
3901
-
3902
-
3903
-
3904
-
3905
-
3906
- }
3907
-
3908
- }
3909
-
3910
- }
3911
-
3912
- else
3913
-
3914
- {
3915
-
3916
- $checked=(in_array($choice.' - '.$param['w_choices_price'][$key], $element_value)=='true' ? 'checked="checked"' : '');
3917
-
3918
-
3919
-
3920
- $rep.='<div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).';"><label class="wdform-ch-rad-label" for="wdform_'.$id1.'_element'.$form_id.''.$key1.'" '.$param['w_field_option_pos1'].'>'.$choice.'</label><div class="checkbox-div forlabs" '.$param['w_field_option_pos2'].'><input type="checkbox" id="wdform_'.$id1.'_element'.$form_id.''.$key1.'" name="wdform_'.$id1.'_element'.$form_id.''.$key1.'" value="'.$param['w_choices_price'][$key].'" '.$checked.' '.$param['attributes'].'><label for="wdform_'.$id1.'_element'.$form_id.''.$key1.'"></label></div><input type="hidden" name="wdform_'.$id1.'_element'.$form_id.$key1.'_label" value="'.htmlspecialchars($choice).'" /></div>';
3921
-
3922
- }
3923
-
3924
- }
3925
-
3926
-
3927
-
3928
- $rep.='<div id="wdform_'.$id1.'_div'.$form_id.'">';
3929
-
3930
- if($param['w_quantity']=="yes")
3931
-
3932
- $rep.='<div class="paypal-property"><label class="mini_label" style="margin: 0px 5px;">Quantity</label><input type="text" value="'.($quantity_value == '' ? 1 : $quantity_value).'" id="wdform_'.$id1.'_element_quantity'.$form_id.'" name="wdform_'.$id1.'_element_quantity'.$form_id.'" class="wdform-quantity"></div>';
3933
-
3934
-
3935
-
3936
- if($param['w_property'][0])
3937
-
3938
- foreach($param['w_property'] as $key => $property)
3939
-
3940
- {
3941
-
3942
-
3943
-
3944
- $rep.='
3945
-
3946
- <div class="paypal-property">
3947
-
3948
- <div style="width:150px; display:inline-block;">
3949
-
3950
- <label class="mini_label" id="wdform_'.$id1.'_property_label_'.$form_id.''.$key.'" style="margin-right: 5px;">'.$property.'</label>
3951
-
3952
- <select id="wdform_'.$id1.'_property'.$form_id.''.$key.'" name="wdform_'.$id1.'_property'.$form_id.''.$key.'" style="width: 100%; margin: 2px 0px;">';
3953
-
3954
- $param['w_property_values'][$key] = explode('###',$param['w_property_values'][$key]);
3955
-
3956
- $param['w_property_values'][$key] = array_slice($param['w_property_values'][$key],1, count($param['w_property_values'][$key]));
3957
-
3958
- foreach($param['w_property_values'][$key] as $subkey => $property_value)
3959
-
3960
- {
3961
-
3962
- $rep.='<option id="wdform_'.$id1.'_'.$key.'_option'.$subkey.'" value="'.$property_value.'" '.($property_of_check==$property_value ? 'selected="selected"' : "").'>'.$property_value.'</option>';
3963
-
3964
- }
3965
-
3966
- $rep.='</select></div></div>';
3967
-
3968
- }
3969
-
3970
-
3971
-
3972
- $rep.='</div></div></div>';
3973
-
3974
-
3975
-
3976
- $onsubmit_js.='
3977
-
3978
- jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_quantity_label'.$form_id.'\" />").val("Quantity").appendTo("#adminForm");
3979
-
3980
- ';
3981
-
3982
- $onsubmit_js.='
3983
-
3984
- jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_property_label'.$form_id.'\" />").val("'.$param['w_property'][0].'").appendTo("#adminForm");
3985
-
3986
- ';
3987
-
3988
-
3989
-
3990
- break;
3991
-
3992
- }
3993
-
3994
- case 'type_paypal_radio':
3995
-
3996
- {
3997
-
3998
-
3999
-
4000
- if($element_value=='')
4001
-
4002
- $element_value = ' :';
4003
-
4004
-
4005
-
4006
- $params_names=array('w_field_label_size','w_field_label_pos','w_flow','w_choices','w_choices_price','w_choices_checked','w_required','w_randomize','w_allow_other','w_allow_other_num','w_class','w_property','w_property_values','w_quantity');
4007
-
4008
- $temp=$params;
4009
-
4010
-
4011
-
4012
- if(strpos($temp, 'w_field_option_pos') > -1)
4013
-
4014
- $params_names=array('w_field_label_size','w_field_label_pos', 'w_field_option_pos', 'w_flow','w_choices','w_choices_price','w_choices_checked','w_required','w_randomize','w_allow_other','w_allow_other_num', 'w_choices_params', 'w_class', 'w_property','w_property_values','w_quantity');
4015
-
4016
-
4017
-
4018
- foreach($params_names as $params_name )
4019
-
4020
- {
4021
-
4022
- $temp=explode('*:*'.$params_name.'*:*',$temp);
4023
-
4024
- $param[$params_name] = $temp[0];
4025
-
4026
- $temp=$temp[1];
4027
-
4028
- }
4029
-
4030
-
4031
-
4032
- if($temp)
4033
-
4034
- {
4035
-
4036
- $temp =explode('*:*w_attr_name*:*',$temp);
4037
-
4038
- $attrs = array_slice($temp,0, count($temp)-1);
4039
-
4040
- foreach($attrs as $attr)
4041
-
4042
- $param['attributes'] = $param['attributes'].' '.$attr;
4043
-
4044
- }
4045
-
4046
- if(!isset($param['w_field_option_pos']))
4047
-
4048
- $param['w_field_option_pos'] = 'left';
4049
-
4050
-
4051
-
4052
- $param['w_field_label_pos1'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "");
4053
-
4054
- $param['w_field_label_pos2'] = ($param['w_field_label_pos']=="left" ? "" : "display:block;");
4055
-
4056
- $param['w_field_option_pos1'] = ($param['w_field_option_pos']=="right" ? "style='float: none !important;'" : "");
4057
-
4058
- $param['w_field_option_pos2'] = ($param['w_field_option_pos']=="right" ? "style='float: left !important; margin-right: 8px !important; display: inline-block !important;'" : "");
4059
-
4060
-
4061
-
4062
- $param['w_choices'] = explode('***',$param['w_choices']);
4063
-
4064
- $param['w_choices_price'] = explode('***',$param['w_choices_price']);
4065
-
4066
-
4067
-
4068
- $param['w_property'] = explode('***',$param['w_property']);
4069
-
4070
- $param['w_property_values'] = explode('***',$param['w_property_values']);
4071
-
4072
- if(isset($param['w_choices_params']))
4073
-
4074
- $param['w_choices_params'] = explode('***',$param['w_choices_params']);
4075
-
4076
-
4077
-
4078
- $rep='<div type="type_paypal_radio" class="wdform-field"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
4079
-
4080
-
4081
-
4082
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';">';
4083
-
4084
-
4085
-
4086
- if(strpos($element_value,'***br***') !== false)
4087
-
4088
- {
4089
-
4090
- $element_value = explode('***br***',$element_value);
4091
-
4092
- if(count($element_value)==2)
4093
-
4094
- {
4095
-
4096
- if(strpos($element_value[1],'***quantity***') !== false)
4097
-
4098
- {
4099
-
4100
- $quantity_value = explode(': ',str_replace("***quantity***","",$element_value[1]));
4101
-
4102
- $quantity_value = $quantity_value[1];
4103
-
4104
- $property_of_radio = '';
4105
-
4106
- }
4107
-
4108
- else
4109
-
4110
- {
4111
-
4112
- $quantity_value = '' ;
4113
-
4114
- $property_of_radio = explode(': ',str_replace("***property***","",$element_value[1]));
4115
-
4116
- $property_of_radio = $property_of_radio[1];
4117
-
4118
- }
4119
-
4120
-
4121
-
4122
- $element_value = explode(' :',$element_value[0]);
4123
-
4124
- $choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
4125
-
4126
- }
4127
-
4128
- else
4129
-
4130
- {
4131
-
4132
- $quantity_value = explode(': ',str_replace("***quantity***","",$element_value[1]));
4133
-
4134
- $quantity_value = $quantity_value[1];
4135
-
4136
- $property_of_radio = explode(': ',str_replace("***property***","",$element_value[2]));
4137
-
4138
- $property_of_radio = $property_of_radio[1];
4139
-
4140
-
4141
-
4142
- $element_value = explode(' :',$element_value[0]);
4143
-
4144
- $choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
4145
-
4146
- }
4147
-
4148
- }
4149
-
4150
- else
4151
-
4152
- {
4153
-
4154
- $element_value = explode(' :',$element_value);
4155
-
4156
- $choise_value = preg_replace("/[^0-9]/","",$element_value[1]);
4157
-
4158
- $quantity_value = '';
4159
-
4160
- $property_of_radio = '';
4161
-
4162
- }
4163
-
4164
- $total_queries = 0;
4165
-
4166
- foreach($param['w_choices'] as $key => $choice)
4167
-
4168
- {
4169
-
4170
- $key1 = $key + $total_queries;
4171
-
4172
- if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
4173
-
4174
- {
4175
-
4176
- $choices_labels =array();
4177
- $choices_values =array();
4178
- $w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
4179
- $where = (str_replace(array('[',']'), '', $w_choices_params[0]) ? ' WHERE '.str_replace(array('[',']'), '', $w_choices_params[0]) : '');
4180
- $w_choices_params = explode('[db_info]',$w_choices_params[1]);
4181
-
4182
- $order_by = str_replace(array('[',']'), '', $w_choices_params[0]);
4183
- $db_info = str_replace(array('[',']'), '', $w_choices_params[1]);
4184
-
4185
-
4186
- $label_table_and_column = explode(':',str_replace(array('[',']'), '', $choice));
4187
-
4188
- $table = $label_table_and_column[0];
4189
-
4190
- $label_column = $label_table_and_column[1];
4191
-
4192
- if($label_column)
4193
-
4194
- {
4195
-
4196
- $choices_labels = $this->model->select_data_from_db_for_labels($db_info, $label_column, $table, $where, $order_by);
4197
- }
4198
-
4199
-
4200
-
4201
- $value_table_and_column = explode(':',str_replace(array('[',']'), '', $param['w_choices_price'][$key]));
4202
-
4203
- $value_column = $value_table_and_column[1];
4204
-
4205
-
4206
-
4207
- if($value_column)
4208
-
4209
- {
4210
-
4211
- $choices_values = $this->model->select_data_from_db_for_values($db_info, $value_column, $table, $where, $order_by);
4212
-
4213
- }
4214
-
4215
-
4216
-
4217
- $columns_count_radio = count($choices_labels)>0 ? count($choices_labels) : count($choices_values);
4218
-
4219
-
4220
-
4221
- if(array_filter($choices_labels) || array_filter($choices_values))
4222
-
4223
- {
4224
-
4225
- $total_queries = $total_queries + $columns_count_radio-1;
4226
-
4227
- for($k=0; $k<$columns_count_radio; $k++)
4228
-
4229
- {
4230
-
4231
- $choice_label = isset($choices_labels) ? $choices_labels[$k] : '';
4232
-
4233
- $choice_value = isset($choices_values) ? (float)$choices_values[$k] : '';
4234
-
4235
-
4236
-
4237
- if($element_value[0] == $choice_label && $choice_value == $choise_value)
4238
-
4239
- $checked = 'checked="checked"';
4240
-
4241
- else
4242
-
4243
- $checked = '';
4244
-
4245
-
4246
-
4247
-
4248
-
4249
- $rep.='<div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).';"><label class="wdform-ch-rad-label" for="wdform_'.$id1.'_element'.$form_id.''.($key1+$k).'">'.$choice_label.'</label><div class="radio-div forlabs"><input type="radio" id="wdform_'.$id1.'_element'.$form_id.''.($key1+$k).'" name="wdform_'.$id1.'_element'.$form_id.'" value="'.$choice_value.'" title="'.htmlspecialchars($choice_label).'" '.$checked.' '.$param['attributes'].'><label for="wdform_'.$id1.'_element'.$form_id.''.($key1+$k).'"></label></div></div>';
4250
-
4251
-
4252
-
4253
- }
4254
-
4255
- }
4256
-
4257
- }
4258
-
4259
- else
4260
-
4261
- {
4262
-
4263
- if($element_value[0] == $choice && $param['w_choices_price'][$key] == $choise_value)
4264
-
4265
- $checked = 'checked="checked"';
4266
-
4267
- else
4268
-
4269
- $checked = '';
4270
-
4271
-
4272
-
4273
- $rep.='<div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).';"><label class="wdform-ch-rad-label" for="wdform_'.$id1.'_element'.$form_id.''.$key1.'">'.$choice.'</label><div class="radio-div forlabs"><input type="radio" id="wdform_'.$id1.'_element'.$form_id.''.$key1.'" name="wdform_'.$id1.'_element'.$form_id.'" value="'.$param['w_choices_price'][$key].'" title="'.htmlspecialchars($choice).'" '.$checked.' '.$param['attributes'].'><label for="wdform_'.$id1.'_element'.$form_id.''.$key1.'"></label></div></div>';
4274
-
4275
- }
4276
-
4277
-
4278
-
4279
- }
4280
-
4281
-
4282
-
4283
- $rep.='<div id="wdform_'.$id1.'_div'.$form_id.'">';
4284
-
4285
- if($param['w_quantity']=="yes")
4286
-
4287
- $rep.='<div class="paypal-property"><label class="mini_label" style="margin: 0px 5px;">Quantity</label><input type="text" value="'.($quantity_value=='' ? 1 : $quantity_value).'" id="wdform_'.$id1.'_element_quantity'.$form_id.'" name="wdform_'.$id1.'_element_quantity'.$form_id.'" class="wdform-quantity"></div>';
4288
-
4289
-
4290
-
4291
- if($param['w_property'][0])
4292
-
4293
- foreach($param['w_property'] as $key => $property)
4294
-
4295
- {
4296
-
4297
-
4298
-
4299
- $rep.='
4300
-
4301
- <div class="paypal-property">
4302
-
4303
- <div style="width:150px; display:inline-block;">
4304
-
4305
- <label class="mini_label" id="wdform_'.$id1.'_property_label_'.$form_id.''.$key.'" style="margin-right: 5px;">'.$property.'</label>
4306
-
4307
- <select id="wdform_'.$id1.'_property'.$form_id.''.$key.'" name="wdform_'.$id1.'_property'.$form_id.''.$key.'" style="width: 100%; margin: 2px 0px;">';
4308
-
4309
- $param['w_property_values'][$key] = explode('###',$param['w_property_values'][$key]);
4310
-
4311
- $param['w_property_values'][$key] = array_slice($param['w_property_values'][$key],1, count($param['w_property_values'][$key]));
4312
-
4313
- foreach($param['w_property_values'][$key] as $subkey => $property_value)
4314
-
4315
- {
4316
-
4317
- $rep.='<option id="wdform_'.$id1.'_'.$key.'_option'.$subkey.'" value="'.$property_value.'" '.($property_of_radio==$property_value ? 'selected="selected"' : "").'>'.$property_value.'</option>';
4318
-
4319
- }
4320
-
4321
- $rep.='</select></div></div>';
4322
-
4323
- }
4324
-
4325
-
4326
-
4327
- $rep.='</div></div></div>';
4328
-
4329
-
4330
-
4331
-
4332
-
4333
- $onsubmit_js.='
4334
-
4335
- jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_label'.$form_id.'\" />").val(
4336
-
4337
- jQuery("label[for=\'"+jQuery("input[name^=\'wdform_'.$id1.'_element'.$form_id.'\']:checked").prop("id")+"\']").eq(0).text()
4338
-
4339
- ).appendTo("#adminForm");
4340
-
4341
-
4342
-
4343
- ';
4344
-
4345
- $onsubmit_js.='
4346
-
4347
- jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_quantity_label'.$form_id.'\" />").val("Quantity").appendTo("#adminForm");
4348
-
4349
- ';
4350
-
4351
- $onsubmit_js.='
4352
-
4353
- jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_property_label'.$form_id.'\" />").val("'.$param['w_property'][0].'").appendTo("#adminForm");
4354
-
4355
- ';
4356
-
4357
- break;
4358
-
4359
- }
4360
-
4361
-
4362
- case 'type_paypal_shipping':
4363
-
4364
- {
4365
-
4366
-
4367
-
4368
- if($element_value=='')
4369
-
4370
- $element_value =' - ';
4371
-
4372
-
4373
-
4374
- $params_names=array('w_field_label_size','w_field_label_pos','w_flow','w_choices','w_choices_price','w_choices_checked','w_required','w_randomize','w_allow_other','w_allow_other_num','w_class');
4375
-
4376
- $temp=$params;
4377
-
4378
-
4379
-
4380
- if(strpos($temp, 'w_field_option_pos') > -1)
4381
-
4382
- $params_names=array('w_field_label_size','w_field_label_pos', 'w_field_option_pos', 'w_flow','w_choices','w_choices_price','w_choices_checked','w_required','w_randomize','w_allow_other','w_allow_other_num','w_choices_params', 'w_class');
4383
-
4384
- foreach($params_names as $params_name )
4385
-
4386
- {
4387
-
4388
- $temp=explode('*:*'.$params_name.'*:*',$temp);
4389
-
4390
- $param[$params_name] = $temp[0];
4391
-
4392
- $temp=$temp[1];
4393
-
4394
- }
4395
-
4396
-
4397
-
4398
- if($temp)
4399
-
4400
- {
4401
-
4402
- $temp =explode('*:*w_attr_name*:*',$temp);
4403
-
4404
- $attrs = array_slice($temp,0, count($temp)-1);
4405
-
4406
- foreach($attrs as $attr)
4407
-
4408
- $param['attributes'] = $param['attributes'].' '.$attr;
4409
-
4410
- }
4411
-
4412
-
4413
-
4414
- if(!isset($param['w_field_option_pos']))
4415
-
4416
- $param['w_field_option_pos'] = 'left';
4417
-
4418
-
4419
-
4420
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
4421
-
4422
- $param['w_field_option_pos1'] = ($param['w_field_option_pos']=="right" ? "style='float: none !important;'" : "");
4423
-
4424
- $param['w_field_option_pos2'] = ($param['w_field_option_pos']=="right" ? "style='float: left !important; margin-right: 8px !important; display: inline-block !important;'" : "");
4425
-
4426
-
4427
-
4428
-
4429
-
4430
- $param['w_choices'] = explode('***',$param['w_choices']);
4431
-
4432
- $param['w_choices_price'] = explode('***',$param['w_choices_price']);
4433
-
4434
- if(isset($param['w_choices_params']))
4435
-
4436
- $param['w_choices_params'] = explode('***',$param['w_choices_params']);
4437
-
4438
-
4439
-
4440
-
4441
-
4442
-
4443
-
4444
- $element_value = explode(' - ',$element_value);
4445
-
4446
- $element_value[1] = preg_replace("/[^0-9]/","",$element_value[1]);
4447
-
4448
-
4449
-
4450
- $rep='<div type="type_paypal_shipping" class="wdform-field"><div class="wdform-label-section" style="'.$param['w_field_label_pos'].'; width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
4451
-
4452
-
4453
-
4454
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].';">';
4455
-
4456
-
4457
-
4458
- $total_queries = 0;
4459
-
4460
- foreach($param['w_choices'] as $key => $choice)
4461
-
4462
- {
4463
-
4464
- $key1 = $key + $total_queries;
4465
-
4466
- if(isset($param['w_choices_params']) && $param['w_choices_params'][$key])
4467
-
4468
- {
4469
-
4470
- $choices_labels =array();
4471
- $choices_values =array();
4472
- $w_choices_params = explode('[where_order_by]',$param['w_choices_params'][$key]);
4473
- $where = (str_replace(array('[',']'), '', $w_choices_params[0]) ? ' WHERE '.str_replace(array('[',']'), '', $w_choices_params[0]) : '');
4474
- $w_choices_params = explode('[db_info]',$w_choices_params[1]);
4475
-
4476
- $order_by = str_replace(array('[',']'), '', $w_choices_params[0]);
4477
- $db_info = str_replace(array('[',']'), '', $w_choices_params[1]);
4478
-
4479
-
4480
- $label_table_and_column = explode(':',str_replace(array('[',']'), '', $choice));
4481
-
4482
- $table = $label_table_and_column[0];
4483
-
4484
- $label_column = $label_table_and_column[1];
4485
-
4486
- if($label_column)
4487
-
4488
- {
4489
-
4490
- $choices_labels = $this->model->select_data_from_db_for_labels($db_info, $label_column, $table, $where, $order_by);
4491
- }
4492
-
4493
-
4494
-
4495
- $value_table_and_column = explode(':',str_replace(array('[',']'), '', $param['w_choices_price'][$key]));
4496
-
4497
- $value_column = $value_table_and_column[1];
4498
-
4499
-
4500
-
4501
- if($value_column)
4502
-
4503
- {
4504
-
4505
- $choices_values = $this->model->select_data_from_db_for_values($db_info, $value_column, $table, $where, $order_by);
4506
-
4507
- }
4508
-
4509
-
4510
-
4511
- $columns_count_shipping = count($choices_labels)>0 ? count($choices_labels) : count($choices_values);
4512
-
4513
-
4514
-
4515
- if(array_filter($choices_labels) || array_filter($choices_values))
4516
-
4517
- {
4518
-
4519
- $total_queries = $total_queries + $columns_count_shipping-1;
4520
-
4521
- for($k=0; $k<$columns_count_shipping; $k++)
4522
-
4523
- {
4524
-
4525
- $choice_label = isset($choices_labels) ? $choices_labels[$k] : '';
4526
-
4527
- $choice_value = isset($choices_values) ? (float)$choices_values[$k] : '';
4528
-
4529
-
4530
-
4531
- $checked =(($choice_label==$element_value[0] && $choice_value== $element_value[1]) ? 'checked="checked"' : '');
4532
-
4533
-
4534
-
4535
- $rep.='<div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).';"><label class="wdform-ch-rad-label" for="wdform_'.$id1.'_element'.$form_id.''.($key1+$k).'">'.$choice_label.'</label><div class="radio-div forlabs"><input type="radio" id="wdform_'.$id1.'_element'.$form_id.''.($key1+$k).'" name="wdform_'.$id1.'_element'.$form_id.'" value="'.$choice_value.'" title="'.htmlspecialchars($choice_label).'" '.$checked.' '.$param['attributes'].'><label for="wdform_'.$id1.'_element'.$form_id.''.($key1+$k).'"></label></div></div>';
4536
-
4537
- }
4538
-
4539
- }
4540
-
4541
- }
4542
-
4543
- else
4544
-
4545
- {
4546
-
4547
- $checked =(($choice==$element_value[0] && $param['w_choices_price'][$key]== $element_value[1]) ? 'checked="checked"' : '');
4548
-
4549
-
4550
-
4551
- $rep.='<div style="display: '.($param['w_flow']=='hor' ? 'inline-block' : 'table-row' ).';"><label class="wdform-ch-rad-label" for="wdform_'.$id1.'_element'.$form_id.''.$key1.'">'.$choice.'</label><div class="radio-div forlabs"><input type="radio" id="wdform_'.$id1.'_element'.$form_id.''.$key1.'" name="wdform_'.$id1.'_element'.$form_id.'" value="'.$param['w_choices_price'][$key].'" title="'.htmlspecialchars($choice).'" '.$checked.' '.$param['attributes'].'><label for="wdform_'.$id1.'_element'.$form_id.''.$key1.'"></label></div></div>';
4552
-
4553
- }
4554
-
4555
- }
4556
-
4557
-
4558
-
4559
- $rep.='</div></div>';
4560
-
4561
-
4562
-
4563
-
4564
-
4565
- $onsubmit_js.='
4566
-
4567
- jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_element_label'.$form_id.'\" />").val(
4568
-
4569
- jQuery("label[for=\'"+jQuery("input[name^=\'wdform_'.$id1.'_element'.$form_id.'\']:checked").prop("id")+"\']").eq(0).text()
4570
-
4571
- ).appendTo("#adminForm");
4572
-
4573
-
4574
-
4575
- ';
4576
-
4577
-
4578
-
4579
- break;
4580
-
4581
- }
4582
-
4583
- case 'type_star_rating': {
4584
- if($element_value=='')
4585
- $element_value = '/';
4586
-
4587
- $params_names = array('w_field_label_size','w_field_label_pos','w_field_label_col','w_star_amount','w_required','w_class');
4588
- $temp = $params;
4589
- foreach($params_names as $params_name ) {
4590
- $temp=explode('*:*'.$params_name.'*:*',$temp);
4591
- $param[$params_name] = $temp[0];
4592
- $temp=$temp[1];
4593
- }
4594
-
4595
- if($temp) {
4596
- $temp =explode('*:*w_attr_name*:*',$temp);
4597
- $attrs = array_slice($temp,0, count($temp)-1);
4598
- foreach($attrs as $attr)
4599
- $param['attributes'] = $param['attributes'].' add_'.$attr;
4600
- }
4601
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
4602
-
4603
- $element_value = explode('/', $element_value);
4604
-
4605
- $images = '';
4606
- for($i=0; $i<$element_value[1]; $i++) {
4607
- $images .= '<img id="wdform_'.$id1.'_star_'.$i.'_'.$form_id.'" src="' . WD_FM_URL . '/images/star.png" >';
4608
-
4609
- $onload_js .='jQuery("#wdform_'.$id1.'_star_'.$i.'_'.$form_id.'").mouseover(function() {change_src('.$i.',"wdform_'.$id1.'", "'.$form_id.'", "'.$param['w_field_label_col'].'");});';
4610
- $onload_js .='jQuery("#wdform_'.$id1.'_star_'.$i.'_'.$form_id.'").mouseout(function() {reset_src('.$i.',"wdform_'.$id1.'", "'.$form_id.'");});';
4611
- $onload_js .='jQuery("#wdform_'.$id1.'_star_'.$i.'_'.$form_id.'").click(function() {select_star_rating('.$i.',"wdform_'.$id1.'", "'.$form_id.'","'.$param['w_field_label_col'].'", "'.$element_value[1].'");});';
4612
- $onload_js .='select_star_rating('.($element_value[0]-1).',"wdform_'.$id1.'", "'.$form_id.'","'.$param['w_field_label_col'].'", "'.$element_value[1].'");';
4613
- }
4614
-
4615
- $rep ='<div type="type_star_rating" class="wdform-field"><div class="wdform-label-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].' width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
4616
-
4617
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].'"><div id="wdform_'.$id1.'_element'.$form_id.'" '.$param['attributes'].'>'.$images.'</div><input type="hidden" value="" id="wdform_'.$id1.'_selected_star_amount'.$form_id.'" name="wdform_'.$id1.'_selected_star_amount'.$form_id.'"></div></div>';
4618
-
4619
-
4620
- $onsubmit_js.='
4621
- jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_star_amount'.$form_id.'\" value = \"'.$param['w_star_amount'].'\" />").appendTo("#form'.$form_id.'");
4622
- ';
4623
-
4624
- break;
4625
- }
4626
- case 'type_scale_rating': {
4627
-
4628
- if($element_value=='')
4629
- $element_value = '/';
4630
-
4631
- $params_names=array('w_field_label_size','w_field_label_pos','w_mini_labels','w_scale_amount','w_required','w_class');
4632
- $temp=$params;
4633
- foreach($params_names as $params_name ) {
4634
- $temp=explode('*:*'.$params_name.'*:*',$temp);
4635
- $param[$params_name] = $temp[0];
4636
- $temp=$temp[1];
4637
- }
4638
-
4639
- if($temp) {
4640
- $temp =explode('*:*w_attr_name*:*',$temp);
4641
- $attrs = array_slice($temp,0, count($temp)-1);
4642
- foreach($attrs as $attr)
4643
- $param['attributes'] = $param['attributes'].' add_'.$attr;
4644
- }
4645
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
4646
-
4647
- $element_value = explode('/',$element_value);
4648
- $w_mini_labels = explode('***',$param['w_mini_labels']);
4649
-
4650
- $numbers = '';
4651
- $radio_buttons = '';
4652
- $to_check=0;
4653
- $to_check=$element_value[0];
4654
-
4655
- for($i=1; $i<=$element_value[1]; $i++) {
4656
- $numbers.= '<div style="text-align: center; display: table-cell;"><span>'.$i.'</span></div>';
4657
- $radio_buttons.= '<div style="text-align: center; display: table-cell;"><div class="radio-div"><input id="wdform_'.$id1.'_scale_radio'.$form_id.'_'.$i.'" name="wdform_'.$id1.'_scale_radio'.$form_id.'" value="'.$i.'" type="radio" '.( $to_check==$i ? 'checked="checked"' : '' ).'><label for="wdform_'.$id1.'_scale_radio'.$form_id.'_'.$i.'"></label></div></div>';
4658
- }
4659
-
4660
- $rep ='<div type="type_scale_rating" class="wdform-field"><div class="wdform-label-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].' width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
4661
-
4662
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].'"><div id="wdform_'.$id1.'_element'.$form_id.'" style="float: left;" '.$param['attributes'].'><label class="mini_label">'.$w_mini_labels[0].'</label><div style="display: inline-table; vertical-align: middle;border-spacing: 7px;"><div style="display: table-row;">'.$numbers.'</div><div style="display: table-row;">'.$radio_buttons.'</div></div><label class="mini_label" >'.$w_mini_labels[1].'</label></div></div></div>';
4663
-
4664
- $onsubmit_js.='
4665
- jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_scale_amount'.$form_id.'\" value = \"'.$param['w_scale_amount'].'\" />").appendTo("#form'.$form_id.'");
4666
- ';
4667
-
4668
- break;
4669
- }
4670
-
4671
- case 'type_spinner': {
4672
-
4673
- $params_names=array('w_field_label_size','w_field_label_pos','w_field_width','w_field_min_value','w_field_max_value', 'w_field_step', 'w_field_value', 'w_required','w_class');
4674
- $temp=$params;
4675
- foreach($params_names as $params_name ) {
4676
- $temp=explode('*:*'.$params_name.'*:*',$temp);
4677
- $param[$params_name] = $temp[0];
4678
- $temp=$temp[1];
4679
- }
4680
-
4681
- if($temp) {
4682
- $temp =explode('*:*w_attr_name*:*',$temp);
4683
- $attrs = array_slice($temp,0, count($temp)-1);
4684
- foreach($attrs as $attr)
4685
- $param['attributes'] = $param['attributes'].' add_'.$attr;
4686
- }
4687
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
4688
-
4689
-
4690
- $rep ='<div type="type_spinner" class="wdform-field"><div class="wdform-label-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].' width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
4691
-
4692
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].'"><input type="text" value="'.($element_value!= 'null' ? $element_value : '').'" name="wdform_'.$id1.'_element'.$form_id.'" id="wdform_'.$id1.'_element'.$form_id.'" style="width: '.$param['w_field_width'].'px;" '.$param['attributes'].'></div></div>';
4693
-
4694
- $onload_js .='
4695
- jQuery("#wdform_'.$id1.'_element'.$form_id.'")[0].spin = null;
4696
- spinner = jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner();
4697
- spinner.spinner( "value", "'.($element_value!= 'null' ? $element_value : '').'");
4698
- jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner({ min: "'.$param['w_field_min_value'].'"});
4699
- jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner({ max: "'.$param['w_field_max_value'].'"});
4700
- jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner({ step: "'.$param['w_field_step'].'"});
4701
- ';
4702
-
4703
- break;
4704
- }
4705
-
4706
- case 'type_slider': {
4707
-
4708
- $params_names=array('w_field_label_size','w_field_label_pos','w_field_width','w_field_min_value','w_field_max_value', 'w_field_value', 'w_required','w_class');
4709
- $temp=$params;
4710
- foreach($params_names as $params_name ) {
4711
- $temp=explode('*:*'.$params_name.'*:*',$temp);
4712
- $param[$params_name] = $temp[0];
4713
- $temp=$temp[1];
4714
- }
4715
-
4716
- if($temp) {
4717
- $temp =explode('*:*w_attr_name*:*',$temp);
4718
- $attrs = array_slice($temp,0, count($temp)-1);
4719
- foreach($attrs as $attr)
4720
- $param['attributes'] = $param['attributes'].' add_'.$attr;
4721
- }
4722
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
4723
-
4724
-
4725
- $rep ='<div type="type_slider" class="wdform-field"><div class="wdform-label-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].' width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
4726
-
4727
-
4728
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].'"><input type="hidden" value="'.$element_value.'" id="wdform_'.$id1.'_slider_value'.$form_id.'" name="wdform_'.$id1.'_slider_value'.$form_id.'"><div name="'.$id1.'_element'.$form_id.'" id="wdform_'.$id1.'_element'.$form_id.'" style="width: '.$param['w_field_width'].'px;" '.$param['attributes'].'"></div><div align="left" style="display: inline-block; width: 33.3%; text-align: left;"><span id="wdform_'.$id1.'_element_min'.$form_id.'" class="label">'.$param['w_field_min_value'].'</span></div><div align="right" style="display: inline-block; width: 33.3%; text-align: center;"><span id="wdform_'.$id1.'_element_value'.$form_id.'" class="label">'.$element_value.'</span></div><div align="right" style="display: inline-block; width: 33.3%; text-align: right;"><span id="wdform_'.$id1.'_element_max'.$form_id.'" class="label">'.$param['w_field_max_value'].'</span></div></div></div>';
4729
-
4730
-
4731
- $onload_js .='
4732
- jQuery("#wdform_'.$id1.'_element'.$form_id.'")[0].slide = null;
4733
- jQuery("#wdform_'.$id1.'_element'.$form_id.'").slider({
4734
- range: "min",
4735
- value: eval('.$element_value.'),
4736
- min: eval('.$param['w_field_min_value'].'),
4737
- max: eval('.$param['w_field_max_value'].'),
4738
- slide: function( event, ui ) {
4739
-
4740
- jQuery("#wdform_'.$id1.'_element_value'.$form_id.'").html("" + ui.value)
4741
- jQuery("#wdform_'.$id1.'_slider_value'.$form_id.'").val("" + ui.value)
4742
-
4743
- }
4744
- });
4745
- ';
4746
-
4747
- break;
4748
- }
4749
-
4750
-
4751
- case 'type_range': {
4752
-
4753
- if($element_value=='')
4754
- $element_value = '-';
4755
-
4756
- $params_names=array('w_field_label_size','w_field_label_pos','w_field_range_width','w_field_range_step','w_field_value1', 'w_field_value2', 'w_mini_labels', 'w_required','w_class');
4757
- $temp=$params;
4758
- foreach($params_names as $params_name ) {
4759
- $temp=explode('*:*'.$params_name.'*:*',$temp);
4760
- $param[$params_name] = $temp[0];
4761
- $temp=$temp[1];
4762
- }
4763
-
4764
- if($temp) {
4765
- $temp =explode('*:*w_attr_name*:*',$temp);
4766
- $attrs = array_slice($temp,0, count($temp)-1);
4767
- foreach($attrs as $attr)
4768
- $param['attributes'] = $param['attributes'].' add_'.$attr;
4769
- }
4770
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
4771
-
4772
- $element_value = explode('-',$element_value);
4773
-
4774
- $w_mini_labels = explode('***',$param['w_mini_labels']);
4775
-
4776
- $rep ='<div type="type_range" class="wdform-field"><div class="wdform-label-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].' width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
4777
-
4778
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].'"><div style="display: table;"><div style="display: table-row;"><div valign="middle" align="left" style="display: table-cell;"><input type="text" value="'.($element_value[0]!= 'null' ? $element_value[0] : '').'" name="wdform_'.$id1.'_element'.$form_id.'0" id="wdform_'.$id1.'_element'.$form_id.'0" style="width: '.$param['w_field_range_width'].'px;" '.$param['attributes'].'></div><div valign="middle" align="left" style="display: table-cell; padding-left: 4px;"><input type="text" value="'.($element_value[1]!= 'null' ? $element_value[1] : '').'" name="wdform_'.$id1.'_element'.$form_id.'1" id="wdform_'.$id1.'_element'.$form_id.'1" style="width: '.$param['w_field_range_width'].'px;" '.$param['attributes'].'></div></div><div style="display: table-row;"><div valign="top" align="left" style="display: table-cell;"><label class="mini_label" id="wdform_'.$id1.'_mini_label_from">'.$w_mini_labels[0].'</label></div><div valign="top" align="left" style="display: table-cell;"><label class="mini_label" id="wdform_'.$id1.'_mini_label_to">'.$w_mini_labels[1].'</label></div></div></div></div></div>';
4779
-
4780
- $onload_js .='
4781
- jQuery("#wdform_'.$id1.'_element'.$form_id.'0")[0].spin = null;
4782
- jQuery("#wdform_'.$id1.'_element'.$form_id.'1")[0].spin = null;
4783
-
4784
- spinner0 = jQuery("#wdform_'.$id1.'_element'.$form_id.'0").spinner();
4785
- spinner0.spinner( "value", "'.($element_value[0]!= 'null' ? $element_value[0] : '').'");
4786
- jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner({ step: '.$param['w_field_range_step'].'});
4787
-
4788
- spinner1 = jQuery("#wdform_'.$id1.'_element'.$form_id.'1").spinner();
4789
- spinner1.spinner( "value", "'.($element_value[1]!= 'null' ? $element_value[1] : '').'");
4790
- jQuery("#wdform_'.$id1.'_element'.$form_id.'").spinner({ step: '.$param['w_field_range_step'].'});
4791
- ';
4792
-
4793
- break;
4794
- }
4795
-
4796
- case 'type_grading': {
4797
- $params_names=array('w_field_label_size','w_field_label_pos', 'w_items', 'w_total', 'w_required','w_class');
4798
- $temp=$params;
4799
- foreach($params_names as $params_name ) {
4800
- $temp=explode('*:*'.$params_name.'*:*',$temp);
4801
- $param[$params_name] = $temp[0];
4802
- $temp=$temp[1];
4803
- }
4804
-
4805
- if($temp) {
4806
- $temp =explode('*:*w_attr_name*:*',$temp);
4807
- $attrs = array_slice($temp,0, count($temp)-1);
4808
- foreach($attrs as $attr)
4809
- $param['attributes'] = $param['attributes'].' add_'.$attr;
4810
- }
4811
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
4812
-
4813
-
4814
- $element_value = explode(':', $element_value);
4815
-
4816
- $w_items = explode('***',$param['w_items']);
4817
-
4818
- $w_items_labels =implode(':',$w_items);
4819
-
4820
- $grading_items ='';
4821
-
4822
-
4823
- for($i=0; $i<(count($element_value))/2-1; $i++) {
4824
- $value=$element_value[$i];
4825
-
4826
- $grading_items .= '<div class="wdform_grading"><input type="text" id="wdform_'.$id1.'_element'.$form_id.'_'.$i.'" name="wdform_'.$id1.'_element'.$form_id.'_'.$i.'" value="'.$value.'" '.$param['attributes'].'><label class="wdform-ch-rad-label" for="wdform_'.$id1.'_element'.$form_id.'_'.$i.'">'.$w_items[$i].'</label></div>';
4827
-
4828
- }
4829
-
4830
- $rep ='<div type="type_grading" class="wdform-field"><div class="wdform-label-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].' width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
4831
-
4832
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].'"><input type="hidden" value="'.$param['w_total'].'" name="wdform_'.$id1.'_grading_total'.$form_id.'" id="wdform_'.$id1.'_grading_total'.$form_id.'"><div id="wdform_'.$id1.'_element'.$form_id.'">'.$grading_items.'<div id="wdform_'.$id1.'_element_total_div'.$form_id.'" class="grading_div">Total: <span id="wdform_'.$id1.'_sum_element'.$form_id.'">0</span>/<span id="wdform_'.$id1.'_total_element'.$form_id.'">'.$param['w_total'].'</span><span id="wdform_'.$id1.'_text_element'.$form_id.'"></span></div></div></div></div>';
4833
-
4834
- $onload_js.='
4835
- jQuery("#wdform_'.$id1.'_element'.$form_id.' input").change(function() {sum_grading_values("wdform_'.$id1.'","'.$form_id.'");});';
4836
-
4837
- $onload_js.='
4838
- jQuery("#wdform_'.$id1.'_element'.$form_id.' input").keyup(function() {sum_grading_values("wdform_'.$id1.'","'.$form_id.'");});';
4839
-
4840
-
4841
- $onload_js.='
4842
- sum_grading_values("wdform_'.$id1.'","'.$form_id.'");';
4843
-
4844
- $onsubmit_js.='
4845
- jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_hidden_item'.$form_id.'\" value = \"'.$w_items_labels.':'.$param['w_total'].'\" />").appendTo("#form'.$form_id.'");
4846
- ';
4847
-
4848
- break;
4849
- }
4850
- case 'type_matrix': {
4851
-
4852
- $params_names=array('w_field_label_size','w_field_label_pos', 'w_field_input_type', 'w_rows', 'w_columns', 'w_required','w_class');
4853
- $temp=$params;
4854
- foreach($params_names as $params_name ) {
4855
- $temp=explode('*:*'.$params_name.'*:*',$temp);
4856
- $param[$params_name] = $temp[0];
4857
- $temp=$temp[1];
4858
- }
4859
-
4860
- if($temp) {
4861
- $temp =explode('*:*w_attr_name*:*',$temp);
4862
- $attrs = array_slice($temp,0, count($temp)-1);
4863
- foreach($attrs as $attr)
4864
- $param['attributes'] = $param['attributes'].' add_'.$attr;
4865
- }
4866
-
4867
- $param['w_field_label_pos'] = ($param['w_field_label_pos']=="left" ? "float: left;" : "display:block;");
4868
- $w_rows = explode('***',$param['w_rows']);
4869
- $w_columns = explode('***',$param['w_columns']);
4870
- $element_value = str_replace("******matrix***","",$element_value);
4871
- $element_value = explode($param['w_field_input_type'].'***', $element_value);
4872
- $element_value = explode('***', $element_value[1]);
4873
- $column_labels ='';
4874
-
4875
- for($i=1; $i<count($w_columns); $i++) {
4876
- $column_labels .= '<div><label class="wdform-ch-rad-label">'.$w_columns[$i].'</label></div>';
4877
- }
4878
-
4879
- $rows_columns = '';
4880
- $for_matrix =0;
4881
- for($i=1; $i<count($w_rows); $i++) {
4882
-
4883
- $rows_columns .= '<div class="wdform-matrix-row'.($i%2).'"><div class="wdform-matrix-column"><label class="wdform-ch-rad-label" >'.$w_rows[$i].'</label></div>';
4884
-
4885
-
4886
- for($k=1; $k<count($w_columns); $k++) {
4887
- $rows_columns .= '<div class="wdform-matrix-cell">';
4888
- if($param['w_field_input_type']=='radio') {
4889
- if (array_key_exists($i-1,$element_value))
4890
- $to_check=$element_value[$i-1];
4891
- else
4892
- $to_check= '' ;
4893
-
4894
- $rows_columns .= '<div class="radio-div"><input id="wdform_'.$id1.'_input_element'.$form_id.''.$i.'_'.$k.'" type="radio" name="wdform_'.$id1.'_input_element'.$form_id.''.$i.'" value="'.$i.'_'.$k.'" '.($to_check==$i.'_'.$k ? 'checked="checked"' : '').'><label for="wdform_'.$id1.'_input_element'.$form_id.''.$i.'_'.$k.'"></label></div>';
4895
-
4896
- }
4897
- else
4898
- if($param['w_field_input_type']=='checkbox') {
4899
-
4900
- if (array_key_exists($for_matrix,$element_value))
4901
- $to_check=$element_value[$for_matrix];
4902
- else
4903
- $to_check= '' ;
4904
-
4905
- $rows_columns .= '<div class="checkbox-div"><input id="wdform_'.$id1.'_input_element'.$form_id.''.$i.'_'.$k.'" type="checkbox" name="wdform_'.$id1.'_input_element'.$form_id.''.$i.'_'.$k.'" value="1" '.($to_check=="1" ? 'checked="checked"' : '').'><label for="wdform_'.$id1.'_input_element'.$form_id.''.$i.'_'.$k.'"></label></div>';
4906
-
4907
- $for_matrix++;
4908
- }
4909
- else
4910
- if($param['w_field_input_type']=='text') {
4911
- $rows_columns .= '<input id="wdform_'.$id1.'_input_element'.$form_id.''.$i.'_'.$k.'" type="text" name="wdform_'.$id1.'_input_element'.$form_id.''.$i.'_'.$k.'" value="'.(array_key_exists($for_matrix,$element_value) ? $element_value[$for_matrix] : '').'">';
4912
-
4913
- $for_matrix++;
4914
- }
4915
- else
4916
- if($param['w_field_input_type']=='select') {
4917
- $rows_columns .= '<select id="wdform_'.$id1.'_select_yes_no'.$form_id.''.$i.'_'.$k.'" name="wdform_'.$id1.'_select_yes_no'.$form_id.''.$i.'_'.$k.'" ><option value="" '.(array_key_exists($for_matrix,$element_value) ? ($element_value[$for_matrix]=="" ? "selected=\"selected\"": "") : '').'> </option><option value="yes" '.(array_key_exists($for_matrix,$element_value) ? ($element_value[$for_matrix]=="yes" ? "selected=\"selected\"": "") : '').'>Yes</option><option value="no" '.(array_key_exists($for_matrix,$element_value) ? ($element_value[$for_matrix]=="no" ? "selected=\"selected\"": "") : '').'>No</option></select>';
4918
-
4919
- $for_matrix++;
4920
- }
4921
- $rows_columns.='</div>';
4922
- }
4923
-
4924
- $rows_columns .= '</div>';
4925
- }
4926
-
4927
- $rep ='<div type="type_matrix" class="wdform-field"><div class="wdform-label-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].' width: '.$param['w_field_label_size'].'px;"><span class="wdform-label">'.$label.'</span>';
4928
-
4929
- $rep.='</div><div class="wdform-element-section '.$param['w_class'].'" style="'.$param['w_field_label_pos'].'"><div id="wdform_'.$id1.'_element'.$form_id.'" class="wdform-matrix-table" '.$param['attributes'].'><div style="display: table-row-group;"><div class="wdform-matrix-head"><div style="display: table-cell;"></div>'.$column_labels.'</div>'.$rows_columns.'</div></div></div></div>';
4930
-
4931
- $onsubmit_js.='
4932
- jQuery("<input type=\"hidden\" name=\"wdform_'.$id1.'_input_type'.$form_id.'\" value = \"'.$param['w_field_input_type'].'\" /><input type=\"hidden\" name=\"wdform_'.$id1.'_hidden_row'.$form_id.'\" value = \"'.$param['w_rows'].'\" /><input type=\"hidden\" name=\"wdform_'.$id1.'_hidden_column'.$form_id.'\" value = \"'.$param['w_columns'].'\" />").appendTo("#form'.$form_id.'");
4933
- ';
4934
-
4935
- break;
4936
- }
4937
- }
4938
- $form = str_replace('%'.$id1.' - '.$labels[$id1s_key].'%', $rep, $form);
4939
- }
4940
- }
4941
- echo $form;
4942
- ?>
4943
-
4944
- </div>
4945
- <input type="hidden" name="option" value="com_formmaker"/>
4946
- <input type="hidden" id="current_id" name="current_id" value="<?php echo $rows[0]->group_id; ?>" />
4947
- <input type="hidden" name="form_id" value="<?php echo $rows[0]->form_id; ?>" />
4948
- <input type="hidden" name="date" value="<?php echo $rows[0]->date; ?>" />
4949
- <input type="hidden" name="ip" value="<?php echo $rows[0]->ip; ?>" />
4950
- <input type="hidden" id="task" name="task" value="" />
4951
- <input type="hidden" value="<?php echo WD_FM_URL; ?>" id="form_plugins_url" />
4952
- <script type="text/javascript">
4953
- function pressbutton() {
4954
- <?php echo $onsubmit_js; ?>;
4955
- }
4956
- jQuery("div[type='type_number'] input, div[type='type_phone'] input, div[type='type_spinner'] input, div[type='type_range'] input, .wdform-quantity").keypress(function(evt) {
4957
- return check_isnum(evt);
4958
- });
4959
- jQuery("div[type='type_grading'] input").keypress(function() {
4960
- return check_isnum_or_minus(event);
4961
- });
4962
- plugin_url = '<?php echo WD_FM_URL; ?>';
4963
- <?php
4964
- if ($onload_js) {
4965
- ?>
4966
- jQuery(window).load(function () {
4967
- <?php echo $onload_js; ?>;
4968
- });
4969
- <?php
4970
- }
4971
- ?>
4972
- </script>
4973
- </form>
4974
- <?php
4975
- }
4976
  }
4977
 
4978
  ?>
1
  <?php
2
 
3
  class FMViewSubmissions_fm {
4
+
 
 
 
 
 
 
 
 
5
  private $model;
6
 
 
 
 
7
  public function __construct($model) {
8
+ $this->model = $model;
9
  }
10
 
 
 
 
11
  public function display($form_id) {
 
 
12
  global $wpdb;
13
  $forms = $this->model->get_form_titles();
14
  $statistics = $this->model->get_statistics($form_id);
23
  $group_ids = ((isset($labels_parameters[6])) ? $labels_parameters[6] : NULL);
24
  $where_choices = $labels_parameters[7];
25
  $searched_ids = $labels_parameters[8] ? implode(',', $labels_parameters[8]) : '';
 
26
  $order_by = (isset($_POST['order_by']) ? esc_html(stripslashes($_POST['order_by'])) : 'group_id');
27
  $asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'asc') ? 'asc' : 'desc');
28
  $style_id = $this->model->hide_or_not($lists['hide_label_list'], '@submitid@');
40
  $n = count($rows);
41
  $group_id_s = array();
42
  $group_id_s = $this->model->sort_group_ids(count($sorted_label_names),$group_ids);
 
43
  $ka_fielderov_search = (($lists['ip_search'] || $lists['startdate'] || $lists['enddate'] || $lists['username_search'] || $lists['useremail_search'] || $lists['id_search']) ? TRUE : FALSE);
44
  $is_stats = false;
45
  $blocked_ips = $this->model->blocked_ips();
60
  $verified_emails = array();
61
  ?>
62
  <script type="text/javascript">
63
+
64
  function export_submissions(type, limit) {
65
  var progressbar = jQuery( "#fm-progressbar" );
66
  var progressLabel = jQuery( ".fm-progress-label" );
188
  document.getElementById('<?php echo $form_id . '_' . $sorted_labels_id[$i] . '_search'; ?>').value='';
189
  <?php
190
  }
 
191
  if ($sorted_label_types[$i] == "type_submitter_mail") { ?>
192
  if(document.getElementById('<?php echo $form_id . '_' . $sorted_labels_id[$i] . '_search_verified'; ?>')) {
193
  document.getElementById('<?php echo $form_id . '_' . $sorted_labels_id[$i] . '_search_verified'; ?>').checked = false;
243
  }
244
  $ispaypal = FALSE;
245
  for ($i = 0; $i < count($sorted_label_names); $i++) {
246
+ if ($sorted_label_types[$i] == 'type_paypal_payment_status' || $sorted_label_types[$i] == 'type_stripe') {
247
  $ispaypal = TRUE;
248
  }
249
  }
261
  </div>
262
  </form>
263
  </div>
 
264
  <form action="admin.php?page=submissions_fm" method="post" id="admin_form" name="admin_form">
265
  <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
 
266
  <input type="hidden" id="task" name="task" value="" />
267
  <input type="hidden" id="current_id" name="current_id" value="" />
268
  <input type="hidden" name="asc_or_desc" id="asc_or_desc" value="<?php echo $asc_or_desc; ?>" />
269
  <input type="hidden" name="order_by" id="order_by" value="<?php echo $order_by; ?>" />
270
+
271
  <div class="fm-submissions-page wrap">
272
  <div class="submissions-actions">
273
  <div class="fm-form-title">
274
  <?php echo $chosen_form_title; ?>
275
  </div>
276
  <div class="fm-page-actions">
277
+ <button class="fm-button block-button medium" onclick="fm_set_input_value('task', 'block_ip'); fm_form_submit(event, 'admin_form');">
278
  <span></span>
279
  Block IP
280
  </button>
282
  <span></span>
283
  Unblock IP
284
  </button>
285
+ <button class="fm-button delete-button medium" onclick="if (confirm('Do you want to delete selected items?')) { fm_set_input_value('task', 'delete_all'); fm_form_submit(event, 'admin_form'); } else { return false; }">
286
  <span></span>
287
  Delete
288
  </button>
325
  <button class="fm-button show-filter-button medium" onclick="show_hide_filter(); return false;" title="Show Filters">
326
  <span></span>
327
  Show Filters
 
328
  </button>
329
+ <button class="fm-button search-button medium" onclick="fm_form_submit(event, 'admin_form'); return false;" title="Search">
330
  <span></span>
331
  Search
332
  </button>
333
+ <button class="fm-button reset-button medium" 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;" title="Reset">
334
  <span></span>
335
  Reset
336
  </button>
340
  <button class="fm-button" onclick="toggleChBDiv(true); return false;">
341
  Add/Remove Columns
342
  </button>
343
+ <?php
344
+ WDW_FM_Library::html_page_nav($lists['total'], $lists['limit'], 'admin_form'); ?>
345
  <?php } ?>
346
  <input type="hidden" name="pagination_clicked" id="pagination_clicked" value=""/>
347
  </div>
348
  </div>
349
  <div class="fm-clear"></div>
350
  </div>
351
+
352
  <div class="fm-loading-container" style="display:none;">
353
  <div class="fm-loading-content">
354
  </div>
406
  </a>
407
  </th>
408
  <?php
409
+ $ispaypal = FALSE;
410
  for ($i = 0; $i < count($sorted_label_names); $i++) {
411
  $styleStr = $this->model->hide_or_not($lists['hide_label_list'], $sorted_labels_id[$i]);
412
  $styleStr2 = $this->model->hide_or_not($lists['hide_label_list'] , '@payment_info@');
413
  $field_title = $this->model->get_type_address($sorted_label_types[$i], $sorted_label_names_original[$i]);
414
+ if ($sorted_label_types[$i] == 'type_paypal_payment_status' || $sorted_label_types[$i] == 'type_stripe') {
415
+ if($sorted_label_types[$i] != 'type_stripe'){
416
+ ?>
417
+ <th <?php echo $styleStr; ?> id="<?php echo $sorted_labels_id[$i] . '_fc'; ?>" class="table_large_col <?php echo $sorted_labels_id[$i] . '_fc'; if ($order_by == $sorted_labels_id[$i] . "_field") echo $oder_class . '"';else echo $oder_class_default . '"'; ?>">
418
+ <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')">
419
+ <span><?php echo $field_title; ?></span>
420
+ <span class="sorting-indicator"></span>
421
+ </a>
422
+ </th>
423
+ <?php
424
+ }
425
+ if ($ispaypal) {
426
+ ?>
427
+ <th class="table_large_col payment_info_fc" <?php echo $styleStr2; ?>>Payment Info</th>
428
+ <?php
429
+ }
430
  $ispaypal = TRUE;
 
 
 
 
 
 
 
 
 
431
  }
432
  else {
433
  ?>
443
  ?>
444
  </tr>
445
  <tr id="fields_filter" style="display: none;">
446
+ <?php if (defined('WD_FM_PDF') && is_plugin_active(constant('WD_FM_PDF'))): ?>
447
  <th></th>
448
+ <?php endif; ?>
449
+
450
  <th></th>
451
+ <th></th>
452
  <th class="submitid_fc" <?php echo $style_id; ?> >
453
  <input type="text" name="id_search" id="id_search" value="<?php echo $lists['id_search'] ?>" onChange="this.form.submit();" style="width:30px"/>
454
  </th>
455
+ <th></th>
456
  <th></th>
457
  <th></th>
458
  <th width="150" class="submitdate_fc" <?php echo $style_date; ?>>
488
  </th>
489
  <?php
490
  for ($i = 0; $i < count($sorted_label_names); $i++) {
491
+ if($sorted_label_types[$i] == 'type_stripe')
492
+ continue;
493
  $styleStr = $this->model->hide_or_not($lists['hide_label_list'], $sorted_labels_id[$i]);
494
  if (!$ka_fielderov_search) {
495
  if ($lists[$form_id . '_' . $sorted_labels_id[$i] . '_search'] || isset($lists[$form_id . '_' . $sorted_labels_id[$i] . '_search_verified'])) {
583
  <td class="table_small_col count_col sub-align"><?php echo $www + 1; ?></td>
584
  <td class="check-column table_small_col sub-align" style="padding: 0;">
585
  <input type="checkbox" name="post[]" value="<?php echo $data->group_id; ?>">
586
+ </td>
587
  <td class="table_small_col sub-align submitid_fc" id="submitid_fc" <?php echo $style_id; ?>>
588
  <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');" >
589
  <?php echo $data->group_id; ?>
590
  </a>
591
+ </td>
592
  <td class="table_small_col submitdate_fc sub-align" id="view_submissions">
593
  <a href="<?php echo add_query_arg(array('action' => 'FormMakerSubmits', 'form_id' => $data->form_id, 'group_id' => $data->group_id, 'width' => '1000', 'height' => '500', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>"
594
  class="thickbox thickbox-preview"
595
  title="<?php echo __("Show submission","form_maker"); ?>"
596
+ onclick="return false;"><img src="<?php echo WD_FM_URL . '/images/view-icon.png'; ?>" />
597
  </a>
598
+ </td>
599
  <td class="table_small_col sub-align">
600
  <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');">Edit
601
  </a>
609
  </a>
610
  </td>
611
  <td class="table_medium_col_uncenter submitterip_fc sub-align" id="submitterip_fc" <?php echo $style_ip; ?>>
612
+ <a class="thickbox-preview" href="<?php echo add_query_arg(array('action' => 'fromipinfoinpopup', 'data_ip' => $data->ip, 'width' => '450', 'height' => '300', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" title="Show submitter information" <?php echo (!in_array($data->ip, $blocked_ips)) ? '' : 'style="color: #FF0000;"'; ?>><?php echo $data->ip; ?></a>
613
  </td>
614
  <td class="table_large_col submitterusername_fc sub-align" id="submitterusername_fc" <?php echo $style_username; ?>>
615
  <?php echo $username; ?>
619
  </td>
620
  <?php
621
  for ($h = 0; $h < $m; $h++) {
622
+ if($sorted_label_types[$h] == 'type_stripe')
623
+ continue;
624
  $not_label = TRUE;
625
  for ($g = 0; $g < count($temp); $g++) {
626
  $styleStr = $this->model->hide_or_not($lists['hide_label_list'], $sorted_labels_id[$h]);
658
  <td align="center" class="<?php echo $sorted_labels_id[$h];?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>><?php echo $stars; ?></td>
659
  <?php
660
  }
 
661
  elseif (strpos($temp[$g]->element_value, "***matrix***")) {
662
+ ?>
663
+ <td class="table_large_col <?php echo $sorted_labels_id[$h];?>_fc sub-align" id="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>>
664
+ <a class="thickbox-preview" href="<?php echo add_query_arg(array('action' => 'show_matrix', 'matrix_params' => str_replace('#', '%23', urlencode($temp[$g]->element_value)), 'width' => '620', 'height' => '550', 'TB_iframe' => '1'), admin_url('admin-ajax.php')); ?>" title="Show Matrix">Show Matrix</a>
665
+ </td>
666
+ <?php
667
  }
 
668
  elseif (strpos($temp[$g]->element_value, "@@@") !== FALSE || $temp[$g]->element_value == "@@@" || $temp[$g]->element_value == "@@@@@@@@@") {
669
  ?>
670
  <td class="<?php echo $sorted_labels_id[$h]; ?>_fc" <?php echo $styleStr; ?>>
693
  $query = $wpdb->prepare('SELECT id FROM ' . $wpdb->prefix . 'formmaker_submits WHERE form_id ="%d" AND group_id="%d" AND element_value="verified**%d"', $form_id, $i, $sorted_labels_id[$h]);
694
  $isverified = $wpdb->get_var($query);
695
 
696
+ if($isverified) {
697
  if(!isset($verified_emails[$sorted_labels_id[$h]]))
698
  $verified_emails[$sorted_labels_id[$h]] = array();
699
 
1212
  </form>
1213
  <?php
1214
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1215
  }
1216
 
1217
  ?>
admin/views/FMViewThemes_fm.php CHANGED
@@ -27,12 +27,11 @@ class FMViewThemes_fm {
27
  $search_value = ((isset($_POST['search_value'])) ? esc_html($_POST['search_value']) : '');
28
  $search_select_value = ((isset($_POST['search_select_value'])) ? (int)$_POST['search_select_value'] : 0);
29
  $asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'desc') ? 'desc' : 'asc');
30
- $order_by_array = array('id', 'title', 'default');
31
  $order_by = isset($_POST['order_by']) && in_array(esc_html(stripslashes($_POST['order_by'])), $order_by_array) ? esc_html(stripslashes($_POST['order_by'])) : 'id';
32
  $order_class = 'manage-column column-title sorted ' . $asc_or_desc;
33
  $ids_string = '';
34
  ?>
35
- <div class="fm-clear"></div>
36
  <form class="wrap" id="themes_form" method="post" action="admin.php?page=themes_fm">
37
  <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
38
  <div class="fm-page-banner themes-banner">
@@ -44,7 +43,11 @@ class FMViewThemes_fm {
44
  Add New
45
  </button>
46
  <div class="fm-page-actions">
47
- <button class="fm-button delete-button small" onclick="if (confirm('Do you want to delete selected item(s)?')) { fm_set_input_value('task', 'delete_all'); } else { return false; }">
 
 
 
 
48
  <span></span>
49
  Delete
50
  </button>
@@ -129,65 +132,3809 @@ class FMViewThemes_fm {
129
 
130
  public function edit($id, $reset) {
131
  $row = $this->model->get_row_data($id, $reset);
132
- $page_title = (($id != 0) ? 'Edit theme ' . $row->title : 'Create new theme');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  ?>
134
- <style>
135
- .CodeMirror {
136
- border: 1px solid #ccc;
137
- font-size: 12px;
138
- margin-bottom: 6px;
139
- background: white;
140
- }
141
- </style>
142
- <div class="fm-clear"></div>
143
- <form class="wrap" method="post" action="admin.php?page=themes_fm">
144
- <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
145
- <div class="fm-page-header">
146
- <div class="fm-page-title">
147
- <?php echo $page_title; ?>
148
- </div>
149
- <div class="fm-page-actions">
150
- <button class="fm-button save-button small" onclick="if (fm_check_required('title', 'Title')) {return false;}; fm_set_input_value('task', 'save');">
151
- <span></span>
152
- Save
153
- </button>
154
- <button class="fm-button apply-button small" onclick="if (fm_check_required('title', 'Title')) {return false;}; fm_set_input_value('task', 'apply');">
155
- <span></span>
156
- Apply
157
- </button>
158
- <button class="fm-button cancel-button small" onclick="fm_set_input_value('task', 'cancel');">
159
- <span></span>
160
- Cancel
161
- </button>
162
- </div>
163
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
164
 
165
- <table style="clear:both;">
166
- <tbody>
167
- <tr>
168
- <td class="fm_label"><label for="title">Title: <span style="color:#FF0000;"> * </span> </label></td>
169
- <td><input type="text" id="title" name="title" value="<?php echo $row->title; ?>" class="fm_text_input" /></td>
170
- </tr>
171
- <tr>
172
- <td class="fm_label"><label for="css">Css: </label></td>
173
- <td style="width: 90%;"><textarea id="css" name="css" rows="30" style="width: 100%;"><?php echo htmlspecialchars($row->css) ?></textarea></td>
174
- </tr>
175
- </tbody>
176
- </table>
177
- <input type="hidden" id="task" name="task" value=""/>
178
- <input type="hidden" id="current_id" name="current_id" value="<?php echo $row->id; ?>"/>
179
- <input type="hidden" id="default" name="default" value="<?php echo $row->default; ?>"/>
180
- </form>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  <script>
182
- var editor = CodeMirror.fromTextArea(document.getElementById("css"), {
183
- lineNumbers: true,
184
- lineWrapping: true,
185
- mode: "css"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
186
  });
187
-
188
- CodeMirror.commands["selectAll"](editor);
189
- editor.autoFormatRange(editor.getCursor(true), editor.getCursor(false));
190
- editor.scrollTo(0,0);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
  </script>
192
  <?php
193
  }
27
  $search_value = ((isset($_POST['search_value'])) ? esc_html($_POST['search_value']) : '');
28
  $search_select_value = ((isset($_POST['search_select_value'])) ? (int)$_POST['search_select_value'] : 0);
29
  $asc_or_desc = ((isset($_POST['asc_or_desc']) && $_POST['asc_or_desc'] == 'desc') ? 'desc' : 'asc');
30
+ $order_by_array = array('id', 'title', 'default');
31
  $order_by = isset($_POST['order_by']) && in_array(esc_html(stripslashes($_POST['order_by'])), $order_by_array) ? esc_html(stripslashes($_POST['order_by'])) : 'id';
32
  $order_class = 'manage-column column-title sorted ' . $asc_or_desc;
33
  $ids_string = '';
34
  ?>
 
35
  <form class="wrap" id="themes_form" method="post" action="admin.php?page=themes_fm">
36
  <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
37
  <div class="fm-page-banner themes-banner">
43
  Add New
44
  </button>
45
  <div class="fm-page-actions">
46
+ <button class="fm-button save-as-copy-button medium" onclick="fm_set_input_value('task', 'copy_themes');">
47
+ <span></span>
48
+ Copy
49
+ </button>
50
+ <button class="fm-button delete-button medium" onclick="if (confirm('Do you want to delete selected item(s)?')) { fm_set_input_value('task', 'delete_all'); } else { return false; }">
51
  <span></span>
52
  Delete
53
  </button>
132
 
133
  public function edit($id, $reset) {
134
  $row = $this->model->get_row_data($id, $reset);
135
+ $page_title = 'Theme: ' . $row->title;
136
+ $param_values = $row->params;
137
+ $border_types = array( 'solid' => 'Solid', 'dotted' => 'Dotted', 'dashed' => 'Dashed', 'double' => 'Double', 'groove' => 'Groove', 'ridge' => 'Ridge', 'inset' => 'Inset', 'outset' => 'Outset', 'initial' => 'Initial', 'inherit' => 'Inherit', 'hidden' => 'Hidden', 'none' => 'None' );
138
+ $borders = array('top' => 'Top', 'right' => 'Right', 'bottom' => 'Bottom', 'left' => 'Left' );
139
+ $border_values = array('top' => 'BorderTop', 'right' => 'BorderRight', 'bottom' => 'BorderBottom', 'left' => 'BorderLeft' );
140
+ $position_types = array('static' => 'Static', 'relative' => 'Relative', 'fixed' => 'Fixed', 'absolute' => 'Absolute' );
141
+
142
+ $font_weights = array( 'normal' => 'Normal', 'bold' => 'Bold', 'bolder' => 'Bolder', 'lighter' => 'Lighter', 'initial' => 'Initial' );
143
+ $aligns = array( 'left' => 'Left', 'center' => 'Center', 'right' => 'Right' );
144
+ $aligns_no_center = array( 'left' => 'Left', 'right' => 'Right' );
145
+
146
+ $basic_fonts = array( 'arial' => 'Arial', 'lucida grande' => 'Lucida grande', 'segoe ui' => 'Segoe ui', 'tahoma' => 'Tahoma', 'trebuchet ms' => 'Trebuchet ms', 'verdana' => 'Verdana', 'cursive' =>'Cursive', 'fantasy' => 'Fantasy','monospace' => 'Monospace', 'serif' => 'Serif' );
147
+
148
+ $bg_repeats = array( 'repeat' => 'repeat', 'repeat-x' => 'repeat-x', 'repeat-y' => 'repeat-y', 'no-repeat' => 'no-repeat', 'initial' => 'initial', 'inherit' => 'inherit');
149
+
150
+ $google_fonts = WDW_FM_Library::get_google_fonts();
151
+ $font_families = $basic_fonts + $google_fonts;
152
+ $fonts = implode("|", str_replace(' ', '+', $google_fonts));
153
+ wp_enqueue_style('fm_googlefonts', 'https://fonts.googleapis.com/css?family=' . $fonts . '&subset=greek,latin,greek-ext,vietnamese,cyrillic-ext,latin-ext,cyrillic', null, null);
154
+
155
+ $tabs = array(
156
+ 'global' => 'Global Parameters',
157
+ 'header' => 'Header',
158
+ 'content' => 'Content',
159
+ 'input_select' => 'Inputbox',
160
+ 'choices' => 'Choices',
161
+ 'subscribe' => 'General Buttons',
162
+ 'paigination' => 'Pagination',
163
+ 'buttons' => 'Buttons',
164
+ 'close_button' => 'Close(Minimize) Button',
165
+ 'minimize' => 'Minimize Text',
166
+ 'other' => 'Other',
167
+ 'custom_css' => 'Custom CSS'
168
+ );
169
+
170
+ $all_params = array(
171
+ 'global' => array(
172
+ array (
173
+ 'label' => '',
174
+ 'type' => 'panel',
175
+ 'class' => 'col-md-12',
176
+ 'label_class' => '',
177
+ 'after' => ''
178
+ ),
179
+ array (
180
+ 'label' => 'Font Family',
181
+ 'name' => 'GPFontFamily',
182
+ 'type' => 'select',
183
+ 'options' => $font_families,
184
+ 'class' => '',
185
+ 'value' => isset($param_values['GPFontFamily']) ? $param_values['GPFontFamily'] : '',
186
+ 'after' => ''
187
+ ),
188
+ array (
189
+ 'label' => 'Width',
190
+ 'name' => 'AGPWidth',
191
+ 'type' => 'text',
192
+ 'class' => '',
193
+ 'value' => isset($param_values['AGPWidth']) ? $param_values['AGPWidth'] : '',
194
+ 'after' => '%'
195
+ ),
196
+ array (
197
+ 'label' => 'Width (for scrollbox, popup form types)',
198
+ 'name' => 'AGPSPWidth',
199
+ 'type' => 'text',
200
+ 'class' => '',
201
+ 'value' => isset($param_values['AGPSPWidth']) ? $param_values['AGPSPWidth'] : '',
202
+ 'after' => '%'
203
+ ),
204
+ array (
205
+ 'label' => 'Padding',
206
+ 'name' => 'AGPPadding',
207
+ 'type' => 'text',
208
+ 'class' => '',
209
+ 'value' => isset($param_values['AGPPadding']) ? $param_values['AGPPadding'] : '',
210
+ 'after' => 'px/%'
211
+ ),
212
+ array (
213
+ 'label' => 'Margin',
214
+ 'name' => 'AGPMargin',
215
+ 'type' => 'text',
216
+ 'class' => '',
217
+ 'value' => isset($param_values['AGPMargin']) ? $param_values['AGPMargin'] : '',
218
+ 'placeholder' => 'e.g. 5px 10px or 5% 10%',
219
+ 'after' => 'px/%'
220
+ ),
221
+ array (
222
+ 'label' => 'Border',
223
+ 'name' => 'AGPBorder',
224
+ 'type' => 'checkbox',
225
+ 'options' => $borders,
226
+ 'class' => '',
227
+ 'after' => ''
228
+ ),
229
+ array (
230
+ 'label' => 'Border Color',
231
+ 'name' => 'AGPBorderColor',
232
+ 'type' => 'text',
233
+ 'class' => 'color',
234
+ 'value' => isset($param_values['AGPBorderColor']) ? $param_values['AGPBorderColor'] : '',
235
+ 'after' => ''
236
+ ),
237
+ array (
238
+ 'label' => 'Border Type',
239
+ 'name' => 'AGPBorderType',
240
+ 'type' => 'select',
241
+ 'options' => $border_types,
242
+ 'class' => '',
243
+ 'value' => isset($param_values['AGPBorderType']) ? $param_values['AGPBorderType'] : '',
244
+ 'after' => ''
245
+ ),
246
+ array (
247
+ 'label' => 'Border Width',
248
+ 'name' => 'AGPBorderWidth',
249
+ 'type' => 'text',
250
+ 'class' => '',
251
+ 'value' => isset($param_values['AGPBorderWidth']) ? $param_values['AGPBorderWidth'] : '',
252
+ 'after' => 'px'
253
+ ),
254
+ array (
255
+ 'label' => 'Border Radius',
256
+ 'name' => 'AGPBorderRadius',
257
+ 'type' => 'text',
258
+ 'class' => '',
259
+ 'value' => isset($param_values['AGPBorderRadius']) ? $param_values['AGPBorderRadius'] : '',
260
+ 'after' => 'px'
261
+ ),
262
+ array (
263
+ 'label' => 'Box Shadow',
264
+ 'name' => 'AGPBoxShadow',
265
+ 'type' => 'text',
266
+ 'class' => '',
267
+ 'value' => isset($param_values['AGPBoxShadow']) ? $param_values['AGPBoxShadow'] : '',
268
+ 'placeholder' => 'e.g. 5px 5px 2px #888888',
269
+ 'after' => '</div>'
270
+ )
271
+ ),
272
+ 'header' => array(
273
+ array (
274
+ 'label' => 'General Parameters',
275
+ 'type' => 'panel',
276
+ 'class' => 'col-md-6',
277
+ 'label_class' => 'fm-mini-title',
278
+ 'after' => '<br/>'
279
+ ),
280
+ array (
281
+ 'label' => 'Alignment',
282
+ 'name' => 'HPAlign',
283
+ 'type' => 'select',
284
+ 'options' => $borders,
285
+ 'class' => '',
286
+ 'value' => isset($param_values['HPAlign']) ? $param_values['HPAlign'] : '',
287
+ 'after' => ''
288
+ ),
289
+ array (
290
+ 'label' => 'Background Color',
291
+ 'name' => 'HPBGColor',
292
+ 'type' => 'text',
293
+ 'class' => 'color',
294
+ 'value' => isset($param_values['HPBGColor']) ? $param_values['HPBGColor'] : '',
295
+ 'after' => ''
296
+ ),
297
+ array (
298
+ 'label' => 'Width',
299
+ 'name' => 'HPWidth',
300
+ 'type' => 'text',
301
+ 'class' => '',
302
+ 'value' => isset($param_values['HPWidth']) ? $param_values['HPWidth'] : '',
303
+ 'after' => '%'
304
+ ),
305
+ array (
306
+ 'label' => 'Width (for topbar form type)',
307
+ 'name' => 'HTPWidth',
308
+ 'type' => 'text',
309
+ 'class' => '',
310
+ 'value' => isset($param_values['HTPWidth']) ? $param_values['HTPWidth'] : '',
311
+ 'after' => '%'
312
+ ),
313
+ array (
314
+ 'label' => 'Padding',
315
+ 'name' => 'HPPadding',
316
+ 'type' => 'text',
317
+ 'class' => '',
318
+ 'value' => isset($param_values['HPPadding']) ? $param_values['HPPadding'] : '',
319
+ 'after' => 'px/%'
320
+ ),
321
+ array (
322
+ 'label' => 'Margin',
323
+ 'name' => 'HPMargin',
324
+ 'type' => 'text',
325
+ 'class' => '',
326
+ 'value' => isset($param_values['HPMargin']) ? $param_values['HPMargin'] : '',
327
+ 'placeholder' => 'e.g. 5px 10px or 5% 10%',
328
+ 'after' => 'px/%'
329
+ ),
330
+ array (
331
+ 'label' => 'Text Align',
332
+ 'name' => 'HPTextAlign',
333
+ 'type' => 'select',
334
+ 'options' => $aligns,
335
+ 'class' => '',
336
+ 'value' => isset($param_values['HPTextAlign']) ? $param_values['HPTextAlign'] : '',
337
+ 'after' => ''
338
+ ),
339
+ array (
340
+ 'label' => 'Border',
341
+ 'name' => 'HPBorder',
342
+ 'type' => 'checkbox',
343
+ 'options' => $borders,
344
+ 'class' => '',
345
+ 'after' => ''
346
+ ),
347
+ array (
348
+ 'label' => 'Border Color',
349
+ 'name' => 'HPBorderColor',
350
+ 'type' => 'text',
351
+ 'class' => 'color',
352
+ 'value' => isset($param_values['HPBorderColor']) ? $param_values['HPBorderColor'] : '',
353
+ 'after' => ''
354
+ ),
355
+ array (
356
+ 'label' => 'Border Type',
357
+ 'name' => 'HPBorderType',
358
+ 'type' => 'select',
359
+ 'options' => $border_types,
360
+ 'class' => '',
361
+ 'value' => isset($param_values['HPBorderType']) ? $param_values['HPBorderType'] : '',
362
+ 'after' => ''
363
+ ),
364
+ array (
365
+ 'label' => 'Border Width',
366
+ 'name' => 'HPBorderWidth',
367
+ 'type' => 'text',
368
+ 'class' => '',
369
+ 'value' => isset($param_values['HPBorderWidth']) ? $param_values['HPBorderWidth'] : '',
370
+ 'after' => 'px'
371
+ ),
372
+ array (
373
+ 'label' => 'Border Radius',
374
+ 'name' => 'HPBorderRadius',
375
+ 'type' => 'text',
376
+ 'class' => '',
377
+ 'value' => isset($param_values['HPBorderRadius']) ? $param_values['HPBorderRadius'] : '',
378
+ 'after' => 'px</div>'
379
+ ),
380
+ array (
381
+ 'label' => 'Title Parameters',
382
+ 'type' => 'panel',
383
+ 'class' => 'col-md-6',
384
+ 'label_class' => 'fm-mini-title',
385
+ 'after' => '<br/>'
386
+ ),
387
+ array (
388
+ 'label' => 'Font Size',
389
+ 'name' => 'HTPFontSize',
390
+ 'type' => 'text',
391
+ 'class' => '',
392
+ 'value' => isset($param_values['HTPFontSize']) ? $param_values['HTPFontSize'] : '',
393
+ 'after' => 'px'
394
+ ),
395
+ array (
396
+ 'label' => 'Font Weight',
397
+ 'name' => 'HTPWeight',
398
+ 'type' => 'select',
399
+ 'options' => $font_weights,
400
+ 'class' => '',
401
+ 'value' => isset($param_values['HTPWeight']) ? $param_values['HTPWeight'] : '',
402
+ 'after' => ''
403
+ ),
404
+ array (
405
+ 'label' => 'Color',
406
+ 'name' => 'HTPColor',
407
+ 'type' => 'text',
408
+ 'class' => 'color',
409
+ 'value' => isset($param_values['HTPColor']) ? $param_values['HTPColor'] : '',
410
+ 'after' => ''
411
+ ),
412
+ array (
413
+ 'label' => 'Description Parameters',
414
+ 'type' => 'label',
415
+ 'class' => 'fm-mini-title',
416
+ 'after' => '<br/>'
417
+ ),
418
+ array (
419
+ 'label' => 'Font Size',
420
+ 'name' => 'HDPFontSize',
421
+ 'type' => 'text',
422
+ 'class' => '',
423
+ 'value' => isset($param_values['HDPFontSize']) ? $param_values['HDPFontSize'] : '',
424
+ 'after' => 'px'
425
+ ),
426
+ array (
427
+ 'label' => 'Color',
428
+ 'name' => 'HDPColor',
429
+ 'type' => 'text',
430
+ 'class' => 'color',
431
+ 'value' => isset($param_values['HDPColor']) ? $param_values['HDPColor'] : '',
432
+ 'after' => ''
433
+ ),
434
+ array (
435
+ 'label' => 'Image Parameters',
436
+ 'type' => 'label',
437
+ 'class' => 'fm-mini-title',
438
+ 'after' => '<br/>'
439
+ ),
440
+ array (
441
+ 'label' => 'Alignment',
442
+ 'name' => 'HIPAlign',
443
+ 'type' => 'select',
444
+ 'options' => $borders,
445
+ 'class' => '',
446
+ 'value' => isset($param_values['HIPAlign']) ? $param_values['HIPAlign'] : '',
447
+ 'after' => 'px'
448
+ ),
449
+ array (
450
+ 'label' => 'Width',
451
+ 'name' => 'HIPWidth',
452
+ 'type' => 'text',
453
+ 'class' => '',
454
+ 'value' => isset($param_values['HIPWidth']) ? $param_values['HIPWidth'] : '',
455
+ 'after' => 'px'
456
+ ),
457
+ array (
458
+ 'label' => 'Height',
459
+ 'name' => 'HIPHeight',
460
+ 'type' => 'text',
461
+ 'class' => '',
462
+ 'value' => isset($param_values['HIPHeight']) ? $param_values['HIPHeight'] : '',
463
+ 'after' => 'px</div>'
464
+ )
465
+ ),
466
+ 'content' => array(
467
+ array (
468
+ 'label' => 'General Parameters',
469
+ 'type' => 'panel',
470
+ 'class' => 'col-md-6',
471
+ 'label_class' => 'fm-mini-title',
472
+ 'after' => '<br/>'
473
+ ),
474
+ array (
475
+ 'label' => 'Background Color',
476
+ 'name' => 'GPBGColor',
477
+ 'type' => 'text',
478
+ 'class' => 'color',
479
+ 'value' => isset($param_values['GPBGColor']) ? $param_values['GPBGColor'] : '',
480
+ 'after' => ''
481
+ ),
482
+ array (
483
+ 'label' => 'Font Size',
484
+ 'name' => 'GPFontSize',
485
+ 'type' => 'text',
486
+ 'class' => '',
487
+ 'value' => isset($param_values['GPFontSize']) ? $param_values['GPFontSize'] : '',
488
+ 'after' => 'px'
489
+ ),
490
+ array (
491
+ 'label' => 'Font Weight',
492
+ 'name' => 'GPFontWeight',
493
+ 'type' => 'select',
494
+ 'options' => $font_weights,
495
+ 'class' => '',
496
+ 'value' => isset($param_values['GPFontWeight']) ? $param_values['GPFontWeight'] : '',
497
+ 'after' => ''
498
+ ),
499
+ array (
500
+ 'label' => 'Width',
501
+ 'name' => 'GPWidth',
502
+ 'type' => 'text',
503
+ 'class' => '',
504
+ 'value' => isset($param_values['GPWidth']) ? $param_values['GPWidth'] : '',
505
+ 'after' => '%'
506
+ ),
507
+ array (
508
+ 'label' => 'Width (for topbar form type)',
509
+ 'name' => 'GTPWidth',
510
+ 'type' => 'text',
511
+ 'class' => '',
512
+ 'value' => isset($param_values['GTPWidth']) ? $param_values['GTPWidth'] : '',
513
+ 'after' => '%'
514
+ ),
515
+ array (
516
+ 'label' => 'Alignment',
517
+ 'name' => 'GPAlign',
518
+ 'type' => 'select',
519
+ 'options' => $aligns,
520
+ 'class' => '',
521
+ 'value' => isset($param_values['GPAlign']) ? $param_values['GPAlign'] : '',
522
+ 'after' => ''
523
+ ),
524
+ array (
525
+ 'label' => 'Background URL',
526
+ 'name' => 'GPBackground',
527
+ 'type' => 'text',
528
+ 'class' => '',
529
+ 'value' => isset($param_values['GPBackground']) ? $param_values['GPBackground'] : '',
530
+ 'after' => ''
531
+ ),
532
+ array (
533
+ 'label' => 'Background Repeat',
534
+ 'name' => 'GPBackgroundRepeat',
535
+ 'type' => 'select',
536
+ 'options' => $bg_repeats,
537
+ 'class' => '',
538
+ 'value' => isset($param_values['GPBackgroundRepeat']) ? $param_values['GPBackgroundRepeat'] : '',
539
+ 'after' => ''
540
+ ),
541
+ array (
542
+ 'label' => 'Background Position',
543
+ 'name1' => 'GPBGPosition1',
544
+ 'name2' => 'GPBGPosition2',
545
+ 'type' => '2text',
546
+ 'class' => 'fm-2text',
547
+ 'value1' => isset($param_values['GPBGPosition1']) ? $param_values['GPBGPosition1'] : '',
548
+ 'value2' => isset($param_values['GPBGPosition2']) ? $param_values['GPBGPosition2'] : '',
549
+ 'before1' => '',
550
+ 'before2' => '',
551
+ 'after' => '%/left..'
552
+ ),
553
+ array (
554
+ 'label' => 'Background Size',
555
+ 'name1' => 'GPBGSize1',
556
+ 'name2' => 'GPBGSize2',
557
+ 'type' => '2text',
558
+ 'class' => 'fm-2text',
559
+ 'value1' => isset($param_values['GPBGSize1']) ? $param_values['GPBGSize1'] : '',
560
+ 'value2' => isset($param_values['GPBGSize2']) ? $param_values['GPBGSize2'] : '',
561
+ 'before1' => '',
562
+ 'before2' => '',
563
+ 'after' => '%/px'
564
+ ),
565
+ array (
566
+ 'label' => 'Color',
567
+ 'name' => 'GPColor',
568
+ 'type' => 'text',
569
+ 'class' => 'color',
570
+ 'value' => isset($param_values['GPColor']) ? $param_values['GPColor'] : '',
571
+ 'after' => ''
572
+ ),
573
+ array (
574
+ 'label' => 'Padding',
575
+ 'name' => 'GPPadding',
576
+ 'type' => 'text',
577
+ 'class' => '',
578
+ 'value' => isset($param_values['GPPadding']) ? $param_values['GPPadding'] : '',
579
+ 'after' => 'px/%'
580
+ ),
581
+ array (
582
+ 'label' => 'Margin',
583
+ 'name' => 'GPMargin',
584
+ 'type' => 'text',
585
+ 'class' => '',
586
+ 'value' => isset($param_values['GPMargin']) ? $param_values['GPMargin'] : '',
587
+ 'placeholder' => 'e.g. 5px 10px or 5% 10%',
588
+ 'after' => 'px/%'
589
+ ),
590
+ array (
591
+ 'label' => 'Border',
592
+ 'name' => 'GPBorder',
593
+ 'type' => 'checkbox',
594
+ 'options' => $borders,
595
+ 'class' => '',
596
+ 'after' => ''
597
+ ),
598
+ array (
599
+ 'label' => 'Border Color',
600
+ 'name' => 'GPBorderColor',
601
+ 'type' => 'text',
602
+ 'class' => 'color',
603
+ 'value' => isset($param_values['GPBorderColor']) ? $param_values['GPBorderColor'] : '',
604
+ 'after' => ''
605
+ ),
606
+ array (
607
+ 'label' => 'Border Type',
608
+ 'name' => 'GPBorderType',
609
+ 'type' => 'select',
610
+ 'options' => $border_types,
611
+ 'class' => '',
612
+ 'value' => isset($param_values['GPBorderType']) ? $param_values['GPBorderType'] : '',
613
+ 'after' => ''
614
+ ),
615
+ array (
616
+ 'label' => 'Border Width',
617
+ 'name' => 'GPBorderWidth',
618
+ 'type' => 'text',
619
+ 'class' => '',
620
+ 'value' => isset($param_values['GPBorderWidth']) ? $param_values['GPBorderWidth'] : '',
621
+ 'after' => 'px'
622
+ ),
623
+ array (
624
+ 'label' => 'Border Radius',
625
+ 'name' => 'GPBorderRadius',
626
+ 'type' => 'text',
627
+ 'class' => '',
628
+ 'value' => isset($param_values['GPBorderRadius']) ? $param_values['GPBorderRadius'] : '',
629
+ 'after' => 'px</div>'
630
+ ),
631
+ array (
632
+ 'label' => 'Mini labels (name, phone, address, checkbox, radio) Parameters',
633
+ 'type' => 'panel',
634
+ 'class' => 'col-md-6',
635
+ 'label_class' => 'fm-mini-title',
636
+ 'after' => '<br/>'
637
+ ),
638
+ array (
639
+ 'label' => 'Font Size',
640
+ 'name' => 'GPMLFontSize',
641
+ 'type' => 'text',
642
+ 'class' => '',
643
+ 'value' => isset($param_values['GPMLFontSize']) ? $param_values['GPMLFontSize'] : '',
644
+ 'after' => 'px'
645
+ ),
646
+ array (
647
+ 'label' => 'Font Weight',
648
+ 'name' => 'GPMLFontWeight',
649
+ 'type' => 'select',
650
+ 'options' => $font_weights,
651
+ 'class' => '',
652
+ 'value' => isset($param_values['GPMLFontWeight']) ? $param_values['GPMLFontWeight'] : '',
653
+ 'after' => ''
654
+ ),
655
+ array (
656
+ 'label' => 'Color',
657
+ 'name' => 'GPMLColor',
658
+ 'type' => 'text',
659
+ 'class' => 'color',
660
+ 'value' => isset($param_values['GPMLColor']) ? $param_values['GPMLColor'] : '',
661
+ 'after' => ''
662
+ ),
663
+ array (
664
+ 'label' => 'Padding',
665
+ 'name' => 'GPMLPadding',
666
+ 'type' => 'text',
667
+ 'class' => '',
668
+ 'value' => isset($param_values['GPMLPadding']) ? $param_values['GPMLPadding'] : '',
669
+ 'after' => 'px/%'
670
+ ),
671
+ array (
672
+ 'label' => 'Margin',
673
+ 'name' => 'GPMLMargin',
674
+ 'type' => 'text',
675
+ 'class' => '',
676
+ 'value' => isset($param_values['GPMLMargin']) ? $param_values['GPMLMargin'] : '',
677
+ 'after' => 'px/%'
678
+ ),
679
+ array (
680
+ 'label' => 'Section Parameters',
681
+ 'type' => 'label',
682
+ 'class' => 'fm-mini-title',
683
+ 'after' => '<br/>'
684
+ ),
685
+ array (
686
+ 'label' => 'Background Color',
687
+ 'name' => 'SEPBGColor',
688
+ 'type' => 'text',
689
+ 'class' => 'color',
690
+ 'value' => isset($param_values['SEPBGColor']) ? $param_values['SEPBGColor'] : '',
691
+ 'after' => ''
692
+ ),
693
+ array (
694
+ 'label' => 'Padding',
695
+ 'name' => 'SEPPadding',
696
+ 'type' => 'text',
697
+ 'class' => '',
698
+ 'value' => isset($param_values['SEPPadding']) ? $param_values['SEPPadding'] : '',
699
+ 'after' => 'px/%'
700
+ ),
701
+ array (
702
+ 'label' => 'Margin',
703
+ 'name' => 'SEPMargin',
704
+ 'type' => 'text',
705
+ 'class' => '',
706
+ 'value' => isset($param_values['SEPMargin']) ? $param_values['SEPMargin'] : '',
707
+ 'after' => 'px/%'
708
+ ),
709
+ array (
710
+ 'label' => 'Section Column Parameters',
711
+ 'type' => 'label',
712
+ 'class' => 'fm-mini-title',
713
+ 'after' => '<br/>'
714
+ ),
715
+ array (
716
+ 'label' => 'Padding',
717
+ 'name' => 'COPPadding',
718
+ 'type' => 'text',
719
+ 'class' => '',
720
+ 'value' => isset($param_values['COPPadding']) ? $param_values['COPPadding'] : '',
721
+ 'after' => 'px/%'
722
+ ),
723
+ array (
724
+ 'label' => 'Margin',
725
+ 'name' => 'COPMargin',
726
+ 'type' => 'text',
727
+ 'class' => '',
728
+ 'value' => isset($param_values['COPMargin']) ? $param_values['COPMargin'] : '',
729
+ 'after' => 'px/%'
730
+ ),
731
+ array (
732
+ 'label' => 'Footer Parameters',
733
+ 'type' => 'label',
734
+ 'class' => 'fm-mini-title',
735
+ 'after' => '<br/>'
736
+ ),
737
+ array (
738
+ 'label' => 'Width',
739
+ 'name' => 'FPWidth',
740
+ 'type' => 'text',
741
+ 'class' => '',
742
+ 'value' => isset($param_values['FPWidth']) ? $param_values['FPWidth'] : '',
743
+ 'after' => '%'
744
+ ),
745
+ array (
746
+ 'label' => 'Padding',
747
+ 'name' => 'FPPadding',
748
+ 'type' => 'text',
749
+ 'class' => '',
750
+ 'value' => isset($param_values['FPPadding']) ? $param_values['FPPadding'] : '',
751
+ 'after' => 'px/%'
752
+ ),
753
+ array (
754
+ 'label' => 'Margin',
755
+ 'name' => 'FPMargin',
756
+ 'type' => 'text',
757
+ 'class' => '',
758
+ 'value' => isset($param_values['FPMargin']) ? $param_values['FPMargin'] : '',
759
+ 'after' => 'px/%</div>'
760
+ )
761
+ ),
762
+ 'input_select' => array(
763
+ array (
764
+ 'label' => '',
765
+ 'type' => 'panel',
766
+ 'class' => 'col-md-12',
767
+ 'label_class' => '',
768
+ 'after' => ''
769
+ ),
770
+ array (
771
+ 'label' => 'Height',
772
+ 'name' => 'IPHeight',
773
+ 'type' => 'text',
774
+ 'class' => '',
775
+ 'value' => isset($param_values['IPHeight']) ? $param_values['IPHeight'] : '',
776
+ 'after' => 'px'
777
+ ),
778
+ array (
779
+ 'label' => 'Font Size',
780
+ 'name' => 'IPFontSize',
781
+ 'type' => 'text',
782
+ 'class' => '',
783
+ 'value' => isset($param_values['IPFontSize']) ? $param_values['IPFontSize'] : '',
784
+ 'after' => 'px'
785
+ ),
786
+ array (
787
+ 'label' => 'Font Weight',
788
+ 'name' => 'IPFontWeight',
789
+ 'type' => 'select',
790
+ 'options' => $font_weights,
791
+ 'class' => '',
792
+ 'value' => isset($param_values['IPFontWeight']) ? $param_values['IPFontWeight'] : '',
793
+ 'after' => ''
794
+ ),
795
+ array (
796
+ 'label' => 'Background Color',
797
+ 'name' => 'IPBGColor',
798
+ 'type' => 'text',
799
+ 'class' => 'color',
800
+ 'value' => isset($param_values['IPBGColor']) ? $param_values['IPBGColor'] : '',
801
+ 'after' => ''
802
+ ),
803
+ array (
804
+ 'label' => 'Color',
805
+ 'name' => 'IPColor',
806
+ 'type' => 'text',
807
+ 'class' => 'color',
808
+ 'value' => isset($param_values['IPColor']) ? $param_values['IPColor'] : '',
809
+ 'after' => ''
810
+ ),
811
+ array (
812
+ 'label' => 'Padding',
813
+ 'name' => 'IPPadding',
814
+ 'type' => 'text',
815
+ 'class' => '',
816
+ 'value' => isset($param_values['IPPadding']) ? $param_values['IPPadding'] : '',
817
+ 'after' => 'px/%'
818
+ ),
819
+ array (
820
+ 'label' => 'Margin',
821
+ 'name' => 'IPMargin',
822
+ 'type' => 'text',
823
+ 'class' => '',
824
+ 'value' => isset($param_values['IPMargin']) ? $param_values['IPMargin'] : '',
825
+ 'after' => 'px/%'
826
+ ),
827
+ array (
828
+ 'label' => 'Border',
829
+ 'name' => 'IPBorder',
830
+ 'type' => 'checkbox',
831
+ 'options' => $borders,
832
+ 'class' => '',
833
+ 'after' => ''
834
+ ),
835
+ array (
836
+ 'label' => 'Border Color',
837
+ 'name' => 'IPBorderColor',
838
+ 'type' => 'text',
839
+ 'class' => 'color',
840
+ 'value' => isset($param_values['IPBorderColor']) ? $param_values['IPBorderColor'] : '',
841
+ 'after' => ''
842
+ ),
843
+ array (
844
+ 'label' => 'Border Type',
845
+ 'name' => 'IPBorderType',
846
+ 'type' => 'select',
847
+ 'options' => $border_types,
848
+ 'class' => '',
849
+ 'value' => isset($param_values['IPBorderType']) ? $param_values['IPBorderType'] : '',
850
+ 'after' => ''
851
+ ),
852
+ array (
853
+ 'label' => 'Border Width',
854
+ 'name' => 'IPBorderWidth',
855
+ 'type' => 'text',
856
+ 'class' => '',
857
+ 'value' => isset($param_values['IPBorderWidth']) ? $param_values['IPBorderWidth'] : '',
858
+ 'after' => 'px'
859
+ ),
860
+ array (
861
+ 'label' => 'Border Radius',
862
+ 'name' => 'IPBorderRadius',
863
+ 'type' => 'text',
864
+ 'class' => '',
865
+ 'value' => isset($param_values['IPBorderRadius']) ? $param_values['IPBorderRadius'] : '',
866
+ 'after' => 'px'
867
+ ),
868
+ array (
869
+ 'label' => 'Box Shadow',
870
+ 'name' => 'IPBoxShadow',
871
+ 'type' => 'text',
872
+ 'class' => '',
873
+ 'value' => isset($param_values['IPBoxShadow']) ? $param_values['IPBoxShadow'] : '',
874
+ 'placeholder' => 'e.g. 5px 5px 2px #888888',
875
+ 'after' => '</div>'
876
+ ),
877
+ array (
878
+ 'label' => 'Dropdown additional',
879
+ 'type' => 'panel',
880
+ 'class' => 'col-md-12',
881
+ 'label_class' => 'fm-mini-title',
882
+ 'after' => '<br/>'
883
+ ),
884
+ array (
885
+ 'label' => 'Appearance',
886
+ 'name' => 'SBPAppearance',
887
+ 'type' => 'text',
888
+ 'class' => '',
889
+ 'value' => isset($param_values['SBPAppearance']) ? $param_values['SBPAppearance'] : '',
890
+ 'after' => ''
891
+ ),
892
+ array (
893
+ 'label' => 'Background URL',
894
+ 'name' => 'SBPBackground',
895
+ 'type' => 'text',
896
+ 'class' => '',
897
+ 'value' => isset($param_values['SBPBackground']) ? $param_values['SBPBackground'] : '',
898
+ 'after' => ''
899
+ ),
900
+ array (
901
+ 'label' => 'Background Repeat',
902
+ 'name' => 'SBPBGRepeat',
903
+ 'type' => 'select',
904
+ 'options' => $bg_repeats,
905
+ 'class' => '',
906
+ 'value' => isset($param_values['SBPBGRepeat']) ? $param_values['SBPBGRepeat'] : '',
907
+ 'after' => ''
908
+ ),
909
+ array (
910
+ 'label' => 'Background Position',
911
+ 'name1' => 'SBPBGPos1',
912
+ 'name2' => 'SBPBGPos2',
913
+ 'type' => '2text',
914
+ 'class' => 'fm-2text',
915
+ 'value1' => isset($param_values['SBPBGPos1']) ? $param_values['SBPBGPos1'] : '',
916
+ 'value2' => isset($param_values['SBPBGPos2']) ? $param_values['SBPBGPos2'] : '',
917
+ 'before1' => '',
918
+ 'before2' => '',
919
+ 'after' => '%/left..'
920
+ ),
921
+ array (
922
+ 'label' => 'Background Size',
923
+ 'name1' => 'SBPBGSize1',
924
+ 'name2' => 'SBPBGSize2',
925
+ 'type' => '2text',
926
+ 'class' => 'fm-2text',
927
+ 'value1' => isset($param_values['SBPBGSize1']) ? $param_values['SBPBGSize1'] : '',
928
+ 'value2' => isset($param_values['SBPBGSize2']) ? $param_values['SBPBGSize2'] : '',
929
+ 'before1' => '',
930
+ 'before2' => '',
931
+ 'after' => '%/px'
932
+ ),
933
+ array (
934
+ 'label' => '',
935
+ 'type' => 'label',
936
+ 'class' => '',
937
+ 'after' => '</div>'
938
+ )
939
+ ),
940
+ 'choices' => array(
941
+ array (
942
+ 'label' => 'Single Choice',
943
+ 'type' => 'panel',
944
+ 'class' => 'col-md-6',
945
+ 'label_class' => 'fm-mini-title',
946
+ 'after' => '<br/>'
947
+ ),
948
+ array (
949
+ 'label' => 'Input Parameters',
950
+ 'type' => 'label',
951
+ 'class' => 'fm-mini-title',
952
+ 'after' => '<br/>'
953
+ ),
954
+ array (
955
+ 'label' => 'Background Color',
956
+ 'name' => 'SCPBGColor',
957
+ 'type' => 'text',
958
+ 'class' => 'color',
959
+ 'value' => isset($param_values['SCPBGColor']) ? $param_values['SCPBGColor'] : '',
960
+ 'after' => ''
961
+ ),
962
+ array (
963
+ 'label' => 'Width',
964
+ 'name' => 'SCPWidth',
965
+ 'type' => 'text',
966
+ 'class' => '',
967
+ 'value' => isset($param_values['SCPWidth']) ? $param_values['SCPWidth'] : '',
968
+ 'after' => 'px'
969
+ ),
970
+ array (
971
+ 'label' => 'Height',
972
+ 'name' => 'SCPHeight',
973
+ 'type' => 'text',
974
+ 'class' => '',
975
+ 'value' => isset($param_values['SCPHeight']) ? $param_values['SCPHeight'] : '',
976
+ 'after' => 'px'
977
+ ),
978
+ array (
979
+ 'label' => 'Border',
980
+ 'name' => 'SCPBorder',
981
+ 'type' => 'checkbox',
982
+ 'options' => $borders,
983
+ 'class' => '',
984
+ 'after' => ''
985
+ ),
986
+ array (
987
+ 'label' => 'Border Color',
988
+ 'name' => 'SCPBorderColor',
989
+ 'type' => 'text',
990
+ 'class' => 'color',
991
+ 'value' => isset($param_values['SCPBorderColor']) ? $param_values['SCPBorderColor'] : '',
992
+ 'after' => ''
993
+ ),
994
+ array (
995
+ 'label' => 'Border Type',
996
+ 'name' => 'SCPBorderType',
997
+ 'type' => 'select',
998
+ 'options' => $border_types,
999
+ 'class' => '',
1000
+ 'value' => isset($param_values['SCPBorderType']) ? $param_values['SCPBorderType'] : '',
1001
+ 'after' => ''
1002
+ ),
1003
+ array (
1004
+ 'label' => 'Border Width',
1005
+ 'name' => 'SCPBorderWidth',
1006
+ 'type' => 'text',
1007
+ 'class' => '',
1008
+ 'value' => isset($param_values['SCPBorderWidth']) ? $param_values['SCPBorderWidth'] : '',
1009
+ 'after' => 'px'
1010
+ ),
1011
+ array (
1012
+ 'label' => 'Margin',
1013
+ 'name' => 'SCPMargin',
1014
+ 'type' => 'text',
1015
+ 'class' => '5px',
1016
+ 'value' => isset($param_values['SCPMargin']) ? $param_values['SCPMargin'] : '',
1017
+ 'after' => ''
1018
+ ),
1019
+ array (
1020
+ 'label' => 'Border Radius',
1021
+ 'name' => 'SCPBorderRadius',
1022
+ 'type' => 'text',
1023
+ 'class' => '',
1024
+ 'value' => isset($param_values['SCPBorderRadius']) ? $param_values['SCPBorderRadius'] : '',
1025
+ 'after' => 'px'
1026
+ ),
1027
+ array (
1028
+ 'label' => 'Box Shadow',
1029
+ 'name' => 'SCPBoxShadow',
1030
+ 'type' => 'text',
1031
+ 'class' => '',
1032
+ 'value' => isset($param_values['SCPBoxShadow']) ? $param_values['SCPBoxShadow'] : '',
1033
+ 'placeholder' => 'e.g. 5px 5px 2px #888888',
1034
+ 'after' => ''
1035
+ ),
1036
+ array (
1037
+ 'label' => 'Checked Parameters',
1038
+ 'type' => 'label',
1039
+ 'class' => 'fm-mini-title',
1040
+ 'after' => '<br/>'
1041
+ ),
1042
+ array (
1043
+ 'label' => 'Background Color',
1044
+ 'name' => 'SCCPBGColor',
1045
+ 'type' => 'text',
1046
+ 'class' => 'color',
1047
+ 'value' => isset($param_values['SCCPBGColor']) ? $param_values['SCCPBGColor'] : '',
1048
+ 'after' => ''
1049
+ ),
1050
+ array (
1051
+ 'label' => 'Width',
1052
+ 'name' => 'SCCPWidth',
1053
+ 'type' => 'text',
1054
+ 'class' => '',
1055
+ 'value' => isset($param_values['SCCPWidth']) ? $param_values['SCCPWidth'] : '',
1056
+ 'after' => 'px'
1057
+ ),
1058
+ array (
1059
+ 'label' => 'Height',
1060
+ 'name' => 'SCCPHeight',
1061
+ 'type' => 'text',
1062
+ 'class' => '',
1063
+ 'value' => isset($param_values['SCCPHeight']) ? $param_values['SCCPHeight'] : '',
1064
+ 'after' => 'px'
1065
+ ),
1066
+ array (
1067
+ 'label' => 'Margin',
1068
+ 'name' => 'SCCPMargin',
1069
+ 'type' => 'text',
1070
+ 'class' => '',
1071
+ 'value' => isset($param_values['SCCPMargin']) ? $param_values['SCCPMargin'] : '',
1072
+ 'after' => ''
1073
+ ),
1074
+ array (
1075
+ 'label' => 'Border Radius',
1076
+ 'name' => 'SCCPBorderRadius',
1077
+ 'type' => 'text',
1078
+ 'class' => '',
1079
+ 'value' => isset($param_values['SCCPBorderRadius']) ? $param_values['SCCPBorderRadius'] : '',
1080
+ 'after' => 'px</div>'
1081
+ ),
1082
+ array (
1083
+ 'label' => 'Multiple Choice',
1084
+ 'type' => 'panel',
1085
+ 'class' => 'col-md-6',
1086
+ 'label_class' => 'fm-mini-title',
1087
+ 'after' => '<br/>'
1088
+ ),
1089
+ array (
1090
+ 'label' => 'Input Parameters',
1091
+ 'type' => 'label',
1092
+ 'class' => 'fm-mini-title',
1093
+ 'after' => '<br/>'
1094
+ ),
1095
+ array (
1096
+ 'label' => 'Background Color',
1097
+ 'name' => 'MCPBGColor',
1098
+ 'type' => 'text',
1099
+ 'class' => 'color',
1100
+ 'value' => isset($param_values['MCPBGColor']) ? $param_values['MCPBGColor'] : '',
1101
+ 'after' => ''
1102
+ ),
1103
+ array (
1104
+ 'label' => 'Width',
1105
+ 'name' => 'MCPWidth',
1106
+ 'type' => 'text',
1107
+ 'class' => '',
1108
+ 'value' => isset($param_values['MCPWidth']) ? $param_values['MCPWidth'] : '',
1109
+ 'after' => 'px'
1110
+ ),
1111
+ array (
1112
+ 'label' => 'Height',
1113
+ 'name' => 'MCPHeight',
1114
+ 'type' => 'text',
1115
+ 'class' => '',
1116
+ 'value' => isset($param_values['MCPHeight']) ? $param_values['MCPHeight'] : '',
1117
+ 'after' => 'px'
1118
+ ),
1119
+ array (
1120
+ 'label' => 'Border',
1121
+ 'name' => 'MCPBorder',
1122
+ 'type' => 'checkbox',
1123
+ 'options' => $borders,
1124
+ 'class' => '',
1125
+ 'after' => ''
1126
+ ),
1127
+ array (
1128
+ 'label' => 'Border Color',
1129
+ 'name' => 'MCPBorderColor',
1130
+ 'type' => 'text',
1131
+ 'class' => 'color',
1132
+ 'value' => isset($param_values['MCPBorderColor']) ? $param_values['MCPBorderColor'] : '',
1133
+ 'after' => ''
1134
+ ),
1135
+ array (
1136
+ 'label' => 'Border Type',
1137
+ 'name' => 'MCPBorderType',
1138
+ 'type' => 'select',
1139
+ 'options' => $border_types,
1140
+ 'class' => '',
1141
+ 'value' => isset($param_values['MCPBorderType']) ? $param_values['MCPBorderType'] : '',
1142
+ 'after' => ''
1143
+ ),
1144
+ array (
1145
+ 'label' => 'Border Width',
1146
+ 'name' => 'MCPBorderWidth',
1147
+ 'type' => 'text',
1148
+ 'class' => '',
1149
+ 'value' => isset($param_values['MCPBorderWidth']) ? $param_values['MCPBorderWidth'] : '',
1150
+ 'after' => 'px'
1151
+ ),
1152
+ array (
1153
+ 'label' => 'Margin',
1154
+ 'name' => 'MCPMargin',
1155
+ 'type' => 'text',
1156
+ 'class' => '5px',
1157
+ 'value' => isset($param_values['MCPMargin']) ? $param_values['MCPMargin'] : '',
1158
+ 'after' => ''
1159
+ ),
1160
+ array (
1161
+ 'label' => 'Border Radius',
1162
+ 'name' => 'MCPBorderRadius',
1163
+ 'type' => 'text',
1164
+ 'class' => '',
1165
+ 'value' => isset($param_values['MCPBorderRadius']) ? $param_values['MCPBorderRadius'] : '',
1166
+ 'after' => 'px'
1167
+ ),
1168
+ array (
1169
+ 'label' => 'Box Shadow',
1170
+ 'name' => 'MCPBoxShadow',
1171
+ 'type' => 'text',
1172
+ 'class' => '',
1173
+ 'value' => isset($param_values['MCPBoxShadow']) ? $param_values['MCPBoxShadow'] : '',
1174
+ 'placeholder' => 'e.g. 5px 5px 2px #888888',
1175
+ 'after' => ''
1176
+ ),
1177
+ array (
1178
+ 'label' => 'Checked Parameters',
1179
+ 'type' => 'label',
1180
+ 'class' => 'fm-mini-title',
1181
+ 'after' => '<br/>'
1182
+ ),
1183
+ array (
1184
+ 'label' => 'Background Color',
1185
+ 'name' => 'MCCPBGColor',
1186
+ 'type' => 'text',
1187
+ 'class' => 'color',
1188
+ 'value' => isset($param_values['MCCPBGColor']) ? $param_values['MCCPBGColor'] : '',
1189
+ 'after' => ''
1190
+ ),
1191
+ array (
1192
+ 'label' => 'Background URL',
1193
+ 'name' => 'MCCPBackground',
1194
+ 'type' => 'text',
1195
+ 'class' => '',
1196
+ 'value' => isset($param_values['MCCPBackground']) ? $param_values['MCCPBackground'] : '',
1197
+ 'after' => ''
1198
+ ),
1199
+ array (
1200
+ 'label' => 'Background Repeat',
1201
+ 'name' => 'MCCPBGRepeat',
1202
+ 'type' => 'select',
1203
+ 'options' => $bg_repeats,
1204
+ 'class' => '',
1205
+ 'value' => isset($param_values['MCCPBGRepeat']) ? $param_values['MCCPBGRepeat'] : '',
1206
+ 'after' => ''
1207
+ ),
1208
+ array (
1209
+ 'label' => 'Background Position',
1210
+ 'name1' => 'MCCPBGPos1',
1211
+ 'name2' => 'MCCPBGPos2',
1212
+ 'type' => '2text',
1213
+ 'class' => 'fm-2text',
1214
+ 'value1' => isset($param_values['MCCPBGPos1']) ? $param_values['MCCPBGPos1'] : '',
1215
+ 'value2' => isset($param_values['MCCPBGPos2']) ? $param_values['MCCPBGPos2'] : '',
1216
+ 'before1' => '',
1217
+ 'before2' => '',
1218
+ 'after' => '%/left..'
1219
+ ),
1220
+ array (
1221
+ 'label' => 'Width',
1222
+ 'name' => 'MCCPWidth',
1223
+ 'type' => 'text',
1224
+ 'class' => '',
1225
+ 'value' => isset($param_values['MCCPWidth']) ? $param_values['MCCPWidth'] : '',
1226
+ 'after' => 'px'
1227
+ ),
1228
+ array (
1229
+ 'label' => 'Height',
1230
+ 'name' => 'MCCPHeight',
1231
+ 'type' => 'text',
1232
+ 'class' => '',
1233
+ 'value' => isset($param_values['MCCPHeight']) ? $param_values['MCCPHeight'] : '',
1234
+ 'after' => 'px'
1235
+ ),
1236
+ array (
1237
+ 'label' => 'Margin',
1238
+ 'name' => 'MCCPMargin',
1239
+ 'type' => 'text',
1240
+ 'class' => '',
1241
+ 'value' => isset($param_values['MCCPMargin']) ? $param_values['MCCPMargin'] : '',
1242
+ 'after' => ''
1243
+ ),
1244
+ array (
1245
+ 'label' => 'Border Radius',
1246
+ 'name' => 'MCCPBorderRadius',
1247
+ 'type' => 'text',
1248
+ 'class' => '',
1249
+ 'value' => isset($param_values['MCCPBorderRadius']) ? $param_values['MCCPBorderRadius'] : '',
1250
+ 'after' => 'px</div>'
1251
+ )
1252
+ ),
1253
+ 'subscribe' => array(
1254
+ array (
1255
+ 'label' => 'Global Parameters',
1256
+ 'type' => 'panel',
1257
+ 'class' => 'col-md-12',
1258
+ 'label_class' => 'fm-mini-title',
1259
+ 'after' => '<br/>'
1260
+ ),
1261
+ array (
1262
+ 'label' => 'Alignment',
1263
+ 'name' => 'SPAlign',
1264
+ 'type' => 'select',
1265
+ 'options' => $aligns_no_center,
1266
+ 'class' => '',
1267
+ 'value' => isset($param_values['SPAlign']) ? $param_values['SPAlign'] : '',
1268
+ 'after' => '</div>'
1269
+ ),
1270
+ array (
1271
+ 'label' => 'Subscribe',
1272
+ 'type' => 'panel',
1273
+ 'class' => 'col-md-6',
1274
+ 'label_class' => 'fm-mini-title',
1275
+ 'after' => '<br/>'
1276
+ ),
1277
+ array (
1278
+ 'label' => 'Background Color',
1279
+ 'name' => 'SPBGColor',
1280
+ 'type' => 'text',
1281
+ 'class' => 'color',
1282
+ 'value' => isset($param_values['SPBGColor']) ? $param_values['SPBGColor'] : '',
1283
+ 'after' => ''
1284
+ ),
1285
+ array (
1286
+ 'label' => 'Width',
1287
+ 'name' => 'SPWidth',
1288
+ 'type' => 'text',
1289
+ 'class' => '',
1290
+ 'value' => isset($param_values['SPWidth']) ? $param_values['SPWidth'] : '',
1291
+ 'after' => 'px'
1292
+ ),
1293
+ array (
1294
+ 'label' => 'Height',
1295
+ 'name' => 'SPHeight',
1296
+ 'type' => 'text',
1297
+ 'class' => '',
1298
+ 'value' => isset($param_values['SPHeight']) ? $param_values['SPHeight'] : '',
1299
+ 'after' => 'px'
1300
+ ),
1301
+ array (
1302
+ 'label' => 'Font Size',
1303
+ 'name' => 'SPFontSize',
1304
+ 'type' => 'text',
1305
+ 'class' => '',
1306
+ 'value' => isset($param_values['SPFontSize']) ? $param_values['SPFontSize'] : '',
1307
+ 'after' => 'px'
1308
+ ),
1309
+ array (
1310
+ 'label' => 'Font Weight',
1311
+ 'name' => 'SPFontWeight',
1312
+ 'type' => 'select',
1313
+ 'options' => $font_weights,
1314
+ 'class' => '',
1315
+ 'value' => isset($param_values['SPFontWeight']) ? $param_values['SPFontWeight'] : '',
1316
+ 'after' => ''
1317
+ ),
1318
+ array (
1319
+ 'label' => 'Color',
1320
+ 'name' => 'SPColor',
1321
+ 'type' => 'text',
1322
+ 'class' => 'color',
1323
+ 'value' => isset($param_values['SPColor']) ? $param_values['SPColor'] : '',
1324
+ 'after' => ''
1325
+ ),
1326
+ array (
1327
+ 'label' => 'Padding',
1328
+ 'name' => 'SPPadding',
1329
+ 'type' => 'text',
1330
+ 'class' => '',
1331
+ 'value' => isset($param_values['SPPadding']) ? $param_values['SPPadding'] : '',
1332
+ 'after' => 'px/%'
1333
+ ),
1334
+ array (
1335
+ 'label' => 'Margin',
1336
+ 'name' => 'SPMargin',
1337
+ 'type' => 'text',
1338
+ 'class' => '',
1339
+ 'value' => isset($param_values['SPMargin']) ? $param_values['SPMargin'] : '',
1340
+ 'after' => 'px/%'
1341
+ ),
1342
+ array (
1343
+ 'label' => 'Border',
1344
+ 'name' => 'SPBorder',
1345
+ 'type' => 'checkbox',
1346
+ 'options' => $borders,
1347
+ 'class' => '',
1348
+ 'after' => ''
1349
+ ),
1350
+ array (
1351
+ 'label' => 'Border Color',
1352
+ 'name' => 'SPBorderColor',
1353
+ 'type' => 'text',
1354
+ 'class' => 'color',
1355
+ 'value' => isset($param_values['SPBorderColor']) ? $param_values['SPBorderColor'] : '',
1356
+ 'after' => ''
1357
+ ),
1358
+ array (
1359
+ 'label' => 'Border Type',
1360
+ 'name' => 'SPBorderType',
1361
+ 'type' => 'select',
1362
+ 'options' => $border_types,
1363
+ 'class' => '',
1364
+ 'value' => isset($param_values['SPBorderType']) ? $param_values['SPBorderType'] : '',
1365
+ 'after' => ''
1366
+ ),
1367
+ array (
1368
+ 'label' => 'Border Width',
1369
+ 'name' => 'SPBorderWidth',
1370
+ 'type' => 'text',
1371
+ 'class' => '',
1372
+ 'value' => isset($param_values['SPBorderWidth']) ? $param_values['SPBorderWidth'] : '',
1373
+ 'after' => 'px'
1374
+ ),
1375
+ array (
1376
+ 'label' => 'Border Radius',
1377
+ 'name' => 'SPBorderRadius',
1378
+ 'type' => 'text',
1379
+ 'class' => '',
1380
+ 'value' => isset($param_values['SPBorderRadius']) ? $param_values['SPBorderRadius'] : '',
1381
+ 'after' => 'px'
1382
+ ),
1383
+ array (
1384
+ 'label' => 'Box Shadow',
1385
+ 'name' => 'SPBoxShadow',
1386
+ 'type' => 'text',
1387
+ 'class' => '',
1388
+ 'value' => isset($param_values['SPBoxShadow']) ? $param_values['SPBoxShadow'] : '',
1389
+ 'placeholder' => 'e.g. 5px 5px 2px #888888',
1390
+ 'after' => ''
1391
+ ),
1392
+ array (
1393
+ 'label' => 'Hover Parameters',
1394
+ 'type' => 'label',
1395
+ 'class' => 'fm-mini-title',
1396
+ 'after' => '<br/>'
1397
+ ),
1398
+ array (
1399
+ 'label' => 'Background Color',
1400
+ 'name' => 'SHPBGColor',
1401
+ 'type' => 'text',
1402
+ 'class' => 'color',
1403
+ 'value' => isset($param_values['SHPBGColor']) ? $param_values['SHPBGColor'] : '',
1404
+ 'after' => ''
1405
+ ),
1406
+ array (
1407
+ 'label' => 'Color',
1408
+ 'name' => 'SHPColor',
1409
+ 'type' => 'text',
1410
+ 'class' => 'color',
1411
+ 'value' => isset($param_values['SHPColor']) ? $param_values['SHPColor'] : '',
1412
+ 'after' => ''
1413
+ ),
1414
+ array (
1415
+ 'label' => 'Border',
1416
+ 'name' => 'SHPBorder',
1417
+ 'type' => 'checkbox',
1418
+ 'options' => $borders,
1419
+ 'class' => '',
1420
+ 'after' => ''
1421
+ ),
1422
+ array (
1423
+ 'label' => 'Border Color',
1424
+ 'name' => 'SHPBorderColor',
1425
+ 'type' => 'text',
1426
+ 'class' => 'color',
1427
+ 'value' => isset($param_values['SHPBorderColor']) ? $param_values['SHPBorderColor'] : '',
1428
+ 'after' => ''
1429
+ ),
1430
+ array (
1431
+ 'label' => 'Border Type',
1432
+ 'name' => 'SHPBorderType',
1433
+ 'type' => 'select',
1434
+ 'options' => $border_types,
1435
+ 'class' => '',
1436
+ 'value' => isset($param_values['SHPBorderType']) ? $param_values['SHPBorderType'] : '',
1437
+ 'after' => ''
1438
+ ),
1439
+ array (
1440
+ 'label' => 'Border Width',
1441
+ 'name' => 'SHPBorderWidth',
1442
+ 'type' => 'text',
1443
+ 'class' => '',
1444
+ 'value' => isset($param_values['SHPBorderWidth']) ? $param_values['SHPBorderWidth'] : '',
1445
+ 'after' => 'px</div>'
1446
+ ),
1447
+ array (
1448
+ 'label' => 'Reset',
1449
+ 'type' => 'panel',
1450
+ 'class' => 'col-md-6',
1451
+ 'label_class' => 'fm-mini-title',
1452
+ 'after' => '<br/>'
1453
+ ),
1454
+ array (
1455
+ 'label' => 'Background Color',
1456
+ 'name' => 'BPBGColor',
1457
+ 'type' => 'text',
1458
+ 'class' => 'color',
1459
+ 'value' => isset($param_values['BPBGColor']) ? $param_values['BPBGColor'] : '',
1460
+ 'after' => ''
1461
+ ),
1462
+ array (
1463
+ 'label' => 'Width',
1464
+ 'name' => 'BPWidth',
1465
+ 'type' => 'text',
1466
+ 'class' => '',
1467
+ 'value' => isset($param_values['BPWidth']) ? $param_values['BPWidth'] : '',
1468
+ 'after' => 'px'
1469
+ ),
1470
+ array (
1471
+ 'label' => 'Height',
1472
+ 'name' => 'BPHeight',
1473
+ 'type' => 'text',
1474
+ 'class' => '',
1475
+ 'value' => isset($param_values['BPHeight']) ? $param_values['BPHeight'] : '',
1476
+ 'after' => 'px'
1477
+ ),
1478
+ array (
1479
+ 'label' => 'Font Size',
1480
+ 'name' => 'BPFontSize',
1481
+ 'type' => 'text',
1482
+ 'class' => '',
1483
+ 'value' => isset($param_values['BPFontSize']) ? $param_values['BPFontSize'] : '',
1484
+ 'after' => 'px'
1485
+ ),
1486
+ array (
1487
+ 'label' => 'Font Weight',
1488
+ 'name' => 'BPFontWeight',
1489
+ 'type' => 'select',
1490
+ 'options' => $font_weights,
1491
+ 'class' => '',
1492
+ 'value' => isset($param_values['BPFontWeight']) ? $param_values['BPFontWeight'] : '',
1493
+ 'after' => ''
1494
+ ),
1495
+ array (
1496
+ 'label' => 'Color',
1497
+ 'name' => 'BPColor',
1498
+ 'type' => 'text',
1499
+ 'class' => 'color',
1500
+ 'value' => isset($param_values['BPColor']) ? $param_values['BPColor'] : '',
1501
+ 'after' => ''
1502
+ ),
1503
+ array (
1504
+ 'label' => 'Padding',
1505
+ 'name' => 'BPPadding',
1506
+ 'type' => 'text',
1507
+ 'class' => '',
1508
+ 'value' => isset($param_values['BPPadding']) ? $param_values['BPPadding'] : '',
1509
+ 'after' => 'px/%'
1510
+ ),
1511
+ array (
1512
+ 'label' => 'Margin',
1513
+ 'name' => 'BPMargin',
1514
+ 'type' => 'text',
1515
+ 'class' => '',
1516
+ 'value' => isset($param_values['BPMargin']) ? $param_values['BPMargin'] : '',
1517
+ 'after' => 'px/%'
1518
+ ),
1519
+ array (
1520
+ 'label' => 'Border',
1521
+ 'name' => 'BPBorder',
1522
+ 'type' => 'checkbox',
1523
+ 'options' => $borders,
1524
+ 'class' => '',
1525
+ 'after' => ''
1526
+ ),
1527
+ array (
1528
+ 'label' => 'Border Color',
1529
+ 'name' => 'BPBorderColor',
1530
+ 'type' => 'text',
1531
+ 'class' => 'color',
1532
+ 'value' => isset($param_values['BPBorderColor']) ? $param_values['BPBorderColor'] : '',
1533
+ 'after' => ''
1534
+ ),
1535
+ array (
1536
+ 'label' => 'Border Type',
1537
+ 'name' => 'BPBorderType',
1538
+ 'type' => 'select',
1539
+ 'options' => $border_types,
1540
+ 'class' => '',
1541
+ 'value' => isset($param_values['BPBorderType']) ? $param_values['BPBorderType'] : '',
1542
+ 'after' => ''
1543
+ ),
1544
+ array (
1545
+ 'label' => 'Border Width',
1546
+ 'name' => 'BPBorderWidth',
1547
+ 'type' => 'text',
1548
+ 'class' => '',
1549
+ 'value' => isset($param_values['BPBorderWidth']) ? $param_values['BPBorderWidth'] : '',
1550
+ 'after' => 'px'
1551
+ ),
1552
+ array (
1553
+ 'label' => 'Border Radius',
1554
+ 'name' => 'BPBorderRadius',
1555
+ 'type' => 'text',
1556
+ 'class' => '',
1557
+ 'value' => isset($param_values['BPBorderRadius']) ? $param_values['BPBorderRadius'] : '',
1558
+ 'after' => 'px'
1559
+ ),
1560
+ array (
1561
+ 'label' => 'Box Shadow',
1562
+ 'name' => 'BPBoxShadow',
1563
+ 'type' => 'text',
1564
+ 'class' => '',
1565
+ 'value' => isset($param_values['BPBoxShadow']) ? $param_values['BPBoxShadow'] : '',
1566
+ 'placeholder' => 'e.g. 5px 5px 2px #888888',
1567
+ 'after' => ''
1568
+ ),
1569
+ array (
1570
+ 'label' => 'Hover Parameters',
1571
+ 'type' => 'label',
1572
+ 'class' => 'fm-mini-title',
1573
+ 'after' => '<br/>'
1574
+ ),
1575
+ array (
1576
+ 'label' => 'Background Color',
1577
+ 'name' => 'BHPBGColor',
1578
+ 'type' => 'text',
1579
+ 'class' => 'color',
1580
+ 'value' => isset($param_values['BHPBGColor']) ? $param_values['BHPBGColor'] : '',
1581
+ 'after' => ''
1582
+ ),
1583
+ array (
1584
+ 'label' => 'Color',
1585
+ 'name' => 'BHPColor',
1586
+ 'type' => 'text',
1587
+ 'class' => 'color',
1588
+ 'value' => isset($param_values['BHPColor']) ? $param_values['BHPColor'] : '',
1589
+ 'after' => ''
1590
+ ),
1591
+ array (
1592
+ 'label' => 'Border',
1593
+ 'name' => 'BHPBorder',
1594
+ 'type' => 'checkbox',
1595
+ 'options' => $borders,
1596
+ 'class' => '',
1597
+ 'after' => ''
1598
+ ),
1599
+ array (
1600
+ 'label' => 'Border Color',
1601
+ 'name' => 'BHPBorderColor',
1602
+ 'type' => 'text',
1603
+ 'class' => 'color',
1604
+ 'value' => isset($param_values['BHPBorderColor']) ? $param_values['BHPBorderColor'] : '',
1605
+ 'after' => ''
1606
+ ),
1607
+ array (
1608
+ 'label' => 'Border Type',
1609
+ 'name' => 'BHPBorderType',
1610
+ 'type' => 'select',
1611
+ 'options' => $border_types,
1612
+ 'class' => '',
1613
+ 'value' => isset($param_values['BHPBorderType']) ? $param_values['BHPBorderType'] : '',
1614
+ 'after' => ''
1615
+ ),
1616
+ array (
1617
+ 'label' => 'Border Width',
1618
+ 'name' => 'BHPBorderWidth',
1619
+ 'type' => 'text',
1620
+ 'class' => '',
1621
+ 'value' => isset($param_values['BHPBorderWidth']) ? $param_values['BHPBorderWidth'] : '',
1622
+ 'after' => 'px</div>'
1623
+ )
1624
+ ),
1625
+ 'paigination' => array(
1626
+ array (
1627
+ 'label' => 'Active',
1628
+ 'type' => 'panel',
1629
+ 'class' => 'col-md-6',
1630
+ 'label_class' => 'fm-mini-title',
1631
+ 'after' => ''
1632
+ ),
1633
+ array (
1634
+ 'label' => 'Background Color',
1635
+ 'name' => 'PSAPBGColor',
1636
+ 'type' => 'text',
1637
+ 'class' => 'color',
1638
+ 'value' => isset($param_values['PSAPBGColor']) ? $param_values['PSAPBGColor'] : '',
1639
+ 'after' => ''
1640
+ ),
1641
+ array (
1642
+ 'label' => 'Font Size',
1643
+ 'name' => 'PSAPFontSize',
1644
+ 'type' => 'text',
1645
+ 'class' => '',
1646
+ 'value' => isset($param_values['PSAPFontSize']) ? $param_values['PSAPFontSize'] : '',
1647
+ 'after' => 'px'
1648
+ ),
1649
+ array (
1650
+ 'label' => 'Font Weight',
1651
+ 'name' => 'PSAPFontWeight',
1652
+ 'type' => 'select',
1653
+ 'options' => $font_weights,
1654
+ 'class' => '',
1655
+ 'value' => isset($param_values['PSAPFontWeight']) ? $param_values['PSAPFontWeight'] : '',
1656
+ 'after' => ''
1657
+ ),
1658
+ array (
1659
+ 'label' => 'Color',
1660
+ 'name' => 'PSAPColor',
1661
+ 'type' => 'text',
1662
+ 'class' => 'color',
1663
+ 'value' => isset($param_values['PSAPColor']) ? $param_values['PSAPColor'] : '',
1664
+ 'after' => ''
1665
+ ),
1666
+ array (
1667
+ 'label' => 'Height',
1668
+ 'name' => 'PSAPHeight',
1669
+ 'type' => 'text',
1670
+ 'class' => '',
1671
+ 'value' => isset($param_values['PSAPHeight']) ? $param_values['PSAPHeight'] : '',
1672
+ 'after' => 'px'
1673
+ ),
1674
+ array (
1675
+ 'label' => 'Line Height',
1676
+ 'name' => 'PSAPLineHeight',
1677
+ 'type' => 'text',
1678
+ 'class' => '',
1679
+ 'value' => isset($param_values['PSAPLineHeight']) ? $param_values['PSAPLineHeight'] : '',
1680
+ 'after' => 'px'
1681
+ ),
1682
+ array (
1683
+ 'label' => 'Padding',
1684
+ 'name' => 'PSAPPadding',
1685
+ 'type' => 'text',
1686
+ 'class' => '',
1687
+ 'value' => isset($param_values['PSAPPadding']) ? $param_values['PSAPPadding'] : '',
1688
+ 'after' => 'px/%'
1689
+ ),
1690
+ array (
1691
+ 'label' => 'Margin',
1692
+ 'name' => 'PSAPMargin',
1693
+ 'type' => 'text',
1694
+ 'class' => '',
1695
+ 'value' => isset($param_values['PSAPMargin']) ? $param_values['PSAPMargin'] : '',
1696
+ 'after' => 'px/%'
1697
+ ),
1698
+ array (
1699
+ 'label' => 'Border',
1700
+ 'name' => 'PSAPBorder',
1701
+ 'type' => 'checkbox',
1702
+ 'options' => $borders,
1703
+ 'class' => '',
1704
+ 'after' => ''
1705
+ ),
1706
+ array (
1707
+ 'label' => 'Border Color',
1708
+ 'name' => 'PSAPBorderColor',
1709
+ 'type' => 'text',
1710
+ 'class' => 'color',
1711
+ 'value' => isset($param_values['PSAPBorderColor']) ? $param_values['PSAPBorderColor'] : '',
1712
+ 'after' => ''
1713
+ ),
1714
+ array (
1715
+ 'label' => 'Border Type',
1716
+ 'name' => 'PSAPBorderType',
1717
+ 'type' => 'select',
1718
+ 'options' => $border_types,
1719
+ 'class' => '',
1720
+ 'value' => isset($param_values['PSAPBorderType']) ? $param_values['PSAPBorderType'] : '',
1721
+ 'after' => ''
1722
+ ),
1723
+ array (
1724
+ 'label' => 'Border Width',
1725
+ 'name' => 'PSAPBorderWidth',
1726
+ 'type' => 'text',
1727
+ 'class' => '',
1728
+ 'value' => isset($param_values['PSAPBorderWidth']) ? $param_values['PSAPBorderWidth'] : '',
1729
+ 'after' => 'px'
1730
+ ),
1731
+ array (
1732
+ 'label' => 'Border Radius',
1733
+ 'name' => 'PSAPBorderRadius',
1734
+ 'type' => 'text',
1735
+ 'class' => '',
1736
+ 'value' => isset($param_values['PSAPBorderRadius']) ? $param_values['PSAPBorderRadius'] : '',
1737
+ 'after' => 'px</div>'
1738
+ ),
1739
+ array (
1740
+ 'label' => 'Deactive',
1741
+ 'type' => 'panel',
1742
+ 'class' => 'col-md-6',
1743
+ 'label_class' => 'fm-mini-title',
1744
+ 'after' => ''
1745
+ ),
1746
+ array (
1747
+ 'label' => 'Background Color',
1748
+ 'name' => 'PSDPBGColor',
1749
+ 'type' => 'text',
1750
+ 'class' => 'color',
1751
+ 'value' => isset($param_values['PSDPBGColor']) ? $param_values['PSDPBGColor'] : '',
1752
+ 'after' => ''
1753
+ ),
1754
+ array (
1755
+ 'label' => 'Font Size',
1756
+ 'name' => 'PSDPFontSize',
1757
+ 'type' => 'text',
1758
+ 'class' => '',
1759
+ 'value' => isset($param_values['PSDPFontSize']) ? $param_values['PSDPFontSize'] : '',
1760
+ 'after' => 'px'
1761
+ ),
1762
+ array (
1763
+ 'label' => 'Font Weight',
1764
+ 'name' => 'PSDPFontWeight',
1765
+ 'type' => 'select',
1766
+ 'options' => $font_weights,
1767
+ 'class' => '',
1768
+ 'value' => isset($param_values['PSDPFontWeight']) ? $param_values['PSDPFontWeight'] : '',
1769
+ 'after' => ''
1770
+ ),
1771
+ array (
1772
+ 'label' => 'Color',
1773
+ 'name' => 'PSDPColor',
1774
+ 'type' => 'text',
1775
+ 'class' => 'color',
1776
+ 'value' => isset($param_values['PSDPColor']) ? $param_values['PSDPColor'] : '',
1777
+ 'after' => ''
1778
+ ),
1779
+ array (
1780
+ 'label' => 'Height',
1781
+ 'name' => 'PSDPHeight',
1782
+ 'type' => 'text',
1783
+ 'class' => '',
1784
+ 'value' => isset($param_values['PSDPHeight']) ? $param_values['PSDPHeight'] : '',
1785
+ 'after' => 'px'
1786
+ ),
1787
+ array (
1788
+ 'label' => 'Line Height',
1789
+ 'name' => 'PSDPLineHeight',
1790
+ 'type' => 'text',
1791
+ 'class' => '',
1792
+ 'value' => isset($param_values['PSDPLineHeight']) ? $param_values['PSDPLineHeight'] : '',
1793
+ 'after' => 'px'
1794
+ ),
1795
+ array (
1796
+ 'label' => 'Padding',
1797
+ 'name' => 'PSDPPadding',
1798
+ 'type' => 'text',
1799
+ 'class' => '',
1800
+ 'value' => isset($param_values['PSDPPadding']) ? $param_values['PSDPPadding'] : '',
1801
+ 'after' => 'px/%'
1802
+ ),
1803
+ array (
1804
+ 'label' => 'Margin',
1805
+ 'name' => 'PSDPMargin',
1806
+ 'type' => 'text',
1807
+ 'class' => '',
1808
+ 'value' => isset($param_values['PSDPMargin']) ? $param_values['PSDPMargin'] : '',
1809
+ 'after' => 'px/%'
1810
+ ),
1811
+ array (
1812
+ 'label' => 'Border',
1813
+ 'name' => 'PSDPBorder',
1814
+ 'type' => 'checkbox',
1815
+ 'options' => $borders,
1816
+ 'class' => '',
1817
+ 'after' => ''
1818
+ ),
1819
+ array (
1820
+ 'label' => 'Border Color',
1821
+ 'name' => 'PSDPBorderColor',
1822
+ 'type' => 'text',
1823
+ 'class' => 'color',
1824
+ 'value' => isset($param_values['PSDPBorderColor']) ? $param_values['PSDPBorderColor'] : '',
1825
+ 'after' => ''
1826
+ ),
1827
+ array (
1828
+ 'label' => 'Border Type',
1829
+ 'name' => 'PSDPBorderType',
1830
+ 'type' => 'select',
1831
+ 'options' => $border_types,
1832
+ 'class' => '',
1833
+ 'value' => isset($param_values['PSDPBorderType']) ? $param_values['PSDPBorderType'] : '',
1834
+ 'after' => ''
1835
+ ),
1836
+ array (
1837
+ 'label' => 'Border Width',
1838
+ 'name' => 'PSDPBorderWidth',
1839
+ 'type' => 'text',
1840
+ 'class' => '',
1841
+ 'value' => isset($param_values['PSDPBorderWidth']) ? $param_values['PSDPBorderWidth'] : '',
1842
+ 'after' => 'px'
1843
+ ),
1844
+ array (
1845
+ 'label' => 'Border Radius',
1846
+ 'name' => 'PSDPBorderRadius',
1847
+ 'type' => 'text',
1848
+ 'class' => '',
1849
+ 'value' => isset($param_values['PSDPBorderRadius']) ? $param_values['PSDPBorderRadius'] : '',
1850
+ 'after' => 'px</div>'
1851
+ ),
1852
+ array (
1853
+ 'label' => 'Steps',
1854
+ 'type' => 'panel',
1855
+ 'class' => 'col-md-12',
1856
+ 'label_class' => 'fm-mini-title',
1857
+ 'after' => ''
1858
+ ),
1859
+ array (
1860
+ 'label' => 'Alignment',
1861
+ 'name' => 'PSAPAlign',
1862
+ 'type' => 'select',
1863
+ 'options' => $aligns ,
1864
+ 'class' => '',
1865
+ 'value' => isset($param_values['PSAPAlign']) ? $param_values['PSAPAlign'] : '',
1866
+ 'after' => ''
1867
+ ),
1868
+ array (
1869
+ 'label' => 'Width',
1870
+ 'name' => 'PSAPWidth',
1871
+ 'type' => 'text',
1872
+ 'class' => '',
1873
+ 'value' => isset($param_values['PSAPWidth']) ? $param_values['PSAPWidth'] : '',
1874
+ 'after' => 'px</div>'
1875
+ ),
1876
+ array (
1877
+ 'label' => 'Percentage',
1878
+ 'type' => 'panel',
1879
+ 'class' => 'col-md-12',
1880
+ 'label_class' => 'fm-mini-title',
1881
+ 'after' => ''
1882
+ ),
1883
+ array (
1884
+ 'label' => 'Width',
1885
+ 'name' => 'PPAPWidth',
1886
+ 'type' => 'text',
1887
+ 'class' => '',
1888
+ 'value' => isset($param_values['PPAPWidth']) ? $param_values['PPAPWidth'] : '',
1889
+ 'placeholder' => 'e.g. 100% or 500px',
1890
+ 'after' => 'px/%</div>'
1891
+ )
1892
+ ),
1893
+ 'buttons' => array(
1894
+ array (
1895
+ 'label' => 'Global Parameters',
1896
+ 'type' => 'panel',
1897
+ 'class' => 'col-md-12',
1898
+ 'label_class' => 'fm-mini-title',
1899
+ 'after' => '<br/>'
1900
+ ),
1901
+ array (
1902
+ 'label' => 'Font Size',
1903
+ 'name' => 'BPFontSize',
1904
+ 'type' => 'text',
1905
+ 'class' => '',
1906
+ 'value' => isset($param_values['BPFontSize']) ? $param_values['BPFontSize'] : '',
1907
+ 'after' => 'px'
1908
+ ),
1909
+ array (
1910
+ 'label' => 'Font Weight',
1911
+ 'name' => 'BPFontWeight',
1912
+ 'type' => 'select',
1913
+ 'options' => $font_weights,
1914
+ 'class' => '',
1915
+ 'value' => isset($param_values['BPFontWeight']) ? $param_values['BPFontWeight'] : '',
1916
+ 'after' => '</div>'
1917
+ ),
1918
+ array (
1919
+ 'label' => 'Next Button Parameters',
1920
+ 'type' => 'panel',
1921
+ 'class' => 'col-md-6',
1922
+ 'label_class' => 'fm-mini-title',
1923
+ 'after' => '<br/>'
1924
+ ),
1925
+ array (
1926
+ 'label' => 'Background Color',
1927
+ 'name' => 'NBPBGColor',
1928
+ 'type' => 'text',
1929
+ 'class' => 'color',
1930
+ 'value' => isset($param_values['NBPBGColor']) ? $param_values['NBPBGColor'] : '',
1931
+ 'after' => ''
1932
+ ),
1933
+ array (
1934
+ 'label' => 'Width',
1935
+ 'name' => 'NBPWidth',
1936
+ 'type' => 'text',
1937
+ 'class' => '',
1938
+ 'value' => isset($param_values['NBPWidth']) ? $param_values['NBPWidth'] : '',
1939
+ 'after' => 'px'
1940
+ ),
1941
+ array (
1942
+ 'label' => 'Height',
1943
+ 'name' => 'NBPHeight',
1944
+ 'type' => 'text',
1945
+ 'class' => '',
1946
+ 'value' => isset($param_values['NBPHeight']) ? $param_values['NBPHeight'] : '',
1947
+ 'after' => 'px'
1948
+ ),
1949
+ array (
1950
+ 'label' => 'Line Height',
1951
+ 'name' => 'NBPLineHeight',
1952
+ 'type' => 'text',
1953
+ 'class' => '',
1954
+ 'value' => isset($param_values['NBPLineHeight']) ? $param_values['NBPLineHeight'] : '',
1955
+ 'after' => 'px'
1956
+ ),
1957
+ array (
1958
+ 'label' => 'Color',
1959
+ 'name' => 'NBPColor',
1960
+ 'type' => 'text',
1961
+ 'class' => 'color',
1962
+ 'value' => isset($param_values['NBPColor']) ? $param_values['NBPColor'] : '',
1963
+ 'after' => ''
1964
+ ),
1965
+ array (
1966
+ 'label' => 'Padding',
1967
+ 'name' => 'NBPPadding',
1968
+ 'type' => 'text',
1969
+ 'class' => '',
1970
+ 'value' => isset($param_values['NBPPadding']) ? $param_values['NBPPadding'] : '',
1971
+ 'after' => 'px/%'
1972
+ ),
1973
+ array (
1974
+ 'label' => 'Margin',
1975
+ 'name' => 'NBPMargin',
1976
+ 'type' => 'text',
1977
+ 'class' => '',
1978
+ 'value' => isset($param_values['NBPMargin']) ? $param_values['NBPMargin'] : '',
1979
+ 'after' => 'px/%'
1980
+ ),
1981
+ array (
1982
+ 'label' => 'Border',
1983
+ 'name' => 'NBPBorder',
1984
+ 'type' => 'checkbox',
1985
+ 'options' => $borders,
1986
+ 'class' => '',
1987
+ 'after' => ''
1988
+ ),
1989
+ array (
1990
+ 'label' => 'Border Color',
1991
+ 'name' => 'NBPBorderColor',
1992
+ 'type' => 'text',
1993
+ 'class' => 'color',
1994
+ 'value' => isset($param_values['NBPBorderColor']) ? $param_values['NBPBorderColor'] : '',
1995
+ 'after' => ''
1996
+ ),
1997
+ array (
1998
+ 'label' => 'Border Type',
1999
+ 'name' => 'NBPBorderType',
2000
+ 'type' => 'select',
2001
+ 'options' => $border_types,
2002
+ 'class' => '',
2003
+ 'value' => isset($param_values['NBPBorderType']) ? $param_values['NBPBorderType'] : '',
2004
+ 'after' => ''
2005
+ ),
2006
+ array (
2007
+ 'label' => 'Border Width',
2008
+ 'name' => 'NBPBorderWidth',
2009
+ 'type' => 'text',
2010
+ 'class' => '',
2011
+ 'value' => isset($param_values['NBPBorderWidth']) ? $param_values['NBPBorderWidth'] : '',
2012
+ 'after' => 'px'
2013
+ ),
2014
+ array (
2015
+ 'label' => 'Border Radius',
2016
+ 'name' => 'NBPBorderRadius',
2017
+ 'type' => 'text',
2018
+ 'class' => '',
2019
+ 'value' => isset($param_values['NBPBorderRadius']) ? $param_values['NBPBorderRadius'] : '',
2020
+ 'after' => 'px'
2021
+ ),
2022
+ array (
2023
+ 'label' => 'Box Shadow',
2024
+ 'name' => 'NBPBoxShadow',
2025
+ 'type' => 'text',
2026
+ 'class' => '',
2027
+ 'value' => isset($param_values['NBPBoxShadow']) ? $param_values['NBPBoxShadow'] : '',
2028
+ 'placeholder' => 'e.g. 5px 5px 2px #888888',
2029
+ 'after' => ''
2030
+ ),
2031
+ array (
2032
+ 'label' => 'Hover Parameters',
2033
+ 'type' => 'label',
2034
+ 'class' => 'fm-mini-title',
2035
+ 'after' => '<br/>'
2036
+ ),
2037
+ array (
2038
+ 'label' => 'Background Color',
2039
+ 'name' => 'NBHPBGColor',
2040
+ 'type' => 'text',
2041
+ 'class' => 'color',
2042
+ 'value' => isset($param_values['NBHPBGColor']) ? $param_values['NBHPBGColor'] : '',
2043
+ 'after' => ''
2044
+ ),
2045
+ array (
2046
+ 'label' => 'Color',
2047
+ 'name' => 'NBHPColor',
2048
+ 'type' => 'text',
2049
+ 'class' => 'color',
2050
+ 'value' => isset($param_values['NBHPColor']) ? $param_values['NBHPColor'] : '',
2051
+ 'after' => ''
2052
+ ),
2053
+ array (
2054
+ 'label' => 'Border',
2055
+ 'name' => 'NBHPBorder',
2056
+ 'type' => 'checkbox',
2057
+ 'options' => $borders,
2058
+ 'class' => '',
2059
+ 'after' => ''
2060
+ ),
2061
+ array (
2062
+ 'label' => 'Border Color',
2063
+ 'name' => 'NBHPBorderColor',
2064
+ 'type' => 'text',
2065
+ 'class' => 'color',
2066
+ 'value' => isset($param_values['NBHPBorderColor']) ? $param_values['NBHPBorderColor'] : '',
2067
+ 'after' => ''
2068
+ ),
2069
+ array (
2070
+ 'label' => 'Border Type',
2071
+ 'name' => 'NBHPBorderType',
2072
+ 'type' => 'select',
2073
+ 'options' => $border_types,
2074
+ 'class' => '',
2075
+ 'value' => isset($param_values['NBHPBorderType']) ? $param_values['NBHPBorderType'] : '',
2076
+ 'after' => ''
2077
+ ),
2078
+ array (
2079
+ 'label' => 'Border Width',
2080
+ 'name' => 'NBHPBorderWidth',
2081
+ 'type' => 'text',
2082
+ 'class' => '',
2083
+ 'value' => isset($param_values['NBHPBorderWidth']) ? $param_values['NBHPBorderWidth'] : '',
2084
+ 'after' => 'px</div>'
2085
+ ),
2086
+ array (
2087
+ 'label' => 'Previous Button Parameters',
2088
+ 'type' => 'panel',
2089
+ 'class' => 'col-md-6',
2090
+ 'label_class' => 'fm-mini-title',
2091
+ 'after' => '<br/>'
2092
+ ),
2093
+ array (
2094
+ 'label' => 'Background Color',
2095
+ 'name' => 'PBPBGColor',
2096
+ 'type' => 'text',
2097
+ 'class' => 'color',
2098
+ 'value' => isset($param_values['PBPBGColor']) ? $param_values['PBPBGColor'] : '',
2099
+ 'after' => ''
2100
+ ),
2101
+ array (
2102
+ 'label' => 'Width',
2103
+ 'name' => 'PBPWidth',
2104
+ 'type' => 'text',
2105
+ 'class' => '',
2106
+ 'value' => isset($param_values['PBPWidth']) ? $param_values['PBPWidth'] : '',
2107
+ 'after' => 'px'
2108
+ ),
2109
+ array (
2110
+ 'label' => 'Height',
2111
+ 'name' => 'PBPHeight',
2112
+ 'type' => 'text',
2113
+ 'class' => '',
2114
+ 'value' => isset($param_values['PBPHeight']) ? $param_values['PBPHeight'] : '',
2115
+ 'after' => 'px'
2116
+ ),
2117
+ array (
2118
+ 'label' => 'Line Height',
2119
+ 'name' => 'PBPLineHeight',
2120
+ 'type' => 'text',
2121
+ 'class' => '',
2122
+ 'value' => isset($param_values['PBPLineHeight']) ? $param_values['PBPLineHeight'] : '',
2123
+ 'after' => 'px'
2124
+ ),
2125
+ array (
2126
+ 'label' => 'Color',
2127
+ 'name' => 'PBPColor',
2128
+ 'type' => 'text',
2129
+ 'class' => 'color',
2130
+ 'value' => isset($param_values['PBPColor']) ? $param_values['PBPColor'] : '',
2131
+ 'after' => ''
2132
+ ),
2133
+ array (
2134
+ 'label' => 'Padding',
2135
+ 'name' => 'PBPPadding',
2136
+ 'type' => 'text',
2137
+ 'class' => '',
2138
+ 'value' => isset($param_values['PBPPadding']) ? $param_values['PBPPadding'] : '',
2139
+ 'after' => 'px/%'
2140
+ ),
2141
+ array (
2142
+ 'label' => 'Margin',
2143
+ 'name' => 'PBPMargin',
2144
+ 'type' => 'text',
2145
+ 'class' => '',
2146
+ 'value' => isset($param_values['PBPMargin']) ? $param_values['PBPMargin'] : '',
2147
+ 'after' => 'px/%'
2148
+ ),
2149
+ array (
2150
+ 'label' => 'Border',
2151
+ 'name' => 'PBPBorder',
2152
+ 'type' => 'checkbox',
2153
+ 'options' => $borders,
2154
+ 'class' => '',
2155
+ 'after' => ''
2156
+ ),
2157
+ array (
2158
+ 'label' => 'Border Color',
2159
+ 'name' => 'PBPBorderColor',
2160
+ 'type' => 'text',
2161
+ 'class' => 'color',
2162
+ 'value' => isset($param_values['PBPBorderColor']) ? $param_values['PBPBorderColor'] : '',
2163
+ 'after' => ''
2164
+ ),
2165
+ array (
2166
+ 'label' => 'Border Type',
2167
+ 'name' => 'PBPBorderType',
2168
+ 'type' => 'select',
2169
+ 'options' => $border_types,
2170
+ 'class' => '',
2171
+ 'value' => isset($param_values['PBPBorderType']) ? $param_values['PBPBorderType'] : '',
2172
+ 'after' => ''
2173
+ ),
2174
+ array (
2175
+ 'label' => 'Border Width',
2176
+ 'name' => 'PBPBorderWidth',
2177
+ 'type' => 'text',
2178
+ 'class' => '',
2179
+ 'value' => isset($param_values['PBPBorderWidth']) ? $param_values['PBPBorderWidth'] : '',
2180
+ 'after' => 'px'
2181
+ ),
2182
+ array (
2183
+ 'label' => 'Border Radius',
2184
+ 'name' => 'PBPBorderRadius',
2185
+ 'type' => 'text',
2186
+ 'class' => '',
2187
+ 'value' => isset($param_values['PBPBorderRadius']) ? $param_values['PBPBorderRadius'] : '',
2188
+ 'after' => 'px'
2189
+ ),
2190
+ array (
2191
+ 'label' => 'Box Shadow',
2192
+ 'name' => 'PBPBoxShadow',
2193
+ 'type' => 'text',
2194
+ 'class' => '',
2195
+ 'value' => isset($param_values['PBPBoxShadow']) ? $param_values['PBPBoxShadow'] : '',
2196
+ 'placeholder' => 'e.g. 5px 5px 2px #888888',
2197
+ 'after' => ''
2198
+ ),
2199
+ array (
2200
+ 'label' => 'Hover Parameters',
2201
+ 'type' => 'label',
2202
+ 'class' => 'fm-mini-title',
2203
+ 'after' => '<br/>'
2204
+ ),
2205
+ array (
2206
+ 'label' => 'Background Color',
2207
+ 'name' => 'PBHPBGColor',
2208
+ 'type' => 'text',
2209
+ 'class' => 'color',
2210
+ 'value' => isset($param_values['PBHPBGColor']) ? $param_values['PBHPBGColor'] : '',
2211
+ 'after' => ''
2212
+ ),
2213
+ array (
2214
+ 'label' => 'Color',
2215
+ 'name' => 'PBHPColor',
2216
+ 'type' => 'text',
2217
+ 'class' => 'color',
2218
+ 'value' => isset($param_values['PBHPColor']) ? $param_values['PBHPColor'] : '',
2219
+ 'after' => ''
2220
+ ),
2221
+ array (
2222
+ 'label' => 'Border',
2223
+ 'name' => 'PBHPBorder',
2224
+ 'type' => 'checkbox',
2225
+ 'options' => $borders,
2226
+ 'class' => '',
2227
+ 'after' => ''
2228
+ ),
2229
+ array (
2230
+ 'label' => 'Border Color',
2231
+ 'name' => 'PBHPBorderColor',
2232
+ 'type' => 'text',
2233
+ 'class' => 'color',
2234
+ 'value' => isset($param_values['PBHPBorderColor']) ? $param_values['PBHPBorderColor'] : '',
2235
+ 'after' => ''
2236
+ ),
2237
+ array (
2238
+ 'label' => 'Border Type',
2239
+ 'name' => 'PBHPBorderType',
2240
+ 'type' => 'select',
2241
+ 'options' => $border_types,
2242
+ 'class' => '',
2243
+ 'value' => isset($param_values['PBHPBorderType']) ? $param_values['PBHPBorderType'] : '',
2244
+ 'after' => ''
2245
+ ),
2246
+ array (
2247
+ 'label' => 'Border Width',
2248
+ 'name' => 'PBHPBorderWidth',
2249
+ 'type' => 'text',
2250
+ 'class' => '',
2251
+ 'value' => isset($param_values['PBHPBorderWidth']) ? $param_values['PBHPBorderWidth'] : '',
2252
+ 'after' => 'px</div>'
2253
+ )
2254
+ ),
2255
+ 'close_button' => array(
2256
+ array (
2257
+ 'label' => '',
2258
+ 'type' => 'panel',
2259
+ 'class' => 'col-md-12',
2260
+ 'label_class' => '',
2261
+ 'after' => ''
2262
+ ),
2263
+ array (
2264
+ 'label' => 'Position',
2265
+ 'name' => 'CBPPosition',
2266
+ 'type' => 'select',
2267
+ 'options' => $position_types,
2268
+ 'class' => '',
2269
+ 'value' => isset($param_values['CBPPosition']) ? $param_values['CBPPosition'] : '',
2270
+ 'after' => ''
2271
+ ),
2272
+ array (
2273
+ 'label' => 'Top',
2274
+ 'name' => 'CBPTop',
2275
+ 'type' => 'text',
2276
+ 'class' => '',
2277
+ 'value' => isset($param_values['CBPTop']) ? $param_values['CBPTop'] : '',
2278
+ 'after' => 'px/%'
2279
+ ),
2280
+ array (
2281
+ 'label' => 'Right',
2282
+ 'name' => 'CBPRight',
2283
+ 'type' => 'text',
2284
+ 'class' => '',
2285
+ 'value' => isset($param_values['CBPRight']) ? $param_values['CBPRight'] : '',
2286
+ 'after' => 'px/%'
2287
+ ),
2288
+ array (
2289
+ 'label' => 'Bottom',
2290
+ 'name' => 'CBPBottom',
2291
+ 'type' => 'text',
2292
+ 'class' => '',
2293
+ 'value' => isset($param_values['CBPBottom']) ? $param_values['CBPBottom'] : '',
2294
+ 'after' => 'px/%'
2295
+ ),
2296
+ array (
2297
+ 'label' => 'Left',
2298
+ 'name' => 'CBPLeft',
2299
+ 'type' => 'text',
2300
+ 'class' => '',
2301
+ 'value' => isset($param_values['CBPLeft']) ? $param_values['CBPLeft'] : '',
2302
+ 'after' => 'px/%'
2303
+ ),
2304
+ array (
2305
+ 'label' => 'Background Color',
2306
+ 'name' => 'CBPBGColor',
2307
+ 'type' => 'text',
2308
+ 'class' => 'color',
2309
+ 'value' => isset($param_values['CBPBGColor']) ? $param_values['CBPBGColor'] : '',
2310
+ 'after' => ''
2311
+ ),
2312
+ array (
2313
+ 'label' => 'Font Size',
2314
+ 'name' => 'CBPFontSize',
2315
+ 'type' => 'text',
2316
+ 'class' => '13',
2317
+ 'value' => isset($param_values['CBPFontSize']) ? $param_values['CBPFontSize'] : '',
2318
+ 'after' => 'px'
2319
+ ),
2320
+ array (
2321
+ 'label' => 'Font Weight',
2322
+ 'name' => 'CBPFontWeight',
2323
+ 'type' => 'select',
2324
+ 'options' => $font_weights,
2325
+ 'class' => '',
2326
+ 'value' => isset($param_values['CBPFontWeight']) ? $param_values['CBPFontWeight'] : '',
2327
+ 'after' => ''
2328
+ ),
2329
+ array (
2330
+ 'label' => 'Color',
2331
+ 'name' => 'CBPColor',
2332
+ 'type' => 'text',
2333
+ 'class' => 'color',
2334
+ 'value' => isset($param_values['CBPColor']) ? $param_values['CBPColor'] : '',
2335
+ 'after' => ''
2336
+ ),
2337
+ array (
2338
+ 'label' => 'Padding',
2339
+ 'name' => 'CBPPadding',
2340
+ 'type' => 'text',
2341
+ 'class' => '',
2342
+ 'value' => isset($param_values['CBPPadding']) ? $param_values['CBPPadding'] : '',
2343
+ 'after' => 'px/%'
2344
+ ),
2345
+ array (
2346
+ 'label' => 'Margin',
2347
+ 'name' => 'CBPMargin',
2348
+ 'type' => 'text',
2349
+ 'class' => '',
2350
+ 'value' => isset($param_values['CBPMargin']) ? $param_values['CBPMargin'] : '',
2351
+ 'after' => 'px/%'
2352
+ ),
2353
+ array (
2354
+ 'label' => 'Border',
2355
+ 'name' => 'CBPBorder',
2356
+ 'type' => 'checkbox',
2357
+ 'options' => $borders,
2358
+ 'class' => '',
2359
+ 'after' => ''
2360
+ ),
2361
+ array (
2362
+ 'label' => 'Border Color',
2363
+ 'name' => 'CBPBorderColor',
2364
+ 'type' => 'text',
2365
+ 'class' => 'color',
2366
+ 'value' => isset($param_values['CBPBorderColor']) ? $param_values['CBPBorderColor'] : '',
2367
+ 'after' => ''
2368
+ ),
2369
+ array (
2370
+ 'label' => 'Border Type',
2371
+ 'name' => 'CBPBorderType',
2372
+ 'type' => 'select',
2373
+ 'options' => $border_types,
2374
+ 'class' => '',
2375
+ 'value' => isset($param_values['CBPBorderType']) ? $param_values['CBPBorderType'] : '',
2376
+ 'after' => ''
2377
+ ),
2378
+ array (
2379
+ 'label' => 'Border Width',
2380
+ 'name' => 'CBPBorderWidth',
2381
+ 'type' => 'text',
2382
+ 'class' => '',
2383
+ 'value' => isset($param_values['CBPBorderWidth']) ? $param_values['CBPBorderWidth'] : '',
2384
+ 'after' => 'px'
2385
+ ),
2386
+ array (
2387
+ 'label' => 'Border Radius',
2388
+ 'name' => 'CBPBorderRadius',
2389
+ 'type' => 'text',
2390
+ 'class' => '',
2391
+ 'value' => isset($param_values['CBPBorderRadius']) ? $param_values['CBPBorderRadius'] : '',
2392
+ 'after' => 'px'
2393
+ ),
2394
+ array (
2395
+ 'label' => 'Hover Parameters',
2396
+ 'type' => 'label',
2397
+ 'class' => 'fm-mini-title',
2398
+ 'after' => '<br/>'
2399
+ ),
2400
+ array (
2401
+ 'label' => 'Background Color',
2402
+ 'name' => 'CBHPBGColor',
2403
+ 'type' => 'text',
2404
+ 'class' => 'color',
2405
+ 'value' => isset($param_values['CBHPBGColor']) ? $param_values['CBHPBGColor'] : '',
2406
+ 'after' => ''
2407
+ ),
2408
+ array (
2409
+ 'label' => 'Color',
2410
+ 'name' => 'CBHPColor',
2411
+ 'type' => 'text',
2412
+ 'class' => 'color',
2413
+ 'value' => isset($param_values['CBHPColor']) ? $param_values['CBHPColor'] : '',
2414
+ 'after' => ''
2415
+ ),
2416
+ array (
2417
+ 'label' => 'Border',
2418
+ 'name' => 'CBHPBorder',
2419
+ 'type' => 'checkbox',
2420
+ 'options' => $borders,
2421
+ 'class' => '',
2422
+ 'after' => ''
2423
+ ),
2424
+ array (
2425
+ 'label' => 'Border Color',
2426
+ 'name' => 'CBHPBorderColor',
2427
+ 'type' => 'text',
2428
+ 'class' => 'color',
2429
+ 'value' => isset($param_values['CBHPBorderColor']) ? $param_values['CBHPBorderColor'] : '',
2430
+ 'after' => ''
2431
+ ),
2432
+ array (
2433
+ 'label' => 'Border Type',
2434
+ 'name' => 'CBHPBorderType',
2435
+ 'type' => 'select',
2436
+ 'options' => $border_types,
2437
+ 'class' => '',
2438
+ 'value' => isset($param_values['CBHPBorderType']) ? $param_values['CBHPBorderType'] : '',
2439
+ 'after' => ''
2440
+ ),
2441
+ array (
2442
+ 'label' => 'Border Width',
2443
+ 'name' => 'CBHPBorderWidth',
2444
+ 'type' => 'text',
2445
+ 'class' => '',
2446
+ 'value' => isset($param_values['CBHPBorderWidth']) ? $param_values['CBHPBorderWidth'] : '',
2447
+ 'after' => 'px</div>'
2448
+ )
2449
+ ),
2450
+ 'minimize' => array(
2451
+ array (
2452
+ 'label' => '',
2453
+ 'type' => 'panel',
2454
+ 'class' => 'col-md-12',
2455
+ 'label_class' => '',
2456
+ 'after' => ''
2457
+ ),
2458
+ array (
2459
+ 'label' => 'Background Color',
2460
+ 'name' => 'MBPBGColor',
2461
+ 'type' => 'text',
2462
+ 'class' => 'color',
2463
+ 'value' => isset($param_values['MBPBGColor']) ? $param_values['MBPBGColor'] : '',
2464
+ 'after' => ''
2465
+ ),
2466
+ array (
2467
+ 'label' => 'Font Size',
2468
+ 'name' => 'MBPFontSize',
2469
+ 'type' => 'text',
2470
+ 'class' => '13',
2471
+ 'value' => isset($param_values['MBPFontSize']) ? $param_values['MBPFontSize'] : '',
2472
+ 'after' => 'px'
2473
+ ),
2474
+ array (
2475
+ 'label' => 'Font Weight',
2476
+ 'name' => 'MBPFontWeight',
2477
+ 'type' => 'select',
2478
+ 'options' => $font_weights,
2479
+ 'class' => '',
2480
+ 'value' => isset($param_values['MBPFontWeight']) ? $param_values['MBPFontWeight'] : '',
2481
+ 'after' => ''
2482
+ ),
2483
+ array (
2484
+ 'label' => 'Color',
2485
+ 'name' => 'MBPColor',
2486
+ 'type' => 'text',
2487
+ 'class' => 'color',
2488
+ 'value' => isset($param_values['MBPColor']) ? $param_values['MBPColor'] : '',
2489
+ 'after' => ''
2490
+ ),
2491
+ array (
2492
+ 'label' => 'Text Align',
2493
+ 'name' => 'MBPTextAlign',
2494
+ 'type' => 'select',
2495
+ 'options' => $aligns,
2496
+ 'class' => '',
2497
+ 'value' => isset($param_values['MBPTextAlign']) ? $param_values['MBPTextAlign'] : '',
2498
+ 'after' => ''
2499
+ ),
2500
+ array (
2501
+ 'label' => 'Padding',
2502
+ 'name' => 'MBPPadding',
2503
+ 'type' => 'text',
2504
+ 'class' => '',
2505
+ 'value' => isset($param_values['MBPPadding']) ? $param_values['MBPPadding'] : '',
2506
+ 'after' => 'px/%'
2507
+ ),
2508
+ array (
2509
+ 'label' => 'Margin',
2510
+ 'name' => 'MBPMargin',
2511
+ 'type' => 'text',
2512
+ 'class' => '',
2513
+ 'value' => isset($param_values['MBPMargin']) ? $param_values['MBPMargin'] : '',
2514
+ 'after' => 'px/%'
2515
+ ),
2516
+ array (
2517
+ 'label' => 'Border',
2518
+ 'name' => 'MBPBorder',
2519
+ 'type' => 'checkbox',
2520
+ 'options' => $borders,
2521
+ 'class' => '',
2522
+ 'after' => ''
2523
+ ),
2524
+ array (
2525
+ 'label' => 'Border Color',
2526
+ 'name' => 'MBPBorderColor',
2527
+ 'type' => 'text',
2528
+ 'class' => 'color',
2529
+ 'value' => isset($param_values['MBPBorderColor']) ? $param_values['MBPBorderColor'] : '',
2530
+ 'after' => ''
2531
+ ),
2532
+ array (
2533
+ 'label' => 'Border Type',
2534
+ 'name' => 'MBPBorderType',
2535
+ 'type' => 'select',
2536
+ 'options' => $border_types,
2537
+ 'class' => '',
2538
+ 'value' => isset($param_values['MBPBorderType']) ? $param_values['MBPBorderType'] : '',
2539
+ 'after' => ''
2540
+ ),
2541
+ array (
2542
+ 'label' => 'Border Width',
2543
+ 'name' => 'MBPBorderWidth',
2544
+ 'type' => 'text',
2545
+ 'class' => '',
2546
+ 'value' => isset($param_values['MBPBorderWidth']) ? $param_values['MBPBorderWidth'] : '',
2547
+ 'after' => 'px'
2548
+ ),
2549
+ array (
2550
+ 'label' => 'Border Radius',
2551
+ 'name' => 'MBPBorderRadius',
2552
+ 'type' => 'text',
2553
+ 'class' => '',
2554
+ 'value' => isset($param_values['MBPBorderRadius']) ? $param_values['MBPBorderRadius'] : '',
2555
+ 'after' => 'px'
2556
+ ),
2557
+ array (
2558
+ 'label' => 'Hover Parameters',
2559
+ 'type' => 'label',
2560
+ 'class' => 'fm-mini-title',
2561
+ 'after' => '<br/>'
2562
+ ),
2563
+ array (
2564
+ 'label' => 'Background Color',
2565
+ 'name' => 'MBHPBGColor',
2566
+ 'type' => 'text',
2567
+ 'class' => 'color',
2568
+ 'value' => isset($param_values['MBHPBGColor']) ? $param_values['MBHPBGColor'] : '',
2569
+ 'after' => ''
2570
+ ),
2571
+ array (
2572
+ 'label' => 'Color',
2573
+ 'name' => 'MBHPColor',
2574
+ 'type' => 'text',
2575
+ 'class' => 'color',
2576
+ 'value' => isset($param_values['MBHPColor']) ? $param_values['MBHPColor'] : '',
2577
+ 'after' => ''
2578
+ ),
2579
+ array (
2580
+ 'label' => 'Border',
2581
+ 'name' => 'MBHPBorder',
2582
+ 'type' => 'checkbox',
2583
+ 'options' => $borders,
2584
+ 'class' => '',
2585
+ 'after' => ''
2586
+ ),
2587
+ array (
2588
+ 'label' => 'Border Color',
2589
+ 'name' => 'MBHPBorderColor',
2590
+ 'type' => 'text',
2591
+ 'class' => 'color',
2592
+ 'value' => isset($param_values['MBHPBorderColor']) ? $param_values['MBHPBorderColor'] : '',
2593
+ 'after' => ''
2594
+ ),
2595
+ array (
2596
+ 'label' => 'Border Type',
2597
+ 'name' => 'MBHPBorderType',
2598
+ 'type' => 'select',
2599
+ 'options' => $border_types,
2600
+ 'class' => '',
2601
+ 'value' => isset($param_values['MBHPBorderType']) ? $param_values['MBHPBorderType'] : '',
2602
+ 'after' => ''
2603
+ ),
2604
+ array (
2605
+ 'label' => 'Border Width',
2606
+ 'name' => 'MBHPBorderWidth',
2607
+ 'type' => 'text',
2608
+ 'class' => '',
2609
+ 'value' => isset($param_values['MBHPBorderWidth']) ? $param_values['MBHPBorderWidth'] : '',
2610
+ 'after' => 'px</div>'
2611
+ )
2612
+ ),
2613
+
2614
+ 'other' => array(
2615
+ array (
2616
+ 'label' => 'Deactive Text',
2617
+ 'type' => 'panel',
2618
+ 'class' => 'col-md-12',
2619
+ 'label_class' => 'fm-mini-title',
2620
+ 'after' => '<br/>'
2621
+ ),
2622
+ array (
2623
+ 'label' => 'Color',
2624
+ 'name' => 'OPDeInputColor',
2625
+ 'type' => 'text',
2626
+ 'class' => 'color',
2627
+ 'value' => isset($param_values['OPDeInputColor']) ? $param_values['OPDeInputColor'] : '',
2628
+ 'after' => ''
2629
+ ),
2630
+ array (
2631
+ 'label' => 'Font Style',
2632
+ 'name' => 'OPFontStyle',
2633
+ 'type' => 'text',
2634
+ 'class' => '',
2635
+ 'value' => isset($param_values['OPFontStyle']) ? $param_values['OPFontStyle'] : '',
2636
+ 'after' => ''
2637
+ ),
2638
+ array (
2639
+ 'label' => 'Required',
2640
+ 'type' => 'label',
2641
+ 'class' => 'fm-mini-title',
2642
+ 'after' => '<br/>'
2643
+ ),
2644
+ array (
2645
+ 'label' => 'Color',
2646
+ 'name' => 'OPRColor',
2647
+ 'type' => 'text',
2648
+ 'class' => 'color',
2649
+ 'value' => isset($param_values['OPRColor']) ? $param_values['OPRColor'] : '',
2650
+ 'after' => ''
2651
+ ),
2652
+ array (
2653
+ 'label' => 'Date Picker',
2654
+ 'type' => 'label',
2655
+ 'class' => 'fm-mini-title',
2656
+ 'after' => '<br/>'
2657
+ ),
2658
+ array (
2659
+ 'label' => 'Background URL',
2660
+ 'name' => 'OPDPIcon',
2661
+ 'type' => 'text',
2662
+ 'class' => '',
2663
+ 'placeholder' => '',
2664
+ 'value' => isset($param_values['OPDPIcon']) ? $param_values['OPDPIcon'] : '',
2665
+ 'after' => ''
2666
+ ),
2667
+ array (
2668
+ 'label' => 'Background Repeat',
2669
+ 'name' => 'OPDPRepeat',
2670
+ 'type' => 'select',
2671
+ 'options' => $bg_repeats,
2672
+ 'class' => '',
2673
+ 'value' => isset($param_values['OPDPRepeat']) ? $param_values['OPDPRepeat'] : '',
2674
+ 'after' => ''
2675
+ ),
2676
+ array (
2677
+ 'label' => 'Background Position',
2678
+ 'name1' => 'OPDPPos1',
2679
+ 'name2' => 'OPDPPos2',
2680
+ 'type' => '2text',
2681
+ 'class' => 'fm-2text',
2682
+ 'value1' => isset($param_values['OPDPPos1']) ? $param_values['OPDPPos1'] : '',
2683
+ 'value2' => isset($param_values['OPDPPos2']) ? $param_values['OPDPPos2'] : '',
2684
+ 'before1' => '',
2685
+ 'before2' => '',
2686
+ 'after' => '%/left..'
2687
+ ),
2688
+ array (
2689
+ 'label' => 'Margin',
2690
+ 'name' => 'OPDPMargin',
2691
+ 'type' => 'text',
2692
+ 'class' => '',
2693
+ 'value' => isset($param_values['OPDPMargin']) ? $param_values['OPDPMargin'] : '',
2694
+ 'after' => 'px/%'
2695
+ ),
2696
+ array (
2697
+ 'label' => 'File Upload',
2698
+ 'type' => 'label',
2699
+ 'class' => 'fm-mini-title',
2700
+ 'after' => '<br/>'
2701
+ ),
2702
+ array (
2703
+ 'label' => 'Background URL',
2704
+ 'name' => 'OPFBgUrl',
2705
+ 'type' => 'text',
2706
+ 'class' => '',
2707
+ 'value' => isset($param_values['OPFBgUrl']) ? $param_values['OPFBgUrl'] : '',
2708
+ 'after' => ''
2709
+ ),
2710
+ array (
2711
+ 'label' => 'Background Repeat',
2712
+ 'name' => 'OPFBGRepeat',
2713
+ 'type' => 'select',
2714
+ 'options' => $bg_repeats,
2715
+ 'class' => '',
2716
+ 'value' => isset($param_values['OPFBGRepeat']) ? $param_values['OPFBGRepeat'] : '',
2717
+ 'after' => ''
2718
+ ),
2719
+ array (
2720
+ 'label' => 'Background Position',
2721
+ 'name1' => 'OPFPos1',
2722
+ 'name2' => 'OPFPos2',
2723
+ 'type' => '2text',
2724
+ 'class' => 'fm-2text',
2725
+ 'value1' => isset($param_values['OPFPos1']) ? $param_values['OPFPos1'] : '',
2726
+ 'value2' => isset($param_values['OPFPos2']) ? $param_values['OPFPos2'] : '',
2727
+ 'before1' => '',
2728
+ 'before2' => '',
2729
+ 'after' => '%/left..'
2730
+ ),
2731
+ array (
2732
+ 'label' => 'Grading',
2733
+ 'type' => 'label',
2734
+ 'class' => 'fm-mini-title',
2735
+ 'after' => '<br/>'
2736
+ ),
2737
+ array (
2738
+ 'label' => 'Text Width',
2739
+ 'name' => 'OPGWidth',
2740
+ 'type' => 'text',
2741
+ 'class' => '',
2742
+ 'value' => isset($param_values['OPGWidth']) ? $param_values['OPGWidth'] : '',
2743
+ 'after' => 'px</div>'
2744
+ )
2745
+ ),
2746
+ 'custom_css' => array(
2747
+ array (
2748
+ 'label' => '',
2749
+ 'type' => 'panel',
2750
+ 'class' => 'col-md-12',
2751
+ 'label_class' => '',
2752
+ 'after' => ''
2753
+ ),
2754
+ array (
2755
+ 'label' => 'Custom CSS',
2756
+ 'name' => 'CUPCSS',
2757
+ 'type' => 'textarea',
2758
+ 'class' => '',
2759
+ 'value' => isset($param_values['CUPCSS']) ? $param_values['CUPCSS'] : '',
2760
+ 'after' => '</div>'
2761
+ ),
2762
+ )
2763
+ );
2764
+ $active_tab = isset($_REQUEST["active_tab"]) && $_REQUEST["active_tab"] ? $_REQUEST["active_tab"] : ($row->version == 1 ? 'custom_css' : 'global');
2765
+ $pagination = isset($_REQUEST["pagination"]) ? $_REQUEST["pagination"] : 'none';
2766
+
2767
  ?>
2768
+ <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.0/angular.min.js"></script>
2769
+
2770
+ <div ng-app="ThemeParams">
2771
+ <div ng-controller="FMTheme">
2772
+ <form id="fm-themes-form" method="post" action="admin.php?page=themes_fm">
2773
+ <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
2774
+ <div class="fm-page-header">
2775
+ <div class="fm-logo">
2776
+ </div>
2777
+ <div class="fm-page-title">
2778
+ <?php echo $page_title; ?>
2779
+ </div>
2780
+ <div class="fm-page-actions">
2781
+ <?php if ($id) { ?>
2782
+ <button class="fm-button save-as-copy-button medium" onclick="if (fm_check_required('title', 'Title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'save_as_copy');">
2783
+ <span></span>
2784
+ Save as Copy
2785
+ </button>
2786
+ <?php } ?>
2787
+ <button class="fm-button save-button medium" onclick="if (fm_check_required('title', 'Title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'save');">
2788
+ <span></span>
2789
+ Save
2790
+ </button>
2791
+ <button class="fm-button apply-button medium" onclick="if (fm_check_required('title', 'Title') || !submitbutton()) {return false;}; fm_set_input_value('task', 'apply');">
2792
+ <span></span>
2793
+ Apply
2794
+ </button>
2795
+ <button class="fm-button cancel-button medium" onclick="fm_set_input_value('task', 'cancel');">
2796
+ <span></span>
2797
+ Cancel
2798
+ </button>
2799
+ </div>
2800
+ <div class="fm-clear"></div>
2801
+ </div>
2802
+
2803
+ <input type="hidden" id="task" name="task" value=""/>
2804
+ <input type="hidden" id="params" name="params" value=""/>
2805
+ <input type="hidden" id="current_id" name="current_id" value="<?php echo $row->id; ?>"/>
2806
+ <input type="hidden" id="default" name="default" value="<?php echo $row->default; ?>"/>
2807
+ <input type="hidden" name="active_tab" id="active_tab" value="<?php echo $active_tab; ?>" />
2808
+
2809
+ <style>
2810
+ .fm-form{
2811
+ background-color:{{GPBGColor}} !important;
2812
+ font-family:{{GPFontFamily}} !important;
2813
+ width:{{AGPWidth}}% !important;
2814
+ padding:{{AGPPadding}} !important;
2815
+ margin:{{AGPMargin}} !important;
2816
+ border-radius:{{AGPBorderRadius}}px !important;
2817
+ box-shadow:{{AGPBoxShadow}} !important;
2818
+ position: relative !important;
2819
+ }
2820
+
2821
+ .fm-form-header.alignLeft,
2822
+ .fm-form-content.alignLeft{
2823
+ border-radius:{{AGPBorderRadius}}px !important;
2824
+ }
2825
+
2826
+ .fm-form.borderRight{
2827
+ border-right:{{AGPBorderWidth}}px {{AGPBorderType}} {{AGPBorderColor}} !important;
2828
+ }
2829
+
2830
+ .fm-form.borderLeft{
2831
+ border-left:{{AGPBorderWidth}}px {{AGPBorderType}} {{AGPBorderColor}} !important;
2832
+ }
2833
+
2834
+ .fm-form.borderTop{
2835
+ border-top:{{AGPBorderWidth}}px {{AGPBorderType}} {{AGPBorderColor}} !important;
2836
+ }
2837
+
2838
+ .fm-form.borderBottom{
2839
+ border-bottom:{{AGPBorderWidth}}px {{AGPBorderType}} {{AGPBorderColor}} !important;
2840
+ }
2841
+
2842
+ .fm-form-content{
2843
+ font-size:{{GPFontSize}}px !important;
2844
+ font-weight:{{GPFontWeight}} !important;
2845
+ width:{{GPWidth}}% !important;
2846
+ color:{{GPColor}} !important;
2847
+ padding:{{GPPadding}} !important;
2848
+ margin:{{GPMargin}} !important;
2849
+ border-radius:{{GPBorderRadius}}px !important;
2850
+ }
2851
+
2852
+ .fm-form-content.isBG{
2853
+ background:url(<?php echo WD_FM_URL; ?>/{{GPBackground}}) {{GPBackgroundRepeat}} {{GPBGPosition1}} {{GPBGPosition2}} !important;
2854
+ background-size: {{GPBGSize1}} {{GPPBGSize2}} !important;
2855
+ }
2856
+
2857
+ .fm-form-content.borderRight{
2858
+ border-right:{{GPBorderWidth}}px {{GPBorderType}} {{GPBorderColor}} !important;
2859
+ }
2860
+
2861
+ .fm-form-content.borderLeft{
2862
+ border-left:{{GPBorderWidth}}px {{GPBorderType}} {{GPBorderColor}} !important;
2863
+ }
2864
+
2865
+ .fm-form-content.borderTop{
2866
+ border-top:{{GPBorderWidth}}px {{GPBorderType}} {{GPBorderColor}} !important;
2867
+ }
2868
+
2869
+ .fm-form-content.borderBottom{
2870
+ border-bottom:{{GPBorderWidth}}px {{GPBorderType}} {{GPBorderColor}} !important;
2871
+ }
2872
+
2873
+ .fm-form-content label{
2874
+ font-size:{{GPFontSize}}px !important;
2875
+ }
2876
+
2877
+ .fm-form-content .fm-section{
2878
+ background-color:{{SEPBGColor}} !important;
2879
+ padding:{{SEPPadding}} !important;
2880
+ margin:{{SEPMargin}} !important;
2881
+ }
2882
+
2883
+
2884
+ .fm-form-content .fm-column{
2885
+ padding:{{COPPadding}} !important;
2886
+ margin:{{COPMargin}} !important;
2887
+ }
2888
+
2889
+ .fm-form-content input[type="text"],
2890
+ .fm-form-content select{
2891
+ font-size:{{IPFontSize}}px !important;
2892
+ font-weight:{{IPFontWeight}} !important;
2893
+ height:{{IPHeight}}px !important;
2894
+ line-height:{{IPHeight}}px !important;
2895
+ background-color:{{IPBGColor}} !important;
2896
+ color:{{IPColor}} !important;
2897
+ padding:{{IPPadding}} !important;
2898
+ margin:{{IPMargin}} !important;
2899
+ border-radius:{{IPBorderRadius}}px !important;
2900
+ box-shadow:{{IPBoxShadow}} !important;
2901
+ border:none !important;
2902
+ }
2903
+
2904
+ .fm-form-content input[type="text"].borderRight,
2905
+ .fm-form-content select.borderRight{
2906
+ border-right:{{IPBorderWidth}}px {{IPBorderType}} {{IPBorderColor}} !important;
2907
+ }
2908
+
2909
+ .fm-form-content input[type="text"].borderLeft,
2910
+ .fm-form-content select.borderLeft{
2911
+ border-left:{{IPBorderWidth}}px {{IPBorderType}} {{IPBorderColor}} !important;
2912
+ }
2913
+
2914
+ .fm-form-content input[type="text"].borderTop,
2915
+ .fm-form-content select.borderTop{
2916
+ border-top:{{IPBorderWidth}}px {{IPBorderType}} {{IPBorderColor}} !important;
2917
+ }
2918
+
2919
+ .fm-form-content input[type="text"].borderBottom,
2920
+ .fm-form-content select.borderBottom{
2921
+ border-bottom:{{IPBorderWidth}}px {{IPBorderType}} {{IPBorderColor}} !important;
2922
+ }
2923
+
2924
+ .fm-form-content select{
2925
+ appearance: {{SBPAppearance}} !important;
2926
+ -moz-appearance: {{SBPAppearance}} !important;
2927
+ -webkit-appearance: {{SBPAppearance}} !important;
2928
+ background:{{IPBGColor}} !important;
2929
+ }
2930
+
2931
+ .fm-form-content select.isBG{
2932
+ background:{{IPBGColor}} url(<?php echo WD_FM_URL; ?>/{{SBPBackground}}) {{SBPBGRepeat}} {{SBPBGPos1}} {{SBPBGPos2}} !important;
2933
+ background-size: {{SBPBGSize1}} {{SBPBGSize2}} !important;
2934
+ }
2935
+
2936
+ .fm-form-example label.mini_label{
2937
+ font-size:{{GPMLFontSize}}px !important;
2938
+ font-weight:{{GPMLFontWeight}} !important;
2939
+ color:{{GPMLColor}} !important;
2940
+ padding:{{GPMLPadding}} !important;
2941
+ margin:{{GPMLMargin}} !important;
2942
+ width: initial !important;
2943
+ }
2944
+
2945
+ .fm-button-reset {
2946
+ background-color:{{BPBGColor}} !important;
2947
+ color:{{BPColor}} !important;
2948
+ height:{{BPHeight}}px !important;
2949
+ width:{{BPWidth}}px !important;
2950
+ margin:{{BPMargin}} !important;
2951
+ padding:{{BPPadding}} !important;
2952
+ box-shadow:{{BPBoxShadow}} !important;
2953
+ border-radius:{{BPBorderRadius}}px !important;
2954
+ outline: none !important;
2955
+ border: none !important;
2956
+ }
2957
+
2958
+ .fm-button-reset.borderRight {
2959
+ border-right:{{BPBorderWidth}}px {{BPBorderType}} {{BPBorderColor}} !important;
2960
+ }
2961
+
2962
+ .fm-button-reset.borderLeft {
2963
+ border-left:{{BPBorderWidth}}px {{BPBorderType}} {{BPBorderColor}} !important;
2964
+ }
2965
+
2966
+ .fm-button-reset.borderTop {
2967
+ border-top:{{BPBorderWidth}}px {{BPBorderType}} {{BPBorderColor}} !important;
2968
+ }
2969
+
2970
+ .fm-button-reset.borderBottom {
2971
+ border-bottom:{{BPBorderWidth}}px {{BPBorderType}} {{BPBorderColor}} !important;
2972
+ }
2973
+
2974
+ .fm-button-reset:hover {
2975
+ background-color:{{BHPBGColor}} !important;
2976
+ color:{{BHPColor}} !important;
2977
+ outline: none;
2978
+ border: none !important;
2979
+ }
2980
+
2981
+ .fm-button-reset.borderHoverRight:hover {
2982
+ border-right:{{BHPBorderWidth}}px {{BHPBorderType}} {{BHPBorderColor}} !important;
2983
+ }
2984
+
2985
+ .fm-button-reset.borderHoverLeft:hover {
2986
+ border-left:{{BHPBorderWidth}}px {{BHPBorderType}} {{BHPBorderColor}} !important;
2987
+ }
2988
+
2989
+ .fm-button-reset.borderHoverTop:hover {
2990
+ border-top:{{BHPBorderWidth}}px {{BHPBorderType}} {{BHPBorderColor}} !important;
2991
+ }
2992
+
2993
+ .fm-button-reset.borderHoverBottom:hover {
2994
+ border-bottom:{{BHPBorderWidth}}px {{BHPBorderType}} {{BHPBorderColor}} !important;
2995
+ }
2996
+
2997
+ .fm-form-content button,
2998
+ .fm-wdform-page-button{
2999
+ font-size: {{BPFontSize}}px !important;
3000
+ font-weight: {{BPFontWeight}} !important;
3001
+ }
3002
+
3003
+ .fm-previous-page .fm-wdform-page-button{
3004
+ background-color:{{PBPBGColor}} !important;
3005
+ color:{{PBPColor}} !important;
3006
+ height:{{PBPHeight}}px !important;
3007
+ line-height:{{PBPLineHeight}}px !important;
3008
+ width:{{PBPWidth}}px !important;
3009
+ margin:{{PBPMargin}} !important;
3010
+ padding:{{PBPPadding}} !important;
3011
+ border-radius:{{PBPBorderRadius}}px !important;
3012
+ box-shadow:{{PBPBoxShadow}} !important;
3013
+ outline: none !important;
3014
+ }
3015
+
3016
+ .fm-previous-page .fm-wdform-page-button.borderRight {
3017
+ border-right:{{PBPBorderWidth}}px {{PBPBorderType}} {{PBPBorderColor}} !important;
3018
+ }
3019
+
3020
+ .fm-previous-page .fm-wdform-page-button.borderLeft {
3021
+ border-left:{{PBPBorderWidth}}px {{PBPBorderType}} {{PBPBorderColor}} !important;
3022
+ }
3023
+
3024
+ .fm-previous-page .fm-wdform-page-button.borderTop {
3025
+ border-top:{{PBPBorderWidth}}px {{PBPBorderType}} {{PBPBorderColor}} !important;
3026
+ }
3027
+
3028
+ .fm-previous-page .fm-wdform-page-button.borderBottom {
3029
+ border-bottom:{{PBPBorderWidth}}px {{PBPBorderType}} {{PBPBorderColor}} !important;
3030
+ }
3031
+
3032
+ .fm-previous-page .fm-wdform-page-button:hover {
3033
+ background-color:{{PBHPBGColor}} !important;
3034
+ color:{{PBHPColor}} !important;
3035
+ }
3036
+
3037
+ .fm-previous-page .fm-wdform-page-button.borderHoverRight:hover {
3038
+ border-right:{{PBHPBorderWidth}}px {{PBHPBorderType}} {{PBHPBorderColor}} !important;
3039
+ }
3040
+
3041
+ .fm-previous-page .fm-wdform-page-button.borderHoverLeft:hover {
3042
+ border-left:{{PBHPBorderWidth}}px {{PBHPBorderType}} {{PBHPBorderColor}} !important;
3043
+ }
3044
+
3045
+ .fm-previous-page .fm-wdform-page-button.borderHoverTop:hover {
3046
+ border-top:{{PBHPBorderWidth}}px {{PBHPBorderType}} {{PBHPBorderColor}} !important;
3047
+ }
3048
+
3049
+ .fm-previous-page .fm-wdform-page-button.borderHoverBottom:hover {
3050
+ border-bottom:{{PBHPBorderWidth}}px {{PBHPBorderType}} {{PBHPBorderColor}} !important;
3051
+ }
3052
+
3053
+
3054
+ .fm-next-page .fm-wdform-page-button{
3055
+ background-color:{{NBPBGColor}} !important;
3056
+ color:{{NBPColor}} !important;
3057
+ height:{{NBPHeight}}px !important;
3058
+ line-height:{{NBPLineHeight}}px !important;
3059
+ width:{{NBPWidth}}px !important;
3060
+ margin:{{NBPMargin}} !important;
3061
+ padding:{{NBPPadding}} !important;
3062
+ border-radius:{{NBPBorderRadius}}px !important;
3063
+ box-shadow:{{NBPBoxShadow}} !important;
3064
+ }
3065
+
3066
+ .fm-next-page .fm-wdform-page-button.borderRight {
3067
+ border-right:{{NBPBorderWidth}}px {{NBPBorderType}} {{NBPBorderColor}} !important;
3068
+ }
3069
+
3070
+ .fm-next-page .fm-wdform-page-button.borderLeft {
3071
+ border-left:{{NBPBorderWidth}}px {{NBPBorderType}} {{NBPBorderColor}} !important;
3072
+ }
3073
+
3074
+ .fm-next-page .fm-wdform-page-button.borderTop {
3075
+ border-top:{{NBPBorderWidth}}px {{NBPBorderType}} {{NBPBorderColor}} !important;
3076
+ }
3077
+
3078
+ .fm-next-page .fm-wdform-page-button.borderBottom {
3079
+ border-bottom:{{NBPBorderWidth}}px {{NBPBorderType}} {{NBPBorderColor}} !important;
3080
+ }
3081
+
3082
+ .fm-next-page .fm-wdform-page-button:hover {
3083
+ background-color:{{NBHPBGColor}} !important;
3084
+ color:{{NBHPColor}} !important;
3085
+ outline: none !important;
3086
+ }
3087
+
3088
+ .fm-next-page .fm-wdform-page-button.borderHoverRight:hover {
3089
+ border-right:{{NBHPBorderWidth}}px {{NBHPBorderType}} {{NBHPBorderColor}} !important;
3090
+ }
3091
+
3092
+ .fm-next-page .fm-wdform-page-button.borderHoverLeft:hover {
3093
+ border-left:{{NBHPBorderWidth}}px {{NBHPBorderType}} {{NBHPBorderColor}} !important;
3094
+ }
3095
+
3096
+ .fm-next-page .fm-wdform-page-button.borderHoverTop:hover {
3097
+ border-top:{{NBHPBorderWidth}}px {{NBHPBorderType}} {{NBHPBorderColor}} !important;
3098
+ }
3099
+
3100
+ .fm-next-page .fm-wdform-page-button.borderHoverBottom:hover {
3101
+ border-bottom:{{NBHPBorderWidth}}px {{NBHPBorderType}} {{NBHPBorderColor}} !important;
3102
+ }
3103
+
3104
+ .fm-button-subscribe {
3105
+ background-color:{{SPBGColor}} !important;
3106
+ font-size:{{SPFontSize}}px !important;
3107
+ font-weight:{{SPFontWeight}} !important;
3108
+ color:{{SPColor}} !important;
3109
+ height:{{SPHeight}}px !important;
3110
+ width:{{SPWidth}}px !important;
3111
+ margin:{{SPMargin}} !important;
3112
+ padding:{{SPPadding}} !important;
3113
+ box-shadow:{{SPBoxShadow}} !important;
3114
+ border-radius: {{SPBorderRadius}}px !important;
3115
+ outline: none !important;
3116
+ border: none !important;
3117
+ }
3118
+
3119
+ .fm-button-subscribe.borderRight {
3120
+ border-right:{{SPBorderWidth}}px {{SPBorderType}} {{SPBorderColor}} !important;
3121
+ }
3122
+
3123
+ .fm-button-subscribe.borderLeft {
3124
+ border-left:{{SPBorderWidth}}px {{SPBorderType}} {{SPBorderColor}} !important;
3125
+ }
3126
+
3127
+ .fm-button-subscribe.borderTop {
3128
+ border-top:{{SPBorderWidth}}px {{SPBorderType}} {{SPBorderColor}} !important;
3129
+ }
3130
+
3131
+ .fm-button-subscribe.borderBottom {
3132
+ border-bottom:{{SPBorderWidth}}px {{SPBorderType}} {{SPBorderColor}} !important;
3133
+ }
3134
+
3135
+ .fm-button-subscribe:hover {
3136
+ background-color:{{SHPBGColor}} !important;
3137
+ color:{{SHPColor}} !important;
3138
+ outline: none !important;
3139
+ border: none !important;
3140
+ }
3141
+
3142
+ .fm-button-subscribe.borderHoverRight:hover {
3143
+ border-right:{{SHPBorderWidth}}px {{SHPBorderType}} {{SHPBorderColor}} !important;
3144
+ }
3145
+
3146
+ .fm-button-subscribe.borderHoverLeft:hover {
3147
+ border-left:{{SHPBorderWidth}}px {{SHPBorderType}} {{SHPBorderColor}} !important;
3148
+ }
3149
+
3150
+ .fm-button-subscribe.borderHoverTop:hover {
3151
+ border-top:{{SHPBorderWidth}}px {{SHPBorderType}} {{SHPBorderColor}} !important;
3152
+ }
3153
+
3154
+ .fm-button-subscribe.borderHoverBottom:hover {
3155
+ border-bottom:{{SHPBorderWidth}}px {{SHPBorderType}} {{SHPBorderColor}} !important;
3156
+ }
3157
+
3158
+ .radio-div label span {
3159
+ height:{{SCPHeight}}px !important;
3160
+ width:{{SCPWidth}}px !important;
3161
+ background-color:{{SCPBGColor}} !important;
3162
+ margin:{{SCPMargin}} !important;
3163
+ box-shadow:{{SCPBoxShadow}} !important;
3164
+ border-radius: {{SCPBorderRadius}}px !important;
3165
+ border: none !important;
3166
+ display: inline-block !important;
3167
+ vertical-align: middle !important;
3168
+ box-sizing: content-box !important;
3169
+ }
3170
+
3171
+ .radio-div input[type='radio']:checked + label span:after {
3172
+ content: '';
3173
+ width:{{SCCPWidth}}px !important;
3174
+ height:{{SCCPHeight}}px !important;
3175
+ background:{{SCCPBGColor}} !important;
3176
+ border-radius:{{SCCPBorderRadius}}px !important;
3177
+ margin:{{SCCPMargin}}px !important;
3178
+ display: block !important;
3179
+ }
3180
+
3181
+ .radio-div label span.borderRight {
3182
+ border-right:{{SCPBorderWidth}}px {{SCPBorderType}} {{SCPBorderColor}} !important;
3183
+ }
3184
+
3185
+ .radio-div label span.borderLeft {
3186
+ border-left:{{SCPBorderWidth}}px {{SCPBorderType}} {{SCPBorderColor}} !important;
3187
+ }
3188
+
3189
+ .radio-div label span.borderTop {
3190
+ border-top:{{SCPBorderWidth}}px {{SCPBorderType}} {{SCPBorderColor}} !important;
3191
+ }
3192
+
3193
+ .radio-div label span.borderBottom {
3194
+ border-bottom:{{SCPBorderWidth}}px {{SCPBorderType}} {{SCPBorderColor}} !important;
3195
+ }
3196
+
3197
+ .checkbox-div label span {
3198
+ height:{{MCPHeight}}px !important;
3199
+ width:{{MCPWidth}}px !important;
3200
+ background-color:{{MCPBGColor}} !important;
3201
+ margin:{{MCPMargin}} !important;
3202
+ box-shadow:{{MCPBoxShadow}} !important;
3203
+ border-radius: {{MCPBorderRadius}}px !important;
3204
+ border: none !important;
3205
+ display: inline-block !important;
3206
+ vertical-align: middle !important;
3207
+ box-sizing: content-box !important;
3208
+ }
3209
+
3210
+ .checkbox-div input[type='checkbox']:checked + label span:after {
3211
+ content: '';
3212
+ width:{{MCCPWidth}}px !important;
3213
+ height:{{MCCPHeight}}px !important;
3214
+ border-radius:{{MCCPBorderRadius}}px !important;
3215
+ margin:{{MCCPMargin}}px !important;
3216
+ display: block !important;
3217
+ background:{{MCCPBGColor}} !important;
3218
+ }
3219
+
3220
+ .checkbox-div.isBG input[type='checkbox']:checked + label span:after{
3221
+ background:{{MCCPBGColor}} url(<?php echo WD_FM_URL; ?>/{{MCCPBackground}}) {{MCCPBGRepeat}} {{MCCPBGPos1}} {{MCCPBGPos2}} !important;
3222
+ }
3223
+
3224
+ .checkbox-div label span.borderRight {
3225
+ border-right:{{MCPBorderWidth}}px {{MCPBorderType}} {{MCPBorderColor}} !important;
3226
+ }
3227
+
3228
+ .checkbox-div label span.borderLeft {
3229
+ border-left:{{MCPBorderWidth}}px {{MCPBorderType}} {{MCPBorderColor}} !important;
3230
+ }
3231
+
3232
+ .checkbox-div label span.borderTop {
3233
+ border-top:{{MCPBorderWidth}}px {{MCPBorderType}} {{MCPBorderColor}} !important;
3234
+ }
3235
+
3236
+ .checkbox-div label span.borderBottom {
3237
+ border-bottom:{{MCPBorderWidth}}px {{MCPBorderType}} {{MCPBorderColor}} !important;
3238
+ }
3239
+
3240
+ .fm-form-pagination {
3241
+ width:{{AGPWidth}}% !important;
3242
+ margin:{{AGPMargin}} !important;
3243
+ }
3244
+
3245
+ .fm-footer{
3246
+ font-size:{{GPFontSize}}px !important;
3247
+ font-weight:{{GPFontWeight}} !important;
3248
+ width:{{FPWidth}}% !important;
3249
+ padding:{{FPPadding}} !important;
3250
+ margin:{{FPMargin}} !important;
3251
+ color:{{GPColor}} !important;
3252
+ clear: both !important;
3253
+ }
3254
+
3255
+ .fm-pages-steps{
3256
+ text-align: {{PSAPAlign}} !important;
3257
+ }
3258
+
3259
+ .active-step{
3260
+ background-color: {{PSAPBGColor}} !important;
3261
+ font-size: {{PSAPFontSize}}px !important;
3262
+ font-weight: {{PSAPFontWeight}} !important;
3263
+ color: {{PSAPColor}} !important;
3264
+ width: {{PSAPWidth}}px !important;
3265
+ height: {{PSAPHeight}}px !important;
3266
+ line-height: {{PSAPLineHeight}}px !important;
3267
+ margin: {{PSAPMargin}} !important;
3268
+ padding: {{PSAPPadding}} !important;
3269
+ border-radius: {{PSAPBorderRadius}}px !important;
3270
+
3271
+ text-align: center !important;
3272
+ display: inline-block !important;
3273
+ cursor: pointer !important;
3274
+ }
3275
+
3276
+ .active-step.borderRight {
3277
+ border-right:{{PSAPBorderWidth}}px {{PSAPBorderType}} {{PSAPBorderColor}} !important;
3278
+ }
3279
+
3280
+ .active-step.borderLeft {
3281
+ border-left:{{PSAPBorderWidth}}px {{PSAPBorderType}} {{PSAPBorderColor}} !important;
3282
+ }
3283
+
3284
+ .active-step.borderTop {
3285
+ border-top:{{PSAPBorderWidth}}px {{PSAPBorderType}} {{PSAPBorderColor}} !important;
3286
+ }
3287
+
3288
+ .active-step.borderBottom {
3289
+ border-bottom:{{PSAPBorderWidth}}px {{PSAPBorderType}} {{PSAPBorderColor}} !important;
3290
+ }
3291
+
3292
+ .deactive-step{
3293
+ background-color: {{PSDPBGColor}} !important;
3294
+ font-size: {{PSDPFontSize}}px !important;
3295
+ font-weight: {{PSDPFontWeight}} !important;
3296
+ color: {{PSDPColor}} !important;
3297
+ width: {{PSAPWidth}}px !important;
3298
+ height: {{PSDPHeight}}px !important;
3299
+ line-height: {{PSDPLineHeight}}px !important;
3300
+ margin: {{PSDPMargin}} !important;
3301
+ padding: {{PSDPPadding}} !important;
3302
+ border-radius: {{PSDPBorderRadius}}px !important;
3303
+
3304
+ text-align: center !important;
3305
+ display: inline-block !important;
3306
+ cursor: pointer !important;
3307
+ }
3308
+
3309
+ .deactive-step.borderRight {
3310
+ border-right:{{PSDPBorderWidth}}px {{PSDPBorderType}} {{PSDPBorderColor}} !important;
3311
+ }
3312
+
3313
+ .deactive-step.borderLeft {
3314
+ border-left:{{PSDPBorderWidth}}px {{PSDPBorderType}} {{PSDPBorderColor}} !important;
3315
+ }
3316
+
3317
+ .deactive-step.borderTop {
3318
+ border-top:{{PSDPBorderWidth}}px {{PSDPBorderType}} {{PSDPBorderColor}} !important;
3319
+ }
3320
+
3321
+ .deactive-step.borderBottom {
3322
+ border-bottom:{{PSDPBorderWidth}}px {{PSDPBorderType}} {{PSDPBorderColor}} !important;
3323
+ }
3324
+
3325
+ .active-percentage {
3326
+ background-color: {{PSAPBGColor}} !important;
3327
+ font-size: {{PSAPFontSize}}px !important;
3328
+ font-weight: {{PSAPFontWeight}} !important;
3329
+ color: {{PSAPColor}} !important;
3330
+ width: {{PSAPWidth}}px !important;
3331
+ height: {{PSAPHeight}}px !important;
3332
+ line-height: {{PSAPLineHeight}}px !important;
3333
+ margin: {{PSAPMargin}} !important;
3334
+ padding: {{PSAPPadding}} !important;
3335
+ border-radius: {{PSAPBorderRadius}}px !important;
3336
+
3337
+ display: inline-block !important;
3338
+ }
3339
+
3340
+ .active-percentage.borderRight {
3341
+ border-right:{{PSAPBorderWidth}}px {{PSAPBorderType}} {{PSAPBorderColor}} !important;
3342
+ }
3343
+
3344
+ .active-percentage.borderLeft {
3345
+ border-left:{{PSAPBorderWidth}}px {{PSAPBorderType}} {{PSAPBorderColor}} !important;
3346
+ }
3347
+
3348
+ .active-percentage.borderTop {
3349
+ border-top:{{PSAPBorderWidth}}px {{PSAPBorderType}} {{PSAPBorderColor}} !important;
3350
+ }
3351
+
3352
+ .active-percentage.borderBottom {
3353
+ border-bottom:{{PSAPBorderWidth}}px {{PSAPBorderType}} {{PSAPBorderColor}} !important;
3354
+ }
3355
+
3356
+ .deactive-percentage {
3357
+ background-color: {{PSDPBGColor}} !important;
3358
+ font-size: {{PSDPFontSize}}px !important;
3359
+ font-weight: {{PSDPFontWeight}} !important;
3360
+ color: {{PSDPColor}} !important;
3361
+ width: {{PPAPWidth}} !important;
3362
+ height: {{PSDPHeight}}px !important;
3363
+ line-height: {{PSDPLineHeight}}px !important;
3364
+ margin: {{PSDPMargin}} !important;
3365
+ padding: {{PSDPPadding}} !important;
3366
+ border-radius: {{PSDPBorderRadius}}px !important;
3367
+
3368
+ display: inline-block !important;
3369
+ }
3370
+
3371
+ .deactive-percentage.borderRight {
3372
+ border-right:{{PSDPBorderWidth}}px {{PSDPBorderType}} {{PSDPBorderColor}} !important;
3373
+ }
3374
+
3375
+ .deactive-percentage.borderLeft {
3376
+ border-left:{{PSDPBorderWidth}}px {{PSDPBorderType}} {{PSDPBorderColor}} !important;
3377
+ }
3378
+
3379
+ .deactive-percentage.borderTop {
3380
+ border-top:{{PSDPBorderWidth}}px {{PSDPBorderType}} {{PSDPBorderColor}} !important;
3381
+ }
3382
+
3383
+ .deactive-percentage.borderBottom {
3384
+ border-bottom:{{PSDPBorderWidth}}px {{PSDPBorderType}} {{PSDPBorderColor}} !important;
3385
+ }
3386
+
3387
+ .fm-close-icon {
3388
+ color: {{CBPColor}} !important;
3389
+ font-size: {{CBPFontSize}}px !important;
3390
+ font-weight: {{CBPFontWeight}} !important;
3391
+ text-align: center !important;
3392
+ }
3393
+
3394
+ .fm-close {
3395
+ position: {{CBPPosition}} !important;
3396
+ top: {{CBPTop}} !important;
3397
+ right: {{CBPRight}} !important;
3398
+ bottom: {{CBPBottom}} !important;
3399
+ left: {{CBPLeft}} !important;
3400
+ background-color: {{CBPBGColor}} !important;
3401
+ padding: {{CBPPadding}} !important;
3402
+ margin: {{CBPMargin}} !important;
3403
+ border-radius: {{CBPBorderRadius}}px !important;
3404
+ border: none !important;
3405
+ cursor: pointer !important;
3406
+ }
3407
+
3408
+ .fm-close.borderRight{
3409
+ border-right:{{CBPBorderWidth}}px {{CBPBorderType}} {{CBPBorderColor}} !important;
3410
+ }
3411
+
3412
+ .fm-close.borderLeft{
3413
+ border-left:{{CBPBorderWidth}}px {{CBPBorderType}} {{CBPBorderColor}} !important;
3414
+ }
3415
+
3416
+ .fm-close.borderTop{
3417
+ border-top:{{CBPBorderWidth}}px {{CBPBorderType}} {{CBPBorderColor}} !important;
3418
+ }
3419
+
3420
+ .fm-close.borderBottom {
3421
+ border-bottom:{{CBPBorderWidth}}px {{CBPBorderType}} {{CBPBorderColor}} !important;
3422
+ }
3423
+
3424
+ .fm-close:hover{
3425
+ background-color:{{CBHPBGColor}} !important;
3426
+ color:{{CBHPColor}} !important;
3427
+ outline: none !important;
3428
+ border: none !important;
3429
+ }
3430
+
3431
+ .fm-close.borderHoverRight:hover {
3432
+ border-right:{{CBHPBorderWidth}}px {{CBHPBorderType}} {{CBHPBorderColor}} !important;
3433
+ }
3434
+
3435
+ .fm-close.borderHoverLeft:hover {
3436
+ border-left:{{CBHPBorderWidth}}px {{CBHPBorderType}} {{CBHPBorderColor}} !important;
3437
+ }
3438
+
3439
+ .fm-close.borderHoverTop:hover{
3440
+ border-top:{{CBHPBorderWidth}}px {{CBHPBorderType}} {{CBHPBorderColor}} !important;
3441
+ }
3442
+
3443
+ .fm-close.borderHoverBottom:hover {
3444
+ border-bottom:{{CBHPBorderWidth}}px {{CBHPBorderType}} {{CBHPBorderColor}} !important;
3445
+ }
3446
+
3447
+ .fm-form-header {
3448
+ background-color:{{HPBGColor}} !important;
3449
+ width:{{HPWidth}}% !important;
3450
+ padding:{{HPPadding}} !important;
3451
+ margin:{{HPMargin}} !important;
3452
+ border-radius:{{HPBorderRadius}}px !important;
3453
+ }
3454
+
3455
+ .fm-form-header .htitle {
3456
+ font-size:{{HTPFontSize}}px !important;
3457
+ color:{{HTPColor}} !important;
3458
+ text-align:{{HPTextAlign}} !important;
3459
+ padding: 10px 0 !important;
3460
+ line-height:{{HTPFontSize}}px !important;
3461
+ font-weight:{{HTPWeight}} !important;
3462
+
3463
+ }
3464
+
3465
+ .fm-form-header .himage img {
3466
+ width:{{HIPWidth}}px !important;
3467
+ height:{{HIPHeight}}px !important;
3468
+ }
3469
+
3470
+ .fm-form-header .himage.imageTop,
3471
+ .fm-form-header .himage.imageBottom{
3472
+ text-align:{{HPTextAlign}} !important;
3473
+ }
3474
+
3475
+
3476
+ .fm-form-header .hdescription {
3477
+ font-size:{{HDPFontSize}}px !important;
3478
+ color:{{HDPColor}} !important;
3479
+ text-align:{{HPTextAlign}} !important;
3480
+ padding: 5px 0 !important;
3481
+ }
3482
+
3483
+ .fm-form-header.borderRight{
3484
+ border-right:{{HPBorderWidth}}px {{HPBorderType}} {{HPBorderColor}} !important;
3485
+ }
3486
+
3487
+ .fm-form-header.borderLeft{
3488
+ border-left:{{HPBorderWidth}}px {{HPBorderType}} {{HPBorderColor}} !important;
3489
+ }
3490
+
3491
+ .fm-form-header.borderTop{
3492
+ border-top:{{HPBorderWidth}}px {{HPBorderType}} {{HPBorderColor}} !important;
3493
+ }
3494
+
3495
+ .fm-form-header.borderBottom{
3496
+ border-bottom:{{HPBorderWidth}}px {{HPBorderType}} {{HPBorderColor}} !important;
3497
+ }
3498
+
3499
+ .fm-form-header.alignLeft,
3500
+ .fm-form-content.alignLeft {
3501
+ display: table-cell !important;
3502
+ vertical-align:middle !important;
3503
+ }
3504
+
3505
+ .wdform-required {
3506
+ color: {{OPRColor}} !important;
3507
+ }
3508
+
3509
+ .fm-calendar-button {
3510
+ position: relative !important;
3511
+ }
3512
+
3513
+ .fm-calendar-button span{
3514
+ position: absolute !important;
3515
+ padding: 10px !important;
3516
+ pointer-events: none !important;
3517
+ right: 3px !important;
3518
+ top: 0px !important;
3519
+
3520
+ width: 20px !important;
3521
+ height: 20px !important;
3522
+ margin: {{OPDPMargin}} !important;
3523
+ background: url(<?php echo WD_FM_URL; ?>/{{OPDPIcon}}) {{OPDPRepeat}} {{OPDPPos1}} {{OPDPPos2}} !important;
3524
+ }
3525
+
3526
+ .subscribe-reset {
3527
+ float: {{SPAlign}} !important;
3528
+ margin-right:-15px !important;
3529
+ }
3530
+ </style>
3531
+
3532
+ <div class="fm-themes fm-mailchimp container-fluid">
3533
+ <div class="row">
3534
+ <div class="col-md-6 col-sm-5">
3535
+ <div class="fm-sidebar">
3536
+ <div class="fm-row">
3537
+ <label>Theme title: </label>
3538
+ <input type="text" id="title" name="title" value="<?php echo $row->title; ?>"/>
3539
+ </div>
3540
+ <br />
3541
+ </div>
3542
+ <br />
3543
+ <div class="fm-themes-tabs col-md-12">
3544
+ <ul>
3545
+ <?php
3546
+ foreach($tabs as $tkey => $tab) {
3547
+ $active_class = $active_tab == $tkey ? "fm-theme-active-tab" : "";
3548
+ echo '<li><a id="'.$tkey.'" href="#" class="'.$active_class . ($row->version == 1 && $tkey != 'custom_css' ? ' fm-disabled' : '') . '">'.$tab.'</a></li>';
3549
+ }
3550
+ ?>
3551
+ </ul>
3552
+ <div class="fm-clear"></div>
3553
+ <div class="fm-themes-tabs-container">
3554
+ <?php
3555
+ $k = 0;
3556
+ foreach($all_params as $pkey => $params) {
3557
+ $show_hide_class = $active_tab == $pkey ? '' : 'fm-hide';
3558
+ echo '<div id="'.$pkey.'-content" class="fm-themes-container '.$show_hide_class.'">';
3559
+ if ($row->version == 1 && $pkey == 'custom_css') {
3560
+ echo '<div class="wd_error"><p>This theme is outdated. Theme Options are only available in new themes provided by Form Maker.
3561
+ You can use Custom CSS panel to edit form styling, or alternatively select a new theme for your form.</p></div>';
3562
+ }
3563
+ foreach($params as $param){
3564
+ if($param["type"] == 'panel') {
3565
+ echo '<div class="'.$param["class"].'">';
3566
+ }
3567
+ if($param["type"] != 'panel' || ($param["type"] == 'panel' && $param["label"]) )
3568
+ echo '<div class="fm-row">';
3569
+ if($param["type"] == 'panel' && $param["label"]) {
3570
+ echo '<label class="'.$param["label_class"].'" >'.$param["label"].'</label>'.$param["after"];
3571
+ } else {
3572
+ if($param["type"] == 'text') {
3573
+ echo '<label>'.$param["label"].'</label>
3574
+ <input type="'.$param["type"].'" name="'.$param["name"].'" class="'.$param["class"].'" ng-model="'.$param["name"].'" ng-init="'.$param["name"].'=\''.$param["value"].'\'" value="'.$param["value"].'" placeholder="'.(isset($param["placeholder"]) ? $param["placeholder"] : "").'" />'.$param["after"];
3575
+ }
3576
+ else {
3577
+ if($param["type"] == '2text') {
3578
+ echo '<label>'.$param["label"].'</label>
3579
+ <div class="'.$param["class"].'" style="display:inline-block; vertical-align: middle;">
3580
+ <div style="display:table-row;">
3581
+ <span style="display:table-cell;">'.$param["before1"].'</span><input type="text" name="'.$param["name1"].'" ng-model="'.$param["name1"].'" ng-init="'.$param["name1"].'=\''.$param["value1"].'\'" value="'.$param["value1"].'" placeholder="'.(isset($param["placeholder"]) ? $param["placeholder"] : "").'" style="display:table-cell; "/>'.$param["after"].'
3582
+ </div>
3583
+ <div style="display:table-row;">
3584
+ <span style="display:table-cell;">'.$param["before2"].'</span><input type="text" name="'.$param["name2"].'" class="'.$param["class"].'" ng-model="'.$param["name2"].'" ng-init="'.$param["name2"].'=\''.$param["value2"].'\'" value="'.$param["value2"].'" placeholder="'.(isset($param["placeholder"]) ? $param["placeholder"] : "").'" style="display:table-cell; "/>'.$param["after"].'
3585
+ </div>
3586
+ </div>
3587
+ ';
3588
+
3589
+ }
3590
+ else {
3591
+ if($param["type"] == 'select') {
3592
+ echo '<label>'.$param["label"].'</label>
3593
+ <select name="'.$param["name"].'" ng-model="'.$param["name"].'" ng-init="'.$param["name"].'=\''.$param["value"].'\'">';
3594
+ foreach($param["options"] as $option_key => $option) {
3595
+ echo '<option value="'.$option_key.'">'.$option.'</option>';
3596
+ }
3597
+ echo '</select>'.$param["after"];
3598
+ } else {
3599
+ if($param["type"] == 'label') {
3600
+ echo '<label class="'.$param["class"].'" >'.$param["label"].'</label>'.$param["after"];
3601
+ } else {
3602
+ if($param["type"] == 'checkbox') {
3603
+ echo '<label>'.$param["label"].'</label>
3604
+ <div class="fm-btn-group">';
3605
+ foreach($param["options"] as $op_key => $option){
3606
+ $init = isset($param_values[$param["name"].ucfirst($op_key)]) ? 'true' : 'false';
3607
+ echo '<div class="fm-ch-button">
3608
+ <input type="checkbox" id="'.$param["name"].ucfirst($op_key).'" name="'.$param["name"].ucfirst($op_key).'" value="'.$op_key.'" ng-model="'.$param["name"].ucfirst($op_key).'" ng-checked="'.$param["name"].ucfirst($op_key).'" ng-init="'.$param["name"].ucfirst($op_key).'='.$init.'"><label for="'.$param["name"].ucfirst($op_key).'">'.$option.'</label>
3609
+ </div>';
3610
+ }
3611
+ echo '</div>';
3612
+
3613
+ } else{
3614
+ if($param["type"] == 'hidden') {
3615
+ echo '<input type="'.$param["type"].'" />'.$param["after"];
3616
+ } else {
3617
+ if($param["type"] == 'textarea') {
3618
+ echo '<label>'.$param["label"].'</label>
3619
+ <textarea name="'.$param["name"].'" rows="5" columns="10" style="vertical-align:middle;">'.$param["value"].'</textarea>';
3620
+ }
3621
+ }
3622
+
3623
+ }
3624
+ }
3625
+ }
3626
+ }
3627
+ }
3628
+ }
3629
+ if($param["type"] != 'panel' || ($param["type"] == 'panel' && $param["label"]) )
3630
+ echo '</div>';
3631
+ }
3632
+ echo '</div>';
3633
+ } ?>
3634
+ </div>
3635
+ </div>
3636
+ </div>
3637
+ </div>
3638
+ <div class="fm-preview-form col-md-6 col-sm-7" style="display:none;">
3639
+ <div class="form-example-preview fm-sidebar col-md-12">
3640
+ <p>Preview</p>
3641
+ <div class="fm-row">
3642
+ <label>Pagination Type: </label>
3643
+ <div class="pagination-type" ng-init="pagination='<?php echo $pagination; ?>'">
3644
+ <input type="radio" id="step" name="pagination-type" value="step" ng-model="pagination"/>
3645
+ <label for="step">Step</label>
3646
+ <input type="radio" id="percentage" name="pagination-type" value="percentage" ng-model="pagination" />
3647
+ <label for="percentage">Percentage</label>
3648
+ <input type="radio" id="none" name="pagination-type" value="none" ng-model="pagination" />
3649
+ <label for="none">None</label>
3650
+ </div>
3651
+ </div>
3652
+ </div>
3653
+ <div class="fm-clear"></div>
3654
+ <br />
3655
+ <div class="fm-content">
3656
+ <div class="fm-form-example form-embedded">
3657
+ <div class="fm-form-pagination">
3658
+ <div class="fm-pages-steps" ng-show="pagination == 'step'">
3659
+ <span class="active-step" ng-class="{borderRight : PSAPBorderRight, borderLeft : PSAPBorderLeft, borderBottom : PSAPBorderBottom, borderTop : PSAPBorderTop}">1(active)</span>
3660
+ <span class="deactive-step" ng-class="{borderRight : PSDPBorderRight, borderLeft : PSDPBorderLeft, borderBottom : PSDPBorderBottom, borderTop : PSDPBorderTop}">2</span>
3661
+ </div>
3662
+ <div class="fm-pages-percentage" ng-show="pagination == 'percentage'">
3663
+ <div class="deactive-percentage" ng-class="{borderRight : PSDPBorderRight, borderLeft : PSDPBorderLeft, borderBottom : PSDPBorderBottom, borderTop : PSDPBorderTop}">
3664
+ <div class="active-percentage" ng-class="{borderRight : PSAPBorderRight, borderLeft : PSAPBorderLeft, borderBottom : PSAPBorderBottom, borderTop : PSAPBorderTop}" style="width: 50%;">
3665
+ <b class="wdform_percentage_text">50%</b>
3666
+ </div>
3667
+ <div class="wdform_percentage_arrow">
3668
+ </div>
3669
+ </div>
3670
+ </div>
3671
+ <div>
3672
+ </div>
3673
+ </div>
3674
+
3675
+ <div class="fm-form" ng-class="{borderRight : AGPBorderRight, borderLeft : AGPBorderLeft, borderBottom : AGPBorderBottom, borderTop : AGPBorderTop}">
3676
+ <div ng-show="HPAlign != 'bottom' && HPAlign != 'right'" ng-class="{borderRight : HPBorderRight, borderLeft : HPBorderLeft, borderBottom : HPBorderBottom, borderTop : HPBorderTop, alignLeft : HPAlign == 'left'}" class="fm-form-header">
3677
+ <div ng-show="HIPAlign != 'bottom' && HIPAlign != 'right'" ng-class="{imageRight : HIPAlign == 'right', imageLeft : HIPAlign == 'left', imageBottom : HIPAlign == 'bottom', imageTop : HIPAlign == 'top'}" class="himage">
3678
+ <img src="<?php echo WD_FM_URL; ?>/images/preview_header.png" />
3679
+ </div>
3680
+ <div ng-class="{imageRight : HIPAlign == 'right', imageLeft : HIPAlign == 'left', imageBottom : HIPAlign == 'bottom', imageTop : HIPAlign == 'top'}" class="htext">
3681
+ <div class="htitle">Subscribe Our Newsletter </div>
3682
+ <div class="hdescription">Join our mailing list to receive the latest news from our team.</div>
3683
+ </div>
3684
+ <div ng-show="HIPAlign == 'bottom' || HIPAlign == 'right'" ng-class="{imageRight : HIPAlign == 'right', imageLeft : HIPAlign == 'left', imageBottom : HIPAlign == 'bottom', imageTop : HIPAlign == 'top'}" class="himage">
3685
+ <img src="<?php echo WD_FM_URL; ?>/images/preview_header.png" />
3686
+ </div>
3687
+ </div>
3688
 
3689
+ <div class="fm-form-content" ng-class="{isBG : GPBackground != '', borderRight : GPBorderRight, borderLeft : GPBorderLeft, borderBottom : GPBorderBottom, borderTop : GPBorderTop, alignLeft : HPAlign == 'left' || HPAlign == 'right'}">
3690
+ <div class="container-fluid">
3691
+ <div class="embedded-form">
3692
+ <div class="fm-section fm-{{GPAlign}}">
3693
+ <div class="fm-column">
3694
+ <div class="fm-row">
3695
+ <div type="type_submitter_mail" class="wdform-field">
3696
+ <div class="wdform-label-section" style="float: left; width: 90px;"><span class="wdform-label">E-mail:</span><span class="wdform-required">*</span>
3697
+ </div>
3698
+ <div class="wdform-element-section" style="width: 150px;">
3699
+ <input type="text" value="example@example.com" style="width: 100%;" ng-class="{borderRight : IPBorderRight, borderLeft : IPBorderLeft, borderBottom : IPBorderBottom, borderTop : IPBorderTop}" />
3700
+ </div>
3701
+ </div>
3702
+ </div>
3703
+ <div class="fm-row">
3704
+ <div type="type_country" class="wdform-field">
3705
+ <div class="wdform-label-section" style="float: left; width: 90px;">
3706
+ <span class="wdform-label">Country:</span>
3707
+ </div>
3708
+ <div class="wdform-element-section wdform_select" style=" width: 150px;">
3709
+ <select style="width: 100%;" ng-class="{isBG : SBPBackground != '', borderRight : IPBorderRight, borderLeft : IPBorderLeft, borderBottom : IPBorderBottom, borderTop : IPBorderTop}">
3710
+ <option value="Armenia">Armenia</option>
3711
+ </select>
3712
+ </div>
3713
+ </div>
3714
+ </div>
3715
+
3716
+ <div class="fm-row">
3717
+ <div type="type_radio" class="wdform-field">
3718
+ <div class="wdform-label-section" style="float: left; width: 90px;">
3719
+ <span class="wdform-label">Radio:</span>
3720
+ </div>
3721
+ <div class="wdform-element-section " style="display:table;">
3722
+ <div style="display: table-row; vertical-align:top">
3723
+ <div style="display: table-cell;">
3724
+ <div class="radio-div check-rad">
3725
+ <input type="radio" id="em-rad-op-1" value="option 1">
3726
+ <label for="em-rad-op-1" class="mini_label">
3727
+ <span ng-class="{borderRight : SCPBorderRight, borderLeft : SCPBorderLeft, borderBottom : SCPBorderBottom, borderTop : SCPBorderTop}"></span>option 1
3728
+ </label>
3729
+ </div>
3730
+ </div>
3731
+ </div>
3732
+ </div>
3733
+ </div>
3734
+ </div>
3735
+ <div class="fm-row">
3736
+ <div type="type_checkbox" class="wdform-field">
3737
+ <div class="wdform-label-section" style="float: left; width: 90px;">
3738
+ <span class="wdform-label">Checkbox:</span>
3739
+ </div>
3740
+ <div class="wdform-element-section" style="display: table;">
3741
+ <div style="display: table-row; vertical-align:top">
3742
+ <div style="display: table-cell;">
3743
+ <div class="checkbox-div forlabs" ng-class="{isBG : MCCPBackground != ''}">
3744
+ <input type="checkbox" id="em-ch-op-1" value="option 1">
3745
+ <label for="em-ch-op-1" class="mini_label"><span ng-class="{borderRight : MCPBorderRight, borderLeft : MCPBorderLeft, borderBottom : MCPBorderBottom, borderTop : MCPBorderTop}"></span>option 1</label>
3746
+ </div>
3747
+ </div>
3748
+ </div>
3749
+ </div>
3750
+ </div>
3751
+ </div>
3752
+ <div class="fm-row">
3753
+ <div type="type_date" class="wdform-field">
3754
+ <div class="wdform-label-section" style="float: left; width: 90px;">
3755
+ <span class="wdform-label">Date:</span>
3756
+ </div>
3757
+ <div class="wdform-element-section fm-calendar-button" style="width: 150px;">
3758
+ <input type="text" value="" style="width: 100%;" ng-class="{borderRight : IPBorderRight, borderLeft : IPBorderLeft, borderBottom : IPBorderBottom, borderTop : IPBorderTop}" />
3759
+ <span></span>
3760
+ </div>
3761
+ </div>
3762
+ </div>
3763
+ <div class="fm-row">
3764
+ <div type="type_submit_reset" class="wdform-field subscribe-reset">
3765
+ <div class="wdform-label-section" style="display: table-cell;"></div>
3766
+ <div class="wdform-element-section" style="display: table-cell;">
3767
+ <button type="button" class="fm-button-subscribe" ng-class="{borderRight : SPBorderRight, borderLeft : SPBorderLeft, borderBottom : SPBorderBottom, borderTop : SPBorderTop, borderHoverRight : SHPBorderRight, borderHoverLeft : SHPBorderLeft, borderHoverBottom : SHPBorderBottom, borderHoverTop : SHPBorderTop}" >Subscribe</button>
3768
+ <button type="button" class="fm-button-reset" ng-class="{borderRight : BPBorderRight, borderLeft : BPBorderLeft, borderBottom : BPBorderBottom, borderTop : BPBorderTop, borderHoverRight : BHPBorderRight, borderHoverLeft : BHPBorderLeft, borderHoverBottom : BHPBorderBottom, borderHoverTop : BHPBorderTop}">Reset</button>
3769
+ </div>
3770
+ </div>
3771
+ </div>
3772
+ <div class="fm-clear"></div>
3773
+ </div>
3774
+
3775
+ </div>
3776
+ <div class="fm-close-icon" ng-class="{borderRight : CBPBorderRight, borderLeft : CBPBorderLeft, borderBottom : CBPBorderBottom, borderTop : CBPBorderTop, borderHoverRight : CBHPBorderRight, borderHoverLeft : CBHPBorderLeft, borderHoverBottom : CBHPBorderBottom, borderHoverTop : CBHPBorderTop}">
3777
+ <span class="fm-close fa fa-close" ng-class="{borderRight : CBPBorderRight, borderLeft : CBPBorderLeft, borderBottom : CBPBorderBottom, borderTop : CBPBorderTop, borderHoverRight : CBHPBorderRight, borderHoverLeft : CBHPBorderLeft, borderHoverBottom : CBHPBorderBottom, borderHoverTop : CBHPBorderTop}"></span>
3778
+ </div>
3779
+ <div class="fm-footer" ng-show="pagination != 'none'">
3780
+ <div style="width: 100%;">
3781
+ <div style="width: 100%; display: table;">
3782
+ <div style="display: table-row-group;">
3783
+ <div style="display: table-row;">
3784
+ <div class="fm-previous-page" style="display: table-cell; width: 45%;">
3785
+ <div class="fm-wdform-page-button" ng-class="{borderRight : PBPBorderRight, borderLeft : PBPBorderLeft, borderBottom : PBPBorderBottom, borderTop : PBPBorderTop, borderHoverRight : PBHPBorderRight, borderHoverLeft : PBHPBorderLeft, borderHoverBottom : PBHPBorderBottom, borderHoverTop : PBHPBorderTop}"><span class="fa fa-angle-double-left"></span> Previous</div>
3786
+ </div>
3787
+ <div class="page-numbers text-center" style="display: table-cell;">
3788
+ <span>2/3</span>
3789
+ </div>
3790
+ <div class="fm-next-page" style="display: table-cell; width: 45%; text-align: right;">
3791
+ <div class="fm-wdform-page-button" ng-class="{borderRight : NBPBorderRight, borderLeft : NBPBorderLeft, borderBottom : NBPBorderBottom, borderTop : NBPBorderTop, borderHoverRight : NBHPBorderRight, borderHoverLeft : NBHPBorderLeft, borderHoverBottom : NBHPBorderBottom, borderHoverTop : NBHPBorderTop}">Next <span class="fa fa-angle-double-right"></span></div>
3792
+ </div>
3793
+ </div>
3794
+ </div>
3795
+ </div>
3796
+ </div>
3797
+ </div>
3798
+ </div>
3799
+ </div>
3800
+ </div>
3801
+ <div ng-show="HPAlign == 'bottom' || HPAlign == 'right'" ng-class="{borderRight : HPBorderRight, borderLeft : HPBorderLeft, borderBottom : HPBorderBottom, borderTop : HPBorderTop, alignLeft : HPAlign == 'right'}" class="fm-form-header">
3802
+ <div ng-show="HIPAlign != 'bottom' && HIPAlign != 'right'" ng-class="{imageRight : HIPAlign == 'right', imageLeft : HIPAlign == 'left', imageBottom : HIPAlign == 'bottom', imageTop : HIPAlign == 'top'}" class="himage">
3803
+ <img src="<?php echo WD_FM_URL; ?>/images/preview_header.png" />
3804
+ </div>
3805
+ <div ng-class="{imageRight : HIPAlign == 'right', imageLeft : HIPAlign == 'left', imageBottom : HIPAlign == 'bottom', imageTop : HIPAlign == 'top'}" class="htext">
3806
+ <div class="htitle">Subscribe Our Newsletter </div>
3807
+ <div class="hdescription">Join our mailing list to receive the latest news from our team.</div>
3808
+ </div>
3809
+ <div ng-show="HIPAlign == 'bottom' || HIPAlign == 'right'" ng-class="{imageRight : HIPAlign == 'right', imageLeft : HIPAlign == 'left', imageBottom : HIPAlign == 'bottom', imageTop : HIPAlign == 'top'}" class="himage">
3810
+ <img src="<?php echo WD_FM_URL; ?>/images/preview_header.png" />
3811
+ </div>
3812
+ </div>
3813
+ </div>
3814
+ </div>
3815
+ <div class="fm-clear"></div>
3816
+ </div>
3817
+ </div>
3818
+ </div>
3819
+ </div>
3820
+ </form>
3821
+ </div>
3822
+ </div>
3823
  <script>
3824
+ angular.module('ThemeParams', []).controller('FMTheme', function($scope) {
3825
+ });
3826
+
3827
+ (function(jQuery){
3828
+ jQuery.fn.serializeObject = function(){
3829
+
3830
+ var self = this,
3831
+ json = {},
3832
+ push_counters = {},
3833
+ patterns = {
3834
+ "validate": /^[a-zA-Z][a-zA-Z0-9_]*(?:\[(?:\d*|[a-zA-Z0-9_]+)\])*$/,
3835
+ "key": /[a-zA-Z0-9_]+|(?=\[\])/g,
3836
+ "push": /^$/,
3837
+ "fixed": /^\d+$/,
3838
+ "named": /^[a-zA-Z0-9_]+$/
3839
+ };
3840
+
3841
+ this.build = function(base, key, value){
3842
+ base[key] = value;
3843
+ return base;
3844
+ };
3845
+
3846
+ this.push_counter = function(key){
3847
+ if(push_counters[key] === undefined){
3848
+ push_counters[key] = 0;
3849
+ }
3850
+ return push_counters[key]++;
3851
+ };
3852
+
3853
+ jQuery.each(jQuery(this).serializeArray(), function(){
3854
+
3855
+ // skip invalid keys
3856
+ if(!patterns.validate.test(this.name)){
3857
+ return;
3858
+ }
3859
+
3860
+ var k,
3861
+ keys = this.name.match(patterns.key),
3862
+ merge = this.value,
3863
+ reverse_key = this.name;
3864
+
3865
+ while((k = keys.pop()) !== undefined){
3866
+
3867
+ // adjust reverse_key
3868
+ reverse_key = reverse_key.replace(new RegExp("\\[" + k + "\\]$"), '');
3869
+
3870
+ // push
3871
+ if(k.match(patterns.push)){
3872
+ merge = self.build([], self.push_counter(reverse_key), merge);
3873
+ }
3874
+
3875
+ // fixed
3876
+ else if(k.match(patterns.fixed)){
3877
+ merge = self.build([], k, merge);
3878
+ }
3879
+
3880
+ // named
3881
+ else if(k.match(patterns.named)){
3882
+ merge = self.build({}, k, merge);
3883
+ }
3884
+ }
3885
+
3886
+ json = jQuery.extend(true, json, merge);
3887
+ });
3888
+
3889
+ return json;
3890
+ };
3891
+ })(jQuery);
3892
+
3893
+ jQuery(".fm-themes-tabs li a").click(function(){
3894
+ jQuery(".fm-themes-tabs-container .fm-themes-container").hide();
3895
+ jQuery(".fm-themes-tabs li a").removeClass("fm-theme-active-tab");
3896
+ jQuery("#"+jQuery(this).attr("id")+'-content').show();
3897
+ jQuery(this).addClass("fm-theme-active-tab");
3898
+ jQuery("#active_tab").val(jQuery(this).attr("id"));
3899
+ return false;
3900
  });
3901
+
3902
+
3903
+ function submitbutton() {
3904
+ var all_params = <?php echo $row->version == 1 ? 'jQuery(\'textarea[name=CUPCSS]\').serializeObject()' : 'jQuery(\'#fm-themes-form\').serializeObject()'; ?>;
3905
+ jQuery('#params').val(JSON.stringify(all_params).replace('<?php echo WD_FM_URL ?>', 'WD_FM_URL'));
3906
+ return true;
3907
+ }
3908
+
3909
+ jQuery('.color').spectrum({
3910
+ showAlpha: true,
3911
+ showInput: true,
3912
+ showSelectionPalette: true,
3913
+ preferredFormat: "hex",
3914
+ allowEmpty: true,
3915
+ move: function(color){
3916
+ jQuery(this).val(color.toHexString());
3917
+ jQuery(this).trigger("change");
3918
+ }
3919
+ });
3920
+
3921
+ setTimeout(function(){
3922
+ jQuery('.fm-preview-form').show();
3923
+ }, 1500);
3924
+
3925
+ setTimeout(function(){
3926
+ var fm_form_example_pos = jQuery('.fm-content').offset().top;
3927
+ jQuery(window).scroll(function() {
3928
+ if(jQuery(this).scrollTop() > fm_form_example_pos) {
3929
+ jQuery('.fm-content').css({'position' : 'fixed', 'top': '32px', 'z-index' : '10000', 'width' : jQuery(".form-example-preview").outerWidth()+'px'});
3930
+
3931
+ } else{
3932
+ jQuery('.fm-content').css({'position' : 'relative', 'top' : '32px', 'z-index' : '', 'width' : ''});
3933
+ }
3934
+ });
3935
+
3936
+ }, 2500);
3937
+
3938
  </script>
3939
  <?php
3940
  }
admin/views/FMViewUninstall_fm.php CHANGED
@@ -25,20 +25,21 @@ class FMViewUninstall_fm {
25
  public function display() {
26
  global $wpdb;
27
  $prefix = $wpdb->prefix;
 
28
  ?>
29
  <form method="post" action="admin.php?page=uninstall_fm" style="width:95%;">
30
  <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
31
  <div class="wrap">
32
- <div class="fm-page-banner uninstall-banner">
33
  <div class="uninstall_icon">
34
  </div>
35
  <div class="fm-logo-title">Uninstall Form Maker</div>
36
  </div>
37
  <br />
38
  <div class="goodbye-text">
39
- Before uninstalling the plugin, please Contact our <a href="https://web-dorado.com/support/contact-us.html?source=formmaker" target= '_blank'>support team</a>. We'll do our best to help you out with your issue. We value each and every user and value what’s right for our users in everything we do.<br>
40
- However, if anyway you have made a decision to uninstall the plugin, please take a minute to <a href="https://web-dorado.com/support/contact-us.html?source=formmaker" target= '_blank'>Contact us</a> and tell what you didn't like for our plugins further improvement and development. Thank you !!!
41
- </div>
42
  <p>
43
  Deactivating Form Maker plugin does not remove any data that may have been created, such as the Forms and the Submissions. To completely remove this plugin, you can uninstall it here.
44
  </p>
@@ -66,7 +67,20 @@ class FMViewUninstall_fm {
66
  <li><?php echo $prefix; ?>formmaker_themes</li>
67
  <li><?php echo $prefix; ?>formmaker_sessions</li>
68
  <li><?php echo $prefix; ?>formmaker_query</li>
69
-
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  </ol>
71
  </td>
72
  </tr>
@@ -90,26 +104,43 @@ class FMViewUninstall_fm {
90
  $this->model->delete_db_tables();
91
  global $wpdb;
92
  $prefix = $wpdb->prefix;
93
- $deactivate_url = add_query_arg(array('action' => 'deactivate', 'plugin' => 'form-maker/form-maker.php'), admin_url('plugins.php'));
94
- $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_form-maker/form-maker.php');
 
95
  ?>
96
  <div id="message" class="updated fade">
97
- <p>The following Database Tables succesfully deleted:</p>
98
- <p><?php echo $prefix; ?>formmaker,</p>
99
- <p><?php echo $prefix; ?>formmaker_backup,</p>
100
- <p><?php echo $prefix; ?>formmaker_blocked,</p>
101
- <p><?php echo $prefix; ?>formmaker_sessions,</p>
102
- <p><?php echo $prefix; ?>formmaker_submits,</p>
103
- <p><?php echo $prefix; ?>formmaker_themes,</p>
104
- <p><?php echo $prefix; ?>formmaker_views.</p>
105
- <p><?php echo $prefix; ?>formmaker_query.</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  </div>
107
  <div class="wrap">
108
  <h2>Uninstall Form Maker</h2>
109
- <p><strong><a href="<?php echo $deactivate_url; ?>">Click Here</a> To Finish the Uninstallation and Form Maker will be Deactivated Automatically.</strong></p>
110
- <input id="task" name="task" type="hidden" value="" />
 
111
  </div>
112
- <?php
113
  }
114
 
115
  ////////////////////////////////////////////////////////////////////////////////////////
25
  public function display() {
26
  global $wpdb;
27
  $prefix = $wpdb->prefix;
28
+ $addons = array('WD_FM_MAILCHIMP' => 'mailchimp', 'WD_FM_REG' => 'reg', 'WD_FM_POST_GEN' => 'post_gen_options', 'WD_FM_EMAIL_COND' => 'email_conditions', 'WD_FM_DBOX_INT' => 'dbox_int', 'WD_FM_GDRIVE_INT' => 'formmaker_gdrive_int','WD_FM_PDF' => array('pdf_options', 'pdf'), 'WD_FM_PUSHOVER' => 'pushover', 'WD_FM_SAVE_PROG' => array('save_options', 'saved_entries', 'saved_attributes'), 'WD_FM_STRIPE'=>'stripe', 'WD_FM_CALCULATOR'=>'calculator');
29
  ?>
30
  <form method="post" action="admin.php?page=uninstall_fm" style="width:95%;">
31
  <?php wp_nonce_field('nonce_fm', 'nonce_fm'); ?>
32
  <div class="wrap">
33
+ <div class="uninstall-banner">
34
  <div class="uninstall_icon">
35
  </div>
36
  <div class="fm-logo-title">Uninstall Form Maker</div>
37
  </div>
38
  <br />
39
  <div class="goodbye-text">
40
+ Before uninstalling the plugin, please Contact our <a href="https://web-dorado.com/support/contact-us.html" target= '_blank'>support team</a>. We'll do our best to help you out with your issue. We value each and every user and value what’s right for our users in everything we do.<br>
41
+ However, if anyway you have made a decision to uninstall the plugin, please take a minute to <a href="https://web-dorado.com/support/contact-us.html" target= '_blank'>Contact us</a> and tell what you didn't like for our plugins further improvement and development. Thank you !!!
42
+ </div>
43
  <p>
44
  Deactivating Form Maker plugin does not remove any data that may have been created, such as the Forms and the Submissions. To completely remove this plugin, you can uninstall it here.
45
  </p>
67
  <li><?php echo $prefix; ?>formmaker_themes</li>
68
  <li><?php echo $prefix; ?>formmaker_sessions</li>
69
  <li><?php echo $prefix; ?>formmaker_query</li>
70
+ <li><?php echo $prefix; ?>formmaker_display_options</li>
71
+ <?php
72
+ foreach($addons as $addon => $addon_name) {
73
+ if (defined($addon) && is_plugin_active(constant($addon))) {
74
+ if(is_array($addon_name)){
75
+ foreach($addon_name as $ad_name){
76
+ echo '<li>'.$prefix.'formmaker_'.$ad_name.'</li>';
77
+ }
78
+ } else{
79
+ echo '<li>'.$prefix.'formmaker_'.$addon_name.'</li>';
80
+ }
81
+ }
82
+ }
83
+ ?>
84
  </ol>
85
  </td>
86
  </tr>
104
  $this->model->delete_db_tables();
105
  global $wpdb;
106
  $prefix = $wpdb->prefix;
107
+ $addons = array('WD_FM_MAILCHIMP' => 'mailchimp', 'WD_FM_REG' => 'reg', 'WD_FM_POST_GEN' => 'post_gen_options', 'WD_FM_EMAIL_COND' => 'email_conditions', 'WD_FM_DBOX_INT' => 'dbox_int', 'WD_FM_GDRIVE_INT' => 'formmaker_gdrive_int', 'WD_FM_PDF' => array('pdf_options', 'pdf'), 'WD_FM_PUSHOVER' => 'pushover', 'WD_FM_SAVE_PROG' => array('save_options', 'saved_entries', 'saved_attributes'), 'WD_FM_STRIPE' => 'stripe', 'WD_FM_CALCULATOR' => 'calculator');
108
+ $deactivate_url = add_query_arg(array('action' => 'deactivate', 'plugin' => WD_MAIN_FILE), admin_url('plugins.php'));
109
+ $deactivate_url = wp_nonce_url($deactivate_url, 'deactivate-plugin_' . WD_MAIN_FILE);
110
  ?>
111
  <div id="message" class="updated fade">
112
+ <p>The following Database Tables succesfully deleted:</p>
113
+ <p><?php echo $prefix; ?>formmaker,</p>
114
+ <p><?php echo $prefix; ?>formmaker_backup</p>
115
+ <p><?php echo $prefix; ?>formmaker_blocked</p>
116
+ <p><?php echo $prefix; ?>formmaker_sessions</p>
117
+ <p><?php echo $prefix; ?>formmaker_submits</p>
118
+ <p><?php echo $prefix; ?>formmaker_themes</p>
119
+ <p><?php echo $prefix; ?>formmaker_views</p>
120
+ <p><?php echo $prefix; ?>formmaker_query</p>
121
+ <p><?php echo $prefix; ?>formmaker_display_options,</p>
122
+ <?php
123
+ foreach ($addons as $addon => $addon_name) {
124
+ if (defined($addon) && is_plugin_active(constant($addon))) {
125
+ if (is_array($addon_name)) {
126
+ foreach ($addon_name as $ad_name) {
127
+ echo '<p>' . $prefix . 'formmaker_' . $ad_name . '</p>';
128
+ }
129
+ }
130
+ else {
131
+ echo '<p>' . $prefix . 'formmaker_' . $addon_name . '</p>';
132
+ }
133
+ }
134
+ }
135
+ ?>
136
  </div>
137
  <div class="wrap">
138
  <h2>Uninstall Form Maker</h2>
139
+ <p><strong><a href="<?php echo $deactivate_url; ?>">Click Here</a> To Finish the Uninstallation and Form Maker
140
+ will be Deactivated Automatically.</strong></p>
141
+ <input id="task" name="task" type="hidden" value=""/>
142
  </div>
143
+ <?php
144
  }
145
 
146
  ////////////////////////////////////////////////////////////////////////////////////////
css/calendar-jos.css CHANGED
@@ -1,6 +1,10 @@
1
  /* The main calendar widget. DIV containing a table. */
2
 
3
  /* Form Wordpress. */
 
 
 
 
4
  .calendar .button {
5
  display: table-cell !important;
6
  }
1
  /* The main calendar widget. DIV containing a table. */
2
 
3
  /* Form Wordpress. */
4
+ .calendar table {
5
+ width: 100% !important;
6
+ }
7
+
8
  .calendar .button {
9
  display: table-cell !important;
10
  }
css/fm-bootstrap.css ADDED
@@ -0,0 +1,5225 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Bootstrap v3.3.6 (http://getbootstrap.com)
3
+ * Copyright 2011-2015 Twitter, Inc.
4
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
5
+ */
6
+ /*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
7
+ html {
8
+ font-family: sans-serif;
9
+ -webkit-text-size-adjust: 100%;
10
+ -ms-text-size-adjust: 100%;
11
+ }
12
+ body {
13
+ margin: 0;
14
+ }
15
+ a:active,
16
+ a:hover {
17
+ outline: 0;
18
+ }
19
+
20
+ pre {
21
+ overflow: auto;
22
+ }
23
+ code,
24
+ kbd,
25
+ pre,
26
+ samp {
27
+ font-family: monospace, monospace;
28
+ font-size: 1em;
29
+ }
30
+ button,
31
+ input,
32
+ optgroup,
33
+ select,
34
+ textarea {
35
+ margin: 0;
36
+ font: inherit;
37
+ color: inherit;
38
+ }
39
+
40
+ fieldset {
41
+ padding: .35em .625em .75em;
42
+ margin: 0 2px;
43
+ border: 1px solid #c0c0c0;
44
+ }
45
+ legend {
46
+ padding: 0;
47
+ border: 0;
48
+ }
49
+ textarea {
50
+ overflow: auto;
51
+ }
52
+
53
+ table {
54
+ border-spacing: 0;
55
+ border-collapse: collapse;
56
+ }
57
+ td,
58
+ th {
59
+ padding: 0;
60
+ }
61
+
62
+ @media print {
63
+ *,
64
+ *:before,
65
+ *:after {
66
+ color: #000 !important;
67
+ text-shadow: none !important;
68
+ background: transparent !important;
69
+ -webkit-box-shadow: none !important;
70
+ box-shadow: none !important;
71
+ }
72
+ a,
73
+ a:visited {
74
+ text-decoration: underline;
75
+ }
76
+ a[href]:after {
77
+ content: " (" attr(href) ")";
78
+ }
79
+ abbr[title]:after {
80
+ content: " (" attr(title) ")";
81
+ }
82
+ a[href^="#"]:after,
83
+ a[href^="javascript:"]:after {
84
+ content: "";
85
+ }
86
+ pre,
87
+ blockquote {
88
+ border: 1px solid #999;
89
+
90
+ page-break-inside: avoid;
91
+ }
92
+ thead {
93
+ display: table-header-group;
94
+ }
95
+ tr,
96
+ img {
97
+ page-break-inside: avoid;
98
+ }
99
+ img {
100
+ max-width: 100% !important;
101
+ }
102
+ p,
103
+ h2,
104
+ h3 {
105
+ orphans: 3;
106
+ widows: 3;
107
+ }
108
+ h2,
109
+ h3 {
110
+ page-break-after: avoid;
111
+ }
112
+ .navbar {
113
+ display: none;
114
+ }
115
+ .btn > .caret,
116
+ .dropup > .btn > .caret {
117
+ border-top-color: #000 !important;
118
+ }
119
+
120
+ .table {
121
+ border-collapse: collapse !important;
122
+ }
123
+ .table td,
124
+ .table th {
125
+ background-color: #fff !important;
126
+ }
127
+ .table-bordered th,
128
+ .table-bordered td {
129
+ border: 1px solid #ddd !important;
130
+ }
131
+ }
132
+ * {
133
+ -webkit-box-sizing: border-box;
134
+ -moz-box-sizing: border-box;
135
+ box-sizing: border-box;
136
+ }
137
+ *:before,
138
+ *:after {
139
+ -webkit-box-sizing: border-box;
140
+ -moz-box-sizing: border-box;
141
+ box-sizing: border-box;
142
+ }
143
+ html {
144
+ font-size: 10px;
145
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
146
+ }
147
+
148
+ input,
149
+ button,
150
+ select,
151
+ textarea {
152
+ font-family: inherit;
153
+ font-size: inherit;
154
+ line-height: inherit;
155
+ }
156
+ a {
157
+ color: #337ab7;
158
+ text-decoration: none;
159
+ }
160
+ a:hover,
161
+ a:focus {
162
+ color: #23527c;
163
+ text-decoration: underline;
164
+ }
165
+ a:focus {
166
+ outline: thin dotted;
167
+ outline: 5px auto -webkit-focus-ring-color;
168
+ outline-offset: -2px;
169
+ }
170
+ figure {
171
+ margin: 0;
172
+ }
173
+ h1,
174
+ h2,
175
+ h3,
176
+ h4,
177
+ h5,
178
+ h6,
179
+ .h1,
180
+ .h2,
181
+ .h3,
182
+ .h4,
183
+ .h5,
184
+ .h6 {
185
+ font-family: inherit;
186
+ font-weight: 500;
187
+ line-height: 1.1;
188
+ color: inherit;
189
+ }
190
+ h1 small,
191
+ h2 small,
192
+ h3 small,
193
+ h4 small,
194
+ h5 small,
195
+ h6 small,
196
+ .h1 small,
197
+ .h2 small,
198
+ .h3 small,
199
+ .h4 small,
200
+ .h5 small,
201
+ .h6 small,
202
+ h1 .small,
203
+ h2 .small,
204
+ h3 .small,
205
+ h4 .small,
206
+ h5 .small,
207
+ h6 .small,
208
+ .h1 .small,
209
+ .h2 .small,
210
+ .h3 .small,
211
+ .h4 .small,
212
+ .h5 .small,
213
+ .h6 .small {
214
+ font-weight: normal;
215
+ line-height: 1;
216
+ color: #777;
217
+ }
218
+ h1,
219
+ .h1,
220
+ h2,
221
+ .h2,
222
+ h3,
223
+ .h3 {
224
+ margin-top: 20px;
225
+ margin-bottom: 10px;
226
+ }
227
+ h1 small,
228
+ .h1 small,
229
+ h2 small,
230
+ .h2 small,
231
+ h3 small,
232
+ .h3 small,
233
+ h1 .small,
234
+ .h1 .small,
235
+ h2 .small,
236
+ .h2 .small,
237
+ h3 .small,
238
+ .h3 .small {
239
+ font-size: 65%;
240
+ }
241
+ h4,
242
+ .h4,
243
+ h5,
244
+ .h5,
245
+ h6,
246
+ .h6 {
247
+ margin-top: 10px;
248
+ margin-bottom: 10px;
249
+ }
250
+ h4 small,
251
+ .h4 small,
252
+ h5 small,
253
+ .h5 small,
254
+ h6 small,
255
+ .h6 small,
256
+ h4 .small,
257
+ .h4 .small,
258
+ h5 .small,
259
+ .h5 .small,
260
+ h6 .small,
261
+ .h6 .small {
262
+ font-size: 75%;
263
+ }
264
+ h1,
265
+ .h1 {
266
+ font-size: 36px;
267
+ }
268
+ h2,
269
+ .h2 {
270
+ font-size: 30px;
271
+ }
272
+ h3,
273
+ .h3 {
274
+ font-size: 24px;
275
+ }
276
+ h4,
277
+ .h4 {
278
+ font-size: 18px;
279
+ }
280
+ h5,
281
+ .h5 {
282
+ font-size: 14px;
283
+ }
284
+ h6,
285
+ .h6 {
286
+ font-size: 12px;
287
+ }
288
+ p {
289
+ margin: 0 0 10px;
290
+ }
291
+ .lead {
292
+ margin-bottom: 20px;
293
+ font-size: 16px;
294
+ font-weight: 300;
295
+ line-height: 1.4;
296
+ }
297
+ @media (min-width: 768px) {
298
+ .lead {
299
+ font-size: 21px;
300
+ }
301
+ }
302
+ small,
303
+ .small {
304
+ font-size: 85%;
305
+ }
306
+ mark,
307
+ .mark {
308
+ padding: .2em;
309
+ background-color: #fcf8e3;
310
+ }
311
+ .text-left {
312
+ text-align: left;
313
+ }
314
+ .text-right {
315
+ text-align: right;
316
+ }
317
+ .text-center {
318
+ text-align: center;
319
+ }
320
+ .text-justify {
321
+ text-align: justify;
322
+ }
323
+ .text-nowrap {
324
+ white-space: nowrap;
325
+ }
326
+ .text-lowercase {
327
+ text-transform: lowercase;
328
+ }
329
+ .text-uppercase {
330
+ text-transform: uppercase;
331
+ }
332
+ .text-capitalize {
333
+ text-transform: capitalize;
334
+ }
335
+ .text-muted {
336
+ color: #777;
337
+ }
338
+ .text-primary {
339
+ color: #337ab7;
340
+ }
341
+ a.text-primary:hover,
342
+ a.text-primary:focus {
343
+ color: #286090;
344
+ }
345
+ .text-success {
346
+ color: #3c763d;
347
+ }
348
+ a.text-success:hover,
349
+ a.text-success:focus {
350
+ color: #2b542c;
351
+ }
352
+ .text-info {
353
+ color: #31708f;
354
+ }
355
+ a.text-info:hover,
356
+ a.text-info:focus {
357
+ color: #245269;
358
+ }
359
+ .text-warning {
360
+ color: #8a6d3b;
361
+ }
362
+ a.text-warning:hover,
363
+ a.text-warning:focus {
364
+ color: #66512c;
365
+ }
366
+ .text-danger {
367
+ color: #a94442;
368
+ }
369
+ a.text-danger:hover,
370
+ a.text-danger:focus {
371
+ color: #843534;
372
+ }
373
+ .bg-primary {
374
+ color: #fff;
375
+ background-color: #337ab7;
376
+ }
377
+ a.bg-primary:hover,
378
+ a.bg-primary:focus {
379
+ background-color: #286090;
380
+ }
381
+ .bg-success {
382
+ background-color: #dff0d8;
383
+ }
384
+ a.bg-success:hover,
385
+ a.bg-success:focus {
386
+ background-color: #c1e2b3;
387
+ }
388
+ .bg-info {
389
+ background-color: #d9edf7;
390
+ }
391
+ a.bg-info:hover,
392
+ a.bg-info:focus {
393
+ background-color: #afd9ee;
394
+ }
395
+ .bg-warning {
396
+ background-color: #fcf8e3;
397
+ }
398
+ a.bg-warning:hover,
399
+ a.bg-warning:focus {
400
+ background-color: #f7ecb5;
401
+ }
402
+ .bg-danger {
403
+ background-color: #f2dede;
404
+ }
405
+ a.bg-danger:hover,
406
+ a.bg-danger:focus {
407
+ background-color: #e4b9b9;
408
+ }
409
+ .page-header {
410
+ padding-bottom: 9px;
411
+ margin: 40px 0 20px;
412
+ border-bottom: 1px solid #eee;
413
+ }
414
+ ul,
415
+ ol {
416
+ margin-top: 0;
417
+ margin-bottom: 10px;
418
+ }
419
+ ul ul,
420
+ ol ul,
421
+ ul ol,
422
+ ol ol {
423
+ margin-bottom: 0;
424
+ }
425
+ .list-unstyled {
426
+ padding-left: 0;
427
+ list-style: none;
428
+ }
429
+ .list-inline {
430
+ padding-left: 0;
431
+ margin-left: -5px;
432
+ list-style: none;
433
+ }
434
+ .list-inline > li {
435
+ display: inline-block;
436
+ padding-right: 5px;
437
+ padding-left: 5px;
438
+ }
439
+ dl {
440
+ margin-top: 0;
441
+ margin-bottom: 20px;
442
+ }
443
+ dt,
444
+ dd {
445
+ line-height: 1.42857143;
446
+ }
447
+ dt {
448
+ font-weight: bold;
449
+ }
450
+ dd {
451
+ margin-left: 0;
452
+ }
453
+ @media (min-width: 768px) {
454
+ .dl-horizontal dt {
455
+ float: left;
456
+ width: 160px;
457
+ overflow: hidden;
458
+ clear: left;
459
+ text-align: right;
460
+ text-overflow: ellipsis;
461
+ white-space: nowrap;
462
+ }
463
+ .dl-horizontal dd {
464
+ margin-left: 180px;
465
+ }
466
+ }
467
+ abbr[title],
468
+ abbr[data-original-title] {
469
+ cursor: help;
470
+ border-bottom: 1px dotted #777;
471
+ }
472
+ .initialism {
473
+ font-size: 90%;
474
+ text-transform: uppercase;
475
+ }
476
+ blockquote {
477
+ padding: 10px 20px;
478
+ margin: 0 0 20px;
479
+ font-size: 17.5px;
480
+ border-left: 5px solid #eee;
481
+ }
482
+ blockquote p:last-child,
483
+ blockquote ul:last-child,
484
+ blockquote ol:last-child {
485
+ margin-bottom: 0;
486
+ }
487
+ blockquote footer,
488
+ blockquote small,
489
+ blockquote .small {
490
+ display: block;
491
+ font-size: 80%;
492
+ line-height: 1.42857143;
493
+ color: #777;
494
+ }
495
+ blockquote footer:before,
496
+ blockquote small:before,
497
+ blockquote .small:before {
498
+ content: '\2014 \00A0';
499
+ }
500
+ .blockquote-reverse,
501
+ blockquote.pull-right {
502
+ padding-right: 15px;
503
+ padding-left: 0;
504
+ text-align: right;
505
+ border-right: 5px solid #eee;
506
+ border-left: 0;
507
+ }
508
+ .blockquote-reverse footer:before,
509
+ blockquote.pull-right footer:before,
510
+ .blockquote-reverse small:before,
511
+ blockquote.pull-right small:before,
512
+ .blockquote-reverse .small:before,
513
+ blockquote.pull-right .small:before {
514
+ content: '';
515
+ }
516
+ .blockquote-reverse footer:after,
517
+ blockquote.pull-right footer:after,
518
+ .blockquote-reverse small:after,
519
+ blockquote.pull-right small:after,
520
+ .blockquote-reverse .small:after,
521
+ blockquote.pull-right .small:after {
522
+ content: '\00A0 \2014';
523
+ }
524
+ address {
525
+ margin-bottom: 20px;
526
+ font-style: normal;
527
+ line-height: 1.42857143;
528
+ }
529
+ code,
530
+ kbd,
531
+ pre,
532
+ samp {
533
+ font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
534
+ }
535
+ code {
536
+ padding: 2px 4px;
537
+ font-size: 90%;
538
+ color: #c7254e;
539
+ background-color: #f9f2f4;
540
+ border-radius: 4px;
541
+ }
542
+ kbd {
543
+ padding: 2px 4px;
544
+ font-size: 90%;
545
+ color: #fff;
546
+ background-color: #333;
547
+ border-radius: 3px;
548
+ -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
549
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
550
+ }
551
+ kbd kbd {
552
+ padding: 0;
553
+ font-size: 100%;
554
+ font-weight: bold;
555
+ -webkit-box-shadow: none;
556
+ box-shadow: none;
557
+ }
558
+ pre {
559
+ display: block;
560
+ padding: 9.5px;
561
+ margin: 0 0 10px;
562
+ font-size: 13px;
563
+ line-height: 1.42857143;
564
+ color: #333;
565
+ word-break: break-all;
566
+ word-wrap: break-word;
567
+ background-color: #f5f5f5;
568
+ border: 1px solid #ccc;
569
+ border-radius: 4px;
570
+ }
571
+ pre code {
572
+ padding: 0;
573
+ font-size: inherit;
574
+ color: inherit;
575
+ white-space: pre-wrap;
576
+ background-color: transparent;
577
+ border-radius: 0;
578
+ }
579
+ .pre-scrollable {
580
+ max-height: 340px;
581
+ overflow-y: scroll;
582
+ }
583
+ .container {
584
+ padding-right: 15px;
585
+ padding-left: 15px;
586
+ margin-right: auto;
587
+ margin-left: auto;
588
+ }
589
+ @media (min-width: 768px) {
590
+ .container {
591
+ width: 750px;
592
+ }
593
+ }
594
+ @media (min-width: 992px) {
595
+ .container {
596
+ width: 970px;
597
+ }
598
+ }
599
+ @media (min-width: 1200px) {
600
+ .container {
601
+ width: 1170px;
602
+ }
603
+ }
604
+ .container-fluid {
605
+ padding-left: 15px;
606
+ padding-right: 15px;
607
+ margin-right: auto;
608
+ margin-left: auto;
609
+ background: #fff;
610
+ }
611
+ .row {
612
+ margin-right: -15px;
613
+ margin-left: -15px;
614
+ }
615
+ .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
616
+ position: relative;
617
+ min-height: 1px;
618
+ padding: 12px;
619
+ }
620
+ .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
621
+ float: left;
622
+ }
623
+ .col-xs-12 {
624
+ width: 100%;
625
+ }
626
+ .col-xs-11 {
627
+ width: 91.66666667%;
628
+ }
629
+ .col-xs-10 {
630
+ width: 83.33333333%;
631
+ }
632
+ .col-xs-9 {
633
+ width: 75%;
634
+ }
635
+ .col-xs-8 {
636
+ width: 66.66666667%;
637
+ }
638
+ .col-xs-7 {
639
+ width: 58.33333333%;
640
+ }
641
+ .col-xs-6 {
642
+ width: 50%;
643
+ }
644
+ .col-xs-5 {
645
+ width: 41.66666667%;
646
+ }
647
+ .col-xs-4 {
648
+ width: 33.33333333%;
649
+ }
650
+ .col-xs-3 {
651
+ width: 25%;
652
+ }
653
+ .col-xs-2 {
654
+ width: 16.66666667%;
655
+ }
656
+ .col-xs-1 {
657
+ width: 8.33333333%;
658
+ }
659
+ .col-xs-pull-12 {
660
+ right: 100%;
661
+ }
662
+ .col-xs-pull-11 {
663
+ right: 91.66666667%;
664
+ }
665
+ .col-xs-pull-10 {
666
+ right: 83.33333333%;
667
+ }
668
+ .col-xs-pull-9 {
669
+ right: 75%;
670
+ }
671
+ .col-xs-pull-8 {
672
+ right: 66.66666667%;
673
+ }
674
+ .col-xs-pull-7 {
675
+ right: 58.33333333%;
676
+ }
677
+ .col-xs-pull-6 {
678
+ right: 50%;
679
+ }
680
+ .col-xs-pull-5 {
681
+ right: 41.66666667%;
682
+ }
683
+ .col-xs-pull-4 {
684
+ right: 33.33333333%;
685
+ }
686
+ .col-xs-pull-3 {
687
+ right: 25%;
688
+ }
689
+ .col-xs-pull-2 {
690
+ right: 16.66666667%;
691
+ }
692
+ .col-xs-pull-1 {
693
+ right: 8.33333333%;
694
+ }
695
+ .col-xs-pull-0 {
696
+ right: auto;
697
+ }
698
+ .col-xs-push-12 {
699
+ left: 100%;
700
+ }
701
+ .col-xs-push-11 {
702
+ left: 91.66666667%;
703
+ }
704
+ .col-xs-push-10 {
705
+ left: 83.33333333%;
706
+ }
707
+ .col-xs-push-9 {
708
+ left: 75%;
709
+ }
710
+ .col-xs-push-8 {
711
+ left: 66.66666667%;
712
+ }
713
+ .col-xs-push-7 {
714
+ left: 58.33333333%;
715
+ }
716
+ .col-xs-push-6 {
717
+ left: 50%;
718
+ }
719
+ .col-xs-push-5 {
720
+ left: 41.66666667%;
721
+ }
722
+ .col-xs-push-4 {
723
+ left: 33.33333333%;
724
+ }
725
+ .col-xs-push-3 {
726
+ left: 25%;
727
+ }
728
+ .col-xs-push-2 {
729
+ left: 16.66666667%;
730
+ }
731
+ .col-xs-push-1 {
732
+ left: 8.33333333%;
733
+ }
734
+ .col-xs-push-0 {
735
+ left: auto;
736
+ }
737
+ .col-xs-offset-12 {
738
+ margin-left: 100%;
739
+ }
740
+ .col-xs-offset-11 {
741
+ margin-left: 91.66666667%;
742
+ }
743
+ .col-xs-offset-10 {
744
+ margin-left: 83.33333333%;
745
+ }
746
+ .col-xs-offset-9 {
747
+ margin-left: 75%;
748
+ }
749
+ .col-xs-offset-8 {
750
+ margin-left: 66.66666667%;
751
+ }
752
+ .col-xs-offset-7 {
753
+ margin-left: 58.33333333%;
754
+ }
755
+ .col-xs-offset-6 {
756
+ margin-left: 50%;
757
+ }
758
+ .col-xs-offset-5 {
759
+ margin-left: 41.66666667%;
760
+ }
761
+ .col-xs-offset-4 {
762
+ margin-left: 33.33333333%;
763
+ }
764
+ .col-xs-offset-3 {
765
+ margin-left: 25%;
766
+ }
767
+ .col-xs-offset-2 {
768
+ margin-left: 16.66666667%;
769
+ }
770
+ .col-xs-offset-1 {
771
+ margin-left: 8.33333333%;
772
+ }
773
+ .col-xs-offset-0 {
774
+ margin-left: 0;
775
+ }
776
+ @media (min-width: 768px) {
777
+ .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
778
+ float: left;
779
+ }
780
+ .col-sm-12 {
781
+ width: 100%;
782
+ }
783
+ .col-sm-11 {
784
+ width: 91.66666667%;
785
+ }
786
+ .col-sm-10 {
787
+ width: 83.33333333%;
788
+ }
789
+ .col-sm-9 {
790
+ width: 75%;
791
+ }
792
+ .col-sm-8 {
793
+ width: 66.66666667%;
794
+ }
795
+ .col-sm-7 {
796
+ width: 58.33333333%;
797
+ }
798
+ .col-sm-6 {
799
+ width: 50%;
800
+ }
801
+ .col-sm-5 {
802
+ width: 41.66666667%;
803
+ }
804
+ .col-sm-4 {
805
+ width: 33.33333333%;
806
+ }
807
+ .col-sm-3 {
808
+ width: 25%;
809
+ }
810
+ .col-sm-2 {
811
+ width: 16.66666667%;
812
+ }
813
+ .col-sm-1 {
814
+ width: 8.33333333%;
815
+ }
816
+ .col-sm-pull-12 {
817
+ right: 100%;
818
+ }
819
+ .col-sm-pull-11 {
820
+ right: 91.66666667%;
821
+ }
822
+ .col-sm-pull-10 {
823
+ right: 83.33333333%;
824
+ }
825
+ .col-sm-pull-9 {
826
+ right: 75%;
827
+ }
828
+ .col-sm-pull-8 {
829
+ right: 66.66666667%;
830
+ }
831
+ .col-sm-pull-7 {
832
+ right: 58.33333333%;
833
+ }
834
+ .col-sm-pull-6 {
835
+ right: 50%;
836
+ }
837
+ .col-sm-pull-5 {
838
+ right: 41.66666667%;
839
+ }
840
+ .col-sm-pull-4 {
841
+ right: 33.33333333%;
842
+ }
843
+ .col-sm-pull-3 {
844
+ right: 25%;
845
+ }
846
+ .col-sm-pull-2 {
847
+ right: 16.66666667%;
848
+ }
849
+ .col-sm-pull-1 {
850
+ right: 8.33333333%;
851
+ }
852
+ .col-sm-pull-0 {
853
+ right: auto;
854
+ }
855
+ .col-sm-push-12 {
856
+ left: 100%;
857
+ }
858
+ .col-sm-push-11 {
859
+ left: 91.66666667%;
860
+ }
861
+ .col-sm-push-10 {
862
+ left: 83.33333333%;
863
+ }
864
+ .col-sm-push-9 {
865
+ left: 75%;
866
+ }
867
+ .col-sm-push-8 {
868
+ left: 66.66666667%;
869
+ }
870
+ .col-sm-push-7 {
871
+ left: 58.33333333%;
872
+ }
873
+ .col-sm-push-6 {
874
+ left: 50%;
875
+ }
876
+ .col-sm-push-5 {
877
+ left: 41.66666667%;
878
+ }
879
+ .col-sm-push-4 {
880
+ left: 33.33333333%;
881
+ }
882
+ .col-sm-push-3 {
883
+ left: 25%;
884
+ }
885
+ .col-sm-push-2 {
886
+ left: 16.66666667%;
887
+ }
888
+ .col-sm-push-1 {
889
+ left: 8.33333333%;
890
+ }
891
+ .col-sm-push-0 {
892
+ left: auto;
893
+ }
894
+ .col-sm-offset-12 {
895
+ margin-left: 100%;
896
+ }
897
+ .col-sm-offset-11 {
898
+ margin-left: 91.66666667%;
899
+ }
900
+ .col-sm-offset-10 {
901
+ margin-left: 83.33333333%;
902
+ }
903
+ .col-sm-offset-9 {
904
+ margin-left: 75%;
905
+ }
906
+ .col-sm-offset-8 {
907
+ margin-left: 66.66666667%;
908
+ }
909
+ .col-sm-offset-7 {
910
+ margin-left: 58.33333333%;
911
+ }
912
+ .col-sm-offset-6 {
913
+ margin-left: 50%;
914
+ }
915
+ .col-sm-offset-5 {
916
+ margin-left: 41.66666667%;
917
+ }
918
+ .col-sm-offset-4 {
919
+ margin-left: 33.33333333%;
920
+ }
921
+ .col-sm-offset-3 {
922
+ margin-left: 25%;
923
+ }
924
+ .col-sm-offset-2 {
925
+ margin-left: 16.66666667%;
926
+ }
927
+ .col-sm-offset-1 {
928
+ margin-left: 8.33333333%;
929
+ }
930
+ .col-sm-offset-0 {
931
+ margin-left: 0;
932
+ }
933
+ }
934
+ @media (min-width: 992px) {
935
+ .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
936
+ float: left;
937
+ }
938
+ .col-md-12 {
939
+ width: 100%;
940
+ }
941
+ .col-md-11 {
942
+ width: 91.66666667%;
943
+ }
944
+ .col-md-10 {
945
+ width: 83.33333333%;
946
+ }
947
+ .col-md-9 {
948
+ width: 75%;
949
+ }
950
+ .col-md-8 {
951
+ width: 66.66666667%;
952
+ }
953
+ .col-md-7 {
954
+ width: 58.33333333%;
955
+ }
956
+ .col-md-6 {
957
+ width: 50%;
958
+ }
959
+ .col-md-5 {
960
+ width: 41.66666667%;
961
+ }
962
+ .col-md-4 {
963
+ width: 33.33333333%;
964
+ }
965
+ .col-md-3 {
966
+ width: 25%;
967
+ }
968
+ .col-md-2 {
969
+ width: 16.66666667%;
970
+ }
971
+ .col-md-1 {
972
+ width: 8.33333333%;
973
+ }
974
+ .col-md-pull-12 {
975
+ right: 100%;
976
+ }
977
+ .col-md-pull-11 {
978
+ right: 91.66666667%;
979
+ }
980
+ .col-md-pull-10 {
981
+ right: 83.33333333%;
982
+ }
983
+ .col-md-pull-9 {
984
+ right: 75%;
985
+ }
986
+ .col-md-pull-8 {
987
+ right: 66.66666667%;
988
+ }
989
+ .col-md-pull-7 {
990
+ right: 58.33333333%;
991
+ }
992
+ .col-md-pull-6 {
993
+ right: 50%;
994
+ }
995
+ .col-md-pull-5 {
996
+ right: 41.66666667%;
997
+ }
998
+ .col-md-pull-4 {
999
+ right: 33.33333333%;
1000
+ }
1001
+ .col-md-pull-3 {
1002
+ right: 25%;
1003
+ }
1004
+ .col-md-pull-2 {
1005
+ right: 16.66666667%;
1006
+ }
1007
+ .col-md-pull-1 {
1008
+ right: 8.33333333%;
1009
+ }
1010
+ .col-md-pull-0 {
1011
+ right: auto;
1012
+ }
1013
+ .col-md-push-12 {
1014
+ left: 100%;
1015
+ }
1016
+ .col-md-push-11 {
1017
+ left: 91.66666667%;
1018
+ }
1019
+ .col-md-push-10 {
1020
+ left: 83.33333333%;
1021
+ }
1022
+ .col-md-push-9 {
1023
+ left: 75%;
1024
+ }
1025
+ .col-md-push-8 {
1026
+ left: 66.66666667%;
1027
+ }
1028
+ .col-md-push-7 {
1029
+ left: 58.33333333%;
1030
+ }
1031
+ .col-md-push-6 {
1032
+ left: 50%;
1033
+ }
1034
+ .col-md-push-5 {
1035
+ left: 41.66666667%;
1036
+ }
1037
+ .col-md-push-4 {
1038
+ left: 33.33333333%;
1039
+ }
1040
+ .col-md-push-3 {
1041
+ left: 25%;
1042
+ }
1043
+ .col-md-push-2 {
1044
+ left: 16.66666667%;
1045
+ }
1046
+ .col-md-push-1 {
1047
+ left: 8.33333333%;
1048
+ }
1049
+ .col-md-push-0 {
1050
+ left: auto;
1051
+ }
1052
+ .col-md-offset-12 {
1053
+ margin-left: 100%;
1054
+ }
1055
+ .col-md-offset-11 {
1056
+ margin-left: 91.66666667%;
1057
+ }
1058
+ .col-md-offset-10 {
1059
+ margin-left: 83.33333333%;
1060
+ }
1061
+ .col-md-offset-9 {
1062
+ margin-left: 75%;
1063
+ }
1064
+ .col-md-offset-8 {
1065
+ margin-left: 66.66666667%;
1066
+ }
1067
+ .col-md-offset-7 {
1068
+ margin-left: 58.33333333%;
1069
+ }
1070
+ .col-md-offset-6 {
1071
+ margin-left: 50%;
1072
+ }
1073
+ .col-md-offset-5 {
1074
+ margin-left: 41.66666667%;
1075
+ }
1076
+ .col-md-offset-4 {
1077
+ margin-left: 33.33333333%;
1078
+ }
1079
+ .col-md-offset-3 {
1080
+ margin-left: 25%;
1081
+ }
1082
+ .col-md-offset-2 {
1083
+ margin-left: 16.66666667%;
1084
+ }
1085
+ .col-md-offset-1 {
1086
+ margin-left: 8.33333333%;
1087
+ }
1088
+ .col-md-offset-0 {
1089
+ margin-left: 0;
1090
+ }
1091
+ }
1092
+ @media (min-width: 1200px) {
1093
+ .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
1094
+ float: left;
1095
+ }
1096
+ .col-lg-12 {
1097
+ width: 100%;
1098
+ }
1099
+ .col-lg-11 {
1100
+ width: 91.66666667%;
1101
+ }
1102
+ .col-lg-10 {
1103
+ width: 83.33333333%;
1104
+ }
1105
+ .col-lg-9 {
1106
+ width: 75%;
1107
+ }
1108
+ .col-lg-8 {
1109
+ width: 66.66666667%;
1110
+ }
1111
+ .col-lg-7 {
1112
+ width: 58.33333333%;
1113
+ }
1114
+ .col-lg-6 {
1115
+ width: 50%;
1116
+ }
1117
+ .col-lg-5 {
1118
+ width: 41.66666667%;
1119
+ }
1120
+ .col-lg-4 {
1121
+ width: 33.33333333%;
1122
+ }
1123
+ .col-lg-3 {
1124
+ width: 25%;
1125
+ }
1126
+ .col-lg-2 {
1127
+ width: 16.66666667%;
1128
+ }
1129
+ .col-lg-1 {
1130
+ width: 8.33333333%;
1131
+ }
1132
+ .col-lg-pull-12 {
1133
+ right: 100%;
1134
+ }
1135
+ .col-lg-pull-11 {
1136
+ right: 91.66666667%;
1137
+ }
1138
+ .col-lg-pull-10 {
1139
+ right: 83.33333333%;
1140
+ }
1141
+ .col-lg-pull-9 {
1142
+ right: 75%;
1143
+ }
1144
+ .col-lg-pull-8 {
1145
+ right: 66.66666667%;
1146
+ }
1147
+ .col-lg-pull-7 {
1148
+ right: 58.33333333%;
1149
+ }
1150
+ .col-lg-pull-6 {
1151
+ right: 50%;
1152
+ }
1153
+ .col-lg-pull-5 {
1154
+ right: 41.66666667%;
1155
+ }
1156
+ .col-lg-pull-4 {
1157
+ right: 33.33333333%;
1158
+ }
1159
+ .col-lg-pull-3 {
1160
+ right: 25%;
1161
+ }
1162
+ .col-lg-pull-2 {
1163
+ right: 16.66666667%;
1164
+ }
1165
+ .col-lg-pull-1 {
1166
+ right: 8.33333333%;
1167
+ }
1168
+ .col-lg-pull-0 {
1169
+ right: auto;
1170
+ }
1171
+ .col-lg-push-12 {
1172
+ left: 100%;
1173
+ }
1174
+ .col-lg-push-11 {
1175
+ left: 91.66666667%;
1176
+ }
1177
+ .col-lg-push-10 {
1178
+ left: 83.33333333%;
1179
+ }
1180
+ .col-lg-push-9 {
1181
+ left: 75%;
1182
+ }
1183
+ .col-lg-push-8 {
1184
+ left: 66.66666667%;
1185
+ }
1186
+ .col-lg-push-7 {
1187
+ left: 58.33333333%;
1188
+ }
1189
+ .col-lg-push-6 {
1190
+ left: 50%;
1191
+ }
1192
+ .col-lg-push-5 {
1193
+ left: 41.66666667%;
1194
+ }
1195
+ .col-lg-push-4 {
1196
+ left: 33.33333333%;
1197
+ }
1198
+ .col-lg-push-3 {
1199
+ left: 25%;
1200
+ }
1201
+ .col-lg-push-2 {
1202
+ left: 16.66666667%;
1203
+ }
1204
+ .col-lg-push-1 {
1205
+ left: 8.33333333%;
1206
+ }
1207
+ .col-lg-push-0 {
1208
+ left: auto;
1209
+ }
1210
+ .col-lg-offset-12 {
1211
+ margin-left: 100%;
1212
+ }
1213
+ .col-lg-offset-11 {
1214
+ margin-left: 91.66666667%;
1215
+ }
1216
+ .col-lg-offset-10 {
1217
+ margin-left: 83.33333333%;
1218
+ }
1219
+ .col-lg-offset-9 {
1220
+ margin-left: 75%;
1221
+ }
1222
+ .col-lg-offset-8 {
1223
+ margin-left: 66.66666667%;
1224
+ }
1225
+ .col-lg-offset-7 {
1226
+ margin-left: 58.33333333%;
1227
+ }
1228
+ .col-lg-offset-6 {
1229
+ margin-left: 50%;
1230
+ }
1231
+ .col-lg-offset-5 {
1232
+ margin-left: 41.66666667%;
1233
+ }
1234
+ .col-lg-offset-4 {
1235
+ margin-left: 33.33333333%;
1236
+ }
1237
+ .col-lg-offset-3 {
1238
+ margin-left: 25%;
1239
+ }
1240
+ .col-lg-offset-2 {
1241
+ margin-left: 16.66666667%;
1242
+ }
1243
+ .col-lg-offset-1 {
1244
+ margin-left: 8.33333333%;
1245
+ }
1246
+ .col-lg-offset-0 {
1247
+ margin-left: 0;
1248
+ }
1249
+ }
1250
+ table {
1251
+ background-color: transparent;
1252
+ }
1253
+ caption {
1254
+ padding-top: 8px;
1255
+ padding-bottom: 8px;
1256
+ color: #777;
1257
+ text-align: left;
1258
+ }
1259
+ th {
1260
+ text-align: left;
1261
+ }
1262
+ .table {
1263
+ width: 100%;
1264
+ max-width: 100%;
1265
+ margin-bottom: 20px;
1266
+ }
1267
+ .table > thead > tr > th,
1268
+ .table > tbody > tr > th,
1269
+ .table > tfoot > tr > th,
1270
+ .table > thead > tr > td,
1271
+ .table > tbody > tr > td,
1272
+ .table > tfoot > tr > td {
1273
+ padding: 8px;
1274
+ line-height: 1.42857143;
1275
+ vertical-align: top;
1276
+ border-top: 1px solid #ddd;
1277
+ }
1278
+ .table > thead > tr > th {
1279
+ vertical-align: bottom;
1280
+ border-bottom: 2px solid #ddd;
1281
+ }
1282
+ .table > caption + thead > tr:first-child > th,
1283
+ .table > colgroup + thead > tr:first-child > th,
1284
+ .table > thead:first-child > tr:first-child > th,
1285
+ .table > caption + thead > tr:first-child > td,
1286
+ .table > colgroup + thead > tr:first-child > td,
1287
+ .table > thead:first-child > tr:first-child > td {
1288
+ border-top: 0;
1289
+ }
1290
+ .table > tbody + tbody {
1291
+ border-top: 2px solid #ddd;
1292
+ }
1293
+ .table .table {
1294
+ background-color: #fff;
1295
+ }
1296
+ .table-condensed > thead > tr > th,
1297
+ .table-condensed > tbody > tr > th,
1298
+ .table-condensed > tfoot > tr > th,
1299
+ .table-condensed > thead > tr > td,
1300
+ .table-condensed > tbody > tr > td,
1301
+ .table-condensed > tfoot > tr > td {
1302
+ padding: 5px;
1303
+ }
1304
+ .table-bordered {
1305
+ border: 1px solid #ddd;
1306
+ }
1307
+ .table-bordered > thead > tr > th,
1308
+ .table-bordered > tbody > tr > th,
1309
+ .table-bordered > tfoot > tr > th,
1310
+ .table-bordered > thead > tr > td,
1311
+ .table-bordered > tbody > tr > td,
1312
+ .table-bordered > tfoot > tr > td {
1313
+ border: 1px solid #ddd;
1314
+ }
1315
+ .table-bordered > thead > tr > th,
1316
+ .table-bordered > thead > tr > td {
1317
+ border-bottom-width: 2px;
1318
+ }
1319
+ .table-striped > tbody > tr:nth-of-type(odd) {
1320
+ background-color: #f9f9f9;
1321
+ }
1322
+ .table-hover > tbody > tr:hover {
1323
+ background-color: #f5f5f5;
1324
+ }
1325
+ table col[class*="col-"] {
1326
+ position: static;
1327
+ display: table-column;
1328
+ float: none;
1329
+ }
1330
+ table td[class*="col-"],
1331
+ table th[class*="col-"] {
1332
+ position: static;
1333
+ display: table-cell;
1334
+ float: none;
1335
+ }
1336
+ .table > thead > tr > td.active,
1337
+ .table > tbody > tr > td.active,
1338
+ .table > tfoot > tr > td.active,
1339
+ .table > thead > tr > th.active,
1340
+ .table > tbody > tr > th.active,
1341
+ .table > tfoot > tr > th.active,
1342
+ .table > thead > tr.active > td,
1343
+ .table > tbody > tr.active > td,
1344
+ .table > tfoot > tr.active > td,
1345
+ .table > thead > tr.active > th,
1346
+ .table > tbody > tr.active > th,
1347
+ .table > tfoot > tr.active > th {
1348
+ background-color: #f5f5f5;
1349
+ }
1350
+ .table-hover > tbody > tr > td.active:hover,
1351
+ .table-hover > tbody > tr > th.active:hover,
1352
+ .table-hover > tbody > tr.active:hover > td,
1353
+ .table-hover > tbody > tr:hover > .active,
1354
+ .table-hover > tbody > tr.active:hover > th {
1355
+ background-color: #e8e8e8;
1356
+ }
1357
+ .table > thead > tr > td.success,
1358
+ .table > tbody > tr > td.success,
1359
+ .table > tfoot > tr > td.success,
1360
+ .table > thead > tr > th.success,
1361
+ .table > tbody > tr > th.success,
1362
+ .table > tfoot > tr > th.success,
1363
+ .table > thead > tr.success > td,
1364
+ .table > tbody > tr.success > td,
1365
+ .table > tfoot > tr.success > td,
1366
+ .table > thead > tr.success > th,
1367
+ .table > tbody > tr.success > th,
1368
+ .table > tfoot > tr.success > th {
1369
+ background-color: #dff0d8;
1370
+ }
1371
+ .table-hover > tbody > tr > td.success:hover,
1372
+ .table-hover > tbody > tr > th.success:hover,
1373
+ .table-hover > tbody > tr.success:hover > td,
1374
+ .table-hover > tbody > tr:hover > .success,
1375
+ .table-hover > tbody > tr.success:hover > th {
1376
+ background-color: #d0e9c6;
1377
+ }
1378
+ .table > thead > tr > td.info,
1379
+ .table > tbody > tr > td.info,
1380
+ .table > tfoot > tr > td.info,
1381
+ .table > thead > tr > th.info,
1382
+ .table > tbody > tr > th.info,
1383
+ .table > tfoot > tr > th.info,
1384
+ .table > thead > tr.info > td,
1385
+ .table > tbody > tr.info > td,
1386
+ .table > tfoot > tr.info > td,
1387
+ .table > thead > tr.info > th,
1388
+ .table > tbody > tr.info > th,
1389
+ .table > tfoot > tr.info > th {
1390
+ background-color: #d9edf7;
1391
+ }
1392
+ .table-hover > tbody > tr > td.info:hover,
1393
+ .table-hover > tbody > tr > th.info:hover,
1394
+ .table-hover > tbody > tr.info:hover > td,
1395
+ .table-hover > tbody > tr:hover > .info,
1396
+ .table-hover > tbody > tr.info:hover > th {
1397
+ background-color: #c4e3f3;
1398
+ }
1399
+ .table > thead > tr > td.warning,
1400
+ .table > tbody > tr > td.warning,
1401
+ .table > tfoot > tr > td.warning,
1402
+ .table > thead > tr > th.warning,
1403
+ .table > tbody > tr > th.warning,
1404
+ .table > tfoot > tr > th.warning,
1405
+ .table > thead > tr.warning > td,
1406
+ .table > tbody > tr.warning > td,
1407
+ .table > tfoot > tr.warning > td,
1408
+ .table > thead > tr.warning > th,
1409
+ .table > tbody > tr.warning > th,
1410
+ .table > tfoot > tr.warning > th {
1411
+ background-color: #fcf8e3;
1412
+ }
1413
+ .table-hover > tbody > tr > td.warning:hover,
1414
+ .table-hover > tbody > tr > th.warning:hover,
1415
+ .table-hover > tbody > tr.warning:hover > td,
1416
+ .table-hover > tbody > tr:hover > .warning,
1417
+ .table-hover > tbody > tr.warning:hover > th {
1418
+ background-color: #faf2cc;
1419
+ }
1420
+ .table > thead > tr > td.danger,
1421
+ .table > tbody > tr > td.danger,
1422
+ .table > tfoot > tr > td.danger,
1423
+ .table > thead > tr > th.danger,
1424
+ .table > tbody > tr > th.danger,
1425
+ .table > tfoot > tr > th.danger,
1426
+ .table > thead > tr.danger > td,
1427
+ .table > tbody > tr.danger > td,
1428
+ .table > tfoot > tr.danger > td,
1429
+ .table > thead > tr.danger > th,
1430
+ .table > tbody > tr.danger > th,
1431
+ .table > tfoot > tr.danger > th {
1432
+ background-color: #f2dede;
1433
+ }
1434
+ .table-hover > tbody > tr > td.danger:hover,
1435
+ .table-hover > tbody > tr > th.danger:hover,
1436
+ .table-hover > tbody > tr.danger:hover > td,
1437
+ .table-hover > tbody > tr:hover > .danger,
1438
+ .table-hover > tbody > tr.danger:hover > th {
1439
+ background-color: #ebcccc;
1440
+ }
1441
+ .table-responsive {
1442
+ min-height: .01%;
1443
+ overflow-x: auto;
1444
+ }
1445
+ @media screen and (max-width: 767px) {
1446
+ .table-responsive {
1447
+ width: 100%;
1448
+ margin-bottom: 15px;
1449
+ overflow-y: hidden;
1450
+ -ms-overflow-style: -ms-autohiding-scrollbar;
1451
+ border: 1px solid #ddd;
1452
+ }
1453
+ .table-responsive > .table {
1454
+ margin-bottom: 0;
1455
+ }
1456
+ .table-responsive > .table > thead > tr > th,
1457
+ .table-responsive > .table > tbody > tr > th,
1458
+ .table-responsive > .table > tfoot > tr > th,
1459
+ .table-responsive > .table > thead > tr > td,
1460
+ .table-responsive > .table > tbody > tr > td,
1461
+ .table-responsive > .table > tfoot > tr > td {
1462
+ white-space: nowrap;
1463
+ }
1464
+ .table-responsive > .table-bordered {
1465
+ border: 0;
1466
+ }
1467
+ .table-responsive > .table-bordered > thead > tr > th:first-child,
1468
+ .table-responsive > .table-bordered > tbody > tr > th:first-child,
1469
+ .table-responsive > .table-bordered > tfoot > tr > th:first-child,
1470
+ .table-responsive > .table-bordered > thead > tr > td:first-child,
1471
+ .table-responsive > .table-bordered > tbody > tr > td:first-child,
1472
+ .table-responsive > .table-bordered > tfoot > tr > td:first-child {
1473
+ border-left: 0;
1474
+ }
1475
+ .table-responsive > .table-bordered > thead > tr > th:last-child,
1476
+ .table-responsive > .table-bordered > tbody > tr > th:last-child,
1477
+ .table-responsive > .table-bordered > tfoot > tr > th:last-child,
1478
+ .table-responsive > .table-bordered > thead > tr > td:last-child,
1479
+ .table-responsive > .table-bordered > tbody > tr > td:last-child,
1480
+ .table-responsive > .table-bordered > tfoot > tr > td:last-child {
1481
+ border-right: 0;
1482
+ }
1483
+ .table-responsive > .table-bordered > tbody > tr:last-child > th,
1484
+ .table-responsive > .table-bordered > tfoot > tr:last-child > th,
1485
+ .table-responsive > .table-bordered > tbody > tr:last-child > td,
1486
+ .table-responsive > .table-bordered > tfoot > tr:last-child > td {
1487
+ border-bottom: 0;
1488
+ }
1489
+ }
1490
+ fieldset {
1491
+ min-width: 0;
1492
+ padding: 0;
1493
+ margin: 0;
1494
+ border: 0;
1495
+ }
1496
+ legend {
1497
+ display: block;
1498
+ width: 100%;
1499
+ padding: 0;
1500
+ margin-bottom: 20px;
1501
+ font-size: 21px;
1502
+ line-height: inherit;
1503
+ color: #333;
1504
+ border: 0;
1505
+ border-bottom: 1px solid #e5e5e5;
1506
+ }
1507
+
1508
+ input[type="search"] {
1509
+ -webkit-box-sizing: border-box;
1510
+ -moz-box-sizing: border-box;
1511
+ box-sizing: border-box;
1512
+ }
1513
+ input[type="radio"],
1514
+ input[type="checkbox"] {
1515
+ margin: 4px 0 0;
1516
+ margin-top: 1px \9;
1517
+ line-height: normal;
1518
+ }
1519
+ input[type="file"] {
1520
+ display: block;
1521
+ }
1522
+ input[type="range"] {
1523
+ display: block;
1524
+ width: 100%;
1525
+ }
1526
+ select[multiple],
1527
+ select[size] {
1528
+ height: auto;
1529
+ }
1530
+ input[type="file"]:focus,
1531
+ input[type="radio"]:focus,
1532
+ input[type="checkbox"]:focus {
1533
+ outline: thin dotted;
1534
+ outline: 5px auto -webkit-focus-ring-color;
1535
+ outline-offset: -2px;
1536
+ }
1537
+ output {
1538
+ display: block;
1539
+ padding-top: 7px;
1540
+ font-size: 14px;
1541
+ line-height: 1.42857143;
1542
+ color: #555;
1543
+ }
1544
+ .form-control {
1545
+ display: block;
1546
+ width: 100%;
1547
+ height: 34px;
1548
+ padding: 6px 12px;
1549
+ font-size: 14px;
1550
+ line-height: 1.42857143;
1551
+ color: #555;
1552
+ background-color: #fff;
1553
+ background-image: none;
1554
+ border: 1px solid #ccc;
1555
+ border-radius: 4px;
1556
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
1557
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
1558
+ -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
1559
+ -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
1560
+ transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
1561
+ }
1562
+ .form-control:focus {
1563
+ border-color: #66afe9;
1564
+ outline: 0;
1565
+ -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
1566
+ box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
1567
+ }
1568
+ .form-control::-moz-placeholder {
1569
+ color: #999;
1570
+ opacity: 1;
1571
+ }
1572
+ .form-control:-ms-input-placeholder {
1573
+ color: #999;
1574
+ }
1575
+ .form-control::-webkit-input-placeholder {
1576
+ color: #999;
1577
+ }
1578
+ .form-control::-ms-expand {
1579
+ background-color: transparent;
1580
+ border: 0;
1581
+ }
1582
+ .form-control[disabled],
1583
+ .form-control[readonly],
1584
+ fieldset[disabled] .form-control {
1585
+ background-color: #eee;
1586
+ opacity: 1;
1587
+ }
1588
+ .form-control[disabled],
1589
+ fieldset[disabled] .form-control {
1590
+ cursor: not-allowed;
1591
+ }
1592
+ textarea.form-control {
1593
+ height: auto;
1594
+ }
1595
+ input[type="search"] {
1596
+ -webkit-appearance: none;
1597
+ }
1598
+ @media screen and (-webkit-min-device-pixel-ratio: 0) {
1599
+ input[type="date"].form-control,
1600
+ input[type="time"].form-control,
1601
+ input[type="datetime-local"].form-control,
1602
+ input[type="month"].form-control {
1603
+ line-height: 34px;
1604
+ }
1605
+ input[type="date"].input-sm,
1606
+ input[type="time"].input-sm,
1607
+ input[type="datetime-local"].input-sm,
1608
+ input[type="month"].input-sm,
1609
+ .input-group-sm input[type="date"],
1610
+ .input-group-sm input[type="time"],
1611
+ .input-group-sm input[type="datetime-local"],
1612
+ .input-group-sm input[type="month"] {
1613
+ line-height: 30px;
1614
+ }
1615
+ input[type="date"].input-lg,
1616
+ input[type="time"].input-lg,
1617
+ input[type="datetime-local"].input-lg,
1618
+ input[type="month"].input-lg,
1619
+ .input-group-lg input[type="date"],
1620
+ .input-group-lg input[type="time"],
1621
+ .input-group-lg input[type="datetime-local"],
1622
+ .input-group-lg input[type="month"] {
1623
+ line-height: 46px;
1624
+ }
1625
+ }
1626
+ .form-group {
1627
+ margin-bottom: 15px;
1628
+ }
1629
+ .radio,
1630
+ .checkbox {
1631
+ position: relative;
1632
+ display: block;
1633
+ margin-top: 10px;
1634
+ margin-bottom: 10px;
1635
+ }
1636
+ .radio label,
1637
+ .checkbox label {
1638
+ min-height: 20px;
1639
+ padding-left: 20px;
1640
+ margin-bottom: 0;
1641
+ font-weight: normal;
1642
+ cursor: pointer;
1643
+ }
1644
+ .radio input[type="radio"],
1645
+ .radio-inline input[type="radio"],
1646
+ .checkbox input[type="checkbox"],
1647
+ .checkbox-inline input[type="checkbox"] {
1648
+ position: absolute;
1649
+ margin-top: 4px \9;
1650
+ margin-left: -20px;
1651
+ }
1652
+ .radio + .radio,
1653
+ .checkbox + .checkbox {
1654
+ margin-top: -5px;
1655
+ }
1656
+ .radio-inline,
1657
+ .checkbox-inline {
1658
+ position: relative;
1659
+ display: inline-block;
1660
+ padding-left: 20px;
1661
+ margin-bottom: 0;
1662
+ font-weight: normal;
1663
+ vertical-align: middle;
1664
+ cursor: pointer;
1665
+ }
1666
+ .radio-inline + .radio-inline,
1667
+ .checkbox-inline + .checkbox-inline {
1668
+ margin-top: 0;
1669
+ margin-left: 10px;
1670
+ }
1671
+ input[type="radio"][disabled],
1672
+ input[type="checkbox"][disabled],
1673
+ input[type="radio"].disabled,
1674
+ input[type="checkbox"].disabled,
1675
+ fieldset[disabled] input[type="radio"],
1676
+ fieldset[disabled] input[type="checkbox"] {
1677
+ cursor: not-allowed;
1678
+ }
1679
+ .radio-inline.disabled,
1680
+ .checkbox-inline.disabled,
1681
+ fieldset[disabled] .radio-inline,
1682
+ fieldset[disabled] .checkbox-inline {
1683
+ cursor: not-allowed;
1684
+ }
1685
+ .radio.disabled label,
1686
+ .checkbox.disabled label,
1687
+ fieldset[disabled] .radio label,
1688
+ fieldset[disabled] .checkbox label {
1689
+ cursor: not-allowed;
1690
+ }
1691
+ .form-control-static {
1692
+ min-height: 34px;
1693
+ padding-top: 7px;
1694
+ padding-bottom: 7px;
1695
+ margin-bottom: 0;
1696
+ }
1697
+ .form-control-static.input-lg,
1698
+ .form-control-static.input-sm {
1699
+ padding-right: 0;
1700
+ padding-left: 0;
1701
+ }
1702
+ .input-sm {
1703
+ height: 30px;
1704
+ padding: 5px 10px;
1705
+ font-size: 12px;
1706
+ line-height: 1.5;
1707
+ border-radius: 3px;
1708
+ }
1709
+ select.input-sm {
1710
+ height: 30px;
1711
+ line-height: 30px;
1712
+ }
1713
+ textarea.input-sm,
1714
+ select[multiple].input-sm {
1715
+ height: auto;
1716
+ }
1717
+ .form-group-sm .form-control {
1718
+ height: 30px;
1719
+ padding: 5px 10px;
1720
+ font-size: 12px;
1721
+ line-height: 1.5;
1722
+ border-radius: 3px;
1723
+ }
1724
+ .form-group-sm select.form-control {
1725
+ height: 30px;
1726
+ line-height: 30px;
1727
+ }
1728
+ .form-group-sm textarea.form-control,
1729
+ .form-group-sm select[multiple].form-control {
1730
+ height: auto;
1731
+ }
1732
+ .form-group-sm .form-control-static {
1733
+ height: 30px;
1734
+ min-height: 32px;
1735
+ padding: 6px 10px;
1736
+ font-size: 12px;
1737
+ line-height: 1.5;
1738
+ }
1739
+ .input-lg {
1740
+ height: 46px;
1741
+ padding: 10px 16px;
1742
+ font-size: 18px;
1743
+ line-height: 1.3333333;
1744
+ border-radius: 6px;
1745
+ }
1746
+ select.input-lg {
1747
+ height: 46px;
1748
+ line-height: 46px;
1749
+ }
1750
+ textarea.input-lg,
1751
+ select[multiple].input-lg {
1752
+ height: auto;
1753
+ }
1754
+ .form-group-lg .form-control {
1755
+ height: 46px;
1756
+ padding: 10px 16px;
1757
+ font-size: 18px;
1758
+ line-height: 1.3333333;
1759
+ border-radius: 6px;
1760
+ }
1761
+ .form-group-lg select.form-control {
1762
+ height: 46px;
1763
+ line-height: 46px;
1764
+ }
1765
+ .form-group-lg textarea.form-control,
1766
+ .form-group-lg select[multiple].form-control {
1767
+ height: auto;
1768
+ }
1769
+ .form-group-lg .form-control-static {
1770
+ height: 46px;
1771
+ min-height: 38px;
1772
+ padding: 11px 16px;
1773
+ font-size: 18px;
1774
+ line-height: 1.3333333;
1775
+ }
1776
+ .has-feedback {
1777
+ position: relative;
1778
+ }
1779
+ .has-feedback .form-control {
1780
+ padding-right: 42.5px;
1781
+ }
1782
+ .form-control-feedback {
1783
+ position: absolute;
1784
+ top: 0;
1785
+ right: 0;
1786
+ z-index: 2;
1787
+ display: block;
1788
+ width: 34px;
1789
+ height: 34px;
1790
+ line-height: 34px;
1791
+ text-align: center;
1792
+ pointer-events: none;
1793
+ }
1794
+ .input-lg + .form-control-feedback,
1795
+ .input-group-lg + .form-control-feedback,
1796
+ .form-group-lg .form-control + .form-control-feedback {
1797
+ width: 46px;
1798
+ height: 46px;
1799
+ line-height: 46px;
1800
+ }
1801
+ .input-sm + .form-control-feedback,
1802
+ .input-group-sm + .form-control-feedback,
1803
+ .form-group-sm .form-control + .form-control-feedback {
1804
+ width: 30px;
1805
+ height: 30px;
1806
+ line-height: 30px;
1807
+ }
1808
+ .has-success .help-block,
1809
+ .has-success .control-label,
1810
+ .has-success .radio,
1811
+ .has-success .checkbox,
1812
+ .has-success .radio-inline,
1813
+ .has-success .checkbox-inline,
1814
+ .has-success.radio label,
1815
+ .has-success.checkbox label,
1816
+ .has-success.radio-inline label,
1817
+ .has-success.checkbox-inline label {
1818
+ color: #3c763d;
1819
+ }
1820
+ .has-success .form-control {
1821
+ border-color: #3c763d;
1822
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
1823
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
1824
+ }
1825
+ .has-success .form-control:focus {
1826
+ border-color: #2b542c;
1827
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
1828
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
1829
+ }
1830
+ .has-success .input-group-addon {
1831
+ color: #3c763d;
1832
+ background-color: #dff0d8;
1833
+ border-color: #3c763d;
1834
+ }
1835
+ .has-success .form-control-feedback {
1836
+ color: #3c763d;
1837
+ }
1838
+ .has-warning .help-block,
1839
+ .has-warning .control-label,
1840
+ .has-warning .radio,
1841
+ .has-warning .checkbox,
1842
+ .has-warning .radio-inline,
1843
+ .has-warning .checkbox-inline,
1844
+ .has-warning.radio label,
1845
+ .has-warning.checkbox label,
1846
+ .has-warning.radio-inline label,
1847
+ .has-warning.checkbox-inline label {
1848
+ color: #8a6d3b;
1849
+ }
1850
+ .has-warning .form-control {
1851
+ border-color: #8a6d3b;
1852
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
1853
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
1854
+ }
1855
+ .has-warning .form-control:focus {
1856
+ border-color: #66512c;
1857
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
1858
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
1859
+ }
1860
+ .has-warning .input-group-addon {
1861
+ color: #8a6d3b;
1862
+ background-color: #fcf8e3;
1863
+ border-color: #8a6d3b;
1864
+ }
1865
+ .has-warning .form-control-feedback {
1866
+ color: #8a6d3b;
1867
+ }
1868
+ .has-error .help-block,
1869
+ .has-error .control-label,
1870
+ .has-error .radio,
1871
+ .has-error .checkbox,
1872
+ .has-error .radio-inline,
1873
+ .has-error .checkbox-inline,
1874
+ .has-error.radio label,
1875
+ .has-error.checkbox label,
1876
+ .has-error.radio-inline label,
1877
+ .has-error.checkbox-inline label {
1878
+ color: #a94442;
1879
+ }
1880
+ .has-error .form-control {
1881
+ border-color: #a94442;
1882
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
1883
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
1884
+ }
1885
+ .has-error .form-control:focus {
1886
+ border-color: #843534;
1887
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
1888
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
1889
+ }
1890
+ .has-error .input-group-addon {
1891
+ color: #a94442;
1892
+ background-color: #f2dede;
1893
+ border-color: #a94442;
1894
+ }
1895
+ .has-error .form-control-feedback {
1896
+ color: #a94442;
1897
+ }
1898
+ .has-feedback label ~ .form-control-feedback {
1899
+ top: 25px;
1900
+ }
1901
+ .has-feedback label.sr-only ~ .form-control-feedback {
1902
+ top: 0;
1903
+ }
1904
+ .help-block {
1905
+ display: block;
1906
+ margin-top: 5px;
1907
+ margin-bottom: 10px;
1908
+ color: #737373;
1909
+ }
1910
+ @media (min-width: 768px) {
1911
+ .form-inline .form-group {
1912
+ display: inline-block;
1913
+ margin-bottom: 0;
1914
+ vertical-align: middle;
1915
+ }
1916
+ .form-inline .form-control {
1917
+ display: inline-block;
1918
+ width: auto;
1919
+ vertical-align: middle;
1920
+ }
1921
+ .form-inline .form-control-static {
1922
+ display: inline-block;
1923
+ }
1924
+ .form-inline .input-group {
1925
+ display: inline-table;
1926
+ vertical-align: middle;
1927
+ }
1928
+ .form-inline .input-group .input-group-addon,
1929
+ .form-inline .input-group .input-group-btn,
1930
+ .form-inline .input-group .form-control {
1931
+ width: auto;
1932
+ }
1933
+ .form-inline .input-group > .form-control {
1934
+ width: 100%;
1935
+ }
1936
+ .form-inline .control-label {
1937
+ margin-bottom: 0;
1938
+ vertical-align: middle;
1939
+ }
1940
+ .form-inline .radio,
1941
+ .form-inline .checkbox {
1942
+ display: inline-block;
1943
+ margin-top: 0;
1944
+ margin-bottom: 0;
1945
+ vertical-align: middle;
1946
+ }
1947
+ .form-inline .radio label,
1948
+ .form-inline .checkbox label {
1949
+ padding-left: 0;
1950
+ }
1951
+ .form-inline .radio input[type="radio"],
1952
+ .form-inline .checkbox input[type="checkbox"] {
1953
+ position: relative;
1954
+ margin-left: 0;
1955
+ }
1956
+ .form-inline .has-feedback .form-control-feedback {
1957
+ top: 0;
1958
+ }
1959
+ }
1960
+ .form-horizontal .radio,
1961
+ .form-horizontal .checkbox,
1962
+ .form-horizontal .radio-inline,
1963
+ .form-horizontal .checkbox-inline {
1964
+ padding-top: 7px;
1965
+ margin-top: 0;
1966
+ margin-bottom: 0;
1967
+ }
1968
+ .form-horizontal .radio,
1969
+ .form-horizontal .checkbox {
1970
+ min-height: 27px;
1971
+ }
1972
+ .form-horizontal .form-group {
1973
+ margin-right: -15px;
1974
+ margin-left: -15px;
1975
+ }
1976
+ @media (min-width: 768px) {
1977
+ .form-horizontal .control-label {
1978
+ padding-top: 7px;
1979
+ margin-bottom: 0;
1980
+ text-align: right;
1981
+ }
1982
+ }
1983
+ .form-horizontal .has-feedback .form-control-feedback {
1984
+ right: 15px;
1985
+ }
1986
+ @media (min-width: 768px) {
1987
+ .form-horizontal .form-group-lg .control-label {
1988
+ padding-top: 11px;
1989
+ font-size: 18px;
1990
+ }
1991
+ }
1992
+ @media (min-width: 768px) {
1993
+ .form-horizontal .form-group-sm .control-label {
1994
+ padding-top: 6px;
1995
+ font-size: 12px;
1996
+ }
1997
+ }
1998
+ .btn {
1999
+ display: inline-block;
2000
+ padding: 6px 12px;
2001
+ margin-bottom: 0;
2002
+ font-size: 14px;
2003
+ font-weight: normal;
2004
+ line-height: 1.42857143;
2005
+ text-align: center;
2006
+ white-space: nowrap;
2007
+ vertical-align: middle;
2008
+ -ms-touch-action: manipulation;
2009
+ touch-action: manipulation;
2010
+ cursor: pointer;
2011
+ -webkit-user-select: none;
2012
+ -moz-user-select: none;
2013
+ -ms-user-select: none;
2014
+ user-select: none;
2015
+ background-image: none;
2016
+ border: 1px solid transparent;
2017
+ border-radius: 4px;
2018
+ }
2019
+ .btn:focus,
2020
+ .btn:active:focus,
2021
+ .btn.active:focus,
2022
+ .btn.focus,
2023
+ .btn:active.focus,
2024
+ .btn.active.focus {
2025
+ outline: thin dotted;
2026
+ outline: 5px auto -webkit-focus-ring-color;
2027
+ outline-offset: -2px;
2028
+ }
2029
+ .btn:hover,
2030
+ .btn:focus,
2031
+ .btn.focus {
2032
+ color: #333;
2033
+ text-decoration: none;
2034
+ }
2035
+ .btn:active,
2036
+ .btn.active {
2037
+ background-image: none;
2038
+ outline: 0;
2039
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
2040
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
2041
+ }
2042
+ .btn.disabled,
2043
+ .btn[disabled],
2044
+ fieldset[disabled] .btn {
2045
+ cursor: not-allowed;
2046
+ filter: alpha(opacity=65);
2047
+ -webkit-box-shadow: none;
2048
+ box-shadow: none;
2049
+ opacity: .65;
2050
+ }
2051
+ a.btn.disabled,
2052
+ fieldset[disabled] a.btn {
2053
+ pointer-events: none;
2054
+ }
2055
+ .btn-default {
2056
+ color: #333;
2057
+ background-color: #fff;
2058
+ border-color: #ccc;
2059
+ }
2060
+ .btn-default:focus,
2061
+ .btn-default.focus {
2062
+ color: #333;
2063
+ background-color: #e6e6e6;
2064
+ border-color: #8c8c8c;
2065
+ }
2066
+ .btn-default:hover {
2067
+ color: #333;
2068
+ background-color: #e6e6e6;
2069
+ border-color: #adadad;
2070
+ }
2071
+ .btn-default:active,
2072
+ .btn-default.active,
2073
+ .open > .dropdown-toggle.btn-default {
2074
+ color: #333;
2075
+ background-color: #e6e6e6;
2076
+ border-color: #adadad;
2077
+ }
2078
+ .btn-default:active:hover,
2079
+ .btn-default.active:hover,
2080
+ .open > .dropdown-toggle.btn-default:hover,
2081
+ .btn-default:active:focus,
2082
+ .btn-default.active:focus,
2083
+ .open > .dropdown-toggle.btn-default:focus,
2084
+ .btn-default:active.focus,
2085
+ .btn-default.active.focus,
2086
+ .open > .dropdown-toggle.btn-default.focus {
2087
+ color: #333;
2088
+ background-color: #d4d4d4;
2089
+ border-color: #8c8c8c;
2090
+ }
2091
+ .btn-default:active,
2092
+ .btn-default.active,
2093
+ .open > .dropdown-toggle.btn-default {
2094
+ background-image: none;
2095
+ }
2096
+ .btn-default.disabled:hover,
2097
+ .btn-default[disabled]:hover,
2098
+ fieldset[disabled] .btn-default:hover,
2099
+ .btn-default.disabled:focus,
2100
+ .btn-default[disabled]:focus,
2101
+ fieldset[disabled] .btn-default:focus,
2102
+ .btn-default.disabled.focus,
2103
+ .btn-default[disabled].focus,
2104
+ fieldset[disabled] .btn-default.focus {
2105
+ background-color: #fff;
2106
+ border-color: #ccc;
2107
+ }
2108
+ .btn-default .badge {
2109
+ color: #fff;
2110
+ background-color: #333;
2111
+ }
2112
+ .btn-primary {
2113
+ color: #fff;
2114
+ background-color: #337ab7;
2115
+ border-color: #2e6da4;
2116
+ }
2117
+ .btn-primary:focus,
2118
+ .btn-primary.focus {
2119
+ color: #fff;
2120
+ background-color: #286090;
2121
+ border-color: #122b40;
2122
+ }
2123
+ .btn-primary:hover {
2124
+ color: #fff;
2125
+ background-color: #286090;
2126
+ border-color: #204d74;
2127
+ }
2128
+ .btn-primary:active,
2129
+ .btn-primary.active,
2130
+ .open > .dropdown-toggle.btn-primary {
2131
+ color: #fff;
2132
+ background-color: #286090;
2133
+ border-color: #204d74;
2134
+ }
2135
+ .btn-primary:active:hover,
2136
+ .btn-primary.active:hover,
2137
+ .open > .dropdown-toggle.btn-primary:hover,
2138
+ .btn-primary:active:focus,
2139
+ .btn-primary.active:focus,
2140
+ .open > .dropdown-toggle.btn-primary:focus,
2141
+ .btn-primary:active.focus,
2142
+ .btn-primary.active.focus,
2143
+ .open > .dropdown-toggle.btn-primary.focus {
2144
+ color: #fff;
2145
+ background-color: #204d74;
2146
+ border-color: #122b40;
2147
+ }
2148
+ .btn-primary:active,
2149
+ .btn-primary.active,
2150
+ .open > .dropdown-toggle.btn-primary {
2151
+ background-image: none;
2152
+ }
2153
+ .btn-primary.disabled:hover,
2154
+ .btn-primary[disabled]:hover,
2155
+ fieldset[disabled] .btn-primary:hover,
2156
+ .btn-primary.disabled:focus,
2157
+ .btn-primary[disabled]:focus,
2158
+ fieldset[disabled] .btn-primary:focus,
2159
+ .btn-primary.disabled.focus,
2160
+ .btn-primary[disabled].focus,
2161
+ fieldset[disabled] .btn-primary.focus {
2162
+ background-color: #337ab7;
2163
+ border-color: #2e6da4;
2164
+ }
2165
+ .btn-primary .badge {
2166
+ color: #337ab7;
2167
+ background-color: #fff;
2168
+ }
2169
+ .btn-success {
2170
+ color: #fff;
2171
+ background-color: #5cb85c;
2172
+ border-color: #4cae4c;
2173
+ }
2174
+ .btn-success:focus,
2175
+ .btn-success.focus {
2176
+ color: #fff;
2177
+ background-color: #449d44;
2178
+ border-color: #255625;
2179
+ }
2180
+ .btn-success:hover {
2181
+ color: #fff;
2182
+ background-color: #449d44;
2183
+ border-color: #398439;
2184
+ }
2185
+ .btn-success:active,
2186
+ .btn-success.active,
2187
+ .open > .dropdown-toggle.btn-success {
2188
+ color: #fff;
2189
+ background-color: #449d44;
2190
+ border-color: #398439;
2191
+ }
2192
+ .btn-success:active:hover,
2193
+ .btn-success.active:hover,
2194
+ .open > .dropdown-toggle.btn-success:hover,
2195
+ .btn-success:active:focus,
2196
+ .btn-success.active:focus,
2197
+ .open > .dropdown-toggle.btn-success:focus,
2198
+ .btn-success:active.focus,
2199
+ .btn-success.active.focus,
2200
+ .open > .dropdown-toggle.btn-success.focus {
2201
+ color: #fff;
2202
+ background-color: #398439;
2203
+ border-color: #255625;
2204
+ }
2205
+ .btn-success:active,
2206
+ .btn-success.active,
2207
+ .open > .dropdown-toggle.btn-success {
2208
+ background-image: none;
2209
+ }
2210
+ .btn-success.disabled:hover,
2211
+ .btn-success[disabled]:hover,
2212
+ fieldset[disabled] .btn-success:hover,
2213
+ .btn-success.disabled:focus,
2214
+ .btn-success[disabled]:focus,
2215
+ fieldset[disabled] .btn-success:focus,
2216
+ .btn-success.disabled.focus,
2217
+ .btn-success[disabled].focus,
2218
+ fieldset[disabled] .btn-success.focus {
2219
+ background-color: #5cb85c;
2220
+ border-color: #4cae4c;
2221
+ }
2222
+ .btn-success .badge {
2223
+ color: #5cb85c;
2224
+ background-color: #fff;
2225
+ }
2226
+ .btn-info {
2227
+ color: #fff;
2228
+ background-color: #5bc0de;
2229
+ border-color: #46b8da;
2230
+ }
2231
+ .btn-info:focus,
2232
+ .btn-info.focus {
2233
+ color: #fff;
2234
+ background-color: #31b0d5;
2235
+ border-color: #1b6d85;
2236
+ }
2237
+ .btn-info:hover {
2238
+ color: #fff;
2239
+ background-color: #31b0d5;
2240
+ border-color: #269abc;
2241
+ }
2242
+ .btn-info:active,
2243
+ .btn-info.active,
2244
+ .open > .dropdown-toggle.btn-info {
2245
+ color: #fff;
2246
+ background-color: #31b0d5;
2247
+ border-color: #269abc;
2248
+ }
2249
+ .btn-info:active:hover,
2250
+ .btn-info.active:hover,
2251
+ .open > .dropdown-toggle.btn-info:hover,
2252
+ .btn-info:active:focus,
2253
+ .btn-info.active:focus,
2254
+ .open > .dropdown-toggle.btn-info:focus,
2255
+ .btn-info:active.focus,
2256
+ .btn-info.active.focus,
2257
+ .open > .dropdown-toggle.btn-info.focus {
2258
+ color: #fff;
2259
+ background-color: #269abc;
2260
+ border-color: #1b6d85;
2261
+ }
2262
+ .btn-info:active,
2263
+ .btn-info.active,
2264
+ .open > .dropdown-toggle.btn-info {
2265
+ background-image: none;
2266
+ }
2267
+ .btn-info.disabled:hover,
2268
+ .btn-info[disabled]:hover,
2269
+ fieldset[disabled] .btn-info:hover,
2270
+ .btn-info.disabled:focus,
2271
+ .btn-info[disabled]:focus,
2272
+ fieldset[disabled] .btn-info:focus,
2273
+ .btn-info.disabled.focus,
2274
+ .btn-info[disabled].focus,
2275
+ fieldset[disabled] .btn-info.focus {
2276
+ background-color: #5bc0de;
2277
+ border-color: #46b8da;
2278
+ }
2279
+ .btn-info .badge {
2280
+ color: #5bc0de;
2281
+ background-color: #fff;
2282
+ }
2283
+ .btn-warning {
2284
+ color: #fff;
2285
+ background-color: #f0ad4e;
2286
+ border-color: #eea236;
2287
+ }
2288
+ .btn-warning:focus,
2289
+ .btn-warning.focus {
2290
+ color: #fff;
2291
+ background-color: #ec971f;
2292
+ border-color: #985f0d;
2293
+ }
2294
+ .btn-warning:hover {
2295
+ color: #fff;
2296
+ background-color: #ec971f;
2297
+ border-color: #d58512;
2298
+ }
2299
+ .btn-warning:active,
2300
+ .btn-warning.active,
2301
+ .open > .dropdown-toggle.btn-warning {
2302
+ color: #fff;
2303
+ background-color: #ec971f;
2304
+ border-color: #d58512;
2305
+ }
2306
+ .btn-warning:active:hover,
2307
+ .btn-warning.active:hover,
2308
+ .open > .dropdown-toggle.btn-warning:hover,
2309
+ .btn-warning:active:focus,
2310
+ .btn-warning.active:focus,
2311
+ .open > .dropdown-toggle.btn-warning:focus,
2312
+ .btn-warning:active.focus,
2313
+ .btn-warning.active.focus,
2314
+ .open > .dropdown-toggle.btn-warning.focus {
2315
+ color: #fff;
2316
+ background-color: #d58512;
2317
+ border-color: #985f0d;
2318
+ }
2319
+ .btn-warning:active,
2320
+ .btn-warning.active,
2321
+ .open > .dropdown-toggle.btn-warning {
2322
+ background-image: none;
2323
+ }
2324
+ .btn-warning.disabled:hover,
2325
+ .btn-warning[disabled]:hover,
2326
+ fieldset[disabled] .btn-warning:hover,
2327
+ .btn-warning.disabled:focus,
2328
+ .btn-warning[disabled]:focus,
2329
+ fieldset[disabled] .btn-warning:focus,
2330
+ .btn-warning.disabled.focus,
2331
+ .btn-warning[disabled].focus,
2332
+ fieldset[disabled] .btn-warning.focus {
2333
+ background-color: #f0ad4e;
2334
+ border-color: #eea236;
2335
+ }
2336
+ .btn-warning .badge {
2337
+ color: #f0ad4e;
2338
+ background-color: #fff;
2339
+ }
2340
+ .btn-danger {
2341
+ color: #fff;
2342
+ background-color: #d9534f;
2343
+ border-color: #d43f3a;
2344
+ }
2345
+ .btn-danger:focus,
2346
+ .btn-danger.focus {
2347
+ color: #fff;
2348
+ background-color: #c9302c;
2349
+ border-color: #761c19;
2350
+ }
2351
+ .btn-danger:hover {
2352
+ color: #fff;
2353
+ background-color: #c9302c;
2354
+ border-color: #ac2925;
2355
+ }
2356
+ .btn-danger:active,
2357
+ .btn-danger.active,
2358
+ .open > .dropdown-toggle.btn-danger {
2359
+ color: #fff;
2360
+ background-color: #c9302c;
2361
+ border-color: #ac2925;
2362
+ }
2363
+ .btn-danger:active:hover,
2364
+ .btn-danger.active:hover,
2365
+ .open > .dropdown-toggle.btn-danger:hover,
2366
+ .btn-danger:active:focus,
2367
+ .btn-danger.active:focus,
2368
+ .open > .dropdown-toggle.btn-danger:focus,
2369
+ .btn-danger:active.focus,
2370
+ .btn-danger.active.focus,
2371
+ .open > .dropdown-toggle.btn-danger.focus {
2372
+ color: #fff;
2373
+ background-color: #ac2925;
2374
+ border-color: #761c19;
2375
+ }
2376
+ .btn-danger:active,
2377
+ .btn-danger.active,
2378
+ .open > .dropdown-toggle.btn-danger {
2379
+ background-image: none;
2380
+ }
2381
+ .btn-danger.disabled:hover,
2382
+ .btn-danger[disabled]:hover,
2383
+ fieldset[disabled] .btn-danger:hover,
2384
+ .btn-danger.disabled:focus,
2385
+ .btn-danger[disabled]:focus,
2386
+ fieldset[disabled] .btn-danger:focus,
2387
+ .btn-danger.disabled.focus,
2388
+ .btn-danger[disabled].focus,
2389
+ fieldset[disabled] .btn-danger.focus {
2390
+ background-color: #d9534f;
2391
+ border-color: #d43f3a;
2392
+ }
2393
+ .btn-danger .badge {
2394
+ color: #d9534f;
2395
+ background-color: #fff;
2396
+ }
2397
+ .btn-link {
2398
+ font-weight: normal;
2399
+ color: #337ab7;
2400
+ border-radius: 0;
2401
+ }
2402
+ .btn-link,
2403
+ .btn-link:active,
2404
+ .btn-link.active,
2405
+ .btn-link[disabled],
2406
+ fieldset[disabled] .btn-link {
2407
+ background-color: transparent;
2408
+ -webkit-box-shadow: none;
2409
+ box-shadow: none;
2410
+ }
2411
+ .btn-link,
2412
+ .btn-link:hover,
2413
+ .btn-link:focus,
2414
+ .btn-link:active {
2415
+ border-color: transparent;
2416
+ }
2417
+ .btn-link:hover,
2418
+ .btn-link:focus {
2419
+ color: #23527c;
2420
+ text-decoration: underline;
2421
+ background-color: transparent;
2422
+ }
2423
+ .btn-link[disabled]:hover,
2424
+ fieldset[disabled] .btn-link:hover,
2425
+ .btn-link[disabled]:focus,
2426
+ fieldset[disabled] .btn-link:focus {
2427
+ color: #777;
2428
+ text-decoration: none;
2429
+ }
2430
+ .btn-lg,
2431
+ .btn-group-lg > .btn {
2432
+ padding: 10px 16px;
2433
+ font-size: 18px;
2434
+ line-height: 1.3333333;
2435
+ border-radius: 6px;
2436
+ }
2437
+ .btn-sm,
2438
+ .btn-group-sm > .btn {
2439
+ padding: 5px 10px;
2440
+ font-size: 12px;
2441
+ line-height: 1.5;
2442
+ border-radius: 3px;
2443
+ }
2444
+ .btn-xs,
2445
+ .btn-group-xs > .btn {
2446
+ padding: 1px 5px;
2447
+ font-size: 12px;
2448
+ line-height: 1.5;
2449
+ border-radius: 3px;
2450
+ }
2451
+ .btn-block {
2452
+ display: block;
2453
+ width: 100%;
2454
+ }
2455
+ .btn-block + .btn-block {
2456
+ margin-top: 5px;
2457
+ }
2458
+ input[type="submit"].btn-block,
2459
+ input[type="reset"].btn-block,
2460
+ input[type="button"].btn-block {
2461
+ width: 100%;
2462
+ }
2463
+ .fade {
2464
+ opacity: 0;
2465
+ -webkit-transition: opacity .15s linear;
2466
+ -o-transition: opacity .15s linear;
2467
+ transition: opacity .15s linear;
2468
+ }
2469
+ .fade.in {
2470
+ opacity: 1;
2471
+ }
2472
+ .collapse {
2473
+ display: none;
2474
+ }
2475
+ .collapse.in {
2476
+ display: block;
2477
+ }
2478
+ tr.collapse.in {
2479
+ display: table-row;
2480
+ }
2481
+ tbody.collapse.in {
2482
+ display: table-row-group;
2483
+ }
2484
+ .collapsing {
2485
+ position: relative;
2486
+ height: 0;
2487
+ overflow: hidden;
2488
+ -webkit-transition-timing-function: ease;
2489
+ -o-transition-timing-function: ease;
2490
+ transition-timing-function: ease;
2491
+ -webkit-transition-duration: .35s;
2492
+ -o-transition-duration: .35s;
2493
+ transition-duration: .35s;
2494
+ -webkit-transition-property: height, visibility;
2495
+ -o-transition-property: height, visibility;
2496
+ transition-property: height, visibility;
2497
+ }
2498
+ .caret {
2499
+ display: inline-block;
2500
+ width: 0;
2501
+ height: 0;
2502
+ margin-left: 2px;
2503
+ vertical-align: middle;
2504
+ border-top: 4px dashed;
2505
+ border-top: 4px solid \9;
2506
+ border-right: 4px solid transparent;
2507
+ border-left: 4px solid transparent;
2508
+ }
2509
+ .dropup,
2510
+ .dropdown {
2511
+ position: relative;
2512
+ }
2513
+ .dropdown-toggle:focus {
2514
+ outline: 0;
2515
+ }
2516
+ .dropdown-menu {
2517
+ position: absolute;
2518
+ top: 100%;
2519
+ left: 0;
2520
+ z-index: 1000;
2521
+ display: none;
2522
+ float: left;
2523
+ min-width: 160px;
2524
+ padding: 5px 0;
2525
+ margin: 2px 0 0;
2526
+ font-size: 14px;
2527
+ text-align: left;
2528
+ list-style: none;
2529
+ background-color: #fff;
2530
+ -webkit-background-clip: padding-box;
2531
+ background-clip: padding-box;
2532
+ border: 1px solid #ccc;
2533
+ border: 1px solid rgba(0, 0, 0, .15);
2534
+ border-radius: 4px;
2535
+ -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
2536
+ box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
2537
+ }
2538
+ .dropdown-menu.pull-right {
2539
+ right: 0;
2540
+ left: auto;
2541
+ }
2542
+ .dropdown-menu .divider {
2543
+ height: 1px;
2544
+ margin: 9px 0;
2545
+ overflow: hidden;
2546
+ background-color: #e5e5e5;
2547
+ }
2548
+ .dropdown-menu > li > a {
2549
+ display: block;
2550
+ padding: 3px 20px;
2551
+ clear: both;
2552
+ font-weight: normal;
2553
+ line-height: 1.42857143;
2554
+ color: #333;
2555
+ white-space: nowrap;
2556
+ }
2557
+ .dropdown-menu > li > a:hover,
2558
+ .dropdown-menu > li > a:focus {
2559
+ color: #262626;
2560
+ text-decoration: none;
2561
+ background-color: #f5f5f5;
2562
+ }
2563
+ .dropdown-menu > .active > a,
2564
+ .dropdown-menu > .active > a:hover,
2565
+ .dropdown-menu > .active > a:focus {
2566
+ color: #fff;
2567
+ text-decoration: none;
2568
+ background-color: #337ab7;
2569
+ outline: 0;
2570
+ }
2571
+ .dropdown-menu > .disabled > a,
2572
+ .dropdown-menu > .disabled > a:hover,
2573
+ .dropdown-menu > .disabled > a:focus {
2574
+ color: #777;
2575
+ }
2576
+ .dropdown-menu > .disabled > a:hover,
2577
+ .dropdown-menu > .disabled > a:focus {
2578
+ text-decoration: none;
2579
+ cursor: not-allowed;
2580
+ background-color: transparent;
2581
+ background-image: none;
2582
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
2583
+ }
2584
+ .open > .dropdown-menu {
2585
+ display: block;
2586
+ }
2587
+ .open > a {
2588
+ outline: 0;
2589
+ }
2590
+ .dropdown-menu-right {
2591
+ right: 0;
2592
+ left: auto;
2593
+ }
2594
+ .dropdown-menu-left {
2595
+ right: auto;
2596
+ left: 0;
2597
+ }
2598
+ .dropdown-header {
2599
+ display: block;
2600
+ padding: 3px 20px;
2601
+ font-size: 12px;
2602
+ line-height: 1.42857143;
2603
+ color: #777;
2604
+ white-space: nowrap;
2605
+ }
2606
+ .dropdown-backdrop {
2607
+ position: fixed;
2608
+ top: 0;
2609
+ right: 0;
2610
+ bottom: 0;
2611
+ left: 0;
2612
+ z-index: 990;
2613
+ }
2614
+ .pull-right > .dropdown-menu {
2615
+ right: 0;
2616
+ left: auto;
2617
+ }
2618
+ .dropup .caret,
2619
+ .navbar-fixed-bottom .dropdown .caret {
2620
+ content: "";
2621
+ border-top: 0;
2622
+ border-bottom: 4px dashed;
2623
+ border-bottom: 4px solid \9;
2624
+ }
2625
+ .dropup .dropdown-menu,
2626
+ .navbar-fixed-bottom .dropdown .dropdown-menu {
2627
+ top: auto;
2628
+ bottom: 100%;
2629
+ margin-bottom: 2px;
2630
+ }
2631
+ @media (min-width: 768px) {
2632
+ .navbar-right .dropdown-menu {
2633
+ right: 0;
2634
+ left: auto;
2635
+ }
2636
+ .navbar-right .dropdown-menu-left {
2637
+ right: auto;
2638
+ left: 0;
2639
+ }
2640
+ }
2641
+ .btn-group,
2642
+ .btn-group-vertical {
2643
+ position: relative;
2644
+ display: inline-block;
2645
+ vertical-align: middle;
2646
+ }
2647
+ .btn-group > .btn,
2648
+ .btn-group-vertical > .btn {
2649
+ position: relative;
2650
+ float: left;
2651
+ }
2652
+ .btn-group > .btn:hover,
2653
+ .btn-group-vertical > .btn:hover,
2654
+ .btn-group > .btn:focus,
2655
+ .btn-group-vertical > .btn:focus,
2656
+ .btn-group > .btn:active,
2657
+ .btn-group-vertical > .btn:active,
2658
+ .btn-group > .btn.active,
2659
+ .btn-group-vertical > .btn.active {
2660
+ z-index: 2;
2661
+ }
2662
+ .btn-group .btn + .btn,
2663
+ .btn-group .btn + .btn-group,
2664
+ .btn-group .btn-group + .btn,
2665
+ .btn-group .btn-group + .btn-group {
2666
+ margin-left: -1px;
2667
+ }
2668
+ .btn-toolbar {
2669
+ margin-left: -5px;
2670
+ }
2671
+ .btn-toolbar .btn,
2672
+ .btn-toolbar .btn-group,
2673
+ .btn-toolbar .input-group {
2674
+ float: left;
2675
+ }
2676
+ .btn-toolbar > .btn,
2677
+ .btn-toolbar > .btn-group,
2678
+ .btn-toolbar > .input-group {
2679
+ margin-left: 5px;
2680
+ }
2681
+ .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
2682
+ border-radius: 0;
2683
+ }
2684
+ .btn-group > .btn:first-child {
2685
+ margin-left: 0;
2686
+ }
2687
+ .btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
2688
+ border-top-right-radius: 0;
2689
+ border-bottom-right-radius: 0;
2690
+ }
2691
+ .btn-group > .btn:last-child:not(:first-child),
2692
+ .btn-group > .dropdown-toggle:not(:first-child) {
2693
+ border-top-left-radius: 0;
2694
+ border-bottom-left-radius: 0;
2695
+ }
2696
+ .btn-group > .btn-group {
2697
+ float: left;
2698
+ }
2699
+ .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
2700
+ border-radius: 0;
2701
+ }
2702
+ .btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,
2703
+ .btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
2704
+ border-top-right-radius: 0;
2705
+ border-bottom-right-radius: 0;
2706
+ }
2707
+ .btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
2708
+ border-top-left-radius: 0;
2709
+ border-bottom-left-radius: 0;
2710
+ }
2711
+ .btn-group .dropdown-toggle:active,
2712
+ .btn-group.open .dropdown-toggle {
2713
+ outline: 0;
2714
+ }
2715
+ .btn-group > .btn + .dropdown-toggle {
2716
+ padding-right: 8px;
2717
+ padding-left: 8px;
2718
+ }
2719
+ .btn-group > .btn-lg + .dropdown-toggle {
2720
+ padding-right: 12px;
2721
+ padding-left: 12px;
2722
+ }
2723
+ .btn-group.open .dropdown-toggle {
2724
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
2725
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
2726
+ }
2727
+ .btn-group.open .dropdown-toggle.btn-link {
2728
+ -webkit-box-shadow: none;
2729
+ box-shadow: none;
2730
+ }
2731
+ .btn .caret {
2732
+ margin-left: 0;
2733
+ }
2734
+ .btn-lg .caret {
2735
+ border-width: 5px 5px 0;
2736
+ border-bottom-width: 0;
2737
+ }
2738
+ .dropup .btn-lg .caret {
2739
+ border-width: 0 5px 5px;
2740
+ }
2741
+ .btn-group-vertical > .btn,
2742
+ .btn-group-vertical > .btn-group,
2743
+ .btn-group-vertical > .btn-group > .btn {
2744
+ display: block;
2745
+ float: none;
2746
+ width: 100%;
2747
+ max-width: 100%;
2748
+ }
2749
+ .btn-group-vertical > .btn-group > .btn {
2750
+ float: none;
2751
+ }
2752
+ .btn-group-vertical > .btn + .btn,
2753
+ .btn-group-vertical > .btn + .btn-group,
2754
+ .btn-group-vertical > .btn-group + .btn,
2755
+ .btn-group-vertical > .btn-group + .btn-group {
2756
+ margin-top: -1px;
2757
+ margin-left: 0;
2758
+ }
2759
+ .btn-group-vertical > .btn:not(:first-child):not(:last-child) {
2760
+ border-radius: 0;
2761
+ }
2762
+ .btn-group-vertical > .btn:first-child:not(:last-child) {
2763
+ border-top-left-radius: 4px;
2764
+ border-top-right-radius: 4px;
2765
+ border-bottom-right-radius: 0;
2766
+ border-bottom-left-radius: 0;
2767
+ }
2768
+ .btn-group-vertical > .btn:last-child:not(:first-child) {
2769
+ border-top-left-radius: 0;
2770
+ border-top-right-radius: 0;
2771
+ border-bottom-right-radius: 4px;
2772
+ border-bottom-left-radius: 4px;
2773
+ }
2774
+ .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
2775
+ border-radius: 0;
2776
+ }
2777
+ .btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
2778
+ .btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
2779
+ border-bottom-right-radius: 0;
2780
+ border-bottom-left-radius: 0;
2781
+ }
2782
+ .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
2783
+ border-top-left-radius: 0;
2784
+ border-top-right-radius: 0;
2785
+ }
2786
+ .btn-group-justified {
2787
+ display: table;
2788
+ width: 100%;
2789
+ table-layout: fixed;
2790
+ border-collapse: separate;
2791
+ }
2792
+ .btn-group-justified > .btn,
2793
+ .btn-group-justified > .btn-group {
2794
+ display: table-cell;
2795
+ float: none;
2796
+ width: 1%;
2797
+ }
2798
+ .btn-group-justified > .btn-group .btn {
2799
+ width: 100%;
2800
+ }
2801
+ .btn-group-justified > .btn-group .dropdown-menu {
2802
+ left: auto;
2803
+ }
2804
+ [data-toggle="buttons"] > .btn input[type="radio"],
2805
+ [data-toggle="buttons"] > .btn-group > .btn input[type="radio"],
2806
+ [data-toggle="buttons"] > .btn input[type="checkbox"],
2807
+ [data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] {
2808
+ position: absolute;
2809
+ clip: rect(0, 0, 0, 0);
2810
+ pointer-events: none;
2811
+ }
2812
+ .input-group {
2813
+ position: relative;
2814
+ display: table;
2815
+ border-collapse: separate;
2816
+ }
2817
+ .input-group[class*="col-"] {
2818
+ float: none;
2819
+ padding-right: 0;
2820
+ padding-left: 0;
2821
+ }
2822
+ .input-group .form-control {
2823
+ position: relative;
2824
+ z-index: 2;
2825
+ float: left;
2826
+ width: 100%;
2827
+ margin-bottom: 0;
2828
+ }
2829
+ .input-group .form-control:focus {
2830
+ z-index: 3;
2831
+ }
2832
+ .input-group-lg > .form-control,
2833
+ .input-group-lg > .input-group-addon,
2834
+ .input-group-lg > .input-group-btn > .btn {
2835
+ height: 46px;
2836
+ padding: 10px 16px;
2837
+ font-size: 18px;
2838
+ line-height: 1.3333333;
2839
+ border-radius: 6px;
2840
+ }
2841
+ select.input-group-lg > .form-control,
2842
+ select.input-group-lg > .input-group-addon,
2843
+ select.input-group-lg > .input-group-btn > .btn {
2844
+ height: 46px;
2845
+ line-height: 46px;
2846
+ }
2847
+ textarea.input-group-lg > .form-control,
2848
+ textarea.input-group-lg > .input-group-addon,
2849
+ textarea.input-group-lg > .input-group-btn > .btn,
2850
+ select[multiple].input-group-lg > .form-control,
2851
+ select[multiple].input-group-lg > .input-group-addon,
2852
+ select[multiple].input-group-lg > .input-group-btn > .btn {
2853
+ height: auto;
2854
+ }
2855
+ .input-group-sm > .form-control,
2856
+ .input-group-sm > .input-group-addon,
2857
+ .input-group-sm > .input-group-btn > .btn {
2858
+ height: 30px;
2859
+ padding: 5px 10px;
2860
+ font-size: 12px;
2861
+ line-height: 1.5;
2862
+ border-radius: 3px;
2863
+ }
2864
+ select.input-group-sm > .form-control,
2865
+ select.input-group-sm > .input-group-addon,
2866
+ select.input-group-sm > .input-group-btn > .btn {
2867
+ height: 30px;
2868
+ line-height: 30px;
2869
+ }
2870
+ textarea.input-group-sm > .form-control,
2871
+ textarea.input-group-sm > .input-group-addon,
2872
+ textarea.input-group-sm > .input-group-btn > .btn,
2873
+ select[multiple].input-group-sm > .form-control,
2874
+ select[multiple].input-group-sm > .input-group-addon,
2875
+ select[multiple].input-group-sm > .input-group-btn > .btn {
2876
+ height: auto;
2877
+ }
2878
+ .input-group-addon,
2879
+ .input-group-btn,
2880
+ .input-group .form-control {
2881
+ display: table-cell;
2882
+ }
2883
+ .input-group-addon:not(:first-child):not(:last-child),
2884
+ .input-group-btn:not(:first-child):not(:last-child),
2885
+ .input-group .form-control:not(:first-child):not(:last-child) {
2886
+ border-radius: 0;
2887
+ }
2888
+ .input-group-addon,
2889
+ .input-group-btn {
2890
+ width: 1%;
2891
+ white-space: nowrap;
2892
+ vertical-align: middle;
2893
+ }
2894
+ .input-group-addon {
2895
+ padding: 6px 12px;
2896
+ font-size: 14px;
2897
+ font-weight: normal;
2898
+ line-height: 1;
2899
+ color: #555;
2900
+ text-align: center;
2901
+ background-color: #eee;
2902
+ border: 1px solid #ccc;
2903
+ border-radius: 4px;
2904
+ }
2905
+ .input-group-addon.input-sm {
2906
+ padding: 5px 10px;
2907
+ font-size: 12px;
2908
+ border-radius: 3px;
2909
+ }
2910
+ .input-group-addon.input-lg {
2911
+ padding: 10px 16px;
2912
+ font-size: 18px;
2913
+ border-radius: 6px;
2914
+ }
2915
+ .input-group-addon input[type="radio"],
2916
+ .input-group-addon input[type="checkbox"] {
2917
+ margin-top: 0;
2918
+ }
2919
+ .input-group .form-control:first-child,
2920
+ .input-group-addon:first-child,
2921
+ .input-group-btn:first-child > .btn,
2922
+ .input-group-btn:first-child > .btn-group > .btn,
2923
+ .input-group-btn:first-child > .dropdown-toggle,
2924
+ .input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
2925
+ .input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
2926
+ border-top-right-radius: 0;
2927
+ border-bottom-right-radius: 0;
2928
+ }
2929
+ .input-group-addon:first-child {
2930
+ border-right: 0;
2931
+ }
2932
+ .input-group .form-control:last-child,
2933
+ .input-group-addon:last-child,
2934
+ .input-group-btn:last-child > .btn,
2935
+ .input-group-btn:last-child > .btn-group > .btn,
2936
+ .input-group-btn:last-child > .dropdown-toggle,
2937
+ .input-group-btn:first-child > .btn:not(:first-child),
2938
+ .input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
2939
+ border-top-left-radius: 0;
2940
+ border-bottom-left-radius: 0;
2941
+ }
2942
+ .input-group-addon:last-child {
2943
+ border-left: 0;
2944
+ }
2945
+ .input-group-btn {
2946
+ position: relative;
2947
+ font-size: 0;
2948
+ white-space: nowrap;
2949
+ }
2950
+ .input-group-btn > .btn {
2951
+ position: relative;
2952
+ }
2953
+ .input-group-btn > .btn + .btn {
2954
+ margin-left: -1px;
2955
+ }
2956
+ .input-group-btn > .btn:hover,
2957
+ .input-group-btn > .btn:focus,
2958
+ .input-group-btn > .btn:active {
2959
+ z-index: 2;
2960
+ }
2961
+ .input-group-btn:first-child > .btn,
2962
+ .input-group-btn:first-child > .btn-group {
2963
+ margin-right: -1px;
2964
+ }
2965
+ .input-group-btn:last-child > .btn,
2966
+ .input-group-btn:last-child > .btn-group {
2967
+ z-index: 2;
2968
+ margin-left: -1px;
2969
+ }
2970
+ .nav {
2971
+ padding-left: 0;
2972
+ margin-bottom: 0;
2973
+ list-style: none;
2974
+ }
2975
+ .nav > li {
2976
+ position: relative;
2977
+ display: block;
2978
+ }
2979
+ .nav > li > a {
2980
+ position: relative;
2981
+ display: block;
2982
+ padding: 10px 15px;
2983
+ }
2984
+ .nav > li > a:hover,
2985
+ .nav > li > a:focus {
2986
+ text-decoration: none;
2987
+ background-color: #eee;
2988
+ }
2989
+ .nav > li.disabled > a {
2990
+ color: #777;
2991
+ }
2992
+ .nav > li.disabled > a:hover,
2993
+ .nav > li.disabled > a:focus {
2994
+ color: #777;
2995
+ text-decoration: none;
2996
+ cursor: not-allowed;
2997
+ background-color: transparent;
2998
+ }
2999
+ .nav .open > a,
3000
+ .nav .open > a:hover,
3001
+ .nav .open > a:focus {
3002
+ background-color: #eee;
3003
+ border-color: #337ab7;
3004
+ }
3005
+ .nav .nav-divider {
3006
+ height: 1px;
3007
+ margin: 9px 0;
3008
+ overflow: hidden;
3009
+ background-color: #e5e5e5;
3010
+ }
3011
+ .nav > li > a > img {
3012
+ max-width: none;
3013
+ }
3014
+ .nav-tabs {
3015
+ border-bottom: 1px solid #ddd;
3016
+ }
3017
+ .nav-tabs > li {
3018
+ float: left;
3019
+ margin-bottom: -1px;
3020
+ }
3021
+ .nav-tabs > li > a {
3022
+ margin-right: 2px;
3023
+ line-height: 1.42857143;
3024
+ border: 1px solid transparent;
3025
+ border-radius: 4px 4px 0 0;
3026
+ }
3027
+ .nav-tabs > li > a:hover {
3028
+ border-color: #eee #eee #ddd;
3029
+ }
3030
+ .nav-tabs > li.active > a,
3031
+ .nav-tabs > li.active > a:hover,
3032
+ .nav-tabs > li.active > a:focus {
3033
+ color: #555;
3034
+ cursor: default;
3035
+ background-color: #fff;
3036
+ border: 1px solid #ddd;
3037
+ border-bottom-color: transparent;
3038
+ }
3039
+ .nav-tabs.nav-justified {
3040
+ width: 100%;
3041
+ border-bottom: 0;
3042
+ }
3043
+ .nav-tabs.nav-justified > li {
3044
+ float: none;
3045
+ }
3046
+ .nav-tabs.nav-justified > li > a {
3047
+ margin-bottom: 5px;
3048
+ text-align: center;
3049
+ }
3050
+ .nav-tabs.nav-justified > .dropdown .dropdown-menu {
3051
+ top: auto;
3052
+ left: auto;
3053
+ }
3054
+ @media (min-width: 768px) {
3055
+ .nav-tabs.nav-justified > li {
3056
+ display: table-cell;
3057
+ width: 1%;
3058
+ }
3059
+ .nav-tabs.nav-justified > li > a {
3060
+ margin-bottom: 0;
3061
+ }
3062
+ }
3063
+ .nav-tabs.nav-justified > li > a {
3064
+ margin-right: 0;
3065
+ border-radius: 4px;
3066
+ }
3067
+ .nav-tabs.nav-justified > .active > a,
3068
+ .nav-tabs.nav-justified > .active > a:hover,
3069
+ .nav-tabs.nav-justified > .active > a:focus {
3070
+ border: 1px solid #ddd;
3071
+ }
3072
+ @media (min-width: 768px) {
3073
+ .nav-tabs.nav-justified > li > a {
3074
+ border-bottom: 1px solid #ddd;
3075
+ border-radius: 4px 4px 0 0;
3076
+ }
3077
+ .nav-tabs.nav-justified > .active > a,
3078
+ .nav-tabs.nav-justified > .active > a:hover,
3079
+ .nav-tabs.nav-justified > .active > a:focus {
3080
+ border-bottom-color: #fff;
3081
+ }
3082
+ }
3083
+ .nav-pills > li {
3084
+ float: left;
3085
+ }
3086
+ .nav-pills > li > a {
3087
+ border-radius: 4px;
3088
+ }
3089
+ .nav-pills > li + li {
3090
+ margin-left: 2px;
3091
+ }
3092
+ .nav-pills > li.active > a,
3093
+ .nav-pills > li.active > a:hover,
3094
+ .nav-pills > li.active > a:focus {
3095
+ color: #fff;
3096
+ background-color: #337ab7;
3097
+ }
3098
+ .nav-stacked > li {
3099
+ float: none;
3100
+ }
3101
+ .nav-stacked > li + li {
3102
+ margin-top: 2px;
3103
+ margin-left: 0;
3104
+ }
3105
+ .nav-justified {
3106
+ width: 100%;
3107
+ }
3108
+ .nav-justified > li {
3109
+ float: none;
3110
+ }
3111
+ .nav-justified > li > a {
3112
+ margin-bottom: 5px;
3113
+ text-align: center;
3114
+ }
3115
+ .nav-justified > .dropdown .dropdown-menu {
3116
+ top: auto;
3117
+ left: auto;
3118
+ }
3119
+ @media (min-width: 768px) {
3120
+ .nav-justified > li {
3121
+ display: table-cell;
3122
+ width: 1%;
3123
+ }
3124
+ .nav-justified > li > a {
3125
+ margin-bottom: 0;
3126
+ }
3127
+ }
3128
+ .nav-tabs-justified {
3129
+ border-bottom: 0;
3130
+ }
3131
+ .nav-tabs-justified > li > a {
3132
+ margin-right: 0;
3133
+ border-radius: 4px;
3134
+ }
3135
+ .nav-tabs-justified > .active > a,
3136
+ .nav-tabs-justified > .active > a:hover,
3137
+ .nav-tabs-justified > .active > a:focus {
3138
+ border: 1px solid #ddd;
3139
+ }
3140
+ @media (min-width: 768px) {
3141
+ .nav-tabs-justified > li > a {
3142
+ border-bottom: 1px solid #ddd;
3143
+ border-radius: 4px 4px 0 0;
3144
+ }
3145
+ .nav-tabs-justified > .active > a,
3146
+ .nav-tabs-justified > .active > a:hover,
3147
+ .nav-tabs-justified > .active > a:focus {
3148
+ border-bottom-color: #fff;
3149
+ }
3150
+ }
3151
+ .tab-content > .tab-pane {
3152
+ display: none;
3153
+ }
3154
+ .tab-content > .active {
3155
+ display: block;
3156
+ }
3157
+ .nav-tabs .dropdown-menu {
3158
+ margin-top: -1px;
3159
+ border-top-left-radius: 0;
3160
+ border-top-right-radius: 0;
3161
+ }
3162
+ .navbar {
3163
+ position: relative;
3164
+ min-height: 50px;
3165
+ margin-bottom: 20px;
3166
+ border: 1px solid transparent;
3167
+ }
3168
+ @media (min-width: 768px) {
3169
+ .navbar {
3170
+ border-radius: 4px;
3171
+ }
3172
+ }
3173
+ @media (min-width: 768px) {
3174
+ .navbar-header {
3175
+ float: left;
3176
+ }
3177
+ }
3178
+ .navbar-collapse {
3179
+ padding-right: 15px;
3180
+ padding-left: 15px;
3181
+ overflow-x: visible;
3182
+ -webkit-overflow-scrolling: touch;
3183
+ border-top: 1px solid transparent;
3184
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
3185
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
3186
+ }
3187
+ .navbar-collapse.in {
3188
+ overflow-y: auto;
3189
+ }
3190
+ @media (min-width: 768px) {
3191
+ .navbar-collapse {
3192
+ width: auto;
3193
+ border-top: 0;
3194
+ -webkit-box-shadow: none;
3195
+ box-shadow: none;
3196
+ }
3197
+ .navbar-collapse.collapse {
3198
+ display: block !important;
3199
+ height: auto !important;
3200
+ padding-bottom: 0;
3201
+ overflow: visible !important;
3202
+ }
3203
+ .navbar-collapse.in {
3204
+ overflow-y: visible;
3205
+ }
3206
+ .navbar-fixed-top .navbar-collapse,
3207
+ .navbar-static-top .navbar-collapse,
3208
+ .navbar-fixed-bottom .navbar-collapse {
3209
+ padding-right: 0;
3210
+ padding-left: 0;
3211
+ }
3212
+ }
3213
+ .navbar-fixed-top .navbar-collapse,
3214
+ .navbar-fixed-bottom .navbar-collapse {
3215
+ max-height: 340px;
3216
+ }
3217
+ @media (max-device-width: 480px) and (orientation: landscape) {
3218
+ .navbar-fixed-top .navbar-collapse,
3219
+ .navbar-fixed-bottom .navbar-collapse {
3220
+ max-height: 200px;
3221
+ }
3222
+ }
3223
+ .container > .navbar-header,
3224
+ .container-fluid > .navbar-header,
3225
+ .container > .navbar-collapse,
3226
+ .container-fluid > .navbar-collapse {
3227
+ margin-right: -15px;
3228
+ margin-left: -15px;
3229
+ }
3230
+ @media (min-width: 768px) {
3231
+ .container > .navbar-header,
3232
+ .container-fluid > .navbar-header,
3233
+ .container > .navbar-collapse,
3234
+ .container-fluid > .navbar-collapse {
3235
+ margin-right: 0;
3236
+ margin-left: 0;
3237
+ }
3238
+ }
3239
+ .navbar-static-top {
3240
+ z-index: 1000;
3241
+ border-width: 0 0 1px;
3242
+ }
3243
+ @media (min-width: 768px) {
3244
+ .navbar-static-top {
3245
+ border-radius: 0;
3246
+ }
3247
+ }
3248
+ .navbar-fixed-top,
3249
+ .navbar-fixed-bottom {
3250
+ position: fixed;
3251
+ right: 0;
3252
+ left: 0;
3253
+ z-index: 1030;
3254
+ }
3255
+ @media (min-width: 768px) {
3256
+ .navbar-fixed-top,
3257
+ .navbar-fixed-bottom {
3258
+ border-radius: 0;
3259
+ }
3260
+ }
3261
+ .navbar-fixed-top {
3262
+ top: 0;
3263
+ border-width: 0 0 1px;
3264
+ }
3265
+ .navbar-fixed-bottom {
3266
+ bottom: 0;
3267
+ margin-bottom: 0;
3268
+ border-width: 1px 0 0;
3269
+ }
3270
+ .navbar-brand {
3271
+ float: left;
3272
+ height: 50px;
3273
+ padding: 15px 15px;
3274
+ font-size: 18px;
3275
+ line-height: 20px;
3276
+ }
3277
+ .navbar-brand:hover,
3278
+ .navbar-brand:focus {
3279
+ text-decoration: none;
3280
+ }
3281
+ .navbar-brand > img {
3282
+ display: block;
3283
+ }
3284
+ @media (min-width: 768px) {
3285
+ .navbar > .container .navbar-brand,
3286
+ .navbar > .container-fluid .navbar-brand {
3287
+ margin-left: -15px;
3288
+ }
3289
+ }
3290
+ .navbar-toggle {
3291
+ position: relative;
3292
+ float: right;
3293
+ padding: 9px 10px;
3294
+ margin-top: 8px;
3295
+ margin-right: 15px;
3296
+ margin-bottom: 8px;
3297
+ background-color: transparent;
3298
+ background-image: none;
3299
+ border: 1px solid transparent;
3300
+ border-radius: 4px;
3301
+ }
3302
+ .navbar-toggle:focus {
3303
+ outline: 0;
3304
+ }
3305
+ .navbar-toggle .icon-bar {
3306
+ display: block;
3307
+ width: 22px;
3308
+ height: 2px;
3309
+ border-radius: 1px;
3310
+ }
3311
+ .navbar-toggle .icon-bar + .icon-bar {
3312
+ margin-top: 4px;
3313
+ }
3314
+ @media (min-width: 768px) {
3315
+ .navbar-toggle {
3316
+ display: none;
3317
+ }
3318
+ }
3319
+ .navbar-nav {
3320
+ margin: 7.5px -15px;
3321
+ }
3322
+ .navbar-nav > li > a {
3323
+ padding-top: 10px;
3324
+ padding-bottom: 10px;
3325
+ line-height: 20px;
3326
+ }
3327
+ @media (max-width: 767px) {
3328
+ .navbar-nav .open .dropdown-menu {
3329
+ position: static;
3330
+ float: none;
3331
+ width: auto;
3332
+ margin-top: 0;
3333
+ background-color: transparent;
3334
+ border: 0;
3335
+ -webkit-box-shadow: none;
3336
+ box-shadow: none;
3337
+ }
3338
+ .navbar-nav .open .dropdown-menu > li > a,
3339
+ .navbar-nav .open .dropdown-menu .dropdown-header {
3340
+ padding: 5px 15px 5px 25px;
3341
+ }
3342
+ .navbar-nav .open .dropdown-menu > li > a {
3343
+ line-height: 20px;
3344
+ }
3345
+ .navbar-nav .open .dropdown-menu > li > a:hover,
3346
+ .navbar-nav .open .dropdown-menu > li > a:focus {
3347
+ background-image: none;
3348
+ }
3349
+ }
3350
+ @media (min-width: 768px) {
3351
+ .navbar-nav {
3352
+ float: left;
3353
+ margin: 0;
3354
+ }
3355
+ .navbar-nav > li {
3356
+ float: left;
3357
+ }
3358
+ .navbar-nav > li > a {
3359
+ padding-top: 15px;
3360
+ padding-bottom: 15px;
3361
+ }
3362
+ }
3363
+ .navbar-form {
3364
+ padding: 10px 15px;
3365
+ margin-top: 8px;
3366
+ margin-right: -15px;
3367
+ margin-bottom: 8px;
3368
+ margin-left: -15px;
3369
+ border-top: 1px solid transparent;
3370
+ border-bottom: 1px solid transparent;
3371
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
3372
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
3373
+ }
3374
+ @media (min-width: 768px) {
3375
+ .navbar-form .form-group {
3376
+ display: inline-block;
3377
+ margin-bottom: 0;
3378
+ vertical-align: middle;
3379
+ }
3380
+ .navbar-form .form-control {
3381
+ display: inline-block;
3382
+ width: auto;
3383
+ vertical-align: middle;
3384
+ }
3385
+ .navbar-form .form-control-static {
3386
+ display: inline-block;
3387
+ }
3388
+ .navbar-form .input-group {
3389
+ display: inline-table;
3390
+ vertical-align: middle;
3391
+ }
3392
+ .navbar-form .input-group .input-group-addon,
3393
+ .navbar-form .input-group .input-group-btn,
3394
+ .navbar-form .input-group .form-control {
3395
+ width: auto;
3396
+ }
3397
+ .navbar-form .input-group > .form-control {
3398
+ width: 100%;
3399
+ }
3400
+ .navbar-form .control-label {
3401
+ margin-bottom: 0;
3402
+ vertical-align: middle;
3403
+ }
3404
+ .navbar-form .radio,
3405
+ .navbar-form .checkbox {
3406
+ display: inline-block;
3407
+ margin-top: 0;
3408
+ margin-bottom: 0;
3409
+ vertical-align: middle;
3410
+ }
3411
+ .navbar-form .radio label,
3412
+ .navbar-form .checkbox label {
3413
+ padding-left: 0;
3414
+ }
3415
+ .navbar-form .radio input[type="radio"],
3416
+ .navbar-form .checkbox input[type="checkbox"] {
3417
+ position: relative;
3418
+ margin-left: 0;
3419
+ }
3420
+ .navbar-form .has-feedback .form-control-feedback {
3421
+ top: 0;
3422
+ }
3423
+ }
3424
+ @media (max-width: 767px) {
3425
+ .navbar-form .form-group {
3426
+ margin-bottom: 5px;
3427
+ }
3428
+ .navbar-form .form-group:last-child {
3429
+ margin-bottom: 0;
3430
+ }
3431
+ }
3432
+ @media (min-width: 768px) {
3433
+ .navbar-form {
3434
+ width: auto;
3435
+ padding-top: 0;
3436
+ padding-bottom: 0;
3437
+ margin-right: 0;
3438
+ margin-left: 0;
3439
+ border: 0;
3440
+ -webkit-box-shadow: none;
3441
+ box-shadow: none;
3442
+ }
3443
+ }
3444
+ .navbar-nav > li > .dropdown-menu {
3445
+ margin-top: 0;
3446
+ border-top-left-radius: 0;
3447
+ border-top-right-radius: 0;
3448
+ }
3449
+ .navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
3450
+ margin-bottom: 0;
3451
+ border-top-left-radius: 4px;
3452
+ border-top-right-radius: 4px;
3453
+ border-bottom-right-radius: 0;
3454
+ border-bottom-left-radius: 0;
3455
+ }
3456
+ .navbar-btn {
3457
+ margin-top: 8px;
3458
+ margin-bottom: 8px;
3459
+ }
3460
+ .navbar-btn.btn-sm {
3461
+ margin-top: 10px;
3462
+ margin-bottom: 10px;
3463
+ }
3464
+ .navbar-btn.btn-xs {
3465
+ margin-top: 14px;
3466
+ margin-bottom: 14px;
3467
+ }
3468
+ .navbar-text {
3469
+ margin-top: 15px;
3470
+ margin-bottom: 15px;
3471
+ }
3472
+ @media (min-width: 768px) {
3473
+ .navbar-text {
3474
+ float: left;
3475
+ margin-right: 15px;
3476
+ margin-left: 15px;
3477
+ }
3478
+ }
3479
+ @media (min-width: 768px) {
3480
+ .navbar-left {
3481
+ float: left !important;
3482
+ }
3483
+ .navbar-right {
3484
+ float: right !important;
3485
+ margin-right: -15px;
3486
+ }
3487
+ .navbar-right ~ .navbar-right {
3488
+ margin-right: 0;
3489
+ }
3490
+ }
3491
+ .navbar-default {
3492
+ background-color: #f8f8f8;
3493
+ border-color: #e7e7e7;
3494
+ }
3495
+ .navbar-default .navbar-brand {
3496
+ color: #777;
3497
+ }
3498
+ .navbar-default .navbar-brand:hover,
3499
+ .navbar-default .navbar-brand:focus {
3500
+ color: #5e5e5e;
3501
+ background-color: transparent;
3502
+ }
3503
+ .navbar-default .navbar-text {
3504
+ color: #777;
3505
+ }
3506
+ .navbar-default .navbar-nav > li > a {
3507
+ color: #777;
3508
+ }
3509
+ .navbar-default .navbar-nav > li > a:hover,
3510
+ .navbar-default .navbar-nav > li > a:focus {
3511
+ color: #333;
3512
+ background-color: transparent;
3513
+ }
3514
+ .navbar-default .navbar-nav > .active > a,
3515
+ .navbar-default .navbar-nav > .active > a:hover,
3516
+ .navbar-default .navbar-nav > .active > a:focus {
3517
+ color: #555;
3518
+ background-color: #e7e7e7;
3519
+ }
3520
+ .navbar-default .navbar-nav > .disabled > a,
3521
+ .navbar-default .navbar-nav > .disabled > a:hover,
3522
+ .navbar-default .navbar-nav > .disabled > a:focus {
3523
+ color: #ccc;
3524
+ background-color: transparent;
3525
+ }
3526
+ .navbar-default .navbar-toggle {
3527
+ border-color: #ddd;
3528
+ }
3529
+ .navbar-default .navbar-toggle:hover,
3530
+ .navbar-default .navbar-toggle:focus {
3531
+ background-color: #ddd;
3532
+ }
3533
+ .navbar-default .navbar-toggle .icon-bar {
3534
+ background-color: #888;
3535
+ }
3536
+ .navbar-default .navbar-collapse,
3537
+ .navbar-default .navbar-form {
3538
+ border-color: #e7e7e7;
3539
+ }
3540
+ .navbar-default .navbar-nav > .open > a,
3541
+ .navbar-default .navbar-nav > .open > a:hover,
3542
+ .navbar-default .navbar-nav > .open > a:focus {
3543
+ color: #555;
3544
+ background-color: #e7e7e7;
3545
+ }
3546
+ @media (max-width: 767px) {
3547
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a {
3548
+ color: #777;
3549
+ }
3550
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
3551
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
3552
+ color: #333;
3553
+ background-color: transparent;
3554
+ }
3555
+ .navbar-default .navbar-nav .open .dropdown-menu > .active > a,
3556
+ .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
3557
+ .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
3558
+ color: #555;
3559
+ background-color: #e7e7e7;
3560
+ }
3561
+ .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
3562
+ .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
3563
+ .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
3564
+ color: #ccc;
3565
+ background-color: transparent;
3566
+ }
3567
+ }
3568
+ .navbar-default .navbar-link {
3569
+ color: #777;
3570
+ }
3571
+ .navbar-default .navbar-link:hover {
3572
+ color: #333;
3573
+ }
3574
+ .navbar-default .btn-link {
3575
+ color: #777;
3576
+ }
3577
+ .navbar-default .btn-link:hover,
3578
+ .navbar-default .btn-link:focus {
3579
+ color: #333;
3580
+ }
3581
+ .navbar-default .btn-link[disabled]:hover,
3582
+ fieldset[disabled] .navbar-default .btn-link:hover,
3583
+ .navbar-default .btn-link[disabled]:focus,
3584
+ fieldset[disabled] .navbar-default .btn-link:focus {
3585
+ color: #ccc;
3586
+ }
3587
+ .navbar-inverse {
3588
+ background-color: #222;
3589
+ border-color: #080808;
3590
+ }
3591
+ .navbar-inverse .navbar-brand {
3592
+ color: #9d9d9d;
3593
+ }
3594
+ .navbar-inverse .navbar-brand:hover,
3595
+ .navbar-inverse .navbar-brand:focus {
3596
+ color: #fff;
3597
+ background-color: transparent;
3598
+ }
3599
+ .navbar-inverse .navbar-text {
3600
+ color: #9d9d9d;
3601
+ }
3602
+ .navbar-inverse .navbar-nav > li > a {
3603
+ color: #9d9d9d;
3604
+ }
3605
+ .navbar-inverse .navbar-nav > li > a:hover,
3606
+ .navbar-inverse .navbar-nav > li > a:focus {
3607
+ color: #fff;
3608
+ background-color: transparent;
3609
+ }
3610
+ .navbar-inverse .navbar-nav > .active > a,
3611
+ .navbar-inverse .navbar-nav > .active > a:hover,
3612
+ .navbar-inverse .navbar-nav > .active > a:focus {
3613
+ color: #fff;
3614
+ background-color: #080808;
3615
+ }
3616
+ .navbar-inverse .navbar-nav > .disabled > a,
3617
+ .navbar-inverse .navbar-nav > .disabled > a:hover,
3618
+ .navbar-inverse .navbar-nav > .disabled > a:focus {
3619
+ color: #444;
3620
+ background-color: transparent;
3621
+ }
3622
+ .navbar-inverse .navbar-toggle {
3623
+ border-color: #333;
3624
+ }
3625
+ .navbar-inverse .navbar-toggle:hover,
3626
+ .navbar-inverse .navbar-toggle:focus {
3627
+ background-color: #333;
3628
+ }
3629
+ .navbar-inverse .navbar-toggle .icon-bar {
3630
+ background-color: #fff;
3631
+ }
3632
+ .navbar-inverse .navbar-collapse,
3633
+ .navbar-inverse .navbar-form {
3634
+ border-color: #101010;
3635
+ }
3636
+ .navbar-inverse .navbar-nav > .open > a,
3637
+ .navbar-inverse .navbar-nav > .open > a:hover,
3638
+ .navbar-inverse .navbar-nav > .open > a:focus {
3639
+ color: #fff;
3640
+ background-color: #080808;
3641
+ }
3642
+ @media (max-width: 767px) {
3643
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
3644
+ border-color: #080808;
3645
+ }
3646
+ .navbar-inverse .navbar-nav .open .dropdown-menu .divider {
3647
+ background-color: #080808;
3648
+ }
3649
+ .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
3650
+ color: #9d9d9d;
3651
+ }
3652
+ .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
3653
+ .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
3654
+ color: #fff;
3655
+ background-color: transparent;
3656
+ }
3657
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,
3658
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
3659
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
3660
+ color: #fff;
3661
+ background-color: #080808;
3662
+ }
3663
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,
3664
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,
3665
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
3666
+ color: #444;
3667
+ background-color: transparent;
3668
+ }
3669
+ }
3670
+ .navbar-inverse .navbar-link {
3671
+ color: #9d9d9d;
3672
+ }
3673
+ .navbar-inverse .navbar-link:hover {
3674
+ color: #fff;
3675
+ }
3676
+ .navbar-inverse .btn-link {
3677
+ color: #9d9d9d;
3678
+ }
3679
+ .navbar-inverse .btn-link:hover,
3680
+ .navbar-inverse .btn-link:focus {
3681
+ color: #fff;
3682
+ }
3683
+ .navbar-inverse .btn-link[disabled]:hover,
3684
+ fieldset[disabled] .navbar-inverse .btn-link:hover,
3685
+ .navbar-inverse .btn-link[disabled]:focus,
3686
+ fieldset[disabled] .navbar-inverse .btn-link:focus {
3687
+ color: #444;
3688
+ }
3689
+ .breadcrumb {
3690
+ padding: 8px 15px;
3691
+ margin-bottom: 20px;
3692
+ list-style: none;
3693
+ background-color: #f5f5f5;
3694
+ border-radius: 4px;
3695
+ }
3696
+ .breadcrumb > li {
3697
+ display: inline-block;
3698
+ }
3699
+ .breadcrumb > li + li:before {
3700
+ padding: 0 5px;
3701
+ color: #ccc;
3702
+ content: "/\00a0";
3703
+ }
3704
+ .breadcrumb > .active {
3705
+ color: #777;
3706
+ }
3707
+ .pagination {
3708
+ display: inline-block;
3709
+ padding-left: 0;
3710
+ margin: 20px 0;
3711
+ border-radius: 4px;
3712
+ }
3713
+ .pagination > li {
3714
+ display: inline;
3715
+ }
3716
+ .pagination > li > a,
3717
+ .pagination > li > span {
3718
+ position: relative;
3719
+ float: left;
3720
+ padding: 6px 12px;
3721
+ margin-left: -1px;
3722
+ line-height: 1.42857143;
3723
+ color: #337ab7;
3724
+ text-decoration: none;
3725
+ background-color: #fff;
3726
+ border: 1px solid #ddd;
3727
+ }
3728
+ .pagination > li:first-child > a,
3729
+ .pagination > li:first-child > span {
3730
+ margin-left: 0;
3731
+ border-top-left-radius: 4px;
3732
+ border-bottom-left-radius: 4px;
3733
+ }
3734
+ .pagination > li:last-child > a,
3735
+ .pagination > li:last-child > span {
3736
+ border-top-right-radius: 4px;
3737
+ border-bottom-right-radius: 4px;
3738
+ }
3739
+ .pagination > li > a:hover,
3740
+ .pagination > li > span:hover,
3741
+ .pagination > li > a:focus,
3742
+ .pagination > li > span:focus {
3743
+ z-index: 2;
3744
+ color: #23527c;
3745
+ background-color: #eee;
3746
+ border-color: #ddd;
3747
+ }
3748
+ .pagination > .active > a,
3749
+ .pagination > .active > span,
3750
+ .pagination > .active > a:hover,
3751
+ .pagination > .active > span:hover,
3752
+ .pagination > .active > a:focus,
3753
+ .pagination > .active > span:focus {
3754
+ z-index: 3;
3755
+ color: #fff;
3756
+ cursor: default;
3757
+ background-color: #337ab7;
3758
+ border-color: #337ab7;
3759
+ }
3760
+ .pagination > .disabled > span,
3761
+ .pagination > .disabled > span:hover,
3762
+ .pagination > .disabled > span:focus,
3763
+ .pagination > .disabled > a,
3764
+ .pagination > .disabled > a:hover,
3765
+ .pagination > .disabled > a:focus {
3766
+ color: #777;
3767
+ cursor: not-allowed;
3768
+ background-color: #fff;
3769
+ border-color: #ddd;
3770
+ }
3771
+ .pagination-lg > li > a,
3772
+ .pagination-lg > li > span {
3773
+ padding: 10px 16px;
3774
+ font-size: 18px;
3775
+ line-height: 1.3333333;
3776
+ }
3777
+ .pagination-lg > li:first-child > a,
3778
+ .pagination-lg > li:first-child > span {
3779
+ border-top-left-radius: 6px;
3780
+ border-bottom-left-radius: 6px;
3781
+ }
3782
+ .pagination-lg > li:last-child > a,
3783
+ .pagination-lg > li:last-child > span {
3784
+ border-top-right-radius: 6px;
3785
+ border-bottom-right-radius: 6px;
3786
+ }
3787
+ .pagination-sm > li > a,
3788
+ .pagination-sm > li > span {
3789
+ padding: 5px 10px;
3790
+ font-size: 12px;
3791
+ line-height: 1.5;
3792
+ }
3793
+ .pagination-sm > li:first-child > a,
3794
+ .pagination-sm > li:first-child > span {
3795
+ border-top-left-radius: 3px;
3796
+ border-bottom-left-radius: 3px;
3797
+ }
3798
+ .pagination-sm > li:last-child > a,
3799
+ .pagination-sm > li:last-child > span {
3800
+ border-top-right-radius: 3px;
3801
+ border-bottom-right-radius: 3px;
3802
+ }
3803
+ .pager {
3804
+ padding-left: 0;
3805
+ margin: 20px 0;
3806
+ text-align: center;
3807
+ list-style: none;
3808
+ }
3809
+ .pager li {
3810
+ display: inline;
3811
+ }
3812
+ .pager li > a,
3813
+ .pager li > span {
3814
+ display: inline-block;
3815
+ padding: 5px 14px;
3816
+ background-color: #fff;
3817
+ border: 1px solid #ddd;
3818
+ border-radius: 15px;
3819
+ }
3820
+ .pager li > a:hover,
3821
+ .pager li > a:focus {
3822
+ text-decoration: none;
3823
+ background-color: #eee;
3824
+ }
3825
+ .pager .next > a,
3826
+ .pager .next > span {
3827
+ float: right;
3828
+ }
3829
+ .pager .previous > a,
3830
+ .pager .previous > span {
3831
+ float: left;
3832
+ }
3833
+ .pager .disabled > a,
3834
+ .pager .disabled > a:hover,
3835
+ .pager .disabled > a:focus,
3836
+ .pager .disabled > span {
3837
+ color: #777;
3838
+ cursor: not-allowed;
3839
+ background-color: #fff;
3840
+ }
3841
+
3842
+ .badge {
3843
+ display: inline-block;
3844
+ min-width: 10px;
3845
+ padding: 3px 7px;
3846
+ font-size: 12px;
3847
+ font-weight: bold;
3848
+ line-height: 1;
3849
+ color: #fff;
3850
+ text-align: center;
3851
+ white-space: nowrap;
3852
+ vertical-align: middle;
3853
+ background-color: #777;
3854
+ border-radius: 10px;
3855
+ }
3856
+ .badge:empty {
3857
+ display: none;
3858
+ }
3859
+ .btn .badge {
3860
+ position: relative;
3861
+ top: -1px;
3862
+ }
3863
+ .btn-xs .badge,
3864
+ .btn-group-xs > .btn .badge {
3865
+ top: 0;
3866
+ padding: 1px 5px;
3867
+ }
3868
+ a.badge:hover,
3869
+ a.badge:focus {
3870
+ color: #fff;
3871
+ text-decoration: none;
3872
+ cursor: pointer;
3873
+ }
3874
+ .list-group-item.active > .badge,
3875
+ .nav-pills > .active > a > .badge {
3876
+ color: #337ab7;
3877
+ background-color: #fff;
3878
+ }
3879
+ .list-group-item > .badge {
3880
+ float: right;
3881
+ }
3882
+ .list-group-item > .badge + .badge {
3883
+ margin-right: 5px;
3884
+ }
3885
+ .nav-pills > li > a > .badge {
3886
+ margin-left: 3px;
3887
+ }
3888
+ .jumbotron {
3889
+ padding-top: 30px;
3890
+ padding-bottom: 30px;
3891
+ margin-bottom: 30px;
3892
+ color: inherit;
3893
+ background-color: #eee;
3894
+ }
3895
+ .jumbotron h1,
3896
+ .jumbotron .h1 {
3897
+ color: inherit;
3898
+ }
3899
+ .jumbotron p {
3900
+ margin-bottom: 15px;
3901
+ font-size: 21px;
3902
+ font-weight: 200;
3903
+ }
3904
+ .jumbotron > hr {
3905
+ border-top-color: #d5d5d5;
3906
+ }
3907
+ .container .jumbotron,
3908
+ .container-fluid .jumbotron {
3909
+ padding-right: 15px;
3910
+ padding-left: 15px;
3911
+ border-radius: 6px;
3912
+ }
3913
+ .jumbotron .container {
3914
+ max-width: 100%;
3915
+ }
3916
+ @media screen and (min-width: 768px) {
3917
+ .jumbotron {
3918
+ padding-top: 48px;
3919
+ padding-bottom: 48px;
3920
+ }
3921
+ .container .jumbotron,
3922
+ .container-fluid .jumbotron {
3923
+ padding-right: 60px;
3924
+ padding-left: 60px;
3925
+ }
3926
+ .jumbotron h1,
3927
+ .jumbotron .h1 {
3928
+ font-size: 63px;
3929
+ }
3930
+ }
3931
+ .thumbnail {
3932
+ display: block;
3933
+ padding: 4px;
3934
+ margin-bottom: 20px;
3935
+ line-height: 1.42857143;
3936
+ background-color: #fff;
3937
+ border: 1px solid #ddd;
3938
+ border-radius: 4px;
3939
+ -webkit-transition: border .2s ease-in-out;
3940
+ -o-transition: border .2s ease-in-out;
3941
+ transition: border .2s ease-in-out;
3942
+ }
3943
+ .thumbnail > img,
3944
+ .thumbnail a > img {
3945
+ margin-right: auto;
3946
+ margin-left: auto;
3947
+ }
3948
+ a.thumbnail:hover,
3949
+ a.thumbnail:focus,
3950
+ a.thumbnail.active {
3951
+ border-color: #337ab7;
3952
+ }
3953
+ .thumbnail .caption {
3954
+ padding: 9px;
3955
+ color: #333;
3956
+ }
3957
+ .alert {
3958
+ padding: 15px;
3959
+ margin-bottom: 20px;
3960
+ border: 1px solid transparent;
3961
+ border-radius: 4px;
3962
+ }
3963
+ .alert h4 {
3964
+ margin-top: 0;
3965
+ color: inherit;
3966
+ }
3967
+ .alert .alert-link {
3968
+ font-weight: bold;
3969
+ }
3970
+ .alert > p,
3971
+ .alert > ul {
3972
+ margin-bottom: 0;
3973
+ }
3974
+ .alert > p + p {
3975
+ margin-top: 5px;
3976
+ }
3977
+ .alert-dismissable,
3978
+ .alert-dismissible {
3979
+ padding-right: 35px;
3980
+ }
3981
+ .alert-dismissable .close,
3982
+ .alert-dismissible .close {
3983
+ position: relative;
3984
+ top: -2px;
3985
+ right: -21px;
3986
+ color: inherit;
3987
+ }
3988
+ .alert-success {
3989
+ color: #3c763d;
3990
+ background-color: #dff0d8;
3991
+ border-color: #d6e9c6;
3992
+ }
3993
+ .alert-success hr {
3994
+ border-top-color: #c9e2b3;
3995
+ }
3996
+ .alert-success .alert-link {
3997
+ color: #2b542c;
3998
+ }
3999
+ .alert-info {
4000
+ color: #31708f;
4001
+ background-color: #d9edf7;
4002
+ border-color: #bce8f1;
4003
+ }
4004
+ .alert-info hr {
4005
+ border-top-color: #a6e1ec;
4006
+ }
4007
+ .alert-info .alert-link {
4008
+ color: #245269;
4009
+ }
4010
+ .alert-warning {
4011
+ color: #8a6d3b;
4012
+ background-color: #fcf8e3;
4013
+ border-color: #faebcc;
4014
+ }
4015
+ .alert-warning hr {
4016
+ border-top-color: #f7e1b5;
4017
+ }
4018
+ .alert-warning .alert-link {
4019
+ color: #66512c;
4020
+ }
4021
+ .alert-danger {
4022
+ color: #a94442;
4023
+ background-color: #f2dede;
4024
+ border-color: #ebccd1;
4025
+ }
4026
+ .alert-danger hr {
4027
+ border-top-color: #e4b9c0;
4028
+ }
4029
+ .alert-danger .alert-link {
4030
+ color: #843534;
4031
+ }
4032
+ @-webkit-keyframes progress-bar-stripes {
4033
+ from {
4034
+ background-position: 40px 0;
4035
+ }
4036
+ to {
4037
+ background-position: 0 0;
4038
+ }
4039
+ }
4040
+ @-o-keyframes progress-bar-stripes {
4041
+ from {
4042
+ background-position: 40px 0;
4043
+ }
4044
+ to {
4045
+ background-position: 0 0;
4046
+ }
4047
+ }
4048
+ @keyframes progress-bar-stripes {
4049
+ from {
4050
+ background-position: 40px 0;
4051
+ }
4052
+ to {
4053
+ background-position: 0 0;
4054
+ }
4055
+ }
4056
+ .progress {
4057
+ height: 20px;
4058
+ margin-bottom: 20px;
4059
+ overflow: hidden;
4060
+ background-color: #f5f5f5;
4061
+ border-radius: 4px;
4062
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
4063
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
4064
+ }
4065
+ .progress-bar {
4066
+ float: left;
4067
+ width: 0;
4068
+ height: 100%;
4069
+ font-size: 12px;
4070
+ line-height: 20px;
4071
+ color: #fff;
4072
+ text-align: center;
4073
+ background-color: #337ab7;
4074
+ -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
4075
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
4076
+ -webkit-transition: width .6s ease;
4077
+ -o-transition: width .6s ease;
4078
+ transition: width .6s ease;
4079
+ }
4080
+ .progress-striped .progress-bar,
4081
+ .progress-bar-striped {
4082
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4083
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4084
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4085
+ -webkit-background-size: 40px 40px;
4086
+ background-size: 40px 40px;
4087
+ }
4088
+ .progress.active .progress-bar,
4089
+ .progress-bar.active {
4090
+ -webkit-animation: progress-bar-stripes 2s linear infinite;
4091
+ -o-animation: progress-bar-stripes 2s linear infinite;
4092
+ animation: progress-bar-stripes 2s linear infinite;
4093
+ }
4094
+ .progress-bar-success {
4095
+ background-color: #5cb85c;
4096
+ }
4097
+ .progress-striped .progress-bar-success {
4098
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4099
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4100
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4101
+ }
4102
+ .progress-bar-info {
4103
+ background-color: #5bc0de;
4104
+ }
4105
+ .progress-striped .progress-bar-info {
4106
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4107
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4108
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4109
+ }
4110
+ .progress-bar-warning {
4111
+ background-color: #f0ad4e;
4112
+ }
4113
+ .progress-striped .progress-bar-warning {
4114
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4115
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4116
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4117
+ }
4118
+ .progress-bar-danger {
4119
+ background-color: #d9534f;
4120
+ }
4121
+ .progress-striped .progress-bar-danger {
4122
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4123
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4124
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
4125
+ }
4126
+ .media {
4127
+ margin-top: 15px;
4128
+ }
4129
+ .media:first-child {
4130
+ margin-top: 0;
4131
+ }
4132
+ .media,
4133
+ .media-body {
4134
+ overflow: hidden;
4135
+ zoom: 1;
4136
+ }
4137
+ .media-body {
4138
+ width: 10000px;
4139
+ }
4140
+ .media-object {
4141
+ display: block;
4142
+ }
4143
+ .media-object.img-thumbnail {
4144
+ max-width: none;
4145
+ }
4146
+ .media-right,
4147
+ .media > .pull-right {
4148
+ padding-left: 10px;
4149
+ }
4150
+ .media-left,
4151
+ .media > .pull-left {
4152
+ padding-right: 10px;
4153
+ }
4154
+ .media-left,
4155
+ .media-right,
4156
+ .media-body {
4157
+ display: table-cell;
4158
+ vertical-align: top;
4159
+ }
4160
+ .media-middle {
4161
+ vertical-align: middle;
4162
+ }
4163
+ .media-bottom {
4164
+ vertical-align: bottom;
4165
+ }
4166
+ .media-heading {
4167
+ margin-top: 0;
4168
+ margin-bottom: 5px;
4169
+ }
4170
+ .media-list {
4171
+ padding-left: 0;
4172
+ list-style: none;
4173
+ }
4174
+ .list-group {
4175
+ padding-left: 0;
4176
+ margin-bottom: 20px;
4177
+ }
4178
+ .list-group-item {
4179
+ position: relative;
4180
+ display: block;
4181
+ padding: 10px 15px;
4182
+ margin-bottom: -1px;
4183
+ background-color: #fff;
4184
+ border: 1px solid #ddd;
4185
+ }
4186
+ .list-group-item:first-child {
4187
+ border-top-left-radius: 4px;
4188
+ border-top-right-radius: 4px;
4189
+ }
4190
+ .list-group-item:last-child {
4191
+ margin-bottom: 0;
4192
+ border-bottom-right-radius: 4px;
4193
+ border-bottom-left-radius: 4px;
4194
+ }
4195
+ a.list-group-item,
4196
+ button.list-group-item {
4197
+ color: #555;
4198
+ }
4199
+ a.list-group-item .list-group-item-heading,
4200
+ button.list-group-item .list-group-item-heading {
4201
+ color: #333;
4202
+ }
4203
+ a.list-group-item:hover,
4204
+ button.list-group-item:hover,
4205
+ a.list-group-item:focus,
4206
+ button.list-group-item:focus {
4207
+ color: #555;
4208
+ text-decoration: none;
4209
+ background-color: #f5f5f5;
4210
+ }
4211
+ button.list-group-item {
4212
+ width: 100%;
4213
+ text-align: left;
4214
+ }
4215
+ .list-group-item.disabled,
4216
+ .list-group-item.disabled:hover,
4217
+ .list-group-item.disabled:focus {
4218
+ color: #777;
4219
+ cursor: not-allowed;
4220
+ background-color: #eee;
4221
+ }
4222
+ .list-group-item.disabled .list-group-item-heading,
4223
+ .list-group-item.disabled:hover .list-group-item-heading,
4224
+ .list-group-item.disabled:focus .list-group-item-heading {
4225
+ color: inherit;
4226
+ }
4227
+ .list-group-item.disabled .list-group-item-text,
4228
+ .list-group-item.disabled:hover .list-group-item-text,
4229
+ .list-group-item.disabled:focus .list-group-item-text {
4230
+ color: #777;
4231
+ }
4232
+ .list-group-item.active,
4233
+ .list-group-item.active:hover,
4234
+ .list-group-item.active:focus {
4235
+ z-index: 2;
4236
+ color: #fff;
4237
+ background-color: #337ab7;
4238
+ border-color: #337ab7;
4239
+ }
4240
+ .list-group-item.active .list-group-item-heading,
4241
+ .list-group-item.active:hover .list-group-item-heading,
4242
+ .list-group-item.active:focus .list-group-item-heading,
4243
+ .list-group-item.active .list-group-item-heading > small,
4244
+ .list-group-item.active:hover .list-group-item-heading > small,
4245
+ .list-group-item.active:focus .list-group-item-heading > small,
4246
+ .list-group-item.active .list-group-item-heading > .small,
4247
+ .list-group-item.active:hover .list-group-item-heading > .small,
4248
+ .list-group-item.active:focus .list-group-item-heading > .small {
4249
+ color: inherit;
4250
+ }
4251
+ .list-group-item.active .list-group-item-text,
4252
+ .list-group-item.active:hover .list-group-item-text,
4253
+ .list-group-item.active:focus .list-group-item-text {
4254
+ color: #c7ddef;
4255
+ }
4256
+ .list-group-item-success {
4257
+ color: #3c763d;
4258
+ background-color: #dff0d8;
4259
+ }
4260
+ a.list-group-item-success,
4261
+ button.list-group-item-success {
4262
+ color: #3c763d;
4263
+ }
4264
+ a.list-group-item-success .list-group-item-heading,
4265
+ button.list-group-item-success .list-group-item-heading {
4266
+ color: inherit;
4267
+ }
4268
+ a.list-group-item-success:hover,
4269
+ button.list-group-item-success:hover,
4270
+ a.list-group-item-success:focus,
4271
+ button.list-group-item-success:focus {
4272
+ color: #3c763d;
4273
+ background-color: #d0e9c6;
4274
+ }
4275
+ a.list-group-item-success.active,
4276
+ button.list-group-item-success.active,
4277
+ a.list-group-item-success.active:hover,
4278
+ button.list-group-item-success.active:hover,
4279
+ a.list-group-item-success.active:focus,
4280
+ button.list-group-item-success.active:focus {
4281
+ color: #fff;
4282
+ background-color: #3c763d;
4283
+ border-color: #3c763d;
4284
+ }
4285
+ .list-group-item-info {
4286
+ color: #31708f;
4287
+ background-color: #d9edf7;
4288
+ }
4289
+ a.list-group-item-info,
4290
+ button.list-group-item-info {
4291
+ color: #31708f;
4292
+ }
4293
+ a.list-group-item-info .list-group-item-heading,
4294
+ button.list-group-item-info .list-group-item-heading {
4295
+ color: inherit;
4296
+ }
4297
+ a.list-group-item-info:hover,
4298
+ button.list-group-item-info:hover,
4299
+ a.list-group-item-info:focus,
4300
+ button.list-group-item-info:focus {
4301
+ color: #31708f;
4302
+ background-color: #c4e3f3;
4303
+ }
4304
+ a.list-group-item-info.active,
4305
+ button.list-group-item-info.active,
4306
+ a.list-group-item-info.active:hover,
4307
+ button.list-group-item-info.active:hover,
4308
+ a.list-group-item-info.active:focus,
4309
+ button.list-group-item-info.active:focus {
4310
+ color: #fff;
4311
+ background-color: #31708f;
4312
+ border-color: #31708f;
4313
+ }
4314
+ .list-group-item-warning {
4315
+ color: #8a6d3b;
4316
+ background-color: #fcf8e3;
4317
+ }
4318
+ a.list-group-item-warning,
4319
+ button.list-group-item-warning {
4320
+ color: #8a6d3b;
4321
+ }
4322
+ a.list-group-item-warning .list-group-item-heading,
4323
+ button.list-group-item-warning .list-group-item-heading {
4324
+ color: inherit;
4325
+ }
4326
+ a.list-group-item-warning:hover,
4327
+ button.list-group-item-warning:hover,
4328
+ a.list-group-item-warning:focus,
4329
+ button.list-group-item-warning:focus {
4330
+ color: #8a6d3b;
4331
+ background-color: #faf2cc;
4332
+ }
4333
+ a.list-group-item-warning.active,
4334
+ button.list-group-item-warning.active,
4335
+ a.list-group-item-warning.active:hover,
4336
+ button.list-group-item-warning.active:hover,
4337
+ a.list-group-item-warning.active:focus,
4338
+ button.list-group-item-warning.active:focus {
4339
+ color: #fff;
4340
+ background-color: #8a6d3b;
4341
+ border-color: #8a6d3b;
4342
+ }
4343
+ .list-group-item-danger {
4344
+ color: #a94442;
4345
+ background-color: #f2dede;
4346
+ }
4347
+ a.list-group-item-danger,
4348
+ button.list-group-item-danger {
4349
+ color: #a94442;
4350
+ }
4351
+ a.list-group-item-danger .list-group-item-heading,
4352
+ button.list-group-item-danger .list-group-item-heading {
4353
+ color: inherit;
4354
+ }
4355
+ a.list-group-item-danger:hover,
4356
+ button.list-group-item-danger:hover,
4357
+ a.list-group-item-danger:focus,
4358
+ button.list-group-item-danger:focus {
4359
+ color: #a94442;
4360
+ background-color: #ebcccc;
4361
+ }
4362
+ a.list-group-item-danger.active,
4363
+ button.list-group-item-danger.active,
4364
+ a.list-group-item-danger.active:hover,
4365
+ button.list-group-item-danger.active:hover,
4366
+ a.list-group-item-danger.active:focus,
4367
+ button.list-group-item-danger.active:focus {
4368
+ color: #fff;
4369
+ background-color: #a94442;
4370
+ border-color: #a94442;
4371
+ }
4372
+ .list-group-item-heading {
4373
+ margin-top: 0;
4374
+ margin-bottom: 5px;
4375
+ }
4376
+ .list-group-item-text {
4377
+ margin-bottom: 0;
4378
+ line-height: 1.3;
4379
+ }
4380
+ .panel {
4381
+ margin-bottom: 20px;
4382
+ background-color: #fff;
4383
+ border: 1px solid transparent;
4384
+ border-radius: 0px;
4385
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
4386
+ box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
4387
+ }
4388
+ .panel-body {
4389
+ padding: 15px;
4390
+ }
4391
+ .panel-heading {
4392
+ padding: 10px 15px;
4393
+ border-bottom: 1px solid transparent;
4394
+ }
4395
+ .panel-heading > .dropdown .dropdown-toggle {
4396
+ color: inherit;
4397
+ }
4398
+ .panel-title {
4399
+ margin-top: 0;
4400
+ margin-bottom: 0;
4401
+ font-size: 16px;
4402
+ color: inherit;
4403
+ }
4404
+ .panel-title > a,
4405
+ .panel-title > small,
4406
+ .panel-title > .small,
4407
+ .panel-title > small > a,
4408
+ .panel-title > .small > a {
4409
+ color: inherit;
4410
+ }
4411
+ .panel-footer {
4412
+ padding: 10px 15px;
4413
+ background-color: #f5f5f5;
4414
+ border-top: 1px solid #ddd;
4415
+ border-bottom-right-radius: 3px;
4416
+ border-bottom-left-radius: 3px;
4417
+ }
4418
+ .panel > .list-group,
4419
+ .panel > .panel-collapse > .list-group {
4420
+ margin-bottom: 0;
4421
+ }
4422
+ .panel > .list-group .list-group-item,
4423
+ .panel > .panel-collapse > .list-group .list-group-item {
4424
+ border-width: 1px 0;
4425
+ border-radius: 0;
4426
+ }
4427
+ .panel > .list-group:first-child .list-group-item:first-child,
4428
+ .panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {
4429
+ border-top: 0;
4430
+ border-top-left-radius: 3px;
4431
+ border-top-right-radius: 3px;
4432
+ }
4433
+ .panel > .list-group:last-child .list-group-item:last-child,
4434
+ .panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {
4435
+ border-bottom: 0;
4436
+ border-bottom-right-radius: 3px;
4437
+ border-bottom-left-radius: 3px;
4438
+ }
4439
+ .panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {
4440
+ border-top-left-radius: 0;
4441
+ border-top-right-radius: 0;
4442
+ }
4443
+ .panel-heading + .list-group .list-group-item:first-child {
4444
+ border-top-width: 0;
4445
+ }
4446
+ .list-group + .panel-footer {
4447
+ border-top-width: 0;
4448
+ }
4449
+ .panel > .table,
4450
+ .panel > .table-responsive > .table,
4451
+ .panel > .panel-collapse > .table {
4452
+ margin-bottom: 0;
4453
+ }
4454
+ .panel > .table caption,
4455
+ .panel > .table-responsive > .table caption,
4456
+ .panel > .panel-collapse > .table caption {
4457
+ padding-right: 15px;
4458
+ padding-left: 15px;
4459
+ }
4460
+ .panel > .table:first-child,
4461
+ .panel > .table-responsive:first-child > .table:first-child {
4462
+ border-top-left-radius: 3px;
4463
+ border-top-right-radius: 3px;
4464
+ }
4465
+ .panel > .table:first-child > thead:first-child > tr:first-child,
4466
+ .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,
4467
+ .panel > .table:first-child > tbody:first-child > tr:first-child,
4468
+ .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {
4469
+ border-top-left-radius: 3px;
4470
+ border-top-right-radius: 3px;
4471
+ }
4472
+ .panel > .table:first-child > thead:first-child > tr:first-child td:first-child,
4473
+ .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,
4474
+ .panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,
4475
+ .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,
4476
+ .panel > .table:first-child > thead:first-child > tr:first-child th:first-child,
4477
+ .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,
4478
+ .panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,
4479
+ .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {
4480
+ border-top-left-radius: 3px;
4481
+ }
4482
+ .panel > .table:first-child > thead:first-child > tr:first-child td:last-child,
4483
+ .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,
4484
+ .panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,
4485
+ .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,
4486
+ .panel > .table:first-child > thead:first-child > tr:first-child th:last-child,
4487
+ .panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,
4488
+ .panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,
4489
+ .panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {
4490
+ border-top-right-radius: 3px;
4491
+ }
4492
+ .panel > .table:last-child,
4493
+ .panel > .table-responsive:last-child > .table:last-child {
4494
+ border-bottom-right-radius: 3px;
4495
+ border-bottom-left-radius: 3px;
4496
+ }
4497
+ .panel > .table:last-child > tbody:last-child > tr:last-child,
4498
+ .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,
4499
+ .panel > .table:last-child > tfoot:last-child > tr:last-child,
4500
+ .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {
4501
+ border-bottom-right-radius: 3px;
4502
+ border-bottom-left-radius: 3px;
4503
+ }
4504
+ .panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,
4505
+ .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,
4506
+ .panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
4507
+ .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
4508
+ .panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,
4509
+ .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,
4510
+ .panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,
4511
+ .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {
4512
+ border-bottom-left-radius: 3px;
4513
+ }
4514
+ .panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,
4515
+ .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,
4516
+ .panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
4517
+ .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
4518
+ .panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,
4519
+ .panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,
4520
+ .panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,
4521
+ .panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {
4522
+ border-bottom-right-radius: 3px;
4523
+ }
4524
+ .panel > .panel-body + .table,
4525
+ .panel > .panel-body + .table-responsive,
4526
+ .panel > .table + .panel-body,
4527
+ .panel > .table-responsive + .panel-body {
4528
+ border-top: 1px solid #ddd;
4529
+ }
4530
+ .panel > .table > tbody:first-child > tr:first-child th,
4531
+ .panel > .table > tbody:first-child > tr:first-child td {
4532
+ border-top: 0;
4533
+ }
4534
+ .panel > .table-bordered,
4535
+ .panel > .table-responsive > .table-bordered {
4536
+ border: 0;
4537
+ }
4538
+ .panel > .table-bordered > thead > tr > th:first-child,
4539
+ .panel > .table-responsive > .table-bordered > thead > tr > th:first-child,
4540
+ .panel > .table-bordered > tbody > tr > th:first-child,
4541
+ .panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,
4542
+ .panel > .table-bordered > tfoot > tr > th:first-child,
4543
+ .panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,
4544
+ .panel > .table-bordered > thead > tr > td:first-child,
4545
+ .panel > .table-responsive > .table-bordered > thead > tr > td:first-child,
4546
+ .panel > .table-bordered > tbody > tr > td:first-child,
4547
+ .panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,
4548
+ .panel > .table-bordered > tfoot > tr > td:first-child,
4549
+ .panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {
4550
+ border-left: 0;
4551
+ }
4552
+ .panel > .table-bordered > thead > tr > th:last-child,
4553
+ .panel > .table-responsive > .table-bordered > thead > tr > th:last-child,
4554
+ .panel > .table-bordered > tbody > tr > th:last-child,
4555
+ .panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,
4556
+ .panel > .table-bordered > tfoot > tr > th:last-child,
4557
+ .panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,
4558
+ .panel > .table-bordered > thead > tr > td:last-child,
4559
+ .panel > .table-responsive > .table-bordered > thead > tr > td:last-child,
4560
+ .panel > .table-bordered > tbody > tr > td:last-child,
4561
+ .panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,
4562
+ .panel > .table-bordered > tfoot > tr > td:last-child,
4563
+ .panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {
4564
+ border-right: 0;
4565
+ }
4566
+ .panel > .table-bordered > thead > tr:first-child > td,
4567
+ .panel > .table-responsive > .table-bordered > thead > tr:first-child > td,
4568
+ .panel > .table-bordered > tbody > tr:first-child > td,
4569
+ .panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,
4570
+ .panel > .table-bordered > thead > tr:first-child > th,
4571
+ .panel > .table-responsive > .table-bordered > thead > tr:first-child > th,
4572
+ .panel > .table-bordered > tbody > tr:first-child > th,
4573
+ .panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {
4574
+ border-bottom: 0;
4575
+ }
4576
+ .panel > .table-bordered > tbody > tr:last-child > td,
4577
+ .panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,
4578
+ .panel > .table-bordered > tfoot > tr:last-child > td,
4579
+ .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,
4580
+ .panel > .table-bordered > tbody > tr:last-child > th,
4581
+ .panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,
4582
+ .panel > .table-bordered > tfoot > tr:last-child > th,
4583
+ .panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {
4584
+ border-bottom: 0;
4585
+ }
4586
+ .panel > .table-responsive {
4587
+ margin-bottom: 0;
4588
+ border: 0;
4589
+ }
4590
+ .panel-group {
4591
+ margin-bottom: 20px;
4592
+ }
4593
+ .panel-group .panel {
4594
+ margin-bottom: 0;
4595
+ border-radius: 4px;
4596
+ }
4597
+ .panel-group .panel + .panel {
4598
+ margin-top: 5px;
4599
+ }
4600
+ .panel-group .panel-heading {
4601
+ border-bottom: 0;
4602
+ }
4603
+ .panel-group .panel-heading + .panel-collapse > .panel-body,
4604
+ .panel-group .panel-heading + .panel-collapse > .list-group {
4605
+ border-top: 1px solid #ddd;
4606
+ }
4607
+ .panel-group .panel-footer {
4608
+ border-top: 0;
4609
+ }
4610
+ .panel-group .panel-footer + .panel-collapse .panel-body {
4611
+ border-bottom: 1px solid #ddd;
4612
+ }
4613
+ .panel-default {
4614
+ border-color: #ddd;
4615
+ }
4616
+ .panel-default > .panel-heading {
4617
+ color: #333;
4618
+ background-color: #f5f5f5;
4619
+ border-color: #ddd;
4620
+ }
4621
+ .panel-default > .panel-heading + .panel-collapse > .panel-body {
4622
+ border-top-color: #ddd;
4623
+ }
4624
+ .panel-default > .panel-heading .badge {
4625
+ color: #f5f5f5;
4626
+ background-color: #333;
4627
+ }
4628
+ .panel-default > .panel-footer + .panel-collapse > .panel-body {
4629
+ border-bottom-color: #ddd;
4630
+ }
4631
+ .panel-primary {
4632
+ border-color: #337ab7;
4633
+ }
4634
+ .panel-primary > .panel-heading {
4635
+ color: #fff;
4636
+ background-color: #337ab7;
4637
+ border-color: #337ab7;
4638
+ }
4639
+ .panel-primary > .panel-heading + .panel-collapse > .panel-body {
4640
+ border-top-color: #337ab7;
4641
+ }
4642
+ .panel-primary > .panel-heading .badge {
4643
+ color: #337ab7;
4644
+ background-color: #fff;
4645
+ }
4646
+ .panel-primary > .panel-footer + .panel-collapse > .panel-body {
4647
+ border-bottom-color: #337ab7;
4648
+ }
4649
+ .panel-success {
4650
+ border-color: #d6e9c6;
4651
+ }
4652
+ .panel-success > .panel-heading {
4653
+ color: #3c763d;
4654
+ background-color: #dff0d8;
4655
+ border-color: #d6e9c6;
4656
+ }
4657
+ .panel-success > .panel-heading + .panel-collapse > .panel-body {
4658
+ border-top-color: #d6e9c6;
4659
+ }
4660
+ .panel-success > .panel-heading .badge {
4661
+ color: #dff0d8;
4662
+ background-color: #3c763d;
4663
+ }
4664
+ .panel-success > .panel-footer + .panel-collapse > .panel-body {
4665
+ border-bottom-color: #d6e9c6;
4666
+ }
4667
+ .panel-info {
4668
+ border-color: #bce8f1;
4669
+ }
4670
+ .panel-info > .panel-heading {
4671
+ color: #31708f;
4672
+ background-color: #d9edf7;
4673
+ border-color: #bce8f1;
4674
+ }
4675
+ .panel-info > .panel-heading + .panel-collapse > .panel-body {
4676
+ border-top-color: #bce8f1;
4677
+ }
4678
+ .panel-info > .panel-heading .badge {
4679
+ color: #d9edf7;
4680
+ background-color: #31708f;
4681
+ }
4682
+ .panel-info > .panel-footer + .panel-collapse > .panel-body {
4683
+ border-bottom-color: #bce8f1;
4684
+ }
4685
+ .panel-warning {
4686
+ border-color: #faebcc;
4687
+ }
4688
+ .panel-warning > .panel-heading {
4689
+ color: #8a6d3b;
4690
+ background-color: #fcf8e3;
4691
+ border-color: #faebcc;
4692
+ }
4693
+ .panel-warning > .panel-heading + .panel-collapse > .panel-body {
4694
+ border-top-color: #faebcc;
4695
+ }
4696
+ .panel-warning > .panel-heading .badge {
4697
+ color: #fcf8e3;
4698
+ background-color: #8a6d3b;
4699
+ }
4700
+ .panel-warning > .panel-footer + .panel-collapse > .panel-body {
4701
+ border-bottom-color: #faebcc;
4702
+ }
4703
+ .panel-danger {
4704
+ border-color: #ebccd1;
4705
+ }
4706
+ .panel-danger > .panel-heading {
4707
+ color: #a94442;
4708
+ background-color: #f2dede;
4709
+ border-color: #ebccd1;
4710
+ }
4711
+ .panel-danger > .panel-heading + .panel-collapse > .panel-body {
4712
+ border-top-color: #ebccd1;
4713
+ }
4714
+ .panel-danger > .panel-heading .badge {
4715
+ color: #f2dede;
4716
+ background-color: #a94442;
4717
+ }
4718
+ .panel-danger > .panel-footer + .panel-collapse > .panel-body {
4719
+ border-bottom-color: #ebccd1;
4720
+ }
4721
+ .embed-responsive {
4722
+ position: relative;
4723
+ display: block;
4724
+ height: 0;
4725
+ padding: 0;
4726
+ overflow: hidden;
4727
+ }
4728
+ .embed-responsive .embed-responsive-item,
4729
+ .embed-responsive iframe,
4730
+ .embed-responsive embed,
4731
+ .embed-responsive object,
4732
+ .embed-responsive video {
4733
+ position: absolute;
4734
+ top: 0;
4735
+ bottom: 0;
4736
+ left: 0;
4737
+ width: 100%;
4738
+ height: 100%;
4739
+ border: 0;
4740
+ }
4741
+ .embed-responsive-16by9 {
4742
+ padding-bottom: 56.25%;
4743
+ }
4744
+ .embed-responsive-4by3 {
4745
+ padding-bottom: 75%;
4746
+ }
4747
+ .well {
4748
+ min-height: 20px;
4749
+ padding: 19px;
4750
+ margin-bottom: 20px;
4751
+ background-color: #f5f5f5;
4752
+ border: 1px solid #e3e3e3;
4753
+ border-radius: 4px;
4754
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
4755
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
4756
+ }
4757
+ .well blockquote {
4758
+ border-color: #ddd;
4759
+ border-color: rgba(0, 0, 0, .15);
4760
+ }
4761
+ .well-lg {
4762
+ padding: 24px;
4763
+ border-radius: 6px;
4764
+ }
4765
+ .well-sm {
4766
+ padding: 9px;
4767
+ border-radius: 3px;
4768
+ }
4769
+ .close {
4770
+ float: right;
4771
+ font-size: 21px;
4772
+ font-weight: bold;
4773
+ line-height: 1;
4774
+ color: #000;
4775
+ text-shadow: 0 1px 0 #fff;
4776
+ filter: alpha(opacity=20);
4777
+ opacity: .2;
4778
+ }
4779
+ .close:hover,
4780
+ .close:focus {
4781
+ color: #000;
4782
+ text-decoration: none;
4783
+ cursor: pointer;
4784
+ filter: alpha(opacity=50);
4785
+ opacity: .5;
4786
+ }
4787
+ button.close {
4788
+ -webkit-appearance: none;
4789
+ padding: 0;
4790
+ cursor: pointer;
4791
+ background: transparent;
4792
+ border: 0;
4793
+ }
4794
+
4795
+ @media (min-width: 768px) {
4796
+ .modal-dialog {
4797
+ width: 600px;
4798
+ margin: 30px auto;
4799
+ }
4800
+ .modal-content {
4801
+ -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
4802
+ box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
4803
+ }
4804
+ .modal-sm {
4805
+ width: 300px;
4806
+ }
4807
+ }
4808
+ @media (min-width: 992px) {
4809
+ .modal-lg {
4810
+ width: 900px;
4811
+ }
4812
+ }
4813
+ .tooltip {
4814
+ position: absolute;
4815
+ z-index: 1070;
4816
+ display: block;
4817
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
4818
+ font-size: 12px;
4819
+ font-style: normal;
4820
+ font-weight: normal;
4821
+ line-height: 1.42857143;
4822
+ text-align: left;
4823
+ text-align: start;
4824
+ text-decoration: none;
4825
+ text-shadow: none;
4826
+ text-transform: none;
4827
+ letter-spacing: normal;
4828
+ word-break: normal;
4829
+ word-spacing: normal;
4830
+ word-wrap: normal;
4831
+ white-space: normal;
4832
+ filter: alpha(opacity=0);
4833
+ opacity: 0;
4834
+
4835
+ line-break: auto;
4836
+ }
4837
+ .tooltip.in {
4838
+ filter: alpha(opacity=90);
4839
+ opacity: .9;
4840
+ }
4841
+ .tooltip.top {
4842
+ padding: 5px 0;
4843
+ margin-top: -3px;
4844
+ }
4845
+ .tooltip.right {
4846
+ padding: 0 5px;
4847
+ margin-left: 3px;
4848
+ }
4849
+ .tooltip.bottom {
4850
+ padding: 5px 0;
4851
+ margin-top: 3px;
4852
+ }
4853
+ .tooltip.left {
4854
+ padding: 0 5px;
4855
+ margin-left: -3px;
4856
+ }
4857
+ .tooltip-inner {
4858
+ max-width: 200px;
4859
+ padding: 3px 8px;
4860
+ color: #fff;
4861
+ text-align: center;
4862
+ background-color: #000;
4863
+ border-radius: 4px;
4864
+ }
4865
+ .tooltip-arrow {
4866
+ position: absolute;
4867
+ width: 0;
4868
+ height: 0;
4869
+ border-color: transparent;
4870
+ border-style: solid;
4871
+ }
4872
+ .tooltip.top .tooltip-arrow {
4873
+ bottom: 0;
4874
+ left: 50%;
4875
+ margin-left: -5px;
4876
+ border-width: 5px 5px 0;
4877
+ border-top-color: #000;
4878
+ }
4879
+ .tooltip.top-left .tooltip-arrow {
4880
+ right: 5px;
4881
+ bottom: 0;
4882
+ margin-bottom: -5px;
4883
+ border-width: 5px 5px 0;
4884
+ border-top-color: #000;
4885
+ }
4886
+ .tooltip.top-right .tooltip-arrow {
4887
+ bottom: 0;
4888
+ left: 5px;
4889
+ margin-bottom: -5px;
4890
+ border-width: 5px 5px 0;
4891
+ border-top-color: #000;
4892
+ }
4893
+ .tooltip.right .tooltip-arrow {
4894
+ top: 50%;
4895
+ left: 0;
4896
+ margin-top: -5px;
4897
+ border-width: 5px 5px 5px 0;
4898
+ border-right-color: #000;
4899
+ }
4900
+ .tooltip.left .tooltip-arrow {
4901
+ top: 50%;
4902
+ right: 0;
4903
+ margin-top: -5px;
4904
+ border-width: 5px 0 5px 5px;
4905
+ border-left-color: #000;
4906
+ }
4907
+ .tooltip.bottom .tooltip-arrow {
4908
+ top: 0;
4909
+ left: 50%;
4910
+ margin-left: -5px;
4911
+ border-width: 0 5px 5px;
4912
+ border-bottom-color: #000;
4913
+ }
4914
+ .tooltip.bottom-left .tooltip-arrow {
4915
+ top: 0;
4916
+ right: 5px;
4917
+ margin-top: -5px;
4918
+ border-width: 0 5px 5px;
4919
+ border-bottom-color: #000;
4920
+ }
4921
+ .tooltip.bottom-right .tooltip-arrow {
4922
+ top: 0;
4923
+ left: 5px;
4924
+ margin-top: -5px;
4925
+ border-width: 0 5px 5px;
4926
+ border-bottom-color: #000;
4927
+ }
4928
+
4929
+ .clearfix:before,
4930
+ .clearfix:after,
4931
+ .dl-horizontal dd:before,
4932
+ .dl-horizontal dd:after,
4933
+ .container:before,
4934
+ .container:after,
4935
+ .container-fluid:before,
4936
+ .container-fluid:after,
4937
+ .row:before,
4938
+ .row:after,
4939
+ .form-horizontal .form-group:before,
4940
+ .form-horizontal .form-group:after,
4941
+ .btn-toolbar:before,
4942
+ .btn-toolbar:after,
4943
+ .btn-group-vertical > .btn-group:before,
4944
+ .btn-group-vertical > .btn-group:after,
4945
+ .nav:before,
4946
+ .nav:after,
4947
+ .navbar:before,
4948
+ .navbar:after,
4949
+ .navbar-header:before,
4950
+ .navbar-header:after,
4951
+ .navbar-collapse:before,
4952
+ .navbar-collapse:after,
4953
+ .pager:before,
4954
+ .pager:after,
4955
+ .panel-body:before,
4956
+ .panel-body:after,
4957
+ .modal-header:before,
4958
+ .modal-header:after,
4959
+ .modal-footer:before,
4960
+ .modal-footer:after {
4961
+ display: table;
4962
+ content: " ";
4963
+ }
4964
+ .clearfix:after,
4965
+ .dl-horizontal dd:after,
4966
+ .container:after,
4967
+ .container-fluid:after,
4968
+ .row:after,
4969
+ .form-horizontal .form-group:after,
4970
+ .btn-toolbar:after,
4971
+ .btn-group-vertical > .btn-group:after,
4972
+ .nav:after,
4973
+ .navbar:after,
4974
+ .navbar-header:after,
4975
+ .navbar-collapse:after,
4976
+ .pager:after,
4977
+ .panel-body:after,
4978
+ .modal-header:after,
4979
+ .modal-footer:after {
4980
+ clear: both;
4981
+ }
4982
+ .center-block {
4983
+ display: block;
4984
+ margin-right: auto;
4985
+ margin-left: auto;
4986
+ }
4987
+ .pull-right {
4988
+ float: right !important;
4989
+ }
4990
+ .pull-left {